All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "Yeounsu Moon" <yyyynoom@gmail.com>
Cc: "Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: dlink: count dropped packets on skb allocation failure
Date: Fri, 12 Sep 2025 07:35:22 -0700	[thread overview]
Message-ID: <20250912073522.26c1b04a@kernel.org> (raw)
In-Reply-To: <DCQQIQ5STYSJ.1X531TK8K9OTS@gmail.com>

On Fri, 12 Sep 2025 19:03:46 +0900 Yeounsu Moon wrote:
> > I'm not sure that failing to allocate a buffer results in dropping
> > one packet in this driver. The statistics have specific meaning, if
> > you're just trying to use dropped to mean "buffer allocation failures"
> > that's not allowed. If I'm misreading the code please explain in more
> > detail in the commit message and repost.
> 
> I think you understand the code better than I do.
> Your insights are always surprising to me.
> 
> I believed that when `netdev_alloc_skb()` fails, it leads to dropping packets.
> I also found many cases where `rx_dropped` was incremented when
> `netdev_alloc_skb()` failed.
> 
> However, I'm not entirely sure whether such a failure actually results
> in a misisng packet. I'll resend the patch after verifying whether the packet
> is really dropped.

There's a ring of outstanding Rx buffers. If the ring becomes
completely empty we'll start dropping. But that's not the same
as one allocation failure == one packet drop.

      reply	other threads:[~2025-09-12 14:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-10  5:48 [PATCH net-next] net: dlink: count dropped packets on skb allocation failure Yeounsu Moon
2025-09-11 17:02 ` Simon Horman
2025-09-12  9:27   ` Yeounsu Moon
2025-09-12  0:08 ` Jakub Kicinski
2025-09-12 10:03   ` Yeounsu Moon
2025-09-12 14:35     ` Jakub Kicinski [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=20250912073522.26c1b04a@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yyyynoom@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.