DPDK  17.05.2
Public Member Functions | Data Fields
rte_mbuf Struct Reference

#include <rte_mbuf.h>

Public Member Functions

phys_addr_t buf_physaddr __rte_aligned (sizeof(phys_addr_t))

Data Fields

void * buf_addr
union {
   rte_atomic16_t   refcnt_atomic
   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
union {
   uint32_t   rss
   struct {
      uint32_t   hi
   }   fdir
   struct {
   }   sched
   uint32_t   usr
hash
uint16_t vlan_tci_outer
uint16_t buf_len
uint64_t timestamp
struct rte_mempoolpool
struct rte_mbufnext
uint16_t priv_size
uint16_t timesync
uint32_t seqn
uint32_t packet_type
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 lo
void * userdata
uint64_t udata64
uint64_t tx_offload
uint64_t l2_len:7
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

Detailed Description

The generic rte_mbuf, containing a packet mbuf.

Examples:
examples/bond/main.c, examples/distributor/main.c, examples/ethtool/ethtool-app/main.c, examples/exception_path/main.c, examples/ip_fragmentation/main.c, examples/ip_pipeline/config_parse.c, examples/ip_pipeline/init.c, examples/ip_pipeline/pipeline/pipeline_flow_actions_be.c, examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c, examples/ip_pipeline/pipeline/pipeline_passthrough_be.c, examples/ip_pipeline/pipeline/pipeline_routing_be.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/sa.c, examples/ipv4_multicast/main.c, examples/kni/main.c, examples/l2fwd-cat/l2fwd-cat.c, examples/l2fwd-crypto/main.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-vf/main.c, examples/l3fwd/l3fwd_em.c, examples/l3fwd/l3fwd_lpm.c, examples/link_status_interrupt/main.c, examples/load_balancer/runtime.c, examples/multi_process/client_server_mp/mp_client/client.c, examples/multi_process/client_server_mp/mp_server/main.c, examples/multi_process/l2fwd_fork/main.c, examples/multi_process/symmetric_mp/main.c, examples/netmap_compat/lib/compat_netmap.c, examples/packet_ordering/main.c, examples/performance-thread/l3fwd-thread/main.c, examples/ptpclient/ptpclient.c, examples/qos_meter/main.c, examples/qos_sched/app_thread.c, examples/qos_sched/main.c, examples/quota_watermark/qw/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/tep_termination/main.c, examples/tep_termination/vxlan.c, examples/tep_termination/vxlan_setup.c, examples/vhost/main.c, examples/vhost/virtio_net.c, examples/vhost_xen/main.c, examples/vmdq/main.c, and examples/vmdq_dcb/main.c.

Definition at line 402 of file rte_mbuf.h.

Member Function Documentation

phys_addr_t buf_physaddr __rte_aligned ( sizeof(phys_addr_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

void* buf_addr

Virtual address of segment buffer.

Examples:
examples/ip_pipeline/pipeline/pipeline_routing_be.c.

Definition at line 405 of file rte_mbuf.h.

rte_atomic16_t refcnt_atomic

Atomically accessed refcnt

Definition at line 429 of file rte_mbuf.h.

uint16_t refcnt

Non-atomically accessed refcnt

Definition at line 430 of file rte_mbuf.h.

RTE_STD_C11 { ... }

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 CONFIG_RTE_MBUF_REFCNT_ATOMIC config option.

uint16_t nb_segs

Number of segments.

Examples:
examples/exception_path/main.c, and examples/ipv4_multicast/main.c.

Definition at line 432 of file rte_mbuf.h.

uint16_t port
uint64_t ol_flags
uint32_t packet_type
uint32_t l2_type

(Outer) L2 type.

Definition at line 453 of file rte_mbuf.h.

uint32_t l3_type

(Outer) L3 type.

Definition at line 454 of file rte_mbuf.h.

uint32_t l4_type

(Outer) L4 type.

Definition at line 455 of file rte_mbuf.h.

uint32_t tun_type

Tunnel type.

Definition at line 456 of file rte_mbuf.h.

uint32_t inner_l2_type

Inner L2 type.

Definition at line 457 of file rte_mbuf.h.

uint32_t inner_l3_type

Inner L3 type.

Definition at line 458 of file rte_mbuf.h.

uint32_t inner_l4_type

Inner L4 type.

Definition at line 459 of file rte_mbuf.h.

uint32_t pkt_len
uint16_t data_len
uint16_t vlan_tci

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

Examples:
examples/ipv4_multicast/main.c.

Definition at line 466 of file rte_mbuf.h.

uint32_t rss

RSS hash result if RSS enabled

Definition at line 469 of file rte_mbuf.h.

uint32_t lo

Second 4 flexible bytes

Definition at line 478 of file rte_mbuf.h.

uint32_t hi

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

Definition at line 481 of file rte_mbuf.h.

struct { ... } fdir

Filter identifier if FDIR enabled

struct { ... } sched

Hierarchical scheduler

uint32_t usr

User defined tags. See rte_distributor_process()

Definition at line 488 of file rte_mbuf.h.

union { ... } hash

hash information

uint16_t vlan_tci_outer

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

Examples:
examples/ipv4_multicast/main.c.

Definition at line 492 of file rte_mbuf.h.

uint16_t buf_len

Length of segment buffer.

Examples:
examples/vhost/virtio_net.c.

Definition at line 494 of file rte_mbuf.h.

uint64_t timestamp

Valid if PKT_RX_TIMESTAMP is set. The unit and time reference are not normalized but are always the same for a given port.

Definition at line 499 of file rte_mbuf.h.

void* userdata

Can be used for external metadata

Definition at line 506 of file rte_mbuf.h.

uint64_t udata64

Allow 8-byte userdata on 32-bit

Definition at line 507 of file rte_mbuf.h.

struct rte_mempool* pool

Pool from which mbuf was allocated.

Definition at line 510 of file rte_mbuf.h.

struct rte_mbuf* next

Next segment of scattered packet.

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

Definition at line 511 of file rte_mbuf.h.

uint64_t tx_offload

combined for easy fetch

Examples:
examples/ipv4_multicast/main.c.

Definition at line 516 of file rte_mbuf.h.

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/tep_termination/vxlan.c, and examples/vhost/main.c.

Definition at line 520 of file rte_mbuf.h.

uint64_t l3_len
uint64_t l4_len

L4 (TCP/UDP) Header Length.

Examples:
examples/tep_termination/vxlan.c.

Definition at line 524 of file rte_mbuf.h.

uint64_t tso_segsz

TCP TSO segment size

Examples:
examples/tep_termination/vxlan.c.

Definition at line 525 of file rte_mbuf.h.

uint64_t outer_l3_len

Outer L3 (IP) Hdr Length.

Examples:
examples/tep_termination/vxlan.c.

Definition at line 528 of file rte_mbuf.h.

uint64_t outer_l2_len

Outer L2 (MAC) Hdr Length.

Examples:
examples/tep_termination/vxlan.c.

Definition at line 529 of file rte_mbuf.h.

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 537 of file rte_mbuf.h.

uint16_t timesync

Timesync flags for use with IEEE1588.

Examples:
examples/ptpclient/ptpclient.c.

Definition at line 540 of file rte_mbuf.h.

uint32_t seqn

Sequence number. See also rte_reorder_insert().

Definition at line 543 of file rte_mbuf.h.


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