#include <vlib/vlib.h>
#include <vnet/pg/pg.h>
-#include <vnet/mpls/mpls.h>
+#include <vnet/mpls/mpls_lookup.h>
#include <vnet/fib/mpls_fib.h>
#include <vnet/dpo/load_balance_map.h>
#include <vnet/dpo/replicate_dpo.h>
/**
* The arc/edge from the MPLS lookup node to the MPLS replicate node
*/
-static u32 mpls_lookup_to_replicate_edge;
+u32 mpls_lookup_to_replicate_edge;
typedef struct {
u32 next_index;
t->next_index, t->lfib_index, t->lb_index, t->hash,
vnet_mpls_uc_get_label(
clib_net_to_host_u32(t->label_net_byte_order)),
- vnet_mpls_uc_get_s(t->label_net_byte_order));
+ vnet_mpls_uc_get_s(
+ clib_net_to_host_u32(t->label_net_byte_order)));
return s;
}
-/*
- * Compute flow hash.
- * We'll use it to select which adjacency to use for this flow. And other things.
- */
-always_inline u32
-mpls_compute_flow_hash (const mpls_unicast_header_t * hdr,
- flow_hash_config_t flow_hash_config)
-{
- /*
- * improve this to include:
- * - all labels in the stack.
- * - recognise entropy labels.
- *
- * We need to byte swap so we use the numerical value. i.e. an odd label
- * leads to an odd bucket. ass opposed to a label above and below value X.
- */
- return (vnet_mpls_uc_get_label(clib_net_to_host_u32(hdr->label_exp_s_ttl)));
-}
-
static inline uword
mpls_lookup (vlib_main_t * vm,
vlib_node_runtime_t * node,