if (eventdev == NULL)
return -EINVAL;
- ret = rte_event_dev_close(eventdev->data->dev_id);
- if (ret < 0)
- return ret;
-
eventdev->attached = RTE_EVENTDEV_DETACHED;
eventdev_globals.nb_devs--;
int
rte_event_pmd_vdev_uninit(const char *name)
{
+ int ret;
struct rte_eventdev *eventdev;
if (name == NULL)
if (eventdev == NULL)
return -ENODEV;
+ ret = rte_event_dev_close(eventdev->data->dev_id);
+ if (ret < 0)
+ return ret;
+
/* Free the event device */
rte_event_pmd_release(eventdev);
(unsigned int) pci_dev->id.vendor_id,
(unsigned int) pci_dev->id.device_id);
- if (rte_eal_process_type() == RTE_PROC_PRIMARY)
- rte_free(eventdev->data->dev_private);
-
- eventdev->attached = RTE_EVENTDEV_DETACHED;
- eventdev_globals.nb_devs--;
+ rte_event_pmd_release(eventdev);
return -ENXIO;
}
if (eventdev == NULL)
return -ENODEV;
+ ret = rte_event_dev_close(eventdev->data->dev_id);
+ if (ret < 0)
+ return ret;
+
/* Invoke PMD device un-init function */
if (devuninit)
ret = devuninit(eventdev);