summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dpdk/device/common.c7
-rw-r--r--src/plugins/gbp/gbp_endpoint.c6
2 files changed, 4 insertions, 9 deletions
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);
}
diff --git a/src/plugins/gbp/gbp_endpoint.c b/src/plugins/gbp/gbp_endpoint.c
index 91505daee2a..cffa6da836c 100644
--- a/src/plugins/gbp/gbp_endpoint.c
+++ b/src/plugins/gbp/gbp_endpoint.c
@@ -179,13 +179,11 @@ gbp_endpoint_update (u32 sw_if_index,
if (ip46_address_is_ip4 (&gbpe->ge_key->gek_ip))
send_ip4_garp_w_addr (vlib_get_main (),
&gbpe->ge_key->gek_ip.ip4,
- vnet_get_sup_hw_interface
- (vnet_get_main (), gepg->gepg_uplink_sw_if_index));
+ gepg->gepg_uplink_sw_if_index);
else
send_ip6_na_w_addr (vlib_get_main (),
&gbpe->ge_key->gek_ip.ip6,
- vnet_get_sup_hw_interface
- (vnet_get_main (), gepg->gepg_uplink_sw_if_index));
+ gepg->gepg_uplink_sw_if_index);
return (0);
}