FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
lisp_gpe_tenant.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef __LISP_GPE_TENANT_H__
17 #define __LISP_GPE_TENANT_H__
18 
19 #include <lisp/lisp-gpe/lisp_gpe.h>
20 
21 /**
22  * Refernece counting lock types on the tenant.
23  * When all of these counters drop to zero, we no longer need the tenant.
24  */
26 {
31 
32 /**
33  * @brief Representation of the data associated with a LISP overlay tenant
34  *
35  * This object exists to manage the shared resources of the L2 and L3 interface
36  * of a given tenant.
37  */
38 typedef struct lisp_gpe_tenant_t_
39 {
40  /**
41  * The VNI is the identifier of the tenant
42  */
44 
45  /**
46  * The tenant can have both L2 and L3 services enabled.
47  */
50 
51  /**
52  * The number of locks on the tenant's L3 interface.
53  */
55 
56  /**
57  * The L3 SW interface index
58  */
60 
61  /**
62  * The L2 SW interface index
63  */
65 
67 
69 
71  u8 with_default_route);
73 
76 
78 
79 extern void lisp_gpe_tenant_flush (void);
80 
81 /*
82  * fd.io coding-style-patch-verification: ON
83  *
84  * Local Variables:
85  * eval: (c-set-style "gnu")
86  * End:
87  */
88 
89 #endif
lisp_gpe_tenant_flush
void lisp_gpe_tenant_flush(void)
Flush/delete ALL the tenants.
Definition: lisp_gpe_tenant.c:261
lisp_gpe_tenant_lock_t
enum lisp_gpe_tenant_lock_t_ lisp_gpe_tenant_lock_t
Refernece counting lock types on the tenant.
lisp_gpe_tenant_t_::lt_table_id
u32 lt_table_id
The tenant can have both L2 and L3 services enabled.
Definition: lisp_gpe_tenant.h:48
lisp_gpe_tenant_t
struct lisp_gpe_tenant_t_ lisp_gpe_tenant_t
Representation of the data associated with a LISP overlay tenant.
LISP_GPE_TENANT_LOCK_L2_IFACE
@ LISP_GPE_TENANT_LOCK_L2_IFACE
Definition: lisp_gpe_tenant.h:27
vni
u32 vni
Definition: flow_types.api:160
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: lisp_gpe_tenant.c:215
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: lisp_gpe_tenant.c:139
lisp_gpe.h
LISP-GPE definitions.
lisp_gpe_tenant_get
const lisp_gpe_tenant_t * lisp_gpe_tenant_get(u32 index)
get a const pointer to the tenant object
Definition: lisp_gpe_tenant.c:252
LISP_GPE_TENANT_LOCK_NUM
@ LISP_GPE_TENANT_LOCK_NUM
Definition: lisp_gpe_tenant.h:29
lisp_gpe_tenant_t_::lt_vni
u32 lt_vni
The VNI is the identifier of the tenant.
Definition: lisp_gpe_tenant.h:43
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: lisp_gpe_tenant.c:67
lisp_gpe_tenant_t_::lt_bd_id
u32 lt_bd_id
Definition: lisp_gpe_tenant.h:49
lisp_gpe_tenant_t_::lt_l2_sw_if_index
u32 lt_l2_sw_if_index
The L2 SW interface index.
Definition: lisp_gpe_tenant.h:64
lisp_gpe_tenant_t_
Representation of the data associated with a LISP overlay tenant.
Definition: lisp_gpe_tenant.h:38
index
u32 index
Definition: flow_types.api:221
lisp_gpe_tenant_t_::lt_l3_sw_if_index
u32 lt_l3_sw_if_index
The L3 SW interface index.
Definition: lisp_gpe_tenant.h:59
u32
unsigned int u32
Definition: types.h:88
LISP_GPE_TENANT_LOCK_L3_IFACE
@ LISP_GPE_TENANT_LOCK_L3_IFACE
Definition: lisp_gpe_tenant.h:28
u8
unsigned char u8
Definition: types.h:56
lisp_gpe_tenant_lock_t_
lisp_gpe_tenant_lock_t_
Refernece counting lock types on the tenant.
Definition: lisp_gpe_tenant.h:25
lisp_gpe_tenant_l3_iface_add_or_lock
u32 lisp_gpe_tenant_l3_iface_add_or_lock(u32 vni, u32 vrf, u8 with_default_route)
Add/create and lock a new or find and lock the existing L3 interface for the tenant.
Definition: lisp_gpe_tenant.c:110
lisp_gpe_tenant_t_::lt_locks
u32 lt_locks[LISP_GPE_TENANT_LOCK_NUM]
The number of locks on the tenant's L3 interface.
Definition: lisp_gpe_tenant.h:54
lisp_gpe_tenant_l2_iface_add_or_lock
u32 lisp_gpe_tenant_l2_iface_add_or_lock(u32 vni, u32 vrf)
Add/create and lock a new or find and lock the existing L2 interface for the tenant.
Definition: lisp_gpe_tenant.c:182