rte_mbuf(3)
π rte_mbuf β NAME π
okay bestie, so this is the manual page for rte_mbuf(3) from the Library Functions Manual β yes that kind of manual, we're being fancy today. It's the whole rundown on the generic mbuf struct in DPDK, and honestly? it's giving main character energy of the entire packet pipeline. Let's get into it π«Ά
β¨ SYNOPSIS β¨
#include <rte_mbuf_core.h>
π Data Fields π
like, these are the fields listed up front in the synopsis, no cap:
void * buf_addrstruct rte_mbuf * nextuint64_t ol_flagsstruct rte_mempool * pooluint64_t dynfield2struct rte_mbuf_ext_shared_info * shinfouint16_t priv_sizeuint16_t timesyncuint32_t dynfield1 [9]
π¦ Detailed Description π¦
The generic rte_mbuf, containing a packet mbuf. That's the whole vibe β it's the container, the moment, the icon.
Definition at line 475 of file rte_mbuf_core.h.
πΈ Field Documentation πΈ
okay so this is the part where we meet every single field one by one, and there are... a lot of them. buckle up, bestie π
void* buf_addrβ Virtual address of segment buffer. (Definition at line 476 of filerte_mbuf_core.h.)struct rte_mbuf* nextβ Next segment of scattered packet. This field is valid when physical address field is undefined. Otherwise thenextpointer in the second cache line gets used instead. (Definition at line 493 of filerte_mbuf_core.h.)uint16_t refcntβ Reference counter. Its size should at least equal the size of theportfield (16 bits), to support zero-copy broadcast. And listen β it should only be accessed using these functions:rte_mbuf_refcnt_update(),rte_mbuf_refcnt_read(), andrte_mbuf_refcnt_set(). The functionality of these functions (atomic, or non-atomic) is controlled by theRTE_MBUF_REFCNT_ATOMICflag. no touching it directly, i don't make the rules π (Definition at line 514 of filerte_mbuf_core.h.)uint16_t nb_segsβ Number of segments. Only valid for the first segment of an mbuf chain. (Definition at line 520 of filerte_mbuf_core.h.)uint16_t portβ Input port (16 bits to support more than 256 virtual ports). The event eth Tx adapter uses this field to specify the output port. (Definition at line 525 of filerte_mbuf_core.h.)uint64_t ol_flagsβ Offload features. (Definition at line 529 of filerte_mbuf_core.h.)uint32_t packet_typeβ L2/L3/L4 and tunnel information. (Definition at line 545 of filerte_mbuf_core.h.)uint8_t l2_typeβ (Outer) L2 type. (Definition at line 548 of filerte_mbuf_core.h.)uint8_t l3_typeβ (Outer) L3 type. (Definition at line 549 of filerte_mbuf_core.h.)uint8_t l4_typeβ (Outer) L4 type. (Definition at line 550 of filerte_mbuf_core.h.)uint8_t tun_typeβ Tunnel type. (Definition at line 551 of filerte_mbuf_core.h.)uint8_t inner_esp_next_protoβ ESP next protocol type, valid ifRTE_PTYPE_TUNNEL_ESPtunnel type is set on both Tx and Rx. (Definition at line 553 of filerte_mbuf_core.h.)uint8_t inner_l2_typeβ Inner L2 type. (Definition at line 560 of filerte_mbuf_core.h.)uint8_t inner_l3_typeβ Inner L3 type. (Definition at line 562 of filerte_mbuf_core.h.)uint8_t inner_l4_typeβ Inner L4 type. (Definition at line 566 of filerte_mbuf_core.h.)uint32_t pkt_lenβ Total pkt len: sum of all segments. (Definition at line 570 of filerte_mbuf_core.h.)uint16_t data_lenβ Amount of data in segment buffer. (Definition at line 571 of filerte_mbuf_core.h.)uint16_t vlan_tciβ VLAN TCI (CPU order), valid ifRTE_MBUF_F_RX_VLANis set. (Definition at line 573 of filerte_mbuf_core.h.)uint32_t rssβ RSS hash result if RSS enabled. (Definition at line 577 of filerte_mbuf_core.h.)uint32_t loβ Second 4 flexible bytes. (Definition at line 584 of filerte_mbuf_core.h.)uint32_t hiβ First 4 flexible bytes or FD ID, dependent onRTE_MBUF_F_RX_FDIR_*flag inol_flags. (Definition at line 587 of filerte_mbuf_core.h.)struct { ... } fdirβ Filter identifier if FDIR enabled.struct rte_mbuf_sched schedβ Hierarchical scheduler : 8 bytes. (Definition at line 592 of filerte_mbuf_core.h.)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 597 of file rte_mbuf_core.h.)
struct { ... } txadapterβ Eventdev ethdev Tx adapter.uint32_t usrβ User defined tags. Seerte_distributor_process(). (Definition at line 603 of filerte_mbuf_core.h.)union { ... } hashβ hash information.uint16_t vlan_tci_outerβ Outer VLAN TCI (CPU order), valid ifRTE_MBUF_F_RX_QINQis set. (Definition at line 609 of filerte_mbuf_core.h.)uint16_t buf_lenβ Length of segment buffer. (Definition at line 611 of filerte_mbuf_core.h.)struct rte_mempool* poolβ Pool from which mbuf was allocated. (Definition at line 615 of filerte_mbuf_core.h.)uint64_t dynfield2β Reserved for dynamic fields when thenextpointer is in first cache line (i.e.RTE_IOVA_IN_MBUFis 0). (Definition at line 635 of filerte_mbuf_core.h.)uint64_t tx_offloadβ combined for easy fetch. (Definition at line 640 of filerte_mbuf_core.h.)uint64_t l2_lenβ L2 (MAC) Header Length for non-tunneling pkt.Outer_L4_len+ ... +Inner_L2_lenfor tunneling pkt. (Definition at line 643 of filerte_mbuf_core.h.)uint64_t l3_lenβ L3 (IP) Header Length. (Definition at line 647 of filerte_mbuf_core.h.)uint64_t l4_lenβ L4 (TCP/UDP) Header Length. (Definition at line 649 of filerte_mbuf_core.h.)uint64_t tso_segszβ TCP TSO segment size. (Definition at line 651 of filerte_mbuf_core.h.)uint64_t outer_l3_lenβ Outer L3 (IP) Hdr Length. (Definition at line 666 of filerte_mbuf_core.h.)uint64_t outer_l2_lenβ Outer L2 (MAC) Hdr Length. (Definition at line 668 of filerte_mbuf_core.h.)struct rte_mbuf_ext_shared_info* shinfoβ Shared data for external buffer attached to mbuf. Seerte_pktmbuf_attach_extbuf(). (Definition at line 678 of filerte_mbuf_core.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 683 of filerte_mbuf_core.h.)uint16_t timesyncβ Timesync flags for use with IEEE1588. (Definition at line 686 of filerte_mbuf_core.h.)uint32_t dynfield1[9]β Reserved for dynamic fields. (Definition at line 688 of filerte_mbuf_core.h.)
π Author π
Generated automatically by Doxygen for DPDK from the source code. so like, a robot wrote the credits, not me π
and that's the whole page bestie, you ate that π
kisses and bye β this was DPDK, Version 26.03.0, serving you rte_mbuf(3) straight from the manual ππ§β
π¦ where this page comes from
- nixos 26.05: dpdk 26.03
- nixpkgs unstable: dpdk 26.03
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms