From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <thomas@monjalon.net>
Subject: [dpdk-dev] [PATCH] examples/kni: add dev close step when kni free
Date: Tue, 14 Sep 2021 14:02:19 +0800 [thread overview]
Message-ID: <20210914060219.45890-1-humin29@huawei.com> (raw)
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 --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;
}
--
2.33.0
next reply other threads:[~2021-09-14 6:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 6:02 Min Hu (Connor) [this message]
2021-09-21 7:48 ` Ferruh Yigit
2021-10-06 14:52 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210914060219.45890-1-humin29@huawei.com \
--to=humin29@huawei.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).