FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
gbp_ext_itf.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 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 __GBP_EXT_ITF_H__
17 #define __GBP_EXT_ITF_H__
18 
19 #include <gbp/gbp.h>
20 
21 enum
22 {
25 };
26 
27 /**
28  * An external interface maps directly to an oflex L3ExternalInterface.
29  * The special characteristics of an external interface is the way the source
30  * EPG is determined for input packets which, like a recirc interface, is via
31  * a LPM.
32  */
33 typedef struct gpb_ext_itf_t_
34 {
35  /**
36  * The interface
37  */
39 
40  /**
41  * The BD this external interface is a member of
42  */
44 
45  /**
46  * The RD this external interface is a member of
47  */
49 
50  /**
51  * cached FIB indices from the RD
52  */
54 
55  /**
56  * The associated flags
57  */
59 
61 
62 
65 
66 extern u8 *format_gbp_ext_itf (u8 * s, va_list * args);
67 
68 typedef walk_rc_t (*gbp_ext_itf_cb_t) (gbp_ext_itf_t * gbpe, void *ctx);
69 extern void gbp_ext_itf_walk (gbp_ext_itf_cb_t bgpe, void *ctx);
70 
71 
72 /**
73  * Exposed types for the data-plane
74  */
76 extern index_t *gbp_ext_itf_db;
77 
80 {
82 }
83 
84 #endif
85 
86 /*
87  * fd.io coding-style-patch-verification: ON
88  *
89  * Local Variables:
90  * eval: (c-set-style "gnu")
91  * End:
92  */
gpb_ext_itf_t_::gx_fib_index
u32 gx_fib_index[DPO_PROTO_NUM]
cached FIB indices from the RD
Definition: gbp_ext_itf.h:53
gbp_ext_itf_pool
gbp_ext_itf_t * gbp_ext_itf_pool
Exposed types for the data-plane.
Definition: gbp_ext_itf.c:24
pool_elt_at_index
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:553
gbp_itf_hdl_t_
Definition: gbp_itf.h:45
gbp.h
gbp_ext_itf_add
int gbp_ext_itf_add(u32 sw_if_index, u32 bd_id, u32 rd_id, u32 flags)
Definition: gbp_ext_itf.c:53
gpb_ext_itf_t_::gx_flags
u32 gx_flags
The associated flags.
Definition: gbp_ext_itf.h:58
gbp_ext_itf_cb_t
walk_rc_t(* gbp_ext_itf_cb_t)(gbp_ext_itf_t *gbpe, void *ctx)
Definition: gbp_ext_itf.h:68
gbp_ext_itf_t
struct gpb_ext_itf_t_ gbp_ext_itf_t
An external interface maps directly to an oflex L3ExternalInterface.
format_gbp_ext_itf
u8 * format_gbp_ext_itf(u8 *s, va_list *args)
Definition: gbp_ext_itf.c:42
bd_id
u32 bd_id
Definition: gbp.api:188
GBP_EXT_ITF_F_NONE
@ GBP_EXT_ITF_F_NONE
Definition: gbp_ext_itf.h:23
index_t
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
Definition: dpo.h:43
gpb_ext_itf_t_::gx_rd
index_t gx_rd
The RD this external interface is a member of.
Definition: gbp_ext_itf.h:48
gbp_ext_itf_get
static gbp_ext_itf_t * gbp_ext_itf_get(u32 sw_if_index)
Definition: gbp_ext_itf.h:79
rd_id
u32 rd_id
Definition: gbp.api:35
always_inline
#define always_inline
Definition: rdma_mlx5dv.h:23
gpb_ext_itf_t_::gx_bd
index_t gx_bd
The BD this external interface is a member of.
Definition: gbp_ext_itf.h:43
u32
unsigned int u32
Definition: types.h:88
gbp_ext_itf_walk
void gbp_ext_itf_walk(gbp_ext_itf_cb_t bgpe, void *ctx)
Definition: gbp_ext_itf.c:231
ctx
long ctx[MAX_CONNS]
Definition: main.c:144
GBP_EXT_ITF_F_ANON
@ GBP_EXT_ITF_F_ANON
Definition: gbp_ext_itf.h:24
u8
unsigned char u8
Definition: types.h:56
gbp_ext_itf_db
index_t * gbp_ext_itf_db
external interface configs keyed by sw_if_index
Definition: gbp_ext_itf.c:29
gpb_ext_itf_t_::gx_itf
gbp_itf_hdl_t gx_itf
The interface.
Definition: gbp_ext_itf.h:38
gpb_ext_itf_t_
An external interface maps directly to an oflex L3ExternalInterface.
Definition: gbp_ext_itf.h:33
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
walk_rc_t
enum walk_rc_t_ walk_rc_t
Walk return code.
DPO_PROTO_NUM
#define DPO_PROTO_NUM
Definition: dpo.h:72
gbp_ext_itf_delete
int gbp_ext_itf_delete(u32 sw_if_index)
Definition: gbp_ext_itf.c:122
flags
vl_api_wireguard_peer_flags_t flags
Definition: wireguard.api:105