public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/6] net: bcmgenet: add XDP support
@ 2026-03-15 21:49 Nicolai Buchwitz
  2026-03-15 21:49 ` [PATCH net-next v2 1/6] net: bcmgenet: convert RX path to page_pool Nicolai Buchwitz
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Nicolai Buchwitz @ 2026-03-15 21:49 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Doug Berger, Florian Fainelli
  Cc: Broadcom internal kernel review list, Vikas Gupta,
	Bhargava Marreddy, Rajashekar Hudumula, Eric Biggers,
	Heiner Kallweit, Markus Blöchl, Arnd Bergmann, netdev,
	linux-kernel, Nicolai Buchwitz

Add XDP support to the bcmgenet driver, covering XDP_PASS, XDP_DROP,
XDP_TX, XDP_REDIRECT, and ndo_xdp_xmit.

The first patch converts the RX path from the existing kmalloc-based
allocation to page_pool, which is a prerequisite for XDP. The remaining
patches incrementally add XDP functionality and per-action statistics.

Tested on Raspberry Pi CM4 (BCM2711, bcmgenet, 1Gbps link):
- XDP_PASS: 943 Mbit/s TX, 935 Mbit/s RX (no regression vs baseline)
- XDP_PASS latency: 0.164ms avg, 0% packet loss
- XDP_DROP: all inbound traffic blocked as expected
- XDP_TX: TX counter increments (packet reflection working)
- Link flap with XDP attached: no errors
- Program swap under iperf3 load: no errors

Changes since v1:
  - Fixed tx_rings[DESC_INDEX] out-of-bounds access. Expanded array
    to DESC_INDEX+1 and initialized ring 16 with dedicated BDs.
  - Use ring 16 (hardware default descriptor ring) for XDP TX,
    isolating from normal SKB TX queues.
  - Piggyback ring 16 TX completion on RX NAPI poll (INTRL2_1 bit
    collision with RX ring 0).
  - Fixed ring 16 TX reclaim: skip INTRL2_1 clear, skip BQL
    completion, use non-destructive reclaim in RX poll path.
  - Prepend zeroed TSB before XDP TX frame data (TBUF_64B_EN requires
    64-byte struct status_64 prefix on all TX buffers).
  - Tested with upstream XDP selftests (xdp.py): pass_sb, drop_sb,
    tx_sb all passing. The multi-buffer tests (pass_mb, drop_mb,
    tx_mb) fail because bcmgenet does not support jumbo frames /
    MTU changes; I plan to add ndo_change_mtu support in a follow-up
    series.

Nicolai Buchwitz (6):
  net: bcmgenet: convert RX path to page_pool
  net: bcmgenet: register xdp_rxq_info for each RX ring
  net: bcmgenet: add basic XDP support (PASS/DROP)
  net: bcmgenet: add XDP_TX support
  net: bcmgenet: add XDP_REDIRECT and ndo_xdp_xmit support
  net: bcmgenet: add XDP statistics counters

 drivers/net/ethernet/broadcom/Kconfig         |   1 +
 .../net/ethernet/broadcom/genet/bcmgenet.c    | 607 +++++++++++++++---
 .../net/ethernet/broadcom/genet/bcmgenet.h    |  20 +-
 3 files changed, 536 insertions(+), 92 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2026-03-17 19:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-15 21:49 [PATCH net-next v2 0/6] net: bcmgenet: add XDP support Nicolai Buchwitz
2026-03-15 21:49 ` [PATCH net-next v2 1/6] net: bcmgenet: convert RX path to page_pool Nicolai Buchwitz
2026-03-15 21:49 ` [PATCH net-next v2 2/6] net: bcmgenet: register xdp_rxq_info for each RX ring Nicolai Buchwitz
2026-03-15 21:49 ` [PATCH net-next v2 3/6] net: bcmgenet: add basic XDP support (PASS/DROP) Nicolai Buchwitz
2026-03-17 16:19   ` [net-next,v2,3/6] " Simon Horman
2026-03-17 19:27     ` Nicolai Buchwitz
2026-03-15 21:49 ` [PATCH net-next v2 4/6] net: bcmgenet: add XDP_TX support Nicolai Buchwitz
2026-03-17 16:20   ` [net-next,v2,4/6] " Simon Horman
2026-03-17 19:25     ` Nicolai Buchwitz
2026-03-15 21:49 ` [PATCH net-next v2 5/6] net: bcmgenet: add XDP_REDIRECT and ndo_xdp_xmit support Nicolai Buchwitz
2026-03-15 21:49 ` [PATCH net-next v2 6/6] net: bcmgenet: add XDP statistics counters Nicolai Buchwitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox