DPDK
19.02.0
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
lib
librte_eventdev
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
107
struct
rte_event_eth_rx_adapter_conf
{
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
153
struct
rte_event_eth_rx_adapter_queue_conf
{
154
uint32_t
rx_queue_flags
;
158
uint16_t
servicing_weight
;
165
struct
rte_event
ev
;
182
};
183
190
struct
rte_event_eth_rx_adapter_stats
{
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
;
201
uint64_t
rx_enq_block_cycles
;
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,
281
rte_event_eth_rx_adapter_conf_cb
conf_cb,
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
364
int
rte_event_eth_rx_adapter_queue_add
(uint8_t
id
,
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
442
int
rte_event_eth_rx_adapter_stats_get
(uint8_t
id
,
443
struct
rte_event_eth_rx_adapter_stats
*stats);
444
458
int
rte_event_eth_rx_adapter_stats_reset
(uint8_t
id
);
459
478
int
rte_event_eth_rx_adapter_service_id_get
(uint8_t
id
, uint32_t *service_id);
479
500
int
__rte_experimental
501
rte_event_eth_rx_adapter_cb_register
(uint8_t
id
,
502
uint16_t eth_dev_id,
503
rte_event_eth_rx_adapter_cb_fn
cb_fn,
504
void
*cb_arg);
505
506
#ifdef __cplusplus
507
}
508
#endif
509
#endif
/* _RTE_EVENT_ETH_RX_ADAPTER_ */
Generated by
1.8.1.2