patch 'net/softnic: fix useless address check' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:34:49 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/eaa0d764d28c4540fb624a1c1cf11705db63ccab

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From eaa0d764d28c4540fb624a1c1cf11705db63ccab Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Mon, 4 Oct 2021 18:27:22 +0100
Subject: [PATCH] net/softnic: fix useless address check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 675a6c18746694a8e19a0256b16bd6b3e8dcbfd2 ]

Reported by "gcc (GCC) 12.0.0 20211003 (experimental)":

./drivers/net/softnic/rte_eth_softnic_cli.c:
	In function ‘tmgr_hierarchy_default’:
./drivers/net/softnic/rte_eth_softnic_cli.c:634:73:
	error: the comparison will always evaluate as ‘true’ for the
	address of ‘tc_valid’ will never be NULL [-Werror=address]
  634 | (&params->shared_shaper_id.tc_valid[0]) ? 1 : 0,
      |                                         ^

Fixing it by removing useless check.

Fixes: 1af2dc5111ce ("net/softnic: add command for default tmgr hierarchy")
Fixes: 5eb676d74fc8 ("net/softnic: add config flexibility to TM")

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh at intel.com>
---
 drivers/net/softnic/rte_eth_softnic_cli.c | 26 +++++++++++------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c
index bc95f16439..aa9971579e 100644
--- a/drivers/net/softnic/rte_eth_softnic_cli.c
+++ b/drivers/net/softnic/rte_eth_softnic_cli.c
@@ -631,7 +631,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[0],
 			.shared_shaper_id = &shared_shaper_id[0],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[0]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[0]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -641,7 +641,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[1],
 			.shared_shaper_id = &shared_shaper_id[1],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[1]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[1]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -651,7 +651,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[2],
 			.shared_shaper_id = &shared_shaper_id[2],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[2]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[2]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -661,7 +661,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[3],
 			.shared_shaper_id = &shared_shaper_id[3],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[3]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[3]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -671,7 +671,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[4],
 			.shared_shaper_id = &shared_shaper_id[4],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[4]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[4]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -681,7 +681,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[5],
 			.shared_shaper_id = &shared_shaper_id[5],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[5]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[5]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -691,7 +691,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[6],
 			.shared_shaper_id = &shared_shaper_id[6],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[6]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[6]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -701,7 +701,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[7],
 			.shared_shaper_id = &shared_shaper_id[7],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[7]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[7]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -711,7 +711,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[8],
 			.shared_shaper_id = &shared_shaper_id[8],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[8]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[8]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -721,7 +721,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[9],
 			.shared_shaper_id = &shared_shaper_id[9],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[9]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[9]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -731,7 +731,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[10],
 			.shared_shaper_id = &shared_shaper_id[10],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[10]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[10]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -741,7 +741,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[11],
 			.shared_shaper_id = &shared_shaper_id[11],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[11]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[11]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -751,7 +751,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[12],
 			.shared_shaper_id = &shared_shaper_id[12],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[12]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[12]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:10.898623380 +0100
+++ 0085-net-softnic-fix-useless-address-check.patch	2021-11-30 16:50:05.870874117 +0100
@@ -1 +1 @@
-From 675a6c18746694a8e19a0256b16bd6b3e8dcbfd2 Mon Sep 17 00:00:00 2001
+From eaa0d764d28c4540fb624a1c1cf11705db63ccab Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 675a6c18746694a8e19a0256b16bd6b3e8dcbfd2 ]
+
@@ -23 +24,0 @@
-Cc: stable at dpdk.org
@@ -32 +33 @@
-index 932ec15f49..b04e78c6e0 100644
+index bc95f16439..aa9971579e 100644


More information about the stable mailing list