The port was not validated before detaching.
Ignore port detach operation when the port is not valid.
Fixes:
f8e5baa2662d ("app/testpmd: check not detaching device twice")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
printf("Removing a device...\n");
+ if (port_id_is_invalid(port_id, ENABLED_WARN))
+ return;
+
dev = rte_eth_devices[port_id].device;
if (dev == NULL) {
printf("Device already removed\n");