Skip to contentSkip to conversation

net/bxnt: fix vlan strip flags in sse mode

PATCH New Stephen Hemminger 2 participants 3 messages Jan 22, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bxnt: fix vlan strip flags in sse mode

When the VLAN is stripped from the packet on receive the driver must set the PKT_RX_VLAN_STRIPPED flag in the mbuf. This is done correctly for normal receive in the bnxt driver but was not being handled correctly in the new SSE code.

Fixes bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
---
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_rxtx_vec_sse.c +1 -1
index 22d9f9e84abe..d47ad7e1796d 100644
@@ -289,7 +289,7 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 					(RX_PKT_CMPL_METADATA_VID_MASK |
 					RX_PKT_CMPL_METADATA_DE |
 					RX_PKT_CMPL_METADATA_PRI_MASK);
-				mbuf->ol_flags |= PKT_RX_VLAN;
+				mbuf->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 			}
 
 			bnxt_parse_csum(mbuf, rxcmp1);
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/1 net/bnxt: fix VLAN strip flags in sse mode

From: Stephen Hemminger <[email protected]>

When the VLAN is stripped from the packet on receive the driver must set the PKT_RX_VLAN_STRIPPED flag in the mbuf. This is done correctly for normal receive in the bnxt driver but was not being handled correctly in the new SSE code.

Fixes bc4a000f2f53 ("net/bnxt: implement SSE vector mode")

---
v1->v2: fixed the commit headline

 drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/bnxt/bnxt_rxtx_vec_sse.c +2 -1
index 22d9f9e84..31457300a 100644
@@ -289,7 +289,8 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 					(RX_PKT_CMPL_METADATA_VID_MASK |
 					RX_PKT_CMPL_METADATA_DE |
 					RX_PKT_CMPL_METADATA_PRI_MASK);
-				mbuf->ol_flags |= PKT_RX_VLAN;
+				mbuf->ol_flags |=
+					PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 			}
 
 			bnxt_parse_csum(mbuf, rxcmp1);
Signature · 1 line
2.21.0 (Apple Git-122.2)
#2 lore raw

Re: [dpdk-dev] [PATCH v2] net/bnxt: fix VLAN strip flags in sse mode

Quoted 7 lines · Ajit Khaparde

From: Stephen Hemminger <[email protected]>

When the VLAN is stripped from the packet on receive the driver must set the PKT_RX_VLAN_STRIPPED flag in the mbuf. This is done correctly for normal receive in the bnxt driver but was not being handled correctly in the new SSE code.

Quoted 6 lines
Fixes bc4a000f2f53 ("net/bnxt: implement SSE vector mode")

Patch applied to dpdk-next-net-brcm. Thanks

Quoted 26 lines

---
v1->v2: fixed the commit headline

 drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/bnxt/bnxt_rxtx_vec_sse.c +2 -1
index 22d9f9e84..31457300a 100644
@@ -289,7 +289,8 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf
 **rx_pkts,
                                        (RX_PKT_CMPL_METADATA_VID_MASK |
                                        RX_PKT_CMPL_METADATA_DE |
                                        RX_PKT_CMPL_METADATA_PRI_MASK);
-                               mbuf->ol_flags |= PKT_RX_VLAN;
+                               mbuf->ol_flags |=
+                                       PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
                        }
 
                        bnxt_parse_csum(mbuf, rxcmp1);

--
2.21.0 (Apple Git-122.2)