diff options
author | Neale Ranns <nranns@cisco.com> | 2018-02-23 05:29:09 -0800 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-03-09 11:59:58 +0000 |
commit | 31ed74407643595fdce206e9d7487108fb8b33ab (patch) | |
tree | c22c3703c30b7d457b858fe899f56e57613cbb52 /src/vnet/bier/bier_fmask.c | |
parent | 8f931a47b0fa58d5d33a792062650a42ff8bef70 (diff) |
MPLS Unifom mode
- support both pipe and uniform modes for all MPLS LSP
- all API programming for output-labels requires that the mode (and associated data) is specificed
- API changes in MPLS, BIER and IP are involved
- new DPO [sub] types for MPLS labels to handle the two modes.
Change-Id: I87b76401e996f10dfbdbe4552ff6b19af958783c
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/bier/bier_fmask.c')
-rw-r--r-- | src/vnet/bier/bier_fmask.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/vnet/bier/bier_fmask.c b/src/vnet/bier/bier_fmask.c index 2fc24dca819..31d884af060 100644 --- a/src/vnet/bier/bier_fmask.c +++ b/src/vnet/bier/bier_fmask.c @@ -177,16 +177,13 @@ bier_fmask_init (bier_fmask_t *bfm, if (!(bfm->bfm_flags & BIER_FMASK_FLAG_DISP)) { - /* - * leave this label in host byte order so we can OR in the TTL - */ if (NULL != rpaths->frp_label_stack) { - olabel = rpaths->frp_label_stack[0]; + olabel = rpaths->frp_label_stack[0].fml_value; vnet_mpls_uc_set_label(&bfm->bfm_label, olabel); vnet_mpls_uc_set_exp(&bfm->bfm_label, 0); vnet_mpls_uc_set_s(&bfm->bfm_label, 1); - vnet_mpls_uc_set_ttl(&bfm->bfm_label, 0); + vnet_mpls_uc_set_ttl(&bfm->bfm_label, 64); bfm->bfm_flags |= BIER_FMASK_FLAG_MPLS; } else @@ -207,7 +204,9 @@ bier_fmask_init (bier_fmask_t *bfm, vnet_mpls_uc_set_label(&bfm->bfm_label, id); vnet_mpls_uc_set_s(&bfm->bfm_label, 1); vnet_mpls_uc_set_exp(&bfm->bfm_label, 0); + vnet_mpls_uc_set_ttl(&bfm->bfm_label, 64); } + bfm->bfm_label = clib_host_to_net_u32(bfm->bfm_label); } bfm->bfm_pl = fib_path_list_create((FIB_PATH_LIST_FLAG_SHARED | |