DPDK 25.03.0-rc0
|
#include <rte_ether.h>
Go to the source code of this file.
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) |
RTE Link Bonding Ethernet Device Link Bonding for 1GbE and 10GbE ports to allow the aggregation of 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. Providing redundant links, fault tolerance and/or load balancing of network ports
Definition in file rte_eth_bond.h.
#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.
Definition at line 32 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.
Definition at line 40 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 47 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.
Definition at line 52 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:
Definition at line 70 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 76 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 85 of file rte_eth_bond.h.
#define BALANCE_XMIT_POLICY_LAYER2 (0) |
Layer 2 (Ethernet MAC)
Definition at line 89 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 91 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 93 of file rte_eth_bond.h.
int rte_eth_bond_create | ( | const char * | name, |
uint8_t | mode, | ||
uint8_t | socket_id | ||
) |
Create a bonding rte_eth_dev device
name | Name of new link bonding device. |
mode | Mode to initialize bonding device in. |
socket_id | Socket Id on which to allocate eth_dev resources. |
int rte_eth_bond_free | ( | const char * | name | ) |
Free a bonding rte_eth_dev device
name | Name of the link bonding device. |
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
bonding_port_id | Port ID of bonding device. |
member_port_id | Port ID of member device. |
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
bonding_port_id | Port ID of bonding device. |
member_port_id | Port ID of member device. |
int rte_eth_bond_mode_set | ( | uint16_t | bonding_port_id, |
uint8_t | mode | ||
) |
Set link bonding mode of bonding device
bonding_port_id | Port ID of bonding device. |
mode | Bonding mode to set |
int rte_eth_bond_mode_get | ( | uint16_t | bonding_port_id | ) |
Get link bonding mode of bonding device
bonding_port_id | Port ID of bonding device. |
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
bonding_port_id | Port ID of bonding device. |
member_port_id | Port ID of member device. |
int rte_eth_bond_primary_get | ( | uint16_t | bonding_port_id | ) |
Get primary member of bonding device
bonding_port_id | Port ID of bonding device. |
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
bonding_port_id | Port ID of bonding eth_dev to interrogate |
members | Array to be populated with the current active members |
len | Length of members array |
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.
bonding_port_id | Port ID of bonding eth_dev to interrogate |
members | Array to be populated with the current active members |
len | Length of members array |
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.
bonding_port_id | Port ID of bonding device. |
mac_addr | MAC Address to use on bonding device overriding members MAC addresses |
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.
bonding_port_id | Port ID of bonding device. |
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.
bonding_port_id | Port ID of bonding device. |
policy | Balance mode transmission policy. |
int rte_eth_bond_xmit_policy_get | ( | uint16_t | bonding_port_id | ) |
Get the transmit policy set on bonding device for balance mode operation
bonding_port_id | Port ID of bonding device. |
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
bonding_port_id | Port ID of bonding device. |
internal_ms | Monitoring interval in milliseconds |
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
bonding_port_id | Port ID of bonding device. |
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
bonding_port_id | Port ID of bonding device. |
delay_ms | Delay period in milliseconds. |
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
bonding_port_id | Port ID of bonding device. |
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
bonding_port_id | Port ID of bonding device. |
delay_ms | Delay period in milliseconds. |
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
bonding_port_id | Port ID of bonding device. |