DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/kni: add dev close step when kni free
@ 2021-09-14  6:02 Min Hu (Connor)
  2021-09-21  7:48 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Min Hu (Connor) @ 2021-09-14  6:02 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, thomas

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/kni: add dev close step when kni free
  2021-09-14  6:02 [dpdk-dev] [PATCH] examples/kni: add dev close step when kni free Min Hu (Connor)
@ 2021-09-21  7:48 ` Ferruh Yigit
  2021-10-06 14:52   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2021-09-21  7:48 UTC (permalink / raw)
  To: Min Hu (Connor), dev; +Cc: thomas

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/kni: add dev close step when kni free
  2021-09-21  7:48 ` Ferruh Yigit
@ 2021-10-06 14:52   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2021-10-06 14:52 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: dev, Ferruh Yigit

21/09/2021 09:48, Ferruh Yigit:
> 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>
> 
> 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

Applied, with suggested title, thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-06 14:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14  6:02 [dpdk-dev] [PATCH] examples/kni: add dev close step when kni free Min Hu (Connor)
2021-09-21  7:48 ` Ferruh Yigit
2021-10-06 14:52   ` Thomas Monjalon

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).