X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fl2%2Fl2_input.c;h=fd6f9eb462cdfad945229d75cabae50f5dbe4c2b;hb=b54d081873ac975e06be2569a17e6150779e3018;hp=69de2815536f895dbf9ca4275c5a62a0f51fe118;hpb=25b049484fcf9161edb2c19250066b893c38c264;p=vpp.git diff --git a/src/vnet/l2/l2_input.c b/src/vnet/l2/l2_input.c index 69de2815536..fd6f9eb462c 100644 --- a/src/vnet/l2/l2_input.c +++ b/src/vnet/l2/l2_input.c @@ -564,7 +564,6 @@ set_int_l2_mode (vlib_main_t * vm, vnet_main_t * vnet_main, /* */ l2_input_config_t *config; 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); @@ -587,14 +586,7 @@ set_int_l2_mode (vlib_main_t * vm, vnet_main_t * vnet_main, /* */ config->bvi = 0; /* delete the l2fib entry for the bvi interface */ - l2fib_del_entry (hi->hw_address, config->bd_index); - - /* Make loop output node send packet back to ethernet-input node */ - slot = - vlib_node_add_named_next_with_slot (vm, hi->tx_node_index, - "ethernet-input", - VNET_SIMULATED_ETHERNET_TX_NEXT_ETHERNET_INPUT); - ASSERT (slot == VNET_SIMULATED_ETHERNET_TX_NEXT_ETHERNET_INPUT); + l2fib_del_entry (hi->hw_address, config->bd_index, sw_if_index); /* since this is a no longer BVI interface do not to flood to it */ si = vnet_get_sw_interface (vnm, sw_if_index); @@ -692,18 +684,13 @@ set_int_l2_mode (vlib_main_t * vm, vnet_main_t * vnet_main, /* */ config->bvi = 1; /* create the l2fib entry for the bvi interface */ - l2fib_add_fwd_entry (hi->hw_address, bd_index, sw_if_index, 1, 1); /* static + bvi */ + l2fib_add_entry (hi->hw_address, bd_index, sw_if_index, + L2FIB_ENTRY_RESULT_FLAG_BVI | + L2FIB_ENTRY_RESULT_FLAG_STATIC); /* Disable learning by default. no use since l2fib entry is static. */ config->feature_bitmap &= ~L2INPUT_FEAT_LEARN; - /* Make loop output node send packet to l2-input node */ - slot = - vlib_node_add_named_next_with_slot (vm, hi->tx_node_index, - "l2-input", - VNET_SIMULATED_ETHERNET_TX_NEXT_ETHERNET_INPUT); - ASSERT (slot == VNET_SIMULATED_ETHERNET_TX_NEXT_ETHERNET_INPUT); - /* since this is a BVI interface we want to flood to it */ si = vnet_get_sw_interface (vnm, sw_if_index); si->flood_class = VNET_FLOOD_CLASS_BVI;