5 #ifndef _RTE_EVENTDEV_PMD_H_
6 #define _RTE_EVENTDEV_PMD_H_
23 #include <rte_config.h>
32 #define RTE_EDEV_LOG_ERR(...) \
33 RTE_LOG(ERR, EVENTDEV, \
34 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
35 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
37 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
38 #define RTE_EDEV_LOG_DEBUG(...) \
39 RTE_LOG(DEBUG, EVENTDEV, \
40 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
41 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
43 #define RTE_EDEV_LOG_DEBUG(...) (void)0
47 #define RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, retval) do { \
48 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
49 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
54 #define RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, errno, retval) do { \
55 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
56 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
62 #define RTE_EVENTDEV_VALID_DEVID_OR_RET(dev_id) do { \
63 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
64 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
69 #define RTE_EVENT_ETH_RX_ADAPTER_SW_CAP \
70 ((RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID) | \
71 (RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ))
73 #define RTE_EVENT_CRYPTO_ADAPTER_SW_CAP \
74 RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA
80 #define RTE_EVENTDEV_DETACHED (0)
81 #define RTE_EVENTDEV_ATTACHED (1)
92 extern struct rte_eventdev *rte_eventdevs;
104 static inline struct rte_eventdev *
107 struct rte_eventdev *dev;
113 for (i = 0; i < RTE_EVENT_MAX_DEVS; i++) {
114 dev = &rte_eventdevs[i];
115 if ((dev->attached == RTE_EVENTDEV_ATTACHED) &&
116 (strcmp(dev->data->name, name) == 0))
132 static inline unsigned
135 struct rte_eventdev *dev;
137 if (dev_id >= RTE_EVENT_MAX_DEVS)
140 dev = &rte_eventdevs[dev_id];
141 if (dev->attached != RTE_EVENTDEV_ATTACHED)
313 const uint8_t queues[],
const uint8_t priorities[],
333 uint8_t queues[], uint16_t nb_unlinks);
350 uint64_t ns, uint64_t *timeout_ticks);
379 const unsigned int ids[], uint64_t values[],
unsigned int n);
386 int16_t queue_port_id,
387 const uint32_t ids[],
408 unsigned int *ids,
unsigned int size);
426 const char *name,
unsigned int *id);
449 (
const struct rte_eventdev *dev,
450 const struct rte_eth_dev *eth_dev,
481 const struct rte_eventdev *dev,
484 const struct rte_event_timer_adapter_ops **ops);
509 const struct rte_eventdev *dev,
510 const struct rte_eth_dev *eth_dev,
534 (
const struct rte_eventdev *dev,
535 const struct rte_eth_dev *eth_dev,
536 int32_t rx_queue_id);
555 (
const struct rte_eventdev *dev,
556 const struct rte_eth_dev *eth_dev);
575 (
const struct rte_eventdev *dev,
576 const struct rte_eth_dev *eth_dev);
597 (
const struct rte_eventdev *dev,
598 const struct rte_eth_dev *eth_dev,
613 (
const struct rte_eventdev *dev,
614 const struct rte_eth_dev *eth_dev);
649 (
const struct rte_eventdev *dev,
680 (
const struct rte_eventdev *dev,
682 int32_t queue_pair_id,
708 (
const struct rte_eventdev *dev,
710 int32_t queue_pair_id);
729 (
const struct rte_eventdev *dev,
749 (
const struct rte_eventdev *dev,
771 (
const struct rte_eventdev *dev,
789 (
const struct rte_eventdev *dev,
883 struct rte_eventdev *