From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E1EE141D4F for ; Thu, 23 Feb 2023 10:41:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE7BB43160; Thu, 23 Feb 2023 10:41:02 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id 57CCB43152 for ; Thu, 23 Feb 2023 10:41:02 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id ay29-20020a05600c1e1d00b003e9f4c2b623so2935004wmb.3 for ; Thu, 23 Feb 2023 01:41:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LwaBPSnkoASm8MvcRbDOYUUa+azP3QnmgajVno8osTI=; b=L4RkJb7x7Per4mjX2H74o6Cu18v1dsiyjXvkKNWm3ws4Q1E5SeK3SClg5pLIkfetFg UdjY59zkVztO4DDzLzVvmHxgPinEoG4MmG5GhNMMWm3j87lEwtRLQ3Y1Es+/h7eJsMNX qMk4nXgivYHreWf88p8HQgjs0f6OeH6JSIEX6bjaIdR2SkvTCnAgjx5HswxeOs8hxzI8 epxRZn8SIPLIVy0hwIcOYSnbi2Ls2sv8vwd1jmyB5ar81F27eCz4JUNiKZfZo2pVs0Mf CngrEj8+8gsO64pFedc7cUIXWkn3Hd0sLYQ52ebq0U6rSk3krMTV8UjyFcZ1gp1L8/Ta kMJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LwaBPSnkoASm8MvcRbDOYUUa+azP3QnmgajVno8osTI=; b=QtVxXkQzDM9B7RyIUEd3ZRHHioAygzKIG3p8tlR/hQOVrqVz/DaW8e8DHecefdMUNc B8id2etnvjaYNAhQSvigLpGa8iw8aIVzEOTQX4qGckd3fiP+CnNeFUJJseaa4j0vvZpI V2+kMzM4G5MlZREsDs1dXTlOG3yN2QGEUbx3OS1K1qZcRIR85t8EC0332QEbc/ZiqjWx MD9Bh1Sj/LgRrGz4C7TSvGG8f8axgll55mgvsjXO3SsKLbQ4hnqH+omxSgLFnEQSqKne 4OAW6jvRYod+YPCemQ/TSOTGJ/6krPF/e/dlHpB3S8nIt5AheDUxNwKZIwdPuFlpMEx0 pbmA== X-Gm-Message-State: AO0yUKVLilNwNiDl6d4iIc3zd6xb2NFQATDLnGTd8s9gRs4z9l4TBrqd nL0Rh+kP6C+KRZw0yUJQns0tSTG3TM/OIA== X-Google-Smtp-Source: AK7set95a/Lr4WRCz6etAzrO2o9yw0dIMP2cMTPnYzGUydhRru7AH7yjyZnrz12aus/EdtZBya6VlQ== X-Received: by 2002:a05:600c:747:b0:3dc:5823:d6c0 with SMTP id j7-20020a05600c074700b003dc5823d6c0mr3303620wmn.6.1677145261987; Thu, 23 Feb 2023 01:41:01 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id c22-20020a7bc856000000b003e01493b136sm10703294wml.43.2023.02.23.01.41.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:41:01 -0800 (PST) From: luca.boccassi@gmail.com To: Bruce Richardson Cc: Cristian Dumitrescu , dpdk stable Subject: patch 'examples/qos_sched: fix Tx port config when link down' has been queued to stable release 20.11.8 Date: Thu, 23 Feb 2023 09:37:15 +0000 Message-Id: <20230223093715.3926893-71-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.8 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/25/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/66cce69e5c34aea0db9d5e34d44206b26c261dac Thanks. Luca Boccassi --- >From 66cce69e5c34aea0db9d5e34d44206b26c261dac Mon Sep 17 00:00:00 2001 From: Bruce Richardson 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 Acked-by: Cristian Dumitrescu --- 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 33e8a75526..c6310fc374 100644 --- a/examples/qos_sched/init.c +++ b/examples/qos_sched/init.c @@ -387,6 +387,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); @@ -417,6 +419,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.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 09:36:31.154440596 +0000 +++ 0071-examples-qos_sched-fix-Tx-port-config-when-link-down.patch 2023-02-23 09:36:28.354172297 +0000 @@ -1 +1 @@ -From 665b49c51639a10c553433bc2bcd85c7331c631e Mon Sep 17 00:00:00 2001 +From 66cce69e5c34aea0db9d5e34d44206b26c261dac Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 665b49c51639a10c553433bc2bcd85c7331c631e ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index d28350e14a..7a27c03b64 100644 +index 33e8a75526..c6310fc374 100644 @@ -22 +23 @@ -@@ -328,6 +328,8 @@ int app_init(void) +@@ -387,6 +387,8 @@ int app_init(void) @@ -31 +32 @@ -@@ -358,6 +360,14 @@ int app_init(void) +@@ -417,6 +419,14 @@ int app_init(void)