DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <xiaoyun.li@intel.com>
Subject: [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix link speed for a specified port
Date: Wed, 28 Apr 2021 16:36:59 +0800	[thread overview]
Message-ID: <1619599019-46246-3-git-send-email-humin29@huawei.com> (raw)
In-Reply-To: <1619599019-46246-1-git-send-email-humin29@huawei.com>

From: Huisong Li <lihuisong@huawei.com>

When we use the following cmd to modify the link speed of specified
port: "port config <port_id> speed xxx duplex xxx", we have to stop
all ports. It's not necessary.

Fixes: 82113036e4e5 ("ethdev: redesign link speed config")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 app/test-pmd/cmdline.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index ddbc629..6d80d98 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1649,13 +1649,13 @@ cmd_config_speed_specific_parsed(void *parsed_result,
 	uint32_t link_speed;
 	int ret;
 
-	if (!all_ports_stopped()) {
-		printf("Please stop all ports first\n");
+	if (port_id_is_invalid(res->id, ENABLED_WARN))
 		return;
-	}
 
-	if (port_id_is_invalid(res->id, ENABLED_WARN))
+	if (!port_is_stopped(res->id)) {
+		printf("Please stop port %d first\n", res->id);
 		return;
+	}
 
 	if (parse_and_check_speed_duplex(res->value1, res->value2,
 			&link_speed) < 0)
-- 
2.7.4


  parent reply	other threads:[~2021-04-28  8:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19  6:21 [dpdk-dev] [PATCH 0/2] fixes for link speed Min Hu (Connor)
2021-04-19  6:21 ` [dpdk-dev] [PATCH 1/2] app/testpmd: add link speed check before port start Min Hu (Connor)
2021-04-20 12:11   ` Ferruh Yigit
2021-04-21  3:44     ` Min Hu (Connor)
2021-04-19  6:21 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix link speed for a specified port Min Hu (Connor)
2021-04-19 22:52   ` Ferruh Yigit
2021-04-28  8:36 ` [dpdk-dev] [PATCH v2 0/2] fixes for link speed Min Hu (Connor)
2021-04-28  8:36   ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: add link speed check before port start Min Hu (Connor)
2021-04-30  3:19     ` Li, Xiaoyun
2021-04-30  4:04       ` Huisong Li
2021-04-30  4:46         ` Li, Xiaoyun
2021-05-04  1:46           ` Huisong Li
2021-05-06  2:36             ` Li, Xiaoyun
2021-05-06  6:46               ` Huisong Li
2021-06-08 10:34       ` Andrew Rybchenko
2021-06-08 10:49     ` Andrew Rybchenko
2021-06-10  6:13       ` Huisong Li
2021-04-28  8:36   ` Min Hu (Connor) [this message]
2021-04-29  8:42     ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix link speed for a specified port Li, Xiaoyun
2021-07-02 10:02       ` Andrew Rybchenko
2021-06-08 10:29   ` [dpdk-dev] [PATCH v2 0/2] fixes for link speed Andrew Rybchenko
2021-06-10  6:19     ` Huisong Li
2021-06-28  3:25   ` Min Hu (Connor)
2021-06-29  6:24     ` Singh, Aman Deep
2021-06-29  7:31       ` Min Hu (Connor)
2021-07-02 10:05         ` Andrew Rybchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1619599019-46246-3-git-send-email-humin29@huawei.com \
    --to=humin29@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=xiaoyun.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).