Skip to contentSkip to conversation

app/testpmd: check starting port is not in bonding

PATCH Applied Min Hu (Connor) 2 participants 2 messages Feb 17, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/testpmd: check starting port is not in bonding

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")
---
 app/test-pmd/testpmd.c | 7 +++++++
 1 file changed, 7 insertions(+)
app/test-pmd/testpmd.c +7 -0
index 6d2e52c790..fe2ce19f99 100644
@@ -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)
Signature · 1 line
2.33.0