summaryrefslogtreecommitdiffstats
path: root/src/vnet/bonding
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/bonding')
-rw-r--r--src/vnet/bonding/cli.c10
-rw-r--r--src/vnet/bonding/device.c12
-rw-r--r--src/vnet/bonding/node.c3
3 files changed, 2 insertions, 23 deletions
diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c
index 3ee99a51b62..b66c4af337d 100644
--- a/src/vnet/bonding/cli.c
+++ b/src/vnet/bonding/cli.c
@@ -135,10 +135,9 @@ bond_delete_neighbor (vlib_main_t * vm, bond_if_t * bif, slave_if_t * sif)
bond_main_t *bm = &bond_main;
vnet_main_t *vnm = vnet_get_main ();
int i;
- vnet_hw_interface_t *sif_hw, *bif_hw;
+ vnet_hw_interface_t *sif_hw;
sif_hw = vnet_get_sup_hw_interface (vnm, sif->sw_if_index);
- bif_hw = vnet_get_sup_hw_interface (vnm, bif->sw_if_index);
bif->port_number_bitmap =
clib_bitmap_set (bif->port_number_bitmap,
@@ -156,13 +155,6 @@ bond_delete_neighbor (vlib_main_t * vm, bond_if_t * bif, slave_if_t * sif)
}
}
- if (bif_hw->l2_if_count)
- {
- ethernet_set_flags (vnm, sif_hw->hw_if_index, 0);
- /* Allow ip packets to go directly to ip4-input etc */
- ethernet_set_rx_redirect (vnm, sif_hw, 0);
- }
-
bond_disable_collecting_distributing (vm, sif);
/* Put back the old mac */
diff --git a/src/vnet/bonding/device.c b/src/vnet/bonding/device.c
index a27524089aa..9e1bb9517e4 100644
--- a/src/vnet/bonding/device.c
+++ b/src/vnet/bonding/device.c
@@ -99,18 +99,6 @@ bond_set_l2_mode_function (vnet_main_t * vnm,
ethernet_set_rx_redirect (vnm, sif_hw, 1);
}
}
- else if ((bif_hw->l2_if_count == 0) && (l2_if_adjust == -1))
- {
- /* Just removed last L2 subinterface on this port */
- vec_foreach (sw_if_index, bif->slaves)
- {
- sif_hw = vnet_get_sup_hw_interface (vnm, *sw_if_index);
- ethernet_set_flags (vnm, sif_hw->hw_if_index, 0);
-
- /* Allow ip packets to go directly to ip4-input etc */
- ethernet_set_rx_redirect (vnm, sif_hw, 0);
- }
- }
return 0;
}
diff --git a/src/vnet/bonding/node.c b/src/vnet/bonding/node.c
index b831d40540e..65d3ba10470 100644
--- a/src/vnet/bonding/node.c
+++ b/src/vnet/bonding/node.c
@@ -483,9 +483,8 @@ bond_hw_interface_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags)
slave_if_t *sif;
vnet_sw_interface_t *sw;
vlib_main_t *vm = bm->vlib_main;
- vnet_interface_main_t *im = &vnm->interface_main;
- sw = pool_elt_at_index (im->sw_interfaces, hw_if_index);
+ sw = vnet_get_hw_sw_interface (vnm, hw_if_index);
sif = bond_get_slave_by_sw_if_index (sw->sw_if_index);
if (sif)
{