From 9f781d84b0943b03af2a9fd0b7c4cef721d1d4c6 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 5 Jun 2018 11:09:32 -0700 Subject: bond: send gratuitous arp when the active slave went down in active-backup mode - Modify the API send_ip6_na and send_ip4_garp to take sw_if_index instead of vnet_hw_interface_t and add call to build_ethernet_rewrite to support subinterface/vlan - Add code to bonding driver to send an event to bond_process when the first interface becomes active or when the active interface is down - Create a bond_process to walk the interface and the corresponding subinterfaces to send garp/ip6_na when an event is received. - Minor cleanup in bonding/node.c Note: dpdk bonding driver does not send garp/ip6_na for subinterfaces. There is no attempt to fix it here. But the infra is now done and should be easy to add the support. Change-Id: If3ecc4cd0fb3051330f7fa11ca0dab3e18557ce1 Signed-off-by: Steven --- src/plugins/dpdk/device/common.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/plugins/dpdk/device/common.c') diff --git a/src/plugins/dpdk/device/common.c b/src/plugins/dpdk/device/common.c index dad43322ac4..99dd1815bc0 100644 --- a/src/plugins/dpdk/device/common.c +++ b/src/plugins/dpdk/device/common.c @@ -222,7 +222,6 @@ static uword send_garp_na_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) { - vnet_main_t *vnm = vnet_get_main (); uword event_type, *event_data = 0; while (1) @@ -238,11 +237,9 @@ send_garp_na_process (vlib_main_t * vm, if (i < 5) /* wait 0.2 sec for link to settle, max total 1 sec */ vlib_process_suspend (vm, 0.2); dpdk_device_t *xd = &dpdk_main.devices[dpdk_port]; - u32 hw_if_index = xd->hw_if_index; - vnet_hw_interface_t *hi = vnet_get_hw_interface (vnm, hw_if_index); dpdk_update_link_state (xd, vlib_time_now (vm)); - send_ip4_garp (vm, hi); - send_ip6_na (vm, hi); + send_ip4_garp (vm, xd->sw_if_index); + send_ip6_na (vm, xd->sw_if_index); } vec_reset_length (event_data); } -- cgit 1.2.3-korg