DPDK  23.07.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 
88 #ifdef __cplusplus
89 extern "C" {
90 #endif
91 
92 #include <stdint.h>
93 
94 #include <rte_compat.h>
95 #include <rte_service.h>
96 
97 #include "rte_eventdev.h"
98 
99 #define RTE_EVENT_ETH_RX_ADAPTER_MAX_INSTANCE 32
100 
101 /* struct rte_event_eth_rx_adapter_queue_conf flags definitions */
102 #define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID 0x1
103 
106 #define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR 0x2
107 
117  uint8_t event_port_id;
121  uint32_t max_nb_rx;
126 };
127 
149 typedef int (*rte_event_eth_rx_adapter_conf_cb) (uint8_t id, uint8_t dev_id,
150  struct rte_event_eth_rx_adapter_conf *conf,
151  void *arg);
152 
157  uint32_t rx_queue_flags;
168  struct rte_event ev;
185  uint16_t vector_sz;
212  uint16_t event_buf_size;
214 };
215 
225  uint64_t rx_poll_count;
227  uint64_t rx_packets;
229  uint64_t rx_dropped;
231 };
232 
237  uint64_t rx_poll_count;
239  uint64_t rx_packets;
241  uint64_t rx_enq_count;
243  uint64_t rx_enq_retry;
245  uint64_t rx_dropped;
247  uint64_t rx_enq_start_ts;
253  uint64_t rx_enq_end_ts;
259  uint64_t rx_intr_packets;
265 };
266 
271  uint16_t min_sz;
275  uint16_t max_sz;
279  uint8_t log2_sz;
283  uint64_t min_timeout_ns;
287  uint64_t max_timeout_ns;
291 };
292 
297  uint16_t event_buf_size;
304 };
305 
310  uint32_t max_nb_rx;
327  uint32_t rsvd[15];
329 };
330 
371 typedef uint16_t (*rte_event_eth_rx_adapter_cb_fn)(uint16_t eth_dev_id,
372  uint16_t queue_id,
373  uint32_t enqueue_buf_size,
374  uint32_t enqueue_buf_count,
375  struct rte_event *ev,
376  uint16_t nb_event,
377  void *cb_arg,
378  uint16_t *nb_dropped);
379 
401 int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
403  void *conf_arg);
404 
442 int rte_event_eth_rx_adapter_create(uint8_t id, uint8_t dev_id,
443  struct rte_event_port_conf *port_config);
444 
467 __rte_experimental
468 int rte_event_eth_rx_adapter_create_with_params(uint8_t id, uint8_t dev_id,
469  struct rte_event_port_conf *port_config,
470  struct rte_event_eth_rx_adapter_params *rxa_params);
471 
483 int rte_event_eth_rx_adapter_free(uint8_t id);
484 
518  uint16_t eth_dev_id,
519  int32_t rx_queue_id,
520  const struct rte_event_eth_rx_adapter_queue_conf *conf);
521 
543 int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
544  int32_t rx_queue_id);
545 
560 int rte_event_eth_rx_adapter_start(uint8_t id);
561 
572 int rte_event_eth_rx_adapter_stop(uint8_t id);
573 
588  struct rte_event_eth_rx_adapter_stats *stats);
589 
601 
617 int rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id);
618 
636 int rte_event_eth_rx_adapter_cb_register(uint8_t id, uint16_t eth_dev_id,
638  void *cb_arg);
639 
657  uint8_t dev_id, uint16_t eth_port_id,
659 
679 __rte_experimental
681  uint16_t eth_dev_id,
682  uint16_t rx_queue_id,
683  struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
684 
704 __rte_experimental
705 int
707  uint16_t eth_dev_id,
708  uint16_t rx_queue_id,
710 
727 __rte_experimental
728 int
730  uint16_t eth_dev_id,
731  uint16_t rx_queue_id);
732 
748 __rte_experimental
749 int
751 
769 __rte_experimental
770 int
771 rte_event_eth_rx_adapter_instance_get(uint16_t eth_dev_id,
772  uint16_t rx_queue_id,
773  uint8_t *rxa_inst_id);
774 
785 __rte_experimental
786 int
789 
808 __rte_experimental
809 int
812 
827 __rte_experimental
828 int
831 
832 #ifdef __cplusplus
833 }
834 #endif
835 #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_runtime_params_init(struct rte_event_eth_rx_adapter_runtime_params *params)
__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_runtime_params_set(uint8_t id, struct rte_event_eth_rx_adapter_runtime_params *params)
__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)
uint16_t rsvd
__rte_experimental int rte_event_eth_rx_adapter_runtime_params_get(uint8_t id, struct rte_event_eth_rx_adapter_runtime_params *params)
__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)