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)
123 ret = devuninit(eventdev);
130 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)