]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gve: Correct ethtool rx_dropped calculation
authorMax Yuan <maxyuan@google.com>
Mon, 2 Feb 2026 19:39:25 +0000 (19:39 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 4 Feb 2026 03:28:05 +0000 (19:28 -0800)
commitc7db85d579a1dccb624235534508c75fbf2dfe46
tree1941f8afd17e03c01ea82467a654cc80c1f9b7c0
parent7b9ebcce0296e104a0d82a6b09d68564806158ff
gve: Correct ethtool rx_dropped calculation

The gve driver's "rx_dropped" statistic, exposed via `ethtool -S`,
incorrectly includes `rx_buf_alloc_fail` counts. These failures
represent an inability to allocate receive buffers, not true packet
drops where a received packet is discarded. This misrepresentation can
lead to inaccurate diagnostics.

This patch rectifies the ethtool "rx_dropped" calculation. It removes
`rx_buf_alloc_fail` from the total and adds `xdp_tx_errors` and
`xdp_redirect_errors`, which represent legitimate packet drops within
the XDP path.

Cc: stable@vger.kernel.org
Fixes: 433e274b8f7b ("gve: Add stats for gve.")
Signed-off-by: Max Yuan <maxyuan@google.com>
Reviewed-by: Jordan Rhee <jordanrhee@google.com>
Reviewed-by: Joshua Washington <joshwash@google.com>
Reviewed-by: Matt Olson <maolson@google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20260202193925.3106272-3-hramamurthy@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/google/gve/gve_ethtool.c