patch 'examples/qos_sched: fix Tx port config when link down' has been queued to stable release 21.11.4

Kevin Traynor ktraynor at redhat.com
Thu Feb 23 16:06:30 CET 2023


Hi,

FYI, your patch has been queued to stable release 21.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 02/28/23. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/74f84c75584a043cbc7f983579083f01f8b7d225

Thanks.

Kevin

---
>From 74f84c75584a043cbc7f983579083f01f8b7d225 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Fri, 3 Feb 2023 10:05:30 +0000
Subject: [PATCH] examples/qos_sched: fix Tx port config when link down

[ upstream commit 665b49c51639a10c553433bc2bcd85c7331c631e ]

The Tx port config will fail if the port is not up,
so wait 10 seconds on startup for it to start.

Fixes: de3cfa2c9823 ("sched: initial import")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
---
 examples/qos_sched/init.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index e912ca4f6c..3a7e7d80a1 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -394,4 +394,6 @@ int app_init(void)
 		uint32_t socket = rte_lcore_to_socket_id(qos_conf[i].rx_core);
 		struct rte_ring *ring;
+		struct rte_eth_link link = {0};
+		int retry_count = 100, retry_delay = 100; /* try every 100ms for 10 sec */
 
 		snprintf(ring_name, MAX_NAME_LEN, "ring-%u-%u", i, qos_conf[i].rx_core);
@@ -424,4 +426,12 @@ int app_init(void)
 		app_init_port(qos_conf[i].tx_port, qos_conf[i].mbuf_pool);
 
+		rte_eth_link_get(qos_conf[i].tx_port, &link);
+		if (link.link_status == 0)
+			printf("Waiting for link on port %u\n", qos_conf[i].tx_port);
+		while (link.link_status == 0 && retry_count--) {
+			rte_delay_ms(retry_delay);
+			rte_eth_link_get(qos_conf[i].tx_port, &link);
+		}
+
 		qos_conf[i].sched_port = app_init_sched_port(qos_conf[i].tx_port, socket);
 	}
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 14:46:26.174589816 +0000
+++ 0099-examples-qos_sched-fix-Tx-port-config-when-link-down.patch	2023-02-23 14:46:23.889236381 +0000
@@ -1 +1 @@
-From 665b49c51639a10c553433bc2bcd85c7331c631e Mon Sep 17 00:00:00 2001
+From 74f84c75584a043cbc7f983579083f01f8b7d225 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 665b49c51639a10c553433bc2bcd85c7331c631e ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index d28350e14a..7a27c03b64 100644
+index e912ca4f6c..3a7e7d80a1 100644
@@ -22 +23 @@
-@@ -329,4 +329,6 @@ int app_init(void)
+@@ -394,4 +394,6 @@ int app_init(void)
@@ -29 +30 @@
-@@ -359,4 +361,12 @@ int app_init(void)
+@@ -424,4 +426,12 @@ int app_init(void)



More information about the stable mailing list