rte_eth_bond.h(3)
๐ rte_eth_bond.h(3) ๐
Okay bestie, welcome to rte_eth_bond.h(3), straight out of the Library Functions Manual โ the page is literally named rte_eth_bond.h, and it's giving link-bonding main-character energy. Buckle up. ๐ซถ
โจ NAME โจ
rte_eth_bond.h
๐ธ SYNOPSIS ๐ธ
#include <rte_ether.h>
๐ Macros ๐
#define BONDING_MODE_ROUND_ROBIN (0)
#define BONDING_MODE_ACTIVE_BACKUP (1)
#define BONDING_MODE_BALANCE (2)
#define BONDING_MODE_BROADCAST (3)
#define BONDING_MODE_8023AD (4)
#define BONDING_MODE_TLB (5)
#define BONDING_MODE_ALB (6)
#define BALANCE_XMIT_POLICY_LAYER2 (0)
#define BALANCE_XMIT_POLICY_LAYER23 (1)
#define BALANCE_XMIT_POLICY_LAYER34 (2)
๐ฆ Functions ๐ฆ
int rte_eth_bond_create (const char *name, uint8_t mode, uint8_t socket_id)
int rte_eth_bond_free (const char *name)
int rte_eth_bond_member_add (uint16_t bonding_port_id, uint16_t member_port_id)
int rte_eth_bond_member_remove (uint16_t bonding_port_id, uint16_t member_port_id)
int rte_eth_bond_mode_set (uint16_t bonding_port_id, uint8_t mode)
int rte_eth_bond_mode_get (uint16_t bonding_port_id)
int rte_eth_bond_primary_set (uint16_t bonding_port_id, uint16_t member_port_id)
int rte_eth_bond_primary_get (uint16_t bonding_port_id)
int rte_eth_bond_members_get (uint16_t bonding_port_id, uint16_t members[], uint16_t len)
int rte_eth_bond_active_members_get (uint16_t bonding_port_id, uint16_t members[], uint16_t len)
int rte_eth_bond_mac_address_set (uint16_t bonding_port_id, struct rte_ether_addr *mac_addr)
int rte_eth_bond_mac_address_reset (uint16_t bonding_port_id)
int rte_eth_bond_xmit_policy_set (uint16_t bonding_port_id, uint8_t policy)
int rte_eth_bond_xmit_policy_get (uint16_t bonding_port_id)
int rte_eth_bond_link_monitoring_set (uint16_t bonding_port_id, uint32_t internal_ms)
int rte_eth_bond_link_monitoring_get (uint16_t bonding_port_id)
int rte_eth_bond_link_down_prop_delay_set (uint16_t bonding_port_id, uint32_t delay_ms)
int rte_eth_bond_link_down_prop_delay_get (uint16_t bonding_port_id)
int rte_eth_bond_link_up_prop_delay_set (uint16_t bonding_port_id, uint32_t delay_ms)
int rte_eth_bond_link_up_prop_delay_get (uint16_t bonding_port_id)
๐ Detailed Description ๐
RTE Link Bonding Ethernet Device โ link bonding for 1GbE and 10GbE ports, so you can aggregate multiple (member) NICs into a single logical interface. The bonding device processes these interfaces based on the mode of operation specified and supported. This implementation supports 4 modes of operation: round robin, active backup, balance and broadcast. It's all about providing redundant links, fault tolerance and/or load balancing of network ports. ๐
Definition in file rte_eth_bond.h.
๐ Macro Definition Documentation ๐
๐ #define BONDING_MODE_ROUND_ROBIN (0)
Round Robin (Mode 0). In this mode all transmitted packets will be balanced equally across all active members of the bonding in a round robin fashion. It's literally taking turns, bestie. โจ
Definition at line 28 of file rte_eth_bond.h.
๐ #define BONDING_MODE_ACTIVE_BACKUP (1)
Active Backup (Mode 1). In this mode all packets transmitted will be transmitted on the primary member until such point as the primary member is no longer available and then transmitted packets will be sent on the next available members. The primary member can be defined by the user but defaults to the first active member available if not specified. Backup-plan energy fr fr. ๐ซถ
Definition at line 33 of file rte_eth_bond.h.
๐ #define BONDING_MODE_BALANCE (2)
Balance (Mode 2). In this mode all packets transmitted will be balanced across the available members using one of three available transmit policies โ l2, l2+3 or l3+4. See BALANCE_XMIT_POLICY macros definitions for further details on transmit policies. ๐ธ
Definition at line 41 of file rte_eth_bond.h.
๐ #define BONDING_MODE_BROADCAST (3)
Broadcast (Mode 3). In this mode all transmitted packets will be transmitted on all available active members of the bonding. It's giving shout-it-from-the-rooftops. ๐ฃ
Definition at line 48 of file rte_eth_bond.h.
๐ #define BONDING_MODE_8023AD (4)
802.3AD (Mode 4).
This mode provides auto negotiation/configuration of peers and well as link status changes monitoring using out of band LACP (link aggregation control protocol) messages. For further details of LACP specification see the IEEE 802.3ad/802.1AX standards. It is also described here https://www.kernel.org/doc/Documentation/networking/bonding.txt.
โ ๏ธ Important Usage Notes:
- for LACP mode to work the
rx/txburst functions must be invoked at least once every100ms, otherwise the out-of-band LACP messages will not be handled with the expected latency and this may cause the link status to be incorrectly marked as down or failure to correctly negotiate with peers. - For optimal performance during initial handshaking the array of mbufs provided to
rx_burstshould be at least2times the member count size.
Definition at line 53 of file rte_eth_bond.h.
๐ #define BONDING_MODE_TLB (5)
Adaptive TLB (Mode 5) This mode provides an adaptive transmit load balancing. It dynamically changes the transmitting member, according to the computed load. Statistics are collected in 100ms intervals and scheduled every 10ms. ๐
Definition at line 71 of file rte_eth_bond.h.
๐ #define BONDING_MODE_ALB (6)
Adaptive Load Balancing (Mode 6) This mode includes adaptive TLB and receive load balancing (RLB). In RLB the bonding driver intercepts ARP replies send by local system and overwrites its source MAC address, so that different peers send data to the server on different member interfaces. When local system sends ARP request, it saves IP information from it. When ARP reply from that peer is received, its MAC is stored, one of member MACs assigned and ARP reply send to that peer. ๐ฆ
Definition at line 77 of file rte_eth_bond.h.
๐ #define BALANCE_XMIT_POLICY_LAYER2 (0)
Layer 2 (Ethernet MAC) โ iconic, honestly. ๐
Definition at line 88 of file rte_eth_bond.h.
๐ #define BALANCE_XMIT_POLICY_LAYER23 (1)
Layer 2+3 (Ethernet MAC + IP Addresses) transmit load balancing. ๐
Definition at line 90 of file rte_eth_bond.h.
๐ #define BALANCE_XMIT_POLICY_LAYER34 (2)
Layer 3+4 (IP Addresses + UDP Ports) transmit load balancing. โจ
Definition at line 92 of file rte_eth_bond.h.
โจ FUNCTION DOCUMENTATION โจ
Okay bestie, this is the part where we actually call stuff. Every function in rte_eth_bond.h is here, in order, with its exact signature so you can't mess it up. Let's get into it ๐
๐ธ rte_eth_bond_create
int rte_eth_bond_create (const char * name, uint8_t mode, uint8_t socket_id)
Create a bonding rte_eth_dev device. Like, birth it. Give it a name, give it a mode, tell it where to live. Main character origin story energy ๐ฆ
Parameters:
nameโ Name of new link bonding device.modeโ Mode to initialize bonding device in.socket_idโ Socket Id on which to allocateeth_devresources.
Returns: Port Id of created rte_eth_dev on success, negative value otherwise.
๐ธ rte_eth_bond_free
int rte_eth_bond_free (const char * name)
Free a bonding rte_eth_dev device. It's the goodbye scene ๐ญ (but like, a clean one).
Parameters:
nameโ Name of the link bonding device.
Returns: 0 on success, negative value otherwise.
๐ธ rte_eth_bond_member_add
int rte_eth_bond_member_add (uint16_t bonding_port_id, uint16_t member_port_id)
Add a rte_eth_dev device as a member to the bonding device. It's giving recruitment era โ welcome to the group chat ๐ซถ
Parameters:
bonding_port_idโ Port ID of bonding device.member_port_idโ Port ID of member device.
Returns: 0 on success, negative value otherwise.
๐ธ rte_eth_bond_member_remove
int rte_eth_bond_member_remove (uint16_t bonding_port_id, uint16_t member_port_id)
Remove a member rte_eth_dev device from the bonding device. Sorry babe, you're out of the group chat ๐
Parameters:
bonding_port_idโ Port ID of bonding device.member_port_idโ Port ID of member device.
Returns: 0 on success, negative value otherwise.
๐ธ rte_eth_bond_mode_set
int rte_eth_bond_mode_set (uint16_t bonding_port_id, uint8_t mode)
Set link bonding mode of bonding device. Glow-up button โจ
Parameters:
bonding_port_idโ Port ID of bonding device.modeโ Bonding mode to set.
Returns: 0 on success, negative value otherwise.
๐ธ rte_eth_bond_mode_get
int rte_eth_bond_mode_get (uint16_t bonding_port_id)
Get link bonding mode of bonding device. Just vibing and reporting back ๐
Parameters:
bonding_port_idโ Port ID of bonding device.
Returns: link bonding mode on success, negative value otherwise.
๐ธ rte_eth_bond_primary_set
int rte_eth_bond_primary_set (uint16_t bonding_port_id, uint16_t member_port_id)
Set member rte_eth_dev as primary member of bonding device. Crown them ๐ main character promotion fr.
Parameters:
bonding_port_idโ Port ID of bonding device.member_port_idโ Port ID of member device.
Returns: 0 on success, negative value otherwise.
๐ธ rte_eth_bond_primary_get
int rte_eth_bond_primary_get (uint16_t bonding_port_id)
Get primary member of bonding device. Who's the lead rn? ๐
Parameters:
bonding_port_idโ Port ID of bonding device.
Returns: Port Id of primary member on success, -1 on failure. (Note: -1 specifically here โ not just "negative value" โ that's the contract, don't @ me.)
๐ธ rte_eth_bond_members_get
int rte_eth_bond_members_get (uint16_t bonding_port_id, uint16_t members[], uint16_t len)
Populate an array with list of the members port id's of the bonding device. Roll call! ๐ค
Parameters:
bonding_port_idโ Port ID of bondingeth_devto interrogate.membersโ Array to be populated with the current active members.lenโ Length ofmembersarray.
Returns: Number of members associated with bonding device on success, negative value otherwise.
๐ธ rte_eth_bond_active_members_get
int rte_eth_bond_active_members_get (uint16_t bonding_port_id, uint16_t members[], uint16_t len)
Populate an array with list of the active members port id's of the bonding device. Same roll call, but only the ones who actually showed up ๐ซก
Parameters:
bonding_port_idโ Port ID of bondingeth_devto interrogate.membersโ Array to be populated with the current active members.lenโ Length ofmembersarray.
Returns: Number of active members associated with bonding device on success, negative value otherwise.
๐ธ rte_eth_bond_mac_address_set
int rte_eth_bond_mac_address_set (uint16_t bonding_port_id, struct rte_ether_addr * mac_addr)
Set explicit MAC address to use on bonding device and it's members. Matching outfits for the whole squad ๐
Parameters:
bonding_port_idโ Port ID of bonding device.mac_addrโ MAC Address to use on bonding device overriding members MAC addresses.
Returns: 0 on success, negative value otherwise.
๐ธ rte_eth_bond_mac_address_reset
int rte_eth_bond_mac_address_reset (uint16_t bonding_port_id)
Reset bonding device to use MAC from primary member on bonding device and it's members. Back to the primary's fit, the custom one is so over ๐
Parameters:
bonding_port_idโ Port ID of bonding device.
Returns: 0 on success, negative value otherwise.
๐ธ rte_eth_bond_xmit_policy_set
int rte_eth_bond_xmit_policy_set (uint16_t bonding_port_id, uint8_t policy)
Set the transmit policy for bonding device to use when it is operating in balance mode โ this parameter is otherwise ignored in other modes of operation. Like, only balance mode cares. Everyone else, mind your business ๐
Parameters:
bonding_port_idโ Port ID of bonding device.policyโ Balance mode transmission policy.
Returns: 0 on success, negative value otherwise.
๐ธ rte_eth_bond_xmit_policy_get
int rte_eth_bond_xmit_policy_get (uint16_t bonding_port_id)
Get the transmit policy set on bonding device for balance mode operation. Reading back the receipts ๐งพ
Parameters:
bonding_port_idโ Port ID of bonding device.
Returns: Balance transmit policy on success, negative value otherwise.
๐ธ rte_eth_bond_link_monitoring_set
int rte_eth_bond_link_monitoring_set (uint16_t bonding_port_id, uint32_t internal_ms)
Set the link monitoring frequency (in ms) for monitoring the link status of member devices. How often we check in on everyone ๐ต๏ธโโ๏ธ
Parameters:
bonding_port_idโ Port ID of bonding device.internal_msโ Monitoring interval in milliseconds.
Returns: 0 on success, negative value otherwise.
๐ธ rte_eth_bond_link_monitoring_get
int rte_eth_bond_link_monitoring_get (uint16_t bonding_port_id)
Get the current link monitoring frequency (in ms) for monitoring of the link status of member devices. How often are we checking in, bestie? ๐
Parameters:
bonding_port_idโ Port ID of bonding device.
Returns: Monitoring interval on success, negative value otherwise.
๐ธ rte_eth_bond_link_down_prop_delay_set
int rte_eth_bond_link_down_prop_delay_set (uint16_t bonding_port_id, uint32_t delay_ms)
Set the period in milliseconds for delaying the disabling of a bonding link when the link down status has been detected. So when a link goes down, we don't immediately panic โ we wait delay_ms ๐ฎโ๐จ
Parameters:
bonding_port_idโ Port ID of bonding device.delay_msโ Delay period in milliseconds.
Returns: 0 on success, negative value otherwise.
๐ธ rte_eth_bond_link_down_prop_delay_get
int rte_eth_bond_link_down_prop_delay_get (uint16_t bonding_port_id)
Get the period in milliseconds set for delaying the disabling of a bonding link when the link down status has been detected. So, how long's the grace period? โณ
Parameters:
bonding_port_idโ Port ID of bonding device.
Returns: Delay period on success, negative value otherwise.
๐ธ rte_eth_bond_link_up_prop_delay_set
int rte_eth_bond_link_up_prop_delay_set (uint16_t bonding_port_id, uint32_t delay_ms)
Set the period in milliseconds for delaying the enabling of a bonding link when the link up status has been detected. Same energy as the down one, but make it optimistic ๐
Parameters:
bonding_port_idโ Port ID of bonding device.delay_msโ Delay period in milliseconds.
Returns: 0 on success, negative value otherwise.
๐ธ rte_eth_bond_link_up_prop_delay_get
int rte_eth_bond_link_up_prop_delay_get (uint16_t bonding_port_id)
Get the period in milliseconds set for delaying the enabling of a bonding link when the link up status has been detected. Reading the up-side grace period back โจ
Parameters:
bonding_port_idโ Port ID of bonding device.
Returns: Delay period on success, negative value otherwise.
๐ AUTHOR
Generated automatically by Doxygen for DPDK from the source code. Yeah, the robots wrote this one โ respect the pipeline ๐ค๐
And that's a wrap on rte_eth_bond.h(3)! ๐ This page is DPDK, Version 26.03.0, paged as rte_eth_bond.h(3) โ go forth and bond those ports responsibly, bestie ๐ซถ๐ฅ
๐ฆ 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