FD.io VPP  v16.06
Vector Packet Processing
l2_bd.c File Reference
+ Include dependency graph for l2_bd.c:

Go to the source code of this file.

Macros

#define BD_REMOVE_ERROR_OK   0
 
#define BD_REMOVE_ERROR_NOT_FOUND   1
 

Functions

void bd_validate (l2_bridge_domain_t *bd_config)
 
u32 bd_find_or_add_bd_index (bd_main_t *bdm, u32 bd_id)
 Get or create a bridge domain. More...
 
int bd_delete_bd_index (bd_main_t *bdm, u32 bd_id)
 Delete a bridge domain. More...
 
void bd_add_member (l2_bridge_domain_t *bd_config, l2_flood_member_t *member)
 
u32 bd_remove_member (l2_bridge_domain_t *bd_config, u32 sw_if_index)
 
clib_error_tl2bd_init (vlib_main_t *vm)
 
u32 bd_set_flags (vlib_main_t *vm, u32 bd_index, u32 flags, u32 enable)
 
static clib_error_tbd_learn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tbd_fwd (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tbd_flood (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tbd_uu_flood (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tbd_arp_term (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
u32 bd_add_del_ip_mac (u32 bd_index, u8 *ip_addr, u8 *mac_addr, u8 is_ip6, u8 is_add)
 
static clib_error_tbd_arp_entry (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
u8format_vtr (u8 *s, va_list *args)
 
static clib_error_tbd_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

bd_main_t bd_main
 
vlib_cli_command_t bd_learn_cli
 (constructor) VLIB_CLI_COMMAND (bd_learn_cli) More...
 
vlib_cli_command_t bd_fwd_cli
 (constructor) VLIB_CLI_COMMAND (bd_fwd_cli) More...
 
vlib_cli_command_t bd_flood_cli
 (constructor) VLIB_CLI_COMMAND (bd_flood_cli) More...
 
vlib_cli_command_t bd_uu_flood_cli
 (constructor) VLIB_CLI_COMMAND (bd_uu_flood_cli) More...
 
vlib_cli_command_t bd_arp_term_cli
 (constructor) VLIB_CLI_COMMAND (bd_arp_term_cli) More...
 
vlib_cli_command_t bd_arp_entry_cli
 (constructor) VLIB_CLI_COMMAND (bd_arp_entry_cli) More...
 
vlib_cli_command_t bd_show_cli
 (constructor) VLIB_CLI_COMMAND (bd_show_cli) More...
 

Macro Definition Documentation

#define BD_REMOVE_ERROR_NOT_FOUND   1

Definition at line 124 of file l2_bd.c.

#define BD_REMOVE_ERROR_OK   0

Definition at line 123 of file l2_bd.c.

Function Documentation

u32 bd_add_del_ip_mac ( u32  bd_index,
u8 ip_addr,
u8 mac_addr,
u8  is_ip6,
u8  is_add 
)

Definition at line 447 of file l2_bd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bd_add_member ( l2_bridge_domain_t bd_config,
l2_flood_member_t member 
)

Definition at line 102 of file l2_bd.c.

+ Here is the caller graph for this function:

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

Definition at line 486 of file l2_bd.c.

+ Here is the call graph for this function:

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

Definition at line 402 of file l2_bd.c.

+ Here is the call graph for this function:

int bd_delete_bd_index ( bd_main_t bdm,
u32  bd_id 
)

Delete a bridge domain.

Delete an existing bridge domain with the given bridge domain ID.

Parameters
bdmbd_main pointer.
bd_idThe bridge domain ID.
Returns
0 on success and -1 if the bridge domain does not exist.

Definition at line 80 of file l2_bd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 bd_find_or_add_bd_index ( bd_main_t bdm,
u32  bd_id 
)

Get or create a bridge domain.

Get or create a bridge domain with the given bridge domain ID.

Parameters
bdmbd_main pointer.
bd_idThe bridge domain ID or ~0 if an arbitrary unused bridge domain should be used.
Returns
The bridge domain index in l2input_main->l2_bridge_domain_t vector.

Definition at line 52 of file l2_bd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 304 of file l2_bd.c.

+ Here is the call graph for this function:

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

Definition at line 255 of file l2_bd.c.

+ Here is the call graph for this function:

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

Definition at line 206 of file l2_bd.c.

+ Here is the call graph for this function:

u32 bd_remove_member ( l2_bridge_domain_t bd_config,
u32  sw_if_index 
)

Definition at line 127 of file l2_bd.c.

+ Here is the caller graph for this function:

u32 bd_set_flags ( vlib_main_t vm,
u32  bd_index,
u32  flags,
u32  enable 
)

Definition at line 164 of file l2_bd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 582 of file l2_bd.c.

+ Here is the call graph for this function:

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

Definition at line 353 of file l2_bd.c.

+ Here is the call graph for this function:

void bd_validate ( l2_bridge_domain_t bd_config)

Definition at line 40 of file l2_bd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_vtr ( u8 s,
va_list *  args 
)

Definition at line 548 of file l2_bd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* l2bd_init ( vlib_main_t vm)

Definition at line 144 of file l2_bd.c.

+ Here is the call graph for this function:

Variable Documentation

vlib_cli_command_t bd_arp_entry_cli
Initial value:
= {
.path = "set bridge-domain arp entry",
.short_help = "set bridge-domain arp entry <bd-id> <ip-addr> <mac-addr> [del]",
.function = bd_arp_entry,
}
static clib_error_t * bd_arp_entry(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2_bd.c:486

(constructor) VLIB_CLI_COMMAND (bd_arp_entry_cli)

Definition at line 542 of file l2_bd.c.

vlib_cli_command_t bd_arp_term_cli
Initial value:
= {
.path = "set bridge-domain arp term",
.short_help = "set bridge-domain arp term <bridge-domain-id> [disable]",
.function = bd_arp_term,
}
static clib_error_t * bd_arp_term(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2_bd.c:402

(constructor) VLIB_CLI_COMMAND (bd_arp_term_cli)

Definition at line 435 of file l2_bd.c.

vlib_cli_command_t bd_flood_cli
Initial value:
= {
.path = "set bridge-domain flood",
.short_help = "set bridge-domain flood <bridge-domain-id> [disable]",
.function = bd_flood,
}
static clib_error_t * bd_flood(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2_bd.c:304

(constructor) VLIB_CLI_COMMAND (bd_flood_cli)

Definition at line 343 of file l2_bd.c.

vlib_cli_command_t bd_fwd_cli
Initial value:
= {
.path = "set bridge-domain forward",
.short_help = "set bridge-domain forward <bridge-domain-id> [disable]",
.function = bd_fwd,
}
static clib_error_t * bd_fwd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2_bd.c:255

(constructor) VLIB_CLI_COMMAND (bd_fwd_cli)

Definition at line 294 of file l2_bd.c.

vlib_cli_command_t bd_learn_cli
Initial value:
= {
.path = "set bridge-domain learn",
.short_help = "set bridge-domain learn <bridge-domain-id> [disable]",
.function = bd_learn,
}
static clib_error_t * bd_learn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2_bd.c:206

(constructor) VLIB_CLI_COMMAND (bd_learn_cli)

Definition at line 245 of file l2_bd.c.

bd_main_t bd_main

Definition at line 35 of file l2_bd.c.

vlib_cli_command_t bd_show_cli
Initial value:
= {
.path = "show bridge-domain",
.short_help = "show bridge-domain [bridge-domain-id [detail|int|arp]]",
.function = bd_show,
}
static clib_error_t * bd_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2_bd.c:582

(constructor) VLIB_CLI_COMMAND (bd_show_cli)

Definition at line 697 of file l2_bd.c.

vlib_cli_command_t bd_uu_flood_cli
Initial value:
= {
.path = "set bridge-domain uu-flood",
.short_help = "set bridge-domain uu-flood <bridge-domain-id> [disable]",
.function = bd_uu_flood,
}
static clib_error_t * bd_uu_flood(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2_bd.c:353

(constructor) VLIB_CLI_COMMAND (bd_uu_flood_cli)

Definition at line 392 of file l2_bd.c.