From: Chris J Arges <carges@cloudflare.com>
To: michael.chan@broadcom.com, pavan.chebbi@broadcom.com,
joe@dama.to, kuba@kernel.org, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Stanislav Fomichev <sdf@fomichev.me>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>
Cc: kernel-team@cloudflare.com, Chris J Arges <carges@cloudflare.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next v3 3/5] bnxt_en: Implement XDP RSS hash metadata extraction for V3_CMP
Date: Fri, 6 Mar 2026 17:00:18 -0600 [thread overview]
Message-ID: <20260306230600.1628196-4-carges@cloudflare.com> (raw)
In-Reply-To: <20260306230600.1628196-1-carges@cloudflare.com>
This adds another conditional for if cmp_type is CMP_TYPE_RX_L2_V3_CMP for
drivers that support this completion format.
It uses a similar approach as found in other parts of the driver.
Signed-off-by: Chris J Arges <carges@cloudflare.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
index 1f920464b426..25ecef1eb96e 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
@@ -514,6 +514,26 @@ 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);
+ u8 ext_op;
+
+ 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;
+
+ ext_op = RX_CMP_V3_HASH_TYPE(bp, rxcmp);
+ switch (ext_op) {
+ case EXT_OP_INNER_4:
+ case EXT_OP_OUTER_4:
+ case EXT_OP_INNFL_3:
+ case EXT_OP_OUTFL_3:
+ hash_type |= XDP_RSS_L4;
+ break;
+ default:
+ break;
+ }
}
*rss_type = hash_type;
--
2.43.0
next prev parent reply other threads:[~2026-03-06 23:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 23:00 [PATCH net-next v3 0/5] bnxt_en: Add XDP RSS hash metadata support Chris J Arges
2026-03-06 23:00 ` [PATCH net-next v3 1/5] bnxt_en: use bnxt_xdp_buff for xdp context Chris J Arges
2026-03-10 0:52 ` Joe Damato
2026-03-13 0:14 ` Andy Gospodarek
2026-03-06 23:00 ` [PATCH net-next v3 2/5] bnxt_en: Implement XDP RSS hash metadata extraction Chris J Arges
2026-03-10 0:56 ` Joe Damato
2026-03-13 0:15 ` Andy Gospodarek
2026-03-06 23:00 ` Chris J Arges [this message]
2026-03-10 1:02 ` [PATCH net-next v3 3/5] bnxt_en: Implement XDP RSS hash metadata extraction for V3_CMP Joe Damato
2026-03-13 0:15 ` Andy Gospodarek
2026-03-06 23:00 ` [PATCH net-next v3 4/5] selftests: net: move common xdp.py functions into lib Chris J Arges
2026-03-10 0:54 ` Joe Damato
2026-03-06 23:00 ` [PATCH net-next v3 5/5] selftests: drv-net: xdp: Add rss_hash metadata tests Chris J Arges
2026-03-10 0:51 ` [PATCH net-next v3 0/5] bnxt_en: Add XDP RSS hash metadata support Joe Damato
2026-03-10 2:06 ` Chris Arges
2026-03-10 2:37 ` Jakub Kicinski
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=20260306230600.1628196-4-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=hawk@kernel.org \
--cc=joe@dama.to \
--cc=john.fastabend@gmail.com \
--cc=kernel-team@cloudflare.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