FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
gbp_route_domain.c File Reference
+ Include dependency graph for gbp_route_domain.c:

Go to the source code of this file.

Data Structures

struct  gbp_route_domain_db_t
 DB of route_domains. More...
 

Macros

#define GBP_BD_DBG(...)   vlib_log_debug (grd_logger, __VA_ARGS__);
 

Typedefs

typedef struct gbp_route_domain_db_t gbp_route_domain_db_t
 DB of route_domains. More...
 

Functions

index_t gbp_route_domain_index (const gbp_route_domain_t *grd)
 
gbp_route_domain_tgbp_route_domain_get (index_t i)
 
static void gbp_route_domain_lock (index_t i)
 
index_t gbp_route_domain_find (u32 rd_id)
 
index_t gbp_route_domain_find_and_lock (u32 rd_id)
 
static void gbp_route_domain_db_add (gbp_route_domain_t *grd)
 
static void gbp_route_domain_db_remove (gbp_route_domain_t *grd)
 
int gbp_route_domain_add_and_lock (u32 rd_id, gbp_scope_t scope, u32 ip4_table_id, u32 ip6_table_id, u32 ip4_uu_sw_if_index, u32 ip6_uu_sw_if_index)
 
void gbp_route_domain_unlock (index_t index)
 
u32 gbp_route_domain_get_rd_id (index_t grdi)
 
gbp_scope_t gbp_route_domain_get_scope (index_t grdi)
 
int gbp_route_domain_delete (u32 rd_id)
 
const mac_address_tgbp_route_domain_get_local_mac (void)
 
const mac_address_tgbp_route_domain_get_remote_mac (void)
 
void gbp_route_domain_walk (gbp_route_domain_cb_t cb, void *ctx)
 
static clib_error_tgbp_route_domain_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
u8format_gbp_route_domain (u8 *s, va_list *args)
 
static int gbp_route_domain_show_one (gbp_route_domain_t *gb, void *ctx)
 
static clib_error_tgbp_route_domain_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tgbp_route_domain_init (vlib_main_t *vm)
 

Variables

static const mac_address_t GBP_ROUTED_SRC_MAC
 A fixed MAC address to use as the source MAC for packets L3 switched onto the routed uu-fwd interfaces. More...
 
static const mac_address_t GBP_ROUTED_DST_MAC
 
gbp_route_domain_tgbp_route_domain_pool
 Pool of GBP route_domains. More...
 
static gbp_route_domain_db_t gbp_route_domain_db
 
static fib_source_t gbp_fib_source
 
vlib_log_class_t grd_logger
 logger More...
 
static vlib_cli_command_t gbp_route_domain_cli_node
 (constructor) VLIB_CLI_COMMAND (gbp_route_domain_cli_node) More...
 
static vlib_cli_command_t gbp_route_domain_show_node
 (constructor) VLIB_CLI_COMMAND (gbp_route_domain_show_node) More...
 

Macro Definition Documentation

◆ GBP_BD_DBG

#define GBP_BD_DBG (   ...)    vlib_log_debug (grd_logger, __VA_ARGS__);

Definition at line 62 of file gbp_route_domain.c.

Typedef Documentation

◆ gbp_route_domain_db_t

DB of route_domains.

Function Documentation

◆ format_gbp_route_domain()

u8* format_gbp_route_domain ( u8 s,
va_list *  args 
)

Definition at line 374 of file gbp_route_domain.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gbp_route_domain_add_and_lock()

int gbp_route_domain_add_and_lock ( u32  rd_id,
gbp_scope_t  scope,
u32  ip4_table_id,
u32  ip6_table_id,
u32  ip4_uu_sw_if_index,
u32  ip6_uu_sw_if_index 
)

Definition at line 128 of file gbp_route_domain.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gbp_route_domain_cli()

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

Definition at line 302 of file gbp_route_domain.c.

+ Here is the call graph for this function:

◆ gbp_route_domain_db_add()

static void gbp_route_domain_db_add ( gbp_route_domain_t grd)
static

Definition at line 114 of file gbp_route_domain.c.

+ Here is the caller graph for this function:

◆ gbp_route_domain_db_remove()

static void gbp_route_domain_db_remove ( gbp_route_domain_t grd)
static

Definition at line 122 of file gbp_route_domain.c.

+ Here is the caller graph for this function:

◆ gbp_route_domain_delete()

int gbp_route_domain_delete ( u32  rd_id)

Definition at line 256 of file gbp_route_domain.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gbp_route_domain_find()

index_t gbp_route_domain_find ( u32  rd_id)

Definition at line 87 of file gbp_route_domain.c.

+ Here is the caller graph for this function:

◆ gbp_route_domain_find_and_lock()

index_t gbp_route_domain_find_and_lock ( u32  rd_id)

Definition at line 100 of file gbp_route_domain.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gbp_route_domain_get()

gbp_route_domain_t* gbp_route_domain_get ( index_t  i)

Definition at line 72 of file gbp_route_domain.c.

+ Here is the caller graph for this function:

◆ gbp_route_domain_get_local_mac()

const mac_address_t* gbp_route_domain_get_local_mac ( void  )

Definition at line 276 of file gbp_route_domain.c.

+ Here is the caller graph for this function:

◆ gbp_route_domain_get_rd_id()

u32 gbp_route_domain_get_rd_id ( index_t  grdi)

Definition at line 236 of file gbp_route_domain.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gbp_route_domain_get_remote_mac()

const mac_address_t* gbp_route_domain_get_remote_mac ( void  )

Definition at line 282 of file gbp_route_domain.c.

+ Here is the caller graph for this function:

◆ gbp_route_domain_get_scope()

gbp_scope_t gbp_route_domain_get_scope ( index_t  grdi)

Definition at line 246 of file gbp_route_domain.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gbp_route_domain_index()

index_t gbp_route_domain_index ( const gbp_route_domain_t grd)

Definition at line 66 of file gbp_route_domain.c.

+ Here is the caller graph for this function:

◆ gbp_route_domain_init()

static clib_error_t* gbp_route_domain_init ( vlib_main_t vm)
static

Definition at line 429 of file gbp_route_domain.c.

+ Here is the call graph for this function:

◆ gbp_route_domain_lock()

static void gbp_route_domain_lock ( index_t  i)
static

Definition at line 78 of file gbp_route_domain.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gbp_route_domain_show()

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

Definition at line 404 of file gbp_route_domain.c.

+ Here is the call graph for this function:

◆ gbp_route_domain_show_one()

static int gbp_route_domain_show_one ( gbp_route_domain_t gb,
void *  ctx 
)
static

Definition at line 393 of file gbp_route_domain.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gbp_route_domain_unlock()

void gbp_route_domain_unlock ( index_t  index)

Definition at line 208 of file gbp_route_domain.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gbp_route_domain_walk()

void gbp_route_domain_walk ( gbp_route_domain_cb_t  cb,
void *  ctx 
)

Definition at line 288 of file gbp_route_domain.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ gbp_fib_source

fib_source_t gbp_fib_source
static

Definition at line 55 of file gbp_route_domain.c.

◆ gbp_route_domain_cli_node

vlib_cli_command_t gbp_route_domain_cli_node
static
Initial value:
= {
.path = "gbp route-domain",
.short_help = "gbp route-domain [del] rd <ID> ip4-table-id <ID> ip6-table-id <ID> [ip4-uu <interface>] [ip6-uu <interface>]",
.function = gbp_route_domain_cli,
}
static clib_error_t * gbp_route_domain_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (gbp_route_domain_cli_node)

Definition at line 367 of file gbp_route_domain.c.

◆ gbp_route_domain_db

gbp_route_domain_db_t gbp_route_domain_db
static

Definition at line 54 of file gbp_route_domain.c.

◆ gbp_route_domain_pool

gbp_route_domain_t* gbp_route_domain_pool

Pool of GBP route_domains.

Definition at line 44 of file gbp_route_domain.c.

◆ gbp_route_domain_show_node

vlib_cli_command_t gbp_route_domain_show_node
static
Initial value:
= {
.path = "show gbp route-domain",
.short_help = "show gbp route-domain\n",
.function = gbp_route_domain_show,
}
static clib_error_t * gbp_route_domain_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (gbp_route_domain_show_node)

Definition at line 421 of file gbp_route_domain.c.

◆ GBP_ROUTED_DST_MAC

const mac_address_t GBP_ROUTED_DST_MAC
static
Initial value:
= {
.bytes = {
00, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
}
}

Definition at line 34 of file gbp_route_domain.c.

◆ GBP_ROUTED_SRC_MAC

const mac_address_t GBP_ROUTED_SRC_MAC
static
Initial value:
= {
.bytes = {
0x0, 0x22, 0xBD, 0xF8, 0x19, 0xFF,
}
}

A fixed MAC address to use as the source MAC for packets L3 switched onto the routed uu-fwd interfaces.

Magic values - origin lost to the mists of time...

Definition at line 28 of file gbp_route_domain.c.

◆ grd_logger

vlib_log_class_t grd_logger

logger

Definition at line 60 of file gbp_route_domain.c.