[dpdk-dev] [PATCH 5/6] app/testpmd: fix removed device link status asking

Matan Azrad matan at mellanox.com
Thu May 3 12:31:47 CEST 2018


In the RMV device event callback, there is a call for the removed
device stop operation which trigers a link status operation for the
removed device.

It may casue an error from the removed device PMD.

Skip the link status operation in the above described case.

Fixes: 284c908cc588 ("app/testpmd: request device removal interrupt")
Cc: stable at dpdk.org

Signed-off-by: Matan Azrad <matan at mellanox.com>
---
 app/test-pmd/testpmd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 35f97f0..33a9e96 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2096,13 +2096,16 @@ struct pmd_test_command {
 static void
 rmv_event_callback(void *arg)
 {
+	int org_no_link_check = no_link_check;
 	struct rte_eth_dev *dev;
 	portid_t port_id = (intptr_t)arg;
 
 	RTE_ETH_VALID_PORTID_OR_RET(port_id);
 	dev = &rte_eth_devices[port_id];
 
+	no_link_check = 1;
 	stop_port(port_id);
+	no_link_check = org_no_link_check;
 	close_port(port_id);
 	printf("removing device %s\n", dev->device->name);
 	if (rte_eal_dev_detach(dev->device))
-- 
1.9.5



More information about the dev mailing list