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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Jul 24 13:33:17 CEST 2024


Hi,

FYI, your patch has been queued to stable release 22.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/28c93c22f7890e8b0adf17b50a2c4b3448c5f27a

Thanks.

Luca Boccassi

---
>From 28c93c22f7890e8b0adf17b50a2c4b3448c5f27a 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

[ 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")

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 cefea36b13..9620d73fc8 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 563acce331..ec4f156881 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -354,7 +354,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 bab35d1839..1bcc61e777 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1780,7 +1780,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
 	};
@@ -1812,7 +1812,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 dca1beabc8..9201019711 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -493,7 +493,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
 	};
@@ -524,7 +524,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.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-24 12:29:23.360773176 +0100
+++ 0039-examples-fix-port-ID-restriction.patch	2024-07-24 12:29:20.859027902 +0100
@@ -1 +1 @@
-From 548de9091c85467bd8f05cecf6d32315869d1461 Mon Sep 17 00:00:00 2001
+From 28c93c22f7890e8b0adf17b50a2c4b3448c5f27a Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 548de9091c85467bd8f05cecf6d32315869d1461 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -34 +35 @@
-index 5a7e1b220f..e98ad2572e 100644
+index cefea36b13..9620d73fc8 100644
@@ -56 +57 @@
-index 4396e2bb3c..a13dc01138 100644
+index 563acce331..ec4f156881 100644
@@ -59 +60 @@
-@@ -448,7 +448,7 @@ parse_config(const char *q_arg)
+@@ -354,7 +354,7 @@ parse_config(const char *q_arg)
@@ -69 +70 @@
-index 2976058425..2bb6b092c3 100644
+index bab35d1839..1bcc61e777 100644
@@ -72 +73 @@
-@@ -1659,7 +1659,7 @@ parse_config(const char *q_arg)
+@@ -1780,7 +1780,7 @@ parse_config(const char *q_arg)
@@ -81 +82 @@
-@@ -1691,7 +1691,7 @@ parse_config(const char *q_arg)
+@@ -1812,7 +1812,7 @@ parse_config(const char *q_arg)
@@ -91 +92 @@
-index a0112b57ff..6c0f7ea213 100644
+index fbd7864cb9..e4bdb62121 100644
@@ -113 +114 @@
-index ba7083d4f3..01b763e5ba 100644
+index dca1beabc8..9201019711 100644
@@ -116 +117 @@
-@@ -501,7 +501,7 @@ parse_config(const char *q_arg)
+@@ -493,7 +493,7 @@ parse_config(const char *q_arg)
@@ -125 +126 @@
-@@ -532,7 +532,7 @@ parse_config(const char *q_arg)
+@@ -524,7 +524,7 @@ parse_config(const char *q_arg)


More information about the stable mailing list