tcp: Increment LISTENOVERFLOW and LISTENDROPS in tcp_v4_conn_request()
Subsystems (3)
PATCH 1/1 tcp: Increment LISTENOVERFLOW and LISTENDROPS in tcp_v4_conn_request()
From: Nivedita Singhvi <[email protected]>
We drop a connection request if the accept backlog is full and there are sufficient packets in the syn queue to warrant starting drops. Increment the appropriate counters so this isn't silent, for accurate stats and help in debugging.
This patch assumes LINUX_MIB_LISTENDROPS is a superset of/includes the counter LINUX_MIB_LISTENOVERFLOWS.
--- net/ipv4/tcp_ipv4.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
net/ipv4/tcp_ipv4.c +4 -1
@@ -1502,8 +1502,11 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)* clogging syn queue with openreqs with exponentially increasing * timeout. */ -if (sk_acceptq_is_full (sk) &&inet_csk_reqsk_queue_young (sk) >1 ) +if (sk_acceptq_is_full (sk) &&inet_csk_reqsk_queue_young (sk) >1 ) { +NET_INC_STATS_BH (sock_net (sk),LINUX_MIB_LISTENOVERFLOWS ); +NET_INC_STATS_BH (sock_net (sk),LINUX_MIB_LISTENDROPS ); goto drop; + } req =inet_reqsk_alloc (&tcp_request_sock_ops);if (!req)
Signature · 1 line
1.7.5.4
Quoted 7 lines · Nivedita Singhvi
From: Nivedita Singhvi <[email protected]>
We drop a connection request if the accept backlog is full and there are sufficient packets in the syn queue to warrant starting drops. Increment the appropriate counters so this isn't silent, for accurate stats and help in debugging.
Quoted 5 lines
This patch assumes
LINUX_MIB_LISTENDROPSis a superset of/includes the counterLINUX_MIB_LISTENOVERFLOWS.Signed-off-by Nivedita Singhvi <[email protected]>---
Thanks !
Please do add version number of patch in subject line and changes since last version in future to avoid confusion. Regards,
Vijay
From: Nivedita Singhvi <[email protected]>
Date: Mon, 28 Jan 2013 19:52:37 -0800
Quoted 11 lines
From: Nivedita Singhvi <[email protected]>
We drop a connection request if the accept backlog is full and there are sufficient packets in the syn queue to warrant starting drops. Increment the appropriate counters so this isn't silent, for accurate stats and help in debugging.
This patch assumes
LINUX_MIB_LISTENDROPSis a superset of/includes the counterLINUX_MIB_LISTENOVERFLOWS.Signed-off-by Nivedita Singhvi <[email protected]>
Applied.