#define RTE_CACHE_LINE_MIN_SIZE 64
#define RTE_CACHE_LINE_SIZE 64
typedef char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
typedef uint64_t phys_addr_t;
* Force alignment
*/
#define __rte_aligned(a) __attribute__((__aligned__(a)))
* Force alignment to cache line.
*/
#define __rte_cache_aligned __rte_aligned(RTE_CACHE_LINE_SIZE)
* Force minimum cache line alignment.
*/
#define __rte_cache_min_aligned __rte_aligned(RTE_CACHE_LINE_MIN_SIZE)
* mbuf */
__extension__
typedef void *MARKER[0];
__extension__
typedef uint8_t MARKER8[0];
__extension__
typedef uint64_t MARKER64[0];
* with a single assignment */
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L
#define RTE_STD_C11 __extension__
#else
#define RTE_STD_C11
#endif
* The atomic counter structure.
*/
typedef struct {
volatile int16_t cnt;
} rte_atomic16_t;
* The generic rte_mbuf, containing a packet mbuf.
*/
struct rte_mbuf {
MARKER cacheline0;
void *buf_addr;
phys_addr_t buf_physaddr;
uint16_t buf_len;
MARKER8 rearm_data;
uint16_t data_off;
* 16-bit Reference counter.
* It should only be accessed using the following functions:
* rte_mbuf_refcnt_update(), rte_mbuf_refcnt_read(), and
* rte_mbuf_refcnt_set(). The functionality of these functions (atomic,
* or non-atomic) is controlled by the CONFIG_RTE_MBUF_REFCNT_ATOMIC
* config option.
*/
RTE_STD_C11
union {
rte_atomic16_t refcnt_atomic;
uint16_t refcnt;
};
uint8_t nb_segs;
uint8_t port;
uint64_t ol_flags;
MARKER rx_descriptor_fields1;
* The packet type, which is the combination of outer/inner L2, L3, L4
* and tunnel types. The packet_type is about data really present in the
* mbuf. Example: if vlan stripping is enabled, a received vlan packet
* would have RTE_PTYPE_L2_ETHER and not RTE_PTYPE_L2_VLAN because the
* vlan is stripped from the data.
*/
RTE_STD_C11
union {
uint32_t packet_type;
struct {
uint32_t l2_type:4;
uint32_t l3_type:4;
uint32_t l4_type:4;
uint32_t tun_type:4;
uint32_t inner_l2_type:4;
uint32_t inner_l3_type:4;
uint32_t inner_l4_type:4;
};
};
uint32_t pkt_len;
uint16_t data_len;
uint16_t vlan_tci;
union {
uint32_t rss;
struct {
RTE_STD_C11
union {
struct {
uint16_t hash;
uint16_t id;
};
uint32_t lo;
};
uint32_t hi;
PKT_RX_FDIR_* flag in ol_flags. */
} fdir;
struct {
uint32_t lo;
uint32_t hi;
} sched;
uint32_t usr;
} hash;
uint32_t seqn;
uint16_t vlan_tci_outer;
MARKER cacheline1 __rte_cache_min_aligned;
RTE_STD_C11
union {
void *userdata;
uint64_t udata64;
};
struct rte_mempool *pool;
struct rte_mbuf *next;
RTE_STD_C11
union {
uint64_t tx_offload;
__extension__
struct {
uint64_t l2_len:7;
* Outer_L4_len + ... + Inner_L2_len for tunneling pkt.
*/
uint64_t l3_len:9;
uint64_t l4_len:8;
uint64_t tso_segsz:16;
uint64_t outer_l3_len:9;
uint64_t outer_l2_len:7;
};
};
* mbuf, it stores the direct mbuf private data size. */
uint16_t priv_size;
uint16_t timesync;
} __rte_cache_aligned;