5 #ifndef __INCLUDE_RTE_PORT_H__
6 #define __INCLUDE_RTE_PORT_H__
27 #define RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset) \
28 (&((uint8_t *)(mbuf))[offset])
29 #define RTE_MBUF_METADATA_UINT16_PTR(mbuf, offset) \
30 ((uint16_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
31 #define RTE_MBUF_METADATA_UINT32_PTR(mbuf, offset) \
32 ((uint32_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
33 #define RTE_MBUF_METADATA_UINT64_PTR(mbuf, offset) \
34 ((uint64_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
36 #define RTE_MBUF_METADATA_UINT8(mbuf, offset) \
37 (*RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
38 #define RTE_MBUF_METADATA_UINT16(mbuf, offset) \
39 (*RTE_MBUF_METADATA_UINT16_PTR(mbuf, offset))
40 #define RTE_MBUF_METADATA_UINT32(mbuf, offset) \
41 (*RTE_MBUF_METADATA_UINT32_PTR(mbuf, offset))
42 #define RTE_MBUF_METADATA_UINT64(mbuf, offset) \
43 (*RTE_MBUF_METADATA_UINT64_PTR(mbuf, offset))
51 #define RTE_PORT_IN_BURST_SIZE_MAX 64
69 typedef void* (*rte_port_in_op_create)(
void *params,
int socket_id);
130 uint64_t n_pkts_drop;
143 typedef void* (*rte_port_out_op_create)(
void *params,
int socket_id);
int(* rte_port_out_op_tx)(void *port, struct rte_mbuf *pkt)
int(* rte_port_in_op_free)(void *port)
int(* rte_port_out_op_free)(void *port)
int(* rte_port_in_op_stats_read)(void *port, struct rte_port_in_stats *stats, int clear)
int(* rte_port_out_op_tx_bulk)(void *port, struct rte_mbuf **pkts, uint64_t pkts_mask)
int(* rte_port_out_op_flush)(void *port)
void *(* rte_port_in_op_create)(void *params, int socket_id)
void *(* rte_port_out_op_create)(void *params, int socket_id)
int(* rte_port_out_op_stats_read)(void *port, struct rte_port_out_stats *stats, int clear)
int(* rte_port_in_op_rx)(void *port, struct rte_mbuf **pkts, uint32_t n_pkts)
rte_port_in_op_free f_free
rte_port_in_op_stats_read f_stats
rte_port_in_op_create f_create
rte_port_out_op_stats_read f_stats
rte_port_out_op_create f_create
rte_port_out_op_flush f_flush
rte_port_out_op_free f_free
rte_port_out_op_tx_bulk f_tx_bulk