34 #ifndef __INCLUDE_RTE_PORT_H__
35 #define __INCLUDE_RTE_PORT_H__
57 #define RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset) \
58 (&((uint8_t *)(mbuf))[offset])
59 #define RTE_MBUF_METADATA_UINT16_PTR(mbuf, offset) \
60 ((uint16_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
61 #define RTE_MBUF_METADATA_UINT32_PTR(mbuf, offset) \
62 ((uint32_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
63 #define RTE_MBUF_METADATA_UINT64_PTR(mbuf, offset) \
64 ((uint64_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
66 #define RTE_MBUF_METADATA_UINT8(mbuf, offset) \
67 (*RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
68 #define RTE_MBUF_METADATA_UINT16(mbuf, offset) \
69 (*RTE_MBUF_METADATA_UINT16_PTR(mbuf, offset))
70 #define RTE_MBUF_METADATA_UINT32(mbuf, offset) \
71 (*RTE_MBUF_METADATA_UINT32_PTR(mbuf, offset))
72 #define RTE_MBUF_METADATA_UINT64(mbuf, offset) \
73 (*RTE_MBUF_METADATA_UINT64_PTR(mbuf, offset))
82 #define RTE_PORT_IN_BURST_SIZE_MAX 64
100 typedef void* (*rte_port_in_op_create)(
void *params,
int socket_id);
162 uint64_t n_pkts_drop;
175 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)