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.