32 #ifndef _RTE_EVENTDEV_PMD_PCI_H_
33 #define _RTE_EVENTDEV_PMD_PCI_H_
50 #include <rte_config.h>
54 #include <rte_bus_pci.h>
58 typedef int (*eventdev_pmd_pci_callback_t)(
struct rte_eventdev *dev);
66 rte_event_pmd_pci_probe(
struct rte_pci_driver *pci_drv,
67 struct rte_pci_device *pci_dev,
68 size_t private_data_size,
69 eventdev_pmd_pci_callback_t devinit)
71 struct rte_eventdev *eventdev;
73 char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN];
81 sizeof(eventdev_name));
84 pci_dev->device.numa_node);
89 eventdev->data->dev_private =
91 "eventdev private structure",
96 if (eventdev->data->dev_private == NULL)
97 rte_panic(
"Cannot allocate memzone for private "
101 eventdev->dev = &pci_dev->device;
104 retval = devinit(eventdev);
108 RTE_EDEV_LOG_ERR(
"driver %s: (vendor_id=0x%x device_id=0x%x)"
109 " failed", pci_drv->driver.name,
110 (
unsigned int) pci_dev->id.vendor_id,
111 (
unsigned int) pci_dev->id.device_id);
125 rte_event_pmd_pci_remove(
struct rte_pci_device *pci_dev,
126 eventdev_pmd_pci_callback_t devuninit)
128 struct rte_eventdev *eventdev;
129 char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN];
136 sizeof(eventdev_name));
139 if (eventdev == NULL)
148 ret = devuninit(eventdev);
155 eventdev->dev = NULL;
enum rte_proc_type_t rte_eal_process_type(void)
int rte_event_pmd_release(struct rte_eventdev *eventdev)
struct rte_eventdev * rte_event_pmd_allocate(const char *name, int socket_id)
static struct rte_eventdev * rte_event_pmd_get_named_dev(const char *name)
void * rte_zmalloc_socket(const char *type, size_t size, unsigned align, int socket)
int rte_event_dev_close(uint8_t dev_id)
void rte_pci_device_name(const struct rte_pci_addr *addr, char *output, size_t size)
unsigned rte_socket_id(void)