From: Chris J Arges <carges@cloudflare.com>
To: Joe Damato <joe@dama.to>, Jakub Kicinski <kuba@kernel.org>,
Andy Gospodarek <gospo@broadcom.com>,
Michael Chan <michael.chan@broadcom.com>,
Pavan Chebbi <pavan.chebbi@broadcom.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Stanislav Fomichev <sdf@fomichev.me>
Cc: Chris J Arges <carges@cloudflare.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org
Subject: [PATCH net-next v4 4/6] bnxt_en: Implement XDP RSS hash metadata extraction for V3_CMP
Date: Fri, 13 Mar 2026 17:27:34 -0500 [thread overview]
Message-ID: <20260313223029.454755-5-carges@cloudflare.com> (raw)
In-Reply-To: <20260313223029.454755-1-carges@cloudflare.com>
This adds another conditional when cmp_type is CMP_TYPE_RX_L2_V3_CMP for
drivers that support this completion format.
This re-uses bnxt_rss_ext_op to provide similar functionality. One
limitation is for L4 hash-types, protocol-specific bits can't be
determined.
Signed-off-by: Chris J Arges <carges@cloudflare.com>
---
v4: re-uses bnxt_rss_ext_op
---
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
index 1f920464b426..babcd463e50e 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
@@ -514,6 +514,16 @@ int bnxt_xdp_rx_hash(const struct xdp_md *ctx, u32 *hash,
default:
break;
}
+ } else if (xdp->cmp_type == CMP_TYPE_RX_L2_V3_CMP) {
+ struct bnxt *bp = netdev_priv(xdp->xdp.rxq->dev);
+
+ if (rxcmp1->rx_cmp_flags2 & cpu_to_le32(RX_CMP_FLAGS2_IP_TYPE))
+ hash_type |= XDP_RSS_TYPE_L3_IPV6;
+ else
+ hash_type |= XDP_RSS_TYPE_L3_IPV4;
+
+ if (bnxt_rss_ext_op(bp, rxcmp) == PKT_HASH_TYPE_L4)
+ hash_type |= XDP_RSS_L4;
}
*rss_type = hash_type;
--
2.43.0
next prev parent reply other threads:[~2026-03-13 22:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 22:27 [PATCH net-next v4 0/6] bnxt_en: Add XDP RSS hash metadata support Chris J Arges
2026-03-13 22:27 ` [PATCH net-next v4 1/6] bnxt_en: use bnxt_xdp_buff for xdp context Chris J Arges
2026-03-14 0:00 ` Joe Damato
2026-03-13 22:27 ` [PATCH net-next v4 2/6] bnxt_en: Implement XDP RSS hash metadata extraction Chris J Arges
2026-03-13 22:27 ` [PATCH net-next v4 3/6] bnxt_en: Move bnxt_rss_ext_op into header Chris J Arges
2026-03-14 0:01 ` Joe Damato
2026-03-13 22:27 ` Chris J Arges [this message]
2026-03-14 0:03 ` [PATCH net-next v4 4/6] bnxt_en: Implement XDP RSS hash metadata extraction for V3_CMP Joe Damato
2026-03-13 22:27 ` [PATCH net-next v4 5/6] selftests: net: move common xdp.py functions into lib Chris J Arges
2026-03-17 6:48 ` Mohsin Bashir
2026-03-17 14:32 ` Paolo Abeni
2026-03-13 22:27 ` [PATCH net-next v4 6/6] selftests: drv-net: xdp: Add rss_hash metadata tests Chris J Arges
2026-03-17 9:49 ` Jesper Dangaard Brouer
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=20260313223029.454755-5-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=joe@dama.to \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@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 \
/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