DPDK  22.03.0
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_errno.h>
215 #include <rte_mbuf_pool_ops.h>
216 #include <rte_mempool.h>
217 
218 #include "rte_eventdev_trace_fp.h"
219 
220 struct rte_mbuf; /* we just use mbuf pointers; no need to include rte_mbuf.h */
221 struct rte_event;
222 
223 /* Event device capability bitmap flags */
224 #define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0)
225 
230 #define RTE_EVENT_DEV_CAP_EVENT_QOS (1ULL << 1)
231 
237 #define RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED (1ULL << 2)
238 
246 #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES (1ULL << 3)
247 
253 #define RTE_EVENT_DEV_CAP_BURST_MODE (1ULL << 4)
254 
261 #define RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE (1ULL << 5)
262 
272 #define RTE_EVENT_DEV_CAP_NONSEQ_MODE (1ULL << 6)
273 
282 #define RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK (1ULL << 7)
283 
288 #define RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT (1ULL << 8)
289 
294 #define RTE_EVENT_DEV_CAP_CARRY_FLOW_ID (1ULL << 9)
295 
300 #define RTE_EVENT_DEV_CAP_MAINTENANCE_FREE (1ULL << 10)
301 
310 /* Event device priority levels */
311 #define RTE_EVENT_DEV_PRIORITY_HIGHEST 0
312 
316 #define RTE_EVENT_DEV_PRIORITY_NORMAL 128
317 
321 #define RTE_EVENT_DEV_PRIORITY_LOWEST 255
322 
334 uint8_t
335 rte_event_dev_count(void);
336 
347 int
348 rte_event_dev_get_dev_id(const char *name);
349 
360 int
361 rte_event_dev_socket_id(uint8_t dev_id);
362 
367  const char *driver_name;
368  struct rte_device *dev;
403  int32_t max_num_events;
408  uint32_t event_dev_cap;
416 };
417 
433 int
434 rte_event_dev_info_get(uint8_t dev_id, struct rte_event_dev_info *dev_info);
435 
439 #define RTE_EVENT_DEV_ATTR_PORT_COUNT 0
440 
443 #define RTE_EVENT_DEV_ATTR_QUEUE_COUNT 1
444 
447 #define RTE_EVENT_DEV_ATTR_STARTED 2
448 
461 int
462 rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id,
463  uint32_t *attr_value);
464 
465 
466 /* Event device configuration bitmap flags */
467 #define RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT (1ULL << 0)
468 
495  uint8_t nb_event_ports;
521  uint32_t event_dev_cfg;
531 };
532 
552 int
553 rte_event_dev_configure(uint8_t dev_id,
554  const struct rte_event_dev_config *dev_conf);
555 
556 /* Event queue specific APIs */
557 
558 /* Event queue configuration bitmap flags */
559 #define RTE_EVENT_QUEUE_CFG_ALL_TYPES (1ULL << 0)
560 
565 #define RTE_EVENT_QUEUE_CFG_SINGLE_LINK (1ULL << 1)
566 
573  uint32_t nb_atomic_flows;
595  uint32_t event_queue_cfg;
597  uint8_t schedule_type;
602  uint8_t priority;
610 };
611 
634 int
635 rte_event_queue_default_conf_get(uint8_t dev_id, uint8_t queue_id,
636  struct rte_event_queue_conf *queue_conf);
637 
656 int
657 rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
658  const struct rte_event_queue_conf *queue_conf);
659 
663 #define RTE_EVENT_QUEUE_ATTR_PRIORITY 0
664 
667 #define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_FLOWS 1
668 
671 #define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_ORDER_SEQUENCES 2
672 
675 #define RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG 3
676 
679 #define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
680 
701 int
702 rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
703  uint32_t *attr_value);
704 
705 /* Event port specific APIs */
706 
707 /* Event port configuration bitmap flags */
708 #define RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL (1ULL << 0)
709 
715 #define RTE_EVENT_PORT_CFG_SINGLE_LINK (1ULL << 1)
716 
720 #define RTE_EVENT_PORT_CFG_HINT_PRODUCER (1ULL << 2)
721 
730 #define RTE_EVENT_PORT_CFG_HINT_CONSUMER (1ULL << 3)
731 
741 #define RTE_EVENT_PORT_CFG_HINT_WORKER (1ULL << 4)
742 
768  uint16_t dequeue_depth;
774  uint16_t enqueue_depth;
780  uint32_t event_port_cfg;
781 };
782 
805 int
806 rte_event_port_default_conf_get(uint8_t dev_id, uint8_t port_id,
807  struct rte_event_port_conf *port_conf);
808 
829 int
830 rte_event_port_setup(uint8_t dev_id, uint8_t port_id,
831  const struct rte_event_port_conf *port_conf);
832 
836 #define RTE_EVENT_PORT_ATTR_ENQ_DEPTH 0
837 
840 #define RTE_EVENT_PORT_ATTR_DEQ_DEPTH 1
841 
844 #define RTE_EVENT_PORT_ATTR_NEW_EVENT_THRESHOLD 2
845 
848 #define RTE_EVENT_PORT_ATTR_IMPLICIT_RELEASE_DISABLE 3
849 
866 int
867 rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id,
868  uint32_t *attr_value);
869 
886 int
887 rte_event_dev_start(uint8_t dev_id);
888 
907 void
908 rte_event_dev_stop(uint8_t dev_id);
909 
910 typedef void (*eventdev_stop_flush_t)(uint8_t dev_id, struct rte_event event,
911  void *arg);
940 int
942  eventdev_stop_flush_t callback, void *userdata);
943 
955 int
956 rte_event_dev_close(uint8_t dev_id);
962  uint16_t nb_elem;
964  uint16_t rsvd : 15;
966  uint16_t attr_valid : 1;
969  union {
970  /* Used by Rx/Tx adapter.
971  * Indicates that all the elements in this vector belong to the
972  * same port and queue pair when originating from Rx adapter,
973  * valid only when event type is ETHDEV_VECTOR or
974  * ETH_RX_ADAPTER_VECTOR.
975  * Can also be used to indicate the Tx adapter the destination
976  * port and queue of the mbufs in the vector
977  */
978  struct {
979  uint16_t port;
980  /* Ethernet device port id. */
981  uint16_t queue;
982  /* Ethernet device queue id. */
983  };
984  };
986  uint64_t impl_opaque;
987 
988 /* empty structures do not have zero size in C++ leading to compilation errors
989  * with clang about structure having different sizes in C and C++.
990  * Since these are all zero-sized arrays, we can omit the "union" wrapper for
991  * C++ builds, removing the warning.
992  */
993 #ifndef __cplusplus
994 
999  union {
1000 #endif
1001  struct rte_mbuf *mbufs[0];
1002  void *ptrs[0];
1003  uint64_t *u64s[0];
1004 #ifndef __cplusplus
1005  } __rte_aligned(16);
1006 #endif
1007 
1011 } __rte_aligned(16);
1012 
1013 /* Scheduler type definitions */
1014 #define RTE_SCHED_TYPE_ORDERED 0
1015 
1041 #define RTE_SCHED_TYPE_ATOMIC 1
1042 
1060 #define RTE_SCHED_TYPE_PARALLEL 2
1061 
1073 /* Event types to classify the event source */
1074 #define RTE_EVENT_TYPE_ETHDEV 0x0
1075 
1076 #define RTE_EVENT_TYPE_CRYPTODEV 0x1
1077 
1078 #define RTE_EVENT_TYPE_TIMER 0x2
1079 
1080 #define RTE_EVENT_TYPE_CPU 0x3
1081 
1084 #define RTE_EVENT_TYPE_ETH_RX_ADAPTER 0x4
1085 
1086 #define RTE_EVENT_TYPE_VECTOR 0x8
1087 
1098 #define RTE_EVENT_TYPE_ETHDEV_VECTOR \
1099  (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETHDEV)
1100 
1101 #define RTE_EVENT_TYPE_CPU_VECTOR (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_CPU)
1102 
1103 #define RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR \
1104  (RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_ETH_RX_ADAPTER)
1105 
1107 #define RTE_EVENT_TYPE_MAX 0x10
1108 
1110 /* Event enqueue operations */
1111 #define RTE_EVENT_OP_NEW 0
1112 
1115 #define RTE_EVENT_OP_FORWARD 1
1116 
1123 #define RTE_EVENT_OP_RELEASE 2
1124 
1161 struct rte_event {
1163  union {
1164  uint64_t event;
1166  struct {
1167  uint32_t flow_id:20;
1174  uint32_t sub_event_type:8;
1178  uint32_t event_type:4;
1182  uint8_t op:2;
1188  uint8_t rsvd:4;
1190  uint8_t sched_type:2;
1195  uint8_t queue_id;
1202  uint8_t priority;
1212  uint8_t impl_opaque;
1219  };
1220  };
1222  union {
1223  uint64_t u64;
1225  void *event_ptr;
1227  struct rte_mbuf *mbuf;
1231  };
1232 };
1233 
1234 /* Ethdev Rx adapter capability bitmap flags */
1235 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT 0x1
1236 
1239 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ 0x2
1240 
1243 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID 0x4
1244 
1250 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR 0x8
1251 
1272 int
1273 rte_event_eth_rx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id,
1274  uint32_t *caps);
1275 
1276 #define RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT (1ULL << 0)
1277 
1279 #define RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC (1ULL << 1)
1280 
1295 int
1296 rte_event_timer_adapter_caps_get(uint8_t dev_id, uint32_t *caps);
1297 
1298 /* Crypto adapter capability bitmap flag */
1299 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW 0x1
1300 
1306 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD 0x2
1307 
1313 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND 0x4
1314 
1318 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA 0x8
1319 
1343 int
1344 rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id,
1345  uint32_t *caps);
1346 
1347 /* Ethdev Tx adapter capability bitmap flags */
1348 #define RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT 0x1
1349 
1351 #define RTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR 0x2
1352 
1373 int
1374 rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id,
1375  uint32_t *caps);
1376 
1402 int
1403 rte_event_dequeue_timeout_ticks(uint8_t dev_id, uint64_t ns,
1404  uint64_t *timeout_ticks);
1405 
1466 int
1467 rte_event_port_link(uint8_t dev_id, uint8_t port_id,
1468  const uint8_t queues[], const uint8_t priorities[],
1469  uint16_t nb_links);
1470 
1510 int
1511 rte_event_port_unlink(uint8_t dev_id, uint8_t port_id,
1512  uint8_t queues[], uint16_t nb_unlinks);
1513 
1535 int
1536 rte_event_port_unlinks_in_progress(uint8_t dev_id, uint8_t port_id);
1537 
1565 int
1566 rte_event_port_links_get(uint8_t dev_id, uint8_t port_id,
1567  uint8_t queues[], uint8_t priorities[]);
1568 
1584 int
1585 rte_event_dev_service_id_get(uint8_t dev_id, uint32_t *service_id);
1586 
1600 int
1601 rte_event_dev_dump(uint8_t dev_id, FILE *f);
1602 
1604 #define RTE_EVENT_DEV_XSTATS_NAME_SIZE 64
1605 
1610  RTE_EVENT_DEV_XSTATS_DEVICE,
1611  RTE_EVENT_DEV_XSTATS_PORT,
1612  RTE_EVENT_DEV_XSTATS_QUEUE,
1613 };
1614 
1622  char name[RTE_EVENT_DEV_XSTATS_NAME_SIZE];
1623 };
1624 
1657 int
1658 rte_event_dev_xstats_names_get(uint8_t dev_id,
1659  enum rte_event_dev_xstats_mode mode,
1660  uint8_t queue_port_id,
1661  struct rte_event_dev_xstats_name *xstats_names,
1662  unsigned int *ids,
1663  unsigned int size);
1664 
1691 int
1692 rte_event_dev_xstats_get(uint8_t dev_id,
1693  enum rte_event_dev_xstats_mode mode,
1694  uint8_t queue_port_id,
1695  const unsigned int ids[],
1696  uint64_t values[], unsigned int n);
1697 
1714 uint64_t
1715 rte_event_dev_xstats_by_name_get(uint8_t dev_id, const char *name,
1716  unsigned int *id);
1717 
1738 int
1739 rte_event_dev_xstats_reset(uint8_t dev_id,
1740  enum rte_event_dev_xstats_mode mode,
1741  int16_t queue_port_id,
1742  const uint32_t ids[],
1743  uint32_t nb_ids);
1744 
1755 int rte_event_dev_selftest(uint8_t dev_id);
1756 
1787 struct rte_mempool *
1788 rte_event_vector_pool_create(const char *name, unsigned int n,
1789  unsigned int cache_size, uint16_t nb_elem,
1790  int socket_id);
1791 
1792 #include <rte_eventdev_core.h>
1793 
1794 static __rte_always_inline uint16_t
1795 __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
1796  const struct rte_event ev[], uint16_t nb_events,
1797  const event_enqueue_burst_t fn)
1798 {
1799  const struct rte_event_fp_ops *fp_ops;
1800  void *port;
1801 
1802  fp_ops = &rte_event_fp_ops[dev_id];
1803  port = fp_ops->data[port_id];
1804 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
1805  if (dev_id >= RTE_EVENT_MAX_DEVS ||
1806  port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
1807  rte_errno = EINVAL;
1808  return 0;
1809  }
1810 
1811  if (port == NULL) {
1812  rte_errno = EINVAL;
1813  return 0;
1814  }
1815 #endif
1816  rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, (void *)fn);
1817  /*
1818  * Allow zero cost non burst mode routine invocation if application
1819  * requests nb_events as const one
1820  */
1821  if (nb_events == 1)
1822  return (fp_ops->enqueue)(port, ev);
1823  else
1824  return fn(port, ev, nb_events);
1825 }
1826 
1870 static inline uint16_t
1871 rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
1872  const struct rte_event ev[], uint16_t nb_events)
1873 {
1874  const struct rte_event_fp_ops *fp_ops;
1875 
1876  fp_ops = &rte_event_fp_ops[dev_id];
1877  return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
1878  fp_ops->enqueue_burst);
1879 }
1880 
1922 static inline uint16_t
1923 rte_event_enqueue_new_burst(uint8_t dev_id, uint8_t port_id,
1924  const struct rte_event ev[], uint16_t nb_events)
1925 {
1926  const struct rte_event_fp_ops *fp_ops;
1927 
1928  fp_ops = &rte_event_fp_ops[dev_id];
1929  return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
1930  fp_ops->enqueue_new_burst);
1931 }
1932 
1974 static inline uint16_t
1975 rte_event_enqueue_forward_burst(uint8_t dev_id, uint8_t port_id,
1976  const struct rte_event ev[], uint16_t nb_events)
1977 {
1978  const struct rte_event_fp_ops *fp_ops;
1979 
1980  fp_ops = &rte_event_fp_ops[dev_id];
1981  return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
1982  fp_ops->enqueue_forward_burst);
1983 }
1984 
2051 static inline uint16_t
2052 rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[],
2053  uint16_t nb_events, uint64_t timeout_ticks)
2054 {
2055  const struct rte_event_fp_ops *fp_ops;
2056  void *port;
2057 
2058  fp_ops = &rte_event_fp_ops[dev_id];
2059  port = fp_ops->data[port_id];
2060 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
2061  if (dev_id >= RTE_EVENT_MAX_DEVS ||
2062  port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
2063  rte_errno = EINVAL;
2064  return 0;
2065  }
2066 
2067  if (port == NULL) {
2068  rte_errno = EINVAL;
2069  return 0;
2070  }
2071 #endif
2072  rte_eventdev_trace_deq_burst(dev_id, port_id, ev, nb_events);
2073  /*
2074  * Allow zero cost non burst mode routine invocation if application
2075  * requests nb_events as const one
2076  */
2077  if (nb_events == 1)
2078  return (fp_ops->dequeue)(port, ev, timeout_ticks);
2079  else
2080  return (fp_ops->dequeue_burst)(port, ev, nb_events,
2081  timeout_ticks);
2082 }
2083 
2084 #define RTE_EVENT_DEV_MAINT_OP_FLUSH (1 << 0)
2085 
2126 __rte_experimental
2127 static inline int
2128 rte_event_maintain(uint8_t dev_id, uint8_t port_id, int op)
2129 {
2130  const struct rte_event_fp_ops *fp_ops;
2131  void *port;
2132 
2133  fp_ops = &rte_event_fp_ops[dev_id];
2134  port = fp_ops->data[port_id];
2135 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
2136  if (dev_id >= RTE_EVENT_MAX_DEVS ||
2137  port_id >= RTE_EVENT_MAX_PORTS_PER_DEV)
2138  return -EINVAL;
2139 
2140  if (port == NULL)
2141  return -EINVAL;
2142 
2143  if (op & (~RTE_EVENT_DEV_MAINT_OP_FLUSH))
2144  return -EINVAL;
2145 #endif
2146  rte_eventdev_trace_maintain(dev_id, port_id, op);
2147 
2148  if (fp_ops->maintain != NULL)
2149  fp_ops->maintain(port, op);
2150 
2151  return 0;
2152 }
2153 
2154 #ifdef __cplusplus
2155 }
2156 #endif
2157 
2158 #endif /* _RTE_EVENTDEV_H_ */
void rte_event_dev_stop(uint8_t dev_id)
uint32_t min_dequeue_timeout_ns
Definition: rte_eventdev.h:369
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:228
#define RTE_EVENT_DEV_XSTATS_NAME_SIZE
uint16_t attr_valid
Definition: rte_eventdev.h:966
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:957
uint8_t priority
struct rte_device * dev
Definition: rte_eventdev.h:368
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:399
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:373
#define rte_errno
Definition: rte_errno.h:29
uint32_t event_type
uint32_t event_dev_cap
Definition: rte_eventdev.h:408
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:394
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:220
uint32_t nb_atomic_order_sequences
Definition: rte_eventdev.h:581
uint32_t nb_event_port_dequeue_depth
Definition: rte_eventdev.h:505
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:410
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:389
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:513
const char * driver_name
Definition: rte_eventdev.h:367
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:474
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)
#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:523
uint8_t rsvd
uint8_t op
int32_t new_event_threshold
Definition: rte_eventdev.h:755
uint8_t max_event_priority_levels
Definition: rte_eventdev.h:383
struct rte_mbuf * mbuf
uint32_t max_dequeue_timeout_ns
Definition: rte_eventdev.h:371
uint32_t max_event_queue_flows
Definition: rte_eventdev.h:377
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:910
uint32_t sub_event_type
uint8_t sched_type
uint8_t max_event_queues
Definition: rte_eventdev.h:375
struct rte_event_vector __rte_aligned(16)
uint8_t max_event_queue_priority_levels
Definition: rte_eventdev.h:379
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:500