summaryrefslogtreecommitdiffstats
path: root/src/vnet/bonding
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2020-05-14 15:02:16 -0400
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-18 19:47:21 +0000
commit3736bbbbf4e35ec4700410f13ab09fdeb9c78e70 (patch)
tree633619e82e1aba1b20c1ec3e5cb863f1c1ab4921 /src/vnet/bonding
parent3c0ea3ddea1fc39d385c7c895e298c207f2edeac (diff)
l2: L2/L3 mode swicth cleanup and l2-patch fix
Cleanup L2/L3 mode switch to not redirect to/from ethernet-input node as it is no longer necessary. L2 patch should use sw_if_index for device feature enable/disable. Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: I0f24161d027b07c188fd1e05276146f94c075710 (cherry picked from commit f415a3b53a51b261d08cc3312c25f250d6bc1bd6)
Diffstat (limited to 'src/vnet/bonding')
-rw-r--r--src/vnet/bonding/cli.c11
-rw-r--r--src/vnet/bonding/device.c8
2 files changed, 7 insertions, 12 deletions
diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c
index 631a97b3a82..c49b6efc176 100644
--- a/src/vnet/bonding/cli.c
+++ b/src/vnet/bonding/cli.c
@@ -675,12 +675,11 @@ bond_enslave (vlib_main_t * vm, bond_enslave_args_t * args)
}
if (bif_hw->l2_if_count)
- {
- ethernet_set_flags (vnm, sif_hw->hw_if_index,
- ETHERNET_INTERFACE_FLAG_ACCEPT_ALL);
- /* ensure all packets go to ethernet-input */
- ethernet_set_rx_redirect (vnm, sif_hw, 1);
- }
+ ethernet_set_flags (vnm, sif_hw->hw_if_index,
+ ETHERNET_INTERFACE_FLAG_ACCEPT_ALL);
+ else
+ ethernet_set_flags (vnm, sif_hw->hw_if_index,
+ /*ETHERNET_INTERFACE_FLAG_DEFAULT_L3 */ 0);
if (bif->mode == BOND_MODE_LACP)
{
diff --git a/src/vnet/bonding/device.c b/src/vnet/bonding/device.c
index 21bbcb51f1d..ad52f621511 100644
--- a/src/vnet/bonding/device.c
+++ b/src/vnet/bonding/device.c
@@ -99,9 +99,6 @@ bond_set_l2_mode_function (vnet_main_t * vnm,
sif_hw = vnet_get_sup_hw_interface (vnm, *sw_if_index);
ethernet_set_flags (vnm, sif_hw->hw_if_index,
ETHERNET_INTERFACE_FLAG_ACCEPT_ALL);
-
- /* ensure all packets go to ethernet-input */
- ethernet_set_rx_redirect (vnm, sif_hw, 1);
}
}
else if ((bif_hw->l2_if_count == 0) && (l2_if_adjust == -1))
@@ -110,9 +107,8 @@ bond_set_l2_mode_function (vnet_main_t * vnm,
vec_foreach (sw_if_index, bif->slaves)
{
sif_hw = vnet_get_sup_hw_interface (vnm, *sw_if_index);
-
- /* Allow ip packets to go directly to ip4-input etc */
- ethernet_set_rx_redirect (vnm, sif_hw, 0);
+ ethernet_set_flags (vnm, sif_hw->hw_if_index,
+ /*ETHERNET_INTERFACE_FLAG_DEFAULT_L3 */ 0);
}
}