From f415a3b53a51b261d08cc3312c25f250d6bc1bd6 Mon Sep 17 00:00:00 2001 From: John Lo Date: Thu, 14 May 2020 15:02:16 -0400 Subject: 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 Change-Id: I0f24161d027b07c188fd1e05276146f94c075710 --- src/vnet/l2/l2_patch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vnet/l2/l2_patch.c') diff --git a/src/vnet/l2/l2_patch.c b/src/vnet/l2/l2_patch.c index fb8849dc261..618ae20536d 100644 --- a/src/vnet/l2/l2_patch.c +++ b/src/vnet/l2/l2_patch.c @@ -270,15 +270,15 @@ vnet_l2_patch_add_del (u32 rx_sw_if_index, u32 tx_sw_if_index, int is_add) ETHERNET_INTERFACE_FLAG_ACCEPT_ALL); vnet_feature_enable_disable ("device-input", "l2-patch", - rxhi->hw_if_index, 1, 0, 0); + rxhi->sw_if_index, 1, 0, 0); } else { ethernet_set_flags (l2pm->vnet_main, rxhi->hw_if_index, - 0 /* disable promiscuous mode */ ); + /*ETHERNET_INTERFACE_FLAG_DEFAULT_L3 */ 0); vnet_feature_enable_disable ("device-input", "l2-patch", - rxhi->hw_if_index, 0, 0, 0); + rxhi->sw_if_index, 0, 0, 0); if (vec_len (l2pm->tx_next_by_rx_sw_if_index) > rx_sw_if_index) { l2pm->tx_next_by_rx_sw_if_index[rx_sw_if_index] = ~0; -- cgit 1.2.3-korg