5#ifndef __INCLUDE_RTE_PORT_H__
6#define __INCLUDE_RTE_PORT_H__
23#define RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset) \
24 (&((uint8_t *)(mbuf))[offset])
25#define RTE_MBUF_METADATA_UINT16_PTR(mbuf, offset) \
26 ((uint16_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
27#define RTE_MBUF_METADATA_UINT32_PTR(mbuf, offset) \
28 ((uint32_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
29#define RTE_MBUF_METADATA_UINT64_PTR(mbuf, offset) \
30 ((uint64_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
32#define RTE_MBUF_METADATA_UINT8(mbuf, offset) \
33 (*RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
34#define RTE_MBUF_METADATA_UINT16(mbuf, offset) \
35 (*RTE_MBUF_METADATA_UINT16_PTR(mbuf, offset))
36#define RTE_MBUF_METADATA_UINT32(mbuf, offset) \
37 (*RTE_MBUF_METADATA_UINT32_PTR(mbuf, offset))
38#define RTE_MBUF_METADATA_UINT64(mbuf, offset) \
39 (*RTE_MBUF_METADATA_UINT64_PTR(mbuf, offset))
47#define RTE_PORT_IN_BURST_SIZE_MAX 64
65typedef void* (*rte_port_in_op_create)(
void *params,
int socket_id);
126 uint64_t n_pkts_drop;
139typedef 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)
int(* rte_port_out_op_stats_read)(void *port, struct rte_port_out_stats *stats, int clear)
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_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