[5/5] app/testpmd: drop the workaround for virtio-user

Message ID 20190605094342.17563-6-tiwei.bie@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series virtio: release port upon close |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Tiwei Bie June 5, 2019, 9:43 a.m. UTC
  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>
---
 app/test-pmd/testpmd.c | 13 -------------
 1 file changed, 13 deletions(-)
  

Comments

Maxime Coquelin June 17, 2019, 2:44 p.m. UTC | #1
On 6/5/19 11:43 AM, Tiwei Bie wrote:
> 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>
> ---
>   app/test-pmd/testpmd.c | 13 -------------
>   1 file changed, 13 deletions(-)

Great!

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 4f2a431e4..281f31c08 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2456,7 +2456,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;
@@ -2482,18 +2481,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);
 		}
 	}