5 #ifndef _RTE_EVENTDEV_PMD_PCI_H_
6 #define _RTE_EVENTDEV_PMD_PCI_H_
23 #include <rte_config.h>
27 #include <rte_bus_pci.h>
31 typedef int (*eventdev_pmd_pci_callback_t)(
struct rte_eventdev *dev);
39 rte_event_pmd_pci_probe(
struct rte_pci_driver *pci_drv,
40 struct rte_pci_device *pci_dev,
41 size_t private_data_size,
42 eventdev_pmd_pci_callback_t devinit)
44 struct rte_eventdev *eventdev;
46 char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN];
54 sizeof(eventdev_name));
57 pci_dev->device.numa_node);
62 eventdev->data->dev_private =
64 "eventdev private structure",
69 if (eventdev->data->dev_private == NULL)
70 rte_panic(
"Cannot allocate memzone for private "
74 eventdev->dev = &pci_dev->device;
77 retval = devinit(eventdev);
81 RTE_EDEV_LOG_ERR(
"driver %s: (vendor_id=0x%x device_id=0x%x)"
82 " failed", pci_drv->driver.name,
83 (
unsigned int) pci_dev->id.vendor_id,
84 (
unsigned int) pci_dev->id.device_id);
98 rte_event_pmd_pci_remove(
struct rte_pci_device *pci_dev,
99 eventdev_pmd_pci_callback_t devuninit)
101 struct rte_eventdev *eventdev;
102 char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN];
109 sizeof(eventdev_name));
112 if (eventdev == NULL)
121 ret = devuninit(eventdev);
128 eventdev->dev = NULL;