summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2018-10-06 22:30:50 -0700
committerSteven <sluong@cisco.com>2018-10-06 22:33:41 -0700
commit318de5de9765afb75522ad68da5f5a0371480098 (patch)
tree76864c7508cd6e9dea53018ed95e3a44189c4719 /src/vnet
parentb7620fdfd50d6d03a366a78c6bd1e51572bf8f67 (diff)
bond: active-backup mode is using the wrong load balance algo
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>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/bonding/cli.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c
index 522d13aadf7..846fbdb38c9 100644
--- a/src/vnet/bonding/cli.c
+++ b/src/vnet/bonding/cli.c
@@ -274,6 +274,8 @@ bond_create_if (vlib_main_t * vm, bond_create_if_args_t * args)
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)
@@ -666,14 +668,14 @@ show_bond (vlib_main_t * vm)
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,
({
- 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,