[v1,04/50] net/ntnic: remove extra calling of the API for release port

Message ID 20241006203728.330792-5-sil-plv@napatech.com (mailing list archive)
State Superseded
Delegated to: Ferruh Yigit
Headers
Series Provide: flow filter init API, Enable virtual queues, fix ntnic issues for release 24.07 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Serhii Iliushyk Oct. 6, 2024, 8:36 p.m. UTC
From: Oleksandr Kolomeiets <okl-plv@napatech.com>

During rte_eth_dev_close execution,
eth_dev_close function exported by ntnic is called,
followed by a call to rte_eth_dev_release_port.

Since there is no possible returns between the calls,
calling rte_eth_dev_release_port from eth_dev_close
is redundant and error-prone.

Signed-off-by: Oleksandr Kolomeiets <okl-plv@napatech.com>
---
 drivers/net/ntnic/ntnic_ethdev.c | 1 -
 1 file changed, 1 deletion(-)
  

Patch

diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c
index f351469d0a..52ca8f2844 100644
--- a/drivers/net/ntnic/ntnic_ethdev.c
+++ b/drivers/net/ntnic/ntnic_ethdev.c
@@ -383,7 +383,6 @@  eth_dev_close(struct rte_eth_dev *eth_dev)
 
 	internals->p_drv = NULL;
 
-	rte_eth_dev_release_port(eth_dev);
 	if (p_drv) {
 		/* decrease initialized ethernet devices */
 		p_drv->n_eth_dev_init_count--;