DPDK  21.11.8
Public Member Functions | Data Fields
rte_mbuf Struct Reference

#include <rte_mbuf_core.h>

Public Member Functions

rte_iova_t buf_iova __rte_aligned (sizeof(rte_iova_t))
 

Data Fields

void * buf_addr
 
uint16_t refcnt
 
uint16_t nb_segs
 
uint16_t port
 
uint64_t ol_flags
 
uint32_t pkt_len
 
uint16_t data_len
 
uint16_t vlan_tci
 
uint16_t vlan_tci_outer
 
uint16_t buf_len
 
struct rte_mempoolpool
 
struct rte_mbufnext
 
struct rte_mbuf_ext_shared_infoshinfo
 
uint16_t priv_size
 
uint16_t timesync
 
uint32_t dynfield1 [9]
 
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
 
uint32_t rss
 
uint32_t lo
 
uint32_t hi
 
struct {
   uint32_t   hi
 
fdir
 
struct rte_mbuf_sched sched
 
uint16_t txq
 
struct {
   uint16_t   txq
 
txadapter
 
uint32_t usr
 
union {
   uint32_t   rss
 
   struct {
      uint32_t   hi
 
   }   fdir
 
   struct rte_mbuf_sched   sched
 
   struct {
      uint16_t   txq
 
   }   txadapter
 
   uint32_t   usr
 
hash
 
uint64_t tx_offload
 
uint64_t l2_len:RTE_MBUF_L2_LEN_BITS
 
uint64_t l3_len:RTE_MBUF_L3_LEN_BITS
 
uint64_t l4_len:RTE_MBUF_L4_LEN_BITS
 
uint64_t tso_segsz:RTE_MBUF_TSO_SEGSZ_BITS
 
uint64_t outer_l3_len:RTE_MBUF_OUTL3_LEN_BITS
 
uint64_t outer_l2_len:RTE_MBUF_OUTL2_LEN_BITS
 

Detailed Description

The generic rte_mbuf, containing a packet mbuf.

Examples:
examples/bbdev_app/main.c, examples/bond/main.c, examples/bpf/t2.c, examples/bpf/t3.c, examples/distributor/main.c, examples/dma/dmafwd.c, examples/ethtool/ethtool-app/main.c, examples/fips_validation/fips_dev_self_test.c, examples/fips_validation/main.c, examples/flow_classify/flow_classify.c, examples/flow_filtering/main.c, examples/ip_fragmentation/main.c, examples/ip_pipeline/mempool.c, examples/ip_pipeline/pipeline.c, examples/ip_reassembly/main.c, examples/ipsec-secgw/esp.c, examples/ipsec-secgw/ipsec-secgw.c, examples/ipsec-secgw/ipsec.c, examples/ipsec-secgw/ipsec_process.c, examples/ipsec-secgw/ipsec_worker.c, examples/ipsec-secgw/sa.c, examples/ipv4_multicast/main.c, examples/kni/main.c, examples/l2fwd-cat/l2fwd-cat.c, examples/l2fwd-crypto/main.c, examples/l2fwd-event/l2fwd_event.c, examples/l2fwd-event/l2fwd_poll.c, examples/l2fwd-jobstats/main.c, examples/l2fwd-keepalive/main.c, examples/l2fwd/main.c, examples/l3fwd-acl/main.c, examples/l3fwd-power/main.c, examples/l3fwd/l3fwd_em.c, examples/l3fwd/l3fwd_fib.c, examples/l3fwd/l3fwd_lpm.c, examples/link_status_interrupt/main.c, examples/multi_process/client_server_mp/mp_client/client.c, examples/multi_process/client_server_mp/mp_server/main.c, examples/multi_process/symmetric_mp/main.c, examples/ntb/ntb_fwd.c, examples/packet_ordering/main.c, examples/performance-thread/l3fwd-thread/main.c, examples/pipeline/obj.c, examples/ptpclient/ptpclient.c, examples/qos_meter/main.c, examples/qos_sched/app_thread.c, examples/qos_sched/main.c, examples/rxtx_callbacks/main.c, examples/server_node_efd/node/node.c, examples/server_node_efd/server/main.c, examples/skeleton/basicfwd.c, examples/vhost/main.c, examples/vhost/virtio_net.c, examples/vmdq/main.c, and examples/vmdq_dcb/main.c.

Definition at line 578 of file rte_mbuf_core.h.

Member Function Documentation

◆ __rte_aligned()

rte_iova_t buf_iova __rte_aligned ( sizeof(rte_iova_t )

Physical address of segment buffer. Force alignment to 8-bytes, so as to ensure we have the exact same mbuf cacheline0 layout for 32-bit and 64-bit. This makes working on vector drivers easier.

Field Documentation

◆ buf_addr

void* buf_addr

Virtual address of segment buffer.

Examples:
examples/ntb/ntb_fwd.c.

Definition at line 581 of file rte_mbuf_core.h.

◆ refcnt

uint16_t refcnt

Reference counter. Its size should at least equal to the size of port field (16 bits), to support zero-copy broadcast. 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 RTE_MBUF_REFCNT_ATOMIC flag.

Definition at line 602 of file rte_mbuf_core.h.

◆ nb_segs

uint16_t nb_segs

Number of segments. Only valid for the first segment of an mbuf chain.

Examples:
examples/ipv4_multicast/main.c, and examples/vhost/virtio_net.c.

Definition at line 608 of file rte_mbuf_core.h.

◆ port

uint16_t port

◆ ol_flags

uint64_t ol_flags

◆ packet_type

uint32_t packet_type

◆ l2_type

uint8_t l2_type

(Outer) L2 type.

Definition at line 632 of file rte_mbuf_core.h.

◆ l3_type

uint8_t l3_type

(Outer) L3 type.

Definition at line 633 of file rte_mbuf_core.h.

◆ l4_type

uint8_t l4_type

(Outer) L4 type.

Definition at line 634 of file rte_mbuf_core.h.

◆ tun_type

uint8_t tun_type

Tunnel type.

Definition at line 635 of file rte_mbuf_core.h.

◆ inner_esp_next_proto

uint8_t inner_esp_next_proto

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

Examples:
examples/ipsec-secgw/esp.c.

Definition at line 638 of file rte_mbuf_core.h.

◆ inner_l2_type

uint8_t inner_l2_type

Inner L2 type.

Definition at line 645 of file rte_mbuf_core.h.

◆ inner_l3_type

uint8_t inner_l3_type

Inner L3 type.

Definition at line 647 of file rte_mbuf_core.h.

◆ inner_l4_type

uint8_t inner_l4_type

Inner L4 type.

Definition at line 651 of file rte_mbuf_core.h.

◆ pkt_len

uint32_t pkt_len

◆ data_len

uint16_t data_len

◆ vlan_tci

uint16_t vlan_tci

VLAN TCI (CPU order), valid if RTE_MBUF_F_RX_VLAN is set.

Examples:
examples/bpf/t2.c, and examples/vhost/main.c.

Definition at line 658 of file rte_mbuf_core.h.

◆ rss

uint32_t rss

RSS hash result if RSS enabled

Definition at line 663 of file rte_mbuf_core.h.

◆ lo

uint32_t lo

Second 4 flexible bytes

Definition at line 670 of file rte_mbuf_core.h.

◆ hi

uint32_t hi

First 4 flexible bytes or FD ID, dependent on RTE_MBUF_F_RX_FDIR_* flag in ol_flags.

Definition at line 673 of file rte_mbuf_core.h.

◆ fdir

struct { ... } fdir

Filter identifier if FDIR enabled

◆ sched

struct rte_mbuf_sched sched

Hierarchical scheduler : 8 bytes

Definition at line 678 of file rte_mbuf_core.h.

◆ txq

uint16_t txq

The event eth Tx adapter uses this field to store Tx queue id.

See also
rte_event_eth_tx_adapter_txq_set()

Definition at line 683 of file rte_mbuf_core.h.

◆ txadapter

struct { ... } txadapter

Eventdev ethdev Tx adapter

◆ usr

uint32_t usr

User defined tags. See rte_distributor_process()

Definition at line 689 of file rte_mbuf_core.h.

◆ hash

union { ... } hash

hash information

◆ vlan_tci_outer

uint16_t vlan_tci_outer

Outer VLAN TCI (CPU order), valid if RTE_MBUF_F_RX_QINQ is set.

Definition at line 695 of file rte_mbuf_core.h.

◆ buf_len

uint16_t buf_len

Length of segment buffer.

Examples:
examples/vhost/virtio_net.c.

Definition at line 697 of file rte_mbuf_core.h.

◆ pool

struct rte_mempool* pool

Pool from which mbuf was allocated.

Definition at line 699 of file rte_mbuf_core.h.

◆ next

struct rte_mbuf* next

Next segment of scattered packet. Must be NULL in the last segment or in case of non-segmented packet.

Examples:
examples/fips_validation/main.c, examples/ipv4_multicast/main.c, examples/vhost/main.c, and examples/vhost/virtio_net.c.

Definition at line 708 of file rte_mbuf_core.h.

◆ tx_offload

uint64_t tx_offload

combined for easy fetch

Definition at line 713 of file rte_mbuf_core.h.

◆ l2_len

uint64_t l2_len

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

Examples:
examples/ip_fragmentation/main.c, examples/ip_reassembly/main.c, examples/ipsec-secgw/ipsec-secgw.c, examples/ipsec-secgw/ipsec_process.c, examples/ipsec-secgw/ipsec_worker.c, and examples/vhost/main.c.

Definition at line 716 of file rte_mbuf_core.h.

◆ l3_len

uint64_t l3_len

◆ l4_len

uint64_t l4_len

L4 (TCP/UDP) Header Length.

Examples:
examples/ipsec-secgw/ipsec-secgw.c, examples/ipsec-secgw/ipsec_process.c, and examples/vhost/main.c.

Definition at line 722 of file rte_mbuf_core.h.

◆ tso_segsz

uint64_t tso_segsz

TCP TSO segment size

Examples:
examples/ipsec-secgw/ipsec_process.c.

Definition at line 724 of file rte_mbuf_core.h.

◆ outer_l3_len

uint64_t outer_l3_len

Outer L3 (IP) Hdr Length.

Examples:
examples/ipsec-secgw/ipsec_process.c.

Definition at line 739 of file rte_mbuf_core.h.

◆ outer_l2_len

uint64_t outer_l2_len

Outer L2 (MAC) Hdr Length.

Examples:
examples/ipsec-secgw/ipsec_process.c.

Definition at line 741 of file rte_mbuf_core.h.

◆ shinfo

struct rte_mbuf_ext_shared_info* shinfo

Shared data for external buffer attached to mbuf. See rte_pktmbuf_attach_extbuf().

Definition at line 751 of file rte_mbuf_core.h.

◆ priv_size

uint16_t priv_size

Size of the application private data. In case of an indirect mbuf, it stores the direct mbuf private data size.

Definition at line 756 of file rte_mbuf_core.h.

◆ timesync

uint16_t timesync

Timesync flags for use with IEEE1588.

Examples:
examples/ptpclient/ptpclient.c.

Definition at line 759 of file rte_mbuf_core.h.

◆ dynfield1

uint32_t dynfield1[9]

Reserved for dynamic fields.

Definition at line 761 of file rte_mbuf_core.h.


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