[dpdk-dev] [PATCH v2 01/17] net/txgbe: add ethdev probe and remove for VF device

Ferruh Yigit ferruh.yigit at intel.com
Wed Feb 24 12:39:58 CET 2021


On 2/5/2021 3:34 AM, Jiawen Wu wrote:
> Introduce virtual function driver in txgbe PMD,
> add simple init and uninit function to probe and remove the device.
> 
> Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>

<...>

> +static int
> +txgbevf_dev_close(struct rte_eth_dev *dev)
> +{
> +	PMD_INIT_FUNC_TRACE();
> +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
> +		return 0;
> +
> +	dev->dev_ops = NULL;
> +

Many APIs access to 'dev->dev_ops->X' without checks, it may not be good idea to 
set it NULL before the port is released.


More information about the dev mailing list