aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/bier/bier_update.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-12-05 13:24:04 -0800
committerFlorin Coras <florin.coras@gmail.com>2017-12-09 20:55:08 +0000
commit9128637ee8f7b0d903551f165a1447d427e8dd19 (patch)
tree244014dd1064643946d64066e352ee1627bf622c /src/vnet/bier/bier_update.c
parentcef87f1a5eb4d69cf11ce1cd3c5506edcfba74c4 (diff)
BIER in non-MPLS netowrks
as decsribed in section 2.2 ihttps://tools.ietf.org/html/draft-ietf-bier-mpls-encapsulation-10 with BIFT encoding from: https://tools.ietf.org/html/draft-wijnandsxu-bier-non-mpls-bift-encoding-00 changes: 1 - introduce the new BIFT lookup table. BIER tables that have an associated MPLS label are added to the MPLS-FIB. Those that don't are added to the BIER table 2 - BIER routes that have no associated output MPLS label will add a BIFT label. 3 - The BIER FMask has a path-list as a member to resolve via any possible path. Change-Id: I1fd4d9dbd074f0e855c16e9329b81460ebe1efce Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/bier/bier_update.c')
-rw-r--r--src/vnet/bier/bier_update.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/vnet/bier/bier_update.c b/src/vnet/bier/bier_update.c
index c66090f3cba..326f8bf3f0b 100644
--- a/src/vnet/bier/bier_update.c
+++ b/src/vnet/bier/bier_update.c
@@ -32,6 +32,8 @@ vnet_bier_table_cmd (vlib_main_t * vm,
};
u32 is_add = 0;
+ local_label = MPLS_LABEL_INVALID;
+
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) {
if (unformat (input, "del")) {
is_add = 0;
@@ -66,7 +68,7 @@ done:
VLIB_CLI_COMMAND (bier_table_command) = {
.path = "bier table",
- .short_help = "Add/delete BIER Tables",
+ .short_help = "bier table [add|del] sd <sub-domain> set <SET> bsl <bit-string-length> [mpls <label>]",
.function = vnet_bier_table_cmd,
};
@@ -81,6 +83,7 @@ vnet_bier_route_cmd (vlib_main_t * vm,
};
u32 hdr_len, payload_proto;
bier_table_id_t bti = {
+ .bti_ecmp = BIER_ECMP_TABLE_ID_MAIN,
};
bier_bp_t bp;
u32 add = 1;
@@ -90,6 +93,8 @@ vnet_bier_route_cmd (vlib_main_t * vm,
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) {
if (unformat (input, "del")) {
add = 0;
+ } else if (unformat (input, "add")) {
+ add = 1;
} else if (unformat (input, "sd %d", &bti.bti_sub_domain)) {
} else if (unformat (input, "set %d", &bti.bti_set)) {
} else if (unformat (input, "bsl %d", &hdr_len)) {
@@ -110,11 +115,11 @@ vnet_bier_route_cmd (vlib_main_t * vm,
if (add)
{
- bier_table_route_add(&bti, bp, &brp);
+ bier_table_route_add(&bti, bp, brps);
}
else
{
- bier_table_route_remove(&bti, bp, &brp);
+ bier_table_route_remove(&bti, bp, brps);
}
done:
@@ -124,7 +129,7 @@ done:
VLIB_CLI_COMMAND (bier_route_command) = {
.path = "bier route",
- .short_help = "bier route sd <sud-domain> set <set> bsl <bit-string-length> bp <bit-position> via [next-hop-address] [next-hop-interface] [next-hop-table <value>] [weight <value>] [preference <value>] [udp-encap-id <value>] [ip4-lookup-in-table <value>] [ip6-lookup-in-table <value>] [mpls-lookup-in-table <value>] [resolve-via-host] [resolve-via-connected] [rx-ip4 <interface>] [out-labels <value value value>]",
+ .short_help = "bier route [add|del] sd <sud-domain> set <set> bsl <bit-string-length> bp <bit-position> via [next-hop-address] [next-hop-interface] [next-hop-table <value>] [weight <value>] [preference <value>] [udp-encap-id <value>] [ip4-lookup-in-table <value>] [ip6-lookup-in-table <value>] [mpls-lookup-in-table <value>] [resolve-via-host] [resolve-via-connected] [rx-ip4 <interface>] [out-labels <value value value>]",
.function = vnet_bier_route_cmd,
};