net/nfp: fix coredump problem when testpmd exit
Checks
Commit Message
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
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.
@@ -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);
@@ -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 */