ip: Router ID included in flow hash
[vpp.git] / src / vnet / mpls / mpls_lookup.h
index 95558e0..81c67ce 100644 (file)
 #include <vnet/mpls/mpls.h>
 #include <vnet/ip/ip.h>
 #include <vnet/bier/bier_fwd.h>
+#include <vnet/ip/ip4_inlines.h>
+#include <vnet/ip/ip6_inlines.h>
 
 /**
  * The arc/edge from the MPLS lookup node to the MPLS replicate node
  */
-u32 mpls_lookup_to_replicate_edge;
+extern u32 mpls_lookup_to_replicate_edge;
 
 /**
  * Enum of statically configred MPLS lookup next nodes
@@ -51,6 +53,7 @@ mpls_compute_flow_hash (const mpls_unicast_header_t * hdr,
 
     ho_label = clib_net_to_host_u32(hdr->label_exp_s_ttl);
     hash = vnet_mpls_uc_get_label(ho_label);
+    hash ^= ip_flow_hash_router_id;
     next_label_is_entropy = 0;
 
     while (MPLS_EOS != vnet_mpls_uc_get_s(ho_label))