DPDK  24.11.0-rc3
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 
90 #include <stdint.h>
91 
92 #include <rte_compat.h>
93 #include <rte_service.h>
94 
95 #include "rte_eventdev.h"
96 
97 #ifdef __cplusplus
98 extern "C" {
99 #endif
100 
101 #define RTE_EVENT_ETH_RX_ADAPTER_MAX_INSTANCE 32
102 
103 /* struct rte_event_eth_rx_adapter_queue_conf flags definitions */
104 #define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID 0x1
105 
108 #define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR 0x2
109 
119  uint8_t event_port_id;
123  uint32_t max_nb_rx;
128 };
129 
151 typedef int (*rte_event_eth_rx_adapter_conf_cb) (uint8_t id, uint8_t dev_id,
152  struct rte_event_eth_rx_adapter_conf *conf,
153  void *arg);
154 
159  uint32_t rx_queue_flags;
170  struct rte_event ev;
187  uint16_t vector_sz;
214  uint16_t event_buf_size;
216 };
217 
227  uint64_t rx_poll_count;
229  uint64_t rx_packets;
231  uint64_t rx_dropped;
233 };
234 
239  uint64_t rx_poll_count;
241  uint64_t rx_packets;
243  uint64_t rx_enq_count;
245  uint64_t rx_enq_retry;
247  uint64_t rx_dropped;
249  uint64_t rx_enq_start_ts;
255  uint64_t rx_enq_end_ts;
261  uint64_t rx_intr_packets;
267 };
268 
273  uint16_t min_sz;
277  uint16_t max_sz;
281  uint8_t log2_sz;
285  uint64_t min_timeout_ns;
289  uint64_t max_timeout_ns;
293 };
294 
299  uint16_t event_buf_size;
306 };
307 
312  uint32_t max_nb_rx;
329  uint32_t rsvd[15];
331 };
332 
373 typedef uint16_t (*rte_event_eth_rx_adapter_cb_fn)(uint16_t eth_dev_id,
374  uint16_t queue_id,
375  uint32_t enqueue_buf_size,
376  uint32_t enqueue_buf_count,
377  struct rte_event *ev,
378  uint16_t nb_event,
379  void *cb_arg,
380  uint16_t *nb_dropped);
381 
403 int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
405  void *conf_arg);
406 
444 int rte_event_eth_rx_adapter_create(uint8_t id, uint8_t dev_id,
445  struct rte_event_port_conf *port_config);
446 
469 int rte_event_eth_rx_adapter_create_with_params(uint8_t id, uint8_t dev_id,
470  struct rte_event_port_conf *port_config,
471  struct rte_event_eth_rx_adapter_params *rxa_params);
472 
499 __rte_experimental
500 int
501 rte_event_eth_rx_adapter_create_ext_with_params(uint8_t id, uint8_t dev_id,
503  void *conf_arg,
504  struct rte_event_eth_rx_adapter_params *rxa_params);
505 
517 int rte_event_eth_rx_adapter_free(uint8_t id);
518 
552  uint16_t eth_dev_id,
553  int32_t rx_queue_id,
554  const struct rte_event_eth_rx_adapter_queue_conf *conf);
555 
577 int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
578  int32_t rx_queue_id);
579 
594 int rte_event_eth_rx_adapter_start(uint8_t id);
595 
606 int rte_event_eth_rx_adapter_stop(uint8_t id);
607 
622  struct rte_event_eth_rx_adapter_stats *stats);
623 
635 
651 int rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id);
652 
670 int rte_event_eth_rx_adapter_cb_register(uint8_t id, uint16_t eth_dev_id,
672  void *cb_arg);
673 
691  uint8_t dev_id, uint16_t eth_port_id,
693 
714  uint16_t eth_dev_id,
715  uint16_t rx_queue_id,
716  struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
717 
737 int
739  uint16_t eth_dev_id,
740  uint16_t rx_queue_id,
742 
759 int
761  uint16_t eth_dev_id,
762  uint16_t rx_queue_id);
763 
779 int
781 
799 int
800 rte_event_eth_rx_adapter_instance_get(uint16_t eth_dev_id,
801  uint16_t rx_queue_id,
802  uint8_t *rxa_inst_id);
803 
814 __rte_experimental
815 int
818 
837 __rte_experimental
838 int
841 
856 __rte_experimental
857 int
860 
861 #ifdef __cplusplus
862 }
863 #endif
864 #endif /* _RTE_EVENT_ETH_RX_ADAPTER_ */
int rte_event_eth_rx_adapter_start(uint8_t id)
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_free(uint8_t id)
int rte_event_eth_rx_adapter_stats_get(uint8_t id, struct rte_event_eth_rx_adapter_stats *stats)
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_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)
int rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id)
int rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id)
int rte_event_eth_rx_adapter_stats_reset(uint8_t id)
int rte_event_eth_rx_adapter_instance_get(uint16_t eth_dev_id, uint16_t rx_queue_id, uint8_t *rxa_inst_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_runtime_params_init(struct rte_event_eth_rx_adapter_runtime_params *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_queue_stats_reset(uint8_t id, uint16_t eth_dev_id, uint16_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_runtime_params_set(uint8_t id, struct rte_event_eth_rx_adapter_runtime_params *params)
__rte_experimental int rte_event_eth_rx_adapter_runtime_params_get(uint8_t id, struct rte_event_eth_rx_adapter_runtime_params *params)
int rte_event_eth_rx_adapter_stop(uint8_t id)
__rte_experimental int rte_event_eth_rx_adapter_create_ext_with_params(uint8_t id, uint8_t dev_id, rte_event_eth_rx_adapter_conf_cb conf_cb, void *conf_arg, struct rte_event_eth_rx_adapter_params *rxa_params)
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)