aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/geneve
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/geneve')
-rw-r--r--src/plugins/geneve/geneve.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/geneve/geneve.c b/src/plugins/geneve/geneve.c
index f991af97571..2c6f1ffded5 100644
--- a/src/plugins/geneve/geneve.c
+++ b/src/plugins/geneve/geneve.c
@@ -150,6 +150,18 @@ geneve_tunnel_restack_dpo (geneve_tunnel_t * t)
FIB_FORW_CHAIN_TYPE_UNICAST_IP4 : FIB_FORW_CHAIN_TYPE_UNICAST_IP6;
fib_entry_contribute_forwarding (t->fib_entry_index, forw_type, &dpo);
+
+ /* geneve uses the flow hash as the udp source port
+ * hence the packet's hash is unknown at this time.
+ * However, we can still skip single bucket load balance dpo's */
+ while (DPO_LOAD_BALANCE == dpo.dpoi_type)
+ {
+ load_balance_t *lb = load_balance_get (dpo.dpoi_index);
+ if (lb->lb_n_buckets > 1)
+ break;
+
+ dpo_copy (&dpo, load_balance_get_bucket_i (lb, 0));
+ }
dpo_stack_from_node (encap_index, &t->next_dpo, &dpo);
dpo_reset (&dpo);
}