FD.io VPP
v20.01-48-g3e0dafb74
Vector Packet Processing
|
Segment Routing MPLS data structures definitions. More...
Go to the source code of this file.
Data Structures | |
struct | mpls_sr_sl_t |
SR Segment List (SID list) More... | |
struct | mpls_sr_policy_t |
struct | sr_mpls_steering_key_t |
Steering db key. More... | |
struct | mpls_sr_steering_policy_t |
struct | mpls_sr_main_t |
Segment Routing main datastructure. More... | |
Macros | |
#define | SR_POLICY_TYPE_DEFAULT 0 |
#define | SR_POLICY_TYPE_SPRAY 1 |
#define | SR_SEGMENT_LIST_WEIGHT_DEFAULT 1 |
#define | SR_STEER_IPV4 4 |
#define | SR_STEER_IPV6 6 |
#define | SR_TE_CO_BITS_00 0 |
#define | SR_TE_CO_BITS_01 1 |
#define | SR_TE_CO_BITS_10 2 |
#define | SR_TE_CO_BITS_11 3 |
Functions | |
int | sr_mpls_policy_add (mpls_label_t bsid, mpls_label_t *segments, u8 behavior, u32 weight) |
Create a new SR policy. More... | |
int | sr_mpls_policy_mod (mpls_label_t bsid, u8 operation, mpls_label_t *segments, u32 sl_index, u32 weight) |
Modify an existing SR policy. More... | |
int | sr_mpls_policy_del (mpls_label_t bsid) |
Delete a SR policy. More... | |
int | sr_mpls_policy_assign_endpoint_color (mpls_label_t bsid, ip46_address_t *endpoint, u8 endpoint_type, u32 color) |
Update the Endpoint,Color tuple of an SR policy. 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... | |
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... | |
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... | |
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... | |
Variables | |
mpls_sr_main_t | sr_mpls_main |
Segment Routing MPLS data structures definitions.
Definition in file sr_mpls.h.
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.
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.
int sr_mpls_policy_add | ( | mpls_label_t | bsid, |
mpls_label_t * | segments, | ||
u8 | behavior, | ||
u32 | weight | ||
) |
Create a new SR policy.
bsid | is the bindingSID of the SR Policy |
segments | is a vector of MPLS labels composing the segment list |
behavior | is the behavior of the SR policy. (default//spray) |
fib_table | is the VRF where to install the FIB entry for the BSID |
weight | is the weight of this specific SID list |
Definition at line 152 of file sr_mpls_policy.c.
int sr_mpls_policy_assign_endpoint_color | ( | mpls_label_t | bsid, |
ip46_address_t * | endpoint, | ||
u8 | endpoint_type, | ||
u32 | color | ||
) |
Update the Endpoint,Color tuple of an SR policy.
bsid | is the bindingSID of the SR Policy |
endpoint | represents the IP46 of the endpoint |
color | represents the color (u32) |
To reset to NULL use ~0 as parameters.
Definition at line 671 of file sr_mpls_policy.c.
int sr_mpls_policy_del | ( | mpls_label_t | bsid | ) |
Delete a SR policy.
bsid | is the bindingSID of the SR Policy |
index | is the index of the SR policy |
Definition at line 207 of file sr_mpls_policy.c.
int sr_mpls_policy_mod | ( | mpls_label_t | bsid, |
u8 | operation, | ||
mpls_label_t * | segments, | ||
u32 | sl_index, | ||
u32 | weight | ||
) |
Modify an existing SR policy.
The possible modifications are adding a new Segment List, modifying an existing Segment List (modify the weight only) and delete a given Segment List from the SR Policy.
bsid | is the bindingSID of the SR Policy |
fib_table | is the VRF where to install the FIB entry for the BSID |
operation | is the operation to perform (among the top ones) |
segments | is a vector of IPv6 address composing the segment list |
sl_index | is the index of the Segment List to modify/delete |
weight | is the weight of the sid list. optional. |
Definition at line 299 of file sr_mpls_policy.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.
mpls_sr_main_t sr_mpls_main |
Definition at line 42 of file sr_mpls_policy.c.