5 #ifndef _RTE_EVENTDEV_PMD_PCI_H_ 6 #define _RTE_EVENTDEV_PMD_PCI_H_ 27 #include <rte_config.h> 31 #include <rte_bus_pci.h> 35 typedef int (*eventdev_pmd_pci_callback_t)(
struct rte_eventdev *dev);
45 rte_event_pmd_pci_probe_named(
struct rte_pci_driver *pci_drv,
46 struct rte_pci_device *pci_dev,
47 size_t private_data_size,
48 eventdev_pmd_pci_callback_t devinit,
51 struct rte_eventdev *eventdev;
58 pci_dev->device.numa_node);
63 eventdev->data->dev_private =
65 "eventdev private structure",
70 if (eventdev->data->dev_private == NULL)
71 rte_panic(
"Cannot allocate memzone for private " 75 eventdev->dev = &pci_dev->device;
78 retval = devinit(eventdev);
82 RTE_EDEV_LOG_ERR(
"driver %s: (vendor_id=0x%x device_id=0x%x)" 83 " failed", pci_drv->driver.name,
84 (
unsigned int) pci_dev->id.vendor_id,
85 (
unsigned int) pci_dev->id.device_id);
98 rte_event_pmd_pci_probe(
struct rte_pci_driver *pci_drv,
99 struct rte_pci_device *pci_dev,
100 size_t private_data_size,
101 eventdev_pmd_pci_callback_t devinit)
103 char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN];
106 sizeof(eventdev_name));
108 return rte_event_pmd_pci_probe_named(pci_drv,
121 rte_event_pmd_pci_remove(
struct rte_pci_device *pci_dev,
122 eventdev_pmd_pci_callback_t devuninit)
124 struct rte_eventdev *eventdev;
125 char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN];
132 sizeof(eventdev_name));
135 if (eventdev == NULL)
146 ret = devuninit(eventdev);
153 eventdev->dev = NULL;
enum rte_proc_type_t rte_eal_process_type(void)
int rte_event_pmd_release(struct rte_eventdev *eventdev)
unsigned int rte_socket_id(void)
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)
int rte_event_dev_close(uint8_t dev_id)
void * rte_zmalloc_socket(const char *type, size_t size, unsigned align, int socket) __rte_alloc_size(2)
void rte_pci_device_name(const struct rte_pci_addr *addr, char *output, size_t size)