rte_mbuf(3)

πŸ“¦ version 26.03, in nixos 26.05, nixpkgs unstable

πŸ’– 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_addr
  • struct rte_mbuf * next
  • uint64_t ol_flags
  • struct rte_mempool * pool
  • uint64_t dynfield2
  • struct rte_mbuf_ext_shared_info * shinfo
  • uint16_t priv_size
  • uint16_t timesync
  • uint32_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 file rte_mbuf_core.h.)
  • struct rte_mbuf* next β€” Next segment of scattered packet. This field is valid when physical address field is undefined. Otherwise the next pointer in the second cache line gets used instead. (Definition at line 493 of file rte_mbuf_core.h.)
  • uint16_t refcnt β€” Reference counter. Its size should at least equal the size of the port field (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(), and rte_mbuf_refcnt_set(). The functionality of these functions (atomic, or non-atomic) is controlled by the RTE_MBUF_REFCNT_ATOMIC flag. no touching it directly, i don't make the rules πŸ’… (Definition at line 514 of file rte_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 file rte_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 file rte_mbuf_core.h.)
  • uint64_t ol_flags β€” Offload features. (Definition at line 529 of file rte_mbuf_core.h.)
  • uint32_t packet_type β€” L2/L3/L4 and tunnel information. (Definition at line 545 of file rte_mbuf_core.h.)
  • uint8_t l2_type β€” (Outer) L2 type. (Definition at line 548 of file rte_mbuf_core.h.)
  • uint8_t l3_type β€” (Outer) L3 type. (Definition at line 549 of file rte_mbuf_core.h.)
  • uint8_t l4_type β€” (Outer) L4 type. (Definition at line 550 of file rte_mbuf_core.h.)
  • uint8_t tun_type β€” Tunnel type. (Definition at line 551 of file rte_mbuf_core.h.)
  • 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. (Definition at line 553 of file rte_mbuf_core.h.)
  • uint8_t inner_l2_type β€” Inner L2 type. (Definition at line 560 of file rte_mbuf_core.h.)
  • uint8_t inner_l3_type β€” Inner L3 type. (Definition at line 562 of file rte_mbuf_core.h.)
  • uint8_t inner_l4_type β€” Inner L4 type. (Definition at line 566 of file rte_mbuf_core.h.)
  • uint32_t pkt_len β€” Total pkt len: sum of all segments. (Definition at line 570 of file rte_mbuf_core.h.)
  • uint16_t data_len β€” Amount of data in segment buffer. (Definition at line 571 of file rte_mbuf_core.h.)
  • uint16_t vlan_tci β€” VLAN TCI (CPU order), valid if RTE_MBUF_F_RX_VLAN is set. (Definition at line 573 of file rte_mbuf_core.h.)
  • uint32_t rss β€” RSS hash result if RSS enabled. (Definition at line 577 of file rte_mbuf_core.h.)
  • uint32_t lo β€” Second 4 flexible bytes. (Definition at line 584 of file rte_mbuf_core.h.)
  • uint32_t hi β€” First 4 flexible bytes or FD ID, dependent on RTE_MBUF_F_RX_FDIR_* flag in ol_flags. (Definition at line 587 of file rte_mbuf_core.h.)
  • struct { ... } fdir β€” Filter identifier if FDIR enabled.
  • struct rte_mbuf_sched sched β€” Hierarchical scheduler : 8 bytes. (Definition at line 592 of file rte_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. See rte_distributor_process(). (Definition at line 603 of file rte_mbuf_core.h.)
  • union { ... } hash β€” hash information.
  • uint16_t vlan_tci_outer β€” Outer VLAN TCI (CPU order), valid if RTE_MBUF_F_RX_QINQ is set. (Definition at line 609 of file rte_mbuf_core.h.)
  • uint16_t buf_len β€” Length of segment buffer. (Definition at line 611 of file rte_mbuf_core.h.)
  • struct rte_mempool* pool β€” Pool from which mbuf was allocated. (Definition at line 615 of file rte_mbuf_core.h.)
  • uint64_t dynfield2 β€” Reserved for dynamic fields when the next pointer is in first cache line (i.e. RTE_IOVA_IN_MBUF is 0). (Definition at line 635 of file rte_mbuf_core.h.)
  • uint64_t tx_offload β€” combined for easy fetch. (Definition at line 640 of file rte_mbuf_core.h.)
  • uint64_t l2_len β€” L2 (MAC) Header Length for non-tunneling pkt. Outer_L4_len + ... + Inner_L2_len for tunneling pkt. (Definition at line 643 of file rte_mbuf_core.h.)
  • uint64_t l3_len β€” L3 (IP) Header Length. (Definition at line 647 of file rte_mbuf_core.h.)
  • uint64_t l4_len β€” L4 (TCP/UDP) Header Length. (Definition at line 649 of file rte_mbuf_core.h.)
  • uint64_t tso_segsz β€” TCP TSO segment size. (Definition at line 651 of file rte_mbuf_core.h.)
  • uint64_t outer_l3_len β€” Outer L3 (IP) Hdr Length. (Definition at line 666 of file rte_mbuf_core.h.)
  • uint64_t outer_l2_len β€” Outer L2 (MAC) Hdr Length. (Definition at line 668 of file rte_mbuf_core.h.)
  • struct rte_mbuf_ext_shared_info* shinfo β€” Shared data for external buffer attached to mbuf. See rte_pktmbuf_attach_extbuf(). (Definition at line 678 of file rte_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 file rte_mbuf_core.h.)
  • uint16_t timesync β€” Timesync flags for use with IEEE1588. (Definition at line 686 of file rte_mbuf_core.h.)
  • uint32_t dynfield1[9] β€” Reserved for dynamic fields. (Definition at line 688 of file rte_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