32 #ifndef _RTE_EVENTDEV_PMD_H_
33 #define _RTE_EVENTDEV_PMD_H_
58 #define RTE_EDEV_LOG_ERR(...) \
59 RTE_LOG(ERR, EVENTDEV, \
60 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
61 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
63 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
64 #define RTE_EDEV_LOG_DEBUG(...) \
65 RTE_LOG(DEBUG, EVENTDEV, \
66 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
67 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
69 #define RTE_EDEV_LOG_DEBUG(...) (void)0
73 #define RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, retval) do { \
74 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
75 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
80 #define RTE_EVENTDEV_VALID_DEVID_OR_RET(dev_id) do { \
81 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
82 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
87 #define RTE_EVENTDEV_DETACHED (0)
88 #define RTE_EVENTDEV_ATTACHED (1)
151 extern struct rte_eventdev *rte_eventdevs;
163 static inline struct rte_eventdev *
166 struct rte_eventdev *dev;
172 for (i = 0; i < RTE_EVENT_MAX_DEVS; i++) {
173 dev = &rte_eventdevs[i];
174 if ((dev->attached == RTE_EVENTDEV_ATTACHED) &&
175 (strcmp(dev->data->name, name) == 0))
191 static inline unsigned
194 struct rte_eventdev *dev;
196 if (dev_id >= RTE_EVENT_MAX_DEVS)
199 dev = &rte_eventdevs[
dev_id];
200 if (dev->attached != RTE_EVENTDEV_ATTACHED)
372 const uint8_t queues[],
const uint8_t priorities[],
392 uint8_t queues[], uint16_t nb_unlinks);
409 uint64_t ns, uint64_t *timeout_ticks);
438 const unsigned int ids[], uint64_t values[],
unsigned int n);
445 int16_t queue_port_id,
446 const uint32_t ids[],
467 unsigned int *ids,
unsigned int size);
485 const char *name,
unsigned int *id);
539 struct rte_eventdev *
567 struct rte_eventdev *