diff options
author | Neale Ranns <nranns@cisco.com> | 2016-11-02 14:20:04 +0000 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-12-02 11:09:36 +0000 |
commit | ad422ed7eaafe993d5b530395cb11a708f2ed922 (patch) | |
tree | 6122391863894f619d13037581f8365ca3796f8f /vnet/vnet/fib/fib_types.c | |
parent | caffe0980adc852e6f6afaa2723bd5dd14658de3 (diff) |
MPLS infrastructure improvments
- deprecate MPLSoEth and MPLSoGRE; replace with generic MPLS tunnel.
- deprecates CLI 'mpls encap ..'; replace with addition of MPLS out label to a route/tunnel.
- support for MPLS 'routes', e.g. MPLS x-connects.
- deprecates CLI 'mpls decap ..'; replace with 'mpls route .. '
Change-Id: Ibda46544912f880d0200f22bf9ff9b52828fcc2f
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'vnet/vnet/fib/fib_types.c')
-rw-r--r-- | vnet/vnet/fib/fib_types.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/vnet/vnet/fib/fib_types.c b/vnet/vnet/fib/fib_types.c index f52de7b8be0..d25a7731c64 100644 --- a/vnet/vnet/fib/fib_types.c +++ b/vnet/vnet/fib/fib_types.c @@ -64,6 +64,16 @@ fib_prefix_from_ip46_addr (const ip46_address_t *addr, pfx->fp_addr = *addr; } +void +fib_prefix_from_mpls_label (mpls_label_t label, + fib_prefix_t *pfx) +{ + pfx->fp_proto = FIB_PROTOCOL_MPLS; + pfx->fp_len = 21; + pfx->fp_label = label; + pfx->fp_eos = MPLS_NON_EOS; +} + int fib_prefix_cmp (const fib_prefix_t *p1, const fib_prefix_t *p2) @@ -301,11 +311,6 @@ fib_forw_chain_type_to_dpo_proto (fib_forward_chain_type_t fct) case FIB_FORW_CHAIN_TYPE_ETHERNET: return (DPO_PROTO_ETHERNET); case FIB_FORW_CHAIN_TYPE_MPLS_EOS: - /* - * insufficient information to to convert - */ - ASSERT(0); - break; case FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS: return (DPO_PROTO_MPLS); } |