DPDK  19.11.14
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 
82 #ifdef __cplusplus
83 extern "C" {
84 #endif
85 
86 #include <stdint.h>
87 
88 #include <rte_service.h>
89 
90 #include "rte_eventdev.h"
91 
92 #define RTE_EVENT_ETH_RX_ADAPTER_MAX_INSTANCE 32
93 
94 /* struct rte_event_eth_rx_adapter_queue_conf flags definitions */
95 #define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID 0x1
96 
106  uint8_t event_port_id;
110  uint32_t max_nb_rx;
115 };
116 
138 typedef int (*rte_event_eth_rx_adapter_conf_cb) (uint8_t id, uint8_t dev_id,
139  struct rte_event_eth_rx_adapter_conf *conf,
140  void *arg);
141 
146  uint32_t rx_queue_flags;
157  struct rte_event ev;
174 };
175 
180  uint64_t rx_poll_count;
182  uint64_t rx_packets;
184  uint64_t rx_enq_count;
186  uint64_t rx_enq_retry;
188  uint64_t rx_dropped;
190  uint64_t rx_enq_start_ts;
196  uint64_t rx_enq_end_ts;
202  uint64_t rx_intr_packets;
204 };
205 
246 typedef uint16_t (*rte_event_eth_rx_adapter_cb_fn)(uint16_t eth_dev_id,
247  uint16_t queue_id,
248  uint32_t enqueue_buf_size,
249  uint32_t enqueue_buf_count,
250  struct rte_event *ev,
251  uint16_t nb_event,
252  void *cb_arg,
253  uint16_t *nb_dropped);
254 
276 int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
278  void *conf_arg);
279 
303 int rte_event_eth_rx_adapter_create(uint8_t id, uint8_t dev_id,
304  struct rte_event_port_conf *port_config);
305 
317 int rte_event_eth_rx_adapter_free(uint8_t id);
318 
352  uint16_t eth_dev_id,
353  int32_t rx_queue_id,
354  const struct rte_event_eth_rx_adapter_queue_conf *conf);
355 
377 int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
378  int32_t rx_queue_id);
379 
394 int rte_event_eth_rx_adapter_start(uint8_t id);
395 
406 int rte_event_eth_rx_adapter_stop(uint8_t id);
407 
422  struct rte_event_eth_rx_adapter_stats *stats);
423 
435 
451 int rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id);
452 
470 int rte_event_eth_rx_adapter_cb_register(uint8_t id, uint16_t eth_dev_id,
472  void *cb_arg);
473 
474 #ifdef __cplusplus
475 }
476 #endif
477 #endif /* _RTE_EVENT_ETH_RX_ADAPTER_ */
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)
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)
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)
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)