diff mbox series

[09/10] kni: add rte_kni_free to KNI vdev driver

Message ID 20180628225503.21579-1-dg@adax.com (mailing list archive)
State Superseded, archived
Headers show
Series kni: Interface detach and link status fixes. | expand

Checks

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

Commit Message

Dan Gora June 28, 2018, 10:55 p.m. UTC
Add rte_kni_free to the virual KNI device.

Signed-off-by: Dan Gora <dg@adax.com>
---
 drivers/net/kni/rte_eth_kni.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index ab63ea427..24c6991e6 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -463,11 +463,13 @@  eth_kni_remove(struct rte_vdev_device *vdev)
 	if (eth_dev == NULL)
 		return -1;
 
-	eth_kni_dev_stop(eth_dev);
-
 	internals = eth_dev->data->dev_private;
 	rte_kni_release(internals->kni);
 
+	eth_kni_dev_stop(eth_dev);
+
+	rte_kni_free(internals->kni);
+
 	rte_free(internals);
 
 	rte_eth_dev_release_port(eth_dev);