8 #ifndef _RTE_EVENTDEV_H_ 9 #define _RTE_EVENTDEV_H_ 224 #define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0) 230 #define RTE_EVENT_DEV_CAP_EVENT_QOS (1ULL << 1) 237 #define RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED (1ULL << 2) 246 #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES (1ULL << 3) 253 #define RTE_EVENT_DEV_CAP_BURST_MODE (1ULL << 4) 261 #define RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE (1ULL << 5) 272 #define RTE_EVENT_DEV_CAP_NONSEQ_MODE (1ULL << 6) 282 #define RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK (1ULL << 7) 288 #define RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT (1ULL << 8) 294 #define RTE_EVENT_DEV_CAP_CARRY_FLOW_ID (1ULL << 9) 300 #define RTE_EVENT_DEV_CAP_MAINTENANCE_FREE (1ULL << 10) 311 #define RTE_EVENT_DEV_PRIORITY_HIGHEST 0 316 #define RTE_EVENT_DEV_PRIORITY_NORMAL 128 321 #define RTE_EVENT_DEV_PRIORITY_LOWEST 255 439 #define RTE_EVENT_DEV_ATTR_PORT_COUNT 0 443 #define RTE_EVENT_DEV_ATTR_QUEUE_COUNT 1 447 #define RTE_EVENT_DEV_ATTR_STARTED 2 463 uint32_t *attr_value);
467 #define RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT (1ULL << 0) 559 #define RTE_EVENT_QUEUE_CFG_ALL_TYPES (1ULL << 0) 565 #define RTE_EVENT_QUEUE_CFG_SINGLE_LINK (1ULL << 1) 663 #define RTE_EVENT_QUEUE_ATTR_PRIORITY 0 667 #define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_FLOWS 1 671 #define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_ORDER_SEQUENCES 2 675 #define RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG 3 679 #define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4 703 uint32_t *attr_value);
708 #define RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL (1ULL << 0) 715 #define RTE_EVENT_PORT_CFG_SINGLE_LINK (1ULL << 1) 720 #define RTE_EVENT_PORT_CFG_HINT_PRODUCER (1ULL << 2) 730 #define RTE_EVENT_PORT_CFG_HINT_CONSUMER (1ULL << 3) 741 #define RTE_EVENT_PORT_CFG_HINT_WORKER (1ULL << 4) 836 #define RTE_EVENT_PORT_ATTR_ENQ_DEPTH 0 840 #define RTE_EVENT_PORT_ATTR_DEQ_DEPTH 1 844 #define RTE_EVENT_PORT_ATTR_NEW_EVENT_THRESHOLD 2 848 #define RTE_EVENT_PORT_ATTR_IMPLICIT_RELEASE_DISABLE 3 868 uint32_t *attr_value);
986 uint64_t impl_opaque;
1014 #define RTE_SCHED_TYPE_ORDERED 0 1041 #define RTE_SCHED_TYPE_ATOMIC 1 1060 #define RTE_SCHED_TYPE_PARALLEL 2 1074 #define RTE_EVENT_TYPE_ETHDEV 0x0 1076 #define RTE_EVENT_TYPE_CRYPTODEV 0x1 1078 #define RTE_EVENT_TYPE_TIMER 0x2 1080 #define RTE_EVENT_TYPE_CPU 0x3 1084 #define RTE_EVENT_TYPE_ETH_RX_ADAPTER 0x4 1086 #define RTE_EVENT_TYPE_VECTOR 0x8 1098 #define RTE_EVENT_TYPE_ETHDEV_VECTOR \ 1099 (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETHDEV) 1101 #define RTE_EVENT_TYPE_CPU_VECTOR (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_CPU) 1103 #define RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR \ 1104 (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETH_RX_ADAPTER) 1107 #define RTE_EVENT_TYPE_MAX 0x10 1111 #define RTE_EVENT_OP_NEW 0 1115 #define RTE_EVENT_OP_FORWARD 1 1123 #define RTE_EVENT_OP_RELEASE 2 1235 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT 0x1 1239 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ 0x2 1243 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID 0x4 1250 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR 0x8 1276 #define RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT (1ULL << 0) 1279 #define RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC (1ULL << 1) 1299 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW 0x1 1306 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD 0x2 1313 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND 0x4 1318 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA 0x8 1348 #define RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT 0x1 1351 #define RTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR 0x2 1404 uint64_t *timeout_ticks);
1468 const uint8_t queues[],
const uint8_t priorities[],
1512 uint8_t queues[], uint16_t nb_unlinks);
1567 uint8_t queues[], uint8_t priorities[]);
1604 #define RTE_EVENT_DEV_XSTATS_NAME_SIZE 64 1610 RTE_EVENT_DEV_XSTATS_DEVICE,
1611 RTE_EVENT_DEV_XSTATS_PORT,
1612 RTE_EVENT_DEV_XSTATS_QUEUE,
1660 uint8_t queue_port_id,
1694 uint8_t queue_port_id,
1695 const unsigned int ids[],
1696 uint64_t values[],
unsigned int n);
1741 int16_t queue_port_id,
1742 const uint32_t ids[],
1792 #include <rte_eventdev_core.h> 1795 __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
1796 const struct rte_event ev[], uint16_t nb_events,
1797 const event_enqueue_burst_t fn)
1799 const struct rte_event_fp_ops *fp_ops;
1802 fp_ops = &rte_event_fp_ops[dev_id];
1803 port = fp_ops->data[port_id];
1804 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG 1805 if (dev_id >= RTE_EVENT_MAX_DEVS ||
1806 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
1816 rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, (
void *)fn);
1822 return (fp_ops->enqueue)(port, ev);
1824 return fn(port, ev, nb_events);
1870 static inline uint16_t
1872 const struct rte_event ev[], uint16_t nb_events)
1874 const struct rte_event_fp_ops *fp_ops;
1876 fp_ops = &rte_event_fp_ops[dev_id];
1877 return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
1878 fp_ops->enqueue_burst);
1922 static inline uint16_t
1924 const struct rte_event ev[], uint16_t nb_events)
1926 const struct rte_event_fp_ops *fp_ops;
1928 fp_ops = &rte_event_fp_ops[dev_id];
1929 return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
1930 fp_ops->enqueue_new_burst);
1974 static inline uint16_t
1976 const struct rte_event ev[], uint16_t nb_events)
1978 const struct rte_event_fp_ops *fp_ops;
1980 fp_ops = &rte_event_fp_ops[dev_id];
1981 return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
1982 fp_ops->enqueue_forward_burst);
2051 static inline uint16_t
2053 uint16_t nb_events, uint64_t timeout_ticks)
2055 const struct rte_event_fp_ops *fp_ops;
2058 fp_ops = &rte_event_fp_ops[dev_id];
2059 port = fp_ops->data[port_id];
2060 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG 2061 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2062 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
2072 rte_eventdev_trace_deq_burst(dev_id, port_id, ev, nb_events);
2078 return (fp_ops->dequeue)(port, ev, timeout_ticks);
2080 return (fp_ops->dequeue_burst)(port, ev, nb_events,
2084 #define RTE_EVENT_DEV_MAINT_OP_FLUSH (1 << 0) 2130 const struct rte_event_fp_ops *fp_ops;
2133 fp_ops = &rte_event_fp_ops[dev_id];
2134 port = fp_ops->data[port_id];
2135 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG 2136 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2137 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV)
2146 rte_eventdev_trace_maintain(dev_id, port_id, op);
2148 if (fp_ops->maintain != NULL)
2149 fp_ops->maintain(port, op);
void rte_event_dev_stop(uint8_t dev_id)
uint32_t min_dequeue_timeout_ns
int rte_event_dequeue_timeout_ticks(uint8_t dev_id, uint64_t ns, uint64_t *timeout_ticks)
static uint16_t rte_event_enqueue_new_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events)
#define __rte_always_inline
#define RTE_EVENT_DEV_XSTATS_NAME_SIZE
int rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id, uint32_t *attr_value)
int rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps)
int rte_event_dev_stop_flush_callback_register(uint8_t dev_id, eventdev_stop_flush_t callback, void *userdata)
int rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id, const struct rte_event_queue_conf *queue_conf)
uint8_t max_event_port_links
int rte_event_queue_default_conf_get(uint8_t dev_id, uint8_t queue_id, struct rte_event_queue_conf *queue_conf)
int rte_event_port_default_conf_get(uint8_t dev_id, uint8_t port_id, struct rte_event_port_conf *port_conf)
uint32_t dequeue_timeout_ns
int rte_event_dev_socket_id(uint8_t dev_id)
static __rte_experimental int rte_event_maintain(uint8_t dev_id, uint8_t port_id, int op)
uint32_t max_event_port_enqueue_depth
uint64_t rte_event_dev_xstats_by_name_get(uint8_t dev_id, const char *name, unsigned int *id)
int rte_event_timer_adapter_caps_get(uint8_t dev_id, uint32_t *caps)
int rte_event_dev_info_get(uint8_t dev_id, struct rte_event_dev_info *dev_info)
uint32_t nb_atomic_order_sequences
uint32_t nb_event_port_dequeue_depth
int rte_event_port_unlinks_in_progress(uint8_t dev_id, uint8_t port_id)
int rte_event_port_link(uint8_t dev_id, uint8_t port_id, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links)
int rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, uint32_t *attr_value)
struct rte_event_vector * vec
uint8_t max_single_link_event_port_queue_pairs
rte_event_dev_xstats_mode
int rte_event_port_links_get(uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint8_t priorities[])
int rte_event_dev_selftest(uint8_t dev_id)
static uint16_t rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events)
int rte_event_dev_start(uint8_t dev_id)
int rte_event_port_setup(uint8_t dev_id, uint8_t port_id, const struct rte_event_port_conf *port_conf)
uint8_t max_event_port_dequeue_depth
int rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id, uint32_t *attr_value)
uint32_t nb_event_port_enqueue_depth
static uint16_t rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[], uint16_t nb_events, uint64_t timeout_ticks)
int rte_event_dev_get_dev_id(const char *name)
uint8_t rte_event_dev_count(void)
int rte_event_dev_close(uint8_t dev_id)
int rte_event_dev_xstats_get(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, const unsigned int ids[], uint64_t values[], unsigned int n)
int rte_event_dev_xstats_reset(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, int16_t queue_port_id, const uint32_t ids[], uint32_t nb_ids)
int rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id, uint32_t *caps)
uint32_t dequeue_timeout_ns
int rte_event_dev_service_id_get(uint8_t dev_id, uint32_t *service_id)
static uint16_t rte_event_enqueue_forward_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events)
#define RTE_EVENT_DEV_MAINT_OP_FLUSH
struct rte_mempool * rte_event_vector_pool_create(const char *name, unsigned int n, unsigned int cache_size, uint16_t nb_elem, int socket_id)
int rte_event_dev_dump(uint8_t dev_id, FILE *f)
uint8_t nb_single_link_event_port_queues
int32_t new_event_threshold
uint8_t max_event_priority_levels
uint32_t max_dequeue_timeout_ns
uint32_t max_event_queue_flows
int rte_event_dev_configure(uint8_t dev_id, const struct rte_event_dev_config *dev_conf)
void(* eventdev_stop_flush_t)(uint8_t dev_id, struct rte_event event, void *arg)
struct rte_event_vector __rte_aligned(16)
uint8_t max_event_queue_priority_levels
int rte_event_port_unlink(uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint16_t nb_unlinks)
int rte_event_eth_rx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps)
int rte_event_dev_xstats_names_get(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, struct rte_event_dev_xstats_name *xstats_names, unsigned int *ids, unsigned int size)
uint32_t nb_event_queue_flows