FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
gbp_bridge_domain.c
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 
19 #include <plugins/gbp/gbp_learn.h>
20 #include <plugins/gbp/gbp_itf.h>
21 
22 #include <vnet/dpo/dvr_dpo.h>
23 #include <vnet/fib/fib_table.h>
24 #include <vnet/l2/l2_input.h>
25 #include <vnet/l2/feat_bitmap.h>
26 #include <vnet/l2/l2_bvi.h>
27 #include <vnet/l2/l2_fib.h>
28 
29 /**
30  * Pool of GBP bridge_domains
31  */
33 
34 /**
35  * DB of bridge_domains
36  */
38 
39 /**
40  * Map of BD index to contract scope
41  */
43 
44 /**
45  * logger
46  */
48 
49 #define GBP_BD_DBG(...) \
50  vlib_log_debug (gb_logger, __VA_ARGS__);
51 
52 index_t
54 {
55  return (gbd - gbp_bridge_domain_pool);
56 }
57 
58 static void
60 {
62 
63  gb = gbp_bridge_domain_get (i);
64  gb->gb_locks++;
65 }
66 
67 u32
69 {
71 
72  gb = gbp_bridge_domain_get (gbdi);
73 
74  return (gb->gb_bd_id);
75 }
76 
77 static index_t
79 {
80  uword *p;
81 
83 
84  if (NULL != p)
85  return p[0];
86 
87  return (INDEX_INVALID);
88 }
89 
90 index_t
92 {
93  uword *p;
94 
96 
97  if (NULL != p)
98  {
100  return p[0];
101  }
102  return (INDEX_INVALID);
103 }
104 
105 static void
107 {
108  index_t gbi = gb - gbp_bridge_domain_pool;
109 
114 }
115 
116 static void
118 {
121 }
122 
123 u8 *
124 format_gbp_bridge_domain_flags (u8 * s, va_list * args)
125 {
127 
128  if (gf)
129  {
130  if (gf & GBP_BD_FLAG_DO_NOT_LEARN)
131  s = format (s, "do-not-learn ");
132  if (gf & GBP_BD_FLAG_UU_FWD_DROP)
133  s = format (s, "uu-fwd-drop ");
134  if (gf & GBP_BD_FLAG_MCAST_DROP)
135  s = format (s, "mcast-drop ");
136  if (gf & GBP_BD_FLAG_UCAST_ARP)
137  s = format (s, "ucast-arp ");
138  }
139  else
140  {
141  s = format (s, "none");
142  }
143  return (s);
144 }
145 
146 static u8 *
147 format_gbp_bridge_domain_ptr (u8 * s, va_list * args)
148 {
149  gbp_bridge_domain_t *gb = va_arg (*args, gbp_bridge_domain_t *);
150  vnet_main_t *vnm = vnet_get_main ();
151 
152  if (NULL != gb)
153  s =
154  format (s,
155  "[%d] bd:[%d,%d], bvi:%U uu-flood:%U bm-flood:%U flags:%U locks:%d",
161  else
162  s = format (s, "NULL");
163 
164  return (s);
165 }
166 
167 u8 *
168 format_gbp_bridge_domain (u8 * s, va_list * args)
169 {
170  index_t gbi = va_arg (*args, index_t);
171 
172  s =
174  gbp_bridge_domain_get (gbi));
175 
176  return (s);
177 }
178 
179 int
181  u32 rd_id,
186 {
188  index_t gbi;
189 
191 
192  if (INDEX_INVALID == gbi)
193  {
194  gbp_route_domain_t *gr;
195  u32 bd_index;
196 
197  bd_index = bd_find_index (&bd_main, bd_id);
198 
199  if (~0 == bd_index)
200  return (VNET_API_ERROR_BD_NOT_MODIFIABLE);
201 
206  bd_flags |= L2_FLOOD;
207 
209  memset (gb, 0, sizeof (*gb));
210 
211  gbi = gb - gbp_bridge_domain_pool;
212  gb->gb_bd_id = bd_id;
213  gb->gb_bd_index = bd_index;
217  gb->gb_locks = 1;
218  gb->gb_flags = flags;
220 
221  /*
222  * set the scope from the BD's RD's scope
223  */
224  gr = gbp_route_domain_get (gb->gb_rdi);
227 
228  /*
229  * Set the BVI and uu-flood interfaces into the BD
230  */
233 
234  if ((!(flags & GBP_BD_FLAG_UU_FWD_DROP) ||
236  ~0 != gb->gb_uu_fwd_sw_if_index)
239 
241  {
242  gb->gb_bm_flood_itf =
245  L2INPUT_FEAT_GBP_LEARN);
246  }
247 
248  /*
249  * unset any flag(s) set above
250  */
251  bd_set_flags (vlib_get_main (), bd_index, bd_flags, 0);
252 
254  {
256  bd_set_flags (vlib_get_main (), bd_index, bd_flags, 1);
257  }
258 
259  /*
260  * Add the BVI's MAC to the L2FIB
261  */
265  (L2FIB_ENTRY_RESULT_FLAG_STATIC |
266  L2FIB_ENTRY_RESULT_FLAG_BVI));
267 
269  }
270  else
271  {
272  gb = gbp_bridge_domain_get (gbi);
273  gb->gb_locks++;
274  }
275 
276  GBP_BD_DBG ("add: %U", format_gbp_bridge_domain_ptr, gb);
277 
278  return (0);
279 }
280 
281 void
284 {
286 
287  gb = gbp_bridge_domain_get (gbdi);
288 
290  sw_if_index, gb->gb_bd_index, type, 0, 0);
291  /*
292  * adding an interface to the bridge enables learning on the
293  * interface. Disable learning on the interface by default for gbp
294  * interfaces
295  */
296  l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_LEARN, 0);
297 }
298 
299 void
302 {
304 
305  gb = gbp_bridge_domain_get (gbdi);
306 
308  gb->gb_bd_index, type, 0, 0);
309 }
310 
311 void
313 {
315 
316  gb = gbp_bridge_domain_get (gbdi);
317 
318  gb->gb_locks--;
319 
320  if (0 == gb->gb_locks)
321  {
322  GBP_BD_DBG ("destroy: %U", format_gbp_bridge_domain_ptr, gb);
323 
327 
330  if (~0 != gb->gb_uu_fwd_sw_if_index)
334 
337 
339  }
340 }
341 
342 int
344 {
345  index_t gbi;
346 
347  GBP_BD_DBG ("del: %d", bd_id);
349 
350  if (INDEX_INVALID != gbi)
351  {
352  GBP_BD_DBG ("del: %U", format_gbp_bridge_domain, gbi);
354 
355  return (0);
356  }
357 
358  return (VNET_API_ERROR_NO_SUCH_ENTRY);
359 }
360 
361 void
363 {
364  gbp_bridge_domain_t *gbpe;
365 
366  /* *INDENT-OFF* */
368  {
369  if (!cb(gbpe, ctx))
370  break;
371  }
372  /* *INDENT-ON* */
373 }
374 
375 static clib_error_t *
377  unformat_input_t * input, vlib_cli_command_t * cmd)
378 {
379  vnet_main_t *vnm = vnet_get_main ();
382  u32 uu_fwd_sw_if_index = ~0;
383  u32 bd_id = ~0, rd_id = ~0;
384  u32 bvi_sw_if_index = ~0;
385  u8 add = 1;
386 
388 
390  {
391  if (unformat (input, "bvi %U", unformat_vnet_sw_interface,
392  vnm, &bvi_sw_if_index))
393  ;
394  else if (unformat (input, "uu-fwd %U", unformat_vnet_sw_interface,
395  vnm, &uu_fwd_sw_if_index))
396  ;
397  else if (unformat (input, "bm-flood %U", unformat_vnet_sw_interface,
398  vnm, &bm_flood_sw_if_index))
399  ;
400  else if (unformat (input, "add"))
401  add = 1;
402  else if (unformat (input, "del"))
403  add = 0;
404  else if (unformat (input, "flags %d", &flags))
405  ;
406  else if (unformat (input, "bd %d", &bd_id))
407  ;
408  else if (unformat (input, "rd %d", &rd_id))
409  ;
410  else
411  break;
412  }
413 
414  if (~0 == bd_id)
415  return clib_error_return (0, "BD-ID must be specified");
416  if (~0 == rd_id)
417  return clib_error_return (0, "RD-ID must be specified");
418 
419  if (add)
420  {
421  if (~0 == bvi_sw_if_index)
422  return clib_error_return (0, "interface must be specified");
423 
425  flags,
429  }
430  else
432 
433  return (NULL);
434 }
435 
436 /*?
437  * Configure a GBP bridge-domain
438  *
439  * @cliexpar
440  * @cliexstart{gbp bridge-domain [del] bd <ID> bvi <interface> [uu-fwd <interface>] [bm-flood <interface>] [flags <flags>]}
441  * @cliexend
442  ?*/
443 /* *INDENT-OFF* */
445  .path = "gbp bridge-domain",
446  .short_help = "gbp bridge-domain [del] bd <ID> bvi <interface> [uu-fwd <interface>] [bm-flood <interface>] [flags <flags>]",
447  .function = gbp_bridge_domain_cli,
448 };
449 
450 static int
452 {
453  vlib_main_t *vm;
454 
455  vm = ctx;
457 
458  return (1);
459 }
460 
461 static clib_error_t *
463  unformat_input_t * input, vlib_cli_command_t * cmd)
464 {
465  vlib_cli_output (vm, "Bridge-Domains:");
467 
468  return (NULL);
469 }
470 
471 
472 /*?
473  * Show Group Based Policy Bridge_Domains and derived information
474  *
475  * @cliexpar
476  * @cliexstart{show gbp bridge_domain}
477  * @cliexend
478  ?*/
479 /* *INDENT-OFF* */
481  .path = "show gbp bridge-domain",
482  .short_help = "show gbp bridge-domain\n",
483  .function = gbp_bridge_domain_show,
484 };
485 /* *INDENT-ON* */
486 
487 static clib_error_t *
489 {
490  gb_logger = vlib_log_register_class ("gbp", "bd");
491 
492  return (NULL);
493 }
494 
496 
497 /*
498  * fd.io coding-style-patch-verification: ON
499  *
500  * Local Variables:
501  * eval: (c-set-style "gnu")
502  * End:
503  */
gbp_learn.h
gbp_itf_l2_set_input_feature
void gbp_itf_l2_set_input_feature(gbp_itf_hdl_t gh, l2input_feat_masks_t feats)
Definition: gbp_itf.c:384
GBP_BD_FLAG_DO_NOT_LEARN
@ GBP_BD_FLAG_DO_NOT_LEARN
Definition: gbp_bridge_domain.h:31
gbp_bridge_domain_get_bd_id
u32 gbp_bridge_domain_get_bd_id(index_t gbdi)
Definition: gbp_bridge_domain.c:68
gbp_bridge_domain_show_one
static int gbp_bridge_domain_show_one(gbp_bridge_domain_t *gb, void *ctx)
Definition: gbp_bridge_domain.c:451
gbp_bridge_domain_show
static clib_error_t * gbp_bridge_domain_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: gbp_bridge_domain.c:462
gbp_bridge_domain_t_::gb_bd_index
u32 gb_bd_index
Definition: gbp_bridge_domain.h:48
gbp_scope_by_bd_index
gbp_scope_t * gbp_scope_by_bd_index
Map of BD index to contract scope.
Definition: gbp_bridge_domain.c:42
gbp_bridge_domain_cb_t
int(* gbp_bridge_domain_cb_t)(gbp_bridge_domain_t *gb, void *ctx)
Definition: gbp_bridge_domain.h:109
gbp_bridge_domain_t_::gb_rdi
u32 gb_rdi
Index of the Route-domain this BD is associated with.
Definition: gbp_bridge_domain.h:54
gbp_bridge_domain_itf_del
void gbp_bridge_domain_itf_del(index_t gbdi, u32 sw_if_index, l2_bd_port_type_t type)
Definition: gbp_bridge_domain.c:300
gb_logger
vlib_log_class_t gb_logger
logger
Definition: gbp_bridge_domain.c:47
vlib_log_class_t
u32 vlib_log_class_t
Definition: vlib.h:52
gbp_bridge_domain_pool
gbp_bridge_domain_t * gbp_bridge_domain_pool
Pool of GBP bridge_domains.
Definition: gbp_bridge_domain.c:32
vlib_log_register_class
vlib_log_class_t vlib_log_register_class(char *class, char *subclass)
Definition: log.c:339
gbp_bridge_domain_cli
static clib_error_t * gbp_bridge_domain_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: gbp_bridge_domain.c:376
clib_error_return
#define clib_error_return(e, args...)
Definition: error.h:99
gbp_bridge_domain_show_node
static vlib_cli_command_t gbp_bridge_domain_show_node
(constructor) VLIB_CLI_COMMAND (gbp_bridge_domain_show_node)
Definition: gbp_bridge_domain.c:480
vlib_cli_command_t::path
char * path
Definition: cli.h:96
dvr_dpo.h
L2_FLOOD
@ L2_FLOOD
Definition: l2_bd.h:158
fib_table.h
format_gbp_bridge_domain
u8 * format_gbp_bridge_domain(u8 *s, va_list *args)
Definition: gbp_bridge_domain.c:168
pool_put
#define pool_put(P, E)
Free an object E in pool P.
Definition: pool.h:305
gpb_route_domain_t_
A route Domain Representation.
Definition: gbp_route_domain.h:29
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
gbp_bridge_domain_find
static index_t gbp_bridge_domain_find(u32 bd_id)
Definition: gbp_bridge_domain.c:78
gbp_bridge_domain_get
static gbp_bridge_domain_t * gbp_bridge_domain_get(index_t i)
Definition: gbp_bridge_domain.h:128
unformat_input_t
struct _unformat_input_t unformat_input_t
gbp_bridge_domain_t_::gb_bd_id
u32 gb_bd_id
Bridge-domain ID.
Definition: gbp_bridge_domain.h:47
gbp_bridge_domain_t_::gb_bvi_sw_if_index
u32 gb_bvi_sw_if_index
The BD's BVI interface (obligatory)
Definition: gbp_bridge_domain.h:64
bvi_sw_if_index
vl_api_interface_index_t bvi_sw_if_index
Definition: gbp.api:37
L2_BD_PORT_TYPE_UU_FWD
@ L2_BD_PORT_TYPE_UU_FWD
Definition: l2_bd.h:30
gbp_bridge_domain_walk
void gbp_bridge_domain_walk(gbp_bridge_domain_cb_t cb, void *ctx)
Definition: gbp_bridge_domain.c:362
l2fib_add_entry
void l2fib_add_entry(const u8 *mac, u32 bd_index, u32 sw_if_index, l2fib_entry_result_flags_t flags)
Add an entry to the l2fib.
Definition: l2_fib.c:445
l2_fib.h
bm_flood_sw_if_index
vl_api_interface_index_t bm_flood_sw_if_index
Definition: gbp.api:39
gbp_bridge_domain_lock
static void gbp_bridge_domain_lock(index_t i)
Definition: gbp_bridge_domain.c:59
gbp_bridge_domain_t_::gb_locks
u32 gb_locks
locks/references to the BD so it does not get deleted (from the API) whilst it is still being used
Definition: gbp_bridge_domain.h:86
MODE_L2_BRIDGE
#define MODE_L2_BRIDGE
Definition: l2_input.h:283
unformat
uword unformat(unformat_input_t *i, const char *fmt,...)
Definition: unformat.c:978
hash_set
#define hash_set(h, key, value)
Definition: hash.h:255
pool_foreach
#define pool_foreach(VAR, POOL)
Iterate through pool.
Definition: pool.h:534
gbp_itf_hdl_reset
void gbp_itf_hdl_reset(gbp_itf_hdl_t *gh)
Definition: gbp_itf.c:110
bd_id
u32 bd_id
Definition: gbp.api:188
GBP_BD_FLAG_UCAST_ARP
@ GBP_BD_FLAG_UCAST_ARP
Definition: gbp_bridge_domain.h:34
vnet_get_main
vnet_main_t * vnet_get_main(void)
Definition: pnat_test_stubs.h:56
unformat_check_input
static uword unformat_check_input(unformat_input_t *i)
Definition: format.h:163
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
l2_bvi.h
MODE_L3
#define MODE_L3
Definition: l2_input.h:282
uword
u64 uword
Definition: types.h:112
hash_get
#define hash_get(h, key)
Definition: hash.h:249
vnet_sw_interface_get_hw_address
static const u8 * vnet_sw_interface_get_hw_address(vnet_main_t *vnm, u32 sw_if_index)
Definition: interface_funcs.h:292
l2input_intf_bitmap_enable
u32 l2input_intf_bitmap_enable(u32 sw_if_index, l2input_feat_masks_t feature_bitmap, u32 enable)
Enable (or disable) the feature in the bitmap for the given interface.
Definition: l2_input.c:177
L2_ARP_UFWD
@ L2_ARP_UFWD
Definition: l2_bd.h:161
format_gbp_itf_hdl
u8 * format_gbp_itf_hdl(u8 *s, va_list *args)
Definition: gbp_itf.c:522
i
sll srl srl sll sra u16x4 i
Definition: vector_sse42.h:261
gbp_itf.h
gbp_bridge_domain_db_t
DB of bridge_domains.
Definition: gbp_bridge_domain.h:118
pool_get
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
Definition: pool.h:255
vec_validate
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
Definition: vec.h:523
VLIB_CLI_COMMAND
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:163
bd_set_flags
u32 bd_set_flags(vlib_main_t *vm, u32 bd_index, bd_flags_t flags, u32 enable)
Set the learn/forward/flood flags for the bridge domain.
Definition: l2_bd.c:294
gbp_bridge_domain_init
static clib_error_t * gbp_bridge_domain_init(vlib_main_t *vm)
Definition: gbp_bridge_domain.c:488
gbp_bridge_domain_t_::gb_bm_flood_itf
gbp_itf_hdl_t gb_bm_flood_itf
The BD's interface to sned Broadcast and multicast packets.
Definition: gbp_bridge_domain.h:74
gbp_bridge_domain.h
vlib_cli_output
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition: cli.c:716
gbp_bridge_domain_itf_add
void gbp_bridge_domain_itf_add(index_t gbdi, u32 sw_if_index, l2_bd_port_type_t type)
Definition: gbp_bridge_domain.c:282
bd_flags_t
enum bd_flags_t_ bd_flags_t
l2_input.h
set_int_l2_mode
u32 set_int_l2_mode(vlib_main_t *vm, vnet_main_t *vnet_main, u32 mode, u32 sw_if_index, u32 bd_index, l2_bd_port_type_t port_type, u32 shg, u32 xc_sw_if_index)
Set the subinterface to run in l2 or l3 mode.
Definition: l2_input.c:256
vnet_main_t
Definition: vnet.h:76
GBP_BD_DBG
#define GBP_BD_DBG(...)
Definition: gbp_bridge_domain.c:49
gbp_bridge_domain_add_and_lock
int gbp_bridge_domain_add_and_lock(u32 bd_id, u32 rd_id, gbp_bridge_domain_flags_t flags, u32 bvi_sw_if_index, u32 uu_fwd_sw_if_index, u32 bm_flood_sw_if_index)
Definition: gbp_bridge_domain.c:180
rd_id
u32 rd_id
Definition: gbp.api:35
L2_UU_FLOOD
@ L2_UU_FLOOD
Definition: l2_bd.h:159
bd_find_index
u32 bd_find_index(bd_main_t *bdm, u32 bd_id)
Get a bridge domain.
Definition: l2_bd.c:70
format_vnet_sw_if_index_name
format_function_t format_vnet_sw_if_index_name
Definition: interface_funcs.h:455
unformat_vnet_sw_interface
unformat_function_t unformat_vnet_sw_interface
Definition: interface_funcs.h:459
format
description fragment has unexpected format
Definition: map.api:433
vec_validate_init_empty
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header,...
Definition: vec.h:570
u32
unsigned int u32
Definition: types.h:88
VLIB_INIT_FUNCTION
#define VLIB_INIT_FUNCTION(x)
Definition: init.h:172
l2fib_del_entry
u32 l2fib_del_entry(const u8 *mac, u32 bd_index, u32 sw_if_index)
Delete an entry from the l2fib.
Definition: l2_fib.c:746
ctx
long ctx[MAX_CONNS]
Definition: main.c:144
GBP_BD_FLAG_MCAST_DROP
@ GBP_BD_FLAG_MCAST_DROP
Definition: gbp_bridge_domain.h:33
gpb_route_domain_t_::grd_scope
gbp_scope_t grd_scope
Definition: gbp_route_domain.h:35
gbp_bridge_domain_db
gbp_bridge_domain_db_t gbp_bridge_domain_db
DB of bridge_domains.
Definition: gbp_bridge_domain.c:37
format_gbp_bridge_domain_flags
u8 * format_gbp_bridge_domain_flags(u8 *s, va_list *args)
Definition: gbp_bridge_domain.c:124
gbp_itf_l2_add_and_lock
gbp_itf_hdl_t gbp_itf_l2_add_and_lock(u32 sw_if_index, index_t gbi)
Definition: gbp_itf.c:198
format_gbp_bridge_domain_ptr
static u8 * format_gbp_bridge_domain_ptr(u8 *s, va_list *args)
Definition: gbp_bridge_domain.c:147
gbp_route_domain_get
gbp_route_domain_t * gbp_route_domain_get(index_t i)
Definition: gbp_route_domain.c:72
GBP_BD_FLAG_UU_FWD_DROP
@ GBP_BD_FLAG_UU_FWD_DROP
Definition: gbp_bridge_domain.h:32
gbp_bridge_domain_find_and_lock
index_t gbp_bridge_domain_find_and_lock(u32 bd_id)
Definition: gbp_bridge_domain.c:91
gbp_bridge_domain_t_
A bridge Domain Representation.
Definition: gbp_bridge_domain.h:42
gbp_route_domain_find_and_lock
index_t gbp_route_domain_find_and_lock(u32 rd_id)
Definition: gbp_route_domain.c:100
gbp_endpoint.h
gbp_bridge_domain_db_t::gbd_by_bd_id
uword * gbd_by_bd_id
Definition: gbp_bridge_domain.h:120
hash_unset
#define hash_unset(h, key)
Definition: hash.h:261
vlib_main_t
Definition: main.h:102
bd_main
bd_main_t bd_main
Definition: l2_bd.c:44
gbp_bridge_domain_t_::gb_uu_fwd_sw_if_index
u32 gb_uu_fwd_sw_if_index
The BD's MAC spine-proxy interface (optional)
Definition: gbp_bridge_domain.h:69
vlib_get_main
static vlib_main_t * vlib_get_main(void)
Definition: global_funcs.h:38
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
feat_bitmap.h
vlib_init_function_t
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
Definition: init.h:51
gbp_bridge_domain_delete
int gbp_bridge_domain_delete(u32 bd_id)
Definition: gbp_bridge_domain.c:343
gbp_bridge_domain_cli_node
static vlib_cli_command_t gbp_bridge_domain_cli_node
(constructor) VLIB_CLI_COMMAND (gbp_bridge_domain_cli_node)
Definition: gbp_bridge_domain.c:444
GBP_BD_FLAG_NONE
@ GBP_BD_FLAG_NONE
Definition: gbp_bridge_domain.h:30
gbp_bridge_domain_flags_t
enum gbp_bridge_domain_flags_t_ gbp_bridge_domain_flags_t
Bridge Domain Flags.
l2_bd_port_type_t
enum l2_bd_port_type_t_ l2_bd_port_type_t
bd_flags
bd_flags
Flags that can be changed on a bridge domain.
Definition: l2.api:394
gbp_route_domain.h
gbp_bridge_domain_index
index_t gbp_bridge_domain_index(const gbp_bridge_domain_t *gbd)
Definition: gbp_bridge_domain.c:53
gbp_bridge_domain_db_add
static void gbp_bridge_domain_db_add(gbp_bridge_domain_t *gb)
Definition: gbp_bridge_domain.c:106
gbp_bridge_domain_db_remove
static void gbp_bridge_domain_db_remove(gbp_bridge_domain_t *gb)
Definition: gbp_bridge_domain.c:117
vlib_cli_command_t
Definition: cli.h:92
L2_NONE
@ L2_NONE
Definition: l2_bd.h:155
INDEX_INVALID
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
Definition: dpo.h:49
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
uu_fwd_sw_if_index
vl_api_interface_index_t uu_fwd_sw_if_index
Definition: gbp.api:38
L2_BD_PORT_TYPE_BVI
@ L2_BD_PORT_TYPE_BVI
Definition: l2_bd.h:29
gbp_bridge_domain_t_::gb_flags
gbp_bridge_domain_flags_t gb_flags
Flags conttrolling behaviour.
Definition: gbp_bridge_domain.h:59
gbp_scope_t
u16 gbp_scope_t
Definition: gbp_types.h:24
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
gbp_bridge_domain_db_t::gbd_by_bd_index
index_t * gbd_by_bd_index
Definition: gbp_bridge_domain.h:121
UNFORMAT_END_OF_INPUT
#define UNFORMAT_END_OF_INPUT
Definition: format.h:137
gbp_route_domain_unlock
void gbp_route_domain_unlock(index_t index)
Definition: gbp_route_domain.c:208
gbp_itf_unlock
void gbp_itf_unlock(gbp_itf_hdl_t *gh)
Definition: gbp_itf.c:288
gbp_bridge_domain_unlock
void gbp_bridge_domain_unlock(index_t gbdi)
Definition: gbp_bridge_domain.c:312
flags
vl_api_wireguard_peer_flags_t flags
Definition: wireguard.api:105