rte_eth_hairpin_conf(3)
π rte_eth_hairpin_conf β bestie edition π
Okay so real talk: this one is a struct, not a function, and it lives in the DPDK manual (rte_eth_hairpin_conf(3) β that's the whole title, we're not doing the header line copy-paste thing, we're keeping it cute). It's the little config blob you fill in when you want to set up hairpin binding on an Ethernet device. Slay. Let's get into it π
β¨ SYNOPSIS β¨
#include <rte_ethdev.h>
πΈ Data Fields
uint32_t peer_count:16uint32_t tx_explicit:1uint32_t manual_bind:1uint32_t use_locked_device_memory:1uint32_t use_rte_memory:1uint32_t force_memory:1uint32_t reserved:11
Look at all those bitfields, periodt. π
π¦ DETAILED DESCRIPTION π¦
β οΈ Warning EXPERIMENTAL: this API may change, or be removed, without prior notice. Like, it's giving "we might ghost you," ngl. Use it with your eyes open π
So what even is this? It's a structure used to configure hairpin binding β that's the whole vibe.
You can find it chilling at Definition at line 1291 of file rte_ethdev.h. Yep, we cite our sources here, no cap π
π FIELD DOCUMENTATION π
π uint32_t peer_count
The number of peers. That's it, that's the field. How many friends are we hair-pinning to π«
π Definition at line 1292 of file rte_ethdev.h.
π uint32_t tx_explicit
Explicit Tx flow rule mode. Heads up: one hairpin pair of queues should have the same attribute. Consistency is key, bestie π
- When set β you are the main character and you're responsible for inserting the hairpin Tx part flows and removing them. Your flows, your problem π
- When clear β the PMD will try to handle the Tx part of the flows for you, e.g., by splitting one flow into two parts. Iconic teamwork, honestly π«Ά
π Definition at line 1303 of file rte_ethdev.h.
π§ uint32_t manual_bind
Manually bind hairpin queues. Again: one hairpin pair of queues should have the same attribute. Don't mix and match, it's not a cute look π ββοΈ
- When set β to enable hairpin, you should call the hairpin bind function after all the queues are set up properly and the ports are started. Also, the hairpin unbind function should be called accordingly before stopping a port that with hairpin configured. Yeah, it's a two-way street, you gotta clean up after yourself π§Ή
- When cleared β the PMD will try to enable the hairpin with the queues configured automatically during port start. Set it and forget it energy β¨
π Definition at line 1316 of file rte_ethdev.h.
β uint32_t use_locked_device_memory
Use locked device memory as a backing storage. Fancy π
- When set β PMD will attempt place descriptors and/or data buffers in dedicated device memory.
- When cleared β PMD will use default memory type as a backing storage. Please refer to PMD documentation for details (iykyk, check the PMD docs π).
API user should check if PMD supports this configuration flag using
See also: rte_eth_dev_hairpin_capability_get.
π Definition at line 1329 of file rte_ethdev.h.
πΈ uint32_t use_rte_memory
Use DPDK memory as backing storage. The home-team option π
- When set β PMD will attempt place descriptors and/or data buffers in host memory managed by DPDK.
- When cleared β PMD will use default memory type as a backing storage. Please refer to PMD documentation for details.
API user should check if PMD supports this configuration flag using
See also: rte_eth_dev_hairpin_capability_get.
π Definition at line 1342 of file rte_ethdev.h.
π₯ uint32_t force_memory
Force usage of hairpin memory configuration. It's giving "I said what I said" π€
- When set β PMD will attempt to use specified memory settings. If resource allocation fails, then hairpin queue allocation will result in an error. No plan B. It's giving all-or-nothing π
- When clear β PMD will attempt to use specified memory settings. If resource allocation fails, then PMD will retry allocation with default configuration. Fallback era, we love a resilient queen π
π Definition at line 1354 of file rte_ethdev.h.
π« uint32_t reserved
Reserved bits. Hands off, that's not for us π
π Definition at line 1356 of file rte_ethdev.h.
π AUTHOR π
Generated automatically by Doxygen for DPDK from the source code. Not a human, just a robot doing its little robot thing π€π
β¨ That's the whole page, bestie β you ate that β¨
π¦ Version 25.11.0 Β· Fri Jan 30 2026 Β· rte_eth_hairpin_conf(3) π¦
Go forth and bind those hairpin queues responsibly πππ
π¦ where this page comes from
- centos-stream 9: dpdk-devel 2:25.11-1.el9 Β· BSD and LGPLv2 and GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms