1. 09 Oct, 2013 6 commits
    • Eric Dumazet's avatar
      ipv6: make lookups simpler and faster · efe4208f
      Eric Dumazet authored
      TCP listener refactoring, part 4 :
      
      To speed up inet lookups, we moved IPv4 addresses from inet to struct
      sock_common
      
      Now is time to do the same for IPv6, because it permits us to have fast
      lookups for all kind of sockets, including upcoming SYN_RECV.
      
      Getting IPv6 addresses in TCP lookups currently requires two extra cache
      lines, plus a dereference (and memory stall).
      
      inet6_sk(sk) does the dereference of inet_sk(__sk)->pinet6
      
      This patch is way bigger than its IPv4 counter part, because for IPv4,
      we could add aliases (inet_daddr, inet_rcv_saddr), while on IPv6,
      it's not doable easily.
      
      inet6_sk(sk)->daddr becomes sk->sk_v6_daddr
      inet6_sk(sk)->rcv_saddr becomes sk->sk_v6_rcv_saddr
      
      And timewait socket also have tw->tw_v6_daddr & tw->tw_v6_rcv_saddr
      at the same offset.
      
      We get rid of INET6_TW_MATCH() as INET6_MATCH() is now the generic
      macro.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      efe4208f
    • Eric Dumazet's avatar
      tcp/dccp: remove twchain · 05dbc7b5
      Eric Dumazet authored
      TCP listener refactoring, part 3 :
      
      Our goal is to hash SYN_RECV sockets into main ehash for fast lookup,
      and parallel SYN processing.
      
      Current inet_ehash_bucket contains two chains, one for ESTABLISH (and
      friend states) sockets, another for TIME_WAIT sockets only.
      
      As the hash table is sized to get at most one socket per bucket, it
      makes little sense to have separate twchain, as it makes the lookup
      slightly more complicated, and doubles hash table memory usage.
      
      If we make sure all socket types have the lookup keys at the same
      offsets, we can use a generic and faster lookup. It turns out TIME_WAIT
      and ESTABLISHED sockets already have common lookup fields for IPv4.
      
      [ INET_TW_MATCH() is no longer needed ]
      
      I'll provide a follow-up to factorize IPv6 lookup as well, to remove
      INET6_TW_MATCH()
      
      This way, SYN_RECV pseudo sockets will be supported the same.
      
      A new sock_gen_put() helper is added, doing either a sock_put() or
      inet_twsk_put() [ and will support SYN_RECV later ].
      
      Note this helper should only be called in real slow path, when rcu
      lookup found a socket that was moved to another identity (freed/reused
      immediately), but could eventually be used in other contexts, like
      sock_edemux()
      
      Before patch :
      
      dmesg | grep "TCP established"
      
      TCP established hash table entries: 524288 (order: 11, 8388608 bytes)
      
      After patch :
      
      TCP established hash table entries: 524288 (order: 10, 4194304 bytes)
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05dbc7b5
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 53af53ae
      David S. Miller authored
      Conflicts:
      	include/linux/netdevice.h
      	net/core/sock.c
      
      Trivial merge issues.
      
      Removal of "extern" for functions declaration in netdevice.h
      at the same time "const" was added to an argument.
      
      Two parallel line additions in net/core/sock.c
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      53af53ae
    • David S. Miller's avatar
      Merge branch 'sfc-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc · 9684d7b0
      David S. Miller authored
      Ben Hutchings says:
      
      ====================
      Some more fixes for EF10 support; hopefully the last lot:
      
      1. Fixes for reading statistics, from Edward Cree and Jon Cooper.
      2. Addition of ethtool statistics for packets dropped by the hardware
      before they were associated with a specific function, from Edward Cree.
      3. Only bind to functions that are in control of their associated port,
      as the driver currently assumes this is the case.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9684d7b0
    • Eric Dumazet's avatar
      pkt_sched: fq: fix non TCP flows pacing · 7eec4174
      Eric Dumazet authored
      Steinar reported FQ pacing was not working for UDP flows.
      
      It looks like the initial sk->sk_pacing_rate value of 0 was
      a wrong choice. We should init it to ~0U (unlimited)
      
      Then, TCA_FQ_FLOW_DEFAULT_RATE should be removed because it makes
      no real sense. The default rate is really unlimited, and we
      need to avoid a zero divide.
      Reported-by: default avatarSteinar H. Gunderson <sesse@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7eec4174
    • David S. Miller's avatar
      Revert "veth: Showing peer of veth type dev in ip link (kernel side)" · b343ca84
      David S. Miller authored
      This reverts commit 612c3373.
      
      As per Stephen Hemminger, the layout of the netlink attribute
      is not implemented correctly so revert this for now.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b343ca84
  2. 08 Oct, 2013 28 commits
  3. 07 Oct, 2013 6 commits