8#ifndef _RTE_EVENTDEV_H_
9#define _RTE_EVENTDEV_H_
213#include <rte_compat.h>
225#define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0)
237#define RTE_EVENT_DEV_CAP_EVENT_QOS (1ULL << 1)
244#define RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED (1ULL << 2)
253#define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES (1ULL << 3)
260#define RTE_EVENT_DEV_CAP_BURST_MODE (1ULL << 4)
268#define RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE (1ULL << 5)
279#define RTE_EVENT_DEV_CAP_NONSEQ_MODE (1ULL << 6)
289#define RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK (1ULL << 7)
295#define RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT (1ULL << 8)
301#define RTE_EVENT_DEV_CAP_CARRY_FLOW_ID (1ULL << 9)
307#define RTE_EVENT_DEV_CAP_MAINTENANCE_FREE (1ULL << 10)
317#define RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR (1ULL << 11)
325#define RTE_EVENT_DEV_PRIORITY_HIGHEST 0
330#define RTE_EVENT_DEV_PRIORITY_NORMAL 128
335#define RTE_EVENT_DEV_PRIORITY_LOWEST 255
342#define RTE_EVENT_QUEUE_WEIGHT_HIGHEST 255
346#define RTE_EVENT_QUEUE_WEIGHT_LOWEST 0
352#define RTE_EVENT_QUEUE_AFFINITY_HIGHEST 255
356#define RTE_EVENT_QUEUE_AFFINITY_LOWEST 0
473#define RTE_EVENT_DEV_ATTR_PORT_COUNT 0
477#define RTE_EVENT_DEV_ATTR_QUEUE_COUNT 1
481#define RTE_EVENT_DEV_ATTR_STARTED 2
497 uint32_t *attr_value);
501#define RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT (1ULL << 0)
606#define RTE_EVENT_QUEUE_CFG_ALL_TYPES (1ULL << 0)
612#define RTE_EVENT_QUEUE_CFG_SINGLE_LINK (1ULL << 1)
726#define RTE_EVENT_QUEUE_ATTR_PRIORITY 0
730#define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_FLOWS 1
734#define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_ORDER_SEQUENCES 2
738#define RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG 3
742#define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
746#define RTE_EVENT_QUEUE_ATTR_WEIGHT 5
750#define RTE_EVENT_QUEUE_ATTR_AFFINITY 6
774 uint32_t *attr_value);
797 uint64_t attr_value);
802#define RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL (1ULL << 0)
809#define RTE_EVENT_PORT_CFG_SINGLE_LINK (1ULL << 1)
814#define RTE_EVENT_PORT_CFG_HINT_PRODUCER (1ULL << 2)
824#define RTE_EVENT_PORT_CFG_HINT_CONSUMER (1ULL << 3)
835#define RTE_EVENT_PORT_CFG_HINT_WORKER (1ULL << 4)
966#define RTE_EVENT_PORT_ATTR_ENQ_DEPTH 0
970#define RTE_EVENT_PORT_ATTR_DEQ_DEPTH 1
974#define RTE_EVENT_PORT_ATTR_NEW_EVENT_THRESHOLD 2
978#define RTE_EVENT_PORT_ATTR_IMPLICIT_RELEASE_DISABLE 3
998 uint32_t *attr_value);
1115 uint64_t impl_opaque;
1147#define RTE_SCHED_TYPE_ORDERED 0
1174#define RTE_SCHED_TYPE_ATOMIC 1
1193#define RTE_SCHED_TYPE_PARALLEL 2
1207#define RTE_EVENT_TYPE_ETHDEV 0x0
1209#define RTE_EVENT_TYPE_CRYPTODEV 0x1
1211#define RTE_EVENT_TYPE_TIMER 0x2
1213#define RTE_EVENT_TYPE_CPU 0x3
1217#define RTE_EVENT_TYPE_ETH_RX_ADAPTER 0x4
1219#define RTE_EVENT_TYPE_VECTOR 0x8
1231#define RTE_EVENT_TYPE_ETHDEV_VECTOR \
1232 (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETHDEV)
1234#define RTE_EVENT_TYPE_CPU_VECTOR (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_CPU)
1236#define RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR \
1237 (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETH_RX_ADAPTER)
1239#define RTE_EVENT_TYPE_CRYPTODEV_VECTOR \
1240 (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_CRYPTODEV)
1243#define RTE_EVENT_TYPE_MAX 0x10
1247#define RTE_EVENT_OP_NEW 0
1251#define RTE_EVENT_OP_FORWARD 1
1259#define RTE_EVENT_OP_RELEASE 2
1371#define RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT 0x1
1375#define RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ 0x2
1379#define RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID 0x4
1386#define RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR 0x8
1412#define RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT (1ULL << 0)
1415#define RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC (1ULL << 1)
1435#define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW 0x1
1442#define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD 0x2
1449#define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND 0x4
1454#define RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA 0x8
1459#define RTE_EVENT_CRYPTO_ADAPTER_CAP_EVENT_VECTOR 0x10
1489#define RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT 0x1
1492#define RTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR 0x2
1545 uint64_t *timeout_ticks);
1609 const uint8_t queues[],
const uint8_t priorities[],
1653 uint8_t queues[], uint16_t nb_unlinks);
1708 uint8_t queues[], uint8_t priorities[]);
1745#define RTE_EVENT_DEV_XSTATS_NAME_SIZE 64
1751 RTE_EVENT_DEV_XSTATS_DEVICE,
1752 RTE_EVENT_DEV_XSTATS_PORT,
1753 RTE_EVENT_DEV_XSTATS_QUEUE,
1801 uint8_t queue_port_id,
1835 uint8_t queue_port_id,
1836 const uint64_t ids[],
1837 uint64_t values[],
unsigned int n);
1882 int16_t queue_port_id,
1883 const uint64_t ids[],
1933#include <rte_eventdev_core.h>
1936__rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
1937 const struct rte_event ev[], uint16_t nb_events,
1938 const event_enqueue_burst_t fn)
1940 const struct rte_event_fp_ops *fp_ops;
1943 fp_ops = &rte_event_fp_ops[dev_id];
1944 port = fp_ops->data[port_id];
1945#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
1946 if (dev_id >= RTE_EVENT_MAX_DEVS ||
1947 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
1957 rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, (
void *)fn);
1963 return (fp_ops->enqueue)(port, ev);
1965 return fn(port, ev, nb_events);
2011static inline uint16_t
2013 const struct rte_event ev[], uint16_t nb_events)
2015 const struct rte_event_fp_ops *fp_ops;
2017 fp_ops = &rte_event_fp_ops[dev_id];
2018 return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
2019 fp_ops->enqueue_burst);
2063static inline uint16_t
2065 const struct rte_event ev[], uint16_t nb_events)
2067 const struct rte_event_fp_ops *fp_ops;
2069 fp_ops = &rte_event_fp_ops[dev_id];
2070 return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
2071 fp_ops->enqueue_new_burst);
2115static inline uint16_t
2117 const struct rte_event ev[], uint16_t nb_events)
2119 const struct rte_event_fp_ops *fp_ops;
2121 fp_ops = &rte_event_fp_ops[dev_id];
2122 return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
2123 fp_ops->enqueue_forward_burst);
2192static inline uint16_t
2194 uint16_t nb_events, uint64_t timeout_ticks)
2196 const struct rte_event_fp_ops *fp_ops;
2199 fp_ops = &rte_event_fp_ops[dev_id];
2200 port = fp_ops->data[port_id];
2201#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
2202 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2203 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
2213 rte_eventdev_trace_deq_burst(dev_id, port_id, ev, nb_events);
2219 return (fp_ops->dequeue)(port, ev, timeout_ticks);
2221 return (fp_ops->dequeue_burst)(port, ev, nb_events,
2225#define RTE_EVENT_DEV_MAINT_OP_FLUSH (1 << 0)
2271 const struct rte_event_fp_ops *fp_ops;
2274 fp_ops = &rte_event_fp_ops[dev_id];
2275 port = fp_ops->data[port_id];
2276#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
2277 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2278 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV)
2287 rte_eventdev_trace_maintain(dev_id, port_id, op);
2289 if (fp_ops->maintain != NULL)
2290 fp_ops->maintain(port, op);
#define __rte_always_inline
__extension__ struct rte_eth_link __rte_aligned(8)
int rte_event_port_links_get(uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint8_t priorities[])
int rte_event_port_unlinks_in_progress(uint8_t dev_id, uint8_t port_id)
void(* rte_eventdev_port_flush_t)(uint8_t dev_id, struct rte_event event, void *arg)
int rte_event_dequeue_timeout_ticks(uint8_t dev_id, uint64_t ns, uint64_t *timeout_ticks)
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)
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)
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_service_id_get(uint8_t dev_id, uint32_t *service_id)
rte_event_dev_xstats_mode
int rte_event_eth_rx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps)
int rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id, const struct rte_event_queue_conf *queue_conf)
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_dev_selftest(uint8_t dev_id)
int rte_event_dev_info_get(uint8_t dev_id, struct rte_event_dev_info *dev_info)
int rte_event_dev_stop_flush_callback_register(uint8_t dev_id, rte_eventdev_stop_flush_t callback, void *userdata)
void rte_event_dev_stop(uint8_t dev_id)
uint8_t rte_event_dev_count(void)
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_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id, uint32_t *caps)
int rte_event_dev_xstats_reset(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, int16_t queue_port_id, const uint64_t ids[], uint32_t nb_ids)
int rte_event_dev_dump(uint8_t dev_id, FILE *f)
int rte_event_timer_adapter_caps_get(uint8_t dev_id, uint32_t *caps)
int rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id, uint32_t *attr_value)
int rte_event_dev_get_dev_id(const char *name)
uint64_t rte_event_dev_xstats_by_name_get(uint8_t dev_id, const char *name, uint64_t *id)
int rte_event_dev_xstats_get(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, const uint64_t ids[], uint64_t values[], unsigned int n)
#define RTE_EVENT_DEV_MAINT_OP_FLUSH
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)
void(* rte_eventdev_stop_flush_t)(uint8_t dev_id, struct rte_event event, void *arg)
int rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, uint32_t *attr_value)
int rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id, uint32_t *attr_value)
int rte_event_dev_start(uint8_t dev_id)
int rte_event_port_default_conf_get(uint8_t dev_id, uint8_t port_id, struct rte_event_port_conf *port_conf)
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, uint64_t *ids, unsigned int size)
int rte_event_port_setup(uint8_t dev_id, uint8_t port_id, const struct rte_event_port_conf *port_conf)
__rte_experimental void rte_event_port_quiesce(uint8_t dev_id, uint8_t port_id, rte_eventdev_port_flush_t release_cb, void *args)
int rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps)
int rte_event_port_unlink(uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint16_t nb_unlinks)
#define RTE_EVENT_DEV_XSTATS_NAME_SIZE
int rte_event_dev_socket_id(uint8_t dev_id)
__rte_experimental int rte_event_queue_attr_set(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, uint64_t attr_value)
int rte_event_dev_configure(uint8_t dev_id, const struct rte_event_dev_config *dev_conf)
static __rte_experimental int rte_event_maintain(uint8_t dev_id, uint8_t port_id, int op)
int rte_event_dev_close(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)
uint32_t dequeue_timeout_ns
uint8_t nb_single_link_event_port_queues
uint32_t nb_event_port_enqueue_depth
uint32_t nb_event_queue_flows
uint32_t nb_event_port_dequeue_depth
uint8_t max_event_port_links
uint32_t max_event_port_enqueue_depth
uint32_t dequeue_timeout_ns
uint32_t min_dequeue_timeout_ns
uint32_t max_event_queue_flows
uint8_t max_event_port_dequeue_depth
uint8_t max_event_queue_priority_levels
uint8_t max_event_priority_levels
uint32_t max_dequeue_timeout_ns
uint8_t max_single_link_event_port_queue_pairs
int32_t new_event_threshold
uint32_t nb_atomic_order_sequences
struct rte_event_vector * vec
char name[RTE_MEMPOOL_NAMESIZE]