linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Zhongya Yan <yan2228598786@gmail.com>
Cc: edumazet@google.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kuba@kernel.org, mingo@redhat.com,
	davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org,
	hengqi.chen@gmail.com, yhs@fb.com, brendan.d.gregg@gmail.com,
	2228598786@qq.com
Subject: Re: [PATCH] net: tcp_drop adds `reason` and SNMP parameters for tracing v4
Date: Tue, 7 Sep 2021 11:12:01 -0400	[thread overview]
Message-ID: <20210907111201.783d5ea2@gandalf.local.home> (raw)
In-Reply-To: <20210904064044.125549-1-yan2228598786@gmail.com>

On Fri,  3 Sep 2021 23:40:44 -0700
Zhongya Yan <yan2228598786@gmail.com> wrote:

> @@ -4708,7 +4710,7 @@ static void tcp_ofo_queue(struct sock *sk)
>  		rb_erase(&skb->rbnode, &tp->out_of_order_queue);
>  
>  		if (unlikely(!after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt))) {
> -			tcp_drop(sk, skb);
> +			tcp_drop(sk, skb, LINUX_MIB_TCPOFOQUEUE, "Tcp queue error");
>  			continue;
>  		}
>  
> @@ -4764,7 +4766,7 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
>  	if (unlikely(tcp_try_rmem_schedule(sk, skb, skb->truesize))) {
>  		NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPOFODROP);
>  		sk->sk_data_ready(sk);
> -		tcp_drop(sk, skb);
> +		tcp_drop(sk, skb, LINUX_MIB_TCPOFODROP, "Tcp rmem failed");
>  		return;
>  	}
>  
> @@ -4827,7 +4829,7 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
>  				/* All the bits are present. Drop. */
>  				NET_INC_STATS(sock_net(sk),
>  					      LINUX_MIB_TCPOFOMERGE);
> -				tcp_drop(sk, skb);
> +				tcp_drop(sk, skb, LINUX_MIB_TCPOFOMERGE, "Tcp bits are present");

Just curious. Is "Tcp" the normal way to write "TCP" in the kernel? I see
it in snmp_seq_show_tcp_udp() in net/ipv4/proc.c, but no where else
(besides doing CamelCase words). Should these be written using "TCP"
instead of "Tcp". It just looks awkward to me.

But hey, I'm not one of the networking folks, so what do I know?

-- Steve

  parent reply	other threads:[~2021-09-07 15:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-04  6:40 [PATCH] net: tcp_drop adds `reason` and SNMP parameters for tracing v4 Zhongya Yan
2021-09-04 19:04 ` Cong Wang
     [not found]   ` <CALcyL7h=vS_Nmg4GfRe-SD9ZSZopCM5p6U1mojn1gncw1Nds6g@mail.gmail.com>
2021-09-20 16:58     ` Cong Wang
2021-09-07 15:12 ` Steven Rostedt [this message]
2021-09-07 15:24   ` Eric Dumazet
2021-09-11 10:50 Zhongya Yan

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=20210907111201.783d5ea2@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=2228598786@qq.com \
    --cc=brendan.d.gregg@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=hengqi.chen@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=yan2228598786@gmail.com \
    --cc=yhs@fb.com \
    --cc=yoshfuji@linux-ipv6.org \
    /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;
as well as URLs for NNTP newsgroup(s).