FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
lisp_gpe_tenant.c File Reference
+ Include dependency graph for lisp_gpe_tenant.c:

Go to the source code of this file.

Functions

static lisp_gpe_tenant_tlisp_gpe_tenant_find (u32 vni)
 
static lisp_gpe_tenant_tlisp_gpe_tenant_find_or_create_i (u32 vni)
 
u32 lisp_gpe_tenant_find_or_create (u32 vni)
 Find or create a tenant for the given VNI. More...
 
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. More...
 
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. More...
 
void lisp_gpe_tenant_l3_iface_unlock (u32 vni)
 Release the lock held on the tenant's L3 interface. More...
 
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. More...
 
void lisp_gpe_tenant_l2_iface_unlock (u32 vni)
 Release the lock held on the tenant's L3 interface. More...
 
const lisp_gpe_tenant_tlisp_gpe_tenant_get (u32 index)
 get a const pointer to the tenant object More...
 
void lisp_gpe_tenant_flush (void)
 Flush/delete ALL the tenants. More...
 
static u8format_lisp_gpe_tenant (u8 *s, va_list *ap)
 Show/display one tenant. More...
 
static clib_error_tlisp_gpe_tenant_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 CLI command to show LISP-GPE tenant. More...
 

Variables

static lisp_gpe_tenant_tlisp_gpe_tenant_pool
 The pool of all tenants. More...
 
uwordlisp_gpe_tenant_db
 The hash table of all tenants: key:{VNI}. More...
 
vlib_cli_command_t lisp_gpe_tenant_command
 (constructor) VLIB_CLI_COMMAND (lisp_gpe_tenant_command) More...
 

Function Documentation

◆ format_lisp_gpe_tenant()

static u8* format_lisp_gpe_tenant ( u8 s,
va_list *  ap 
)
static

Show/display one tenant.

Definition at line 278 of file lisp_gpe_tenant.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lisp_gpe_tenant_delete_if_empty()

static void lisp_gpe_tenant_delete_if_empty ( lisp_gpe_tenant_t lt)
static

If there are no more locks/users of te tenant, then delete it.

Definition at line 85 of file lisp_gpe_tenant.c.

+ Here is the caller graph for this function:

◆ lisp_gpe_tenant_find()

static lisp_gpe_tenant_t* lisp_gpe_tenant_find ( u32  vni)
static

Definition at line 29 of file lisp_gpe_tenant.c.

+ Here is the caller graph for this function:

◆ lisp_gpe_tenant_find_or_create()

u32 lisp_gpe_tenant_find_or_create ( u32  vni)

Find or create a tenant for the given VNI.

Definition at line 67 of file lisp_gpe_tenant.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lisp_gpe_tenant_find_or_create_i()

static lisp_gpe_tenant_t* lisp_gpe_tenant_find_or_create_i ( u32  vni)
static

Definition at line 42 of file lisp_gpe_tenant.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lisp_gpe_tenant_flush()

void lisp_gpe_tenant_flush ( void  )

Flush/delete ALL the tenants.

Definition at line 261 of file lisp_gpe_tenant.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lisp_gpe_tenant_get()

const lisp_gpe_tenant_t* lisp_gpe_tenant_get ( u32  index)

get a const pointer to the tenant object

Definition at line 252 of file lisp_gpe_tenant.c.

◆ lisp_gpe_tenant_l2_iface_add_or_lock()

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.

vni The tenant's VNI

Parameters
table_idthe Tenant's L2 Bridge Domain ID.
Returns
the SW IF index of the L2 interface

Definition at line 182 of file lisp_gpe_tenant.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lisp_gpe_tenant_l2_iface_unlock()

void lisp_gpe_tenant_l2_iface_unlock ( u32  vni)

Release the lock held on the tenant's L3 interface.

Definition at line 215 of file lisp_gpe_tenant.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lisp_gpe_tenant_l3_iface_add_or_lock()

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.

vni The tenant's VNI

Parameters
table_idthe Tenant's L3 table ID.
with_default_routeInstall default route for the interface
Returns
the SW IF index of the L3 interface

Definition at line 110 of file lisp_gpe_tenant.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lisp_gpe_tenant_l3_iface_unlock()

void lisp_gpe_tenant_l3_iface_unlock ( u32  vni)

Release the lock held on the tenant's L3 interface.

Definition at line 139 of file lisp_gpe_tenant.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lisp_gpe_tenant_show()

static clib_error_t* lisp_gpe_tenant_show ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

CLI command to show LISP-GPE tenant.

Definition at line 303 of file lisp_gpe_tenant.c.

+ Here is the call graph for this function:

Variable Documentation

◆ lisp_gpe_tenant_command

vlib_cli_command_t lisp_gpe_tenant_command
Initial value:
= {
.path = "show gpe tenant",
.short_help = "show gpe tenant",
.function = lisp_gpe_tenant_show,
}
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.

(constructor) VLIB_CLI_COMMAND (lisp_gpe_tenant_command)

Definition at line 319 of file lisp_gpe_tenant.c.

◆ lisp_gpe_tenant_db

uword* lisp_gpe_tenant_db

The hash table of all tenants: key:{VNI}.

Definition at line 26 of file lisp_gpe_tenant.c.

◆ lisp_gpe_tenant_pool

lisp_gpe_tenant_t* lisp_gpe_tenant_pool
static

The pool of all tenants.

Definition at line 21 of file lisp_gpe_tenant.c.