DPDK  21.11.2
rte_eventdev.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2016 Cavium, Inc.
3  * Copyright(c) 2016-2018 Intel Corporation.
4  * Copyright 2016 NXP
5  * All rights reserved.
6  */
7 
8 #ifndef _RTE_EVENTDEV_H_
9 #define _RTE_EVENTDEV_H_
10 
209 #ifdef __cplusplus
210 extern "C" {
211 #endif
212 
213 #include <rte_common.h>
214 #include <rte_config.h>
215 #include <rte_errno.h>
216 #include <rte_mbuf_pool_ops.h>
217 #include <rte_memory.h>
218 #include <rte_mempool.h>
219 
220 #include "rte_eventdev_trace_fp.h"
221 
222 struct rte_mbuf; /* we just use mbuf pointers; no need to include rte_mbuf.h */
223 struct rte_event;
224 
225 /* Event device capability bitmap flags */
226 #define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0)
227 
232 #define RTE_EVENT_DEV_CAP_EVENT_QOS (1ULL << 1)
233 
239 #define RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED (1ULL << 2)
240 
248 #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES (1ULL << 3)
249 
255 #define RTE_EVENT_DEV_CAP_BURST_MODE (1ULL << 4)
256 
263 #define RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE (1ULL << 5)
264 
274 #define RTE_EVENT_DEV_CAP_NONSEQ_MODE (1ULL << 6)
275 
284 #define RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK (1ULL << 7)
285 
290 #define RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT (1ULL << 8)
291 
296 #define RTE_EVENT_DEV_CAP_CARRY_FLOW_ID (1ULL << 9)
297 
302 #define RTE_EVENT_DEV_CAP_MAINTENANCE_FREE (1ULL << 10)
303 
312 /* Event device priority levels */
313 #define RTE_EVENT_DEV_PRIORITY_HIGHEST 0
314 
318 #define RTE_EVENT_DEV_PRIORITY_NORMAL 128
319 
323 #define RTE_EVENT_DEV_PRIORITY_LOWEST 255
324 
336 uint8_t
337 rte_event_dev_count(void);
338 
349 int
350 rte_event_dev_get_dev_id(const char *name);
351 
362 int
363 rte_event_dev_socket_id(uint8_t dev_id);
364 
369  const char *driver_name;
370  struct rte_device *dev;
405  int32_t max_num_events;
410  uint32_t event_dev_cap;
418 };
419 
435 int
436 rte_event_dev_info_get(uint8_t dev_id, struct rte_event_dev_info *dev_info);
437 
441 #define RTE_EVENT_DEV_ATTR_PORT_COUNT 0
442 
445 #define RTE_EVENT_DEV_ATTR_QUEUE_COUNT 1
446 
449 #define RTE_EVENT_DEV_ATTR_STARTED 2
450 
463 int
464 rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id,
465  uint32_t *attr_value);
466 
467 
468 /* Event device configuration bitmap flags */
469 #define RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT (1ULL << 0)
470 
497  uint8_t nb_event_ports;
523  uint32_t event_dev_cfg;
533 };
534 
554 int
555 rte_event_dev_configure(uint8_t dev_id,
556  const struct rte_event_dev_config *dev_conf);
557 
558 /* Event queue specific APIs */
559 
560 /* Event queue configuration bitmap flags */
561 #define RTE_EVENT_QUEUE_CFG_ALL_TYPES (1ULL << 0)
562 
567 #define RTE_EVENT_QUEUE_CFG_SINGLE_LINK (1ULL << 1)
568 
575  uint32_t nb_atomic_flows;
597  uint32_t event_queue_cfg;
599  uint8_t schedule_type;
604  uint8_t priority;
612 };
613 
636 int
637 rte_event_queue_default_conf_get(uint8_t dev_id, uint8_t queue_id,
638  struct rte_event_queue_conf *queue_conf);
639 
658 int
659 rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
660  const struct rte_event_queue_conf *queue_conf);
661 
665 #define RTE_EVENT_QUEUE_ATTR_PRIORITY 0
666 
669 #define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_FLOWS 1
670 
673 #define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_ORDER_SEQUENCES 2
674 
677 #define RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG 3
678 
681 #define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
682 
703 int
704 rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
705  uint32_t *attr_value);
706 
707 /* Event port specific APIs */
708 
709 /* Event port configuration bitmap flags */
710 #define RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL (1ULL << 0)
711 
717 #define RTE_EVENT_PORT_CFG_SINGLE_LINK (1ULL << 1)
718 
722 #define RTE_EVENT_PORT_CFG_HINT_PRODUCER (1ULL << 2)
723 
732 #define RTE_EVENT_PORT_CFG_HINT_CONSUMER (1ULL << 3)
733 
743 #define RTE_EVENT_PORT_CFG_HINT_WORKER (1ULL << 4)
744 
770  uint16_t dequeue_depth;
776  uint16_t enqueue_depth;
782  uint32_t event_port_cfg;
783 };
784 
807 int
808 rte_event_port_default_conf_get(uint8_t dev_id, uint8_t port_id,
809  struct rte_event_port_conf *port_conf);
810 
831 int
832 rte_event_port_setup(uint8_t dev_id, uint8_t port_id,
833  const struct rte_event_port_conf *port_conf);
834 
838 #define RTE_EVENT_PORT_ATTR_ENQ_DEPTH 0
839 
842 #define RTE_EVENT_PORT_ATTR_DEQ_DEPTH 1
843 
846 #define RTE_EVENT_PORT_ATTR_NEW_EVENT_THRESHOLD 2
847 
850 #define RTE_EVENT_PORT_ATTR_IMPLICIT_RELEASE_DISABLE 3
851 
868 int
869 rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id,
870  uint32_t *attr_value);
871 
888 int
889 rte_event_dev_start(uint8_t dev_id);
890 
909 void
910 rte_event_dev_stop(uint8_t dev_id);
911 
912 typedef void (*eventdev_stop_flush_t)(uint8_t dev_id, struct rte_event event,
913  void *arg);
942 int
944  eventdev_stop_flush_t callback, void *userdata);
945 
957 int
958 rte_event_dev_close(uint8_t dev_id);
964  uint16_t nb_elem;
966  uint16_t rsvd : 15;
968  uint16_t attr_valid : 1;
971  union {
972  /* Used by Rx/Tx adapter.
973  * Indicates that all the elements in this vector belong to the
974  * same port and queue pair when originating from Rx adapter,
975  * valid only when event type is ETHDEV_VECTOR or
976  * ETH_RX_ADAPTER_VECTOR.
977  * Can also be used to indicate the Tx adapter the destination
978  * port and queue of the mbufs in the vector
979  */
980  struct {
981  uint16_t port;
982  /* Ethernet device port id. */
983  uint16_t queue;
984  /* Ethernet device queue id. */
985  };
986  };
988  uint64_t impl_opaque;
989 
990 /* empty structures do not have zero size in C++ leading to compilation errors
991  * with clang about structure having different sizes in C and C++.
992  * Since these are all zero-sized arrays, we can omit the "union" wrapper for
993  * C++ builds, removing the warning.
994  */
995 #ifndef __cplusplus
996 
1001  union {
1002 #endif
1003  struct rte_mbuf *mbufs[0];
1004  void *ptrs[0];
1005  uint64_t *u64s[0];
1006 #ifndef __cplusplus
1007  } __rte_aligned(16);
1008 #endif
1009 
1013 } __rte_aligned(16);
1014 
1015 /* Scheduler type definitions */
1016 #define RTE_SCHED_TYPE_ORDERED 0
1017 
1043 #define RTE_SCHED_TYPE_ATOMIC 1
1044 
1062 #define RTE_SCHED_TYPE_PARALLEL 2
1063 
1075 /* Event types to classify the event source */
1076 #define RTE_EVENT_TYPE_ETHDEV 0x0
1077 
1078 #define RTE_EVENT_TYPE_CRYPTODEV 0x1
1079 
1080 #define RTE_EVENT_TYPE_TIMER 0x2
1081 
1082 #define RTE_EVENT_TYPE_CPU 0x3
1083 
1086 #define RTE_EVENT_TYPE_ETH_RX_ADAPTER 0x4
1087 
1088 #define RTE_EVENT_TYPE_VECTOR 0x8
1089 
1100 #define RTE_EVENT_TYPE_ETHDEV_VECTOR \
1101  (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETHDEV)
1102 
1103 #define RTE_EVENT_TYPE_CPU_VECTOR (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_CPU)
1104 
1105 #define RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR \
1106  (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETH_RX_ADAPTER)
1107 
1109 #define RTE_EVENT_TYPE_MAX 0x10
1110 
1112 /* Event enqueue operations */
1113 #define RTE_EVENT_OP_NEW 0
1114 
1117 #define RTE_EVENT_OP_FORWARD 1
1118 
1125 #define RTE_EVENT_OP_RELEASE 2
1126 
1163 struct rte_event {
1165  union {
1166  uint64_t event;
1168  struct {
1169  uint32_t flow_id:20;
1176  uint32_t sub_event_type:8;
1180  uint32_t event_type:4;
1184  uint8_t op:2;
1190  uint8_t rsvd:4;
1192  uint8_t sched_type:2;
1197  uint8_t queue_id;
1204  uint8_t priority;
1214  uint8_t impl_opaque;
1221  };
1222  };
1224  union {
1225  uint64_t u64;
1227  void *event_ptr;
1229  struct rte_mbuf *mbuf;
1233  };
1234 };
1235 
1236 /* Ethdev Rx adapter capability bitmap flags */
1237 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT 0x1
1238 
1241 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ 0x2
1242 
1245 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID 0x4
1246 
1252 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR 0x8
1253 
1274 int
1275 rte_event_eth_rx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id,
1276  uint32_t *caps);
1277 
1278 #define RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT (1ULL << 0)
1279 
1281 #define RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC (1ULL << 1)
1282 
1297 int
1298 rte_event_timer_adapter_caps_get(uint8_t dev_id, uint32_t *caps);
1299 
1300 /* Crypto adapter capability bitmap flag */
1301 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW 0x1
1302 
1308 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD 0x2
1309 
1315 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND 0x4
1316 
1320 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA 0x8
1321 
1345 int
1346 rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id,
1347  uint32_t *caps);
1348 
1349 /* Ethdev Tx adapter capability bitmap flags */
1350 #define RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT 0x1
1351 
1353 #define RTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR 0x2
1354 
1375 int
1376 rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id,
1377  uint32_t *caps);
1378 
1404 int
1405 rte_event_dequeue_timeout_ticks(uint8_t dev_id, uint64_t ns,
1406  uint64_t *timeout_ticks);
1407 
1468 int
1469 rte_event_port_link(uint8_t dev_id, uint8_t port_id,
1470  const uint8_t queues[], const uint8_t priorities[],
1471  uint16_t nb_links);
1472 
1512 int
1513 rte_event_port_unlink(uint8_t dev_id, uint8_t port_id,
1514  uint8_t queues[], uint16_t nb_unlinks);
1515 
1537 int
1538 rte_event_port_unlinks_in_progress(uint8_t dev_id, uint8_t port_id);
1539 
1567 int
1568 rte_event_port_links_get(uint8_t dev_id, uint8_t port_id,
1569  uint8_t queues[], uint8_t priorities[]);
1570 
1586 int
1587 rte_event_dev_service_id_get(uint8_t dev_id, uint32_t *service_id);
1588 
1602 int
1603 rte_event_dev_dump(uint8_t dev_id, FILE *f);
1604 
1606 #define RTE_EVENT_DEV_XSTATS_NAME_SIZE 64
1607 
1612  RTE_EVENT_DEV_XSTATS_DEVICE,
1613  RTE_EVENT_DEV_XSTATS_PORT,
1614  RTE_EVENT_DEV_XSTATS_QUEUE,
1615 };
1616 
1624  char name[RTE_EVENT_DEV_XSTATS_NAME_SIZE];
1625 };
1626 
1659 int
1660 rte_event_dev_xstats_names_get(uint8_t dev_id,
1661  enum rte_event_dev_xstats_mode mode,
1662  uint8_t queue_port_id,
1663  struct rte_event_dev_xstats_name *xstats_names,
1664  unsigned int *ids,
1665  unsigned int size);
1666 
1693 int
1694 rte_event_dev_xstats_get(uint8_t dev_id,
1695  enum rte_event_dev_xstats_mode mode,
1696  uint8_t queue_port_id,
1697  const unsigned int ids[],
1698  uint64_t values[], unsigned int n);
1699 
1716 uint64_t
1717 rte_event_dev_xstats_by_name_get(uint8_t dev_id, const char *name,
1718  unsigned int *id);
1719 
1740 int
1741 rte_event_dev_xstats_reset(uint8_t dev_id,
1742  enum rte_event_dev_xstats_mode mode,
1743  int16_t queue_port_id,
1744  const uint32_t ids[],
1745  uint32_t nb_ids);
1746 
1757 int rte_event_dev_selftest(uint8_t dev_id);
1758 
1789 struct rte_mempool *
1790 rte_event_vector_pool_create(const char *name, unsigned int n,
1791  unsigned int cache_size, uint16_t nb_elem,
1792  int socket_id);
1793 
1794 #include <rte_eventdev_core.h>
1795 
1796 static __rte_always_inline uint16_t
1797 __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
1798  const struct rte_event ev[], uint16_t nb_events,
1799  const event_enqueue_burst_t fn)
1800 {
1801  const struct rte_event_fp_ops *fp_ops;
1802  void *port;
1803 
1804  fp_ops = &rte_event_fp_ops[dev_id];
1805  port = fp_ops->data[port_id];
1806 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
1807  if (dev_id >= RTE_EVENT_MAX_DEVS ||
1808  port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
1809  rte_errno = EINVAL;
1810  return 0;
1811  }
1812 
1813  if (port == NULL) {
1814  rte_errno = EINVAL;
1815  return 0;
1816  }
1817 #endif
1818  rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, (void *)fn);
1819  /*
1820  * Allow zero cost non burst mode routine invocation if application
1821  * requests nb_events as const one
1822  */
1823  if (nb_events == 1)
1824  return (fp_ops->enqueue)(port, ev);
1825  else
1826  return fn(port, ev, nb_events);
1827 }
1828 
1872 static inline uint16_t
1873 rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
1874  const struct rte_event ev[], uint16_t nb_events)
1875 {
1876  const struct rte_event_fp_ops *fp_ops;
1877 
1878  fp_ops = &rte_event_fp_ops[dev_id];
1879  return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
1880  fp_ops->enqueue_burst);
1881 }
1882 
1924 static inline uint16_t
1925 rte_event_enqueue_new_burst(uint8_t dev_id, uint8_t port_id,
1926  const struct rte_event ev[], uint16_t nb_events)
1927 {
1928  const struct rte_event_fp_ops *fp_ops;
1929 
1930  fp_ops = &rte_event_fp_ops[dev_id];
1931  return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
1932  fp_ops->enqueue_new_burst);
1933 }
1934 
1976 static inline uint16_t
1977 rte_event_enqueue_forward_burst(uint8_t dev_id, uint8_t port_id,
1978  const struct rte_event ev[], uint16_t nb_events)
1979 {
1980  const struct rte_event_fp_ops *fp_ops;
1981 
1982  fp_ops = &rte_event_fp_ops[dev_id];
1983  return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
1984  fp_ops->enqueue_forward_burst);
1985 }
1986 
2053 static inline uint16_t
2054 rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[],
2055  uint16_t nb_events, uint64_t timeout_ticks)
2056 {
2057  const struct rte_event_fp_ops *fp_ops;
2058  void *port;
2059 
2060  fp_ops = &rte_event_fp_ops[dev_id];
2061  port = fp_ops->data[port_id];
2062 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
2063  if (dev_id >= RTE_EVENT_MAX_DEVS ||
2064  port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
2065  rte_errno = EINVAL;
2066  return 0;
2067  }
2068 
2069  if (port == NULL) {
2070  rte_errno = EINVAL;
2071  return 0;
2072  }
2073 #endif
2074  rte_eventdev_trace_deq_burst(dev_id, port_id, ev, nb_events);
2075  /*
2076  * Allow zero cost non burst mode routine invocation if application
2077  * requests nb_events as const one
2078  */
2079  if (nb_events == 1)
2080  return (fp_ops->dequeue)(port, ev, timeout_ticks);
2081  else
2082  return (fp_ops->dequeue_burst)(port, ev, nb_events,
2083  timeout_ticks);
2084 }
2085 
2086 #define RTE_EVENT_DEV_MAINT_OP_FLUSH (1 << 0)
2087 
2128 __rte_experimental
2129 static inline int
2130 rte_event_maintain(uint8_t dev_id, uint8_t port_id, int op)
2131 {
2132  const struct rte_event_fp_ops *fp_ops;
2133  void *port;
2134 
2135  fp_ops = &rte_event_fp_ops[dev_id];
2136  port = fp_ops->data[port_id];
2137 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
2138  if (dev_id >= RTE_EVENT_MAX_DEVS ||
2139  port_id >= RTE_EVENT_MAX_PORTS_PER_DEV)
2140  return -EINVAL;
2141 
2142  if (port == NULL)
2143  return -EINVAL;
2144 
2145  if (op & (~RTE_EVENT_DEV_MAINT_OP_FLUSH))
2146  return -EINVAL;
2147 #endif
2148  rte_eventdev_trace_maintain(dev_id, port_id, op);
2149 
2150  if (fp_ops->maintain != NULL)
2151  fp_ops->maintain(port, op);
2152 
2153  return 0;
2154 }
2155 
2156 #ifdef __cplusplus
2157 }
2158 #endif
2159 
2160 #endif /* _RTE_EVENTDEV_H_ */
void rte_event_dev_stop(uint8_t dev_id)
uint32_t min_dequeue_timeout_ns
Definition: rte_eventdev.h:371
int rte_event_dequeue_timeout_ticks(uint8_t dev_id, uint64_t ns, uint64_t *timeout_ticks)
static uint16_t rte_event_enqueue_new_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events)
#define __rte_always_inline
Definition: rte_common.h:233
#define RTE_EVENT_DEV_XSTATS_NAME_SIZE
uint16_t attr_valid
Definition: rte_eventdev.h:968
uint64_t u64
int rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id, uint32_t *attr_value)
uint32_t flow_id
int rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps)
int rte_event_dev_stop_flush_callback_register(uint8_t dev_id, eventdev_stop_flush_t callback, void *userdata)
uint16_t nb_elem
Definition: rte_eventdev.h:959
uint8_t priority
struct rte_device * dev
Definition: rte_eventdev.h:370
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
Definition: rte_eventdev.h:401
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
Definition: rte_eventdev.h:375
#define rte_errno
Definition: rte_errno.h:29
uint32_t event_type
uint32_t event_dev_cap
Definition: rte_eventdev.h:410
int rte_event_dev_socket_id(uint8_t dev_id)
static __rte_experimental int rte_event_maintain(uint8_t dev_id, uint8_t port_id, int op)
uint32_t max_event_port_enqueue_depth
Definition: rte_eventdev.h:396
uint64_t rte_event_dev_xstats_by_name_get(uint8_t dev_id, const char *name, unsigned int *id)
int rte_event_timer_adapter_caps_get(uint8_t dev_id, uint32_t *caps)
int rte_event_dev_info_get(uint8_t dev_id, struct rte_event_dev_info *dev_info)
uint32_t cache_size
Definition: rte_mempool.h:224
char name[RTE_MEMPOOL_NAMESIZE]
Definition: rte_mempool.h:213
uint32_t nb_atomic_order_sequences
Definition: rte_eventdev.h:583
uint32_t nb_event_port_dequeue_depth
Definition: rte_eventdev.h:507
int rte_event_port_unlinks_in_progress(uint8_t dev_id, uint8_t port_id)
void * event_ptr
int rte_event_port_link(uint8_t dev_id, uint8_t port_id, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links)
int rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, uint32_t *attr_value)
struct rte_event_vector * vec
uint8_t max_single_link_event_port_queue_pairs
Definition: rte_eventdev.h:412
rte_event_dev_xstats_mode
int rte_event_port_links_get(uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint8_t priorities[])
int rte_event_dev_selftest(uint8_t dev_id)
static uint16_t rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events)
int rte_event_dev_start(uint8_t dev_id)
int rte_event_port_setup(uint8_t dev_id, uint8_t port_id, const struct rte_event_port_conf *port_conf)
uint8_t max_event_port_dequeue_depth
Definition: rte_eventdev.h:391
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
Definition: rte_eventdev.h:515
const char * driver_name
Definition: rte_eventdev.h:369
uint8_t impl_opaque
uint8_t queue_id
static uint16_t rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[], uint16_t nb_events, uint64_t timeout_ticks)
int rte_event_dev_get_dev_id(const char *name)
uint8_t rte_event_dev_count(void)
int rte_event_dev_close(uint8_t dev_id)
int rte_event_dev_xstats_get(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, const unsigned int ids[], uint64_t values[], unsigned int n)
int rte_event_dev_xstats_reset(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, int16_t queue_port_id, const uint32_t ids[], uint32_t nb_ids)
#define RTE_STD_C11
Definition: rte_common.h:42
int rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id, uint32_t *caps)
uint32_t dequeue_timeout_ns
Definition: rte_eventdev.h:476
int rte_event_dev_service_id_get(uint8_t dev_id, uint32_t *service_id)
rte_iova_t buf_iova __rte_aligned(sizeof(rte_iova_t))
static uint16_t rte_event_enqueue_forward_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events)
#define RTE_EVENT_DEV_MAINT_OP_FLUSH
struct rte_mempool * rte_event_vector_pool_create(const char *name, unsigned int n, unsigned int cache_size, uint16_t nb_elem, int socket_id)
int rte_event_dev_dump(uint8_t dev_id, FILE *f)
uint8_t nb_single_link_event_port_queues
Definition: rte_eventdev.h:525
uint8_t rsvd
uint8_t op
int32_t new_event_threshold
Definition: rte_eventdev.h:757
uint8_t max_event_priority_levels
Definition: rte_eventdev.h:385
struct rte_mbuf * mbuf
uint32_t max_dequeue_timeout_ns
Definition: rte_eventdev.h:373
uint32_t max_event_queue_flows
Definition: rte_eventdev.h:379
int rte_event_dev_configure(uint8_t dev_id, const struct rte_event_dev_config *dev_conf)
void(* eventdev_stop_flush_t)(uint8_t dev_id, struct rte_event event, void *arg)
Definition: rte_eventdev.h:912
uint32_t sub_event_type
uint8_t sched_type
uint8_t max_event_queues
Definition: rte_eventdev.h:377
struct rte_event_vector __rte_aligned(16)
uint8_t max_event_queue_priority_levels
Definition: rte_eventdev.h:381
int rte_event_port_unlink(uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint16_t nb_unlinks)
int rte_event_eth_rx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps)
int rte_event_dev_xstats_names_get(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, struct rte_event_dev_xstats_name *xstats_names, unsigned int *ids, unsigned int size)
uint32_t nb_event_queue_flows
Definition: rte_eventdev.h:502