diff options
author | Edward Cree <ecree.xilinx@gmail.com> | 2024-09-30 16:52:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-10-06 18:02:23 +0300 |
commit | cfa63b9080bce70a40d40ff0a0669cf81a2f66d1 (patch) | |
tree | a095ab7b477d36e31bd25cd1dcb27ab16b3982be /drivers/net/ethernet/sfc/efx.c | |
parent | 5c24de42f1c1d77cf876ae4b1830e1bbf89f456f (diff) | |
download | linux-cfa63b9080bce70a40d40ff0a0669cf81a2f66d1.tar.xz |
sfc: account XDP TXes in netdev base stats
When we handle a TX completion for an XDP packet, it is not counted
in the per-TXQ netdev stats. Record it in new internal counters,
and include those in the device-wide total in efx_get_base_stats().
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.c')
-rw-r--r-- | drivers/net/ethernet/sfc/efx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 21dc4b885542..ea1e0e8ecbdd 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c @@ -690,6 +690,9 @@ static void efx_get_base_stats(struct net_device *net_dev, tx->packets += tx_queue->old_complete_packets; tx->bytes += tx_queue->old_complete_bytes; } + /* Include XDP TX in device-wide stats */ + tx->packets += tx_queue->complete_xdp_packets; + tx->bytes += tx_queue->complete_xdp_bytes; } } } |