]> www.infradead.org Git - users/dwmw2/linux.git/commit
sfc: implement basic per-queue stats
authorEdward Cree <ecree.xilinx@gmail.com>
Mon, 30 Sep 2024 13:52:40 +0000 (14:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 6 Oct 2024 15:02:23 +0000 (16:02 +0100)
commit873e85795026e1c57dd6db24148fc5b85cc2ccee
tree47efafe978880f3ac77f6f1b1501669a9ee8a742
parent65131ea8d3f9a6033753d853ab497b61a2fd6090
sfc: implement basic per-queue stats

Just RX and TX packet counts and TX bytes for now.  We do not
 have per-queue RX byte counts, which causes us to fail
 stats.pkt_byte_sum selftest with "Drivers should always report
 basic keys" error.
Per-queue counts are since the last time the queue was inited
 (typically by efx_start_datapath(), on ifup or reconfiguration);
 device-wide total (efx_get_base_stats()) is since driver probe.
 This is not the same lifetime as rtnl_link_stats64, which uses
 firmware stats which count since FW (re)booted; this can cause a
 "Qstats are lower" or "RTNL stats are lower" failure in
 stats.pkt_byte_sum selftest.
Move the increment of rx_queue->rx_packets to match the semantics
 specified for netdev per-queue stats, i.e. just before handing
 the packet to XDP (if present) or the netstack (through GRO).
 This will affect the existing ethtool -S output which also
 reports these counters.
XDP TX packets are not yet counted into base_stats.

Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ef100_rx.c
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/sfc/efx_channels.c
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/rx.c
drivers/net/ethernet/sfc/rx_common.c
drivers/net/ethernet/sfc/tx_common.c