netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev <netdev@vger.kernel.org>,
	edumazet@google.com, nhorman@tuxdriver.com
Cc: davem@davemloft.net
Subject: __dev_kfree_skb_any() and use of dev_kfree_skb()
Date: Tue, 2 Oct 2018 13:07:26 -0700	[thread overview]
Message-ID: <32568fab-02d4-0484-3237-5d8dc09e273d@gmail.com> (raw)

Hi Eric, Neil,

Should not __dev_kfree_skb_any() call kfree_skb() instead of
dev_kfree_skb() which is aliased to consumes_skb() and therefore does
not flag the skb with SKB_REASON_DROPPED?

If we take the in_irq() || irqs_disabled() branch, we will be calling
__dev_kfree_skb_irq() which takes care of setting the skb_free_reason
frmo the caller.

Is there an implied semantic with dev_kfree_skb() that it means it was
freed by the network device and therefore this equals to a consumption
(not a drop)? The comment above dev_kfree_skb_any() seems to imply this
should be a context unaware replacement for kfree_skb().

Thanks!
-- 
Florian

             reply	other threads:[~2018-10-03  2:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02 20:07 Florian Fainelli [this message]
2018-10-02 21:17 ` __dev_kfree_skb_any() and use of dev_kfree_skb() Eric Dumazet
2018-10-02 21:54   ` Florian Fainelli
2018-10-02 22:05     ` Eric Dumazet
2018-10-02 22:20       ` Florian Fainelli
2018-10-03 11:26         ` Neil Horman

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=32568fab-02d4-0484-3237-5d8dc09e273d@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).