netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* __dev_kfree_skb_any() and use of dev_kfree_skb()
@ 2018-10-02 20:07 Florian Fainelli
  2018-10-02 21:17 ` Eric Dumazet
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2018-10-02 20:07 UTC (permalink / raw)
  To: netdev, edumazet, nhorman; +Cc: davem

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-03 18:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-02 20:07 __dev_kfree_skb_any() and use of dev_kfree_skb() Florian Fainelli
2018-10-02 21:17 ` 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

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).