• Eric Dumazet's avatar
    ipv4: do not use per netns icmp sockets · a15c89c7
    Eric Dumazet authored
    Back in linux-2.6.25 (commit 4a6ad7a1 "[NETNS]: Make icmp_sk per namespace."),
    we added private per-cpu/per-netns ipv4 icmp 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.
    
    icmp sockets are used from BH context, are not receiving packets,
    and do not store any persistent state but the 'struct net' pointer.
    
    icmp_xmit_lock() already makes sure to lock the chosen per-cpu
    socket.
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a15c89c7
icmp.c 36.4 KB