DPDK
1.7.1
|
#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 | 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_slave_add (uint8_t bonded_port_id, uint8_t slave_port_id) |
int | rte_eth_bond_slave_remove (uint8_t bonded_port_id, uint8_t slave_port_id) |
int | rte_eth_bond_mode_set (uint8_t bonded_port_id, uint8_t mode) |
int | rte_eth_bond_mode_get (uint8_t bonded_port_id) |
int | rte_eth_bond_primary_set (uint8_t bonded_port_id, uint8_t slave_port_id) |
int | rte_eth_bond_primary_get (uint8_t bonded_port_id) |
int | rte_eth_bond_slaves_get (uint8_t bonded_port_id, uint8_t slaves[], uint8_t len) |
int | rte_eth_bond_active_slaves_get (uint8_t bonded_port_id, uint8_t slaves[], uint8_t len) |
int | rte_eth_bond_mac_address_set (uint8_t bonded_port_id, struct ether_addr *mac_addr) |
int | rte_eth_bond_mac_address_reset (uint8_t bonded_port_id) |
int | rte_eth_bond_xmit_policy_set (uint8_t bonded_port_id, uint8_t policy) |
int | rte_eth_bond_xmit_policy_get (uint8_t bonded_port_id) |
RTE Link Bonding Ethernet Device Link Bonding for 1GbE and 10GbE ports to allow the aggregation of multiple (slave) NICs into a single logical interface. The bonded 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
#define BALANCE_XMIT_POLICY_LAYER2 (0) |
Layer 2 (Ethernet MAC)
#define BALANCE_XMIT_POLICY_LAYER23 (1) |
Layer 2+3 (Ethernet MAC + IP Addresses) transmit load balancing
#define BALANCE_XMIT_POLICY_LAYER34 (2) |
Layer 3+4 (IP Addresses + UDP Ports) transmit load balancing
#define BONDING_MODE_ACTIVE_BACKUP (1) |
Active Backup (Mode 1). In this mode all packets transmitted will be transmitted on the primary slave until such point as the primary slave is no longer available and then transmitted packets will be sent on the next available slaves. The primary slave can be defined by the user but defaults to the first active slave available if not specified.
#define BONDING_MODE_BALANCE (2) |
Balance (Mode 2). In this mode all packets transmitted will be balanced across the available slaves 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.
#define BONDING_MODE_BROADCAST (3) |
Broadcast (Mode 3). In this mode all transmitted packets will be transmitted on all available active slaves of the bonded.
#define BONDING_MODE_ROUND_ROBIN (0) |
Round Robin (Mode 0). In this mode all transmitted packets will be balanced equally across all active slaves of the bonded in a round robin fashion.
int rte_eth_bond_active_slaves_get | ( | uint8_t | bonded_port_id, |
uint8_t | slaves[], | ||
uint8_t | len | ||
) |
Populate an array with list of the active slaves port id's of the bonded device.
bonded_port_id | Port ID of bonded eth_dev to interrogate |
slaves | Array to be populated with the current active slaves |
len | Length of slaves array |
int rte_eth_bond_create | ( | const char * | name, |
uint8_t | mode, | ||
uint8_t | socket_id | ||
) |
Create a bonded 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_mac_address_reset | ( | uint8_t | bonded_port_id | ) |
Reset bonded device to use MAC from primary slave on bonded device and it's slaves.
bonded_port_id | Port ID of bonded device. |
int rte_eth_bond_mac_address_set | ( | uint8_t | bonded_port_id, |
struct ether_addr * | mac_addr | ||
) |
Set explicit MAC address to use on bonded device and it's slaves.
bonded_port_id | Port ID of bonded device. |
mac_addr | MAC Address to use on bonded device overriding slaves MAC addresses |
int rte_eth_bond_mode_get | ( | uint8_t | bonded_port_id | ) |
Get link bonding mode of bonded device
bonded_port_id | Port ID of bonded device. |
int rte_eth_bond_mode_set | ( | uint8_t | bonded_port_id, |
uint8_t | mode | ||
) |
Set link bonding mode of bonded device
bonded_port_id | Port ID of bonded device. |
mode | Bonding mode to set |
int rte_eth_bond_primary_get | ( | uint8_t | bonded_port_id | ) |
Get primary slave of bonded device
bonded_port_id | Port ID of bonded device. |
int rte_eth_bond_primary_set | ( | uint8_t | bonded_port_id, |
uint8_t | slave_port_id | ||
) |
Set slave rte_eth_dev as primary slave of bonded device
bonded_port_id | Port ID of bonded device. |
slave_port_id | Port ID of slave device. |
int rte_eth_bond_slave_add | ( | uint8_t | bonded_port_id, |
uint8_t | slave_port_id | ||
) |
Add a rte_eth_dev device as a slave to the bonded device
bonded_port_id | Port ID of bonded device. |
slave_port_id | Port ID of slave device. |
int rte_eth_bond_slave_remove | ( | uint8_t | bonded_port_id, |
uint8_t | slave_port_id | ||
) |
Remove a slave rte_eth_dev device from the bonded device
bonded_port_id | Port ID of bonded device. |
slave_port_id | Port ID of slave device. |
int rte_eth_bond_slaves_get | ( | uint8_t | bonded_port_id, |
uint8_t | slaves[], | ||
uint8_t | len | ||
) |
Populate an array with list of the slaves port id's of the bonded device
bonded_port_id | Port ID of bonded eth_dev to interrogate |
slaves | Array to be populated with the current active slaves |
len | Length of slaves array |
int rte_eth_bond_xmit_policy_get | ( | uint8_t | bonded_port_id | ) |
Get the transmit policy set on bonded device for balance mode operation
bonded_port_id | Port ID of bonded device. |
int rte_eth_bond_xmit_policy_set | ( | uint8_t | bonded_port_id, |
uint8_t | policy | ||
) |
Set the transmit policy for bonded device to use when it is operating in balance mode, this parameter is otherwise ignored in other modes of operation.
bonded_port_id | Port ID of bonded device. |
policy | Balance mode transmission policy. |