DPDK  22.11.7-rc1
rte_event_eth_rx_adapter.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Intel Corporation.
3  * All rights reserved.
4  */
5 
6 #ifndef _RTE_EVENT_ETH_RX_ADAPTER_
7 #define _RTE_EVENT_ETH_RX_ADAPTER_
8 
84 #ifdef __cplusplus
85 extern "C" {
86 #endif
87 
88 #include <stdint.h>
89 
90 #include <rte_compat.h>
91 #include <rte_service.h>
92 
93 #include "rte_eventdev.h"
94 
95 #define RTE_EVENT_ETH_RX_ADAPTER_MAX_INSTANCE 32
96 
97 /* struct rte_event_eth_rx_adapter_queue_conf flags definitions */
98 #define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID 0x1
99 
102 #define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR 0x2
103 
113  uint8_t event_port_id;
117  uint32_t max_nb_rx;
122 };
123 
145 typedef int (*rte_event_eth_rx_adapter_conf_cb) (uint8_t id, uint8_t dev_id,
146  struct rte_event_eth_rx_adapter_conf *conf,
147  void *arg);
148 
153  uint32_t rx_queue_flags;
164  struct rte_event ev;
181  uint16_t vector_sz;
208  uint16_t event_buf_size;
210 };
211 
221  uint64_t rx_poll_count;
223  uint64_t rx_packets;
225  uint64_t rx_dropped;
227 };
228 
233  uint64_t rx_poll_count;
235  uint64_t rx_packets;
237  uint64_t rx_enq_count;
239  uint64_t rx_enq_retry;
241  uint64_t rx_dropped;
243  uint64_t rx_enq_start_ts;
249  uint64_t rx_enq_end_ts;
255  uint64_t rx_intr_packets;
261 };
262 
267  uint16_t min_sz;
271  uint16_t max_sz;
275  uint8_t log2_sz;
279  uint64_t min_timeout_ns;
283  uint64_t max_timeout_ns;
287 };
288 
293  uint16_t event_buf_size;
300 };
301 
342 typedef uint16_t (*rte_event_eth_rx_adapter_cb_fn)(uint16_t eth_dev_id,
343  uint16_t queue_id,
344  uint32_t enqueue_buf_size,
345  uint32_t enqueue_buf_count,
346  struct rte_event *ev,
347  uint16_t nb_event,
348  void *cb_arg,
349  uint16_t *nb_dropped);
350 
372 int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
374  void *conf_arg);
375 
399 int rte_event_eth_rx_adapter_create(uint8_t id, uint8_t dev_id,
400  struct rte_event_port_conf *port_config);
401 
424 __rte_experimental
425 int rte_event_eth_rx_adapter_create_with_params(uint8_t id, uint8_t dev_id,
426  struct rte_event_port_conf *port_config,
427  struct rte_event_eth_rx_adapter_params *rxa_params);
428 
440 int rte_event_eth_rx_adapter_free(uint8_t id);
441 
475  uint16_t eth_dev_id,
476  int32_t rx_queue_id,
477  const struct rte_event_eth_rx_adapter_queue_conf *conf);
478 
500 int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
501  int32_t rx_queue_id);
502 
517 int rte_event_eth_rx_adapter_start(uint8_t id);
518 
529 int rte_event_eth_rx_adapter_stop(uint8_t id);
530 
545  struct rte_event_eth_rx_adapter_stats *stats);
546 
558 
574 int rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id);
575 
593 int rte_event_eth_rx_adapter_cb_register(uint8_t id, uint16_t eth_dev_id,
595  void *cb_arg);
596 
614  uint8_t dev_id, uint16_t eth_port_id,
616 
636 __rte_experimental
638  uint16_t eth_dev_id,
639  uint16_t rx_queue_id,
640  struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
641 
661 __rte_experimental
662 int
664  uint16_t eth_dev_id,
665  uint16_t rx_queue_id,
667 
684 __rte_experimental
685 int
687  uint16_t eth_dev_id,
688  uint16_t rx_queue_id);
689 
705 __rte_experimental
706 int
708 
726 __rte_experimental
727 int
728 rte_event_eth_rx_adapter_instance_get(uint16_t eth_dev_id,
729  uint16_t rx_queue_id,
730  uint8_t *rxa_inst_id);
731 
732 #ifdef __cplusplus
733 }
734 #endif
735 #endif /* _RTE_EVENT_ETH_RX_ADAPTER_ */
__rte_experimental int rte_event_eth_rx_adapter_queue_stats_reset(uint8_t id, uint16_t eth_dev_id, uint16_t rx_queue_id)
int rte_event_eth_rx_adapter_start(uint8_t id)
__rte_experimental int rte_event_eth_rx_adapter_instance_get(uint16_t eth_dev_id, uint16_t rx_queue_id, uint8_t *rxa_inst_id)
int rte_event_eth_rx_adapter_free(uint8_t id)
int rte_event_eth_rx_adapter_stats_get(uint8_t id, struct rte_event_eth_rx_adapter_stats *stats)
__rte_experimental int rte_event_eth_rx_adapter_queue_stats_get(uint8_t id, uint16_t eth_dev_id, uint16_t rx_queue_id, struct rte_event_eth_rx_adapter_queue_stats *stats)
int rte_event_eth_rx_adapter_vector_limits_get(uint8_t dev_id, uint16_t eth_port_id, struct rte_event_eth_rx_adapter_vector_limits *limits)
int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id, rte_event_eth_rx_adapter_conf_cb conf_cb, void *conf_arg)
int rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id)
int rte_event_eth_rx_adapter_stats_reset(uint8_t id)
uint16_t(* rte_event_eth_rx_adapter_cb_fn)(uint16_t eth_dev_id, uint16_t queue_id, uint32_t enqueue_buf_size, uint32_t enqueue_buf_count, struct rte_event *ev, uint16_t nb_event, void *cb_arg, uint16_t *nb_dropped)
int rte_event_eth_rx_adapter_queue_add(uint8_t id, uint16_t eth_dev_id, int32_t rx_queue_id, const struct rte_event_eth_rx_adapter_queue_conf *conf)
__rte_experimental int rte_event_eth_rx_adapter_create_with_params(uint8_t id, uint8_t dev_id, struct rte_event_port_conf *port_config, struct rte_event_eth_rx_adapter_params *rxa_params)
int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id, int32_t rx_queue_id)
int rte_event_eth_rx_adapter_create(uint8_t id, uint8_t dev_id, struct rte_event_port_conf *port_config)
__rte_experimental int rte_event_eth_rx_adapter_queue_conf_get(uint8_t id, uint16_t eth_dev_id, uint16_t rx_queue_id, struct rte_event_eth_rx_adapter_queue_conf *queue_conf)
__rte_experimental int rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id)
int rte_event_eth_rx_adapter_stop(uint8_t id)
int(* rte_event_eth_rx_adapter_conf_cb)(uint8_t id, uint8_t dev_id, struct rte_event_eth_rx_adapter_conf *conf, void *arg)
int rte_event_eth_rx_adapter_cb_register(uint8_t id, uint16_t eth_dev_id, rte_event_eth_rx_adapter_cb_fn cb_fn, void *cb_arg)