8#ifndef _RTE_EVENTDEV_H_
9#define _RTE_EVENTDEV_H_
240#include <rte_compat.h>
252#define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0)
270#define RTE_EVENT_DEV_CAP_EVENT_QOS (1ULL << 1)
284#define RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED (1ULL << 2)
294#define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES (1ULL << 3)
318#define RTE_EVENT_DEV_CAP_BURST_MODE (1ULL << 4)
329#define RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE (1ULL << 5)
342#define RTE_EVENT_DEV_CAP_NONSEQ_MODE (1ULL << 6)
354#define RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK (1ULL << 7)
365#define RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT (1ULL << 8)
375#define RTE_EVENT_DEV_CAP_CARRY_FLOW_ID (1ULL << 9)
384#define RTE_EVENT_DEV_CAP_MAINTENANCE_FREE (1ULL << 10)
397#define RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR (1ULL << 11)
407#define RTE_EVENT_DEV_CAP_PROFILE_LINK (1ULL << 12)
421#define RTE_EVENT_DEV_CAP_ATOMIC (1ULL << 13)
429#define RTE_EVENT_DEV_CAP_ORDERED (1ULL << 14)
437#define RTE_EVENT_DEV_CAP_PARALLEL (1ULL << 15)
445#define RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ (1ULL << 16)
464#define RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE (1ULL << 17)
476#define RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE (1ULL << 18)
488#define RTE_EVENT_DEV_CAP_PER_PORT_PRESCHEDULE (1ULL << 19)
498#define RTE_EVENT_DEV_CAP_PRESCHEDULE_EXPLICIT (1ULL << 20)
508#define RTE_EVENT_DEV_PRIORITY_HIGHEST 0
515#define RTE_EVENT_DEV_PRIORITY_NORMAL 128
522#define RTE_EVENT_DEV_PRIORITY_LOWEST 255
531#define RTE_EVENT_QUEUE_WEIGHT_HIGHEST 255
537#define RTE_EVENT_QUEUE_WEIGHT_LOWEST 0
545#define RTE_EVENT_QUEUE_AFFINITY_HIGHEST 255
551#define RTE_EVENT_QUEUE_AFFINITY_LOWEST 0
708#define RTE_EVENT_DEV_ATTR_PORT_COUNT 0
712#define RTE_EVENT_DEV_ATTR_QUEUE_COUNT 1
716#define RTE_EVENT_DEV_ATTR_STARTED 2
732 uint32_t *attr_value);
736#define RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT (1ULL << 0)
876#define RTE_EVENT_QUEUE_CFG_ALL_TYPES (1ULL << 0)
890#define RTE_EVENT_QUEUE_CFG_SINGLE_LINK (1ULL << 1)
1040#define RTE_EVENT_QUEUE_ATTR_PRIORITY 0
1044#define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_FLOWS 1
1048#define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_ORDER_SEQUENCES 2
1052#define RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG 3
1056#define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
1060#define RTE_EVENT_QUEUE_ATTR_WEIGHT 5
1064#define RTE_EVENT_QUEUE_ATTR_AFFINITY 6
1088 uint32_t *attr_value);
1111 uint64_t attr_value);
1116#define RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL (1ULL << 0)
1123#define RTE_EVENT_PORT_CFG_SINGLE_LINK (1ULL << 1)
1131#define RTE_EVENT_PORT_CFG_HINT_PRODUCER (1ULL << 2)
1141#define RTE_EVENT_PORT_CFG_HINT_CONSUMER (1ULL << 3)
1152#define RTE_EVENT_PORT_CFG_HINT_WORKER (1ULL << 4)
1163#define RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ (1ULL << 5)
1306#define RTE_EVENT_PORT_ATTR_ENQ_DEPTH 0
1310#define RTE_EVENT_PORT_ATTR_DEQ_DEPTH 1
1316#define RTE_EVENT_PORT_ATTR_NEW_EVENT_THRESHOLD 2
1320#define RTE_EVENT_PORT_ATTR_IMPLICIT_RELEASE_DISABLE 3
1324#define RTE_EVENT_PORT_ATTR_INDEPENDENT_ENQ 4
1345 uint32_t *attr_value);
1448 uint16_t elem_offset : 12;
1452 uint16_t attr_valid : 1;
1470 uint64_t impl_opaque;
1498#define RTE_SCHED_TYPE_ORDERED 0
1536#define RTE_SCHED_TYPE_ATOMIC 1
1563#define RTE_SCHED_TYPE_PARALLEL 2
1577#define RTE_EVENT_TYPE_ETHDEV 0x0
1579#define RTE_EVENT_TYPE_CRYPTODEV 0x1
1581#define RTE_EVENT_TYPE_TIMER 0x2
1583#define RTE_EVENT_TYPE_CPU 0x3
1587#define RTE_EVENT_TYPE_ETH_RX_ADAPTER 0x4
1589#define RTE_EVENT_TYPE_DMADEV 0x5
1591#define RTE_EVENT_TYPE_VECTOR 0x8
1603#define RTE_EVENT_TYPE_ETHDEV_VECTOR \
1604 (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETHDEV)
1606#define RTE_EVENT_TYPE_CPU_VECTOR (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_CPU)
1608#define RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR \
1609 (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETH_RX_ADAPTER)
1611#define RTE_EVENT_TYPE_CRYPTODEV_VECTOR \
1612 (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_CRYPTODEV)
1615#define RTE_EVENT_TYPE_MAX 0x10
1619#define RTE_EVENT_OP_NEW 0
1624#define RTE_EVENT_OP_FORWARD 1
1636#define RTE_EVENT_OP_RELEASE 2
1802#define RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT 0x1
1806#define RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ 0x2
1810#define RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID 0x4
1817#define RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR 0x8
1842#define RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT (1ULL << 0)
1845#define RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC (1ULL << 1)
1865#define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW 0x1
1872#define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD 0x2
1879#define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND 0x4
1884#define RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA 0x8
1889#define RTE_EVENT_CRYPTO_ADAPTER_CAP_EVENT_VECTOR 0x10
1918#define RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_OP_NEW 0x1
1925#define RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_OP_FWD 0x2
1932#define RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND 0x4
1960#define RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT 0x1
1963#define RTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR 0x2
2014 uint64_t *timeout_ticks);
2081 const uint8_t queues[],
const uint8_t priorities[],
2129 uint8_t queues[], uint16_t nb_unlinks);
2206 const uint8_t priorities[], uint16_t nb_links, uint8_t profile_id);
2259 uint16_t nb_unlinks, uint8_t profile_id);
2313 uint8_t queues[], uint8_t priorities[]);
2349 uint8_t priorities[], uint8_t profile_id);
2386#define RTE_EVENT_DEV_XSTATS_NAME_SIZE 64
2392 RTE_EVENT_DEV_XSTATS_DEVICE,
2393 RTE_EVENT_DEV_XSTATS_PORT,
2394 RTE_EVENT_DEV_XSTATS_QUEUE,
2442 uint8_t queue_port_id,
2476 uint8_t queue_port_id,
2477 const uint64_t ids[],
2478 uint64_t values[],
unsigned int n);
2523 int16_t queue_port_id,
2524 const uint64_t ids[],
2574#include <rte_eventdev_core.h>
2581__rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
2582 const struct rte_event ev[], uint16_t nb_events,
2583 const event_enqueue_burst_t fn)
2585 const struct rte_event_fp_ops *fp_ops;
2588 fp_ops = &rte_event_fp_ops[dev_id];
2589 port = fp_ops->data[port_id];
2590#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
2591 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2592 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
2602 rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, (
void *)fn);
2604 return fn(port, ev, nb_events);
2650static inline uint16_t
2652 const struct rte_event ev[], uint16_t nb_events)
2654 const struct rte_event_fp_ops *fp_ops;
2656 fp_ops = &rte_event_fp_ops[dev_id];
2657 return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
2658 fp_ops->enqueue_burst);
2702static inline uint16_t
2704 const struct rte_event ev[], uint16_t nb_events)
2706 const struct rte_event_fp_ops *fp_ops;
2708 fp_ops = &rte_event_fp_ops[dev_id];
2709 return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
2710 fp_ops->enqueue_new_burst);
2754static inline uint16_t
2756 const struct rte_event ev[], uint16_t nb_events)
2758 const struct rte_event_fp_ops *fp_ops;
2760 fp_ops = &rte_event_fp_ops[dev_id];
2761 return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
2762 fp_ops->enqueue_forward_burst);
2831static inline uint16_t
2833 uint16_t nb_events, uint64_t timeout_ticks)
2835 const struct rte_event_fp_ops *fp_ops;
2838 fp_ops = &rte_event_fp_ops[dev_id];
2839 port = fp_ops->data[port_id];
2840#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
2841 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2842 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
2852 rte_eventdev_trace_deq_burst(dev_id, port_id, ev, nb_events);
2854 return (fp_ops->dequeue_burst)(port, ev, nb_events, timeout_ticks);
2857#define RTE_EVENT_DEV_MAINT_OP_FLUSH (1 << 0)
2902 const struct rte_event_fp_ops *fp_ops;
2905 fp_ops = &rte_event_fp_ops[dev_id];
2906 port = fp_ops->data[port_id];
2907#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
2908 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2909 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV)
2918 rte_eventdev_trace_maintain(dev_id, port_id, op);
2920 if (fp_ops->maintain != NULL)
2921 fp_ops->maintain(port, op);
2947static inline uint8_t
2950 const struct rte_event_fp_ops *fp_ops;
2953 fp_ops = &rte_event_fp_ops[dev_id];
2954 port = fp_ops->data[port_id];
2956#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
2957 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2958 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV)
2964 if (profile_id >= RTE_EVENT_MAX_PROFILES_PER_PORT)
2967 rte_eventdev_trace_port_profile_switch(dev_id, port_id, profile_id);
2969 return fp_ops->profile_switch(port, profile_id);
3000 const struct rte_event_fp_ops *fp_ops;
3003 fp_ops = &rte_event_fp_ops[dev_id];
3004 port = fp_ops->data[port_id];
3006#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
3007 if (dev_id >= RTE_EVENT_MAX_DEVS || port_id >= RTE_EVENT_MAX_PORTS_PER_DEV)
3013 rte_eventdev_trace_port_preschedule_modify(dev_id, port_id, type);
3015 return fp_ops->preschedule_modify(port, type);
3044 const struct rte_event_fp_ops *fp_ops;
3047 fp_ops = &rte_event_fp_ops[dev_id];
3048 port = fp_ops->data[port_id];
3050#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
3051 if (dev_id >= RTE_EVENT_MAX_DEVS || port_id >= RTE_EVENT_MAX_PORTS_PER_DEV)
3056 rte_eventdev_trace_port_preschedule(dev_id, port_id, type);
3058 fp_ops->preschedule(port, type);
#define __rte_always_inline
struct __rte_aligned(16) rte_event_vector
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)
int rte_event_queue_attr_set(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, uint64_t attr_value)
static __rte_experimental int rte_event_port_preschedule_modify(uint8_t dev_id, uint8_t port_id, enum rte_event_dev_preschedule_type type)
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)
static uint8_t rte_event_port_profile_switch(uint8_t dev_id, uint8_t port_id, uint8_t profile_id)
rte_event_dev_xstats_mode
__rte_experimental int rte_event_port_profile_links_set(uint8_t dev_id, uint8_t port_id, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links, uint8_t profile_id)
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)
rte_event_dev_preschedule_type
@ RTE_EVENT_PRESCHEDULE_ADAPTIVE
@ RTE_EVENT_PRESCHEDULE_NONE
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)
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_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)
__rte_experimental int rte_event_port_profile_links_get(uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint8_t priorities[], uint8_t profile_id)
static int rte_event_maintain(uint8_t dev_id, uint8_t port_id, int op)
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 int rte_event_dma_adapter_caps_get(uint8_t dev_id, uint8_t dmadev_id, uint32_t *caps)
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)
__rte_experimental int rte_event_port_profile_unlink(uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint16_t nb_unlinks, uint8_t profile_id)
#define RTE_EVENT_DEV_XSTATS_NAME_SIZE
int rte_event_dev_socket_id(uint8_t dev_id)
int rte_event_dev_configure(uint8_t dev_id, const struct rte_event_dev_config *dev_conf)
int rte_event_dev_close(uint8_t dev_id)
static __rte_experimental void rte_event_port_preschedule(uint8_t dev_id, uint8_t port_id, enum rte_event_dev_preschedule_type type)
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
enum rte_event_dev_preschedule_type preschedule_type
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_profiles_per_port
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]