public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Vijay Subramanian <subramanian.vijay@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, niveditasinghvi@gmail.com
Subject: Re: [PATCH net] tcp: Update MIB counters for drops
Date: Wed, 30 Jan 2013 15:31:15 -0800	[thread overview]
Message-ID: <1359588675.30177.15.camel@edumazet-glaptop> (raw)
In-Reply-To: <1359586670-16072-1-git-send-email-subramanian.vijay@gmail.com>

On Wed, 2013-01-30 at 14:57 -0800, Vijay Subramanian wrote:
> This patch updates LINUX_MIB_LISTENDROPS and LINUX_MIB_LISTENOVERFLOWS in
> tcp_v4_conn_request() and tcp_v4_err(). tcp_v4_conn_request() in particular can
> drop SYNs for various reasons which are not currently tracked.
> 
> Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
> ---
> Ignored "line over 80 chars" warning for readability.
> 
>  net/ipv4/tcp_ipv4.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)


>  	case TCP_SYN_SENT:
> @@ -1491,8 +1492,10 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
>  	 */
>  	if (inet_csk_reqsk_queue_is_full(sk) && !isn) {
>  		want_cookie = tcp_syn_flood_action(sk, skb, "TCP");
> -		if (!want_cookie)
> +		if (!want_cookie) {
> +			NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENOVERFLOWS);
>  			goto drop;
> +		}

This should be done in tcp_syn_flood_action() for IPv4/IPv6
factorization.

  reply	other threads:[~2013-01-30 23:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30 22:57 [PATCH net] tcp: Update MIB counters for drops Vijay Subramanian
2013-01-30 23:31 ` Eric Dumazet [this message]
2013-01-31  2:16   ` Vijay Subramanian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359588675.30177.15.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=niveditasinghvi@gmail.com \
    --cc=subramanian.vijay@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox