From: Cong Wang <xiyou.wangcong@gmail.com>
To: Zhongya Yan <yan2228598786@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>,
Steven Rostedt <rostedt@goodmis.org>,
Brendan Gregg <brendan.d.gregg@gmail.com>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Ingo Molnar <mingo@redhat.com>,
David Miller <davem@davemloft.net>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
dsahern@kernel.org, Yonghong Song <yhs@fb.com>,
2228598786@qq.com
Subject: Re: [PATCH] tcp: tcp_drop adds `SNMP` and `reason` parameter for tracing
Date: Mon, 20 Sep 2021 09:54:02 -0700 [thread overview]
Message-ID: <CAM_iQpWLPvSmZD4CTmzSoor04xfdkvZuDhF=_CCaumT7XiaN7g@mail.gmail.com> (raw)
In-Reply-To: <20210914143515.106394-1-yan2228598786@gmail.com>
On Tue, Sep 14, 2021 at 7:38 AM Zhongya Yan <yan2228598786@gmail.com> wrote:
>
> When we wanted to trace the use of the `tcp_drop(struct sock *sk, struct sk_buff *skb)` function, we didn't know why `tcp` was deleting `skb'. To solve this problem, I updated the function `tcp_drop(struct sock *sk, struct sk_buff *skb, int field, const char *reason)`.
> This way you can understand the reason for the deletion based on the prompt message.
> `field`: represents the SNMP-related value
> `reason`: represents the reason why `tcp` deleted the current `skb`, and contains some hints.
> Of course, if you want to know more about the reason for updating the current function, you can check: https://www.brendangregg.com/blog/2018-05-31/linux-tcpdrop.html
I think you fail to explain why only TCP needs it? This should
be useful for all kinds of drops, not just TCP, therefore you should
consider extending net/core/drop_monitor.c instead of just tcp_drop().
Also, kernel does not have to explain it in strings, those SNMP
counters are already available for user-space, so kernel could
just use SNMP enums and let user-space interpret them. In many
cases, you are just adding strings for those SNMP enums.
Thanks.
next prev parent reply other threads:[~2021-09-20 17:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 14:35 [PATCH] tcp: tcp_drop adds `SNMP` and `reason` parameter for tracing Zhongya Yan
2021-09-20 16:54 ` Cong Wang [this message]
2021-09-20 17:15 ` Steven Rostedt
2021-09-20 17:20 ` Cong Wang
2021-09-20 17:24 ` Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2021-09-23 5:31 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='CAM_iQpWLPvSmZD4CTmzSoor04xfdkvZuDhF=_CCaumT7XiaN7g@mail.gmail.com' \
--to=xiyou.wangcong@gmail.com \
--cc=2228598786@qq.com \
--cc=brendan.d.gregg@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.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).