|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __GBP_ENDPOINT_H__
17 #define __GBP_ENDPOINT_H__
51 #define GBP_ENDPOINT_ATTR_NAMES { \
52 [GBP_ENDPOINT_ATTR_BOUNCE] = "bounce", \
53 [GBP_ENDPOINT_ATTR_REMOTE] = "remote", \
54 [GBP_ENDPOINT_ATTR_LEARNT] = "learnt", \
55 [GBP_ENDPOINT_ATTR_EXTERNAL] = "external", \
66 #define foreach_gbp_endpoint_src \
68 _(CP, "control-plane") \
69 _(RR, "recursive-resolution")
73 #define _(v,s) GBP_ENDPOINT_SRC_##v,
78 #define GBP_ENDPOINT_SRC_MAX (GBP_ENDPOINT_SRC_RR+1)
230 const ip46_address_t *
ip,
235 const ip46_address_t * tun_src,
236 const ip46_address_t * tun_dst,
275 key->key[1] = bd_index;
298 key->key[0] =
ip->as_u64[0];
299 key->key[1] =
ip->as_u64[1];
300 key->key[2] = fib_index;
307 const ip46_address_t
a = {
333 key->key[0] =
ip->as_u64[0];
334 key->key[1] =
ip->as_u64[1];
335 key->key[2] = fib_index;
#define foreach_gbp_endpoint_src
Sources of Endpoints in priority order.
@ GBP_ENDPOINT_FLAG_LEARNT
enum gbp_endpoint_src_t_ gbp_endpoint_src_t
gbp_endpoint_fwd_t ge_fwd
int gbp_endpoint_is_remote(const gbp_endpoint_t *ge)
@ GBP_ENDPOINT_FLAG_REMOTE
sclass_t gef_sclass
Endpoint Group's sclass.
struct gbp_endpoint_fwd_t_ gbp_endpoint_fwd_t
And endpoints current forwarding state.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
clib_bihash_24_8_t ged_by_ip_rd
gbp_itf_hdl_t gel_itf
The interface on which the EP is connected.
struct gbp_endpoint_t_ gbp_endpoint_t
A Group Based Policy Endpoint.
index_t * ged_by_sw_if_index
static gbp_endpoint_t * gbp_endpoint_get(index_t gbpei)
Get the endpoint from a port/interface.
struct gbp_endpoint_key_t_ gbp_endpoint_key_t
This is the identity of an endpoint, as such it is information about an endpoint that is idempotent.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
u8 * format_gbp_endpoint_flags(u8 *s, va_list *args)
gbp_endpoint_flags_t gef_flags
And endpoints current forwarding state.
struct gbp_endpoint_loc_t_::@669 tun
Tunnel info for remote endpoints.
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
clib_bihash_16_8_t ged_by_mac_bd
void gbp_endpoint_scan(vlib_main_t *vm)
gbp_endpoint_src_t gel_src
The source providing this location information.
@ GBP_ENDPOINT_ATTR_REMOTE
enum gbp_endpoint_attr_t_ gbp_endpoint_attr_t
Flags for each endpoint.
gbp_endpoint_loc_t * ge_locs
Location information provided by the various sources.
enum gbp_endpoint_flags_t_ gbp_endpoint_flags_t
static_always_inline gbp_endpoint_t * gbp_endpoint_find_ip4(const ip4_address_t *ip, u32 fib_index)
@ GBP_ENDPOINT_ATTR_BOUNCE
u8 * format_gbp_endpoint_src(u8 *s, va_list *args)
static u64 ethernet_mac_address_u64(const u8 *a)
gbp_endpoint_attr_t_
Flags for each endpoint.
fib_prefix_t * gek_ips
A vector of ip addresses that belong to the endpoint.
static_always_inline gbp_endpoint_t * gbp_endpoint_find_mac(const u8 *mac, u32 bd_index)
gbp_endpoint_flags_t gel_flags
Endpoint flags.
Information about the location of the endpoint provided by a source of endpoints.
void gbp_endpoint_unlock(gbp_endpoint_src_t src, index_t gbpei)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define static_always_inline
gbp_endpoint_key_t ge_key
The key/ID of this EP.
u32 fib_node_index_t
A typedef of a node index.
@ GBP_ENDPOINT_FLAG_BOUNCE
gbp_endpoint_t * gbp_endpoint_pool
Pool of GBP endpoints.
int gbp_endpoint_is_learnt(const gbp_endpoint_t *ge)
u8 * format_gbp_endpoint(u8 *s, va_list *args)
u32 gbp_endpoint_child_add(index_t gei, fib_node_type_t type, fib_node_index_t index)
static_always_inline void gbp_endpoint_mk_key_ip6(const ip6_address_t *ip, u32 fib_index, clib_bihash_kv_24_8_t *key)
@ GBP_ENDPOINT_FLAG_EXTERNAL
@ GBP_ENDPOINT_ATTR_EXTERNAL
gbp_itf_hdl_t gef_itf
The interface on which the EP is connected.
u32 gel_locks
number of times this source has locked this
void gbp_endpoint_flush(gbp_endpoint_src_t src, u32 sw_if_index)
remove all learnt endpoints using the interface
index_t gel_epg
Endpoint Group.
struct gbp_endpoint_loc_t_ gbp_endpoint_loc_t
Information about the location of the endpoint provided by a source of endpoints.
This is the identity of an endpoint, as such it is information about an endpoint that is idempotent.
u32 gel_parent_sw_if_index
mac_address_t gek_mac
MAC address of the endpoint.
index_t gek_gbd
Index of the Bridge-Domain.
gbp_ep_db_t gbp_ep_db
DP functions and databases.
f64 ge_last_time
The last time a packet from seen from this end point.
static_always_inline gbp_endpoint_t * gbp_endpoint_find_ip6(const ip6_address_t *ip, u32 fib_index)
static_always_inline void gbp_endpoint_mk_key_mac(const u8 *mac, u32 bd_index, clib_bihash_kv_16_8_t *key)
An node in the FIB graph.
u32 gef_fib_index
FIB index the EP is in.
struct gbp_ep_by_ip_itf_db_t_ gbp_ep_db_t
GBP Endpoint Databases.
index_t * gef_adjs
The L3 adj, if created.
fib_node_t ge_node
A FIB node that allows the tracking of children.
static_always_inline void gbp_endpoint_mk_key_ip(const ip46_address_t *ip, u32 fib_index, clib_bihash_kv_24_8_t *key)
walk_rc_t(* gbp_endpoint_cb_t)(index_t gbpei, void *ctx)
int gbp_endpoint_is_external(const gbp_endpoint_t *ge)
int gbp_endpoint_is_local(const gbp_endpoint_t *ge)
@ GBP_ENDPOINT_ATTR_LEARNT
A Group Based Policy Endpoint.
static_always_inline void gbp_endpoint_mk_key_ip4(const ip4_address_t *ip, u32 fib_index, clib_bihash_kv_24_8_t *key)
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
vl_api_interface_index_t sw_if_index
static_always_inline gbp_endpoint_t * gbp_endpoint_find_itf(u32 sw_if_index)
enum walk_rc_t_ walk_rc_t
Walk return code.
Aggregate type for a prefix.
void gbp_endpoint_walk(gbp_endpoint_cb_t cb, void *ctx)
vl_api_fib_path_type_t type
int gbp_endpoint_update_and_lock(gbp_endpoint_src_t src, u32 sw_if_index, const ip46_address_t *ip, const mac_address_t *mac, index_t gbd, index_t grd, sclass_t sclass, gbp_endpoint_flags_t flags, const ip46_address_t *tun_src, const ip46_address_t *tun_dst, u32 *handle)
void gbp_endpoint_child_remove(index_t gei, u32 sibling)
index_t gek_grd
Index of the Route-Domain.
vl_api_wireguard_peer_flags_t flags
@ GBP_ENDPOINT_ATTR_FIRST