aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-03-19 22:04:21 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-20 12:40:25 -0400
commitbecb74f0acca19b5abfcb24dc602530f3deea66a (patch)
tree1c688749f3b5570f62245a7bb317c94f4af43a80 /include/net/sock.h
parentfa76ce7328b289b6edd476e24eb52fd634261720 (diff)
net: increase sk_[max_]ack_backlog
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: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index e0360f5a53e9..3f9b8ce56948 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -405,8 +405,8 @@ struct sock {
405 rwlock_t sk_callback_lock; 405 rwlock_t sk_callback_lock;
406 int sk_err, 406 int sk_err,
407 sk_err_soft; 407 sk_err_soft;
408 unsigned short sk_ack_backlog; 408 u32 sk_ack_backlog;
409 unsigned short sk_max_ack_backlog; 409 u32 sk_max_ack_backlog;
410 __u32 sk_priority; 410 __u32 sk_priority;
411#if IS_ENABLED(CONFIG_CGROUP_NET_PRIO) 411#if IS_ENABLED(CONFIG_CGROUP_NET_PRIO)
412 __u32 sk_cgrp_prioidx; 412 __u32 sk_cgrp_prioidx;