FD.io VPP  v19.04-6-g6f05f72
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

typedef enum svs_next_t_ svs_next_t

Enumeration Type Documentation

Enumerator
SVS_NEXT_DROP 
SVS_N_NEXT 

Definition at line 245 of file svs.c.

Function Documentation

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

Definition at line 355 of file svs.c.

+ Here is the call graph for this function:

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:

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:

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

Definition at line 454 of file svs.c.

+ Here is the call graph for this function:

static clib_error_t* svs_init ( vlib_main_t vm)
static

Definition at line 599 of file svs.c.

+ Here is the call graph for this function:

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:

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

Definition at line 341 of file svs.c.

+ Here is the call graph for this function:

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

Definition at line 348 of file svs.c.

+ Here is the call graph for this function:

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:

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:

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:

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:

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

Definition at line 508 of file svs.c.

+ Here is the call graph for this function:

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:

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

Definition at line 570 of file svs.c.

+ Here is the call graph for this function:

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:

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:

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

Definition at line 407 of file svs.c.

+ Here is the call graph for this function:

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:

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 ( svs_ip4_feat  ,
static   
)
VNET_FEATURE_INIT ( svs_ip6_feat  ,
static   
)

Variable Documentation

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:454

(constructor) VLIB_CLI_COMMAND (svs_enable_cli_cmd)

Definition at line 500 of file svs.c.

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:341
static u8 * format_svs_input_trace(u8 *s, va_list *args)
Definition: svs.c:355
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (svs_ip4_node)

Definition at line 366 of file svs.c.

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:355
unsigned int u32
Definition: types.h:88
static uword svs_input_ip6(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: svs.c:348

(constructor) VLIB_REGISTER_NODE (svs_ip6_node)

Definition at line 380 of file svs.c.

u32* svs_itf_db[FIB_PROTOCOL_IP_MAX]

Definition at line 27 of file svs.c.

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:508

(constructor) VLIB_CLI_COMMAND (svs_route_cmd_cli)

Definition at line 562 of file svs.c.

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:570

(constructor) VLIB_CLI_COMMAND (svs_show_cli_cmd)

Definition at line 591 of file svs.c.

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:407

(constructor) VLIB_CLI_COMMAND (svs_table_cmd_cli)

Definition at line 446 of file svs.c.