From: Eric Dumazet <eric.dumazet@gmail.com>
To: Shawn Bohrer <sbohrer@rgmadvisors.com>
Cc: netdev@vger.kernel.org, sanagi.koki@jp.fujitsu.com, davem@davemloft.net
Subject: Re: [PATCH] net_tx_action: Call trace_consume_skb() instead of trace_kfree_skb()
Date: Wed, 12 Sep 2012 09:33:19 +0200 [thread overview]
Message-ID: <1347435199.13103.690.camel@edumazet-glaptop> (raw)
In-Reply-To: <1347406098-22071-1-git-send-email-sbohrer@rgmadvisors.com>
On Tue, 2012-09-11 at 18:28 -0500, Shawn Bohrer wrote:
> Call trace_consume_skb() instead of trace_kfree_skb() as skbs are
> removed from the completion_queue during transmit. This avoids false
> positives from dropwatch/drop_monitor making them more useful.
>
> Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
> ---
>
> In my case I seem to hit this tracepoint for every packet I transmit so
> these appear to be false positives to me. Perhaps there are cases where
> you could hit this and it is a real packet drop?
>
> net/core/dev.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 8398836..00774ce 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -3015,7 +3015,7 @@ static void net_tx_action(struct softirq_action *h)
> clist = clist->next;
>
> WARN_ON(atomic_read(&skb->users));
> - trace_kfree_skb(skb, net_tx_action);
> + trace_consume_skb(skb);
> __kfree_skb(skb);
> }
> }
> --
> 1.7.7.6
>
>
Problem here is : we dont know if caller of dev_kfree_skb_irq(skb)
wanted to drop or consume skb.
(We dont have a dev_consume_skb_irq(skb) function)
For example, drivers/infiniband/ulp/ipoib/ipoib_main.c function
path_free() does :
while ((skb = __skb_dequeue(&path->queue)))
dev_kfree_skb_irq(skb);
Are these packets dropped or consumed, I dont really know...
Note : NAPI drivers dont use dev_kfree_skb_irq(skb).
What is the NIC driver you are using, I thought it was mellanox (wich is
NAPI) ?
next prev parent reply other threads:[~2012-09-12 7:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 23:28 [PATCH] net_tx_action: Call trace_consume_skb() instead of trace_kfree_skb() Shawn Bohrer
2012-09-12 7:33 ` Eric Dumazet [this message]
2012-09-12 13:20 ` Shawn Bohrer
2012-09-12 13:39 ` Eric Dumazet
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=1347435199.13103.690.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sanagi.koki@jp.fujitsu.com \
--cc=sbohrer@rgmadvisors.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