FD.io VPP  v19.01.1-17-ge106252
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 <vnet/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 
77 extern const lisp_gpe_tenant_t *lisp_gpe_tenant_get (u32 index);
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
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.
lisp_gpe_tenant_lock_t_
Refernece counting lock types on the tenant.
u32 lt_table_id
The tenant can have both L2 and L3 services enabled.
struct lisp_gpe_tenant_t_ lisp_gpe_tenant_t
Representation of the data associated with a LISP overlay tenant.
unsigned char u8
Definition: types.h:56
void lisp_gpe_tenant_flush(void)
Flush/delete ALL the tenants.
unsigned int u32
Definition: types.h:88
u32 lisp_gpe_tenant_find_or_create(u32 vni)
Find or create a tenant for the given VNI.
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
u32 lt_vni
The VNI is the identifier of the tenant.
void lisp_gpe_tenant_l2_iface_unlock(u32 vni)
Release the lock held on the tenant&#39;s L3 interface.
u32 lt_l2_sw_if_index
The L2 SW interface index.
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.
u32 vni
Definition: vxlan_gbp.api:36
void lisp_gpe_tenant_l3_iface_unlock(u32 vni)
Release the lock held on the tenant&#39;s L3 interface.
u32 lt_locks[LISP_GPE_TENANT_LOCK_NUM]
The number of locks on the tenant&#39;s L3 interface.
Representation of the data associated with a LISP overlay tenant.
enum lisp_gpe_tenant_lock_t_ lisp_gpe_tenant_lock_t
Refernece counting lock types on the tenant.
LISP-GPE definitions.