[dpdk-dev] [PATCH v4 10/24] net/ixgbe: enable port detach on secondary process

Remy Horton remy.horton at intel.com
Tue Jun 26 12:35:45 CEST 2018


On 26/06/2018 08:08, Qi Zhang wrote:
[..]
>  static int eth_ixgbevf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
>  	struct rte_pci_device *pci_dev)
>  {
> +	struct rte_eth_dev *ethdev;
> +
> +	ethdev = rte_eth_dev_allocated(pci_dev->device.name);
> +	if (!ethdev)
> +		return -ENODEV;
> +
> +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
> +		return rte_eth_dev_release_port_private(ethdev);
> +
>  	return rte_eth_dev_pci_generic_probe(pci_dev,
>  		sizeof(struct ixgbe_adapter), eth_ixgbevf_dev_init);
>  }
>

Is calling of rte_eth_dev_release_port_private() from the probe function 
intentional? To me it looks like the code has been pasted into the wrong 
place..



More information about the dev mailing list