diff mbox series

examples/kni: add dev close step when kni free

Message ID 20210914060219.45890-1-humin29@huawei.com (mailing list archive)
State New
Delegated to: Ferruh Yigit
Headers show
Series examples/kni: add dev close step when kni free | expand


Context Check Description
ci/iol-aarch64-compile-testing success Testing PASS
ci/intel-Testing fail Testing issues
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/checkpatch success coding style OK

Commit Message

Min Hu (Connor) Sept. 14, 2021, 6:02 a.m. UTC
From: Huisong Li <lihuisong@huawei.com>

This patch adds dev_close() step to release network adapter resources
when kni free.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
 examples/kni/main.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


diff --git a/examples/kni/main.c b/examples/kni/main.c
index beabb3c848..2a993a0ca4 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -1031,6 +1031,7 @@  kni_free_kni(uint16_t port_id)
 	if (ret != 0)
 		RTE_LOG(ERR, APP, "Failed to stop port %d: %s\n",
 			port_id, rte_strerror(-ret));
+	rte_eth_dev_close(port_id);
 	return 0;