48 #define GBP_ENDPOINT_DBG(...) \ 49 vlib_log_debug (gbp_ep_logger, __VA_ARGS__); 51 #define GBP_ENDPOINT_INFO(...) \ 52 vlib_log_notice (gbp_ep_logger, __VA_ARGS__); 64 #define FOR_EACH_GBP_ENDPOINT_ATTR(_item) \ 65 for (_item = GBP_ENDPOINT_ATTR_FIRST; \ 66 _item < GBP_ENDPOINT_ATTR_LAST; \ 77 if ((1 << attr) & flags)
119 *sw_if_index = key->
key[1];
126 ip->as_u64[0] = key->
key[0];
127 ip->as_u64[1] = key->
key[1];
128 *sw_if_index = key->
key[2];
139 rv = clib_bihash_search_24_8 (&gbp_ep_db.
ged_by_ip_rd, &key, &value);
164 rv = clib_bihash_add_del_16_8 (&gbp_ep_db.
ged_by_mac_bd, &key, 1);
179 rv = clib_bihash_add_del_24_8 (&gbp_ep_db.
ged_by_ip_rd, &key, 1);
191 clib_bihash_add_del_16_8 (&gbp_ep_db.
ged_by_mac_bd, &key, 0);
201 clib_bihash_add_del_24_8 (&gbp_ep_db.
ged_by_ip_rd, &key, 0);
207 return (ge - gbp_endpoint_pool);
224 const ip46_address_t *
ips,
227 const ip46_address_t *
ip;
392 l2_ge = l3_ge = NULL;
401 const ip46_address_t *
ip;
414 else if (NULL == l3_ge)
417 else if (tmp == l3_ge)
431 if (NULL == l2_ge && NULL == l3_ge)
434 else if (NULL == l2_ge)
437 else if (NULL == l3_ge)
489 const ip46_address_t * tun_src,
490 const ip46_address_t * tun_dst)
492 int was_learnt, is_learnt;
656 L2OUTPUT_FEAT_GBP_POLICY_MAC);
662 L2OUTPUT_FEAT_GBP_POLICY_PORT);
667 L2FIB_ENTRY_RESULT_FLAG_STATIC);
738 ip_sw_if_index, rewrite);
792 L2INPUT_FEAT_GBP_LPM_CLASSIFY);
806 feats |= L2INPUT_FEAT_GBP_FWD;
824 const ip46_address_t *
ips,
829 const ip46_address_t * tun_src,
830 const ip46_address_t * tun_dst,
u32 * handle)
841 if (~0 == sw_if_index)
842 return (VNET_API_ERROR_INVALID_SW_IF_INDEX);
856 return (VNET_API_ERROR_NO_SUCH_ENTRY);
865 return (VNET_API_ERROR_NO_SUCH_ENTRY);
867 return (VNET_API_ERROR_NO_SUCH_FIB);
1070 if (!cb(index, ctx))
1101 else if (
unformat (input,
"sclass %d", &sclass))
1103 else if (
unformat (input,
"handle %d", &handle))
1111 else if (
unformat (input,
"flags 0x%x", &flags))
1119 if (~0 == sw_if_index)
1126 sw_if_index, ips, &mac,
1128 sclass, flags, NULL, NULL, &handle);
1157 .path =
"gbp endpoint",
1158 .short_help =
"gbp endpoint del <handle> | [add] <interface> sclass <SCLASS> ip <IP> mac <MAC> [flags <flags>]",
1170 #define _(v,a) case GBP_ENDPOINT_SRC_##v: return (format (s, "%s", a)); 1175 return (
format (s,
"unknown"));
1227 s =
format (s,
" tun:[");
1230 s =
format (s,
" {%U,%U}]",
1284 sw_if_index, kvp->
value);
1301 sw_if_index, kvp->
value);
1308 u32 show_dbs, handle;
1315 if (
unformat (input,
"%d", &handle))
1330 clib_bihash_foreach_key_value_pair_24_8 (&gbp_ep_db.
ged_by_ip_rd,
1332 clib_bihash_foreach_key_value_pair_16_8
1353 .path =
"show gbp endpoint",
1354 .short_help =
"show gbp endpoint\n",
1385 f64 last_start, start_time, delta_t;
1388 if (!gte_table->instantiated)
1394 for (i = 0; i < gte_table->nbuckets; i++)
1396 clib_bihash_bucket_16_8_t *b;
1397 clib_bihash_value_16_8_t *v;
1401 if (delta_t > 20e-6)
1408 b = >e_table->buckets[
i];
1411 v = clib_bihash_get_value_16_8 (gte_table, b->offset);
1413 for (j = 0; j < (1 << b->log2_pages); j++)
1439 clib_bihash_24_8_t *gte_table = &gbp_ep_db.
ged_by_ip_rd;
1440 f64 last_start, start_time, delta_t;
1443 if (!gte_table->instantiated)
1449 for (i = 0; i < gte_table->nbuckets; i++)
1451 clib_bihash_bucket_24_8_t *b;
1452 clib_bihash_value_24_8_t *v;
1456 if (delta_t > 20e-6)
1463 b = >e_table->buckets[
i];
1466 v = clib_bihash_get_value_24_8 (gte_table, b->offset);
1468 for (j = 0; j < (1 << b->log2_pages); j++)
1566 #define GBP_EP_HASH_NUM_BUCKETS (2 * 1024) 1567 #define GBP_EP_HASH_MEMORY_SIZE (1 << 20) 1570 "GBP Endpoints - IP/RD",
1574 "GBP Endpoints - MAC/BD",
vlib_log_class_t vlib_log_register_class(char *class, char *subclass)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
A real VXLAN-GBP tunnel (from vnet/vxlan-gbp/...)
static void gbp_endpoint_scan_l3(vlib_main_t *vm)
index_t gek_grd
Index of the Route-Domain.
fib_protocol_t fp_proto
protocol type
fib_node_index_t fib_table_entry_path_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, dpo_proto_t next_hop_proto, const ip46_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_fib_index, u32 next_hop_weight, fib_mpls_label_t *next_hop_labels, fib_route_path_flags_t path_flags)
Add one path to an entry (aka route) in the FIB.
int gbp_endpoint_is_external(const gbp_endpoint_t *ge)
static gbp_endpoint_loc_t * gbp_endpoint_loc_find_or_add(gbp_endpoint_t *ge, gbp_endpoint_src_t src)
static gbp_endpoint_src_t gbp_endpoint_get_best_src(const gbp_endpoint_t *ge)
u32 gef_fib_index
FIB index the EP is in.
int gbp_endpoint_is_remote(const gbp_endpoint_t *ge)
static gbp_endpoint_t * gbp_endpoint_get(index_t gbpei)
Get the endpoint from a port/interface.
f64 ge_last_time
The last time a packet from seen from this end point.
index_t * ged_by_sw_if_index
A Group Based Policy Endpoint.
fib_prefix_t * gek_ips
A vector of ip addresses that belong to the endpoint.
const mac_address_t * gbp_route_domain_get_local_mac(void)
#define BIHASH_KVP_PER_PAGE
void gbp_endpoint_unlock(gbp_endpoint_src_t src, index_t gei)
Information about the location of the endpoint provided by a source of endpoints. ...
gbp_endpoint_fwd_t ge_fwd
#define GBP_EP_HASH_NUM_BUCKETS
gbp_endpoint_key_t ge_key
The key/ID of this EP.
u32 bd_add_del_ip_mac(u32 bd_index, ip46_type_t type, const ip46_address_t *ip, const mac_address_t *mac, u8 is_add)
Add/delete IP address to MAC address mapping.
vnet_main_t * vnet_get_main(void)
static void gbp_endpoint_walk_mac_itf(const clib_bihash_kv_16_8_t *kvp, void *arg)
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
index_t * gef_adjs
The L3 adj, if created.
void fib_node_init(fib_node_t *node, fib_node_type_t type)
ip46_type_t fib_proto_to_ip46(fib_protocol_t fproto)
Convert from fib_protocol to ip46_type.
u32 gb_vni
The index of the BD's VNI interface on which packets from unkown endpoints arrive.
void gbp_itf_l2_set_output_feature(gbp_itf_hdl_t gh, l2output_feat_masks_t feats)
static void gbp_endpoint_walk_ip_itf(const clib_bihash_kv_24_8_t *kvp, void *arg)
struct gbp_endpoint_flush_ctx_t_ gbp_endpoint_flush_ctx_t
static void gbp_endpoint_del_ip(const ip46_address_t *ip, u32 fib_index)
int gbp_endpoint_is_local(const gbp_endpoint_t *ge)
static walk_rc_t gbp_endpoint_show_one(index_t gei, void *ctx)
gbp_endpoint_flags_t gef_flags
static f64 vlib_time_now(vlib_main_t *vm)
ip46_address_t gt_src
The source address to use for child tunnels.
static gbp_endpoint_loc_t * gbp_endpoint_loc_find(gbp_endpoint_t *ge, gbp_endpoint_src_t src)
void gbp_itf_unlock(gbp_itf_hdl_t *gh)
enum fib_node_back_walk_rc_t_ fib_node_back_walk_rc_t
Return code from a back walk function.
enum gbp_endpoint_src_t_ gbp_endpoint_src_t
A bridge Domain Representation.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
static void gbp_endpoint_scan_l2(vlib_main_t *vm)
static_always_inline void mac_address_copy(mac_address_t *dst, const mac_address_t *src)
static_always_inline int mac_address_is_zero(const mac_address_t *mac)
static u32 gbp_n_learnt_endpoints
A count of the number of dynamic entries.
unformat_function_t unformat_vnet_sw_interface
index_t gg_rd
route-domain/IP-table ID the EPG is in
static void gbp_endpoint_loc_update(const gbp_endpoint_t *ge, gbp_endpoint_loc_t *gel, const gbp_bridge_domain_t *gb, u32 sw_if_index, index_t ggi, gbp_endpoint_flags_t flags, const ip46_address_t *tun_src, const ip46_address_t *tun_dst)
index_t gbp_route_domain_index(const gbp_route_domain_t *grd)
static gbp_bridge_domain_t * gbp_bridge_domain_get(index_t i)
gbp_endpoint_src_t gel_src
The source providing this location information.
adj_index_t adj_nbr_add_or_lock_w_rewrite(fib_protocol_t nh_proto, vnet_link_t link_type, const ip46_address_t *nh_addr, u32 sw_if_index, u8 *rewrite)
Add (and lock) a new or lock an existing neighbour adjacency.
static int clib_bihash_is_free_16_8(clib_bihash_kv_16_8_t *v)
static void gbb_endpoint_fwd_reset(gbp_endpoint_t *ge)
format_function_t format_vnet_sw_if_index_name
#define GBP_ENDPOINT_SRC_MAX
static gbp_endpoint_t * gbp_endpoint_from_fib_node(fib_node_t *node)
fib_node_type_t fib_node_register_new_type(const fib_node_vft_t *vft)
Create a new FIB node type and Register the function table for it.
static int gbp_endpoint_ip_is_equal(const fib_prefix_t *fp, const ip46_address_t *ip)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
u32 fib_node_child_add(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_type_t type, fib_node_index_t index)
static uword ip46_address_is_multicast(const ip46_address_t *a)
static void gbp_endpoint_loc_destroy(gbp_endpoint_loc_t *gel)
u32 gbp_itf_get_sw_if_index(gbp_itf_hdl_t hdl)
#define clib_memcpy(d, s, n)
index_t gbp_bridge_domain_index(const gbp_bridge_domain_t *gbd)
static uword vlib_process_suspend(vlib_main_t *vm, f64 dt)
Suspend a vlib cooperative multi-tasking thread for a period of time.
enum walk_rc_t_ walk_rc_t
Walk return code.
gbp_endpoint_t * gbp_endpoint_pool
Pool of GBP endpoints.
gbp_endpoint_flags_t gel_flags
Endpoint flags.
vl_api_interface_index_t sw_if_index
static int gbp_endpoint_loc_unlock(gbp_endpoint_t *ge, gbp_endpoint_loc_t *gel)
static_always_inline void mac_address_to_bytes(const mac_address_t *mac, u8 *bytes)
#define VLIB_INIT_FUNCTION(x)
void fib_table_entry_special_remove(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Remove a 'special' entry from the FIB.
void fib_walk_sync(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_back_walk_ctx_t *ctx)
Back walk all the children of a FIB node.
gbp_endpoint_group_t * gbp_endpoint_group_get(index_t i)
u8 * format_fib_prefix(u8 *s, va_list *args)
A high priority source a plugin can use.
clib_bihash_24_8_t ged_by_ip_rd
static int clib_bihash_is_free_24_8(const clib_bihash_kv_24_8_t *v)
static_always_inline gbp_endpoint_t * gbp_endpoint_find_mac(const u8 *mac, u32 bd_index)
Aggregate type for a prefix.
u8 * format_gbp_endpoint_flags(u8 *s, va_list *args)
#define clib_error_return(e, args...)
void l2fib_add_entry(const u8 *mac, u32 bd_index, u32 sw_if_index, l2fib_entry_result_flags_t flags)
Add an entry to the l2fib.
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
index_t gek_gbd
Index of the Bridge-Domain.
static void gbp_endpoint_extract_key_ip_itf(const clib_bihash_kv_24_8_t *key, ip46_address_t *ip, u32 *sw_if_index)
static fib_node_back_walk_rc_t gbp_endpoint_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
static void gbp_endpoint_check(index_t gei, f64 start_time)
static const u8 * vnet_sw_interface_get_hw_address(vnet_main_t *vnm, u32 sw_if_index)
vl_api_fib_path_type_t type
fib_protocol_t fib_proto_from_ip46(ip46_type_t iproto)
Convert from ip46_type to fib_protocol.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
fib_node_bw_reason_flag_t fnbw_reason
The reason/trigger for the backwalk.
#define GBP_ENDPOINT_ATTR_NAMES
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
gbp_itf_hdl_t gel_itf
The interface on which the EP is connected.
void fib_node_lock(fib_node_t *node)
static u8 * format_gbp_endpoint_key(u8 *s, va_list *args)
void gbp_policy_dpo_add_or_lock(dpo_proto_t dproto, gbp_scope_t scope, sclass_t sclass, u32 sw_if_index, dpo_id_t *dpo)
void gbp_endpoint_scan(vlib_main_t *vm)
#define pool_put(P, E)
Free an object E in pool P.
This is the object type deifend above.
static fib_node_t * gbp_endpoint_get_node(fib_node_index_t index)
clib_bihash_16_8_t ged_by_mac_bd
#define vec_del1(v, i)
Delete the element at index I.
u32 remote_ep_timeout
Aging timeout for remote endpoints.
static_always_inline void mac_address_from_u64(mac_address_t *mac, u64 u)
fib_node_type_t fn_type
The node's type.
An node in the FIB graph.
sclass_t gef_sclass
Endpoint Group's sclass.
gbp_itf_hdl_t gbp_vxlan_tunnel_clone_and_lock(u32 sw_if_index, const ip46_address_t *src, const ip46_address_t *dst)
void fib_node_unlock(fib_node_t *node)
static ip46_type_t ip46_address_get_type(const ip46_address_t *a)
mac_address_t gek_mac
MAC address of the endpoint.
u32 gel_parent_sw_if_index
gbp_itf_hdl_t vxlan_gbp_tunnel_lock_itf(u32 sw_if_index)
int gbp_endpoint_update_and_lock(gbp_endpoint_src_t src, u32 sw_if_index, const ip46_address_t *ips, const mac_address_t *mac, index_t gbdi, index_t grdi, sclass_t sclass, gbp_endpoint_flags_t flags, const ip46_address_t *tun_src, const ip46_address_t *tun_dst, u32 *handle)
u32 gbp_endpoint_child_add(index_t gei, fib_node_type_t type, fib_node_index_t index)
An Endpoint Group representation.
#define ip46_address_initializer
vlib_node_registration_t gbp_scanner_node
(constructor) VLIB_REGISTER_NODE (gbp_scanner_node)
void gbp_itf_hdl_reset(gbp_itf_hdl_t *gh)
static void gbp_endpoint_ips_update(gbp_endpoint_t *ge, const ip46_address_t *ips, const gbp_route_domain_t *grd)
#define ip46_address_is_ip4(ip46)
static u8 * format_gbp_endpoint_loc(u8 *s, va_list *args)
bool gbp_itf_hdl_is_valid(gbp_itf_hdl_t gh)
u32 l2fib_del_entry(const u8 *mac, u32 bd_index, u32 sw_if_index)
Delete an entry from the l2fib.
static void gbp_endpoint_add_itf(u32 sw_if_index, index_t gei)
enum gbp_endpoint_attr_t_ gbp_endpoint_attr_t
Flags for each endpoint.
static bool gbp_endpoint_add_ip(const ip46_address_t *ip, u32 fib_index, index_t gei)
gbp_itf_hdl_t gbp_itf_l2_add_and_lock(u32 sw_if_index, index_t gbi)
void gbp_endpoint_walk(gbp_endpoint_cb_t cb, void *ctx)
#define vec_free(V)
Free vector's memory (no header).
void fib_table_entry_delete(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Delete a FIB entry.
Force the walk to be synchronous.
#define FOR_EACH_GBP_ENDPOINT_ATTR(_item)
u32 grd_fib_index[FIB_PROTOCOL_IP_MAX]
void gbp_endpoint_group_lock(index_t ggi)
void send_ip6_na_w_addr(vlib_main_t *vm, const ip6_address_t *addr, u32 sw_if_index)
#define vec_search_with_function(v, E, fn)
Search a vector for the index of the entry that matches.
static_always_inline void ip46_address_copy(ip46_address_t *dst, const ip46_address_t *src)
static void gbb_endpoint_fwd_recalc(gbp_endpoint_t *ge)
u32 fib_node_index_t
A typedef of a node index.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
uword unformat_mac_address(unformat_input_t *input, va_list *args)
void fib_prefix_from_ip46_addr(const ip46_address_t *addr, fib_prefix_t *pfx)
Host prefix from ip.
static clib_error_t * gbp_endpoint_init(vlib_main_t *vm)
gbp_endpoint_t * gbp_endpoint_find_ip(const ip46_address_t *ip, u32 fib_index)
void send_ip4_garp_w_addr(vlib_main_t *vm, const ip4_address_t *ip4_addr, u32 sw_if_index)
void gbp_endpoint_flush(gbp_endpoint_src_t src, u32 sw_if_index)
remove all learnt endpoints using the interface
Context passed between object during a back walk.
#define VLIB_CLI_COMMAND(x,...)
This is the identity of an endpoint, as such it is information about an endpoint that is idempotent...
static walk_rc_t gbp_endpoint_flush_cb(index_t gei, void *args)
fib_node_index_t fib_table_entry_special_dpo_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Add a 'special' entry to the FIB that links to the DPO passed A special entry is an entry that the FI...
enum gbp_endpoint_flags_t_ gbp_endpoint_flags_t
static bool gbp_endpoint_add_mac(const mac_address_t *mac, u32 bd_index, index_t gei)
gbp_route_domain_t * gbp_route_domain_get(index_t i)
static u8 * format_gbp_endpoint_fwd(u8 *s, va_list *args)
u8 * format_gbp_endpoint(u8 *s, va_list *args)
const mac_address_t ZERO_MAC_ADDRESS
u32 gb_bvi_sw_if_index
The BD's BVI interface (obligatory)
u8 * format_gbp_itf_hdl(u8 *s, va_list *args)
vlib_log_class_t gbp_ep_logger
void gbp_endpoint_group_unlock(index_t ggi)
const mac_address_t * gbp_route_domain_get_remote_mac(void)
#define GBP_ENDPOINT_INFO(...)
static clib_error_t * gbp_endpoint_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void fib_node_child_remove(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_index_t sibling_index)
gbp_endpoint_retention_t gg_retention
EP retention policy.
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
static gbp_endpoint_t * gbp_endpoint_alloc(const ip46_address_t *ips, const gbp_route_domain_t *grd, const mac_address_t *mac, const gbp_bridge_domain_t *gbd)
static void gbp_endpoint_del_mac(const mac_address_t *mac, u32 bd_index)
static vlib_main_t * vlib_get_main(void)
static_always_inline void gbp_endpoint_mk_key_mac(const u8 *mac, u32 bd_index, clib_bihash_kv_16_8_t *key)
int gbp_endpoint_is_learnt(const gbp_endpoint_t *ge)
#define ip46_address_reset(ip46)
static_always_inline void gbp_endpoint_mk_key_ip(const ip46_address_t *ip, u32 fib_index, clib_bihash_kv_24_8_t *key)
static int gbp_endpoint_find_for_update(const ip46_address_t *ips, const gbp_route_domain_t *grd, const mac_address_t *mac, const gbp_bridge_domain_t *gbd, gbp_endpoint_t **ge)
Find an EP inthe DBs and check that if we find it in the L2 DB it has the same IPs as this update...
static int gbp_endpoint_loc_cmp_for_sort(gbp_endpoint_loc_t *a, gbp_endpoint_loc_t *b)
fib_node_t ge_node
A FIB node that allows the tracking of children.
gbp_itf_hdl_t gef_itf
The interface on which the EP is connected.
gbp_vxlan_tunnel_t * gbp_vxlan_tunnel_get(index_t gti)
u32 gel_locks
number of times this source has locked this
void gbp_itf_l2_set_input_feature(gbp_itf_hdl_t gh, l2input_feat_masks_t feats)
And endpoints current forwarding state.
u32 vxlan_gbp_tunnel_get_parent(u32 sw_if_index)
#define ip46_address_is_equal(a1, a2)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
A route Domain Representation.
u32 gg_uplink_sw_if_index
the uplink interface dedicated to the EPG
static void gbp_endpoint_n_learned(int n)
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
gbp_itf_hdl_t gbp_itf_clone_and_lock(gbp_itf_hdl_t gh)
static int gbp_endpoint_loc_is_equal(gbp_endpoint_loc_t *a, gbp_endpoint_loc_t *b)
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
static void gbp_endpoint_last_lock_gone(fib_node_t *node)
gbp_vxlan_tunnel_type_t gbp_vxlan_tunnel_get_type(u32 sw_if_index)
gbp_ep_db_t gbp_ep_db
EP DBs.
struct gbp_endpoint_loc_t_::@462 tun
Tunnel info for remote endpoints.
A FIB graph nodes virtual function table.
GBP VXLAN (template) tunnel.
static const gbp_itf_hdl_t GBP_ITF_HDL_INVALID
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
index_t gbp_endpoint_group_find(sclass_t sclass)
u8 * format_mac_address_t(u8 *s, va_list *args)
vl_api_address_t ips[n_ips]
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
#define vec_foreach(var, vec)
Vector iterator.
vnet_link_t fib_proto_to_link(fib_protocol_t proto)
Convert from a protocol to a link type.
static void gbp_endpoint_extract_key_mac_itf(const clib_bihash_kv_16_8_t *key, mac_address_t *mac, u32 *sw_if_index)
index_t gel_epg
Endpoint Group.
#define pool_foreach_index(i, v, body)
Iterate pool by index.
static const char * gbp_endpoint_attr_names[]
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header, unspecified alignment)
fib_node_type_t gbp_endpoint_fib_type
gbp_endpoint_loc_t * ge_locs
Location information provided by the various sources.
#define ip46_address_is_zero(ip46)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
A low (below routing) priority source a plugin can use.
#define GBP_EP_HASH_MEMORY_SIZE
void gbp_endpoint_child_remove(index_t gei, u32 sibling)
static index_t gbp_endpoint_index(const gbp_endpoint_t *ge)
static clib_error_t * gbp_endpoint_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
walk_rc_t(* gbp_endpoint_cb_t)(index_t gbpei, void *ctx)
index_t gg_gbd
Bridge-domain ID the EPG is in.
u8 * format_gbp_endpoint_src(u8 *s, va_list *args)