FD.io VPP
v19.08.3-2-gbabecb413
Vector Packet Processing
|
Packet steering into SR-MPLS Policies. More...
Go to the source code of this file.
Macros | |
#define | SRMPLS_TE_OFFSET 50 |
Functions | |
int | sort_color_descent (const u32 *x, u32 *y) |
function to sort the colors in descending order More... | |
u32 | find_or_create_internal_label (ip46_address_t endpoint, u32 color) |
find the corresponding label for (endpoint, color) and lock it endpoint might be NULL or ANY NULL = 0, ANY=~0 More... | |
static void | internal_label_lock_co (ip46_address_t endpoint, u32 color, char co_bits) |
void | internal_label_lock (ip46_address_t endpoint, u32 color) |
lock the label for (NH, C) endpoint might be NULL or ANY NULL = 0, ANY=~0 More... | |
static void | internal_label_unlock_co (ip46_address_t endpoint, u32 color, char co_bits) |
void | internal_label_unlock (ip46_address_t endpoint, u32 color) |
Release lock on label for (endpoint, color) endpoint might be NULL or ANY NULL = 0, ANY=~0. More... | |
void | compute_sr_te_automated_steering_fib_entry (mpls_sr_steering_policy_t *steer_pl) |
function to update the FIB More... | |
int | sr_mpls_steering_policy_add (mpls_label_t bsid, u32 table_id, ip46_address_t *prefix, u32 mask_width, u8 traffic_type, ip46_address_t *next_hop, u8 nh_type, u32 color, char co_bits, mpls_label_t vpn_label) |
Steer traffic L3 traffic through a given SR-MPLS policy. More... | |
int | sr_mpls_steering_policy_del (ip46_address_t *prefix, u32 mask_width, u8 traffic_type, u32 table_id, u32 color) |
Delete steering rule for an SR-MPLS policy. More... | |
static clib_error_t * | sr_mpls_steer_policy_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
static clib_error_t * | show_sr_mpls_steering_policies_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
clib_error_t * | sr_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... | |
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:
Definition in file sr_mpls_steering.c.
#define SRMPLS_TE_OFFSET 50 |
Definition at line 42 of file sr_mpls_steering.c.
void compute_sr_te_automated_steering_fib_entry | ( | mpls_sr_steering_policy_t * | steer_pl | ) |
function to update the FIB
Definition at line 225 of file sr_mpls_steering.c.
find the corresponding label for (endpoint, color) and lock it endpoint might be NULL or ANY NULL = 0, ANY=~0
Definition at line 60 of file sr_mpls_steering.c.
void internal_label_lock | ( | ip46_address_t | endpoint, |
u32 | color | ||
) |
lock the label for (NH, C) endpoint might be NULL or ANY NULL = 0, ANY=~0
Definition at line 125 of file sr_mpls_steering.c.
|
inlinestatic |
Definition at line 96 of file sr_mpls_steering.c.
void internal_label_unlock | ( | ip46_address_t | endpoint, |
u32 | color | ||
) |
Release lock on label for (endpoint, color) endpoint might be NULL or ANY NULL = 0, ANY=~0.
Definition at line 179 of file sr_mpls_steering.c.
|
inlinestatic |
Definition at line 150 of file sr_mpls_steering.c.
|
static |
function to sort the colors in descending order
Definition at line 48 of file sr_mpls_steering.c.
|
static |
clib_error_t* sr_mpls_steering_init | ( | vlib_main_t * | vm | ) |
Definition at line 884 of file sr_mpls_steering.c.
int sr_mpls_steering_policy_add | ( | mpls_label_t | bsid, |
u32 | table_id, | ||
ip46_address_t * | prefix, | ||
u32 | mask_width, | ||
u8 | traffic_type, | ||
ip46_address_t * | next_hop, | ||
u8 | nh_type, | ||
u32 | color, | ||
char | co_bits, | ||
mpls_label_t | vpn_label | ||
) |
Steer traffic L3 traffic through a given SR-MPLS policy.
is_del | |
bsid | is the bindingSID of the SR Policy (alt to sr_policy_index) |
sr_policy | is the index of the SR Policy (alt to bsid) |
table_id | is the VRF where to install the FIB entry for the BSID |
prefix | is the IPv4/v6 address for L3 traffic type |
mask_width | is the mask for L3 traffic type |
traffic_type | describes the type of traffic |
next_hop | SR TE Next-Hop |
nh_type | is the AF of Next-Hop |
color | SR TE color |
co_bits | SR TE color-only bits |
Definition at line 380 of file sr_mpls_steering.c.
int sr_mpls_steering_policy_del | ( | ip46_address_t * | prefix, |
u32 | mask_width, | ||
u8 | traffic_type, | ||
u32 | table_id, | ||
u32 | color | ||
) |
Delete steering rule for an SR-MPLS policy.
is_del | |
bsid | is the bindingSID of the SR Policy (alt to sr_policy_index) |
sr_policy | is the index of the SR Policy (alt to bsid) |
table_id | is the VRF where to install the FIB entry for the BSID |
prefix | is the IPv4/v6 address for L3 traffic type |
mask_width | is the mask for L3 traffic type |
traffic_type | describes the type of traffic |
next_hop | SR TE Next-HOP |
nh_type | is the AF of Next-Hop |
color | SR TE color |
Definition at line 547 of file sr_mpls_steering.c.
|
static |
(constructor) VLIB_CLI_COMMAND (show_sr_mpls_steering_policies_command)
Definition at line 875 of file sr_mpls_steering.c.
|
static |
(constructor) VLIB_CLI_COMMAND (sr_mpls_steer_policy_command)
Definition at line 774 of file sr_mpls_steering.c.