diff options
| author | Debarghya Kundu <debarghyak@google.com> | 2026-11-09 18:20:34 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-11-11 14:52:46 -0800 |
| commit | 6752dfc316b94ce02998a79509df62a3aba51d1c (patch) | |
| tree | 3a76092ad968aacade40e8dacc18156a206b41fa /tools/perf/scripts/python | |
| parent | 7de69da15088ac2add08eb2b5f5c0a79fd461c1e (diff) | |
gve: Fix backward stats when interface goes down or configuration is adjusted
gve_get_base_stats() sets all the stats to 0, so the stats go backwards
when interface goes down or configuration is adjusted.
ndo_get_stats64 has the same problem, since gve_get_stats() only sums
the live rings, which are freed when the interface goes down.
This issue was discovered and actually triggered by the
drivers/net/stats.py selftest (check_down test case). Bringing down the
interface caused statistics counters to reset to 0, triggering selftest
assertion failures because netdevice stats must not go backwards.
Fix this by persisting baseline stats across queue teardown in
gve_queues_mem_remove() and single-queue stop in gve_rx_queue_stop().
The baseline is reported by both ndo_get_stats64 and
gve_get_base_stats().
Also report the live XDP TX ring counters in gve_get_base_stats(), as
those rings are not exposed as netdev queues.
This change was tested using the DQO RDA queue format.
Cc: stable@vger.kernel.org
Fixes: f5cedc84a30d ("gve: Add transmit and receive support")
Fixes: 2e5e0932dff5 ("gve: add support for basic queue stats")
Signed-off-by: Debarghya Kundu <debarghyak@google.com>
Co-developed-by: Pin-yen Lin <treapking@google.com>
Signed-off-by: Pin-yen Lin <treapking@google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
Link: https://patch.msgid.link/20261109182036.2910559-3-hramamurthy@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
