[dpdk-dev] [PATCH v2 2/2] app/testpmd: fix link speed for a specified port
Min Hu (Connor)
humin29 at huawei.com
Wed Apr 28 10:36:59 CEST 2021
From: Huisong Li <lihuisong at 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 at dpdk.org
Signed-off-by: Huisong Li <lihuisong at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at 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
More information about the dev
mailing list