Commit 5678f0a
Mamatha Inamdar
ibmvnic: Use ndo_get_stats64 to fix inaccurate SAR reporting
JIRA: https://issues.redhat.com/browse/RHEL-104119
commit efe2803
Author: Mingming Cao <mmc@linux.ibm.com>
Date: Wed Jul 16 11:21:15 2025 -0400
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: Mingming Cao <mmc@linux.ibm.com>
Reviewed-by: Brian King <bjking1@linux.ibm.com>
Reviewed-by: Dave Marquardt <davemarq@linux.ibm.com>
Reviewed-by: Simon 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: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Mamatha Inamdar <minamdar@redhat.com>1 parent 2ab276a commit 5678f0a
1 file changed
+20
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2103 | 2103 | | |
2104 | 2104 | | |
2105 | 2105 | | |
2106 | | - | |
2107 | | - | |
2108 | 2106 | | |
2109 | 2107 | | |
2110 | 2108 | | |
| |||
2435 | 2433 | | |
2436 | 2434 | | |
2437 | 2435 | | |
2438 | | - | |
2439 | | - | |
2440 | | - | |
2441 | 2436 | | |
2442 | 2437 | | |
2443 | 2438 | | |
| |||
3240 | 3235 | | |
3241 | 3236 | | |
3242 | 3237 | | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
3243 | 3257 | | |
3244 | 3258 | | |
3245 | 3259 | | |
| |||
3355 | 3369 | | |
3356 | 3370 | | |
3357 | 3371 | | |
3358 | | - | |
3359 | | - | |
3360 | 3372 | | |
3361 | 3373 | | |
3362 | 3374 | | |
| |||
3466 | 3478 | | |
3467 | 3479 | | |
3468 | 3480 | | |
| 3481 | + | |
3469 | 3482 | | |
3470 | 3483 | | |
3471 | 3484 | | |
| |||
0 commit comments