[PATCH net 2/2] virtio-net: fix total qstat values

2025-05-06 Thread Jakub Kicinski
NIPA tests report that the interface statistics reported via qstat are lower than those reported via ip link. Looks like this is because some tests flip the queue count up and down, and we end up with some of the traffic accounted on disabled queues. Add up counters from disabled queues. Fixes: d

[PATCH net 1/2] net: export a helper for adding up queue stats

2025-05-06 Thread Jakub Kicinski
Older drivers and drivers with lower queue counts often have a static array of queues, rather than allocating structs for each queue on demand. Add a helper for adding up qstats from a queue range. Expectation is that driver will pass a queue range [netdev->real_num_*x_queues, MAX). It was tempting

[PATCH net 0/2] virtio-net: fix total qstat values

2025-05-06 Thread Jakub Kicinski
Another small fix discovered after we enabled virtio multi-queue in netdev CI. The queue stat test fails: # Exception| Exception: Qstats are lower, fetched later not ok 3 stats.pkt_byte_sum The queue stats from disabled queues are supposed to be reported in the "base" stats. Jakub Kicinski (