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:16
  • uint32_t tx_explicit:1
  • uint32_t manual_bind:1
  • uint32_t use_locked_device_memory:1
  • uint32_t use_rte_memory:1
  • uint32_t force_memory:1
  • uint32_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