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 ACD0AA0542 for ; Fri, 11 Nov 2022 11:34:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8248427F2; Fri, 11 Nov 2022 11:34:18 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id D14DD42D11 for ; Fri, 11 Nov 2022 11:34:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668162857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9axm0EK/TrTnv4xyyMk/6+s0pG9yTDf6bqb3GxA9tqo=; b=RT4tNU+7O9wC7H5/Tl5KRkc/vdLaRrjzDQZDwcNDa8HVtNxgxHBu6HXS313nO6Y0U5ieNt pApu/CfGT47JAq2uN0urvsyaVjfXxbsfg3sLXoF9jI+CWMjGjnRAbbUGar6AhC4PCrmN1t lHvTKpVTYA2EIjmhkz7UnEcTH4SiJr4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-157-pinFkCjaPt-MZ2zrAajumQ-1; Fri, 11 Nov 2022 05:34:15 -0500 X-MC-Unique: pinFkCjaPt-MZ2zrAajumQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8743F3850E8B; Fri, 11 Nov 2022 10:34:15 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.195.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 76341200E28D; Fri, 11 Nov 2022 10:34:14 +0000 (UTC) From: Kevin Traynor To: Qiming Yang Cc: Aman Singh , dpdk stable Subject: patch 'app/testpmd: skip port reset in secondary process' has been queued to stable release 21.11.3 Date: Fri, 11 Nov 2022 10:32:57 +0000 Message-Id: <20221111103337.307408-7-ktraynor@redhat.com> In-Reply-To: <20221111103337.307408-1-ktraynor@redhat.com> References: <20221111103337.307408-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/14/22. 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/3eec40cfc981278998310420c6816adddc3b0007 Thanks. Kevin --- >From 3eec40cfc981278998310420c6816adddc3b0007 Mon Sep 17 00:00:00 2001 From: Qiming Yang Date: Wed, 12 Oct 2022 07:43:59 +0000 Subject: [PATCH] app/testpmd: skip port reset in secondary process [ upstream commit e9351eaa4c457d5e4acd44efb0c36185c0350229 ] As stop action has been forbidden in secondary process, so the reset action should also not be allowed. Fixes: a550baf24af9 ("app/testpmd: support multi-process") Signed-off-by: Qiming Yang Acked-by: Aman Singh --- app/test-pmd/testpmd.c | 18 ++++++++++-------- doc/guides/testpmd_app_ug/run_app.rst | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 3699c5fd64..3a8eef48e4 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -3337,12 +3337,14 @@ reset_port(portid_t pid) } - diag = rte_eth_dev_reset(pi); - if (diag == 0) { - port = &ports[pi]; - port->need_reconfig = 1; - port->need_reconfig_queues = 1; - } else { - fprintf(stderr, "Failed to reset port %d. diag=%d\n", - pi, diag); + if (is_proc_primary()) { + diag = rte_eth_dev_reset(pi); + if (diag == 0) { + port = &ports[pi]; + port->need_reconfig = 1; + port->need_reconfig_queues = 1; + } else { + fprintf(stderr, "Failed to reset port %d. diag=%d\n", + pi, diag); + } } } diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst index 30edef07ea..ccc1bd6ddb 100644 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst @@ -622,4 +622,5 @@ as follows: - ``dev_start`` - ``dev_stop`` +- ``dev_reset`` - ``rx_queue_setup`` - ``tx_queue_setup`` -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 10:32:17.274984567 +0000 +++ 0007-app-testpmd-skip-port-reset-in-secondary-process.patch 2022-11-11 10:32:17.009300506 +0000 @@ -1 +1 @@ -From e9351eaa4c457d5e4acd44efb0c36185c0350229 Mon Sep 17 00:00:00 2001 +From 3eec40cfc981278998310420c6816adddc3b0007 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e9351eaa4c457d5e4acd44efb0c36185c0350229 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index f4f1888446..aa7ea29f15 100644 +index 3699c5fd64..3a8eef48e4 100644 @@ -23 +24 @@ -@@ -3340,12 +3340,14 @@ reset_port(portid_t pid) +@@ -3337,12 +3337,14 @@ reset_port(portid_t pid) @@ -47 +48 @@ -index 876eb78ada..610e442924 100644 +index 30edef07ea..ccc1bd6ddb 100644 @@ -50 +51 @@ -@@ -601,4 +601,5 @@ as follows: +@@ -622,4 +622,5 @@ as follows: