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 <jiawe...@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.

Reply via email to