1. 16 7月, 2016 11 次提交
  2. 15 7月, 2016 21 次提交
  3. 14 7月, 2016 8 次提交
    • D
      Merge branch 'nps_ent-coding-style' · 18017723
      David S. Miller 提交于
      Elad Kanfi says:
      
      ====================
      Code style fixes
      
      Fix all checkpatch warnings and errors, and reuse code
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      18017723
    • E
      net: nps_enet: code reuse · 094f57aa
      Elad Kanfi 提交于
      Add inline function that checks if there is a pending tx packet.
      Signed-off-by: NElad Kanfi <eladkan@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      094f57aa
    • E
      net: nps_enet: fix coding style issues · ddbff3e8
      Elad Kanfi 提交于
      Fix following coding style problems :
      
      ERROR: else should follow close brace '}'
      +	}
      +	else { /* !dst_is_aligned */
      
      WARNING: Missing a blank line after declarations
      +			u32 buf = nps_enet_reg_get(priv, NPS_ENET_REG_RX_BUF);
      +			put_unaligned_be32(buf, reg);
      
      WARNING: Missing a blank line after declarations
      +		u32 buf;
      +		ioread32_rep(priv->regs_base + NPS_ENET_REG_RX_BUF, &buf, 1);
      
      CHECK: Blank lines aren't necessary before a close brace '}'
      +
      +	}
      
      total: 1 errors, 2 warnings, 1 checks, 683 lines checked
      Signed-off-by: NElad Kanfi <eladkan@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ddbff3e8
    • D
      Merge branch 'sctp-gso-frags-from-chunk' · 398aae25
      David S. Miller 提交于
      Marcelo Ricardo Leitner says:
      
      ====================
      sctp: allow GSO frags to access the chunk too
      
      Patchset is named after the most important fix in it. First two patches
      are preparing the grounds for the 3rd patch.
      
      After the 3rd, they are not strictly logically related to the patchset,
      but I kept them together as they depend on each other.
      
      More details on patch changelogs.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      398aae25
    • M
      sctp: only check for ECN if peer is using it · 2d47fd12
      Marcelo Ricardo Leitner 提交于
      Currently only read-only checks are performed up to the point on where
      we check if peer is ECN capable, checks which we can avoid otherwise.
      The flag ecn_ce_done is only used to perform this check once per
      incoming packet, and nothing more.
      
      Thus this patch moves the peer check up.
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d47fd12
    • M
      sctp: do not clear chunk->ecn_ce_done flag · d9cef425
      Marcelo Ricardo Leitner 提交于
      We should not clear that flag when switching to a new skb from a GSO skb
      because it would cause ECN processing to happen multiple times per GSO
      skb, which is not wanted. Instead, let it be processed once per chunk.
      That is, in other words, once per IP header available.
      
      Fixes: 90017acc ("sctp: Add GSO support")
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d9cef425
    • M
      sctp: avoid identifying address family many times for a chunk · e7487c86
      Marcelo Ricardo Leitner 提交于
      Identifying address family operations during rx path is not something
      expensive but it's ugly to the eye to have it done multiple times,
      specially when we already validated it during initial rx processing.
      
      This patch takes advantage of the now shared sctp_input_cb and make the
      pointer to the operations readily available.
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e7487c86
    • M
      sctp: allow GSO frags to access the chunk too · 1f45f78f
      Marcelo Ricardo Leitner 提交于
      SCTP will try to access original IP headers on sctp_recvmsg in order to
      copy the addresses used. There are also other places that do similar access
      to IP or even SCTP headers. But after 90017acc ("sctp: Add GSO
      support") they aren't always there because they are only present in the
      header skb.
      
      SCTP handles the queueing of incoming data by cloning the incoming skb
      and limiting to only the relevant payload. This clone has its cb updated
      to something different and it's then queued on socket rx queue. Thus we
      need to fix this in two moments.
      
      For rx path, not related to socket queue yet, this patch uses a
      partially copied sctp_input_cb to such GSO frags. This restores the
      ability to access the headers for this part of the code.
      
      Regarding the socket rx queue, it removes iif member from sctp_event and
      also add a chunk pointer on it.
      
      With these changes we're always able to reach the headers again.
      
      The biggest change here is that now the sctp_chunk struct and the
      original skb are only freed after the application consumed the buffer.
      Note however that the original payload was already like this due to the
      skb cloning.
      
      For iif, SCTP's IPv4 code doesn't use it, so no change is necessary.
      IPv6 now can fetch it directly from original's IPv6 CB as the original
      skb is still accessible.
      
      In the future we probably can simplify sctp_v*_skb_iif() stuff, as
      sctp_v4_skb_iif() was called but it's return value not used, and now
      it's not even called, but such cleanup is out of scope for this change.
      
      Fixes: 90017acc ("sctp: Add GSO support")
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f45f78f