From: Huisong Li Date: Tue, 14 Sep 2021 06:02:19 +0000 (+0800) Subject: examples/kni: close port before exit X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=44fe9bd8e467201e3924b4330eaec27734676f6e;p=dpdk.git examples/kni: close port before exit This patch adds dev_close() step to release network adapter resources when kni free. Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) Acked-by: Ferruh Yigit --- 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; }