Skip to content

eth: bnxt: maintain basic pkt/byte counters in SW

Jakub Kicinski netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 7 repliesIn review
  2. v29 patches 9 repliesSuperseded
  3. v19 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- try to include vlan tag and padding length in the stats
v2: https://lore.kernel.org/[email protected]
- 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/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10eth: bnxt: use napi_consume_skb()drivers/net/ethernet/broadcom/bnxt/bnxt.c+1 -10 replies
2/10eth: bnxt: don't run xdp programs on fallback trafficdrivers/net/ethernet/broadcom/bnxt/bnxt.c drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h+15 -70 replies
3/10eth: bnxt: rename ring_err_stats -> ring_drv_statsdrivers/net/ethernet/broadcom/bnxt/bnxt.c drivers/net/ethernet/broadcom/bnxt/bnxt.h drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c+21 -210 replies
4/10eth: bnxt: snapshot driver statsdrivers/net/ethernet/broadcom/bnxt/bnxt.c+21 -100 replies
5/10eth: bnxt: don't use ifdef to check for CONFIG_INET in GROdrivers/net/ethernet/broadcom/bnxt/bnxt.c+1 -30 replies
6/10eth: bnxt: consolidate the GRO-but-not-really paths in bnxt_gro_skb()drivers/net/ethernet/broadcom/bnxt/bnxt.c+10 -80 replies
7/10eth: bnxt: extract VLAN info early ondrivers/net/ethernet/broadcom/bnxt/bnxt.c+18 -240 replies
8/10eth: bnxt: maintain rx pkt/byte stats in SWdrivers/net/ethernet/broadcom/bnxt/bnxt.c drivers/net/ethernet/broadcom/bnxt/bnxt.h drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c +1 more+82 -310 replies
9/10eth: bnxt: maintain tx pkt/byte stats in SWdrivers/net/ethernet/broadcom/bnxt/bnxt.c drivers/net/ethernet/broadcom/bnxt/bnxt.h+64 -271 reply
10/10eth: bnxt: count xdp xmit packetsdrivers/net/ethernet/broadcom/bnxt/bnxt.c drivers/net/ethernet/broadcom/bnxt/bnxt.h drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c+42 -80 replies

Reviews trailers per patch

1 of 10 patches has a Reviewed-by or Acked-by.

PatchMichael Chan
1/10
2/10
3/10
4/10
5/10R-b
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net-next v3 00/10] eth: bnxt: maintain basic pkt/byte counters in SW

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/[email protected]
- 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/[email protected]

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(-)
Signature · 1 line
2.48.1