aboutsummaryrefslogtreecommitdiffstats
path: root/app/pdump/main.c
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2019-04-15 14:36:48 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2019-04-16 08:38:15 +0200
commit0b6b37f6a2ee1764e8912fe9f57dd4ed2baadecd (patch)
treee9c4dd16e978e7b5c4f59efb8a63fe110786592b /app/pdump/main.c
parentba7d9829e24a32d31b31f5816e8b9a3a8799ba68 (diff)
New upstream version 18.11.1
Change-Id: I2394f61ba94cc575bf2c55186f14e5d6fba9eec7 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'app/pdump/main.c')
-rw-r--r--app/pdump/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/pdump/main.c b/app/pdump/main.c
index 9e86bf62..5e183ea9 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -494,6 +494,7 @@ cleanup_pdump_resources(void)
{
int i;
struct pdump_tuples *pt;
+ char name[RTE_ETH_NAME_MAX_LEN];
/* disable pdump and free the pdump_tuple resources */
for (i = 0; i < num_tuples; i++) {
@@ -510,6 +511,14 @@ cleanup_pdump_resources(void)
free_ring_data(pt->rx_ring, pt->rx_vdev_id, &pt->stats);
if (pt->dir & RTE_PDUMP_FLAG_TX)
free_ring_data(pt->tx_ring, pt->tx_vdev_id, &pt->stats);
+
+ /* Remove the vdev created */
+ rte_eth_dev_get_name_by_port(pt->rx_vdev_id, name);
+ rte_eal_hotplug_remove("vdev", name);
+
+ rte_eth_dev_get_name_by_port(pt->tx_vdev_id, name);
+ rte_eal_hotplug_remove("vdev", name);
+
}
cleanup_rings();
}