]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
eth: fbnic: fix saving stats from XDP_TX rings on close
authorJakub Kicinski <kuba@kernel.org>
Tue, 7 Oct 2025 23:26:47 +0000 (16:26 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 9 Oct 2025 09:10:02 +0000 (11:10 +0200)
commit858b78b24af288bd1143f73aed4e29803ebe8d15
tree07866b401c5f12025a38dfd0411a7e177501a594
parent613e9e8dcb7e2523943d3cf965f3183c54b32adb
eth: fbnic: fix saving stats from XDP_TX rings on close

When rings are freed - stats get added to the device level stat
structs. Save the stats from the XDP_TX ring just as Tx stats.
Previously they would be saved to Rx and Tx stats. So we'd not
see XDP_TX packets as Rx during runtime but after an down/up cycle
the packets would appear in stats.

Correct the helper used by ethtool code which does a runtime
config switch.

Reviewed-by: Simon Horman <horms@kernel.org>
Fixes: 5213ff086344 ("eth: fbnic: Collect packet statistics for XDP")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20251007232653.2099376-4-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
drivers/net/ethernet/meta/fbnic/fbnic_txrx.h