5 #ifndef __INCLUDE_RTE_PORT_H__ 6 #define __INCLUDE_RTE_PORT_H__ 28 #define RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset) \ 29 (&((uint8_t *)(mbuf))[offset]) 30 #define RTE_MBUF_METADATA_UINT16_PTR(mbuf, offset) \ 31 ((uint16_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset)) 32 #define RTE_MBUF_METADATA_UINT32_PTR(mbuf, offset) \ 33 ((uint32_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset)) 34 #define RTE_MBUF_METADATA_UINT64_PTR(mbuf, offset) \ 35 ((uint64_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset)) 37 #define RTE_MBUF_METADATA_UINT8(mbuf, offset) \ 38 (*RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset)) 39 #define RTE_MBUF_METADATA_UINT16(mbuf, offset) \ 40 (*RTE_MBUF_METADATA_UINT16_PTR(mbuf, offset)) 41 #define RTE_MBUF_METADATA_UINT32(mbuf, offset) \ 42 (*RTE_MBUF_METADATA_UINT32_PTR(mbuf, offset)) 43 #define RTE_MBUF_METADATA_UINT64(mbuf, offset) \ 44 (*RTE_MBUF_METADATA_UINT64_PTR(mbuf, offset)) 53 #define RTE_PORT_IN_BURST_SIZE_MAX 64 71 typedef void* (*rte_port_in_op_create)(
void *params,
int socket_id);
133 uint64_t n_pkts_drop;
146 typedef void* (*rte_port_out_op_create)(
void *params,
int socket_id);
int(* rte_port_in_op_rx)(void *port, struct rte_mbuf **pkts, uint32_t n_pkts)
rte_port_out_op_create f_create
rte_port_out_op_tx_bulk f_tx_bulk
rte_port_out_op_stats_read f_stats
rte_port_in_op_stats_read f_stats
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_free)(void *port)
int(* rte_port_out_op_flush)(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)(void *port, struct rte_mbuf *pkt)
rte_port_out_op_flush f_flush
int(* rte_port_out_op_stats_read)(void *port, struct rte_port_out_stats *stats, int clear)
rte_port_in_op_create f_create
rte_port_out_op_free f_free
int(* rte_port_out_op_tx_bulk)(void *port, struct rte_mbuf **pkt, uint64_t pkts_mask)
rte_port_in_op_free f_free
int(* rte_port_in_op_free)(void *port)