DPDK  22.03.0
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 
83 #ifdef __cplusplus
84 extern "C" {
85 #endif
86 
87 #include <stdint.h>
88 
89 #include <rte_service.h>
90 
91 #include "rte_eventdev.h"
92 
93 #define RTE_EVENT_ETH_RX_ADAPTER_MAX_INSTANCE 32
94 
95 /* struct rte_event_eth_rx_adapter_queue_conf flags definitions */
96 #define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID 0x1
97 
100 #define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR 0x2
101 
111  uint8_t event_port_id;
115  uint32_t max_nb_rx;
120 };
121 
143 typedef int (*rte_event_eth_rx_adapter_conf_cb) (uint8_t id, uint8_t dev_id,
144  struct rte_event_eth_rx_adapter_conf *conf,
145  void *arg);
146 
151  uint32_t rx_queue_flags;
162  struct rte_event ev;
179  uint16_t vector_sz;
206  uint16_t event_buf_size;
208 };
209 
219  uint64_t rx_poll_count;
221  uint64_t rx_packets;
223  uint64_t rx_dropped;
225 };
226 
231  uint64_t rx_poll_count;
233  uint64_t rx_packets;
235  uint64_t rx_enq_count;
237  uint64_t rx_enq_retry;
239  uint64_t rx_dropped;
241  uint64_t rx_enq_start_ts;
247  uint64_t rx_enq_end_ts;
253  uint64_t rx_intr_packets;
259 };
260 
265  uint16_t min_sz;
269  uint16_t max_sz;
273  uint8_t log2_sz;
277  uint64_t min_timeout_ns;
281  uint64_t max_timeout_ns;
285 };
286 
291  uint16_t event_buf_size;
298 };
299 
340 typedef uint16_t (*rte_event_eth_rx_adapter_cb_fn)(uint16_t eth_dev_id,
341  uint16_t queue_id,
342  uint32_t enqueue_buf_size,
343  uint32_t enqueue_buf_count,
344  struct rte_event *ev,
345  uint16_t nb_event,
346  void *cb_arg,
347  uint16_t *nb_dropped);
348 
370 int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
372  void *conf_arg);
373 
397 int rte_event_eth_rx_adapter_create(uint8_t id, uint8_t dev_id,
398  struct rte_event_port_conf *port_config);
399 
422 __rte_experimental
423 int rte_event_eth_rx_adapter_create_with_params(uint8_t id, uint8_t dev_id,
424  struct rte_event_port_conf *port_config,
425  struct rte_event_eth_rx_adapter_params *rxa_params);
426 
438 int rte_event_eth_rx_adapter_free(uint8_t id);
439 
473  uint16_t eth_dev_id,
474  int32_t rx_queue_id,
475  const struct rte_event_eth_rx_adapter_queue_conf *conf);
476 
498 int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
499  int32_t rx_queue_id);
500 
515 int rte_event_eth_rx_adapter_start(uint8_t id);
516 
527 int rte_event_eth_rx_adapter_stop(uint8_t id);
528 
543  struct rte_event_eth_rx_adapter_stats *stats);
544 
556 
572 int rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id);
573 
591 int rte_event_eth_rx_adapter_cb_register(uint8_t id, uint16_t eth_dev_id,
593  void *cb_arg);
594 
612  uint8_t dev_id, uint16_t eth_port_id,
614 
634 __rte_experimental
636  uint16_t eth_dev_id,
637  uint16_t rx_queue_id,
638  struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
639 
659 __rte_experimental
660 int
662  uint16_t eth_dev_id,
663  uint16_t rx_queue_id,
665 
682 __rte_experimental
683 int
685  uint16_t eth_dev_id,
686  uint16_t rx_queue_id);
687 
703 __rte_experimental
704 int
706 
707 #ifdef __cplusplus
708 }
709 #endif
710 #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)
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)