[dpdk-stable] patch 'app/testpmd: fix slave port detection' has been queued to LTS release 16.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 15 19:19:15 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 16.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/16/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 07a97d39c9b85868a66b27eb3fd6b3a0e815db8e Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan at mellanox.com>
Date: Wed, 28 Mar 2018 11:17:53 +0000
Subject: [PATCH] app/testpmd: fix slave port detection

[ upstream commit b8b8b344cb44bea46ac1d2037e8e5f1e742319f6 ]

Testpmd allows to create and control bonding devices by run time
command lines using the bonding PMD API.

Some bonding device slaves operations (close, stop, etc) should not be
used by the application and must be managed by the bonding PMD.

Thus, Testpmd manages slave flags to prevent the special operations
calls and when a slave is added to bonding device by a run time command
line, the flag is set.

There is one more way to define the slaves for a bonding device using
EAL command line and Testpmd doesn't set the slave flag in this case
what causes to the special operations to be called by Testpmd.

Add one more check to detect bonding slave device.

Fixes: 41b05095c4d1 ("app/testpmd: fix bonding start")
Fixes: 0e545d3047fe ("app/testpmd: check stopping port is not in bonding")

Signed-off-by: Matan Azrad <matan at mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger at intel.com>
---
 app/test-pmd/testpmd.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 9de01fed2..9313d0bbc 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1857,7 +1857,10 @@ uint8_t port_is_bonding_slave(portid_t slave_pid)
 	struct rte_port *port;
 
 	port = &ports[slave_pid];
-	return port->slave_flag;
+	if ((rte_eth_devices[slave_pid].data->dev_flags &
+	    RTE_ETH_DEV_BONDED_SLAVE) || (port->slave_flag == 1))
+		return 1;
+	return 0;
 }
 
 const uint16_t vlan_tags[] = {
-- 
2.14.2



More information about the stable mailing list