examples/kni: add dev close step when kni free
PATCH 1/1 examples/kni: add dev close step when kni free
From: Huisong Li <[email protected]>
This patch adds dev_close() step to release network adapter resources when kni free.
--- examples/kni/main.c | 1 + 1 file changed, 1 insertion(+)
examples/kni/main.c +1 -0
@@ -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 ; }
Signature · 1 line
2.33.0
Quoted 17 lines · Min Hu (Connor)
From: Huisong Li <[email protected]>
This patch adds
dev_close()step to release network adapter resources when kni free.Signed-off-by Huisong Li <[email protected]>Signed-off-by Min Hu (Connor) <[email protected]>--- examples/kni/main.c | 1 + 1 file changed, 1 insertion(+)examples/kni/main.c +0
-0
examples/kni/main.c kni_free_kni(uint16_t port_id) · line 1037
Quoted 7 lines
examples/kni/main.c +1
-0@@ -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 ; }
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
Thomas Monjalon
Applied21/09/2021 09:48, Ferruh Yigit:
Quoted 6 lines · Min Hu (Connor)
Quoted 5 lines
From: Huisong Li <[email protected]>
This patch adds
dev_close()step to release network adapter resources when kni free.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Huisong Li <[email protected]>Signed-off-by Min Hu (Connor) <[email protected]>Acked-by Ferruh Yigit <[email protected]>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.