netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 00/10] eth: bnxt: maintain basic pkt/byte counters in SW
@ 2025-03-05 22:52 Jakub Kicinski
  2025-03-05 22:52 ` [PATCH net-next v3 01/10] eth: bnxt: use napi_consume_skb() Jakub Kicinski
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Jakub Kicinski @ 2025-03-05 22:52 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, michael.chan,
	pavan.chebbi, przemyslaw.kitszel, Jakub Kicinski

Some workloads want to be able to track bandwidth utilization on
the scale of 10s of msecs. bnxt uses HW stats and async stats
updates, with update frequency controlled via ethtool -C.
Updating all HW stats more often than 100 msec is both hard for
the device and consumes PCIe bandwidth. Switch to maintaining
basic Rx / Tx packet and byte counters in SW.

Tested with drivers/net/stats.py:
  # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:0 error:0

Manually tested by comparing the ethtool -S stats (which continues
to show HW stats) with qstats, and total interface stats.
With and without HW-GRO, and with XDP on / off.
Stopping and starting the interface also doesn't corrupt the values.

v3:
 - try to include vlan tag and padding length in the stats
v2: https://lore.kernel.org/20250228012534.3460918-1-kuba@kernel.org
 - fix skipping XDP vs the XDP Tx ring handling (Michael)
 - rename the defines as well as the structs (Przemek)
 - fix counding frag'ed packets in XDP Tx
v1: https://lore.kernel.org/20250226211003.2790916-1-kuba@kernel.org

Jakub Kicinski (10):
  eth: bnxt: use napi_consume_skb()
  eth: bnxt: don't run xdp programs on fallback traffic
  eth: bnxt: rename ring_err_stats -> ring_drv_stats
  eth: bnxt: snapshot driver stats
  eth: bnxt: don't use ifdef to check for CONFIG_INET in GRO
  eth: bnxt: consolidate the GRO-but-not-really paths in bnxt_gro_skb()
  eth: bnxt: extract VLAN info early on
  eth: bnxt: maintain rx pkt/byte stats in SW
  eth: bnxt: maintain tx pkt/byte stats in SW
  eth: bnxt: count xdp xmit packets

 drivers/net/ethernet/broadcom/bnxt/bnxt.h     |  49 +++-
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h |   5 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 272 +++++++++++-------
 .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  20 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c |  47 ++-
 5 files changed, 264 insertions(+), 129 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-03-09  8:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-05 22:52 [PATCH net-next v3 00/10] eth: bnxt: maintain basic pkt/byte counters in SW Jakub Kicinski
2025-03-05 22:52 ` [PATCH net-next v3 01/10] eth: bnxt: use napi_consume_skb() Jakub Kicinski
2025-03-05 22:52 ` [PATCH net-next v3 02/10] eth: bnxt: don't run xdp programs on fallback traffic Jakub Kicinski
2025-03-05 22:52 ` [PATCH net-next v3 03/10] eth: bnxt: rename ring_err_stats -> ring_drv_stats Jakub Kicinski
2025-03-05 22:52 ` [PATCH net-next v3 04/10] eth: bnxt: snapshot driver stats Jakub Kicinski
2025-03-05 22:52 ` [PATCH net-next v3 05/10] eth: bnxt: don't use ifdef to check for CONFIG_INET in GRO Jakub Kicinski
2025-03-05 22:52 ` [PATCH net-next v3 06/10] eth: bnxt: consolidate the GRO-but-not-really paths in bnxt_gro_skb() Jakub Kicinski
2025-03-05 22:52 ` [PATCH net-next v3 07/10] eth: bnxt: extract VLAN info early on Jakub Kicinski
2025-03-05 22:52 ` [PATCH net-next v3 08/10] eth: bnxt: maintain rx pkt/byte stats in SW Jakub Kicinski
2025-03-05 22:52 ` [PATCH net-next v3 09/10] eth: bnxt: maintain tx " Jakub Kicinski
2025-03-09  8:25   ` Michael Chan
2025-03-05 22:52 ` [PATCH net-next v3 10/10] eth: bnxt: count xdp xmit packets Jakub Kicinski
2025-03-06 10:54 ` [PATCH net-next v3 00/10] eth: bnxt: maintain basic pkt/byte counters in SW Taehee Yoo
2025-03-06 15:24   ` Jakub Kicinski
2025-03-06 19:25     ` Michael Chan
2025-03-07  5:25       ` Taehee Yoo
2025-03-07  5:30         ` Michael Chan
2025-03-07 16:43           ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).