32 #ifndef _RTE_EVENTDEV_PMD_H_
33 #define _RTE_EVENTDEV_PMD_H_
57 #define RTE_EDEV_LOG_ERR(...) \
58 RTE_LOG(ERR, EVENTDEV, \
59 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
60 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
62 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
63 #define RTE_EDEV_LOG_DEBUG(...) \
64 RTE_LOG(DEBUG, EVENTDEV, \
65 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
66 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
68 #define RTE_EDEV_LOG_DEBUG(...) (void)0
72 #define RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, retval) do { \
73 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
74 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
79 #define RTE_EVENTDEV_VALID_DEVID_OR_RET(dev_id) do { \
80 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
81 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
86 #define RTE_EVENTDEV_DETACHED (0)
87 #define RTE_EVENTDEV_ATTACHED (1)
96 extern struct rte_eventdev *rte_eventdevs;
108 static inline struct rte_eventdev *
111 struct rte_eventdev *dev;
117 for (i = 0; i < RTE_EVENT_MAX_DEVS; i++) {
118 dev = &rte_eventdevs[i];
119 if ((dev->attached == RTE_EVENTDEV_ATTACHED) &&
120 (strcmp(dev->data->name, name) == 0))
136 static inline unsigned
139 struct rte_eventdev *dev;
141 if (dev_id >= RTE_EVENT_MAX_DEVS)
144 dev = &rte_eventdevs[dev_id];
145 if (dev->attached != RTE_EVENTDEV_ATTACHED)
317 const uint8_t queues[],
const uint8_t priorities[],
337 uint8_t queues[], uint16_t nb_unlinks);
354 uint64_t ns, uint64_t *timeout_ticks);
383 const unsigned int ids[], uint64_t values[],
unsigned int n);
390 int16_t queue_port_id,
391 const uint32_t ids[],
412 unsigned int *ids,
unsigned int size);
430 const char *name,
unsigned int *id);
484 struct rte_eventdev *