CNDP  22.08.0
pktmbuf_s Struct Reference

#include <pktmbuf.h>

Data Fields

void * pooldata
void * buf_addr
uint32_t hash
uint32_t meta_index
uint16_t data_off
uint16_t lport
uint16_t buf_len
uint16_t data_len
union {
   uint16_t   refcnt
uint64_t ol_flags
uint32_t packet_type
uint8_t l2_type: 4
uint8_t l3_type: 4
uint8_t l4_type: 4
uint8_t tun_type: 4
uint8_t inner_esp_next_proto
uint8_t inner_l2_type: 4
uint8_t inner_l3_type: 4
uint8_t inner_l4_type: 4
uint64_t tx_offload
uint64_t l2_len: CNE_MBUF_L2_LEN_BITS
uint64_t l3_len: CNE_MBUF_L3_LEN_BITS
uint64_t l4_len: CNE_MBUF_L4_LEN_BITS
uint64_t tso_segsz: CNE_MBUF_TSO_SEGSZ_BITS
uint64_t outer_l3_len: CNE_MBUF_OUTL3_LEN_BITS
uint64_t outer_l2_len: CNE_MBUF_OUTL2_LEN_BITS
void * userptr
uint64_t udata64

Detailed Description

Field Documentation

◆ pooldata

void* pooldata

pktmbuf information pool data pointer

Definition at line 103 of file pktmbuf.h.

◆ buf_addr

void* buf_addr

Virtual address of segment buffer

Definition at line 104 of file pktmbuf.h.

◆ hash

uint32_t hash

Hash value

Definition at line 105 of file pktmbuf.h.

◆ meta_index

uint32_t meta_index

Index into the metadata array if present

Definition at line 106 of file pktmbuf.h.

◆ data_off

uint16_t data_off

Data offset

Definition at line 107 of file pktmbuf.h.

◆ lport

uint16_t lport

RX lport number

Definition at line 108 of file pktmbuf.h.

◆ buf_len

uint16_t buf_len

Length of segment buffer - sizeof(pktmbuf_t)

Definition at line 109 of file pktmbuf.h.

◆ data_len

uint16_t data_len

Amount of data in segment buffer


Definition at line 110 of file pktmbuf.h.

◆ packet_type

uint32_t packet_type

L2/L3/L4 and tunnel information.

Definition at line 121 of file pktmbuf.h.

◆ l2_type

uint8_t l2_type

(Outer) L2 type.

Definition at line 124 of file pktmbuf.h.

◆ l3_type

uint8_t l3_type

(Outer) L3 type.

Definition at line 125 of file pktmbuf.h.

◆ l4_type

uint8_t l4_type

(Outer) L4 type.

Definition at line 126 of file pktmbuf.h.

◆ tun_type

uint8_t tun_type

Tunnel type.

Definition at line 127 of file pktmbuf.h.

◆ inner_esp_next_proto

uint8_t inner_esp_next_proto

ESP next protocol type, valid if CNE_PTYPE_TUNNEL_ESP tunnel type is set on both Tx and Rx.

Definition at line 130 of file pktmbuf.h.

◆ inner_l2_type

uint8_t inner_l2_type

Inner L2 type.

Definition at line 137 of file pktmbuf.h.

◆ inner_l3_type

uint8_t inner_l3_type

Inner L3 type.

Definition at line 138 of file pktmbuf.h.

◆ inner_l4_type

uint8_t inner_l4_type

Inner L4 type.

Definition at line 141 of file pktmbuf.h.

◆ refcnt

uint16_t refcnt

Non-atomically accessed refcnt

Definition at line 157 of file pktmbuf.h.


CNE_STD_C11 { ... }

Reference counter. Its size should at least equal to the size of lport field (16 bits), to support zero-copy broadcast. It should only be accessed using the following functions: pktmbuf_refcnt_update(), pktmbuf_refcnt_read(), and pktmbuf_refcnt_set(). The functionality of these functions (atomic, or non-atomic) is controlled by the CONFIG_CNE_MBUF_REFCNT_ATOMIC config option.

◆ tx_offload

uint64_t tx_offload

combined for easy fetch

Definition at line 165 of file pktmbuf.h.

◆ l2_len

uint64_t l2_len

L2 (MAC) Header Length for non-tunneling pkt. Outer_L4_len + ... + Inner_L2_len for tunneling pkt.

Definition at line 168 of file pktmbuf.h.

◆ l3_len

uint64_t l3_len

L3 (IP) Header Length.

Definition at line 172 of file pktmbuf.h.

◆ l4_len

uint64_t l4_len

L4 (TCP/UDP) Header Length.

Definition at line 173 of file pktmbuf.h.

◆ tso_segsz

uint64_t tso_segsz

TCP TSO segment size

Definition at line 174 of file pktmbuf.h.

◆ outer_l3_len

uint64_t outer_l3_len

Outer L3 (IP) Hdr Length.

Definition at line 188 of file pktmbuf.h.

◆ outer_l2_len

uint64_t outer_l2_len

Outer L2 (MAC) Hdr Length.

Definition at line 189 of file pktmbuf.h.

◆ ol_flags

uint64_t ol_flags

Offload flags

Definition at line 195 of file pktmbuf.h.

◆ userptr

void* userptr

< Extra user supplied data or pointer to data 64bit user supplied pointer (optional)

Definition at line 199 of file pktmbuf.h.

◆ udata64

uint64_t udata64

64bit data value (optional)

Definition at line 200 of file pktmbuf.h.

The documentation for this struct was generated from the following file: