DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "Min Hu (Connor)" <humin29@huawei.com>, <dev@dpdk.org>
Cc: <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH] examples/kni: add dev close step when kni free
Date: Tue, 21 Sep 2021 08:48:04 +0100	[thread overview]
Message-ID: <ba8fc7e1-40f0-f0dd-2310-32eb81b1b90b@intel.com> (raw)
In-Reply-To: <20210914060219.45890-1-humin29@huawei.com>

On 9/14/2021 7:02 AM, Min Hu (Connor) wrote:
> 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;
>  }
> 

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Closing the port not directly related to the 'kni free', just both done before
exiting the app, so I would update the patch title to something like:
examples/kni: close port before exit

  reply	other threads:[~2021-09-21  7:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14  6:02 Min Hu (Connor)
2021-09-21  7:48 ` Ferruh Yigit [this message]
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=ba8fc7e1-40f0-f0dd-2310-32eb81b1b90b@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=humin29@huawei.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).