aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_input.c
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2020-05-14 15:02:16 -0400
committerFlorin Coras <florin.coras@gmail.com>2020-05-16 02:52:13 +0000
commitf415a3b53a51b261d08cc3312c25f250d6bc1bd6 (patch)
tree56ec4613977c9b7c7993c7675fce3e19b6f79d43 /src/vnet/l2/l2_input.c
parentf3a522fb3f3a82e579fbdd3f4bb94e399ad95bb1 (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
Diffstat (limited to 'src/vnet/l2/l2_input.c')
-rw-r--r--src/vnet/l2/l2_input.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/vnet/l2/l2_input.c b/src/vnet/l2/l2_input.c
index 7b93fba20b1..8a7ab802175 100644
--- a/src/vnet/l2/l2_input.c
+++ b/src/vnet/l2/l2_input.c
@@ -800,9 +800,6 @@ set_int_l2_mode (vlib_main_t * vm, vnet_main_t * vnet_main, /* */
config->feature_bitmap &=
~(L2INPUT_FEAT_LEARN | L2INPUT_FEAT_FWD | L2INPUT_FEAT_FLOOD);
shg = 0; /* not used in xconnect */
-
- /* Insure all packets go to ethernet-input */
- ethernet_set_rx_redirect (vnet_main, hi, 1);
}
/* set up split-horizon group and set output feature bit */
@@ -827,25 +824,18 @@ set_int_l2_mode (vlib_main_t * vm, vnet_main_t * vnet_main, /* */
{
if ((hi->l2_if_count == 1) && (l2_if_adjust == 1))
{
- /* Just added first L2 interface on this port */
-
- /* Set promiscuous mode on the l2 interface */
+ /* Just added first L2 interface on this port
+ * Set promiscuous mode on the l2 interface */
ethernet_set_flags (vnet_main, hi->hw_if_index,
ETHERNET_INTERFACE_FLAG_ACCEPT_ALL);
-
- /* ensure all packets go to ethernet-input */
- ethernet_set_rx_redirect (vnet_main, hi, 1);
-
}
else if ((hi->l2_if_count == 0) && (l2_if_adjust == -1))
{
- /* Just removed only L2 subinterface on this port */
-
- /* Disable promiscuous mode on the l2 interface */
- ethernet_set_flags (vnet_main, hi->hw_if_index, 0);
+ /* Just removed only L2 subinterface on this port
+ * Disable promiscuous mode on the l2 interface */
+ ethernet_set_flags (vnet_main, hi->hw_if_index,
+ /*ETHERNET_INTERFACE_FLAG_DEFAULT_L3 */ 0);
- /* Allow ip packets to go directly to ip4-input etc */
- ethernet_set_rx_redirect (vnet_main, hi, 0);
}
}