active-backup mode is using l2 load balance algo. It should be using
active-backup. Also notice that the output is missing a character.
vpp# create bond mode active-backup
create bond mode active-backup
vpp# sh bond
sh bond
interface name sw_if_index mode load balance active slaves slaves
BondEthernet0 6 xor l34 2 2
BondEthernet1 9 xor l34 1 1
BondEthernet2 10 active-backu l2 0 0
vpp#
Change-Id: If5ed0cc6c25f6c2ddabec15ff6188b34923d38e3
Signed-off-by: Steven <sluong@cisco.com>
bif->lb = BOND_LB_RR;
else if (bif->mode == BOND_MODE_BROADCAST)
bif->lb = BOND_LB_BC;
bif->lb = BOND_LB_RR;
else if (bif->mode == BOND_MODE_BROADCAST)
bif->lb = BOND_LB_BC;
+ else if (bif->mode == BOND_MODE_ACTIVE_BACKUP)
+ bif->lb = BOND_LB_AB;
bif->use_custom_mac = args->hw_addr_set;
if (!args->hw_addr_set)
bif->use_custom_mac = args->hw_addr_set;
if (!args->hw_addr_set)
bond_main_t *bm = &bond_main;
bond_if_t *bif;
bond_main_t *bm = &bond_main;
bond_if_t *bif;
- vlib_cli_output (vm, "%-16s %-12s %-12s %-13s %-14s %s",
+ vlib_cli_output (vm, "%-16s %-12s %-13s %-13s %-14s %s",
"interface name", "sw_if_index", "mode",
"load balance", "active slaves", "slaves");
/* *INDENT-OFF* */
pool_foreach (bif, bm->interfaces,
({
"interface name", "sw_if_index", "mode",
"load balance", "active slaves", "slaves");
/* *INDENT-OFF* */
pool_foreach (bif, bm->interfaces,
({
- vlib_cli_output (vm, "%-16U %-12d %-12U %-13U %-14u %u",
+ vlib_cli_output (vm, "%-16U %-12d %-13U %-13U %-14u %u",
format_bond_interface_name, bif->dev_instance,
bif->sw_if_index, format_bond_mode, bif->mode,
format_bond_load_balance, bif->lb,
format_bond_interface_name, bif->dev_instance,
bif->sw_if_index, format_bond_mode, bif->mode,
format_bond_load_balance, bif->lb,