FD.io VPP  v17.10-9-gd594711
Vector Packet Processing
sr_mpls_steering.c File Reference

Packet steering into SR-MPLS Policies. More...

+ Include dependency graph for sr_mpls_steering.c:

Go to the source code of this file.

Functions

int sr_mpls_steering_policy (int is_del, mpls_label_t bsid, u32 sr_policy_index, u32 table_id, ip46_address_t *prefix, u32 mask_width, u8 traffic_type)
 Steer traffic L3 traffic through a given SR-MPLS policy. More...
 
static clib_error_tsr_mpls_steer_policy_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_sr_mpls_steering_policies_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_tsr_mpls_steering_init (vlib_main_t *vm)
 

Variables

static vlib_cli_command_t sr_mpls_steer_policy_command
 (constructor) VLIB_CLI_COMMAND (sr_mpls_steer_policy_command) More...
 
static vlib_cli_command_t show_sr_mpls_steering_policies_command
 (constructor) VLIB_CLI_COMMAND (show_sr_mpls_steering_policies_command) More...
 

Detailed Description

Packet steering into SR-MPLS Policies.

This file is in charge of handling the FIB appropiatly to steer packets through SR Policies as defined in 'sr_mpls_policy.c'. Notice that here we are only doing steering. SR policy application is done in sr_policy_rewrite.c

Supports:

  • Steering of IPv6 traffic Destination Address based
  • Steering of IPv4 traffic Destination Address based

Definition in file sr_mpls_steering.c.

Function Documentation

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

Definition at line 383 of file sr_mpls_steering.c.

+ Here is the call graph for this function:

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

Definition at line 273 of file sr_mpls_steering.c.

+ Here is the call graph for this function:

clib_error_t* sr_mpls_steering_init ( vlib_main_t vm)

Definition at line 432 of file sr_mpls_steering.c.

+ Here is the call graph for this function:

int sr_mpls_steering_policy ( int  is_del,
mpls_label_t  bsid,
u32  sr_policy_index,
u32  table_id,
ip46_address_t *  prefix,
u32  mask_width,
u8  traffic_type 
)

Steer traffic L3 traffic through a given SR-MPLS policy.

Parameters
is_del
bsidis the bindingSID of the SR Policy (alt to sr_policy_index)
sr_policyis the index of the SR Policy (alt to bsid)
table_idis the VRF where to install the FIB entry for the BSID
prefixis the IPv4/v6 address for L3 traffic type
mask_widthis the mask for L3 traffic type
traffic_typedescribes the type of traffic
Returns
0 if correct, else error

Definition at line 56 of file sr_mpls_steering.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t show_sr_mpls_steering_policies_command
static
Initial value:
= {
.path = "show sr mpls steering policies",
.short_help = "show sr mpls steering policies",
}
static clib_error_t * show_sr_mpls_steering_policies_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (show_sr_mpls_steering_policies_command)

Definition at line 424 of file sr_mpls_steering.c.

vlib_cli_command_t sr_mpls_steer_policy_command
static
Initial value:
= {
.path = "sr mpls steer",
.short_help = "sr mpls steer (del) l3 <ip_addr/mask>"
"via sr policy bsid <mpls_label> (fib-table <fib_table_index>)",
.long_help =
"\tSteer L3 traffic through an existing SR policy.\n"
"\tExamples:\n"
"\t\tsr steer l3 2001::/64 via sr_policy index 5\n"
"\t\tsr steer l3 2001::/64 via sr_policy bsid 29999\n"
"\t\tsr steer del l3 2001::/64 via sr_policy index 5\n",
}
static clib_error_t * sr_mpls_steer_policy_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (sr_mpls_steer_policy_command)

Definition at line 368 of file sr_mpls_steering.c.