Thread (3 messages) flat view 3 messages, 2 authors, 8d ago

Re: [PATCH v2] virtio_net: add rx-alloc-fail counter

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-08-24 18:20:51
Also in: virtualization

On Thu, 20 Aug 2026 14:09:29 +0800 Longjun Tang wrote:
Count the cases where the driver fails to allocate a buffer or an skb,
such as when try_fill_recv() fails with ENOMEM, and report them via the
rx-alloc-fail qstat.

Plumb alloc-fail into virtnet_get_base_stats() to keep this new stat
reported consistently at both queue and device scope, matching how
packets, bytes, stop and wake are handled.
The stats handling in virtio_net is super convoluted but AFAICT
your patch is good. Unfortunately, net-next is closed right now
(merge window) to you will have to repost next week.

Maybe you can try to cover more allocation failures per:
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260820060929.69576-1-lange_tang@163.com
Or add a sentence or two to the commit message that we do not intend
to cover 100% of cases where packet is dropped.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help