Skip to contentSkip to conversation

net/bnxt: fix reported VLAN stripped flag for Thor 2

PATCH Applied Mohammad Shuab Siddique 3 participants 3 messages Feb 27 – Mar 11 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bnxt: fix reported VLAN stripped flag for Thor 2

From: Keegan Freyhof <[email protected]>

Modified the way that the scalar path reports VLAN TCI and the RTE_MBUF_F_RX_VLAN_STRIPPED flag.

Bugzilla ID: 1868

Fixes 65d2b0557ba3 ("net/bnxt: support Rx completion v3")
Fixes daa02b5cddbb ("mbuf: add namespace to offload flags")
---
 drivers/net/bnxt/bnxt_rxr.c | 3 ++-
 drivers/net/bnxt/bnxt_rxr.h | 7 +++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
drivers/net/bnxt/bnxt_rxr.c +2 -1
index c94abefa01..eb01132f48 100644
@@ -1115,6 +1115,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	uint16_t cmp_type;
 	uint32_t vfr_flag = 0, mark_id = 0;
 	struct bnxt *bp = rxq->bp;
+	struct bnxt_vnic_info *vnic = rxq->vnic;
 
 	rxcmp = (struct rx_pkt_cmpl *)
 	    &cpr->cp_desc_ring[cp_cons];
@@ -1198,7 +1199,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	if (cmp_type == CMPL_BASE_TYPE_RX_L2_V3) {
 		bnxt_parse_csum_v3(mbuf, rxcmp1);
 		bnxt_parse_pkt_type_v3(mbuf, rxcmp, rxcmp1);
-		bnxt_rx_vlan_v3(mbuf, rxcmp, rxcmp1);
+		bnxt_rx_vlan_v3(mbuf, rxcmp, rxcmp1, vnic->vlan_strip);
 		if (BNXT_TRUFLOW_EN(bp))
 			mark_id = bnxt_ulp_set_mark_in_mbuf_v3(rxq->bp, rxcmp1,
 							       mbuf, &vfr_flag);
drivers/net/bnxt/bnxt_rxr.h +5 -2
index 7357ca4427..f6d1e3ddfb 100644
@@ -474,11 +474,14 @@ bnxt_parse_pkt_type_v2(struct rte_mbuf *mbuf,
 
 static inline void bnxt_rx_vlan_v3(struct rte_mbuf *mbuf,
 	struct rx_pkt_cmpl *rxcmp,
-	struct rx_pkt_cmpl_hi *rxcmp1)
+	struct rx_pkt_cmpl_hi *rxcmp1,
+	bool stripped)
 {
 	if (RX_CMP_V3_VLAN_VALID(rxcmp)) {
 		mbuf->vlan_tci = RX_CMP_V3_METADATA0_VID(rxcmp1);
-		mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED;
+		mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN;
+		if (stripped)
+			mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN_STRIPPED;
 	}
 }
 
Signature · 1 line
2.47.3
Acked-by on v1 1/1
#1 lore raw

-----Original Message-----
From: Mohammad Shuab Siddique <[email protected]>
Sent: Friday, February 27, 2026 3:20 PM
To: [email protected]
Cc: [email protected]; Keegan Freyhof <[email protected]>; [email protected]; Mohammad Shuab Siddique <[email protected]>
Subject: [PATCH] net/bnxt: fix reported VLAN stripped flag for Thor 2

From: Keegan Freyhof <[email protected]>

Modified the way that the scalar path reports VLAN TCI and the RTE_MBUF_F_RX_VLAN_STRIPPED flag.

Bugzilla ID: 1868

Fixes 65d2b0557ba3 ("net/bnxt: support Rx completion v3")
Fixes daa02b5cddbb ("mbuf: add namespace to offload flags")
Signed-off-by Mohammad Shuab Siddique

<[email protected]>

---
 drivers/net/bnxt/bnxt_rxr.c | 3 ++-
 drivers/net/bnxt/bnxt_rxr.h | 7 +++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
drivers/net/bnxt/bnxt_rxr.c +2 -1
index c94abefa01..eb01132f48 100644
@@ -1115,6 +1115,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	uint16_t cmp_type;
 	uint32_t vfr_flag = 0, mark_id = 0;
 	struct bnxt *bp = rxq->bp;
+	struct bnxt_vnic_info *vnic = rxq->vnic;
 
 	rxcmp = (struct rx_pkt_cmpl *)
 	    &cpr->cp_desc_ring[cp_cons];
@@ -1198,7 +1199,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	if (cmp_type == CMPL_BASE_TYPE_RX_L2_V3) {
 		bnxt_parse_csum_v3(mbuf, rxcmp1);
 		bnxt_parse_pkt_type_v3(mbuf, rxcmp, rxcmp1);
-		bnxt_rx_vlan_v3(mbuf, rxcmp, rxcmp1);
+		bnxt_rx_vlan_v3(mbuf, rxcmp, rxcmp1, vnic->vlan_strip);
 		if (BNXT_TRUFLOW_EN(bp))
 			mark_id = bnxt_ulp_set_mark_in_mbuf_v3(rxq->bp,

rxcmp1,
mbuf,
&vfr_flag);

drivers/net/bnxt/bnxt_rxr.h +2 -2
index 7357ca4427..f6d1e3ddfb 100644
@@ -474,11 +474,14 @@ bnxt_parse_pkt_type_v2(struct rte_mbuf *mbuf,
 
 static inline void bnxt_rx_vlan_v3(struct rte_mbuf *mbuf,
 	struct rx_pkt_cmpl *rxcmp,
-	struct rx_pkt_cmpl_hi *rxcmp1)
+	struct rx_pkt_cmpl_hi *rxcmp1,
+	bool stripped)
 {
 	if (RX_CMP_V3_VLAN_VALID(rxcmp)) {
 		mbuf->vlan_tci = RX_CMP_V3_METADATA0_VID(rxcmp1);
-		mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN |

RTE_MBUF_F_RX_VLAN_STRIPPED;
+ mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN;
+ if (stripped)
+ mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN_STRIPPED;
}
}

--
2.47.3

Acked-by Kishore Padmanabha Applied
#2 lore raw
Quoted 11 lines

Modified the way that the scalar path reports VLAN TCI and the RTE_MBUF_F_RX_VLAN_STRIPPED flag.

Bugzilla ID: 1868

Fixes 65d2b0557ba3 ("net/bnxt: support Rx completion v3")
Fixes daa02b5cddbb ("mbuf: add namespace to offload flags")
Signed-off-by Mohammad Shuab Siddique

<[email protected]>

Applied, thanks.