[dpdk-stable] patch 'net/bnxt: fix mbuf VLAN in scalar Rx' has been queued to stable release 20.11.4
Xueming Li
xuemingl at nvidia.com
Wed Nov 10 07:28:31 CET 2021
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/16f8bcc3d8dea84d2bf65f3d7d33d9690eb645cf
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 16f8bcc3d8dea84d2bf65f3d7d33d9690eb645cf Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Mon, 23 Aug 2021 13:42:12 +0530
Subject: [PATCH] net/bnxt: fix mbuf VLAN in scalar Rx
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 167978c1678fc5fd525e4e731de4c00093aee129 ]
In the scalar Rx path, for the VLAN packet, TCI is not saved in
the "mbuf->vlan_tci", however the STRIPPED offload flag is set
along with PKT_RX_VLAN flag.
Fixes: c1b33d40315f ("net/bnxt: use table based mbuf flags handling")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 2 ++
drivers/net/bnxt/bnxt_rxr.h | 10 ++++++++++
2 files changed, 12 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 655f09a9bf..6b3603d11f 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -891,6 +891,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
}
#endif
+ bnxt_set_vlan(rxcmp1, mbuf);
+
if (BNXT_TRUFLOW_EN(bp))
mark_id = bnxt_ulp_set_mark_in_mbuf(rxq->bp, rxcmp1, mbuf,
&vfr_flag);
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 46b284024e..0fd5920f0a 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -126,3 +126,13 @@ bnxt_cfa_code_dynfield(struct rte_mbuf *mbuf)
#define BNXT_PTYPE_TBL_DIM 128
extern uint32_t bnxt_ptype_table[BNXT_PTYPE_TBL_DIM];
#endif
+static inline void bnxt_set_vlan(struct rx_pkt_cmpl_hi *rxcmp1,
+ struct rte_mbuf *mbuf)
+{
+ uint32_t metadata = rte_le_to_cpu_32(rxcmp1->metadata);
+
+ mbuf->vlan_tci = metadata & (RX_PKT_CMPL_METADATA_VID_MASK |
+ RX_PKT_CMPL_METADATA_DE |
+ RX_PKT_CMPL_METADATA_PRI_MASK);
+}
+
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.326320246 +0800
+++ 0027-net-bnxt-fix-mbuf-VLAN-in-scalar-Rx.patch 2021-11-10 14:17:01.767413603 +0800
@@ -1 +1 @@
-From 167978c1678fc5fd525e4e731de4c00093aee129 Mon Sep 17 00:00:00 2001
+From 16f8bcc3d8dea84d2bf65f3d7d33d9690eb645cf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 167978c1678fc5fd525e4e731de4c00093aee129 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index 73fbdd17d1..ccff80b944 100644
+index 655f09a9bf..6b3603d11f 100644
@@ -26,3 +28,3 @@
-@@ -962,6 +962,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
-
- mbuf->packet_type = bnxt_parse_pkt_type(rxcmp, rxcmp1);
+@@ -891,6 +891,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
+ }
+ #endif
@@ -36 +38 @@
-index dc2b1b7b4f..59adb7242c 100644
+index 46b284024e..0fd5920f0a 100644
@@ -39,2 +41,2 @@
-@@ -185,6 +185,16 @@ bnxt_check_ptype_constants(void)
-
+@@ -126,3 +126,13 @@ bnxt_cfa_code_dynfield(struct rte_mbuf *mbuf)
+ #define BNXT_PTYPE_TBL_DIM 128
@@ -42 +44 @@
-
+ #endif
@@ -53,3 +54,0 @@
- /* Stingray2 specific code for RX completion parsing */
- #define RX_CMP_VLAN_VALID(rxcmp) \
- (((struct rx_pkt_v2_cmpl *)rxcmp)->metadata1_payload_offset & \
More information about the stable
mailing list