netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tcp: Increment of LINUX_MIB_LISTENOVERFLOWS in tcp_v4_conn_request()
@ 2013-01-25  7:03 Nivedita Singhvi
  2013-01-25  7:29 ` Vijay Subramanian
  2013-01-27  6:41 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Nivedita Singhvi @ 2013-01-25  7:03 UTC (permalink / raw)
  To: netdev, David Miller; +Cc: Leandro Lucarella, Nivedita Singhvi

We drop a connection request if the accept backlog, syn queue are full when processing reaches tcp_v4_conn_request(). Increment the appropriate counter so this isn't silent, for accurate stats and help in debugging.

Signed-off-by: Nivedita Singhvi <niv@us.ibm.com>
---
 net/ipv4/tcp_ipv4.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index bbbdcc5..49b4f50 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1502,8 +1502,10 @@ 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);
 		goto drop;
+	}
 
 	req = inet_reqsk_alloc(&tcp_request_sock_ops);
 	if (!req)
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tcp: Increment of LINUX_MIB_LISTENOVERFLOWS in tcp_v4_conn_request()
  2013-01-25  7:03 [PATCH] tcp: Increment of LINUX_MIB_LISTENOVERFLOWS in tcp_v4_conn_request() Nivedita Singhvi
@ 2013-01-25  7:29 ` Vijay Subramanian
  2013-01-25  7:41   ` Nivedita Singhvi
  2013-01-27  6:41 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Vijay Subramanian @ 2013-01-25  7:29 UTC (permalink / raw)
  To: Nivedita Singhvi
  Cc: netdev, David Miller, Leandro Lucarella, Nivedita Singhvi

On 24 January 2013 23:03, Nivedita Singhvi <niveditasinghvi@gmail.com> wrote:
> We drop a connection request if the accept backlog, syn queue are full when processing reaches tcp_v4_conn_request(). Increment the appropriate counter so this isn't silent, for accurate stats and help in debugging.
>

Commit message seems misleading. syn queue is not really full at this
point. It just has more than enough entries.

Thanks,
Vijay

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tcp: Increment of LINUX_MIB_LISTENOVERFLOWS in tcp_v4_conn_request()
  2013-01-25  7:29 ` Vijay Subramanian
@ 2013-01-25  7:41   ` Nivedita Singhvi
  0 siblings, 0 replies; 4+ messages in thread
From: Nivedita Singhvi @ 2013-01-25  7:41 UTC (permalink / raw)
  To: Vijay Subramanian
  Cc: netdev, David Miller, Leandro Lucarella, Nivedita Singhvi

On 01/24/2013 11:29 PM, Vijay Subramanian wrote:
> On 24 January 2013 23:03, Nivedita Singhvi <niveditasinghvi@gmail.com> wrote:
>> We drop a connection request if the accept backlog, syn queue are full when processing reaches tcp_v4_conn_request(). Increment the appropriate counter so this isn't silent, for accurate stats and help in debugging.
>>
> 
> Commit message seems misleading. syn queue is not really full at this
> point. It just has more than enough entries.

Er, good point. I should have said "sufficiently full" or "warm 
enough to warrant starting drops" - hope I'm not confusing 
things further, am I? DaveM, would you like me to resend, if you're 
picking this up? 


thanks,
Nivedita

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tcp: Increment of LINUX_MIB_LISTENOVERFLOWS in tcp_v4_conn_request()
  2013-01-25  7:03 [PATCH] tcp: Increment of LINUX_MIB_LISTENOVERFLOWS in tcp_v4_conn_request() Nivedita Singhvi
  2013-01-25  7:29 ` Vijay Subramanian
@ 2013-01-27  6:41 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2013-01-27  6:41 UTC (permalink / raw)
  To: niveditasinghvi; +Cc: netdev, leandro.lucarella, niv

From: Nivedita Singhvi <niveditasinghvi@gmail.com>
Date: Thu, 24 Jan 2013 23:03:28 -0800

> We drop a connection request if the accept backlog, syn queue are full when processing reaches tcp_v4_conn_request(). Increment the appropriate counter so this isn't silent, for accurate stats and help in debugging.
> 
> Signed-off-by: Nivedita Singhvi <niv@us.ibm.com>

Please resend with the commit message changes suggested to you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-27  6:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25  7:03 [PATCH] tcp: Increment of LINUX_MIB_LISTENOVERFLOWS in tcp_v4_conn_request() Nivedita Singhvi
2013-01-25  7:29 ` Vijay Subramanian
2013-01-25  7:41   ` Nivedita Singhvi
2013-01-27  6:41 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).