From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Davide Caratti <dcaratti@redhat.com>
Cc: netdev@vger.kernel.org, Xin Long <lucien.xin@gmail.com>,
linux-sctp@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: Re: [RFC PATCH net-next] net: use a dedicated tracepoint for kfree_skb_list()
Date: Tue, 27 Oct 2020 19:35:18 -0300 [thread overview]
Message-ID: <20201027223518.GA11029@localhost.localdomain> (raw)
In-Reply-To: <d4c179f46d00016ec418f6bf58ed01afedacd123.1603486318.git.dcaratti@redhat.com>
On Fri, Oct 23, 2020 at 10:52:14PM +0200, Davide Caratti wrote:
> kfree_skb_list() calls kfree_skb(), thus triggering as many dropwatch
> events as the number of skbs in the list. This can disturb the analysis
> of packet drops, e.g. with fragmented echo requests generated by ICMP
> sockets, or with regular SCTP packets: when consume_skb() frees them,
> the kernel's drop monitor may wrongly account for several packet drops:
>
> consume skb()
> skb_release_data()
> kfree_skb_list()
> kfree_skb() <-- false dropwatch event
Seems the problem lies with skb_release_data() calling
kfree_skb_list() while it should have been a, say, consume_skb_list(),
and not generate further kfree_skb calls.
Maybe a bool parameter on skb_release_data to signal that it should
call consume_skb_list (which doesn't exist) instead?
>
> don't call kfree_skb() when freeing a skb list, use a dedicated
> tracepoint instead. By printing "cur" and "next", it also becomes
> possible to reconstruct the skb list from its members.
I like the new probe alone. It helps to have more visibility on drops
such as those from __dev_xmit_skb() and how they happen.
But as a solution to the problem stated, seems it can be confusing.
Say one is debugging a tx drop issue. AFAICT one would have to watch
both probe points anyway, as the drop could be on a layer below than
SCTP. So I'm not seeing how it helps much, other than possibly causing
drop_watch to miss drops (by not listening to the new trace point).
Marcelo
prev parent reply other threads:[~2020-10-27 22:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-23 20:52 [RFC PATCH net-next] net: use a dedicated tracepoint for kfree_skb_list() Davide Caratti
2020-10-27 22:35 ` Marcelo Ricardo Leitner [this message]
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=20201027223518.GA11029@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=dcaratti@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.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).