]> git.droids-corp.org - dpdk.git/commitdiff
app/testpmd: check starting port is not in bonding
authorMin Hu (Connor) <humin29@huawei.com>
Thu, 17 Feb 2022 11:36:55 +0000 (19:36 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 17 Feb 2022 12:35:31 +0000 (13:35 +0100)
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: 0e545d3047fe ("app/testpmd: check stopping port is not in bonding")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/testpmd.c

index 6d2e52c7905f006c095699bf12e10ab1b43f9fb9..fe2ce19f9962fbd73072d98d56306ee7d2734f95 100644 (file)
@@ -2726,6 +2726,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 (port->port_status == RTE_PORT_STOPPED)