aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ip/ip4_forward.c11
-rw-r--r--src/vnet/ip/ip6_forward.c11
2 files changed, 10 insertions, 12 deletions
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index fe4d6767d0c..b3721e63d97 100644
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -586,8 +586,7 @@ ip4_load_balance (vlib_main_t * vm,
* We don't want to use the same hash value at each level in the recursion
* graph as that would lead to polarisation
*/
- hc0 = vnet_buffer (p0)->ip.flow_hash = 0;
- hc1 = vnet_buffer (p1)->ip.flow_hash = 0;
+ hc0 = hc1 = 0;
if (PREDICT_FALSE (lb0->lb_n_buckets > 1))
{
@@ -599,7 +598,7 @@ ip4_load_balance (vlib_main_t * vm,
else
{
hc0 = vnet_buffer (p0)->ip.flow_hash =
- ip4_compute_flow_hash (ip0, hc0);
+ ip4_compute_flow_hash (ip0, lb0->lb_hash_config);
}
}
if (PREDICT_FALSE (lb1->lb_n_buckets > 1))
@@ -612,7 +611,7 @@ ip4_load_balance (vlib_main_t * vm,
else
{
hc1 = vnet_buffer (p1)->ip.flow_hash =
- ip4_compute_flow_hash (ip1, hc1);
+ ip4_compute_flow_hash (ip1, lb1->lb_hash_config);
}
}
@@ -662,7 +661,7 @@ ip4_load_balance (vlib_main_t * vm,
lb0 = load_balance_get (lbi0);
- hc0 = vnet_buffer (p0)->ip.flow_hash = 0;
+ hc0 = 0;
if (PREDICT_FALSE (lb0->lb_n_buckets > 1))
{
if (PREDICT_TRUE (vnet_buffer (p0)->ip.flow_hash))
@@ -673,7 +672,7 @@ ip4_load_balance (vlib_main_t * vm,
else
{
hc0 = vnet_buffer (p0)->ip.flow_hash =
- ip4_compute_flow_hash (ip0, hc0);
+ ip4_compute_flow_hash (ip0, lb0->lb_hash_config);
}
}
diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c
index 2388a30e7ed..066ee54b884 100644
--- a/src/vnet/ip/ip6_forward.c
+++ b/src/vnet/ip/ip6_forward.c
@@ -766,8 +766,7 @@ ip6_load_balance (vlib_main_t * vm,
* We don't want to use the same hash value at each level in the recursion
* graph as that would lead to polarisation
*/
- hc0 = vnet_buffer (p0)->ip.flow_hash = 0;
- hc1 = vnet_buffer (p1)->ip.flow_hash = 0;
+ hc0 = hc1 = 0;
if (PREDICT_FALSE (lb0->lb_n_buckets > 1))
{
@@ -779,7 +778,7 @@ ip6_load_balance (vlib_main_t * vm,
else
{
hc0 = vnet_buffer (p0)->ip.flow_hash =
- ip6_compute_flow_hash (ip0, hc0);
+ ip6_compute_flow_hash (ip0, lb0->lb_hash_config);
}
}
if (PREDICT_FALSE (lb1->lb_n_buckets > 1))
@@ -792,7 +791,7 @@ ip6_load_balance (vlib_main_t * vm,
else
{
hc1 = vnet_buffer (p1)->ip.flow_hash =
- ip6_compute_flow_hash (ip1, hc1);
+ ip6_compute_flow_hash (ip1, lb1->lb_hash_config);
}
}
@@ -857,7 +856,7 @@ ip6_load_balance (vlib_main_t * vm,
lb0 = load_balance_get (lbi0);
- hc0 = vnet_buffer (p0)->ip.flow_hash = 0;
+ hc0 = 0;
if (PREDICT_FALSE (lb0->lb_n_buckets > 1))
{
if (PREDICT_TRUE (vnet_buffer (p0)->ip.flow_hash))
@@ -868,7 +867,7 @@ ip6_load_balance (vlib_main_t * vm,
else
{
hc0 = vnet_buffer (p0)->ip.flow_hash =
- ip6_compute_flow_hash (ip0, hc0);
+ ip6_compute_flow_hash (ip0, lb0->lb_hash_config);
}
}
dpo0 =