DPDK  19.08.0-rc0
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 
105  uint8_t event_port_id;
109  uint32_t max_nb_rx;
114 };
115 
137 typedef int (*rte_event_eth_rx_adapter_conf_cb) (uint8_t id, uint8_t dev_id,
138  struct rte_event_eth_rx_adapter_conf *conf,
139  void *arg);
140 
145  uint32_t rx_queue_flags;
156  struct rte_event ev;
173 };
174 
182  uint64_t rx_poll_count;
184  uint64_t rx_packets;
186  uint64_t rx_enq_count;
188  uint64_t rx_enq_retry;
190  uint64_t rx_enq_start_ts;
196  uint64_t rx_enq_end_ts;
202  uint64_t rx_intr_packets;
204 };
205 
238 typedef uint16_t (*rte_event_eth_rx_adapter_cb_fn)(uint16_t eth_dev_id,
239  uint16_t queue_id,
240  uint32_t enqueue_buf_size,
241  uint32_t enqueue_buf_count,
242  struct rte_mbuf **mbuf,
243  uint16_t nb_mbuf,
244  void *cb_arg,
245  struct rte_mbuf **enq_buf);
246 
268 int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
270  void *conf_arg);
271 
295 int rte_event_eth_rx_adapter_create(uint8_t id, uint8_t dev_id,
296  struct rte_event_port_conf *port_config);
297 
309 int rte_event_eth_rx_adapter_free(uint8_t id);
310 
344  uint16_t eth_dev_id,
345  int32_t rx_queue_id,
346  const struct rte_event_eth_rx_adapter_queue_conf *conf);
347 
369 int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
370  int32_t rx_queue_id);
371 
386 int rte_event_eth_rx_adapter_start(uint8_t id);
387 
398 int rte_event_eth_rx_adapter_stop(uint8_t id);
399 
416 int __rte_experimental
418  struct rte_event_eth_rx_adapter_stats *stats);
419 
431 
447 int rte_event_eth_rx_adapter_service_id_get(uint8_t id, uint32_t *service_id);
448 
469 int __rte_experimental
471  uint16_t eth_dev_id,
473  void *cb_arg);
474 
475 #ifdef __cplusplus
476 }
477 #endif
478 #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_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_experimental rte_event_eth_rx_adapter_stats_get(uint8_t id, struct rte_event_eth_rx_adapter_stats *stats)
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)