6 #ifndef _RTE_MBUF_CORE_H_ 7 #define _RTE_MBUF_CORE_H_ 49 #define RTE_MBUF_F_RX_VLAN (1ULL << 0) 52 #define RTE_MBUF_F_RX_RSS_HASH (1ULL << 1) 55 #define RTE_MBUF_F_RX_FDIR (1ULL << 2) 61 #define RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD (1ULL << 5) 69 #define RTE_MBUF_F_RX_VLAN_STRIPPED (1ULL << 6) 79 #define RTE_MBUF_F_RX_IP_CKSUM_MASK ((1ULL << 4) | (1ULL << 7)) 81 #define RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN 0 82 #define RTE_MBUF_F_RX_IP_CKSUM_BAD (1ULL << 4) 83 #define RTE_MBUF_F_RX_IP_CKSUM_GOOD (1ULL << 7) 84 #define RTE_MBUF_F_RX_IP_CKSUM_NONE ((1ULL << 4) | (1ULL << 7)) 94 #define RTE_MBUF_F_RX_L4_CKSUM_MASK ((1ULL << 3) | (1ULL << 8)) 96 #define RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN 0 97 #define RTE_MBUF_F_RX_L4_CKSUM_BAD (1ULL << 3) 98 #define RTE_MBUF_F_RX_L4_CKSUM_GOOD (1ULL << 8) 99 #define RTE_MBUF_F_RX_L4_CKSUM_NONE ((1ULL << 3) | (1ULL << 8)) 102 #define RTE_MBUF_F_RX_IEEE1588_PTP (1ULL << 9) 105 #define RTE_MBUF_F_RX_IEEE1588_TMST (1ULL << 10) 108 #define RTE_MBUF_F_RX_FDIR_ID (1ULL << 13) 111 #define RTE_MBUF_F_RX_FDIR_FLX (1ULL << 14) 128 #define RTE_MBUF_F_RX_QINQ_STRIPPED (1ULL << 15) 135 #define RTE_MBUF_F_RX_LRO (1ULL << 16) 142 #define RTE_MBUF_F_RX_SEC_OFFLOAD (1ULL << 18) 147 #define RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED (1ULL << 19) 157 #define RTE_MBUF_F_RX_QINQ (1ULL << 20) 174 #define RTE_MBUF_F_RX_OUTER_L4_CKSUM_MASK ((1ULL << 21) | (1ULL << 22)) 176 #define RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN 0 177 #define RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD (1ULL << 21) 178 #define RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD (1ULL << 22) 179 #define RTE_MBUF_F_RX_OUTER_L4_CKSUM_INVALID ((1ULL << 21) | (1ULL << 22)) 183 #define RTE_MBUF_F_FIRST_FREE (1ULL << 23) 184 #define RTE_MBUF_F_LAST_FREE (1ULL << 40) 197 #define RTE_MBUF_F_TX_OUTER_UDP_CKSUM (1ULL << 41) 204 #define RTE_MBUF_F_TX_UDP_SEG (1ULL << 42) 212 #define RTE_MBUF_F_TX_SEC_OFFLOAD (1ULL << 43) 218 #define RTE_MBUF_F_TX_MACSEC (1ULL << 44) 229 #define RTE_MBUF_F_TX_TUNNEL_VXLAN (0x1ULL << 45) 230 #define RTE_MBUF_F_TX_TUNNEL_GRE (0x2ULL << 45) 231 #define RTE_MBUF_F_TX_TUNNEL_IPIP (0x3ULL << 45) 232 #define RTE_MBUF_F_TX_TUNNEL_GENEVE (0x4ULL << 45) 234 #define RTE_MBUF_F_TX_TUNNEL_MPLSINUDP (0x5ULL << 45) 235 #define RTE_MBUF_F_TX_TUNNEL_VXLAN_GPE (0x6ULL << 45) 236 #define RTE_MBUF_F_TX_TUNNEL_GTP (0x7ULL << 45) 237 #define RTE_MBUF_F_TX_TUNNEL_ESP (0x8ULL << 45) 249 #define RTE_MBUF_F_TX_TUNNEL_IP (0xDULL << 45) 262 #define RTE_MBUF_F_TX_TUNNEL_UDP (0xEULL << 45) 264 #define RTE_MBUF_F_TX_TUNNEL_MASK (0xFULL << 45) 271 #define RTE_MBUF_F_TX_QINQ (1ULL << 49) 282 #define RTE_MBUF_F_TX_TCP_SEG (1ULL << 50) 285 #define RTE_MBUF_F_TX_IEEE1588_TMST (1ULL << 51) 298 #define RTE_MBUF_F_TX_L4_NO_CKSUM (0ULL << 52) 301 #define RTE_MBUF_F_TX_TCP_CKSUM (1ULL << 52) 304 #define RTE_MBUF_F_TX_SCTP_CKSUM (2ULL << 52) 307 #define RTE_MBUF_F_TX_UDP_CKSUM (3ULL << 52) 310 #define RTE_MBUF_F_TX_L4_MASK (3ULL << 52) 318 #define RTE_MBUF_F_TX_IP_CKSUM (1ULL << 54) 326 #define RTE_MBUF_F_TX_IPV4 (1ULL << 55) 334 #define RTE_MBUF_F_TX_IPV6 (1ULL << 56) 341 #define RTE_MBUF_F_TX_VLAN (1ULL << 57) 349 #define RTE_MBUF_F_TX_OUTER_IP_CKSUM (1ULL << 58) 356 #define RTE_MBUF_F_TX_OUTER_IPV4 (1ULL << 59) 363 #define RTE_MBUF_F_TX_OUTER_IPV6 (1ULL << 60) 369 #define RTE_MBUF_F_TX_OFFLOAD_MASK ( \ 370 RTE_MBUF_F_TX_OUTER_IPV6 | \ 371 RTE_MBUF_F_TX_OUTER_IPV4 | \ 372 RTE_MBUF_F_TX_OUTER_IP_CKSUM | \ 373 RTE_MBUF_F_TX_VLAN | \ 374 RTE_MBUF_F_TX_IPV6 | \ 375 RTE_MBUF_F_TX_IPV4 | \ 376 RTE_MBUF_F_TX_IP_CKSUM | \ 377 RTE_MBUF_F_TX_L4_MASK | \ 378 RTE_MBUF_F_TX_IEEE1588_TMST | \ 379 RTE_MBUF_F_TX_TCP_SEG | \ 380 RTE_MBUF_F_TX_QINQ | \ 381 RTE_MBUF_F_TX_TUNNEL_MASK | \ 382 RTE_MBUF_F_TX_MACSEC | \ 383 RTE_MBUF_F_TX_SEC_OFFLOAD | \ 384 RTE_MBUF_F_TX_UDP_SEG | \ 385 RTE_MBUF_F_TX_OUTER_UDP_CKSUM) 390 #define RTE_MBUF_F_EXTERNAL (1ULL << 61) 392 #define RTE_MBUF_F_INDIRECT (1ULL << 62) 395 #define RTE_MBUF_PRIV_ALIGN 8 403 #define RTE_MBUF_DEFAULT_DATAROOM 2048 404 #define RTE_MBUF_DEFAULT_BUF_SIZE \ 405 (RTE_MBUF_DEFAULT_DATAROOM + RTE_PKTMBUF_HEADROOM) 423 RTE_MBUF_L2_LEN_BITS = 7,
424 RTE_MBUF_L3_LEN_BITS = 9,
425 RTE_MBUF_L4_LEN_BITS = 8,
426 RTE_MBUF_TSO_SEGSZ_BITS = 16,
427 RTE_MBUF_OUTL3_LEN_BITS = 9,
428 RTE_MBUF_OUTL2_LEN_BITS = 7,
429 RTE_MBUF_TXOFLD_UNUSED_BITS =
sizeof(uint64_t) * CHAR_BIT -
430 RTE_MBUF_L2_LEN_BITS -
431 RTE_MBUF_L3_LEN_BITS -
432 RTE_MBUF_L4_LEN_BITS -
433 RTE_MBUF_TSO_SEGSZ_BITS -
434 RTE_MBUF_OUTL3_LEN_BITS -
435 RTE_MBUF_OUTL2_LEN_BITS,
436 #
if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
437 RTE_MBUF_L2_LEN_OFS =
438 sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS,
439 RTE_MBUF_L3_LEN_OFS = RTE_MBUF_L2_LEN_OFS - RTE_MBUF_L3_LEN_BITS,
440 RTE_MBUF_L4_LEN_OFS = RTE_MBUF_L3_LEN_OFS - RTE_MBUF_L4_LEN_BITS,
441 RTE_MBUF_TSO_SEGSZ_OFS = RTE_MBUF_L4_LEN_OFS - RTE_MBUF_TSO_SEGSZ_BITS,
442 RTE_MBUF_OUTL3_LEN_OFS =
443 RTE_MBUF_TSO_SEGSZ_OFS - RTE_MBUF_OUTL3_LEN_BITS,
444 RTE_MBUF_OUTL2_LEN_OFS =
445 RTE_MBUF_OUTL3_LEN_OFS - RTE_MBUF_OUTL2_LEN_BITS,
446 RTE_MBUF_TXOFLD_UNUSED_OFS =
447 RTE_MBUF_OUTL2_LEN_OFS - RTE_MBUF_TXOFLD_UNUSED_BITS,
449 RTE_MBUF_L2_LEN_OFS = 0,
450 RTE_MBUF_L3_LEN_OFS = RTE_MBUF_L2_LEN_OFS + RTE_MBUF_L2_LEN_BITS,
451 RTE_MBUF_L4_LEN_OFS = RTE_MBUF_L3_LEN_OFS + RTE_MBUF_L3_LEN_BITS,
452 RTE_MBUF_TSO_SEGSZ_OFS = RTE_MBUF_L4_LEN_OFS + RTE_MBUF_L4_LEN_BITS,
453 RTE_MBUF_OUTL3_LEN_OFS =
454 RTE_MBUF_TSO_SEGSZ_OFS + RTE_MBUF_TSO_SEGSZ_BITS,
455 RTE_MBUF_OUTL2_LEN_OFS =
456 RTE_MBUF_OUTL3_LEN_OFS + RTE_MBUF_OUTL3_LEN_BITS,
457 RTE_MBUF_TXOFLD_UNUSED_OFS =
458 RTE_MBUF_OUTL2_LEN_OFS + RTE_MBUF_OUTL2_LEN_BITS,
667 uint32_t dynfield1[9];
685 #define RTE_MBUF_MAX_NB_SEGS UINT16_MAX 694 #define RTE_MBUF_CLONED(mb) ((mb)->ol_flags & RTE_MBUF_F_INDIRECT) 701 #define RTE_MBUF_HAS_EXTBUF(mb) ((mb)->ol_flags & RTE_MBUF_F_EXTERNAL) 709 #define RTE_MBUF_DIRECT(mb) \ 710 (!((mb)->ol_flags & (RTE_MBUF_F_INDIRECT | RTE_MBUF_F_EXTERNAL))) 713 #define RTE_MBUF_PORT_INVALID UINT16_MAX 715 #define MBUF_INVALID_PORT RTE_MBUF_PORT_INVALID 731 #define rte_pktmbuf_mtod_offset(m, t, o) \ 732 ((t)(void *)((char *)(m)->buf_addr + (m)->data_off + (o))) 746 #define rte_pktmbuf_mtod(m, t) rte_pktmbuf_mtod_offset(m, t, 0) 757 #define rte_pktmbuf_iova_offset(m, o) \ 758 (rte_iova_t)(rte_mbuf_iova_get(m) + (m)->data_off + (o)) 767 #define rte_pktmbuf_iova(m) rte_pktmbuf_iova_offset(m, 0) struct rte_mbuf_ext_shared_info * shinfo
uint8_t inner_esp_next_proto
#define __rte_cache_min_aligned
rte_mbuf_extbuf_free_callback_t free_cb
__extension__ typedef void * RTE_MARKER[0]
void(* rte_mbuf_extbuf_free_callback_t)(void *addr, void *opaque)
__extension__ typedef uint64_t RTE_MARKER64[0]
#define __rte_cache_aligned
struct rte_mempool * pool