aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/fib/mpls_fib.h5
-rw-r--r--src/vnet/mpls/mpls_lookup.h12
2 files changed, 9 insertions, 8 deletions
diff --git a/src/vnet/fib/mpls_fib.h b/src/vnet/fib/mpls_fib.h
index 8d18b008b0e..33eaa88ca9d 100644
--- a/src/vnet/fib/mpls_fib.h
+++ b/src/vnet/fib/mpls_fib.h
@@ -34,9 +34,10 @@
#define MPLS_FIB_DB_SIZE (1 << (MPLS_FIB_KEY_SIZE-1))
/**
- * There are no options for controlling the MPLS flow hash
+ * There are no options for controlling the MPLS flow hash,
+ * but since it mostly entails using IP data to create one, use that.
*/
-#define MPLS_FLOW_HASH_DEFAULT 0
+#define MPLS_FLOW_HASH_DEFAULT IP_FLOW_HASH_DEFAULT
typedef struct mpls_fib_t_
{
diff --git a/src/vnet/mpls/mpls_lookup.h b/src/vnet/mpls/mpls_lookup.h
index 81c67cef8ee..db1cf3d776f 100644
--- a/src/vnet/mpls/mpls_lookup.h
+++ b/src/vnet/mpls/mpls_lookup.h
@@ -96,14 +96,14 @@ mpls_compute_flow_hash (const mpls_unicast_header_t * hdr,
{
case 4:
/* incorporate the v4 flow-hash */
- hash ^= ip4_compute_flow_hash ((const ip4_header_t *)hdr,
- IP_FLOW_HASH_DEFAULT);
- break;
+ hash ^=
+ ip4_compute_flow_hash ((const ip4_header_t *) hdr, flow_hash_config);
+ break;
case 6:
/* incorporate the v6 flow-hash */
- hash ^= ip6_compute_flow_hash ((const ip6_header_t *)hdr,
- IP_FLOW_HASH_DEFAULT);
- break;
+ hash ^=
+ ip6_compute_flow_hash ((const ip6_header_t *) hdr, flow_hash_config);
+ break;
case 5:
/* incorporate the bier flow-hash */
hash ^= bier_compute_flow_hash ((const bier_hdr_t *)hdr);