Commit efe28034 authored by Mingming Cao's avatar Mingming Cao Committed by Jakub Kicinski
Browse files

ibmvnic: Use ndo_get_stats64 to fix inaccurate SAR reporting



VNIC testing on multi-core Power systems showed SAR stats drift
and packet rate inconsistencies under load.

Implements ndo_get_stats64 to provide safe aggregation of queue-level
atomic64 counters into rtnl_link_stats64 for use by tools like 'ip -s',
'ifconfig', and 'sar'. Switch to ndo_get_stats64 to align SAR reporting
with the standard kernel interface for retrieving netdev stats.

This removes redundant per-adapter stat updates, reduces overhead,
eliminates cacheline bouncing from hot path updates, and improves
the accuracy of reported packet rates.

Signed-off-by: default avatarMingming Cao <mmc@linux.ibm.com>
Reviewed-by: default avatarBrian King <bjking1@linux.ibm.com>
Reviewed-by: default avatarDave Marquardt <davemarq@linux.ibm.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>

----
Changes since v3:
link to v3: https://www.spinics.net/lists/netdev/msg1107999.html
-- keep per queue counters as u64 (this patch) and drop off patch 1 in v3

Link: https://patch.msgid.link/20250716152115.61143-1-mmc@linux.ibm.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0dce6847
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment