rte_eth_rxseg_split(3)
π rte_eth_rxseg_split π
okay bestie, welcome to rte_eth_rxseg_split(3) β it lives in the Library Functions Manual, and it's genuinely iconic once you get it. let's go π«Ά
β¨ SYNOPSIS β¨
#include <rte_ethdev.h>
π DATA FIELDS
struct rte_mempool * mpuint16_t lengthuint16_t offsetuint32_t proto_hdr
π DETAILED DESCRIPTION π
β οΈ Warning β EXPERIMENTAL: this structure may change without prior notice. no cap, the API is lowkey still in its glow-up era, so don't get too attached to the exact shape of it π
A structure used to configure an Rx packet segment to split. that's literally its whole job, and it eats every time π
If RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT flag is set in offloads field, the PMD will split the received packets into multiple segments according to the specification in the description array:
- The first network buffer will be allocated from the memory pool, specified in the first array element, the second buffer, from the pool in the second element, and so on. it's giving β¨order mattersβ¨
- The
proto_hdrsin the elements define the split position of received packets. - The offsets from the segment description elements specify the data offset from the buffer beginning except the first mbuf. The first segment offset is added with
RTE_PKTMBUF_HEADROOM. the first one always gets special treatment, main character energy fr - The lengths in the elements define the maximal data amount being received to each segment. The receiving starts with filling up the first mbuf data buffer up to specified length. If the there are data remaining (packet is longer than buffer in the first mbuf) the following data will be pushed to the next segment up to its own length, and so on. π
- If the length in the segment description element is zero the actual buffer size will be deduced from the appropriate memory pool properties. zero = "you pick, bestie" πΈ
- If there is not enough elements to describe the buffer for entire packet of maximal length the following parameters will be used for the all remaining segments:
- pool from the last valid element
- the buffer size from this pool
- zero offset
- Length based buffer split:
mp,length,offsetshould be configured.- The
proto_hdrfield must be0. not optional, bestie, it's a must π
- Protocol header based buffer split:
mp,offset,proto_hdrshould be configured.- The
lengthfield must be0. - The
proto_hdrfield in the last segment should be0.
- When protocol header split is enabled, NIC may receive packets which do not match all the protocol headers within the Rx segments. At this point, NIC will have two possible split behaviors according to matching results, one is exact match, another is longest match. The split result of NIC must belong to one of them. The exact match means NIC only do split when the packets exactly match all the protocol headers in the segments. Otherwise, the whole packet will be put into the last valid mempool. The longest match means NIC will do split until packets mismatch the protocol header in the segments. The rest will be put into the last valid pool.
Definition at line 1123 of file rte_ethdev.h.
π¦ FIELD DOCUMENTATION π¦
π§ struct rte_mempool* mp
Memory pool to allocate segment from.
Definition at line 1124 of file rte_ethdev.h.
π uint16_t length
Segment data length, configures split point.
Definition at line 1125 of file rte_ethdev.h.
β uint16_t offset
Data offset from beginning of mbuf data buffer.
Definition at line 1126 of file rte_ethdev.h.
π uint32_t proto_hdr
proto_hdr defines a bit mask of the protocol sequence as RTE_PTYPE_*. The last RTE_PTYPE* in the mask indicates the split position. iykyk π
If one protocol header is defined to split packets into two segments, for non-tunneling packets, the complete protocol sequence should be defined. For tunneling packets, for simplicity, only the tunnel and inner part of complete protocol sequence is required. If several protocol headers are defined to split packets into multi-segments, the repeated parts of adjacent segments should be omitted. don't repeat yourself, bestie π
Definition at line 1138 of file rte_ethdev.h.
π AUTHOR π
Generated automatically by Doxygen for DPDK from the source code. (so no, a human did not hand-write this beauty, it's all machine-made and it still ate π₯)
okay that's the whole page!! this is DPDK Version 25.11.3, rte_eth_rxseg_split(3), and yeah β the manpage pretty much wrote itself π periodt, go configure some buffers bestie π¦π
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms