FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
l3xc.c File Reference
+ Include dependency graph for l3xc.c:

Go to the source code of this file.

Functions

index_t l3xc_find (u32 sw_if_index, fib_protocol_t fproto)
 Find a L3 XC object from an interface and FIB protocol. More...
 
static void l3xc_db_add (u32 sw_if_index, fib_protocol_t fproto, index_t l3xci)
 
static void l3xc_db_remove (u32 sw_if_index, fib_protocol_t fproto)
 
static void l3xc_stack (l3xc_t *l3xc)
 
int l3xc_update (u32 sw_if_index, u8 is_ip6, const fib_route_path_t *rpaths)
 Create or update an L3XC Policy. More...
 
int l3xc_delete (u32 sw_if_index, u8 is_ip6)
 Delete an L3XC. More...
 
static clib_error_tl3xc_cmd (vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
 
static u8format_l3xc (u8 *s, va_list *args)
 
void l3xc_walk (l3xc_walk_cb_t cb, void *ctx)
 Walk/visit each of the L3XC policies. More...
 
static clib_error_tl3xc_show_cmd (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static fib_node_tl3xc_get_node (fib_node_index_t index)
 
static l3xc_tl3xc_get_from_node (fib_node_t *node)
 
static void l3xc_last_lock_gone (fib_node_t *node)
 
static fib_node_back_walk_rc_t l3xc_back_walk_notify (fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
 
static clib_error_tl3xc_init (vlib_main_t *vm)
 

Variables

fib_node_type_t l3xc_fib_node_type
 FIB node type the attachment is registered. More...
 
l3xc_tl3xc_pool
 Pool of L3XC objects. More...
 
static u32l3xc_db [FIB_PROTOCOL_IP_MAX]
 DB of L3XC objects. More...
 
static vlib_cli_command_t l3xc_cmd_node
 Create an L3XC policy. More...
 
static vlib_cli_command_t l3xc_show_cmd_node
 (constructor) VLIB_CLI_COMMAND (l3xc_show_cmd_node) More...
 
static const fib_node_vft_t l3xc_vft
 

Function Documentation

◆ format_l3xc()

static u8* format_l3xc ( u8 s,
va_list *  args 
)
static

Definition at line 279 of file l3xc.c.

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

◆ l3xc_back_walk_notify()

static fib_node_back_walk_rc_t l3xc_back_walk_notify ( fib_node_t node,
fib_node_back_walk_ctx_t ctx 
)
static

Definition at line 364 of file l3xc.c.

+ Here is the call graph for this function:

◆ l3xc_cmd()

static clib_error_t* l3xc_cmd ( vlib_main_t vm,
unformat_input_t main_input,
vlib_cli_command_t cmd 
)
static

Definition at line 196 of file l3xc.c.

+ Here is the call graph for this function:

◆ l3xc_db_add()

static void l3xc_db_add ( u32  sw_if_index,
fib_protocol_t  fproto,
index_t  l3xci 
)
static

Definition at line 47 of file l3xc.c.

+ Here is the caller graph for this function:

◆ l3xc_db_remove()

static void l3xc_db_remove ( u32  sw_if_index,
fib_protocol_t  fproto 
)
static

Definition at line 55 of file l3xc.c.

+ Here is the caller graph for this function:

◆ l3xc_delete()

int l3xc_delete ( u32  sw_if_index,
u8  is_ip6 
)

Delete an L3XC.

Parameters
sw_if_indexthe input interface
is_ipv6- 0 if ip4, 1 if ip6

Definition at line 156 of file l3xc.c.

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

◆ l3xc_find()

index_t l3xc_find ( u32  sw_if_index,
fib_protocol_t  fproto 
)

Find a L3 XC object from an interface and FIB protocol.

Definition at line 38 of file l3xc.c.

+ Here is the caller graph for this function:

◆ l3xc_get_from_node()

static l3xc_t* l3xc_get_from_node ( fib_node_t node)
static

Definition at line 349 of file l3xc.c.

+ Here is the caller graph for this function:

◆ l3xc_get_node()

static fib_node_t* l3xc_get_node ( fib_node_index_t  index)
static

Definition at line 342 of file l3xc.c.

+ Here is the call graph for this function:

◆ l3xc_init()

static clib_error_t* l3xc_init ( vlib_main_t vm)
static

Definition at line 381 of file l3xc.c.

+ Here is the call graph for this function:

◆ l3xc_last_lock_gone()

static void l3xc_last_lock_gone ( fib_node_t node)
static

Definition at line 356 of file l3xc.c.

◆ l3xc_show_cmd()

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

Definition at line 317 of file l3xc.c.

+ Here is the call graph for this function:

◆ l3xc_stack()

static void l3xc_stack ( l3xc_t l3xc)
static

Definition at line 63 of file l3xc.c.

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

◆ l3xc_update()

int l3xc_update ( u32  sw_if_index,
u8  is_ip6,
const fib_route_path_t rpaths 
)

Create or update an L3XC Policy.

Parameters
sw_if_indexthe input interface
is_ipv6- 0 if ip4, 1 if ip6
rpathsThe set of paths to add to the forwarding set
Returns
error code

Definition at line 83 of file l3xc.c.

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

◆ l3xc_walk()

void l3xc_walk ( l3xc_walk_cb_t  cb,
void *  ctx 
)

Walk/visit each of the L3XC policies.

Definition at line 303 of file l3xc.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ l3xc_cmd_node

vlib_cli_command_t l3xc_cmd_node
static
Initial value:
= {
.path = "l3xc",
.function = l3xc_cmd,
.short_help = "l3xc [add|del] <INTERFACE> via ...",
.is_mp_safe = 1,
}

Create an L3XC policy.

(constructor) VLIB_CLI_COMMAND (l3xc_cmd_node)

Definition at line 270 of file l3xc.c.

◆ l3xc_db

u32* l3xc_db[FIB_PROTOCOL_IP_MAX]
static

DB of L3XC objects.

Definition at line 35 of file l3xc.c.

◆ l3xc_fib_node_type

fib_node_type_t l3xc_fib_node_type

FIB node type the attachment is registered.

Definition at line 25 of file l3xc.c.

◆ l3xc_pool

l3xc_t* l3xc_pool

Pool of L3XC objects.

Data-plane functions.

Definition at line 30 of file l3xc.c.

◆ l3xc_show_cmd_node

vlib_cli_command_t l3xc_show_cmd_node
static
Initial value:
= {
.path = "show l3xc",
.function = l3xc_show_cmd,
.short_help = "show l3xc",
.is_mp_safe = 1,
}

(constructor) VLIB_CLI_COMMAND (l3xc_show_cmd_node)

Definition at line 333 of file l3xc.c.

◆ l3xc_vft

const fib_node_vft_t l3xc_vft
static
Initial value:
= {
.fnv_get = l3xc_get_node,
.fnv_last_lock = l3xc_last_lock_gone,
.fnv_back_walk = l3xc_back_walk_notify,
}

Definition at line 374 of file l3xc.c.

l3xc_last_lock_gone
static void l3xc_last_lock_gone(fib_node_t *node)
Definition: l3xc.c:356
l3xc_back_walk_notify
static fib_node_back_walk_rc_t l3xc_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
Definition: l3xc.c:364
l3xc_get_node
static fib_node_t * l3xc_get_node(fib_node_index_t index)
Definition: l3xc.c:342
l3xc_cmd
static clib_error_t * l3xc_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
Definition: l3xc.c:196
l3xc_show_cmd
static clib_error_t * l3xc_show_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l3xc.c:317