static const char* fib_forw_chain_names[] = FIB_FORW_CHAINS;
u8 *
-format_fib_protocol (u8 * s, va_list ap)
+format_fib_protocol (u8 * s, va_list * ap)
{
- fib_protocol_t proto = va_arg(ap, int); // fib_protocol_t promotion
+ fib_protocol_t proto = va_arg(*ap, int); // fib_protocol_t promotion
return (format (s, "%s", fib_protocol_names[proto]));
}
u8 *
-format_vnet_link (u8 * s, va_list ap)
+format_vnet_link (u8 * s, va_list * ap)
{
- vnet_link_t link = va_arg(ap, int); // vnet_link_t promotion
+ vnet_link_t link = va_arg(*ap, int); // vnet_link_t promotion
return (format (s, "%s", vnet_link_names[link]));
}
void
fib_prefix_from_mpls_label (mpls_label_t label,
+ mpls_eos_bit_t eos,
fib_prefix_t *pfx)
{
pfx->fp_proto = FIB_PROTOCOL_MPLS;
pfx->fp_len = 21;
pfx->fp_label = label;
- pfx->fp_eos = MPLS_NON_EOS;
+ pfx->fp_eos = eos;
}
int
if (0 != res) return (res);
- if (~0 != rpath1->frp_sw_if_index &&
- ~0 != rpath2->frp_sw_if_index)
- {
- res = vnet_sw_interface_compare(vnet_get_main(),
- rpath1->frp_sw_if_index,
- rpath2->frp_sw_if_index);
- }
- else
- {
- res = rpath1->frp_sw_if_index - rpath2->frp_sw_if_index;
- }
+ res = (rpath1->frp_sw_if_index - rpath2->frp_sw_if_index);
if (0 != res) return (res);
return (FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS);
case DPO_PROTO_ETHERNET:
return (FIB_FORW_CHAIN_TYPE_ETHERNET);
+ case DPO_PROTO_NSH:
+ return (FIB_FORW_CHAIN_TYPE_NSH);
}
ASSERT(0);
return (FIB_FORW_CHAIN_TYPE_UNICAST_IP4);
return (VNET_LINK_IP6);
case FIB_FORW_CHAIN_TYPE_ETHERNET:
return (VNET_LINK_ETHERNET);
+ case FIB_FORW_CHAIN_TYPE_NSH:
+ return (VNET_LINK_NSH);
case FIB_FORW_CHAIN_TYPE_MPLS_EOS:
/*
* insufficient information to to convert
return (DPO_PROTO_IP6);
case FIB_FORW_CHAIN_TYPE_ETHERNET:
return (DPO_PROTO_ETHERNET);
+ case FIB_FORW_CHAIN_TYPE_NSH:
+ return (DPO_PROTO_NSH);
case FIB_FORW_CHAIN_TYPE_MPLS_EOS:
case FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS:
return (DPO_PROTO_MPLS);