patch 'examples/qos_sched: fix Tx port config when link down' has been queued to stable release 22.11.2
Xueming Li
xuemingl at nvidia.com
Mon Feb 27 08:01:07 CET 2023
Hi,
FYI, your patch has been queued to stable release 22.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 03/01/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=dc7302e733911234b7b0d5e147e3812ba7a2a92f
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From dc7302e733911234b7b0d5e147e3812ba7a2a92f 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
Cc: Xueming Li <xuemingl at nvidia.com>
[ 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 d28350e14a..7a27c03b64 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -328,6 +328,8 @@ int app_init(void)
for(i = 0; i < nb_pfc; i++) {
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);
ring = rte_ring_lookup(ring_name);
@@ -358,6 +360,14 @@ int app_init(void)
app_init_port(qos_conf[i].rx_port, qos_conf[i].mbuf_pool);
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.25.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-27 14:08:45.928141300 +0800
+++ 0160-examples-qos_sched-fix-Tx-port-config-when-link-down.patch 2023-02-27 14:08:40.969237000 +0800
@@ -1 +1 @@
-From 665b49c51639a10c553433bc2bcd85c7331c631e Mon Sep 17 00:00:00 2001
+From dc7302e733911234b7b0d5e147e3812ba7a2a92f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 665b49c51639a10c553433bc2bcd85c7331c631e ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list