8 #ifndef _RTE_EVENTDEV_H_ 9 #define _RTE_EVENTDEV_H_ 212 #include <rte_compat.h> 224 #define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0) 236 #define RTE_EVENT_DEV_CAP_EVENT_QOS (1ULL << 1) 243 #define RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED (1ULL << 2) 252 #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES (1ULL << 3) 259 #define RTE_EVENT_DEV_CAP_BURST_MODE (1ULL << 4) 267 #define RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE (1ULL << 5) 278 #define RTE_EVENT_DEV_CAP_NONSEQ_MODE (1ULL << 6) 288 #define RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK (1ULL << 7) 294 #define RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT (1ULL << 8) 300 #define RTE_EVENT_DEV_CAP_CARRY_FLOW_ID (1ULL << 9) 306 #define RTE_EVENT_DEV_CAP_MAINTENANCE_FREE (1ULL << 10) 316 #define RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR (1ULL << 11) 323 #define RTE_EVENT_DEV_CAP_PROFILE_LINK (1ULL << 12) 330 #define RTE_EVENT_DEV_PRIORITY_HIGHEST 0 335 #define RTE_EVENT_DEV_PRIORITY_NORMAL 128 340 #define RTE_EVENT_DEV_PRIORITY_LOWEST 255 347 #define RTE_EVENT_QUEUE_WEIGHT_HIGHEST 255 351 #define RTE_EVENT_QUEUE_WEIGHT_LOWEST 0 357 #define RTE_EVENT_QUEUE_AFFINITY_HIGHEST 255 361 #define RTE_EVENT_QUEUE_AFFINITY_LOWEST 0 481 #define RTE_EVENT_DEV_ATTR_PORT_COUNT 0 485 #define RTE_EVENT_DEV_ATTR_QUEUE_COUNT 1 489 #define RTE_EVENT_DEV_ATTR_STARTED 2 505 uint32_t *attr_value);
509 #define RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT (1ULL << 0) 614 #define RTE_EVENT_QUEUE_CFG_ALL_TYPES (1ULL << 0) 620 #define RTE_EVENT_QUEUE_CFG_SINGLE_LINK (1ULL << 1) 733 #define RTE_EVENT_QUEUE_ATTR_PRIORITY 0 737 #define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_FLOWS 1 741 #define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_ORDER_SEQUENCES 2 745 #define RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG 3 749 #define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4 753 #define RTE_EVENT_QUEUE_ATTR_WEIGHT 5 757 #define RTE_EVENT_QUEUE_ATTR_AFFINITY 6 781 uint32_t *attr_value);
803 uint64_t attr_value);
808 #define RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL (1ULL << 0) 815 #define RTE_EVENT_PORT_CFG_SINGLE_LINK (1ULL << 1) 820 #define RTE_EVENT_PORT_CFG_HINT_PRODUCER (1ULL << 2) 830 #define RTE_EVENT_PORT_CFG_HINT_CONSUMER (1ULL << 3) 841 #define RTE_EVENT_PORT_CFG_HINT_WORKER (1ULL << 4) 970 #define RTE_EVENT_PORT_ATTR_ENQ_DEPTH 0 974 #define RTE_EVENT_PORT_ATTR_DEQ_DEPTH 1 978 #define RTE_EVENT_PORT_ATTR_NEW_EVENT_THRESHOLD 2 982 #define RTE_EVENT_PORT_ATTR_IMPLICIT_RELEASE_DISABLE 3 1002 uint32_t *attr_value);
1119 uint64_t impl_opaque;
1151 #define RTE_SCHED_TYPE_ORDERED 0 1178 #define RTE_SCHED_TYPE_ATOMIC 1 1197 #define RTE_SCHED_TYPE_PARALLEL 2 1211 #define RTE_EVENT_TYPE_ETHDEV 0x0 1213 #define RTE_EVENT_TYPE_CRYPTODEV 0x1 1215 #define RTE_EVENT_TYPE_TIMER 0x2 1217 #define RTE_EVENT_TYPE_CPU 0x3 1221 #define RTE_EVENT_TYPE_ETH_RX_ADAPTER 0x4 1223 #define RTE_EVENT_TYPE_DMADEV 0x5 1225 #define RTE_EVENT_TYPE_VECTOR 0x8 1237 #define RTE_EVENT_TYPE_ETHDEV_VECTOR \ 1238 (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETHDEV) 1240 #define RTE_EVENT_TYPE_CPU_VECTOR (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_CPU) 1242 #define RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR \ 1243 (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETH_RX_ADAPTER) 1245 #define RTE_EVENT_TYPE_CRYPTODEV_VECTOR \ 1246 (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_CRYPTODEV) 1249 #define RTE_EVENT_TYPE_MAX 0x10 1253 #define RTE_EVENT_OP_NEW 0 1257 #define RTE_EVENT_OP_FORWARD 1 1265 #define RTE_EVENT_OP_RELEASE 2 1375 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT 0x1 1379 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ 0x2 1383 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID 0x4 1390 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR 0x8 1415 #define RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT (1ULL << 0) 1418 #define RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC (1ULL << 1) 1438 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW 0x1 1445 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD 0x2 1452 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND 0x4 1457 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA 0x8 1462 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_EVENT_VECTOR 0x10 1491 #define RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_OP_NEW 0x1 1498 #define RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_OP_FWD 0x2 1505 #define RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND 0x4 1533 #define RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT 0x1 1536 #define RTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR 0x2 1587 uint64_t *timeout_ticks);
1654 const uint8_t queues[],
const uint8_t priorities[],
1702 uint8_t queues[], uint16_t nb_unlinks);
1779 const uint8_t priorities[], uint16_t nb_links, uint8_t profile_id);
1832 uint16_t nb_unlinks, uint8_t profile_id);
1886 uint8_t queues[], uint8_t priorities[]);
1922 uint8_t priorities[], uint8_t profile_id);
1959 #define RTE_EVENT_DEV_XSTATS_NAME_SIZE 64 1965 RTE_EVENT_DEV_XSTATS_DEVICE,
1966 RTE_EVENT_DEV_XSTATS_PORT,
1967 RTE_EVENT_DEV_XSTATS_QUEUE,
2015 uint8_t queue_port_id,
2049 uint8_t queue_port_id,
2050 const uint64_t ids[],
2051 uint64_t values[],
unsigned int n);
2096 int16_t queue_port_id,
2097 const uint64_t ids[],
2147 #include <rte_eventdev_core.h> 2150 __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
2151 const struct rte_event ev[], uint16_t nb_events,
2152 const event_enqueue_burst_t fn)
2154 const struct rte_event_fp_ops *fp_ops;
2157 fp_ops = &rte_event_fp_ops[dev_id];
2158 port = fp_ops->data[port_id];
2159 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG 2160 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2161 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
2171 rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, (
void *)fn);
2177 return (fp_ops->enqueue)(port, ev);
2179 return fn(port, ev, nb_events);
2225 static inline uint16_t
2227 const struct rte_event ev[], uint16_t nb_events)
2229 const struct rte_event_fp_ops *fp_ops;
2231 fp_ops = &rte_event_fp_ops[dev_id];
2232 return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
2233 fp_ops->enqueue_burst);
2277 static inline uint16_t
2279 const struct rte_event ev[], uint16_t nb_events)
2281 const struct rte_event_fp_ops *fp_ops;
2283 fp_ops = &rte_event_fp_ops[dev_id];
2284 return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
2285 fp_ops->enqueue_new_burst);
2329 static inline uint16_t
2331 const struct rte_event ev[], uint16_t nb_events)
2333 const struct rte_event_fp_ops *fp_ops;
2335 fp_ops = &rte_event_fp_ops[dev_id];
2336 return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
2337 fp_ops->enqueue_forward_burst);
2406 static inline uint16_t
2408 uint16_t nb_events, uint64_t timeout_ticks)
2410 const struct rte_event_fp_ops *fp_ops;
2413 fp_ops = &rte_event_fp_ops[dev_id];
2414 port = fp_ops->data[port_id];
2415 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG 2416 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2417 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
2427 rte_eventdev_trace_deq_burst(dev_id, port_id, ev, nb_events);
2433 return (fp_ops->dequeue)(port, ev, timeout_ticks);
2435 return (fp_ops->dequeue_burst)(port, ev, nb_events,
2439 #define RTE_EVENT_DEV_MAINT_OP_FLUSH (1 << 0) 2484 const struct rte_event_fp_ops *fp_ops;
2487 fp_ops = &rte_event_fp_ops[dev_id];
2488 port = fp_ops->data[port_id];
2489 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG 2490 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2491 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV)
2500 rte_eventdev_trace_maintain(dev_id, port_id, op);
2502 if (fp_ops->maintain != NULL)
2503 fp_ops->maintain(port, op);
2529 static inline uint8_t
2532 const struct rte_event_fp_ops *fp_ops;
2535 fp_ops = &rte_event_fp_ops[dev_id];
2536 port = fp_ops->data[port_id];
2538 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG 2539 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2540 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV)
2546 if (profile_id >= RTE_EVENT_MAX_PROFILES_PER_PORT)
2549 rte_eventdev_trace_port_profile_switch(dev_id, port_id, profile_id);
2551 return fp_ops->profile_switch(port, profile_id);
void rte_event_dev_stop(uint8_t dev_id)
uint32_t min_dequeue_timeout_ns
int rte_event_dequeue_timeout_ticks(uint8_t dev_id, uint64_t ns, uint64_t *timeout_ticks)
int rte_event_dev_xstats_names_get(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, struct rte_event_dev_xstats_name *xstats_names, uint64_t *ids, unsigned int size)
static uint16_t rte_event_enqueue_new_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events)
#define __rte_always_inline
#define RTE_EVENT_DEV_XSTATS_NAME_SIZE
int rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id, uint32_t *attr_value)
int rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps)
int rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id, const struct rte_event_queue_conf *queue_conf)
uint8_t max_event_port_links
int rte_event_queue_default_conf_get(uint8_t dev_id, uint8_t queue_id, struct rte_event_queue_conf *queue_conf)
int rte_event_port_default_conf_get(uint8_t dev_id, uint8_t port_id, struct rte_event_port_conf *port_conf)
uint32_t dequeue_timeout_ns
__rte_experimental int rte_event_dma_adapter_caps_get(uint8_t dev_id, uint8_t dmadev_id, uint32_t *caps)
int rte_event_queue_attr_set(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, uint64_t attr_value)
int rte_event_dev_socket_id(uint8_t dev_id)
int rte_event_dev_xstats_get(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, const uint64_t ids[], uint64_t values[], unsigned int n)
static uint8_t rte_event_port_profile_switch(uint8_t dev_id, uint8_t port_id, uint8_t profile_id)
int rte_event_dev_xstats_reset(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, int16_t queue_port_id, const uint64_t ids[], uint32_t nb_ids)
uint32_t max_event_port_enqueue_depth
int rte_event_timer_adapter_caps_get(uint8_t dev_id, uint32_t *caps)
int rte_event_dev_info_get(uint8_t dev_id, struct rte_event_dev_info *dev_info)
char name[RTE_MEMPOOL_NAMESIZE]
uint32_t nb_atomic_order_sequences
uint32_t nb_event_port_dequeue_depth
int rte_event_port_unlinks_in_progress(uint8_t dev_id, uint8_t port_id)
__rte_experimental int rte_event_port_profile_links_set(uint8_t dev_id, uint8_t port_id, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links, uint8_t profile_id)
int rte_event_port_link(uint8_t dev_id, uint8_t port_id, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links)
int rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, uint32_t *attr_value)
uint8_t max_profiles_per_port
struct rte_event_vector * vec
uint8_t max_single_link_event_port_queue_pairs
rte_event_dev_xstats_mode
int rte_event_port_links_get(uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint8_t priorities[])
int rte_event_dev_stop_flush_callback_register(uint8_t dev_id, rte_eventdev_stop_flush_t callback, void *userdata)
int rte_event_dev_selftest(uint8_t dev_id)
static uint16_t rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events)
int rte_event_dev_start(uint8_t dev_id)
uint64_t rte_event_dev_xstats_by_name_get(uint8_t dev_id, const char *name, uint64_t *id)
int rte_event_port_setup(uint8_t dev_id, uint8_t port_id, const struct rte_event_port_conf *port_conf)
void rte_event_port_quiesce(uint8_t dev_id, uint8_t port_id, rte_eventdev_port_flush_t release_cb, void *args)
uint8_t max_event_port_dequeue_depth
int rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id, uint32_t *attr_value)
uint32_t nb_event_port_enqueue_depth
static uint16_t rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[], uint16_t nb_events, uint64_t timeout_ticks)
int rte_event_dev_get_dev_id(const char *name)
uint8_t rte_event_dev_count(void)
int rte_event_dev_close(uint8_t dev_id)
int rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id, uint32_t *caps)
__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)
uint32_t dequeue_timeout_ns
static int rte_event_maintain(uint8_t dev_id, uint8_t port_id, int op)
int rte_event_dev_service_id_get(uint8_t dev_id, uint32_t *service_id)
static uint16_t rte_event_enqueue_forward_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events)
__extension__ struct rte_eth_link __rte_aligned(8)
#define RTE_EVENT_DEV_MAINT_OP_FLUSH
struct rte_mempool * rte_event_vector_pool_create(const char *name, unsigned int n, unsigned int cache_size, uint16_t nb_elem, int socket_id)
int rte_event_dev_dump(uint8_t dev_id, FILE *f)
uint8_t nb_single_link_event_port_queues
void(* rte_eventdev_port_flush_t)(uint8_t dev_id, struct rte_event event, void *arg)
void(* rte_eventdev_stop_flush_t)(uint8_t dev_id, struct rte_event event, void *arg)
int32_t new_event_threshold
uint8_t max_event_priority_levels
uint32_t max_dequeue_timeout_ns
uint32_t max_event_queue_flows
int rte_event_dev_configure(uint8_t dev_id, const struct rte_event_dev_config *dev_conf)
__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)
uint8_t max_event_queue_priority_levels
int rte_event_port_unlink(uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint16_t nb_unlinks)
int rte_event_eth_rx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps)
uint32_t nb_event_queue_flows