• Eric Dumazet's avatar
    ipv4/tcp: do not use per netns ctl sockets · 37ba017d
    Eric Dumazet authored
    TCP ipv4 uses per-cpu/per-netns ctl sockets in order to send
    RST and some ACK packets (on behalf of TIMEWAIT sockets).
    
    This adds memory and cpu costs, which do not seem needed.
    Now typical servers have 256 or more cores, this adds considerable
    tax to netns users.
    
    tcp sockets are used from BH context, are not receiving packets,
    and do not store any persistent state but the 'struct net' pointer
    in order to be able to use IPv4 output functions.
    
    Note that I attempted a related change in the past, that had
    to be hot-fixed in commit bdbbb852 ("ipv4: tcp: get rid of ugly unicast_sock")
    
    This patch could very well surface old bugs, on layers not
    taking care of sk->sk_kern_sock properly.
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    37ba017d
ipv4.h 5.61 KB