1. 06 Dec, 2011 15 commits
  2. 05 Dec, 2011 23 commits
  3. 04 Dec, 2011 2 commits
    • Eric Dumazet's avatar
      tcp: tcp_sendmsg() page recycling · 761965ea
      Eric Dumazet authored
      If our TCP_PAGE(sk) is not shared (page_count() == 1), we can set page
      offset to 0.
      
      This permits better filling of the pages on small to medium tcp writes.
      
      "tbench 16" results on my dev server (2x4x2 machine) :
      
      Before : 3072 MB/s
      After  : 3146 MB/s  (2.4 % gain)
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      761965ea
    • Eric Dumazet's avatar
      tcp: take care of misalignments · 117632e6
      Eric Dumazet authored
      We discovered that TCP stack could retransmit misaligned skbs if a
      malicious peer acknowledged sub MSS frame. This currently can happen
      only if output interface is non SG enabled : If SG is enabled, tcp
      builds headless skbs (all payload is included in fragments), so the tcp
      trimming process only removes parts of skb fragments, header stay
      aligned.
      
      Some arches cant handle misalignments, so force a head reallocation and
      shrink headroom to MAX_TCP_HEADER.
      
      Dont care about misaligments on x86 and PPC (or other arches setting
      NET_IP_ALIGN to 0)
      
      This patch introduces __pskb_copy() which can specify the headroom of
      new head, and pskb_copy() becomes a wrapper on top of __pskb_copy()
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      117632e6