• Eric Dumazet's avatar
    net: increase sk_[max_]ack_backlog · becb74f0
    Eric Dumazet authored
    sk_ack_backlog & sk_max_ack_backlog were 16bit fields, meaning
    listen() backlog was limited to 65535.
    
    It is time to increase the width to allow much bigger backlog,
    if admins change /proc/sys/net/core/somaxconn &
    /proc/sys/net/ipv4/tcp_max_syn_backlog default values.
    
    Tested:
    
    echo 5000000 >/proc/sys/net/core/somaxconn
    echo 5000000 >/proc/sys/net/ipv4/tcp_max_syn_backlog
    
    Ran a SYNFLOOD test against a listener using listen(fd, 5000000)
    
    myhost~# grep request_sock_TCP /proc/slabinfo
    request_sock_TCP  4185642 4411940    304   13    1 : tunables   54   27    8 : slabdata 339380 339380      0
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    becb74f0
sysctl_net_core.c 10.1 KB