54 memset (&key, 0,
sizeof (key));
69 l3s->
key, l3s - lisp_gpe_sub_interface_pool);
117 u32 overlay_table_id,
u32 vni)
126 u32 main_sw_if_index, sub_sw_if_index;
137 .sup_sw_if_index = main_sw_if_index,
146 pool_get (lisp_gpe_sub_interface_pool, l3s);
147 memset (l3s, 0,
sizeof (*l3s));
149 memset (l3s->
key, 0, sizeof (*l3s->
key));
202 pool_put (lisp_gpe_sub_interface_pool, l3s);
251 .path =
"show gpe sub-interface",
252 .short_help =
"show gpe sub-interface",
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
vnet_main_t * vnet_get_main(void)
void lisp_gpe_tenant_l3_iface_unlock(u32 vni)
Release the lock held on the tenant's L3 interface.
u32 locks
A reference counting lock on the number of users of this interface.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static clib_error_t * lisp_gpe_sub_interface_module_init(vlib_main_t *vm)
#define hash_set_mem(h, key, value)
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
u32 * fib_index_by_sw_if_index
Table index indexed by software interface.
static void lisp_gpe_sub_interface_db_remove(const lisp_gpe_sub_interface_t *l3s)
void ip_address_copy(ip_address_t *dst, const ip_address_t *src)
lisp_gpe_sub_interface_t * lisp_gpe_sub_interface_get_i(index_t l3si)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
static void lisp_gpe_sub_interface_unset_table(u32 sw_if_index, u32 table_id)
ip_address_t local_rloc
The local-RLOC.
u32 main_sw_if_index
The SW IF index assigned to the main interface of which this is a sub.
static void lisp_gpe_sub_interface_db_insert(const lisp_gpe_sub_interface_t *l3s)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
#define VLIB_INIT_FUNCTION(x)
static lisp_gpe_sub_interface_t * lisp_gpe_sub_interface_pool
Pool of all l3-sub-interfaces.
const lisp_gpe_sub_interface_t * lisp_gpe_sub_interface_get(index_t l3si)
u32 sw_if_index
The SW if index assigned to this sub-interface.
#define hash_create_mem(elts, key_bytes, value_bytes)
format_function_t format_vnet_sw_interface_name
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static void lisp_gpe_sub_interface_set_table(u32 sw_if_index, u32 table_id)
#define hash_unset_mem(h, key)
void ip4_sw_interface_enable_disable(u32 sw_if_index, u32 is_enable)
A Key for lookup in the L£ sub-interface DB.
#define pool_put(P, E)
Free an object E in pool P.
lisp_gpe_sub_interface_key_t * key
The interface's key inthe DB; rloc & vni; The key is allocated from the heap so it can be used in the...
uword * lisp_gpe_sub_interfaces_sw_if_index
A DB of all VNET L3 sub-interfaces.
u32 eid_table_id
The Table-ID in the overlay that this interface is bound to.
int vnet_delete_sub_interface(u32 sw_if_index)
u32 fib_node_index_t
A typedef of a node index.
void lisp_gpe_sub_interface_unlock(index_t l3si)
#define VLIB_CLI_COMMAND(x,...)
#define VNET_SW_INTERFACE_FLAG_ADMIN_UP
u8 * format_ip_address(u8 *s, va_list *args)
static uword * lisp_gpe_sub_interfaces
A DB of all LISP L3 sub-interfaces.
static clib_error_t * lisp_gpe_sub_interface_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
CLI command to show LISP-GPE interfaces.
static void clib_mem_free(void *p)
u32 fib_table_find_or_create_and_lock(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
static void * clib_mem_alloc(uword size)
index_t lisp_gpe_sub_interface_find_or_create_and_lock(const ip_address_t *lrloc, u32 overlay_table_id, u32 vni)
#define FIB_NODE_INDEX_INVALID
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
u8 * format_lisp_gpe_sub_interface(u8 *s, va_list ap)
#define hash_get_mem(h, key)
vnet_sw_interface_type_t type
ip4_main_t ip4_main
Global ip4 main structure.
static index_t lisp_gpe_sub_interface_db_find(const ip_address_t *lrloc, u32 vni)
clib_error_t * vnet_sw_interface_set_flags(vnet_main_t *vnm, u32 sw_if_index, u32 flags)
clib_error_t * vnet_create_sw_interface(vnet_main_t *vnm, vnet_sw_interface_t *template, u32 *sw_if_index)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
u32 * fib_index_by_sw_if_index
u32 lisp_gpe_tenant_l3_iface_add_or_lock(u32 vni, u32 table_id)
Add/create and lock a new or find and lock the existing L3 interface for the tenant.
void ip6_sw_interface_enable_disable(u32 sw_if_index, u32 is_enable)
static u32 lisp_gpe_sub_interface_id
The next available sub-interface ID.