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);
218 const ip46_address_t *
ips,
221 const ip46_address_t *
ip;
386 l2_ge = l3_ge = NULL;
395 const ip46_address_t *
ip;
408 else if (NULL == l3_ge)
411 else if (tmp == l3_ge)
425 if (NULL == l2_ge && NULL == l3_ge)
428 else if (NULL == l2_ge)
431 else if (NULL == l3_ge)
483 const ip46_address_t * tun_src,
484 const ip46_address_t * tun_dst)
486 int was_learnt, is_learnt;
650 L2OUTPUT_FEAT_GBP_POLICY_MAC);
656 L2OUTPUT_FEAT_GBP_POLICY_PORT);
661 L2FIB_ENTRY_RESULT_FLAG_STATIC);
732 ip_sw_if_index, rewrite);
783 L2INPUT_FEAT_GBP_LPM_CLASSIFY);
797 feats |= L2INPUT_FEAT_GBP_FWD;
815 const ip46_address_t *
ips,
820 const ip46_address_t * tun_src,
821 const ip46_address_t * tun_dst,
u32 * handle)
832 if (~0 == sw_if_index)
833 return (VNET_API_ERROR_INVALID_SW_IF_INDEX);
847 return (VNET_API_ERROR_NO_SUCH_ENTRY);
856 return (VNET_API_ERROR_NO_SUCH_ENTRY);
858 return (VNET_API_ERROR_NO_SUCH_FIB);
1061 if (!cb(index, ctx))
1092 else if (
unformat (input,
"sclass %d", &sclass))
1094 else if (
unformat (input,
"handle %d", &handle))
1102 else if (
unformat (input,
"flags 0x%x", &flags))
1110 if (~0 == sw_if_index)
1117 sw_if_index, ips, &mac,
1119 sclass, flags, NULL, NULL, &handle);
1148 .path =
"gbp endpoint",
1149 .short_help =
"gbp endpoint del <handle> | [add] <interface> sclass <SCLASS> ip <IP> mac <MAC> [flags <flags>]",
1161 #define _(v,a) case GBP_ENDPOINT_SRC_##v: return (format (s, "%s", a)); 1166 return (
format (s,
"unknown"));
1218 s =
format (s,
" tun:[");
1221 s =
format (s,
" {%U,%U}]",
1275 sw_if_index, kvp->
value);
1276 return (BIHASH_WALK_CONTINUE);
1293 sw_if_index, kvp->
value);
1294 return (BIHASH_WALK_CONTINUE);
1301 u32 show_dbs, handle;
1308 if (
unformat (input,
"%d", &handle))
1323 clib_bihash_foreach_key_value_pair_24_8 (&gbp_ep_db.
ged_by_ip_rd,
1325 clib_bihash_foreach_key_value_pair_16_8
1346 .path =
"show gbp endpoint",
1347 .short_help =
"show gbp endpoint\n",
1378 f64 last_start, start_time, delta_t;
1381 if (!gte_table->instantiated)
1387 for (i = 0; i < gte_table->nbuckets; i++)
1389 clib_bihash_bucket_16_8_t *b;
1390 clib_bihash_value_16_8_t *v;
1394 if (delta_t > 20e-6)
1401 b = clib_bihash_get_bucket_16_8 (gte_table, i);
1402 if (clib_bihash_bucket_is_empty_16_8 (b))
1404 v = clib_bihash_get_value_16_8 (gte_table, b->offset);
1406 for (j = 0; j < (1 << b->log2_pages); j++)
1419 if (clib_bihash_bucket_is_empty_16_8 (b))
1432 clib_bihash_24_8_t *gte_table = &gbp_ep_db.
ged_by_ip_rd;
1433 f64 last_start, start_time, delta_t;
1436 if (!gte_table->instantiated)
1442 for (i = 0; i < gte_table->nbuckets; i++)
1444 clib_bihash_bucket_24_8_t *b;
1445 clib_bihash_value_24_8_t *v;
1449 if (delta_t > 20e-6)
1456 b = clib_bihash_get_bucket_24_8 (gte_table, i);
1457 if (clib_bihash_bucket_is_empty_24_8 (b))
1459 v = clib_bihash_get_value_24_8 (gte_table, b->offset);
1461 for (j = 0; j < (1 << b->log2_pages); j++)
1474 if (clib_bihash_bucket_is_empty_24_8 (b))
1559 #define GBP_EP_HASH_NUM_BUCKETS (2 * 1024) 1560 #define GBP_EP_HASH_MEMORY_SIZE (1 << 20) 1563 "GBP Endpoints - IP/RD",
1567 "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
enum fib_source_t_ fib_source_t
The different sources that can create a route.
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.
static uword ip46_address_is_multicast(const ip46_address_t *a)
const mac_address_t * gbp_route_domain_get_local_mac(void)
#define BIHASH_KVP_PER_PAGE
vl_api_wireguard_peer_flags_t flags
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)
#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)
struct gbp_endpoint_flush_ctx_t_ gbp_endpoint_flush_ctx_t
static int gbp_endpoint_walk_ip_itf(clib_bihash_kv_24_8_t *kvp, void *arg)
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.
add paths without path extensions
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 ip46_type_t ip46_address_get_type(const ip46_address_t *ip)
struct gbp_endpoint_loc_t_::@645 tun
Tunnel info for remote endpoints.
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 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.
static void ip46_address_reset(ip46_address_t *ip46)
gbp_endpoint_flags_t gel_flags
Endpoint flags.
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)
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)
fib_source_t fib_source_allocate(const char *name, fib_source_priority_t prio, fib_source_behaviour_t bh)
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_always_inline void ip46_address_copy(ip46_address_t *dst, const ip46_address_t *src)
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
#define FIB_SOURCE_PRIORITY_HI
Some priority values that plugins might use when they are not to concerned where in the list they'll ...
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 ip46_address_is_zero(const ip46_address_t *ip46)
static u8 * format_gbp_endpoint_key(u8 *s, va_list *args)
static fib_source_t gbp_fib_source_low
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)
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)
static u8 ip46_address_is_equal(const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
An Endpoint Group representation.
format_function_t format_ip46_address
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)
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 int gbp_endpoint_walk_mac_itf(clib_bihash_kv_16_8_t *kvp, void *arg)
static fib_source_t gbp_fib_source_hi
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)
sll srl srl sll sra u16x4 i
#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)
#define vec_search_with_function(v, E, fn)
Search a vector for the index of the entry that matches.
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)
vlib_main_t vlib_node_runtime_t * node
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)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
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)
static 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)
#define FIB_SOURCE_PRIORITY_LOW
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)
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)
vl_api_mac_event_action_t action
#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...
void ip_neighbor_advertise(vlib_main_t *vm, ip46_type_t type, const ip46_address_t *addr, u32 sw_if_index)
#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.
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)
static fib_node_type_t gbp_endpoint_fib_type
gbp_endpoint_loc_t * ge_locs
Location information provided by the various sources.
#define ip46_address_initializer
#define GBP_EP_HASH_MEMORY_SIZE
void gbp_endpoint_child_remove(index_t gei, u32 sibling)
vl_api_interface_index_t sw_if_index
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)