1. 30 Sep, 2015 37 commits
  2. 29 Sep, 2015 3 commits
    • David S. Miller's avatar
      Merge branch 'listener-refactoring-preparations' · e6934f3e
      David S. Miller authored
      Eric Dumazet says:
      
      ====================
      tcp: listener refactoring preparations
      
      This patch series makes changes to TCP/DCCP stacks so that
      we can switch listener code to lockless mode.
      
      This is done by marking const the listener socket in all
      appropriate paths.
      
      FastOpen code had to be changed to not dynamically allocate
      a very small structure to make code simpler for following changes.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6934f3e
    • Eric Dumazet's avatar
      tcp: prepare fastopen code for upcoming listener changes · 0536fcc0
      Eric Dumazet authored
      While auditing TCP stack for upcoming 'lockless' listener changes,
      I found I had to change fastopen_init_queue() to properly init the object
      before publishing it.
      
      Otherwise an other cpu could try to lock the spinlock before it gets
      properly initialized.
      
      Instead of adding appropriate barriers, just remove dynamic memory
      allocations :
      - Structure is 28 bytes on 64bit arches. Using additional 8 bytes
        for holding a pointer seems overkill.
      - Two listeners can share same cache line and performance would suffer.
      
      If we really want to save few bytes, we would instead dynamically allocate
      whole struct request_sock_queue in the future.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0536fcc0
    • Eric Dumazet's avatar
      tcp: constify tcp_syn_flood_action() socket argument · 2985aaac
      Eric Dumazet authored
      tcp_syn_flood_action() will soon be called with unlocked socket.
      In order to avoid SYN flood warning being emitted multiple times,
      use xchg().
      Extend max_qlen_log and synflood_warned fields in struct listen_sock
      to u32
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2985aaac