5 #ifndef _RTE_EVENTDEV_PMD_H_
6 #define _RTE_EVENTDEV_PMD_H_
23 #include <rte_config.h>
31 #define RTE_EDEV_LOG_ERR(...) \
32 RTE_LOG(ERR, EVENTDEV, \
33 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
34 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
36 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
37 #define RTE_EDEV_LOG_DEBUG(...) \
38 RTE_LOG(DEBUG, EVENTDEV, \
39 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
40 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
42 #define RTE_EDEV_LOG_DEBUG(...) (void)0
46 #define RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, retval) do { \
47 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
48 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
53 #define RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, errno, retval) do { \
54 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
55 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
61 #define RTE_EVENTDEV_VALID_DEVID_OR_RET(dev_id) do { \
62 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
63 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
68 #define RTE_EVENT_ETH_RX_ADAPTER_SW_CAP \
69 ((RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID) | \
70 (RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ))
76 #define RTE_EVENTDEV_DETACHED (0)
77 #define RTE_EVENTDEV_ATTACHED (1)
88 extern struct rte_eventdev *rte_eventdevs;
100 static inline struct rte_eventdev *
103 struct rte_eventdev *dev;
109 for (i = 0; i < RTE_EVENT_MAX_DEVS; i++) {
110 dev = &rte_eventdevs[i];
111 if ((dev->attached == RTE_EVENTDEV_ATTACHED) &&
112 (strcmp(dev->data->name, name) == 0))
128 static inline unsigned
131 struct rte_eventdev *dev;
133 if (dev_id >= RTE_EVENT_MAX_DEVS)
136 dev = &rte_eventdevs[dev_id];
137 if (dev->attached != RTE_EVENTDEV_ATTACHED)
309 const uint8_t queues[],
const uint8_t priorities[],
329 uint8_t queues[], uint16_t nb_unlinks);
346 uint64_t ns, uint64_t *timeout_ticks);
375 const unsigned int ids[], uint64_t values[],
unsigned int n);
382 int16_t queue_port_id,
383 const uint32_t ids[],
404 unsigned int *ids,
unsigned int size);
422 const char *name,
unsigned int *id);
445 (
const struct rte_eventdev *dev,
446 const struct rte_eth_dev *eth_dev,
474 const struct rte_eventdev *dev,
475 const struct rte_eth_dev *eth_dev,
499 (
const struct rte_eventdev *dev,
500 const struct rte_eth_dev *eth_dev,
501 int32_t rx_queue_id);
520 (
const struct rte_eventdev *dev,
521 const struct rte_eth_dev *eth_dev);
540 (
const struct rte_eventdev *dev,
541 const struct rte_eth_dev *eth_dev);
562 (
const struct rte_eventdev *dev,
563 const struct rte_eth_dev *eth_dev,
578 (
const struct rte_eventdev *dev,
579 const struct rte_eth_dev *eth_dev);
658 struct rte_eventdev *