> __virtnet_get_hw_stats() returns 0 when the VIRTIO_NET_CTRL_STATS_GET
> command fails, so ethtool -S reports every hardware counter as 0
> without the "Failed to get hw stats." warning.
> 
> Return -EINVAL instead, as virtnet_probe() does for
> VIRTIO_NET_CTRL_STATS_QUERY.
> 
> Claude Opus 5.5 was used to draft this patch. To test, the virtio-net
> device in QEMU was modified to offer device statistics and to fail the
> command. With this patch, ethtool -S triggers the warning.
> 
> Reported-by: Jakub Kicinski <[email protected]>
> Link: https://lore.kernel.org/all/[email protected]/
> Fixes: 941168f8b40e ("virtio_net: support device stats")
> Signed-off-by: Lianjie Wang <[email protected]>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=4


Reply via email to