Skip to content

Commit

Permalink
app/testpmd: check starting port is not in bonding
Browse files Browse the repository at this point in the history
[ upstream commit d8c079a ]

In bond, start or stop slave port should be operated by bonding port.
This patch add port_is_bonding_slave in start_port function.

Fixes: 0e545d3 ("app/testpmd: check stopping port is not in bonding")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  • Loading branch information
hushenggitcount authored and bluca committed Feb 28, 2022
1 parent f85bba1 commit 85ec941
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/test-pmd/testpmd.c
Expand Up @@ -2442,6 +2442,13 @@ start_port(portid_t pid)
if (pid != pi && pid != (portid_t)RTE_PORT_ALL)
continue;

if (port_is_bonding_slave(pi)) {
fprintf(stderr,
"Please remove port %d from bonded device.\n",
pi);
continue;
}

need_check_link_status = 0;
port = &ports[pi];
if (rte_atomic16_cmpset(&(port->port_status), RTE_PORT_STOPPED,
Expand Down

0 comments on commit 85ec941

Please sign in to comment.