patch 'examples: fix port ID restriction' has been queued to stable release 23.11.2

Xueming Li xuemingl at nvidia.com
Mon Aug 12 14:50:35 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=729e0848b79b9f119d33066a915e34439d7f8597

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 729e0848b79b9f119d33066a915e34439d7f8597 Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala at amd.com>
Date: Tue, 26 Mar 2024 13:55:50 +0100
Subject: [PATCH] examples: fix port ID restriction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 548de9091c85467bd8f05cecf6d32315869d1461 ]

Currently application supports port IDs up to 255
irrespective of RTE_MAX_ETHPORTS.

The patch fixes these constraints by allowing port
IDs up to RTE_MAX_ETHPORTS.

Fixes: af75078fece3 ("first public release")
Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")
Cc: stable at dpdk.org

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala at amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 4 ++--
 examples/l3fwd-graph/main.c        | 2 +-
 examples/l3fwd-power/main.c        | 4 ++--
 examples/l3fwd-power/perf_core.c   | 4 ++--
 examples/l3fwd/main.c              | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 2d004d82fd..761b9cf396 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1049,7 +1049,7 @@ parse_config(const char *q_arg)
 	int32_t i;
 	uint32_t size;
 	uint32_t max_fld[_NUM_FLD] = {
-		255,
+		RTE_MAX_ETHPORTS,
 		RTE_MAX_QUEUES_PER_PORT,
 		RTE_MAX_LCORE
 	};
@@ -1082,7 +1082,7 @@ parse_config(const char *q_arg)
 			return -1;
 		}
 		lcore_params_array[nb_lcore_params].port_id =
-			(uint8_t)int_fld[FLD_PORT];
+			(uint16_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
 			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index dbc36362c3..4ded69b4a0 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -448,7 +448,7 @@ parse_config(const char *q_arg)
 		}
 
 		lcore_params_array[nb_lcore_params].port_id =
-			(uint8_t)int_fld[FLD_PORT];
+			(uint16_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
 			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index baf2bf64b2..996ac6dc56 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1658,7 +1658,7 @@ parse_config(const char *q_arg)
 	int i;
 	unsigned size;
 	unsigned int max_fld[_NUM_FLD] = {
-		255,
+		RTE_MAX_ETHPORTS,
 		RTE_MAX_QUEUES_PER_PORT,
 		RTE_MAX_LCORE
 	};
@@ -1690,7 +1690,7 @@ parse_config(const char *q_arg)
 			return -1;
 		}
 		lcore_params_array[nb_lcore_params].port_id =
-				(uint8_t)int_fld[FLD_PORT];
+				(uint16_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
 				(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c
index fbd7864cb9..e4bdb62121 100644
--- a/examples/l3fwd-power/perf_core.c
+++ b/examples/l3fwd-power/perf_core.c
@@ -133,7 +133,7 @@ parse_perf_config(const char *q_arg)
 	int i;
 	unsigned int size;
 	unsigned int max_fld[_NUM_FLD] = {
-		255,
+		RTE_MAX_ETHPORTS,
 		RTE_MAX_QUEUES_PER_PORT,
 		255,
 		RTE_MAX_LCORE
@@ -168,7 +168,7 @@ parse_perf_config(const char *q_arg)
 			return -1;
 		}
 		prf_lc_prms[nb_prf_lc_prms].port_id =
-				(uint8_t)int_fld[FLD_PORT];
+				(uint16_t)int_fld[FLD_PORT];
 		prf_lc_prms[nb_prf_lc_prms].queue_id =
 				(uint16_t)int_fld[FLD_QUEUE];
 		prf_lc_prms[nb_prf_lc_prms].high_perf =
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 47baf464e2..a239869ada 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -501,7 +501,7 @@ parse_config(const char *q_arg)
 	int i;
 	unsigned size;
 	uint16_t max_fld[_NUM_FLD] = {
-		255,
+		RTE_MAX_ETHPORTS,
 		RTE_MAX_QUEUES_PER_PORT,
 		RTE_MAX_LCORE
 	};
@@ -532,7 +532,7 @@ parse_config(const char *q_arg)
 			return -1;
 		}
 		lcore_params_array[nb_lcore_params].port_id =
-			(uint8_t)int_fld[FLD_PORT];
+			(uint16_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
 			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.443026207 +0800
+++ 0158-examples-fix-port-ID-restriction.patch	2024-08-12 20:44:02.615069397 +0800
@@ -1 +1 @@
-From 548de9091c85467bd8f05cecf6d32315869d1461 Mon Sep 17 00:00:00 2001
+From 729e0848b79b9f119d33066a915e34439d7f8597 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 548de9091c85467bd8f05cecf6d32315869d1461 ]
@@ -34 +37 @@
-index 5a7e1b220f..e98ad2572e 100644
+index 2d004d82fd..761b9cf396 100644
@@ -56 +59 @@
-index 4396e2bb3c..a13dc01138 100644
+index dbc36362c3..4ded69b4a0 100644
@@ -69 +72 @@
-index 2976058425..2bb6b092c3 100644
+index baf2bf64b2..996ac6dc56 100644
@@ -72 +75 @@
-@@ -1659,7 +1659,7 @@ parse_config(const char *q_arg)
+@@ -1658,7 +1658,7 @@ parse_config(const char *q_arg)
@@ -81 +84 @@
-@@ -1691,7 +1691,7 @@ parse_config(const char *q_arg)
+@@ -1690,7 +1690,7 @@ parse_config(const char *q_arg)
@@ -91 +94 @@
-index a0112b57ff..6c0f7ea213 100644
+index fbd7864cb9..e4bdb62121 100644
@@ -113 +116 @@
-index ba7083d4f3..01b763e5ba 100644
+index 47baf464e2..a239869ada 100644


More information about the stable mailing list