FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
svs.c File Reference
+ Include dependency graph for svs.c:

Go to the source code of this file.

Data Structures

struct  svs_input_trace_t_
 

Typedefs

typedef enum svs_next_t_ svs_next_t
 
typedef struct svs_input_trace_t_ svs_input_trace_t
 

Enumerations

enum  svs_next_t_ { SVS_NEXT_DROP, SVS_N_NEXT }
 

Functions

int svs_table_add (fib_protocol_t fproto, u32 table_id)
 
int svs_table_delete (fib_protocol_t fproto, u32 table_id)
 
static int svs_route_add_i (u32 fib_index, const fib_prefix_t *pfx, u32 src_fib_index)
 
int svs_route_add (u32 table_id, const fib_prefix_t *pfx, u32 source_table_id)
 
int svs_route_delete (u32 table_id, const fib_prefix_t *pfx)
 
int svs_enable (fib_protocol_t fproto, u32 table_id, u32 sw_if_index)
 
static void svs_table_bind (fib_protocol_t fproto, u32 sw_if_index, u32 itf_fib_index)
 
static void svs_ip6_table_bind (ip6_main_t *im, uword opaque, u32 sw_if_index, u32 new_fib_index, u32 old_fib_index)
 
static void svs_ip4_table_bind (ip4_main_t *im, uword opaque, u32 sw_if_index, u32 new_fib_index, u32 old_fib_index)
 
int svs_disable (fib_protocol_t fproto, u32 table_id, u32 sw_if_index)
 
void svs_walk (svs_walk_fn_t fn, void *ctx)
 
static uword svs_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, fib_protocol_t fproto)
 
static uword svs_input_ip4 (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword svs_input_ip6 (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8format_svs_input_trace (u8 *s, va_list *args)
 
 VNET_FEATURE_INIT (svs_ip4_feat, static)
 
 VNET_FEATURE_INIT (svs_ip6_feat, static)
 
static clib_error_tsvs_table_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tsvs_enable_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tsvs_route_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tsvs_show_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tsvs_init (vlib_main_t *vm)
 

Variables

u32svs_itf_db [FIB_PROTOCOL_IP_MAX]
 
vlib_node_registration_t svs_ip4_node
 (constructor) VLIB_REGISTER_NODE (svs_ip4_node) More...
 
vlib_node_registration_t svs_ip6_node
 (constructor) VLIB_REGISTER_NODE (svs_ip6_node) More...
 
static vlib_cli_command_t svs_table_cmd_cli
 (constructor) VLIB_CLI_COMMAND (svs_table_cmd_cli) More...
 
static vlib_cli_command_t svs_enable_cli_cmd
 (constructor) VLIB_CLI_COMMAND (svs_enable_cli_cmd) More...
 
static vlib_cli_command_t svs_route_cmd_cli
 (constructor) VLIB_CLI_COMMAND (svs_route_cmd_cli) More...
 
static vlib_cli_command_t svs_show_cli_cmd
 (constructor) VLIB_CLI_COMMAND (svs_show_cli_cmd) More...
 

Typedef Documentation

◆ svs_input_trace_t

◆ svs_next_t

typedef enum svs_next_t_ svs_next_t

Enumeration Type Documentation

◆ svs_next_t_

Enumerator
SVS_NEXT_DROP 
SVS_N_NEXT 

Definition at line 245 of file svs.c.

Function Documentation

◆ format_svs_input_trace()

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

Definition at line 354 of file svs.c.

+ Here is the call graph for this function:

◆ svs_disable()

int svs_disable ( fib_protocol_t  fproto,
u32  table_id,
u32  sw_if_index 
)

Definition at line 193 of file svs.c.

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

◆ svs_enable()

int svs_enable ( fib_protocol_t  fproto,
u32  table_id,
u32  sw_if_index 
)

Definition at line 116 of file svs.c.

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

◆ svs_enable_cli()

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

Definition at line 453 of file svs.c.

+ Here is the call graph for this function:

◆ svs_init()

static clib_error_t* svs_init ( vlib_main_t vm)
static

Definition at line 598 of file svs.c.

+ Here is the call graph for this function:

◆ svs_input_inline()

static uword svs_input_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
fib_protocol_t  fproto 
)
inlinestatic

Definition at line 257 of file svs.c.

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

◆ svs_input_ip4()

static uword svs_input_ip4 ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 340 of file svs.c.

+ Here is the call graph for this function:

◆ svs_input_ip6()

static uword svs_input_ip6 ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 347 of file svs.c.

+ Here is the call graph for this function:

◆ svs_ip4_table_bind()

static void svs_ip4_table_bind ( ip4_main_t im,
uword  opaque,
u32  sw_if_index,
u32  new_fib_index,
u32  old_fib_index 
)
static

Definition at line 185 of file svs.c.

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

◆ svs_ip6_table_bind()

static void svs_ip6_table_bind ( ip6_main_t im,
uword  opaque,
u32  sw_if_index,
u32  new_fib_index,
u32  old_fib_index 
)
static

Definition at line 177 of file svs.c.

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

◆ svs_route_add()

int svs_route_add ( u32  table_id,
const fib_prefix_t pfx,
u32  source_table_id 
)

Definition at line 80 of file svs.c.

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

◆ svs_route_add_i()

static int svs_route_add_i ( u32  fib_index,
const fib_prefix_t pfx,
u32  src_fib_index 
)
static

Definition at line 59 of file svs.c.

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

◆ svs_route_cli()

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

Definition at line 507 of file svs.c.

+ Here is the call graph for this function:

◆ svs_route_delete()

int svs_route_delete ( u32  table_id,
const fib_prefix_t pfx 
)

Definition at line 101 of file svs.c.

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

◆ svs_show_cli()

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

Definition at line 569 of file svs.c.

+ Here is the call graph for this function:

◆ svs_table_add()

int svs_table_add ( fib_protocol_t  fproto,
u32  table_id 
)

Definition at line 30 of file svs.c.

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

◆ svs_table_bind()

static void svs_table_bind ( fib_protocol_t  fproto,
u32  sw_if_index,
u32  itf_fib_index 
)
static

Definition at line 150 of file svs.c.

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

◆ svs_table_cli()

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

Definition at line 406 of file svs.c.

+ Here is the call graph for this function:

◆ svs_table_delete()

int svs_table_delete ( fib_protocol_t  fproto,
u32  table_id 
)

Definition at line 38 of file svs.c.

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

◆ svs_walk()

void svs_walk ( svs_walk_fn_t  fn,
void *  ctx 
)

Definition at line 223 of file svs.c.

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

◆ VNET_FEATURE_INIT() [1/2]

VNET_FEATURE_INIT ( svs_ip4_feat  ,
static   
)

◆ VNET_FEATURE_INIT() [2/2]

VNET_FEATURE_INIT ( svs_ip6_feat  ,
static   
)

Variable Documentation

◆ svs_enable_cli_cmd

vlib_cli_command_t svs_enable_cli_cmd
static
Initial value:
= {
.path = "svs enable",
.short_help = "Source VRF select [enable|disable] [ip4|ip6] <table-id> X <interface>",
.function = svs_enable_cli,
}
static clib_error_t * svs_enable_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: svs.c:453

(constructor) VLIB_CLI_COMMAND (svs_enable_cli_cmd)

Definition at line 499 of file svs.c.

◆ svs_ip4_node

Initial value:
=
{
.function = svs_input_ip4,
.name = "svs-ip4",
.vector_size = sizeof (u32),
.format_trace = format_svs_input_trace,
.n_next_nodes = SVS_N_NEXT,
.next_nodes =
{
[SVS_NEXT_DROP] = "error-drop",
}
}
static uword svs_input_ip4(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: svs.c:340
static u8 * format_svs_input_trace(u8 *s, va_list *args)
Definition: svs.c:354
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123

(constructor) VLIB_REGISTER_NODE (svs_ip4_node)

Definition at line 365 of file svs.c.

◆ svs_ip6_node

Initial value:
=
{
.function = svs_input_ip6,
.name = "svs-ip6",
.vector_size = sizeof (u32),
.format_trace = format_svs_input_trace,
.next_nodes =
{
[SVS_NEXT_DROP] = "error-drop",
}
}
static u8 * format_svs_input_trace(u8 *s, va_list *args)
Definition: svs.c:354
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static uword svs_input_ip6(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: svs.c:347

(constructor) VLIB_REGISTER_NODE (svs_ip6_node)

Definition at line 379 of file svs.c.

◆ svs_itf_db

u32* svs_itf_db[FIB_PROTOCOL_IP_MAX]

Definition at line 27 of file svs.c.

◆ svs_route_cmd_cli

vlib_cli_command_t svs_route_cmd_cli
static
Initial value:
= {
.path = "svs route",
.short_help = "Source VRF select route [add|delete] <table-id> <prefix> <src-table-id>",
.function = svs_route_cli,
}
static clib_error_t * svs_route_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: svs.c:507

(constructor) VLIB_CLI_COMMAND (svs_route_cmd_cli)

Definition at line 561 of file svs.c.

◆ svs_show_cli_cmd

vlib_cli_command_t svs_show_cli_cmd
static
Initial value:
= {
.path = "show svs",
.short_help = "Source VRF select show",
.function = svs_show_cli,
}
static clib_error_t * svs_show_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: svs.c:569

(constructor) VLIB_CLI_COMMAND (svs_show_cli_cmd)

Definition at line 590 of file svs.c.

◆ svs_table_cmd_cli

vlib_cli_command_t svs_table_cmd_cli
static
Initial value:
= {
.path = "svs table",
.short_help = "Source VRF select table [add|delete] [ip4|ip6] table-id X",
.function = svs_table_cli,
}
static clib_error_t * svs_table_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: svs.c:406

(constructor) VLIB_CLI_COMMAND (svs_table_cmd_cli)

Definition at line 445 of file svs.c.