public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris J Arges <carges@cloudflare.com>
To: netdev@vger.kernel.org, michael.chan@broadcom.com,
	pavan.chebbi@broadcom.com, davem@davemloft.net, joe@dama.to,
	gospo@broadcom.com, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com
Cc: andrew+netdev@lunn.ch, horms@kernel.org, ast@kernel.org,
	daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
	sdf@fomichev.me, shuah@kernel.org, bpf@vger.kernel.org,
	linux-kselftest@vger.kernel.org, kernel-team@cloudflare.com,
	Chris J Arges <carges@cloudflare.com>
Subject: [PATCH net-next v5 0/6] bnxt_en: Add XDP RSS hash metadata support
Date: Wed, 25 Mar 2026 15:09:46 -0500	[thread overview]
Message-ID: <20260325201139.2501937-1-carges@cloudflare.com> (raw)

This series adds XDP RSS hash metadata extraction support for the bnxt_en
driver and includes selftests to validate the functionality. I was able
to test this on a BCM57414 NIC.

Patches 1-4 implement the driver support:
  - Patch 1 adds bnxt_xdp_buff to wrap xdp_buff with
    pointers to the hardware RX completion descriptors and the
    completion type. This is similar to other driver implementations.
  - Patch 2 adds xmo_rx_hash callback for CMP_TYPE_RX_L2_CMP completions.
  - Patch 3 moves bnxt_rss_ext_op to bnxt.h
  - Patch 4 adds handling for CMP_TYPE_RX_L2_V3_CMP completions

Patches 5-6 add selftest coverage:
  - Patch 5 refactors common BPF map helper functions out of the
    existing xdp.py selftest into a shared net/lib/py/bpf.py module.
  - Patch 6 adds an XDP metadata selftest that loads an XDP program
    calling bpf_xdp_metadata_rx_hash. The test skips on devices without
    xdp-rx-metadata-features.

Changes from v4: https://lore.kernel.org/all/20260313223029.454755-1-carges@cloudflare.com/
  - address RCT again
  - make _format_hex_bytes private
  - remove redundant bpf_map_set
  - rebased on net-next

Changes from v3: https://lore.kernel.org/netdev/20260306230600.1628196-1-carges@cloudflare.com/
  - split out bnxt_rss_ext_op into header
  - address RCT issue
  - rebased on net-next

Changes from v2: https://lore.kernel.org/netdev/20260303024510.644962-1-carges@cloudflare.com/
  - bnxt xdp: actually fixed RCT issues
  - bnxt xdp: Added patch 3 to handle CMP_TYPE_RX_L2_V3_CMP completions.

Changes from v1: https://lore.kernel.org/netdev/cover.1772211065.git.carges@cloudflare.com/
  - selftests: moved tests into net/hw
  - selftests: fix pylinter errors
  - selftests: add check for no error count
  - bnxt_xdp: followed RCT for variable declaration
  - rebased on net-next

Chris J Arges (6):
  bnxt_en: use bnxt_xdp_buff for xdp context
  bnxt_en: Implement XDP RSS hash metadata extraction
  bnxt_en: Move bnxt_rss_ext_op into header
  bnxt_en: Implement XDP RSS hash metadata extraction for V3_CMP
  selftests: net: move common xdp.py functions into lib
  selftests: drv-net: xdp: Add rss_hash metadata tests

 drivers/net/ethernet/broadcom/bnxt/bnxt.c     |  51 +++---
 drivers/net/ethernet/broadcom/bnxt/bnxt.h     |  19 ++
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c |  57 ++++++
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h |  10 ++
 .../testing/selftests/drivers/net/hw/Makefile |   1 +
 .../drivers/net/hw/lib/py/__init__.py         |   2 +
 .../selftests/drivers/net/hw/xdp_metadata.py  | 146 ++++++++++++++++
 .../selftests/drivers/net/lib/py/__init__.py  |   2 +
 tools/testing/selftests/drivers/net/xdp.py    |  96 +++--------
 .../testing/selftests/net/lib/py/__init__.py  |   2 +
 tools/testing/selftests/net/lib/py/bpf.py     |  68 ++++++++
 .../selftests/net/lib/xdp_metadata.bpf.c      | 163 ++++++++++++++++++
 12 files changed, 516 insertions(+), 101 deletions(-)
 create mode 100644 tools/testing/selftests/drivers/net/hw/xdp_metadata.py
 create mode 100644 tools/testing/selftests/net/lib/py/bpf.py
 create mode 100644 tools/testing/selftests/net/lib/xdp_metadata.bpf.c

-- 
2.43.0


             reply	other threads:[~2026-03-25 20:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 20:09 Chris J Arges [this message]
2026-03-25 20:09 ` [PATCH net-next v5 1/6] bnxt_en: use bnxt_xdp_buff for xdp context Chris J Arges
2026-03-25 20:09 ` [PATCH net-next v5 2/6] bnxt_en: Implement XDP RSS hash metadata extraction Chris J Arges
2026-03-25 20:09 ` [PATCH net-next v5 3/6] bnxt_en: Move bnxt_rss_ext_op into header Chris J Arges
2026-03-25 20:09 ` [PATCH net-next v5 4/6] bnxt_en: Implement XDP RSS hash metadata extraction for V3_CMP Chris J Arges
2026-03-25 20:09 ` [PATCH net-next v5 5/6] selftests: net: move common xdp.py functions into lib Chris J Arges
2026-03-25 20:09 ` [PATCH net-next v5 6/6] selftests: drv-net: xdp: Add rss_hash metadata tests Chris J Arges

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260325201139.2501937-1-carges@cloudflare.com \
    --to=carges@cloudflare.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gospo@broadcom.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=joe@dama.to \
    --cc=john.fastabend@gmail.com \
    --cc=kernel-team@cloudflare.com \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox