DPDK  18.11.11
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 
81 #ifdef __cplusplus
82 extern "C" {
83 #endif
84 
85 #include <stdint.h>
86 
87 #include <rte_service.h>
88 
89 #include "rte_eventdev.h"
90 
91 #define RTE_EVENT_ETH_RX_ADAPTER_MAX_INSTANCE 32
92 
93 /* struct rte_event_eth_rx_adapter_queue_conf flags definitions */
94 #define RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID 0x1
95 
108  uint8_t event_port_id;
112  uint32_t max_nb_rx;
117 };
118 
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 
154  uint32_t rx_queue_flags;
165  struct rte_event ev;
182 };
183 
191  uint64_t rx_poll_count;
193  uint64_t rx_packets;
195  uint64_t rx_enq_count;
197  uint64_t rx_enq_retry;
199  uint64_t rx_enq_start_ts;
205  uint64_t rx_enq_end_ts;
211  uint64_t rx_intr_packets;
213 };
214 
247 typedef uint16_t (*rte_event_eth_rx_adapter_cb_fn)(uint16_t eth_dev_id,
248  uint16_t queue_id,
249  uint32_t enqueue_buf_size,
250  uint32_t enqueue_buf_count,
251  struct rte_mbuf **mbuf,
252  uint16_t nb_mbuf,
253  void *cb_arg,
254  struct rte_mbuf **enq_buf);
255 
280 int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
282  void *conf_arg);
283 
310 int rte_event_eth_rx_adapter_create(uint8_t id, uint8_t dev_id,
311  struct rte_event_port_conf *port_config);
312 
327 int rte_event_eth_rx_adapter_free(uint8_t id);
328 
365  uint16_t eth_dev_id,
366  int32_t rx_queue_id,
367  const struct rte_event_eth_rx_adapter_queue_conf *conf);
368 
393 int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
394  int32_t rx_queue_id);
395 
409 int rte_event_eth_rx_adapter_start(uint8_t id);
410 
424 int rte_event_eth_rx_adapter_stop(uint8_t id);
425 
443  struct rte_event_eth_rx_adapter_stats *stats);
444 
459 
478 int rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id);
479 
500 int __rte_experimental
502  uint16_t eth_dev_id,
504  void *cb_arg);
505 
506 #ifdef __cplusplus
507 }
508 #endif
509 #endif /* _RTE_EVENT_ETH_RX_ADAPTER_ */
int __rte_experimental 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)
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)
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)
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_mbuf **mbuf, uint16_t nb_mbuf, void *cb_arg, struct rte_mbuf **enq_buf)
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)