.TH "rte_eventdev.h" 3 "Version 25.11.0" "DPDK" \" -*- nroff -*-
.ad l
.nh
.SH NAME
rte_eventdev.h
.SH SYNOPSIS
.br
.PP
\fR#include <rte_bitops\&.h>\fP
.br
\fR#include <rte_common\&.h>\fP
.br
\fR#include <rte_compat\&.h>\fP
.br
\fR#include <rte_errno\&.h>\fP
.br
\fR#include <rte_mbuf_pool_ops\&.h>\fP
.br
\fR#include <rte_mempool\&.h>\fP
.br
\fR#include 'rte_eventdev_trace_fp\&.h'\fP
.br
\fR#include <rte_eventdev_core\&.h>\fP
.br

.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBrte_event_dev_info\fP"
.br
.ti -1c
.RI "struct \fBrte_event_dev_config\fP"
.br
.ti -1c
.RI "struct \fBrte_event_queue_conf\fP"
.br
.ti -1c
.RI "struct \fBrte_event_port_conf\fP"
.br
.ti -1c
.RI "struct \fBrte_event\fP"
.br
.ti -1c
.RI "struct \fBrte_event_dev_xstats_name\fP"
.br
.in -1c
.SS "Macros"

.in +1c
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_QUEUE_QOS\fP   \fBRTE_BIT32\fP(0)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_EVENT_QOS\fP   \fBRTE_BIT32\fP(1)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED\fP   \fBRTE_BIT32\fP(2)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES\fP   \fBRTE_BIT32\fP(3)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_BURST_MODE\fP   \fBRTE_BIT32\fP(4)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE\fP   \fBRTE_BIT32\fP(5)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_NONSEQ_MODE\fP   \fBRTE_BIT32\fP(6)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK\fP   \fBRTE_BIT32\fP(7)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT\fP   \fBRTE_BIT32\fP(8)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_CARRY_FLOW_ID\fP   \fBRTE_BIT32\fP(9)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_MAINTENANCE_FREE\fP   \fBRTE_BIT32\fP(10)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR\fP   \fBRTE_BIT32\fP(11)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_PROFILE_LINK\fP   \fBRTE_BIT32\fP(12)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_ATOMIC\fP   \fBRTE_BIT32\fP(13)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_ORDERED\fP   \fBRTE_BIT32\fP(14)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_PARALLEL\fP   \fBRTE_BIT32\fP(15)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_INDEPENDENT_ENQ\fP   \fBRTE_BIT32\fP(16)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE\fP   \fBRTE_BIT32\fP(17)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE\fP   \fBRTE_BIT32\fP(18)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_PER_PORT_PRESCHEDULE\fP   \fBRTE_BIT32\fP(19)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CAP_PRESCHEDULE_EXPLICIT\fP   \fBRTE_BIT32\fP(20)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_PRIORITY_HIGHEST\fP   0"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_PRIORITY_NORMAL\fP   128"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_PRIORITY_LOWEST\fP   255"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_WEIGHT_HIGHEST\fP   255"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_WEIGHT_LOWEST\fP   0"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_AFFINITY_HIGHEST\fP   255"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_AFFINITY_LOWEST\fP   0"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_ATTR_PORT_COUNT\fP   0"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_ATTR_QUEUE_COUNT\fP   1"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_ATTR_STARTED\fP   2"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT\fP   \fBRTE_BIT32\fP(0)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_CFG_ALL_TYPES\fP   \fBRTE_BIT32\fP(0)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_CFG_SINGLE_LINK\fP   \fBRTE_BIT32\fP(1)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_ATTR_PRIORITY\fP   0"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_ATTR_NB_ATOMIC_FLOWS\fP   1"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_ATTR_NB_ATOMIC_ORDER_SEQUENCES\fP   2"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG\fP   3"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE\fP   4"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_ATTR_WEIGHT\fP   5"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_QUEUE_ATTR_AFFINITY\fP   6"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_PORT_CFG_DISABLE_IMPL_REL\fP   \fBRTE_BIT32\fP(0)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_PORT_CFG_SINGLE_LINK\fP   \fBRTE_BIT32\fP(1)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_PORT_CFG_HINT_PRODUCER\fP   \fBRTE_BIT32\fP(2)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_PORT_CFG_HINT_CONSUMER\fP   \fBRTE_BIT32\fP(3)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_PORT_CFG_HINT_WORKER\fP   \fBRTE_BIT32\fP(4)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_PORT_CFG_INDEPENDENT_ENQ\fP   \fBRTE_BIT32\fP(5)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_PORT_ATTR_ENQ_DEPTH\fP   0"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_PORT_ATTR_DEQ_DEPTH\fP   1"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_PORT_ATTR_NEW_EVENT_THRESHOLD\fP   2"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_PORT_ATTR_IMPLICIT_RELEASE_DISABLE\fP   3"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_PORT_ATTR_INDEPENDENT_ENQ\fP   4"
.br
.ti -1c
.RI "#define \fBRTE_SCHED_TYPE_ORDERED\fP   0"
.br
.ti -1c
.RI "#define \fBRTE_SCHED_TYPE_ATOMIC\fP   1"
.br
.ti -1c
.RI "#define \fBRTE_SCHED_TYPE_PARALLEL\fP   2"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TYPE_ETHDEV\fP   0x0"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TYPE_CRYPTODEV\fP   0x1"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TYPE_TIMER\fP   0x2"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TYPE_CPU\fP   0x3"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TYPE_ETH_RX_ADAPTER\fP   0x4"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TYPE_DMADEV\fP   0x5"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TYPE_VECTOR\fP   0x8"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TYPE_ETHDEV_VECTOR\fP       (\fBRTE_EVENT_TYPE_VECTOR\fP | \fBRTE_EVENT_TYPE_ETHDEV\fP)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TYPE_CPU_VECTOR\fP   (\fBRTE_EVENT_TYPE_VECTOR\fP | \fBRTE_EVENT_TYPE_CPU\fP)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR\fP       (\fBRTE_EVENT_TYPE_VECTOR\fP | \fBRTE_EVENT_TYPE_ETH_RX_ADAPTER\fP)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TYPE_CRYPTODEV_VECTOR\fP       (\fBRTE_EVENT_TYPE_VECTOR\fP | \fBRTE_EVENT_TYPE_CRYPTODEV\fP)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TYPE_MAX\fP   0x10"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_OP_NEW\fP   0"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_OP_FORWARD\fP   1"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_OP_RELEASE\fP   2"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT\fP   0x1"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ\fP   0x2"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID\fP   0x4"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR\fP   0x8"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT\fP   \fBRTE_BIT32\fP(0)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC\fP   \fBRTE_BIT32\fP(1)"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW\fP   0x1"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD\fP   0x2"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND\fP   0x4"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA\fP   0x8"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_CRYPTO_ADAPTER_CAP_EVENT_VECTOR\fP   0x10"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_OP_NEW\fP   0x1"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_OP_FWD\fP   0x2"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND\fP   0x4"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT\fP   0x1"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR\fP   0x2"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_VECTOR_ADAPTER_CAP_INTERNAL_PORT\fP   0x1"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_XSTATS_NAME_SIZE\fP   64"
.br
.ti -1c
.RI "#define \fBRTE_EVENT_DEV_MAINT_OP_FLUSH\fP   (1 << 0)"
.br
.in -1c
.SS "Typedefs"

.in +1c
.ti -1c
.RI "\fBtypedef\fP void(* \fBrte_eventdev_port_flush_t\fP) (uint8_t dev_id, struct \fBrte_event\fP event, void *arg)"
.br
.ti -1c
.RI "\fBtypedef\fP void(* \fBrte_eventdev_stop_flush_t\fP) (uint8_t dev_id, struct \fBrte_event\fP event, void *arg)"
.br
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBrte_event_dev_preschedule_type\fP { \fBRTE_EVENT_PRESCHEDULE_NONE\fP, \fBRTE_EVENT_PRESCHEDULE\fP, \fBRTE_EVENT_PRESCHEDULE_ADAPTIVE\fP }"
.br
.ti -1c
.RI "enum \fBrte_event_dev_xstats_mode\fP "
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "uint8_t \fBrte_event_dev_count\fP (void)"
.br
.ti -1c
.RI "int \fBrte_event_dev_get_dev_id\fP (const char *name)"
.br
.ti -1c
.RI "int \fBrte_event_dev_socket_id\fP (uint8_t dev_id)"
.br
.ti -1c
.RI "int \fBrte_event_dev_info_get\fP (uint8_t dev_id, struct \fBrte_event_dev_info\fP *dev_info)"
.br
.ti -1c
.RI "int \fBrte_event_dev_attr_get\fP (uint8_t dev_id, uint32_t attr_id, uint32_t *attr_value)"
.br
.ti -1c
.RI "int \fBrte_event_dev_configure\fP (uint8_t dev_id, const struct \fBrte_event_dev_config\fP *dev_conf)"
.br
.ti -1c
.RI "int \fBrte_event_queue_default_conf_get\fP (uint8_t dev_id, uint8_t queue_id, struct \fBrte_event_queue_conf\fP *queue_conf)"
.br
.ti -1c
.RI "int \fBrte_event_queue_setup\fP (uint8_t dev_id, uint8_t queue_id, const struct \fBrte_event_queue_conf\fP *queue_conf)"
.br
.ti -1c
.RI "int \fBrte_event_queue_attr_get\fP (uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, uint32_t *attr_value)"
.br
.ti -1c
.RI "int \fBrte_event_queue_attr_set\fP (uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, uint64_t attr_value)"
.br
.ti -1c
.RI "int \fBrte_event_port_default_conf_get\fP (uint8_t dev_id, uint8_t port_id, struct \fBrte_event_port_conf\fP *port_conf)"
.br
.ti -1c
.RI "int \fBrte_event_port_setup\fP (uint8_t dev_id, uint8_t port_id, const struct \fBrte_event_port_conf\fP *port_conf)"
.br
.ti -1c
.RI "void \fBrte_event_port_quiesce\fP (uint8_t dev_id, uint8_t port_id, \fBrte_eventdev_port_flush_t\fP release_cb, void *args)"
.br
.ti -1c
.RI "int \fBrte_event_port_attr_get\fP (uint8_t dev_id, uint8_t port_id, uint32_t attr_id, uint32_t *attr_value)"
.br
.ti -1c
.RI "int \fBrte_event_dev_start\fP (uint8_t dev_id)"
.br
.ti -1c
.RI "void \fBrte_event_dev_stop\fP (uint8_t dev_id)"
.br
.ti -1c
.RI "int \fBrte_event_dev_stop_flush_callback_register\fP (uint8_t dev_id, \fBrte_eventdev_stop_flush_t\fP callback, void *userdata)"
.br
.ti -1c
.RI "int \fBrte_event_dev_close\fP (uint8_t dev_id)"
.br
.ti -1c
.RI "struct \fB__rte_aligned\fP (16) rte_event_vector"
.br
.ti -1c
.RI "int \fBrte_event_eth_rx_adapter_caps_get\fP (uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps)"
.br
.ti -1c
.RI "int \fBrte_event_timer_adapter_caps_get\fP (uint8_t dev_id, uint32_t *caps)"
.br
.ti -1c
.RI "int \fBrte_event_crypto_adapter_caps_get\fP (uint8_t dev_id, uint8_t cdev_id, uint32_t *caps)"
.br
.ti -1c
.RI "__rte_experimental int \fBrte_event_dma_adapter_caps_get\fP (uint8_t dev_id, uint8_t dmadev_id, uint32_t *caps)"
.br
.ti -1c
.RI "int \fBrte_event_eth_tx_adapter_caps_get\fP (uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps)"
.br
.ti -1c
.RI "int \fBrte_event_dequeue_timeout_ticks\fP (uint8_t dev_id, uint64_t ns, uint64_t *timeout_ticks)"
.br
.ti -1c
.RI "int \fBrte_event_port_link\fP (uint8_t dev_id, uint8_t port_id, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links)"
.br
.ti -1c
.RI "int \fBrte_event_port_unlink\fP (uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint16_t nb_unlinks)"
.br
.ti -1c
.RI "__rte_experimental int \fBrte_event_port_profile_links_set\fP (uint8_t dev_id, uint8_t port_id, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links, uint8_t profile_id)"
.br
.ti -1c
.RI "__rte_experimental int \fBrte_event_port_profile_unlink\fP (uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint16_t nb_unlinks, uint8_t profile_id)"
.br
.ti -1c
.RI "int \fBrte_event_port_unlinks_in_progress\fP (uint8_t dev_id, uint8_t port_id)"
.br
.ti -1c
.RI "int \fBrte_event_port_links_get\fP (uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint8_t priorities[])"
.br
.ti -1c
.RI "__rte_experimental int \fBrte_event_port_profile_links_get\fP (uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint8_t priorities[], uint8_t profile_id)"
.br
.ti -1c
.RI "int \fBrte_event_dev_service_id_get\fP (uint8_t dev_id, uint32_t *service_id)"
.br
.ti -1c
.RI "int \fBrte_event_dev_dump\fP (uint8_t dev_id, FILE *f)"
.br
.ti -1c
.RI "int \fBrte_event_dev_xstats_names_get\fP (uint8_t dev_id, enum \fBrte_event_dev_xstats_mode\fP mode, uint8_t queue_port_id, struct \fBrte_event_dev_xstats_name\fP *xstats_names, uint64_t *ids, unsigned int size)"
.br
.ti -1c
.RI "int \fBrte_event_dev_xstats_get\fP (uint8_t dev_id, enum \fBrte_event_dev_xstats_mode\fP mode, uint8_t queue_port_id, const uint64_t ids[], uint64_t values[], unsigned int n)"
.br
.ti -1c
.RI "uint64_t \fBrte_event_dev_xstats_by_name_get\fP (uint8_t dev_id, const char *name, uint64_t *id)"
.br
.ti -1c
.RI "int \fBrte_event_dev_xstats_reset\fP (uint8_t dev_id, enum \fBrte_event_dev_xstats_mode\fP mode, int16_t queue_port_id, const uint64_t ids[], uint32_t nb_ids)"
.br
.ti -1c
.RI "int \fBrte_event_dev_selftest\fP (uint8_t dev_id)"
.br
.ti -1c
.RI "struct \fBrte_mempool\fP * \fBrte_event_vector_pool_create\fP (const char *name, unsigned int n, unsigned int cache_size, uint16_t nb_elem, int socket_id)"
.br
.ti -1c
.RI "static uint16_t \fBrte_event_enqueue_burst\fP (uint8_t dev_id, uint8_t port_id, const struct \fBrte_event\fP ev[], uint16_t nb_events)"
.br
.ti -1c
.RI "static uint16_t \fBrte_event_enqueue_new_burst\fP (uint8_t dev_id, uint8_t port_id, const struct \fBrte_event\fP ev[], uint16_t nb_events)"
.br
.ti -1c
.RI "static uint16_t \fBrte_event_enqueue_forward_burst\fP (uint8_t dev_id, uint8_t port_id, const struct \fBrte_event\fP ev[], uint16_t nb_events)"
.br
.ti -1c
.RI "static uint16_t \fBrte_event_dequeue_burst\fP (uint8_t dev_id, uint8_t port_id, struct \fBrte_event\fP ev[], uint16_t nb_events, uint64_t timeout_ticks)"
.br
.ti -1c
.RI "static int \fBrte_event_maintain\fP (uint8_t dev_id, uint8_t port_id, int op)"
.br
.ti -1c
.RI "static uint8_t \fBrte_event_port_profile_switch\fP (uint8_t dev_id, uint8_t port_id, uint8_t profile_id)"
.br
.ti -1c
.RI "static __rte_experimental int \fBrte_event_port_preschedule_modify\fP (uint8_t dev_id, uint8_t port_id, enum \fBrte_event_dev_preschedule_type\fP type)"
.br
.ti -1c
.RI "static __rte_experimental void \fBrte_event_port_preschedule\fP (uint8_t dev_id, uint8_t port_id, enum \fBrte_event_dev_preschedule_type\fP type)"
.br
.in -1c
.SH "Detailed Description"
.PP 

.SH "RTE Event Device API"
.PP
In a traditional DPDK application model, the application polls Ethdev port RX queues to look for work, and processing is done in a run-to-completion manner, after which the packets are transmitted on a Ethdev TX queue\&. Load is distributed by statically assigning ports and queues to lcores, and NIC receive-side scaling (RSS), or similar, is employed to distribute network flows (and thus work) on the same port across multiple RX queues\&.

.PP
In contrast, in an event-driven model, as supported by this "eventdev" library, incoming packets (or other input events) are fed into an event device, which schedules those packets across the available lcores, in accordance with its configuration\&. This event-driven programming model offers applications automatic multicore scaling, dynamic load balancing, pipelining, packet order maintenance, synchronization, and prioritization/quality of service\&.

.PP
The Event Device API is composed of two parts:

.PP
.IP "\(bu" 2
The application-oriented Event API that includes functions to setup an event device (configure it, setup its queues, ports and start it), to establish the links between queues and ports to receive events, and so on\&.
.IP "\(bu" 2
The driver-oriented Event API that exports a function allowing an event poll Mode Driver (PMD) to register itself as an event device driver\&.
.PP
.SS "Application-oriented Event API"
Event device components: 
.PP
.nf
                +-----------------+
                | +-------------+ |
   +-------+    | |    flow 0   | |
   |Packet |    | +-------------+ |
   |event  |    | +-------------+ |
   |       |    | |    flow 1   | |port_link(port0, queue0)
   +-------+    | +-------------+ |     |     +--------+
   +-------+    | +-------------+ o-----v-----o        |dequeue +------+
   |Crypto |    | |    flow n   | |           | event  +------->|Core 0|
   |work   |    | +-------------+ o----+      | port 0 |        |      |
   |done ev|    |  event queue 0  |    |      +--------+        +------+
   +-------+    +-----------------+    |
   +-------+                           |
   |Timer  |    +-----------------+    |      +--------+
   |expiry |    | +-------------+ |    +------o        |dequeue +------+
   |event  |    | |    flow 0   | o-----------o event  +------->|Core 1|
   +-------+    | +-------------+ |      +----o port 1 |        |      |
  Event enqueue | +-------------+ |      |    +--------+        +------+
o-------------> | |    flow 1   | |      |
   enqueue(     | +-------------+ |      |
   queue_id,    |                 |      |    +--------+        +------+
   flow_id,     | +-------------+ |      |    |        |dequeue |Core 2|
   sched_type,  | |    flow n   | o-----------o event  +------->|      |
   event_type,  | +-------------+ |      |    | port 2 |        +------+
   subev_type,  |  event queue 1  |      |    +--------+
   event)       +-----------------+      |    +--------+
                                         |    |        |dequeue +------+
   +-------+    +-----------------+      |    | event  +------->|Core n|
   |Core   |    | +-------------+ o-----------o port n |        |      |
   |(SW)   |    | |    flow 0   | |      |    +--------+        +--+---+
   |event  |    | +-------------+ |      |                         |
   +-------+    | +-------------+ |      |                         |
       ^        | |    flow 1   | |      |                         |
       |        | +-------------+ o------+                         |
       |        | +-------------+ |                                |
       |        | |    flow n   | |                                |
       |        | +-------------+ |                                |
       |        |  event queue n  |                                |
       |        +-----------------+                                |
       |                                                           |
       +-----------------------------------------------------------+

.fi
.PP

.PP
\fBEvent device\fP: A hardware or software-based event scheduler\&.

.PP
\fBEvent\fP: Represents an item of work and is the smallest unit of scheduling\&. An event carries metadata, such as queue ID, scheduling type, and event priority, and data such as one or more packets or other kinds of buffers\&. Some examples of events are:
.IP "\(bu" 2
a software-generated item of work originating from a lcore, perhaps carrying a packet to be processed\&.
.IP "\(bu" 2
a crypto work completion notification\&.
.IP "\(bu" 2
a timer expiry notification\&.
.PP

.PP
\fBEvent queue\fP: A queue containing events that are to be scheduled by the event device\&. An event queue contains events of different flows associated with scheduling types, such as atomic, ordered, or parallel\&. Each event given to an event device must have a valid event queue id field in the metadata, to specify on which event queue in the device the event must be placed, for later scheduling\&.

.PP
\fBEvent port\fP: An application's interface into the event dev for enqueue and dequeue operations\&. Each event port can be linked with one or more event queues for dequeue operations\&. Enqueue and dequeue from a port is not thread-safe, and the expected use-case is that each port is polled by only a single lcore\&. [If this is not the case, a suitable synchronization mechanism should be used to prevent simultaneous access from multiple lcores\&.] To schedule events to an lcore, the event device will schedule them to the event port(s) being polled by that lcore\&.

.PP
\fINOTE\fP: By default, all the functions of the Event Device API exported by a PMD are non-thread-safe functions, which must not be invoked on the same object in parallel on different logical cores\&. For instance, the dequeue function of a PMD cannot be invoked in parallel on two logical cores to operate on same event port\&. Of course, this function can be invoked in parallel by different logical cores on different ports\&. It is the responsibility of the upper level application to enforce this rule\&.

.PP
In all functions of the Event API, the Event device is designated by an integer >= 0 named the device identifier \fIdev_id\fP

.PP
The functions exported by the application Event API to setup a device must be invoked in the following order:
.IP "\(bu" 2
\fBrte_event_dev_configure()\fP
.IP "\(bu" 2
\fBrte_event_queue_setup()\fP
.IP "\(bu" 2
\fBrte_event_port_setup()\fP
.IP "\(bu" 2
\fBrte_event_port_link()\fP
.IP "\(bu" 2
\fBrte_event_dev_start()\fP
.PP

.PP
Then, the application can invoke, in any order, the functions exported by the Event API to dequeue events, enqueue events, and link and unlink event queue(s) to event ports\&.

.PP
Before configuring a device, an application should call \fBrte_event_dev_info_get()\fP to determine the capabilities of the event device, and any queue or port limits of that device\&. The parameters set in the various device configuration structures may need to be adjusted based on the max values provided in the device information structure returned from the \fBrte_event_dev_info_get()\fP API\&. An application may use \fBrte_event_queue_default_conf_get()\fP or \fBrte_event_port_default_conf_get()\fP to get the default configuration to set up an event queue or event port by overriding few default values\&.

.PP
If the application wants to change the configuration (i\&.e\&. call \fBrte_event_dev_configure()\fP, \fBrte_event_queue_setup()\fP, or \fBrte_event_port_setup()\fP), it must call \fBrte_event_dev_stop()\fP first to stop the device and then do the reconfiguration before calling \fBrte_event_dev_start()\fP again\&. The schedule, enqueue and dequeue functions should not be invoked when the device is stopped\&.

.PP
Finally, an application can close an Event device by invoking the \fBrte_event_dev_close()\fP function\&. Once closed, a device cannot be reconfigured or restarted\&.
.SS "Driver-Oriented Event API"
At the Event driver level, Event devices are represented by a generic data structure of type \fIrte_event_dev\fP\&.

.PP
Event devices are dynamically registered during the PCI/SoC device probing phase performed at EAL initialization time\&. When an Event device is being probed, an \fIrte_event_dev\fP structure is allocated for it and the event_dev_init() function supplied by the Event driver is invoked to properly initialize the device\&.

.PP
The role of the device init function is to reset the device hardware or to initialize the software event driver implementation\&.

.PP
If the device init operation is successful, the device is assigned a device id (dev_id) for application use\&. Otherwise, the \fIrte_event_dev\fP structure is freed\&.

.PP
Each function of the application Event API invokes a specific function of the PMD that controls the target device designated by its device identifier\&.

.PP
For this purpose, all device-specific functions of an Event driver are supplied through a set of pointers contained in a generic structure of type \fIevent_dev_ops\fP\&. The address of the \fIevent_dev_ops\fP structure is stored in the \fIrte_event_dev\fP structure by the device init function of the Event driver, which is invoked during the PCI/SoC device probing phase, as explained earlier\&.

.PP
In other words, each function of the Event API simply retrieves the \fIrte_event_dev\fP structure associated with the device identifier and performs an indirect invocation of the corresponding driver function supplied in the \fIevent_dev_ops\fP structure of the \fIrte_event_dev\fP structure\&.

.PP
For performance reasons, the addresses of the fast-path functions of the event driver are not contained in the \fIevent_dev_ops\fP structure\&. Instead, they are directly stored at the beginning of the \fIrte_event_dev\fP structure to avoid an extra indirect memory access during their invocation\&.
.SS "Event Enqueue, Dequeue and Scheduling"
RTE event device drivers do not use interrupts for enqueue or dequeue operation\&. Instead, Event drivers export Poll-Mode enqueue and dequeue functions to applications\&.

.PP
The events are injected to event device through \fIenqueue\fP operation by event producers in the system\&. The typical event producers are ethdev subsystem for generating packet events, CPU(SW) for generating events based on different stages of application processing, cryptodev for generating crypto work completion notification etc

.PP
The \fIdequeue\fP operation gets one or more events from the event ports\&. The application processes the events and sends them to a downstream event queue through \fBrte_event_enqueue_burst()\fP, if it is an intermediate stage of event processing\&. On the final stage of processing, the application may use the Tx adapter API for maintaining the event ingress order while sending the packet/event on the wire via NIC Tx\&.

.PP
The point at which events are scheduled to ports depends on the device\&. For hardware devices, scheduling occurs asynchronously without any software intervention\&. Software schedulers can either be distributed (each worker thread schedules events to its own port) or centralized (a dedicated thread schedules to all ports)\&. Distributed software schedulers perform the scheduling inside the enqueue or dequeue functions, whereas centralized software schedulers need a dedicated service core for scheduling\&. The absence of the RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED capability flag indicates that the device is centralized and thus needs a dedicated scheduling thread (generally an RTE service that should be mapped to one or more service cores) that repeatedly calls the software specific scheduling function\&.

.PP
An event driven worker thread has following typical workflow on fastpath: 
.PP
.nf
while (1) {
   rte_event_dequeue_burst(\&.\&.\&.);
   (event processing)
   rte_event_enqueue_burst(\&.\&.\&.);
}

.fi
.PP
 
.PP
Definition in file \fBrte_eventdev\&.h\fP\&.
.SH "Macro Definition Documentation"
.PP 
.SS "#define RTE_EVENT_DEV_CAP_QUEUE_QOS   \fBRTE_BIT32\fP(0)"
Event scheduling prioritization is based on the priority and weight associated with each event queue\&.

.PP
Events from a queue with highest priority are scheduled first\&. If the queues are of same priority, weight of the queues are considered to select a queue in a weighted round robin fashion\&. Subsequent dequeue calls from an event port could see events from the same event queue, if the queue is configured with an affinity count\&. Affinity count is the number of subsequent dequeue calls, in which an event port should use the same event queue if the queue is non-empty

.PP
NOTE: A device may use both queue prioritization and event prioritization (\fBRTE_EVENT_DEV_CAP_EVENT_QOS\fP capability) when making packet scheduling decisions\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_setup()\fP 

.PP
\fBrte_event_queue_attr_set()\fP 
.RE
.PP

.PP
Definition at line \fB253\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_EVENT_QOS   \fBRTE_BIT32\fP(1)"
Event scheduling prioritization is based on the priority associated with each event\&.

.PP
Priority of each event is supplied in \fI\fBrte_event\fP\fP structure on each enqueue operation\&. If this capability is not set, the priority field of the event structure is ignored for each event\&.

.PP
NOTE: A device may use both queue prioritization (\fBRTE_EVENT_DEV_CAP_QUEUE_QOS\fP capability) and event prioritization when making packet scheduling decisions\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_enqueue_burst()\fP 
.RE
.PP

.PP
Definition at line \fB271\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED   \fBRTE_BIT32\fP(2)"
Event device operates in distributed scheduling mode\&.

.PP
In distributed scheduling mode, event scheduling happens in HW or \fBrte_event_dequeue_burst()\fP / \fBrte_event_enqueue_burst()\fP or the combination of these two\&. If the flag is not set then eventdev is centralized and thus needs a dedicated service core that acts as a scheduling thread\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_dev_service_id_get()\fP 
.RE
.PP

.PP
Definition at line \fB285\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES   \fBRTE_BIT32\fP(3)"
Event device is capable of accepting enqueued events, of any type advertised as supported by the device, to all destination queues\&.

.PP
When this capability is set, and \fBRTE_EVENT_QUEUE_CFG_ALL_TYPES\fP flag is set in \fBevent_queue_cfg\fP, the "schedule_type" field of the \fBrte_event_queue_conf\fP structure is ignored when a queue is being configured\&. Instead the "sched_type" field of each event enqueued is used to select the scheduling to be performed on that event\&.

.PP
If this capability is not set, or the configuration flag is not set, the queue only supports events of the \fIRTE_SCHED_TYPE_\fP type specified in the \fBrte_event_queue_conf\fP structure at time of configuration\&. The behaviour when events of other scheduling types are sent to the queue is undefined\&.

.PP
\fBSee also\fP
.RS 4
\fBRTE_EVENT_QUEUE_CFG_ALL_TYPES\fP 

.PP
\fBRTE_SCHED_TYPE_ATOMIC\fP 

.PP
\fBRTE_SCHED_TYPE_ORDERED\fP 

.PP
\fBRTE_SCHED_TYPE_PARALLEL\fP 

.PP
\fBrte_event_queue_conf\&.event_queue_cfg\fP 

.PP
\fBrte_event_queue_conf\&.schedule_type\fP 

.PP
\fBrte_event_enqueue_burst()\fP 
.RE
.PP

.PP
Definition at line \fB295\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_BURST_MODE   \fBRTE_BIT32\fP(4)"
Event device is capable of operating in burst mode for enqueue(forward,
release) and dequeue operation\&.

.PP
If this capability is not set, application can still use the \fBrte_event_dequeue_burst()\fP and \fBrte_event_enqueue_burst()\fP but PMD accepts or returns only one event at a time\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_dequeue_burst()\fP 

.PP
\fBrte_event_enqueue_burst()\fP 
.RE
.PP

.PP
Definition at line \fB319\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE   \fBRTE_BIT32\fP(5)"
Event device ports support disabling the implicit release feature, in which the port will release all unreleased events in its dequeue operation\&.

.PP
If this capability is set and the port is configured with implicit release disabled, the application is responsible for explicitly releasing events using either the \fBRTE_EVENT_OP_FORWARD\fP or the \fBRTE_EVENT_OP_RELEASE\fP event enqueue operations\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_dequeue_burst()\fP 

.PP
\fBrte_event_enqueue_burst()\fP 
.RE
.PP

.PP
Definition at line \fB330\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_NONSEQ_MODE   \fBRTE_BIT32\fP(6)"
Event device is capable of operating in non-sequential mode\&.

.PP
The path of the event is not necessary to be sequential\&. Application can change the path of event at runtime and events may be sent to queues in any order\&.

.PP
If the flag is not set, then event each event will follow a path from queue 0 to queue 1 to queue 2 etc\&. The eventdev will return an error when the application enqueues an event for a qid which is not the next in the sequence\&. 
.PP
Definition at line \fB343\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK   \fBRTE_BIT32\fP(7)"
Event device is capable of reconfiguring the queue/port link at runtime\&.

.PP
If the flag is not set, the eventdev queue/port link is only can be configured during initialization, or by stopping the device and then later restarting it after reconfiguration\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_link()\fP 

.PP
\fBrte_event_port_unlink()\fP 
.RE
.PP

.PP
Definition at line \fB355\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT   \fBRTE_BIT32\fP(8)"
Event device is capable of setting up links between multiple queues and a single port\&.

.PP
If the flag is not set, each port may only be linked to a single queue, and so can only receive events from that queue\&. However, each queue may be linked to multiple ports\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_link()\fP 
.RE
.PP

.PP
Definition at line \fB366\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_CARRY_FLOW_ID   \fBRTE_BIT32\fP(9)"
Event device preserves the flow ID from the enqueued event to the dequeued event\&.

.PP
If this flag is not set, the content of the flow-id field in dequeued events is implementation dependent\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_dequeue_burst()\fP 
.RE
.PP

.PP
Definition at line \fB376\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_MAINTENANCE_FREE   \fBRTE_BIT32\fP(10)"
Event device \fIdoes not\fP require calls to \fBrte_event_maintain()\fP\&.

.PP
An event device that does not set this flag requires calls to \fBrte_event_maintain()\fP during periods when neither \fBrte_event_dequeue_burst()\fP nor \fBrte_event_enqueue_burst()\fP are called on a port\&. This will allow the event device to perform internal processing, such as flushing buffered events, return credits to a global pool, or process signaling related to load balancing\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_maintain()\fP 
.RE
.PP

.PP
Definition at line \fB385\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR   \fBRTE_BIT32\fP(11)"
Event device is capable of changing the queue attributes at runtime i\&.e after \fBrte_event_queue_setup()\fP or \fBrte_event_dev_start()\fP call sequence\&.

.PP
If this flag is not set, event queue attributes can only be configured during \fBrte_event_queue_setup()\fP\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_setup()\fP 
.RE
.PP

.PP
Definition at line \fB398\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_PROFILE_LINK   \fBRTE_BIT32\fP(12)"
Event device is capable of supporting multiple link profiles per event port\&.

.PP
When set, the value of \fR\fBrte_event_dev_info::max_profiles_per_port\fP\fP is greater than one, and multiple profiles may be configured and then switched at runtime\&. If not set, only a single profile may be configured, which may itself be runtime adjustable (if \fBRTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK\fP is set)\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_profile_links_set()\fP 

.PP
\fBrte_event_port_profile_links_get()\fP 

.PP
\fBrte_event_port_profile_switch()\fP 

.PP
\fBRTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK\fP 
.RE
.PP

.PP
Definition at line \fB408\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_ATOMIC   \fBRTE_BIT32\fP(13)"
Event device is capable of atomic scheduling\&. When this flag is set, the application can configure queues with scheduling type atomic on this event device\&.

.PP
\fBSee also\fP
.RS 4
\fBRTE_SCHED_TYPE_ATOMIC\fP 
.RE
.PP

.PP
Definition at line \fB422\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_ORDERED   \fBRTE_BIT32\fP(14)"
Event device is capable of ordered scheduling\&. When this flag is set, the application can configure queues with scheduling type ordered on this event device\&.

.PP
\fBSee also\fP
.RS 4
\fBRTE_SCHED_TYPE_ORDERED\fP 
.RE
.PP

.PP
Definition at line \fB430\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_PARALLEL   \fBRTE_BIT32\fP(15)"
Event device is capable of parallel scheduling\&. When this flag is set, the application can configure queues with scheduling type parallel on this event device\&.

.PP
\fBSee also\fP
.RS 4
\fBRTE_SCHED_TYPE_PARALLEL\fP 
.RE
.PP

.PP
Definition at line \fB438\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ   \fBRTE_BIT32\fP(16)"
Event device is capable of independent enqueue\&. A new capability, RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ, will indicate that Eventdev supports the enqueue in any order or specifically in a different order than the dequeue\&. Eventdev PMD can either dequeue events in the changed order in which they are enqueued or restore the original order before sending them to the underlying hardware device\&. A flag is provided during the port configuration to inform Eventdev PMD that the application intends to use an independent enqueue order on a particular port\&. Note that this capability only matters for eventdevs supporting burst mode\&.

.PP
When an implicit release is enabled on a port, Eventdev PMD will also handle the insertion of RELEASE events in place of dropped events\&. The independent enqueue feature only applies to FORWARD and RELEASE events\&. New events (op=RTE_EVENT_OP_NEW) will be dequeued in the order the application enqueues them and do not maintain any order relative to FORWARD/RELEASE events\&. FORWARD vs NEW relaxed ordering only applies to ports that have enabled independent enqueue feature\&. 
.PP
Definition at line \fB446\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE   \fBRTE_BIT32\fP(17)"
Event device supports event pre-scheduling\&.

.PP
When this capability is available, the application can enable event pre-scheduling on the event device to pre-schedule events to a event port when \fR\fBrte_event_dequeue_burst()\fP\fP is issued\&. The pre-schedule process starts with the \fR\fBrte_event_dequeue_burst()\fP\fP call and the pre-scheduled events are returned on the next \fR\fBrte_event_dequeue_burst()\fP\fP call\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_dev_configure()\fP 
.RE
.PP

.PP
Definition at line \fB465\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE   \fBRTE_BIT32\fP(18)"
Event device supports adaptive event pre-scheduling\&.

.PP
When this capability is available, the application can enable adaptive pre-scheduling on the event device where the events are pre-scheduled when there are no forward progress constraints with the currently held flow contexts\&. The pre-schedule process starts with the \fR\fBrte_event_dequeue_burst()\fP\fP call and the pre-scheduled events are returned on the next \fR\fBrte_event_dequeue_burst()\fP\fP call\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_dev_configure()\fP 
.RE
.PP

.PP
Definition at line \fB477\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_PER_PORT_PRESCHEDULE   \fBRTE_BIT32\fP(19)"
Event device supports event pre-scheduling per event port\&.

.PP
When this flag is set, the event device allows controlling the event pre-scheduling at a event port granularity\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_dev_configure()\fP 

.PP
\fBrte_event_port_preschedule_modify()\fP 
.RE
.PP

.PP
Definition at line \fB489\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CAP_PRESCHEDULE_EXPLICIT   \fBRTE_BIT32\fP(20)"
Event device supports explicit pre-scheduling\&.

.PP
When this flag is set, the application can issue pre-schedule request on a event port\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_preschedule()\fP 
.RE
.PP

.PP
Definition at line \fB499\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_PRIORITY_HIGHEST   0"
Highest priority level for events and queues\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_setup()\fP 

.PP
\fBrte_event_enqueue_burst()\fP 

.PP
\fBrte_event_port_link()\fP 
.RE
.PP

.PP
Definition at line \fB509\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_PRIORITY_NORMAL   128"
Normal priority level for events and queues\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_setup()\fP 

.PP
\fBrte_event_enqueue_burst()\fP 

.PP
\fBrte_event_port_link()\fP 
.RE
.PP

.PP
Definition at line \fB516\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_PRIORITY_LOWEST   255"
Lowest priority level for events and queues\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_setup()\fP 

.PP
\fBrte_event_enqueue_burst()\fP 

.PP
\fBrte_event_port_link()\fP 
.RE
.PP

.PP
Definition at line \fB523\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_WEIGHT_HIGHEST   255"
Highest weight of an event queue\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_attr_get()\fP 

.PP
\fBrte_event_queue_attr_set()\fP 
.RE
.PP

.PP
Definition at line \fB532\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_WEIGHT_LOWEST   0"
Lowest weight of an event queue\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_attr_get()\fP 

.PP
\fBrte_event_queue_attr_set()\fP 
.RE
.PP

.PP
Definition at line \fB538\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_AFFINITY_HIGHEST   255"
Highest scheduling affinity of an event queue\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_attr_get()\fP 

.PP
\fBrte_event_queue_attr_set()\fP 
.RE
.PP

.PP
Definition at line \fB546\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_AFFINITY_LOWEST   0"
Lowest scheduling affinity of an event queue\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_attr_get()\fP 

.PP
\fBrte_event_queue_attr_set()\fP 
.RE
.PP

.PP
Definition at line \fB552\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_ATTR_PORT_COUNT   0"
The count of ports\&. 
.PP
Definition at line \fB709\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_ATTR_QUEUE_COUNT   1"
The count of queues\&. 
.PP
Definition at line \fB713\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_ATTR_STARTED   2"
The status of the device, zero for stopped, non-zero for started\&. 
.PP
Definition at line \fB717\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT   \fBRTE_BIT32\fP(0)"
Override the global \fIdequeue_timeout_ns\fP and use per dequeue timeout in ns\&. 
.PP
\fBSee also\fP
.RS 4
\fBrte_event_dequeue_timeout_ticks()\fP, \fBrte_event_dequeue_burst()\fP 
.RE
.PP

.PP
Definition at line \fB737\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_CFG_ALL_TYPES   \fBRTE_BIT32\fP(0)"
Allow events with schedule types ATOMIC, ORDERED, and PARALLEL to be enqueued to this queue\&.

.PP
The scheduling type to be used is that specified in each individual event\&. This flag can only be set when configuring queues on devices reporting the \fBRTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES\fP capability\&.

.PP
Without this flag, only events with the specific scheduling type configured at queue setup can be sent to the queue\&.

.PP
\fBSee also\fP
.RS 4
\fBRTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES\fP 

.PP
\fBRTE_SCHED_TYPE_ORDERED\fP, \fBRTE_SCHED_TYPE_ATOMIC\fP, \fBRTE_SCHED_TYPE_PARALLEL\fP 

.PP
\fBrte_event_enqueue_burst()\fP 
.RE
.PP

.PP
Definition at line \fB877\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_CFG_SINGLE_LINK   \fBRTE_BIT32\fP(1)"
This event queue links only to a single event port\&.

.PP
No load-balancing of events is performed, as all events sent to this queue end up at the same event port\&. The number of queues on which this flag is to be set must be configured at device configuration time, by setting \fBnb_single_link_event_port_queues\fP parameter appropriately\&.

.PP
This flag serves as a hint only, any devices without specific support for single-link queues can fall-back automatically to using regular queues with a single destination port\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_dev_info\&.max_single_link_event_port_queue_pairs\fP 

.PP
\fBrte_event_dev_config\&.nb_single_link_event_port_queues\fP 

.PP
\fBrte_event_port_setup()\fP, \fBrte_event_port_link()\fP 
.RE
.PP

.PP
Definition at line \fB891\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_ATTR_PRIORITY   0"
Queue attribute id for the priority of the queue\&. 
.PP
Definition at line \fB1041\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_FLOWS   1"
Queue attribute id for the number of atomic flows configured for the queue\&. 
.PP
Definition at line \fB1045\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_ORDER_SEQUENCES   2"
Queue attribute id for the number of atomic order sequences configured for the queue\&. 
.PP
Definition at line \fB1049\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG   3"
Queue attribute id for the configuration flags for the queue\&. 
.PP
Definition at line \fB1053\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE   4"
Queue attribute id for the schedule type of the queue\&. 
.PP
Definition at line \fB1057\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_ATTR_WEIGHT   5"
Queue attribute id for the weight of the queue\&. 
.PP
Definition at line \fB1061\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_QUEUE_ATTR_AFFINITY   6"
Queue attribute id for the affinity of the queue\&. 
.PP
Definition at line \fB1065\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL   \fBRTE_BIT32\fP(0)"
Configure the port not to release outstanding events in rte_event_dev_dequeue_burst()\&. If set, all events received through the port must be explicitly released with RTE_EVENT_OP_RELEASE or RTE_EVENT_OP_FORWARD\&. Must be unset if the device is not RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE capable\&. 
.PP
Definition at line \fB1117\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_PORT_CFG_SINGLE_LINK   \fBRTE_BIT32\fP(1)"
This event port links only to a single event queue\&. The queue it links with should be similarly configured with the \fBRTE_EVENT_QUEUE_CFG_SINGLE_LINK\fP flag\&.

.PP
\fBSee also\fP
.RS 4
\fBRTE_EVENT_QUEUE_CFG_SINGLE_LINK\fP 

.PP
\fBrte_event_port_setup()\fP, \fBrte_event_port_link()\fP 
.RE
.PP

.PP
Definition at line \fB1124\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_PORT_CFG_HINT_PRODUCER   \fBRTE_BIT32\fP(2)"
Hint that this event port will primarily enqueue events to the system\&. A PMD can optimize its internal workings by assuming that this port is primarily going to enqueue NEW events\&.

.PP
Note that this flag is only a hint, so PMDs must operate under the assumption that any port can enqueue an event with any type of op\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_setup()\fP 
.RE
.PP

.PP
Definition at line \fB1132\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_PORT_CFG_HINT_CONSUMER   \fBRTE_BIT32\fP(3)"
Hint that this event port will primarily dequeue events from the system\&. A PMD can optimize its internal workings by assuming that this port is primarily going to consume events, and not enqueue NEW or FORWARD events\&.

.PP
Note that this flag is only a hint, so PMDs must operate under the assumption that any port can enqueue an event with any type of op\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_setup()\fP 
.RE
.PP

.PP
Definition at line \fB1142\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_PORT_CFG_HINT_WORKER   \fBRTE_BIT32\fP(4)"
Hint that this event port will primarily pass existing events through\&. A PMD can optimize its internal workings by assuming that this port is primarily going to FORWARD events, and not enqueue NEW or RELEASE events often\&.

.PP
Note that this flag is only a hint, so PMDs must operate under the assumption that any port can enqueue an event with any type of op\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_setup()\fP 
.RE
.PP

.PP
Definition at line \fB1153\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ   \fBRTE_BIT32\fP(5)"
Flag to enable independent enqueue\&. Must not be set if the device is not RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ capable\&. This feature allows an application to enqueue RTE_EVENT_OP_FORWARD or RTE_EVENT_OP_RELEASE in an order different than the order the events were dequeued from the event device, while maintaining RTE_SCHED_TYPE_ATOMIC or RTE_SCHED_TYPE_ORDERED semantics\&.

.PP
Note that this flag only matters for Eventdevs supporting burst mode\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_setup()\fP 
.RE
.PP

.PP
Definition at line \fB1164\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_PORT_ATTR_ENQ_DEPTH   0"
Port attribute id for the maximum size of a burst enqueue operation supported on a port\&. 
.PP
Definition at line \fB1307\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_PORT_ATTR_DEQ_DEPTH   1"
Port attribute id for the maximum size of a dequeue burst which can be returned from a port\&. 
.PP
Definition at line \fB1311\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_PORT_ATTR_NEW_EVENT_THRESHOLD   2"
Port attribute id for the new event threshold of the port\&. Once the number of events in the system exceeds this threshold, the enqueue of NEW-type events will fail\&. 
.PP
Definition at line \fB1317\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_PORT_ATTR_IMPLICIT_RELEASE_DISABLE   3"
Port attribute id for the implicit release disable attribute of the port\&. 
.PP
Definition at line \fB1321\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_PORT_ATTR_INDEPENDENT_ENQ   4"
Port attribute id for the Independent Enqueue feature\&. 
.PP
Definition at line \fB1325\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_SCHED_TYPE_ORDERED   0"
Ordered scheduling

.PP
Events from an ordered flow of an event queue can be scheduled to multiple ports for concurrent processing while maintaining the original event order, i\&.e\&. the order in which they were first enqueued to that queue\&. This scheme allows events pertaining to the same, potentially large, flow to be processed in parallel on multiple cores without incurring any application-level order restoration logic overhead\&.

.PP
After events are dequeued from a set of ports, as those events are re-enqueued to another queue (with the op field set to \fBRTE_EVENT_OP_FORWARD\fP), the event device restores the original event order - including events returned from all ports in the set - before the events are placed on the destination queue, for subsequent scheduling to ports\&.

.PP
Any events not forwarded i\&.e\&. dropped explicitly via RELEASE or implicitly released by the next dequeue operation on a port, are skipped by the reordering stage and do not affect the reordering of other returned events\&.

.PP
Any NEW events sent on a port are not ordered with respect to FORWARD events sent on the same port, since they have no original event order\&. They also are not ordered with respect to NEW events enqueued on other ports\&. However, NEW events to the same destination queue from the same port are guaranteed to be enqueued in the order they were submitted via \fBrte_event_enqueue_burst()\fP\&.

.PP
NOTE: In restoring event order of forwarded events, the eventdev API guarantees that all events from the same flow (i\&.e\&. same \fBflow_id\fP, \fBpriority\fP and \fBqueue_id\fP) will be put in the original order before being forwarded to the destination queue\&. Some eventdevs may implement stricter ordering to achieve this aim, for example, restoring the order across \fIall\fP flows dequeued from the same ORDERED queue\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_setup()\fP, \fBrte_event_dequeue_burst()\fP, \fBRTE_EVENT_OP_RELEASE\fP 
.RE
.PP

.PP
Definition at line \fB1499\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_SCHED_TYPE_ATOMIC   1"
Atomic scheduling

.PP
Events from an atomic flow, identified by a combination of \fBflow_id\fP, \fBqueue_id\fP and \fBpriority\fP, can be scheduled only to a single port at a time\&. The port is guaranteed to have exclusive (atomic) access to the associated flow context, which enables the user to avoid SW synchronization\&. Atomic flows also maintain event ordering since only one port at a time can process events from each flow of an event queue, and events within a flow are not reordered within the scheduler\&.

.PP
An atomic flow is locked to a port when events from that flow are first scheduled to that port\&. That lock remains in place until the application calls \fBrte_event_dequeue_burst()\fP from the same port, which implicitly releases the lock (if \fBRTE_EVENT_PORT_CFG_DISABLE_IMPL_REL\fP flag is not set)\&. User may allow the scheduler to release the lock earlier than that by invoking \fBrte_event_enqueue_burst()\fP with RTE_EVENT_OP_RELEASE operation for each event from that flow\&.

.PP
NOTE: Where multiple events from the same queue and atomic flow are scheduled to a port, the lock for that flow is only released once the last event from the flow is released, or forwarded to another queue\&. So long as there is at least one event from an atomic flow scheduled to a port/core (including any events in the port's dequeue queue, not yet read by the application), that port will hold the synchronization lock for that flow\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_setup()\fP, \fBrte_event_dequeue_burst()\fP, \fBRTE_EVENT_OP_RELEASE\fP 
.RE
.PP

.PP
Definition at line \fB1537\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_SCHED_TYPE_PARALLEL   2"
Parallel scheduling

.PP
The scheduler performs priority scheduling, load balancing, etc\&. functions but does not provide additional event synchronization or ordering\&. It is free to schedule events from a single parallel flow of an event queue to multiple events ports for concurrent processing\&. The application is responsible for flow context synchronization and event ordering (SW synchronization)\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_setup()\fP, \fBrte_event_dequeue_burst()\fP 
.RE
.PP

.PP
Definition at line \fB1564\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TYPE_ETHDEV   0x0"
The event generated from ethdev subsystem 
.PP
Definition at line \fB1578\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TYPE_CRYPTODEV   0x1"
The event generated from crypodev subsystem 
.PP
Definition at line \fB1580\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TYPE_TIMER   0x2"
The event generated from event timer adapter 
.PP
Definition at line \fB1582\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TYPE_CPU   0x3"
The event generated from cpu for pipelining\&. Application may use \fIsub_event_type\fP to further classify the event 
.PP
Definition at line \fB1584\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TYPE_ETH_RX_ADAPTER   0x4"
The event generated from event eth Rx adapter 
.PP
Definition at line \fB1588\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TYPE_DMADEV   0x5"
The event generated from dma subsystem 
.PP
Definition at line \fB1590\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TYPE_VECTOR   0x8"
Indicates that event is a vector\&. All vector event types should be a logical OR of EVENT_TYPE_VECTOR\&. This simplifies the pipeline design as one can split processing the events between vector events and normal event across event types\&. Example: if (ev\&.event_type & RTE_EVENT_TYPE_VECTOR) { // Classify and handle vector event\&. } else { // Classify and handle event\&. } 
.PP
Definition at line \fB1592\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TYPE_ETHDEV_VECTOR       (\fBRTE_EVENT_TYPE_VECTOR\fP | \fBRTE_EVENT_TYPE_ETHDEV\fP)"
The event vector generated from ethdev subsystem 
.PP
Definition at line \fB1604\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TYPE_CPU_VECTOR   (\fBRTE_EVENT_TYPE_VECTOR\fP | \fBRTE_EVENT_TYPE_CPU\fP)"
The event vector generated from cpu for pipelining\&. 
.PP
Definition at line \fB1607\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR       (\fBRTE_EVENT_TYPE_VECTOR\fP | \fBRTE_EVENT_TYPE_ETH_RX_ADAPTER\fP)"
The event vector generated from eth Rx adapter\&. 
.PP
Definition at line \fB1609\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TYPE_CRYPTODEV_VECTOR       (\fBRTE_EVENT_TYPE_VECTOR\fP | \fBRTE_EVENT_TYPE_CRYPTODEV\fP)"
The event vector generated from cryptodev adapter\&. 
.PP
Definition at line \fB1612\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TYPE_MAX   0x10"
Maximum number of event types 
.PP
Definition at line \fB1616\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_OP_NEW   0"
The \fBop\fP field must be set to this operation type to inject a new event, i\&.e\&. one not previously dequeued, into the event device, to be scheduled for processing\&. 
.PP
Definition at line \fB1620\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_OP_FORWARD   1"
The application must set the \fBop\fP field to this operation type to return a previously dequeued event to the event device to be scheduled for further processing\&.

.PP
This event \fImust\fP be enqueued to the same port that the event to be forwarded was dequeued from\&.

.PP
The event's fields, including (but not limited to) flow_id, scheduling type, destination queue, and event payload e\&.g\&. mbuf pointer, may all be updated as desired by the application, but the \fBimpl_opaque\fP field must be kept to the same value as was present when the event was dequeued\&. 
.PP
Definition at line \fB1625\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_OP_RELEASE   2"
Release the flow context associated with the schedule type\&.

.PP
If current flow's scheduler type method is \fBRTE_SCHED_TYPE_ATOMIC\fP then this operation type hints the scheduler that the user has completed critical section processing for this event in the current atomic context, and that the scheduler may unlock any atomic locks held for this event\&. If this is the last event from an atomic flow, i\&.e\&. all flow locks are released (see \fBRTE_SCHED_TYPE_ATOMIC\fP for details), the scheduler is now allowed to schedule events from that flow from to another port\&. However, the atomic locks may be still held until the next \fBrte_event_dequeue_burst()\fP call; enqueuing an event with opt type \fBRTE_EVENT_OP_RELEASE\fP is a hint only, allowing the scheduler to release the atomic locks early, but not requiring it to do so\&.

.PP
Early atomic lock release may increase parallelism and thus system performance, but the user needs to design carefully the split into critical vs non-critical sections\&.

.PP
If current flow's scheduler type method is \fBRTE_SCHED_TYPE_ORDERED\fP then this operation type informs the scheduler that the current event has completed processing and will not be returned to the scheduler, i\&.e\&. it has been dropped, and so the reordering context for that event should be considered filled\&.

.PP
Events with this operation type must only be enqueued to the same port that the event to be released was dequeued from\&. The \fBimpl_opaque\fP field in the release event must have the same value as that in the original dequeued event\&.

.PP
If a dequeued event is re-enqueued with operation type of \fBRTE_EVENT_OP_RELEASE\fP, then any subsequent enqueue of that event - or a copy of it - must be done as event of type \fBRTE_EVENT_OP_NEW\fP, not \fBRTE_EVENT_OP_FORWARD\fP\&. This is because any context for the originally dequeued event, i\&.e\&. atomic locks, or reorder buffer entries, will have been removed or invalidated by the release operation\&. 
.PP
Definition at line \fB1637\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT   0x1"
This flag is sent when the packet transfer mechanism is in HW\&. Ethdev can send packets to the event device using internal event port\&. 
.PP
Definition at line \fB1803\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ   0x2"
Adapter supports multiple event queues per ethdev\&. Every ethdev Rx queue can be connected to a unique event queue\&. 
.PP
Definition at line \fB1807\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID   0x4"
The application can override the adapter generated flow ID in the event\&. This flow ID can be specified when adding an ethdev Rx queue to the adapter using the ev\&.flow_id member\&. 
.PP
\fBSee also\fP
.RS 4
struct \fBrte_event_eth_rx_adapter_queue_conf::ev\fP 

.PP
struct \fBrte_event_eth_rx_adapter_queue_conf::rx_queue_flags\fP 
.RE
.PP

.PP
Definition at line \fB1811\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR   0x8"
Adapter supports event vectorization per ethdev\&. 
.PP
Definition at line \fB1818\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT   \fBRTE_BIT32\fP(0)"
This flag is set when the timer mechanism is in HW\&. 
.PP
Definition at line \fB1843\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC   \fBRTE_BIT32\fP(1)"
This flag is set if periodic mode is supported\&. 
.PP
Definition at line \fB1846\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW   0x1"
Flag indicates HW is capable of generating events in RTE_EVENT_OP_NEW enqueue operation\&. Cryptodev will send packets to the event device as new events using an internal event port\&. 
.PP
Definition at line \fB1866\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD   0x2"
Flag indicates HW is capable of generating events in RTE_EVENT_OP_FORWARD enqueue operation\&. Cryptodev will send packets to the event device as forwarded event using an internal event port\&. 
.PP
Definition at line \fB1873\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND   0x4"
Flag indicates HW is capable of mapping crypto queue pair to event queue\&. 
.PP
Definition at line \fB1880\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA   0x8"
Flag indicates HW/SW supports a mechanism to store and retrieve the private data information along with the crypto session\&. 
.PP
Definition at line \fB1885\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_CRYPTO_ADAPTER_CAP_EVENT_VECTOR   0x10"
Flag indicates HW is capable of aggregating processed crypto operations into rte_event_vector\&. 
.PP
Definition at line \fB1890\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_OP_NEW   0x1"
Flag indicates HW is capable of generating events in RTE_EVENT_OP_NEW enqueue operation\&. DMADEV will send packets to the event device as new events using an internal event port\&. 
.PP
Definition at line \fB1919\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_OP_FWD   0x2"
Flag indicates HW is capable of generating events in RTE_EVENT_OP_FORWARD enqueue operation\&. DMADEV will send packets to the event device as forwarded event using an internal event port\&. 
.PP
Definition at line \fB1926\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND   0x4"
Flag indicates HW is capable of mapping DMA vchan to event queue\&. 
.PP
Definition at line \fB1933\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT   0x1"
This flag is sent when the PMD supports a packet transmit callback 
.PP
Definition at line \fB1961\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR   0x2"
Indicates that the Tx adapter is capable of handling event vector of mbufs\&. 
.PP
Definition at line \fB1964\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_VECTOR_ADAPTER_CAP_INTERNAL_PORT   0x1"
This flag is set when the vector adapter is capable of generating events using an internal event port\&. 
.PP
Definition at line \fB1990\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_XSTATS_NAME_SIZE   64"
Maximum name length for extended statistics counters 
.PP
Definition at line \fB2397\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "#define RTE_EVENT_DEV_MAINT_OP_FLUSH   (1 << 0)"
Force an immediately flush of any buffered events in the port, potentially at the cost of additional overhead\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_maintain()\fP 
.RE
.PP

.PP
Definition at line \fB2868\fP of file \fBrte_eventdev\&.h\fP\&.
.SH "Typedef Documentation"
.PP 
.SS "\fBtypedef\fP void(* rte_eventdev_port_flush_t) (uint8_t dev_id, struct \fBrte_event\fP event, void *arg)"
Callback function prototype that can be passed during rte_event_port_release(), invoked once per a released event\&. 
.PP
Definition at line \fB1269\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "\fBtypedef\fP void(* rte_eventdev_stop_flush_t) (uint8_t dev_id, struct \fBrte_event\fP event, void *arg)"
Callback function called during \fBrte_event_dev_stop()\fP, invoked once per flushed event\&. 
.PP
Definition at line \fB1390\fP of file \fBrte_eventdev\&.h\fP\&.
.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBrte_event_dev_preschedule_type\fP"
Event device pre-schedule type enumeration\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_EVENT_PRESCHEDULE_NONE \fP
Disable pre-schedule across the event device or on a given event port\&. \fBpreschedule_type\fP \fBrte_event_port_preschedule_modify()\fP 
.TP
\f(BIRTE_EVENT_PRESCHEDULE \fP
Enable pre-schedule always across the event device or a given event port\&. \fBpreschedule_type\fP \fBrte_event_port_preschedule_modify()\fP 
.PP
\fBSee also\fP
.RS 4
\fBRTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE\fP 

.PP
\fBRTE_EVENT_DEV_CAP_PER_PORT_PRESCHEDULE\fP 
.RE
.PP

.TP
\f(BIRTE_EVENT_PRESCHEDULE_ADAPTIVE \fP
Enable adaptive pre-schedule across the event device or a given event port\&. Delay issuing pre-schedule until there are no forward progress constraints with the held flow contexts\&. \fBpreschedule_type\fP \fBrte_event_port_preschedule_modify()\fP 
.PP
\fBSee also\fP
.RS 4
\fBRTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE\fP 

.PP
\fBRTE_EVENT_DEV_CAP_PER_PORT_PRESCHEDULE\fP 
.RE
.PP

.PP
Definition at line \fB743\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "enum \fBrte_event_dev_xstats_mode\fP"
Selects the component of the eventdev to retrieve statistics from\&. 
.PP
Definition at line \fB2402\fP of file \fBrte_eventdev\&.h\fP\&.
.SH "Function Documentation"
.PP 
.SS "uint8_t rte_event_dev_count (void )"
Get the total number of event devices\&.

.PP
\fBReturns\fP
.RS 4
The total number of usable event devices\&. 
.RE
.PP

.SS "int rte_event_dev_get_dev_id (const char * name)"
Get the device identifier for the named event device\&.

.PP
\fBParameters\fP
.RS 4
\fIname\fP Event device name to select the event device identifier\&.
.RE
.PP
\fBReturns\fP
.RS 4
Event device identifier (dev_id >= 0) on success\&. Negative error code on failure:
.IP "\(bu" 2
-EINVAL - input name parameter is invalid\&.
.IP "\(bu" 2
-ENODEV - no event device found with that name\&. 
.PP
.RE
.PP

.SS "int rte_event_dev_socket_id (uint8_t dev_id)"
Return the NUMA socket to which a device is connected\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.RE
.PP
\fBReturns\fP
.RS 4
The NUMA socket id to which the device is connected or a default of zero if the socket could not be determined\&. -EINVAL on error, where the given dev_id value does not correspond to any event device\&. 
.RE
.PP

.SS "int rte_event_dev_info_get (uint8_t dev_id, struct \fBrte_event_dev_info\fP * dev_info)"
Retrieve details of an event device's capabilities and configuration limits\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIdev_info\fP A pointer to a structure of type \fI\fBrte_event_dev_info\fP\fP to be filled with the information about the device's capabilities\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success, information about the event device is present in dev_info\&.
.IP "\(bu" 2
<0: Failure, error code returned by the function\&.
.IP "  \(bu" 4
-EINVAL - invalid input parameters, e\&.g\&. incorrect device id\&.
.IP "  \(bu" 4
-ENOTSUP - device does not support returning capabilities information\&. 
.PP

.PP
.RE
.PP

.SS "int rte_event_dev_attr_get (uint8_t dev_id, uint32_t attr_id, uint32_t * attr_value)"
Get an attribute from a device\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP Eventdev id 
.br
\fIattr_id\fP The attribute ID to retrieve 
.br
\fIattr_value\fP A pointer that will be filled in with the attribute value if successful\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Successfully retrieved attribute value
.IP "\(bu" 2
-EINVAL: Invalid device or \fIattr_id\fP provided, or \fIattr_value\fP is NULL 
.PP
.RE
.PP

.SS "int rte_event_dev_configure (uint8_t dev_id, const struct \fBrte_event_dev_config\fP * dev_conf)"
Configure an event device\&.

.PP
This function must be invoked before any other configuration function in the API, when preparing an event device for application use\&. This function can also be re-invoked when a device is in the stopped state\&.

.PP
The caller should use \fBrte_event_dev_info_get()\fP to get the capabilities and resource limits for this event device before calling this API\&. Many values in the dev_conf input parameter are subject to limits given in the device information returned from \fBrte_event_dev_info_get()\fP\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device to configure\&. 
.br
\fIdev_conf\fP The event device configuration structure\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success, device configured\&.
.IP "\(bu" 2
<0: Error code returned by the driver configuration function\&.
.IP "  \(bu" 4
-ENOTSUP - device does not support configuration\&.
.IP "  \(bu" 4
-EINVAL - invalid input parameter\&.
.IP "  \(bu" 4
-EBUSY - device has already been started\&. 
.PP

.PP
.RE
.PP

.SS "int rte_event_queue_default_conf_get (uint8_t dev_id, uint8_t queue_id, struct \fBrte_event_queue_conf\fP * queue_conf)"
Retrieve the default configuration information of an event queue designated by its \fIqueue_id\fP from the event driver for an event device\&.

.PP
This function intended to be used in conjunction with \fBrte_event_queue_setup()\fP where caller needs to set up the queue by overriding few default values\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIqueue_id\fP The index of the event queue to get the configuration information\&. The value must be less than \fBnb_event_queues\fP previously supplied to \fBrte_event_dev_configure()\fP\&. 
.br
\fIqueue_conf\fP The pointer to the default event queue configuration data\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success, driver updates the default event queue configuration data\&.
.IP "\(bu" 2
<0: Error code returned by the driver info get function\&.
.PP
.RE
.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_setup()\fP 
.RE
.PP

.SS "int rte_event_queue_setup (uint8_t dev_id, uint8_t queue_id, const struct \fBrte_event_queue_conf\fP * queue_conf)"
Allocate and set up an event queue for an event device\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIqueue_id\fP The index of the event queue to setup\&. The value must be less than \fBnb_event_queues\fP previously supplied to \fBrte_event_dev_configure()\fP\&. 
.br
\fIqueue_conf\fP The pointer to the configuration data to be used for the event queue\&. NULL value is allowed, in which case default configuration used\&.
.RE
.PP
\fBSee also\fP
.RS 4
\fBrte_event_queue_default_conf_get()\fP
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success, event queue correctly set up\&.
.IP "\(bu" 2
<0: event queue configuration failed\&. 
.PP
.RE
.PP

.SS "int rte_event_queue_attr_get (uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, uint32_t * attr_value)"
Get an attribute of an event queue\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIqueue_id\fP The index of the event queue to query\&. The value must be less than \fBnb_event_queues\fP previously supplied to \fBrte_event_dev_configure()\fP\&. 
.br
\fIattr_id\fP The attribute ID to retrieve (RTE_EVENT_QUEUE_ATTR_*)\&. 
.br
\fIattr_value\fP A pointer that will be filled in with the attribute value if successful\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Successfully returned value
.IP "\(bu" 2
-EINVAL: invalid device, queue or attr_id provided, or attr_value was NULL\&.
.IP "\(bu" 2
-EOVERFLOW: returned when attr_id is set to \fBRTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE\fP and \fBRTE_EVENT_QUEUE_CFG_ALL_TYPES\fP is set in the queue configuration flags\&. 
.PP
.RE
.PP

.SS "int rte_event_queue_attr_set (uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, uint64_t attr_value)"
Set an event queue attribute\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIqueue_id\fP The index of the event queue to configure\&. The value must be less than \fBnb_event_queues\fP previously supplied to \fBrte_event_dev_configure()\fP\&. 
.br
\fIattr_id\fP The attribute ID to set (RTE_EVENT_QUEUE_ATTR_*)\&. 
.br
\fIattr_value\fP The attribute value to set\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Successfully set attribute\&.
.IP "\(bu" 2
<0: failed to set event queue attribute\&.
.IP "\(bu" 2
-EINVAL: invalid device, queue or attr_id\&.
.IP "\(bu" 2
-ENOTSUP: device does not support setting the event attribute\&. 
.PP
.RE
.PP

.SS "int rte_event_port_default_conf_get (uint8_t dev_id, uint8_t port_id, struct \fBrte_event_port_conf\fP * port_conf)"
Retrieve the default configuration information of an event port designated by its \fIport_id\fP from the event driver for an event device\&.

.PP
This function is intended to be used in conjunction with \fBrte_event_port_setup()\fP where the caller can set up the port by just overriding few default values\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIport_id\fP The index of the event port to get the configuration information\&. The value must be less than \fBnb_event_ports\fP previously supplied to \fBrte_event_dev_configure()\fP\&. 
.br
\fIport_conf\fP The pointer to a structure to store the default event port configuration data\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success, driver updates the default event port configuration data\&.
.IP "\(bu" 2
<0: Error code returned by the driver info get function\&.
.IP "  \(bu" 4
-EINVAL - invalid input parameter\&.
.IP "  \(bu" 4
-ENOTSUP - function is not supported for this device\&.
.PP

.PP
.RE
.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_setup()\fP 
.RE
.PP

.SS "int rte_event_port_setup (uint8_t dev_id, uint8_t port_id, const struct \fBrte_event_port_conf\fP * port_conf)"
Allocate and set up an event port for an event device\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIport_id\fP The index of the event port to setup\&. The value must be less than \fBnb_event_ports\fP previously supplied to \fBrte_event_dev_configure()\fP\&. 
.br
\fIport_conf\fP The pointer to the configuration data to be used for the port\&. NULL value is allowed, in which case the default configuration is used\&.
.RE
.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_default_conf_get()\fP
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success, event port correctly set up\&.
.IP "\(bu" 2
<0: Port configuration failed\&.
.IP "  \(bu" 4
-EINVAL - Invalid input parameter\&.
.IP "  \(bu" 4
-EBUSY - Port already started\&.
.IP "  \(bu" 4
-ENOTSUP - Function not supported on this device, or a NULL pointer passed as the port_conf parameter, and no default configuration function available for this device\&.
.IP "  \(bu" 4
-EDQUOT - Application tried to link a queue configured with \fBRTE_EVENT_QUEUE_CFG_SINGLE_LINK\fP to more than one event port\&. 
.PP

.PP
.RE
.PP

.SS "void rte_event_port_quiesce (uint8_t dev_id, uint8_t port_id, \fBrte_eventdev_port_flush_t\fP release_cb, void * args)"
Quiesce any core specific resources consumed by the event port\&.

.PP
Event ports are generally coupled with lcores, and a given Hardware implementation might require the PMD to store port specific data in the lcore\&. When the application decides to migrate the event port to another lcore or teardown the current lcore it may to call \fR\fBrte_event_port_quiesce\fP\fP to make sure that all the data associated with the event port are released from the lcore, this might also include any prefetched events\&. While releasing the event port from the lcore, this function calls the user-provided flush callback once per event\&.

.PP
\fBNote\fP
.RS 4
Invocation of this API does not affect the existing port configuration\&.
.RE
.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIport_id\fP The index of the event port to quiesce\&. The value must be less than \fBnb_event_ports\fP previously supplied to \fBrte_event_dev_configure()\fP\&. 
.br
\fIrelease_cb\fP Callback function invoked once per flushed event\&. 
.br
\fIargs\fP Argument supplied to callback\&. 
.RE
.PP

.SS "int rte_event_port_attr_get (uint8_t dev_id, uint8_t port_id, uint32_t attr_id, uint32_t * attr_value)"
Get an attribute from a port\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIport_id\fP The index of the event port to query\&. The value must be less than \fBnb_event_ports\fP previously supplied to \fBrte_event_dev_configure()\fP\&. 
.br
\fIattr_id\fP The attribute ID to retrieve (RTE_EVENT_PORT_ATTR_*) 
.br
\fIattr_value\fP A pointer that will be filled in with the attribute value if successful
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Successfully returned value\&.
.IP "\(bu" 2
(-EINVAL) Invalid device, port or attr_id, or attr_value was NULL\&. 
.PP
.RE
.PP

.SS "int rte_event_dev_start (uint8_t dev_id)"
Start an event device\&.

.PP
The device start step is the last one in device setup, and enables the event ports and queues to start accepting events and scheduling them to event ports\&.

.PP
On success, all basic functions exported by the API (event enqueue, event dequeue and so on) can be invoked\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP Event device identifier\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success, device started\&.
.IP "\(bu" 2
-EINVAL: Invalid device id provided\&.
.IP "\(bu" 2
-ENOTSUP: Device does not support this operation\&.
.IP "\(bu" 2
-ESTALE : Not all ports of the device are configured\&.
.IP "\(bu" 2
-ENOLINK: Not all queues are linked, which could lead to deadlock\&. 
.PP
.RE
.PP

.SS "void rte_event_dev_stop (uint8_t dev_id)"
Stop an event device\&.

.PP
This function causes all queued events to be drained, including those residing in event ports\&. While draining events out of the device, this function calls the user-provided flush callback (if one was registered) once per event\&.

.PP
The device can be restarted with a call to \fBrte_event_dev_start()\fP\&. Threads that continue to enqueue/dequeue while the device is stopped, or being stopped, will result in undefined behavior\&. This includes event adapters, which must be stopped prior to stopping the eventdev\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP Event device identifier\&.
.RE
.PP
\fBSee also\fP
.RS 4
\fBrte_event_dev_stop_flush_callback_register()\fP 
.RE
.PP

.SS "int rte_event_dev_stop_flush_callback_register (uint8_t dev_id, \fBrte_eventdev_stop_flush_t\fP callback, void * userdata)"
Registers a callback function to be invoked during \fBrte_event_dev_stop()\fP for each flushed event\&. This function can be used to properly dispose of queued events, for example events containing memory pointers\&.

.PP
The callback function is only registered for the calling process\&. The callback function must be registered in every process that can call \fBrte_event_dev_stop()\fP\&.

.PP
Only one callback function may be registered\&. Each new call replaces the existing registered callback function with the new function passed in\&.

.PP
To unregister a callback, call this function with a NULL callback pointer\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIcallback\fP Callback function to be invoked once per flushed event\&. Pass NULL to unset any previously-registered callback function\&. 
.br
\fIuserdata\fP Argument supplied to callback\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0 on success\&.
.IP "\(bu" 2
-EINVAL if \fIdev_id\fP is invalid\&.
.PP
.RE
.PP
\fBSee also\fP
.RS 4
\fBrte_event_dev_stop()\fP 
.RE
.PP

.SS "int rte_event_dev_close (uint8_t dev_id)"
Close an event device\&. The device cannot be restarted!

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP Event device identifier\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0 on successfully closing device
.IP "\(bu" 2
<0 on failure to close device\&.
.IP "  \(bu" 4
-EINVAL - invalid device id\&.
.IP "  \(bu" 4
-ENOTSUP - operation not supported for this device\&.
.IP "  \(bu" 4
-EAGAIN - device is busy\&. 
.PP

.PP
.RE
.PP

.SS "struct __rte_aligned (16 )"
Event vector structure\&. < Number of elements valid in this event vector\&.

.PP
< Offset into the vector array where valid elements start from\&.

.PP
< Reserved for future use

.PP
< Indicates that the below union attributes have valid information\&.

.PP
< Ethernet device port id\&.

.PP
< Ethernet device queue id\&.

.PP
< Union to hold common attributes of the vector array\&.

.PP
< Implementation specific opaque value\&. An implementation may use this field to hold implementation specific value to share between dequeue and enqueue operation\&. The application should not modify this field\&.

.PP
< Start of the vector array union\&. Depending upon the event type the vector array can be an array of mbufs or pointers or opaque u64 values\&.
.PP
Definition at line \fB1441\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "int rte_event_eth_rx_adapter_caps_get (uint8_t dev_id, uint16_t eth_port_id, uint32_t * caps)"
Retrieve the event device's ethdev Rx adapter capabilities for the specified ethernet port

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIeth_port_id\fP The identifier of the ethernet device\&.
.br
\fIcaps\fP A pointer to memory filled with Rx event adapter capabilities\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success, driver provides Rx event adapter capabilities for the ethernet device\&.
.IP "\(bu" 2
<0: Error code returned by the driver function\&. 
.PP
.RE
.PP

.SS "int rte_event_timer_adapter_caps_get (uint8_t dev_id, uint32_t * caps)"
Retrieve the event device's timer adapter capabilities\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIcaps\fP A pointer to memory to be filled with event timer adapter capabilities\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success, driver provided event timer adapter capabilities\&.
.IP "\(bu" 2
<0: Error code returned by the driver function\&. 
.PP
.RE
.PP

.SS "int rte_event_crypto_adapter_caps_get (uint8_t dev_id, uint8_t cdev_id, uint32_t * caps)"
Retrieve the event device's crypto adapter capabilities for the specified cryptodev device

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIcdev_id\fP The identifier of the cryptodev device\&.
.br
\fIcaps\fP A pointer to memory filled with event adapter capabilities\&. It is expected to be pre-allocated & initialized by caller\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success, driver provides event adapter capabilities for the cryptodev device\&.
.IP "\(bu" 2
<0: Error code returned by the driver function\&. 
.PP
.RE
.PP

.SS "__rte_experimental int rte_event_dma_adapter_caps_get (uint8_t dev_id, uint8_t dmadev_id, uint32_t * caps)"
Retrieve the event device's DMA adapter capabilities for the specified dmadev device

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIdmadev_id\fP The identifier of the dmadev device\&.
.br
\fIcaps\fP A pointer to memory filled with event adapter capabilities\&. It is expected to be pre-allocated & initialized by caller\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success, driver provides event adapter capabilities for the dmadev device\&.
.IP "\(bu" 2
<0: Error code returned by the driver function\&. 
.PP
.RE
.PP

.SS "int rte_event_eth_tx_adapter_caps_get (uint8_t dev_id, uint16_t eth_port_id, uint32_t * caps)"
Retrieve the event device's eth Tx adapter capabilities

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIeth_port_id\fP The identifier of the ethernet device\&.
.br
\fIcaps\fP A pointer to memory filled with eth Tx adapter capabilities\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success, driver provides eth Tx adapter capabilities\&.
.IP "\(bu" 2
<0: Error code returned by the driver function\&. 
.PP
.RE
.PP

.SS "int rte_event_dequeue_timeout_ticks (uint8_t dev_id, uint64_t ns, uint64_t * timeout_ticks)"
Converts nanoseconds to \fItimeout_ticks\fP value for \fBrte_event_dequeue_burst()\fP

.PP
If the device is configured with RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT flag then application can use this function to convert timeout value in nanoseconds to implementations specific timeout value supplied in \fBrte_event_dequeue_burst()\fP

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIns\fP Wait time in nanosecond 
.br
\fItimeout_ticks\fP Value for the \fItimeout_ticks\fP parameter in \fBrte_event_dequeue_burst()\fP
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0 on success\&.
.IP "\(bu" 2
-ENOTSUP if the device doesn't support timeouts
.IP "\(bu" 2
-EINVAL if \fIdev_id\fP is invalid or \fItimeout_ticks\fP is NULL
.IP "\(bu" 2
other values < 0 on failure\&.
.PP
.RE
.PP
\fBSee also\fP
.RS 4
\fBrte_event_dequeue_burst()\fP, \fBRTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT\fP 

.PP
\fBrte_event_dev_configure()\fP 
.RE
.PP

.SS "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)"
Link multiple source event queues supplied in \fIqueues\fP to the destination event port designated by its \fIport_id\fP with associated service priority supplied in \fIpriorities\fP on the event device designated by its \fIdev_id\fP\&.

.PP
The link establishment shall enable the event port \fIport_id\fP from receiving events from the specified event queue(s) supplied in \fIqueues\fP

.PP
An event queue may link to one or more event ports\&. The number of links can be established from an event queue to event port is implementation defined\&.

.PP
Event queue(s) to event port link establishment can be changed at runtime without re-configuring the device to support scaling and to reduce the latency of critical work by establishing the link with more event ports at runtime\&.

.PP
When the value of \fR\fBrte_event_dev_info::max_profiles_per_port\fP\fP is greater than or equal to one, this function links the event queues to the default profile_id i\&.e\&. profile_id 0 of the event port\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIport_id\fP Event port identifier to select the destination port to link\&.
.br
\fIqueues\fP Points to an array of \fInb_links\fP event queues to be linked to the event port\&. NULL value is allowed, in which case this function links all the configured event queues \fInb_event_queues\fP which previously supplied to \fBrte_event_dev_configure()\fP to the event port \fIport_id\fP
.br
\fIpriorities\fP Points to an array of \fInb_links\fP service priorities associated with each event queue link to event port\&. The priority defines the event port's servicing priority for event queue, which may be ignored by an implementation\&. The requested priority should in the range of [RTE_EVENT_DEV_PRIORITY_HIGHEST, RTE_EVENT_DEV_PRIORITY_LOWEST]\&. The implementation shall normalize the requested priority to implementation supported priority value\&. NULL value is allowed, in which case this function links the event queues with RTE_EVENT_DEV_PRIORITY_NORMAL servicing priority
.br
\fInb_links\fP The number of links to establish\&. This parameter is ignored if queues is NULL\&.
.RE
.PP
\fBReturns\fP
.RS 4
The number of links actually established\&. The return value can be less than the value of the \fInb_links\fP parameter when the implementation has the limitation on specific queue to port link establishment or if invalid parameters are specified in \fIqueues\fP If the return value is less than \fInb_links\fP, the remaining links at the end of link[] are not established, and the caller has to take care of them\&. If return value is less than \fInb_links\fP then implementation shall update the rte_errno accordingly, Possible rte_errno values are (EDQUOT) Quota exceeded(Application tried to link the queue configured with
 RTE_EVENT_QUEUE_CFG_SINGLE_LINK to more than one event ports) (EINVAL) Invalid parameter 
.RE
.PP

.SS "int rte_event_port_unlink (uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint16_t nb_unlinks)"
Unlink multiple source event queues supplied in \fIqueues\fP from the destination event port designated by its \fIport_id\fP on the event device designated by its \fIdev_id\fP\&.

.PP
The unlink call issues an async request to disable the event port \fIport_id\fP from receiving events from the specified event queue \fIqueue_id\fP\&. Event queue(s) to event port unlink establishment can be changed at runtime without re-configuring the device\&.

.PP
When the value of \fR\fBrte_event_dev_info::max_profiles_per_port\fP\fP is greater than or equal to one, this function unlinks the event queues from the default profile identifier i\&.e\&. profile 0 of the event port\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_unlinks_in_progress()\fP to poll for completed unlinks\&.
.RE
.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIport_id\fP Event port identifier to select the destination port to unlink\&.
.br
\fIqueues\fP Points to an array of \fInb_unlinks\fP event queues to be unlinked from the event port\&. NULL value is allowed, in which case this function unlinks all the event queue(s) from the event port \fIport_id\fP\&.
.br
\fInb_unlinks\fP The number of unlinks to establish\&. This parameter is ignored if queues is NULL\&.
.RE
.PP
\fBReturns\fP
.RS 4
The number of unlinks successfully requested\&. The return value can be less than the value of the \fInb_unlinks\fP parameter when the implementation has the limitation on specific queue to port unlink establishment or if invalid parameters are specified\&. If the return value is less than \fInb_unlinks\fP, the remaining queues at the end of queues[] are not unlinked, and the caller has to take care of them\&. If return value is less than \fInb_unlinks\fP then implementation shall update the rte_errno accordingly, Possible rte_errno values are (EINVAL) Invalid parameter 
.RE
.PP

.SS "__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)"
Link multiple source event queues supplied in \fIqueues\fP to the destination event port designated by its \fIport_id\fP with associated profile identifier supplied in \fIprofile_id\fP with service priorities supplied in \fIpriorities\fP on the event device designated by its \fIdev_id\fP\&.

.PP
If \fIprofile_id\fP is set to 0 then, the links created by the call \fR\fBrte_event_port_link\fP\fP will be overwritten\&.

.PP
Event ports by default use profile_id 0 unless it is changed using the call \fR\fBrte_event_port_profile_switch()\fP\fP\&.

.PP
The link establishment shall enable the event port \fIport_id\fP from receiving events from the specified event queue(s) supplied in \fIqueues\fP

.PP
An event queue may link to one or more event ports\&. The number of links can be established from an event queue to event port is implementation defined\&.

.PP
Event queue(s) to event port link establishment can be changed at runtime without re-configuring the device to support scaling and to reduce the latency of critical work by establishing the link with more event ports at runtime\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIport_id\fP Event port identifier to select the destination port to link\&.
.br
\fIqueues\fP Points to an array of \fInb_links\fP event queues to be linked to the event port\&. NULL value is allowed, in which case this function links all the configured event queues \fInb_event_queues\fP which previously supplied to \fBrte_event_dev_configure()\fP to the event port \fIport_id\fP
.br
\fIpriorities\fP Points to an array of \fInb_links\fP service priorities associated with each event queue link to event port\&. The priority defines the event port's servicing priority for event queue, which may be ignored by an implementation\&. The requested priority should in the range of [RTE_EVENT_DEV_PRIORITY_HIGHEST, RTE_EVENT_DEV_PRIORITY_LOWEST]\&. The implementation shall normalize the requested priority to implementation supported priority value\&. NULL value is allowed, in which case this function links the event queues with RTE_EVENT_DEV_PRIORITY_NORMAL servicing priority
.br
\fInb_links\fP The number of links to establish\&. This parameter is ignored if queues is NULL\&.
.br
\fIprofile_id\fP The profile identifier associated with the links between event queues and event port\&. Should be less than the max capability reported by \fR\fBrte_event_dev_info::max_profiles_per_port\fP\fP
.RE
.PP
\fBReturns\fP
.RS 4
The number of links actually established\&. The return value can be less than the value of the \fInb_links\fP parameter when the implementation has the limitation on specific queue to port link establishment or if invalid parameters are specified in \fIqueues\fP If the return value is less than \fInb_links\fP, the remaining links at the end of link[] are not established, and the caller has to take care of them\&. If return value is less than \fInb_links\fP then implementation shall update the rte_errno accordingly, Possible rte_errno values are (EDQUOT) Quota exceeded(Application tried to link the queue configured with
 RTE_EVENT_QUEUE_CFG_SINGLE_LINK to more than one event ports) (EINVAL) Invalid parameter 
.RE
.PP

.SS "__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)"
Unlink multiple source event queues supplied in \fIqueues\fP that belong to profile designated by \fIprofile_id\fP from the destination event port designated by its \fIport_id\fP on the event device designated by its \fIdev_id\fP\&.

.PP
If \fIprofile_id\fP is set to 0 i\&.e\&., the default profile then, then this function will act as \fR\fBrte_event_port_unlink\fP\fP\&.

.PP
The unlink call issues an async request to disable the event port \fIport_id\fP from receiving events from the specified event queue \fIqueue_id\fP\&. Event queue(s) to event port unlink establishment can be changed at runtime without re-configuring the device\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_unlinks_in_progress()\fP to poll for completed unlinks\&.
.RE
.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIport_id\fP Event port identifier to select the destination port to unlink\&.
.br
\fIqueues\fP Points to an array of \fInb_unlinks\fP event queues to be unlinked from the event port\&. NULL value is allowed, in which case this function unlinks all the event queue(s) from the event port \fIport_id\fP\&.
.br
\fInb_unlinks\fP The number of unlinks to establish\&. This parameter is ignored if queues is NULL\&.
.br
\fIprofile_id\fP The profile identifier associated with the links between event queues and event port\&. Should be less than the max capability reported by \fR\fBrte_event_dev_info::max_profiles_per_port\fP\fP
.RE
.PP
\fBReturns\fP
.RS 4
The number of unlinks successfully requested\&. The return value can be less than the value of the \fInb_unlinks\fP parameter when the implementation has the limitation on specific queue to port unlink establishment or if invalid parameters are specified\&. If the return value is less than \fInb_unlinks\fP, the remaining queues at the end of queues[] are not unlinked, and the caller has to take care of them\&. If return value is less than \fInb_unlinks\fP then implementation shall update the rte_errno accordingly, Possible rte_errno values are (EINVAL) Invalid parameter 
.RE
.PP

.SS "int rte_event_port_unlinks_in_progress (uint8_t dev_id, uint8_t port_id)"
Returns the number of unlinks in progress\&.

.PP
This function provides the application with a method to detect when an unlink has been completed by the implementation\&.

.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_unlink()\fP to issue unlink requests\&.
.RE
.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIport_id\fP Event port identifier to select port to check for unlinks in progress\&.
.RE
.PP
\fBReturns\fP
.RS 4
The number of unlinks that are in progress\&. A return of zero indicates that there are no outstanding unlink requests\&. A positive return value indicates the number of unlinks that are in progress, but are not yet complete\&. A negative return value indicates an error, -EINVAL indicates an invalid parameter passed for \fIdev_id\fP or \fIport_id\fP\&. 
.RE
.PP

.SS "int rte_event_port_links_get (uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint8_t priorities[])"
Retrieve the list of source event queues and its associated service priority linked to the destination event port designated by its \fIport_id\fP on the event device designated by its \fIdev_id\fP\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIport_id\fP Event port identifier\&.
.br
\fIqueues\fP Points to an array of \fIqueues\fP for output\&. The caller has to allocate \fIRTE_EVENT_MAX_QUEUES_PER_DEV\fP bytes to store the event queue(s) linked with event port \fIport_id\fP
.br
\fIpriorities\fP Points to an array of \fIpriorities\fP for output\&. The caller has to allocate \fIRTE_EVENT_MAX_QUEUES_PER_DEV\fP bytes to store the service priority associated with each event queue linked
.RE
.PP
\fBReturns\fP
.RS 4
The number of links established on the event port designated by its \fIport_id\fP\&.
.IP "\(bu" 2
<0 on failure\&. 
.PP
.RE
.PP

.SS "__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)"
Retrieve the list of source event queues and its service priority associated to a \fIprofile_id\fP and linked to the destination event port designated by its \fIport_id\fP on the event device designated by its \fIdev_id\fP\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIport_id\fP Event port identifier\&.
.br
\fIqueues\fP Points to an array of \fIqueues\fP for output\&. The caller has to allocate \fIRTE_EVENT_MAX_QUEUES_PER_DEV\fP bytes to store the event queue(s) linked with event port \fIport_id\fP
.br
\fIpriorities\fP Points to an array of \fIpriorities\fP for output\&. The caller has to allocate \fIRTE_EVENT_MAX_QUEUES_PER_DEV\fP bytes to store the service priority associated with each event queue linked
.br
\fIprofile_id\fP The profile identifier associated with the links between event queues and event port\&. Should be less than the max capability reported by \fR\fBrte_event_dev_info::max_profiles_per_port\fP\fP
.RE
.PP
\fBReturns\fP
.RS 4
The number of links established on the event port designated by its \fIport_id\fP\&.
.IP "\(bu" 2
<0 on failure\&. 
.PP
.RE
.PP

.SS "int rte_event_dev_service_id_get (uint8_t dev_id, uint32_t * service_id)"
Retrieve the service ID of the event dev\&. If the adapter doesn't use a rte_service function, this function returns -ESRCH\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIservice_id\fP A pointer to a uint32_t, to be filled in with the service id\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Success
.IP "\(bu" 2
<0: Error code on failure, if the event dev doesn't use a rte_service function, this function returns -ESRCH\&. 
.PP
.RE
.PP

.SS "int rte_event_dev_dump (uint8_t dev_id, FILE * f)"
Dump internal information about \fIdev_id\fP to the FILE* provided in \fIf\fP\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&.
.br
\fIf\fP A pointer to a file for output
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: on success
.IP "\(bu" 2
<0: on failure\&. 
.PP
.RE
.PP

.SS "int rte_event_dev_xstats_names_get (uint8_t dev_id, enum \fBrte_event_dev_xstats_mode\fP mode, uint8_t queue_port_id, struct \fBrte_event_dev_xstats_name\fP * xstats_names, uint64_t * ids, unsigned int size)"
Retrieve names of extended statistics of an event device\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the event device\&. 
.br
\fImode\fP The mode of statistics to retrieve\&. Choices include the device statistics, port statistics or queue statistics\&. 
.br
\fIqueue_port_id\fP Used to specify the port or queue number in queue or port mode, and is ignored in device mode\&. 
.br
\fIxstats_names\fP Block of memory to insert names into\&. Must be at least size in capacity\&. If set to NULL, function returns required capacity\&. 
.br
\fIids\fP Block of memory to insert ids into\&. Must be at least size in capacity\&. If set to NULL, function returns required capacity\&. The id values returned can be passed to \fIrte_event_dev_xstats_get\fP to select statistics\&. 
.br
\fIsize\fP Capacity of xstats_names (number of names)\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
positive value lower or equal to size: success\&. The return value is the number of entries filled in the stats table\&.
.IP "\(bu" 2
positive value higher than size: error, the given statistics table is too small\&. The return value corresponds to the size that should be given to succeed\&. The entries in the table are not valid and shall not be used by the caller\&.
.IP "\(bu" 2
negative value on error: -ENODEV for invalid \fIdev_id\fP -EINVAL for invalid mode, queue port or id parameters -ENOTSUP if the device doesn't support this function\&. 
.PP
.RE
.PP

.SS "int rte_event_dev_xstats_get (uint8_t dev_id, enum \fBrte_event_dev_xstats_mode\fP mode, uint8_t queue_port_id, const uint64_t ids[], uint64_t values[], unsigned int n)"
Retrieve extended statistics of an event device\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fImode\fP The mode of statistics to retrieve\&. Choices include the device statistics, port statistics or queue statistics\&. 
.br
\fIqueue_port_id\fP Used to specify the port or queue number in queue or port mode, and is ignored in device mode\&. 
.br
\fIids\fP The id numbers of the stats to get\&. The ids can be got from the stat position in the stat list from rte_event_dev_get_xstats_names(), or by using \fBrte_event_dev_xstats_by_name_get()\fP\&. 
.br
\fIvalues\fP The values for each stats request by ID\&. 
.br
\fIn\fP The number of stats requested 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
positive value: number of stat entries filled into the values array
.IP "\(bu" 2
negative value on error: -ENODEV for invalid \fIdev_id\fP -EINVAL for invalid mode, queue port or id parameters -ENOTSUP if the device doesn't support this function\&. 
.PP
.RE
.PP

.SS "uint64_t rte_event_dev_xstats_by_name_get (uint8_t dev_id, const char * name, uint64_t * id)"
Retrieve the value of a single stat by requesting it by name\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device 
.br
\fIname\fP The stat name to retrieve 
.br
\fIid\fP If non-NULL, the numerical id of the stat will be returned, so that further requests for the stat can be got using rte_event_dev_xstats_get, which will be faster as it doesn't need to scan a list of names for the stat\&. If the stat cannot be found, the id returned will be (unsigned)-1\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
positive value or zero: the stat value
.IP "\(bu" 2
negative value: -EINVAL if stat not found, -ENOTSUP if not supported\&. 
.PP
.RE
.PP

.SS "int rte_event_dev_xstats_reset (uint8_t dev_id, enum \fBrte_event_dev_xstats_mode\fP mode, int16_t queue_port_id, const uint64_t ids[], uint32_t nb_ids)"
Reset the values of the xstats of the selected component in the device\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device 
.br
\fImode\fP The mode of the statistics to reset\&. Choose from device, queue or port\&. 
.br
\fIqueue_port_id\fP The queue or port to reset\&. 0 and positive values select ports and queues, while -1 indicates all ports or queues\&. 
.br
\fIids\fP Selects specific statistics to be reset\&. When NULL, all statistics selected by \fImode\fP will be reset\&. If non-NULL, must point to array of at least \fInb_ids\fP size\&. 
.br
\fInb_ids\fP The number of ids available from the \fIids\fP array\&. Ignored when ids is NULL\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
zero: successfully reset the statistics to zero
.IP "\(bu" 2
negative value: -EINVAL invalid parameters, -ENOTSUP if not supported\&. 
.PP
.RE
.PP

.SS "int rte_event_dev_selftest (uint8_t dev_id)"
Trigger the eventdev self test\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0: Selftest successful
.IP "\(bu" 2
-ENOTSUP if the device doesn't support selftest
.IP "\(bu" 2
other values < 0 on failure\&. 
.PP
.RE
.PP

.SS "struct \fBrte_mempool\fP * rte_event_vector_pool_create (const char * name, unsigned int n, unsigned int cache_size, uint16_t nb_elem, int socket_id)"
Get the memory required per event vector based on the number of elements per vector\&. This should be used to create the mempool that holds the event vectors\&.

.PP
\fBParameters\fP
.RS 4
\fIname\fP The name of the vector pool\&. 
.br
\fIn\fP The number of elements in the mbuf pool\&. 
.br
\fIcache_size\fP Size of the per-core object cache\&. See \fBrte_mempool_create()\fP for details\&. 
.br
\fInb_elem\fP The number of elements that a single event vector should be able to hold\&. 
.br
\fIsocket_id\fP The socket identifier where the memory should be allocated\&. The value can be \fISOCKET_ID_ANY\fP if there is no NUMA constraint for the reserved zone
.RE
.PP
\fBReturns\fP
.RS 4
The pointer to the newly allocated mempool, on success\&. NULL on error with rte_errno set appropriately\&. Possible rte_errno values include:
.IP "\(bu" 2
E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
.IP "\(bu" 2
E_RTE_SECONDARY - function was called from a secondary process instance
.IP "\(bu" 2
EINVAL - cache size provided is too large, or priv_size is not aligned\&.
.IP "\(bu" 2
ENOSPC - the maximum number of memzones has already been allocated
.IP "\(bu" 2
EEXIST - a memzone with the same name already exists
.IP "\(bu" 2
ENOMEM - no appropriate memory area found in which to create memzone
.IP "\(bu" 2
ENAMETOOLONG - mempool name requested is too long\&. 
.PP
.RE
.PP

.SS "uint16_t rte_event_enqueue_burst (uint8_t dev_id, uint8_t port_id, const struct \fBrte_event\fP ev[], uint16_t nb_events)\fR [inline]\fP, \fR [static]\fP"
Enqueue a burst of events objects or an event object supplied in \fI\fBrte_event\fP\fP structure on an event device designated by its \fIdev_id\fP through the event port specified by \fIport_id\fP\&. Each event object specifies the event queue on which it will be enqueued\&.

.PP
The \fInb_events\fP parameter is the number of event objects to enqueue which are supplied in the \fIev\fP array of \fI\fBrte_event\fP\fP structure\&.

.PP
Event operations RTE_EVENT_OP_FORWARD and RTE_EVENT_OP_RELEASE must only be enqueued to the same port that their associated events were dequeued from\&.

.PP
The \fBrte_event_enqueue_burst()\fP function returns the number of events objects it actually enqueued\&. A return value equal to \fInb_events\fP means that all event objects have been enqueued\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIport_id\fP The identifier of the event port\&. 
.br
\fIev\fP Points to an array of \fInb_events\fP objects of type \fI\fBrte_event\fP\fP structure which contain the event object enqueue operations to be processed\&. 
.br
\fInb_events\fP The number of event objects to enqueue, typically number of rte_event_port_attr_get(\&.\&.\&.RTE_EVENT_PORT_ATTR_ENQ_DEPTH\&.\&.\&.) available for this port\&.
.RE
.PP
\fBReturns\fP
.RS 4
The number of event objects actually enqueued on the event device\&. The return value can be less than the value of the \fInb_events\fP parameter when the event devices queue is full or if invalid parameters are specified in a \fI\fBrte_event\fP\fP\&. If the return value is less than \fInb_events\fP, the remaining events at the end of ev[] are not consumed and the caller has to take care of them, and rte_errno is set accordingly\&. Possible errno values include:
.IP "\(bu" 2
EINVAL The port ID is invalid, device ID is invalid, an event's queue ID is invalid, or an event's sched type doesn't match the capabilities of the destination queue\&.
.IP "\(bu" 2
ENOSPC The event port was backpressured and unable to enqueue one or more events\&. This error code is only applicable to closed systems\&. 
.PP
.RE
.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_attr_get()\fP, \fBRTE_EVENT_PORT_ATTR_ENQ_DEPTH\fP 
.RE
.PP

.PP
Definition at line \fB2662\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "uint16_t rte_event_enqueue_new_burst (uint8_t dev_id, uint8_t port_id, const struct \fBrte_event\fP ev[], uint16_t nb_events)\fR [inline]\fP, \fR [static]\fP"
Enqueue a burst of events objects of operation type \fIRTE_EVENT_OP_NEW\fP on an event device designated by its \fIdev_id\fP through the event port specified by \fIport_id\fP\&.

.PP
Provides the same functionality as \fBrte_event_enqueue_burst()\fP, expect that application can use this API when the all objects in the burst contains the enqueue operation of the type \fIRTE_EVENT_OP_NEW\fP\&. This specialized function can provide the additional hint to the PMD and optimize if possible\&.

.PP
The \fBrte_event_enqueue_new_burst()\fP result is undefined if the enqueue burst has event object of operation type != RTE_EVENT_OP_NEW\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIport_id\fP The identifier of the event port\&. 
.br
\fIev\fP Points to an array of \fInb_events\fP objects of type \fI\fBrte_event\fP\fP structure which contain the event object enqueue operations to be processed\&. 
.br
\fInb_events\fP The number of event objects to enqueue, typically number of rte_event_port_attr_get(\&.\&.\&.RTE_EVENT_PORT_ATTR_ENQ_DEPTH\&.\&.\&.) available for this port\&.
.RE
.PP
\fBReturns\fP
.RS 4
The number of event objects actually enqueued on the event device\&. The return value can be less than the value of the \fInb_events\fP parameter when the event devices queue is full or if invalid parameters are specified in a \fI\fBrte_event\fP\fP\&. If the return value is less than \fInb_events\fP, the remaining events at the end of ev[] are not consumed and the caller has to take care of them, and rte_errno is set accordingly\&. Possible errno values include:
.IP "\(bu" 2
EINVAL The port ID is invalid, device ID is invalid, an event's queue ID is invalid, or an event's sched type doesn't match the capabilities of the destination queue\&.
.IP "\(bu" 2
ENOSPC The event port was backpressured and unable to enqueue one or more events\&. This error code is only applicable to closed systems\&. 
.PP
.RE
.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_attr_get()\fP, \fBRTE_EVENT_PORT_ATTR_ENQ_DEPTH\fP 

.PP
\fBrte_event_enqueue_burst()\fP 
.RE
.PP

.PP
Definition at line \fB2714\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "uint16_t rte_event_enqueue_forward_burst (uint8_t dev_id, uint8_t port_id, const struct \fBrte_event\fP ev[], uint16_t nb_events)\fR [inline]\fP, \fR [static]\fP"
Enqueue a burst of events objects of operation type \fIRTE_EVENT_OP_FORWARD\fP on an event device designated by its \fIdev_id\fP through the event port specified by \fIport_id\fP\&.

.PP
Provides the same functionality as \fBrte_event_enqueue_burst()\fP, expect that application can use this API when the all objects in the burst contains the enqueue operation of the type \fIRTE_EVENT_OP_FORWARD\fP\&. This specialized function can provide the additional hint to the PMD and optimize if possible\&.

.PP
The \fBrte_event_enqueue_new_burst()\fP result is undefined if the enqueue burst has event object of operation type != RTE_EVENT_OP_FORWARD\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIport_id\fP The identifier of the event port\&. 
.br
\fIev\fP Points to an array of \fInb_events\fP objects of type \fI\fBrte_event\fP\fP structure which contain the event object enqueue operations to be processed\&. 
.br
\fInb_events\fP The number of event objects to enqueue, typically number of rte_event_port_attr_get(\&.\&.\&.RTE_EVENT_PORT_ATTR_ENQ_DEPTH\&.\&.\&.) available for this port\&.
.RE
.PP
\fBReturns\fP
.RS 4
The number of event objects actually enqueued on the event device\&. The return value can be less than the value of the \fInb_events\fP parameter when the event devices queue is full or if invalid parameters are specified in a \fI\fBrte_event\fP\fP\&. If the return value is less than \fInb_events\fP, the remaining events at the end of ev[] are not consumed and the caller has to take care of them, and rte_errno is set accordingly\&. Possible errno values include:
.IP "\(bu" 2
EINVAL The port ID is invalid, device ID is invalid, an event's queue ID is invalid, or an event's sched type doesn't match the capabilities of the destination queue\&.
.IP "\(bu" 2
ENOSPC The event port was backpressured and unable to enqueue one or more events\&. This error code is only applicable to closed systems\&. 
.PP
.RE
.PP
\fBSee also\fP
.RS 4
\fBrte_event_port_attr_get()\fP, \fBRTE_EVENT_PORT_ATTR_ENQ_DEPTH\fP 

.PP
\fBrte_event_enqueue_burst()\fP 
.RE
.PP

.PP
Definition at line \fB2766\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "uint16_t rte_event_dequeue_burst (uint8_t dev_id, uint8_t port_id, struct \fBrte_event\fP ev[], uint16_t nb_events, uint64_t timeout_ticks)\fR [inline]\fP, \fR [static]\fP"
Dequeue a burst of events objects or an event object from the event port designated by its \fIevent_port_id\fP, on an event device designated by its \fIdev_id\fP\&.

.PP
\fBrte_event_dequeue_burst()\fP does not dictate the specifics of scheduling algorithm as each eventdev driver may have different criteria to schedule an event\&. However, in general, from an application perspective scheduler may use the following scheme to dispatch an event to the port\&.

.PP
1) Selection of event queue based on a) The list of event queues are linked to the event port\&. b) If the device has RTE_EVENT_DEV_CAP_QUEUE_QOS capability then event queue selection from list is based on event queue priority relative to other event queue supplied as \fIpriority\fP in \fBrte_event_queue_setup()\fP c) If the device has RTE_EVENT_DEV_CAP_EVENT_QOS capability then event queue selection from the list is based on event priority supplied as \fIpriority\fP in \fBrte_event_enqueue_burst()\fP 2) Selection of event a) The number of flows available in selected event queue\&. b) Schedule type method associated with the event

.PP
The \fInb_events\fP parameter is the maximum number of event objects to dequeue which are returned in the \fIev\fP array of \fI\fBrte_event\fP\fP structure\&.

.PP
The \fBrte_event_dequeue_burst()\fP function returns the number of events objects it actually dequeued\&. A return value equal to \fInb_events\fP means that all event objects have been dequeued\&.

.PP
The number of events dequeued is the number of scheduler contexts held by this port\&. These contexts are automatically released in the next \fBrte_event_dequeue_burst()\fP invocation if the port supports implicit releases, or invoking \fBrte_event_enqueue_burst()\fP with RTE_EVENT_OP_RELEASE operation can be used to release the contexts early\&.

.PP
Event operations RTE_EVENT_OP_FORWARD and RTE_EVENT_OP_RELEASE must only be enqueued to the same port that their associated events were dequeued from\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIport_id\fP The identifier of the event port\&. 
.br
\fIev\fP Points to an array of \fInb_events\fP objects of type \fI\fBrte_event\fP\fP structure for output to be populated with the dequeued event objects\&. 
.br
\fInb_events\fP The maximum number of event objects to dequeue, typically number of rte_event_port_dequeue_depth() available for this port\&.
.br
\fItimeout_ticks\fP 
.IP "\(bu" 2
0 no-wait, returns immediately if there is no event\&.
.IP "\(bu" 2
>0 wait for the event, if the device is configured with RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT then this function will wait until at least one event is available or \fItimeout_ticks\fP time\&. if the device is not configured with RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT then this function will wait until the event available or \fIdequeue_timeout_ns\fP ns which was previously supplied to \fBrte_event_dev_configure()\fP
.PP
.RE
.PP
\fBReturns\fP
.RS 4
The number of event objects actually dequeued from the port\&. The return value can be less than the value of the \fInb_events\fP parameter when the event port's queue is not full\&.
.RE
.PP
\fBSee also\fP
.RS 4
rte_event_port_dequeue_depth() 
.RE
.PP

.PP
Definition at line \fB2843\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "int rte_event_maintain (uint8_t dev_id, uint8_t port_id, int op)\fR [inline]\fP, \fR [static]\fP"
Maintain an event device\&.

.PP
This function is only relevant for event devices which do not have the \fBRTE_EVENT_DEV_CAP_MAINTENANCE_FREE\fP flag set\&. Such devices require an application thread using a particular port to periodically call \fBrte_event_maintain()\fP on that port during periods which it is neither attempting to enqueue events to nor dequeue events from the port\&. \fBrte_event_maintain()\fP is a low-overhead function and should be called at a high rate (e\&.g\&., in the application's poll loop)\&.

.PP
No port may be left unmaintained\&.

.PP
At the application thread's convenience, \fBrte_event_maintain()\fP may (but is not required to) be called even during periods when enqueue or dequeue functions are being called, at the cost of a slight increase in overhead\&.

.PP
\fBrte_event_maintain()\fP may be called on event devices which have set \fBRTE_EVENT_DEV_CAP_MAINTENANCE_FREE\fP, in which case it is a no-operation\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIport_id\fP The identifier of the event port\&. 
.br
\fIop\fP 0, or \fBRTE_EVENT_DEV_MAINT_OP_FLUSH\fP\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0 on success\&.
.IP "\(bu" 2
-EINVAL if \fIdev_id\fP, \fIport_id\fP, or \fIop\fP is invalid\&.
.PP
.RE
.PP
\fBSee also\fP
.RS 4
\fBRTE_EVENT_DEV_CAP_MAINTENANCE_FREE\fP 
.RE
.PP

.PP
Definition at line \fB2911\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "uint8_t rte_event_port_profile_switch (uint8_t dev_id, uint8_t port_id, uint8_t profile_id)\fR [inline]\fP, \fR [static]\fP"
Change the active profile on an event port\&.

.PP
This function is used to change the current active profile on an event port when multiple link profiles are configured on an event port through the function call \fR\fBrte_event_port_profile_links_set\fP\fP\&.

.PP
On the subsequent \fR\fBrte_event_dequeue_burst\fP\fP call, only the event queues that were associated with the newly active profile will participate in scheduling\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIport_id\fP The identifier of the event port\&. 
.br
\fIprofile_id\fP The identifier of the profile\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0 on success\&.
.IP "\(bu" 2
-EINVAL if \fIdev_id\fP, \fIport_id\fP, or \fIprofile_id\fP is invalid\&. 
.PP
.RE
.PP

.PP
Definition at line \fB2959\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "__rte_experimental int rte_event_port_preschedule_modify (uint8_t dev_id, uint8_t port_id, enum \fBrte_event_dev_preschedule_type\fP type)\fR [inline]\fP, \fR [static]\fP"
Modify the pre-schedule type to use on an event port\&.

.PP
This function is used to change the current pre-schedule type configured on an event port, the pre-schedule type can be set to none to disable pre-scheduling\&. This effects the subsequent \fR\fBrte_event_dequeue_burst\fP\fP call\&. The event device should support RTE_EVENT_DEV_CAP_PER_PORT_PRESCHEDULE capability\&.

.PP
To avoid fastpath capability checks if an event device does not support RTE_EVENT_DEV_CAP_PER_PORT_PRESCHEDULE capability, then this function will return -ENOTSUP\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIport_id\fP The identifier of the event port\&. 
.br
\fItype\fP The preschedule type to use on the event port\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
0 on success\&.
.IP "\(bu" 2
-EINVAL if \fIdev_id\fP, \fIport_id\fP, or \fItype\fP is invalid\&.
.IP "\(bu" 2
-ENOTSUP if the device does not support per port preschedule capability\&. 
.PP
.RE
.PP

.PP
Definition at line \fB3008\fP of file \fBrte_eventdev\&.h\fP\&.
.SS "__rte_experimental void rte_event_port_preschedule (uint8_t dev_id, uint8_t port_id, enum \fBrte_event_dev_preschedule_type\fP type)\fR [inline]\fP, \fR [static]\fP"
Provide a hint to the event device to pre-schedule events to event port \&.

.PP
Hint the event device to pre-schedule events to the event port\&. The call doesn't not guarantee that the events will be pre-scheduleed\&. The call doesn't release the flow context currently held by the event port\&. The event device should support RTE_EVENT_DEV_CAP_PRESCHEDULE_EXPLICIT capability\&.

.PP
When pre-scheduling is enabled at an event device/port level or if the capability is not supported, then the hint is ignored\&.

.PP
Subsequent calls to \fBrte_event_dequeue_burst()\fP will dequeue the pre-schedule events but pre-schedule operation is not issued again\&.

.PP
\fBParameters\fP
.RS 4
\fIdev_id\fP The identifier of the device\&. 
.br
\fIport_id\fP The identifier of the event port\&. 
.br
\fItype\fP The pre-schedule type to use on the event port\&. 
.RE
.PP

.PP
Definition at line \fB3052\fP of file \fBrte_eventdev\&.h\fP\&.
.SH "Author"
.PP 
Generated automatically by Doxygen for DPDK from the source code\&.
