78 return (lt - lisp_gpe_tenant_pool);
111 u8 with_default_route)
153 clib_warning (
"No L3 interface for tenant VNI %d", vni);
229 clib_warning (
"No L2 interface for tenant VNI %d", vni);
320 .path =
"show gpe tenant",
321 .short_help =
"show gpe tenant",
void lisp_gpe_tenant_l2_iface_unlock(u32 vni)
Release the lock held on the tenant's L3 interface.
#define hash_set(h, key, value)
#define hash_unset(h, key)
u32 lisp_gpe_add_l2_iface(lisp_gpe_main_t *lgm, u32 vni, u32 bd_id)
Add/del LISP-GPE L2 interface.
u32 lt_table_id
The tenant can have both L2 and L3 services enabled.
void lisp_gpe_tenant_l3_iface_unlock(u32 vni)
Release the lock held on the tenant's L3 interface.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void lisp_gpe_tenant_delete_if_empty(lisp_gpe_tenant_t *lt)
If there are no more locks/users of te tenant, then delete it.
static lisp_gpe_tenant_t * lisp_gpe_tenant_pool
The pool of all tenants.
uword * lisp_gpe_tenant_db
The hash table of all tenants: key:{VNI}.
u32 lisp_gpe_tenant_find_or_create(u32 vni)
Find or create a tenant for the given VNI.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
void lisp_gpe_del_l3_iface(lisp_gpe_main_t *lgm, u32 vni, u32 table_id)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
static clib_error_t * lisp_gpe_tenant_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
CLI command to show LISP-GPE tenant.
u32 lisp_gpe_add_l3_iface(lisp_gpe_main_t *lgm, u32 vni, u32 table_id, u8 with_default_routes)
Add/del LISP-GPE L3 interface.
u32 lisp_gpe_tenant_l2_iface_add_or_lock(u32 vni, u32 bd_id)
Add/create and lock a new or find and lock the existing L2 interface for the tenant.
static lisp_gpe_tenant_t * lisp_gpe_tenant_find(u32 vni)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u32 lisp_gpe_tenant_l3_iface_add_or_lock(u32 vni, u32 table_id, u8 with_default_route)
Add/create and lock a new or find and lock the existing L3 interface for the tenant.
#define pool_put(P, E)
Free an object E in pool P.
u32 lt_l3_sw_if_index
The L3 SW interface index.
const lisp_gpe_tenant_t * lisp_gpe_tenant_get(u32 index)
get a const pointer to the tenant object
void lisp_gpe_tenant_flush(void)
Flush/delete ALL the tenants.
u32 lt_vni
The VNI is the identifier of the tenant.
#define clib_warning(format, args...)
void lisp_gpe_del_l2_iface(lisp_gpe_main_t *lgm, u32 vni, u32 bd_id)
Add/del LISP-GPE L2 interface.
static lisp_gpe_tenant_t * lisp_gpe_tenant_find_or_create_i(u32 vni)
static u8 * format_lisp_gpe_tenant(u8 *s, va_list *ap)
Show/display one tenant
#define VLIB_CLI_COMMAND(x,...)
u32 lt_l2_sw_if_index
The L2 SW interface index.
u32 lt_locks[LISP_GPE_TENANT_LOCK_NUM]
The number of locks on the tenant's L3 interface.
Representation of the data associated with a LISP overlay tenant.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)