app/testpmd: drop the workaround for virtio-user

The RTE_ETH_DEV_CLOSE_REMOVE support has been enabled in
virtio-user, private resources for the port will be freed
by rte_eth_dev_close(), so there is no need to have this
workaround anymore.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
Tiwei Bie 2019-06-05 17:43:42 +08:00 committed by Ferruh Yigit
parent 7f468b2ebf
commit 08505c6f41

View File

@ -2478,7 +2478,6 @@ detach_port_device(portid_t port_id)
void
pmd_test_exit(void)
{
struct rte_device *device;
portid_t pt_id;
int ret;
int i;
@ -2504,18 +2503,6 @@ pmd_test_exit(void)
printf("\nShutting down port %d...\n", pt_id);
fflush(stdout);
close_port(pt_id);
/*
* This is a workaround to fix a virtio-user issue that
* requires to call clean-up routine to remove existing
* socket.
* This workaround valid only for testpmd, needs a fix
* valid for all applications.
* TODO: Implement proper resource cleanup
*/
device = rte_eth_devices[pt_id].device;
if (device && !strcmp(device->driver->name, "net_virtio_user"))
detach_port_device(pt_id);
}
}