[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250912073522.26c1b04a@kernel.org>
Date: Fri, 12 Sep 2025 07:35:22 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: "Yeounsu Moon" <yyyynoom@...il.com>
Cc: "Andrew Lunn" <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, "Eric Dumazet" <edumazet@...gle.com>, "Paolo Abeni"
<pabeni@...hat.com>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] net: dlink: count dropped packets on skb
allocation failure
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.
Powered by blists - more mailing lists