DPDK  22.11.0-rc0
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_service.h>
91 
92 #include "rte_eventdev.h"
93 
94 #define RTE_EVENT_ETH_RX_ADAPTER_MAX_INSTANCE 32
95 
96 /* struct rte_event_eth_rx_adapter_queue_conf flags definitions */
97 #define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID 0x1
98 
101 #define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR 0x2
102 
112  uint8_t event_port_id;
116  uint32_t max_nb_rx;
121 };
122 
144 typedef int (*rte_event_eth_rx_adapter_conf_cb) (uint8_t id, uint8_t dev_id,
145  struct rte_event_eth_rx_adapter_conf *conf,
146  void *arg);
147 
152  uint32_t rx_queue_flags;
163  struct rte_event ev;
180  uint16_t vector_sz;
207  uint16_t event_buf_size;
209 };
210 
220  uint64_t rx_poll_count;
222  uint64_t rx_packets;
224  uint64_t rx_dropped;
226 };
227 
232  uint64_t rx_poll_count;
234  uint64_t rx_packets;
236  uint64_t rx_enq_count;
238  uint64_t rx_enq_retry;
240  uint64_t rx_dropped;
242  uint64_t rx_enq_start_ts;
248  uint64_t rx_enq_end_ts;
254  uint64_t rx_intr_packets;
260 };
261 
266  uint16_t min_sz;
270  uint16_t max_sz;
274  uint8_t log2_sz;
278  uint64_t min_timeout_ns;
282  uint64_t max_timeout_ns;
286 };
287 
292  uint16_t event_buf_size;
299 };
300 
341 typedef uint16_t (*rte_event_eth_rx_adapter_cb_fn)(uint16_t eth_dev_id,
342  uint16_t queue_id,
343  uint32_t enqueue_buf_size,
344  uint32_t enqueue_buf_count,
345  struct rte_event *ev,
346  uint16_t nb_event,
347  void *cb_arg,
348  uint16_t *nb_dropped);
349 
371 int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
373  void *conf_arg);
374 
398 int rte_event_eth_rx_adapter_create(uint8_t id, uint8_t dev_id,
399  struct rte_event_port_conf *port_config);
400 
423 __rte_experimental
424 int rte_event_eth_rx_adapter_create_with_params(uint8_t id, uint8_t dev_id,
425  struct rte_event_port_conf *port_config,
426  struct rte_event_eth_rx_adapter_params *rxa_params);
427 
439 int rte_event_eth_rx_adapter_free(uint8_t id);
440 
474  uint16_t eth_dev_id,
475  int32_t rx_queue_id,
476  const struct rte_event_eth_rx_adapter_queue_conf *conf);
477 
499 int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
500  int32_t rx_queue_id);
501 
516 int rte_event_eth_rx_adapter_start(uint8_t id);
517 
528 int rte_event_eth_rx_adapter_stop(uint8_t id);
529 
544  struct rte_event_eth_rx_adapter_stats *stats);
545 
557 
573 int rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id);
574 
592 int rte_event_eth_rx_adapter_cb_register(uint8_t id, uint16_t eth_dev_id,
594  void *cb_arg);
595 
613  uint8_t dev_id, uint16_t eth_port_id,
615 
635 __rte_experimental
637  uint16_t eth_dev_id,
638  uint16_t rx_queue_id,
639  struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
640 
660 __rte_experimental
661 int
663  uint16_t eth_dev_id,
664  uint16_t rx_queue_id,
666 
683 __rte_experimental
684 int
686  uint16_t eth_dev_id,
687  uint16_t rx_queue_id);
688 
704 __rte_experimental
705 int
707 
725 __rte_experimental
726 int
727 rte_event_eth_rx_adapter_instance_get(uint16_t eth_dev_id,
728  uint16_t rx_queue_id,
729  uint8_t *rxa_inst_id);
730 
731 #ifdef __cplusplus
732 }
733 #endif
734 #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)