net/nfp: fix coredump problem when testpmd exit

Message ID 20231017023730.421385-1-chaoyong.he@corigine.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/nfp: fix coredump problem when testpmd exit |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-amd64-testing fail Testing issues
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS

Commit Message

Chaoyong He Oct. 17, 2023, 2:37 a.m. UTC
  The ".dev_close" should not call rte_eth_dev_release_port() API
directly, the rte_eth_dev_close() API will do it.

Fixes: 831c44ab7869 ("net/nfp: add flower PF related routines")
Cc: chaoyong.he@corigine.com
Cc: stable@dpdk.org

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower.c | 2 --
 drivers/net/nfp/nfp_ethdev.c        | 1 -
 2 files changed, 3 deletions(-)
  

Comments

Ferruh Yigit Oct. 17, 2023, 1:57 p.m. UTC | #1
On 10/17/2023 3:37 AM, Chaoyong He wrote:
> The ".dev_close" should not call rte_eth_dev_release_port() API
> directly, the rte_eth_dev_close() API will do it.
> 
> Fixes: 831c44ab7869 ("net/nfp: add flower PF related routines")
> Cc: chaoyong.he@corigine.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Long Wu <long.wu@corigine.com>
> Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
> 

Applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index 0c54d7ed27..60d843451e 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -221,8 +221,6 @@  nfp_flower_pf_close(struct rte_eth_dev *dev)
 
 	nn_cfg_writeb(hw, NFP_NET_CFG_LSC, 0xff);
 
-	rte_eth_dev_release_port(dev);
-
 	/* Now it is safe to free all PF resources */
 	PMD_DRV_LOG(INFO, "Freeing PF resources");
 	nfp_cpp_area_free(pf_dev->ctrl_area);
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 20940072fe..d32a82210c 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -286,7 +286,6 @@  nfp_net_close(struct rte_eth_dev *dev)
 	/* Mark this port as unused and free device priv resources */
 	nn_cfg_writeb(hw, NFP_NET_CFG_LSC, 0xff);
 	app_fw_nic->ports[hw->idx] = NULL;
-	rte_eth_dev_release_port(dev);
 
 	for (i = 0; i < app_fw_nic->total_phyports; i++) {
 		/* Check to see if ports are still in use */