25/09/2020 06:17, Rasesh Mody:
> Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private resources
> for the port can be freed by rte_eth_dev_close(). With this change the
> private port resources are released in the .dev_close callback.
> 
> Signed-off-by: Rasesh Mody <rm...@marvell.com>
> ---
>  static int eth_bnx2x_dev_uninit(struct rte_eth_dev *eth_dev)
>  {
> -     /* mac_addrs must not be freed alone because part of dev_private */
> -     eth_dev->data->mac_addrs = NULL;
> +     struct bnx2x_softc *sc = eth_dev->data->dev_private;
> +
> +     PMD_INIT_FUNC_TRACE(sc);
> +
> +     /* only uninitialize in the primary process */
> +     if (rte_eal_process_type() != RTE_PROC_PRIMARY)
> +             return 0;
> +
> +     bnx2x_dev_close(eth_dev);

The check for primary process should be in the close function.

About the title, I would suggest net/bnx2x: release port upon close


Reply via email to