#include <plugins/gbp/gbp_policy_dpo.h>
#include <plugins/gbp/gbp_vxlan.h>
-#include <vnet/ethernet/arp.h>
#include <vnet/l2/l2_input.h>
#include <vnet/l2/l2_output.h>
#include <vnet/l2/feat_bitmap.h>
#include <vnet/l2/l2_fib.h>
#include <vnet/fib/fib_table.h>
-#include <vnet/ip/ip_neighbor.h>
+#include <vnet/ip-neighbor/ip_neighbor.h>
+#include <vnet/ip-neighbor/ip4_neighbor.h>
+#include <vnet/ip-neighbor/ip6_neighbor.h>
#include <vnet/fib/fib_walk.h>
#include <vnet/vxlan-gbp/vxlan_gbp.h>
return (ge - gbp_endpoint_pool);
}
-static ip46_type_t
-ip46_address_get_type (const ip46_address_t * a)
-{
- return (ip46_address_is_ip4 (a) ? IP46_TYPE_IP4 : IP46_TYPE_IP6);
-}
-
static int
gbp_endpoint_ip_is_equal (const fib_prefix_t * fp, const ip46_address_t * ip)
{
gbp_endpoint_add_itf (gbp_itf_get_sw_if_index (gef->gef_itf),
gei);
if (FIB_PROTOCOL_IP4 == pfx->fp_proto)
- send_ip4_garp_w_addr (vlib_get_main (),
- &pfx->fp_addr.ip4,
- gg->gg_uplink_sw_if_index);
+ ip4_neighbor_advertise (vlib_get_main (),
+ vnet_get_main (),
+ gg->gg_uplink_sw_if_index,
+ &pfx->fp_addr.ip4);
else
- send_ip6_na_w_addr (vlib_get_main (),
- &pfx->fp_addr.ip6,
- gg->gg_uplink_sw_if_index);
+ ip6_neighbor_advertise (vlib_get_main (),
+ vnet_get_main (),
+ gg->gg_uplink_sw_if_index,
+ &pfx->fp_addr.ip6);
}
}
}
u32 index;
/* *INDENT-OFF* */
- pool_foreach_index(index, gbp_endpoint_pool,
+ pool_foreach_index (index, gbp_endpoint_pool)
{
if (!cb(index, ctx))
break;
- });
+ }
/* *INDENT-ON* */
}
last_start = vlib_time_now (vm);
}
- b = >e_table->buckets[i];
- if (b->offset == 0)
+ b = clib_bihash_get_bucket_16_8 (gte_table, i);
+ if (clib_bihash_bucket_is_empty_16_8 (b))
continue;
v = clib_bihash_get_value_16_8 (gte_table, b->offset);
* Note: we may have just freed the bucket's backing
* storage, so check right here...
*/
- if (b->offset == 0)
+ if (clib_bihash_bucket_is_empty_16_8 (b))
goto doublebreak;
}
v++;
last_start = vlib_time_now (vm);
}
- b = >e_table->buckets[i];
- if (b->offset == 0)
+ b = clib_bihash_get_bucket_24_8 (gte_table, i);
+ if (clib_bihash_bucket_is_empty_24_8 (b))
continue;
v = clib_bihash_get_value_24_8 (gte_table, b->offset);
* Note: we may have just freed the bucket's backing
* storage, so check right here...
*/
- if (b->offset == 0)
+ if (clib_bihash_bucket_is_empty_24_8 (b))
goto doublebreak;
}
v++;