patch 'net/bnxt: remove some unused variables' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Sun Nov 28 15:53:26 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/30/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/415c636992bd80539713a30b6a0b1189389cb91e

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 415c636992bd80539713a30b6a0b1189389cb91e Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh at intel.com>
Date: Mon, 15 Nov 2021 17:58:54 +0000
Subject: [PATCH] net/bnxt: remove some unused variables
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 2d72ec8dabd02c1fae159f5222e5a2d0d0a07db3 ]

Reported by clang 13.

Bugzilla ID: 881
Fixes: b87abb2e55cb ("net/bnxt: support marking packet")
Fixes: 88badb3aef94 ("net/bnxt: add helper functions for blob/regfile ops")

Reported-by: Liang Longfeng <longfengx.liang at intel.com>
Signed-off-by: Conor Walsh <conor.walsh at intel.com>
Acked-by: Somnath Kotur <somnath.kotur at broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
---
 drivers/net/bnxt/bnxt_rxr.c         | 22 ----------------------
 drivers/net/bnxt/tf_ulp/ulp_utils.c |  3 ---
 2 files changed, 25 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 67181b0fa9..e847af9fff 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -759,9 +759,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
 			   struct rte_mbuf *mbuf)
 {
 	uint32_t cfa_code = 0;
-	uint8_t meta_fmt = 0;
-	uint16_t flags2 = 0;
-	uint32_t meta =  0;
 
 	cfa_code = rte_le_to_cpu_16(rxcmp1->cfa_code);
 	if (!cfa_code)
@@ -770,25 +767,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
 	if (cfa_code && !bp->mark_table[cfa_code].valid)
 		return;
 
-	flags2 = rte_le_to_cpu_16(rxcmp1->flags2);
-	meta = rte_le_to_cpu_32(rxcmp1->metadata);
-	if (meta) {
-		meta >>= BNXT_RX_META_CFA_CODE_SHIFT;
-
-		/* The flags field holds extra bits of info from [6:4]
-		 * which indicate if the flow is in TCAM or EM or EEM
-		 */
-		meta_fmt = (flags2 & BNXT_CFA_META_FMT_MASK) >>
-			   BNXT_CFA_META_FMT_SHFT;
-
-		/* meta_fmt == 4 => 'b100 => 'b10x => EM.
-		 * meta_fmt == 5 => 'b101 => 'b10x => EM + VLAN
-		 * meta_fmt == 6 => 'b110 => 'b11x => EEM
-		 * meta_fmt == 7 => 'b111 => 'b11x => EEM + VLAN.
-		 */
-		meta_fmt >>= BNXT_CFA_META_FMT_EM_EEM_SHFT;
-	}
-
 	mbuf->hash.fdir.hi = bp->mark_table[cfa_code].mark_id;
 	mbuf->ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID;
 }
diff --git a/drivers/net/bnxt/tf_ulp/ulp_utils.c b/drivers/net/bnxt/tf_ulp/ulp_utils.c
index a13a3bbf65..ac9ce97ff2 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_utils.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_utils.c
@@ -175,7 +175,6 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
 {
 	int i;
 	int cnt = (len + 7) / 8;
-	int tlen = len;
 
 	/* Handle any remainder bits */
 	int tmp = len % 8;
@@ -186,12 +185,10 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
 	ulp_bs_put_msb(bs, pos, tmp, val[0]);
 
 	pos += tmp;
-	tlen -= tmp;
 
 	for (i = 1; i < cnt; i++) {
 		ulp_bs_put_msb(bs, pos, 8, val[i]);
 		pos += 8;
-		tlen -= 8;
 	}
 
 	return len;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.605481955 +0800
+++ 0022-net-bnxt-remove-some-unused-variables.patch	2021-11-28 22:41:03.233542549 +0800
@@ -1 +1 @@
-From 2d72ec8dabd02c1fae159f5222e5a2d0d0a07db3 Mon Sep 17 00:00:00 2001
+From 415c636992bd80539713a30b6a0b1189389cb91e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 2d72ec8dabd02c1fae159f5222e5a2d0d0a07db3 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
-index 8bc8ddc353..157297bc64 100644
+index 67181b0fa9..e847af9fff 100644
@@ -27 +29 @@
-@@ -823,9 +823,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
+@@ -759,9 +759,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
@@ -37 +39 @@
-@@ -834,25 +831,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
+@@ -770,25 +767,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
@@ -61 +63 @@
- 	mbuf->ol_flags |= RTE_MBUF_F_RX_FDIR | RTE_MBUF_F_RX_FDIR_ID;
+ 	mbuf->ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID;
@@ -64 +66 @@
-index df3afaa6fd..c60d81d14a 100644
+index a13a3bbf65..ac9ce97ff2 100644
@@ -67 +69 @@
-@@ -200,7 +200,6 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
+@@ -175,7 +175,6 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
@@ -75 +77 @@
-@@ -211,12 +210,10 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
+@@ -186,12 +185,10 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)


More information about the stable mailing list