aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_input.c
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2018-04-12 19:36:19 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2018-04-13 08:49:08 +0000
commit4f8863b21405d1ab3e067e978a60be72a343358b (patch)
tree85ff0693b4093c6774f4448f020f130ea472df8c /src/vnet/l2/l2_input.c
parent95c87b5ae5db74385f56ba5dd08718c65a1edf69 (diff)
bond: ping fails between l2 BD [VPP-1238]
In dpdk based bonding, when the bond interface is configured for l2, it automatically sets the bond interface to promiscuous mode and sets rx redirect to ethernet-input. This allows traffic to be bridged to non compute node facing interface when it is received from the compute node interface. For native vpp bonding, we need to do similar things. When the bond interface is configured for l2, we set the slave interfaces to promiscuous mode and set rx redirect to ethernet-input because dpdk does not know anything about the bond interface. Likewise, when a new interface is enslaved, we also need to do the same thing if the bond interface has already been configured for l2. Change-Id: I7e168008e8a4221be74929b2a20e6db0ce8f3110 Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_input.c')
-rw-r--r--src/vnet/l2/l2_input.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/l2/l2_input.c b/src/vnet/l2/l2_input.c
index c2df5acb3b2..d8a0a6bd798 100644
--- a/src/vnet/l2/l2_input.c
+++ b/src/vnet/l2/l2_input.c
@@ -564,6 +564,7 @@ set_int_l2_mode (vlib_main_t * vm, vnet_main_t * vnet_main, /* */
l2_bridge_domain_t *bd_config;
i32 l2_if_adjust = 0;
u32 slot;
+ vnet_device_class_t *dev_class;
hi = vnet_get_sup_hw_interface (vnet_main, sw_if_index);
config = l2input_intf_config (sw_if_index);
@@ -798,6 +799,12 @@ set_int_l2_mode (vlib_main_t * vm, vnet_main_t * vnet_main, /* */
/* Set up the L2/L3 flag in the interface parsing tables */
ethernet_sw_interface_set_l2_mode (vnm, sw_if_index, (mode != MODE_L3));
+ dev_class = vnet_get_device_class (vnet_main, hi->dev_class_index);
+ if (dev_class->set_l2_mode_function)
+ {
+ dev_class->set_l2_mode_function (vnet_main, hi, l2_if_adjust);
+ }
+
return 0;
}