FLOW_TNL_F_UDPIF is always set for geneve, which leads to wrong miniflow
bits mapping in case of a flow modification.
Fix it by setting the bit only if geneve options exist.

Fixes: ("6728d578f64e dpif-netdev: Translate Geneve options per-flow, not 
per-packet.")
Signed-off-by: Salem Sol <[email protected]>
Reviewed-by: Eli Britstein <[email protected]>
---
 lib/netdev-native-tnl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/netdev-native-tnl.c b/lib/netdev-native-tnl.c
index b89dfdd52..3a8b2ea1c 100644
--- a/lib/netdev-native-tnl.c
+++ b/lib/netdev-native-tnl.c
@@ -1017,7 +1017,9 @@ netdev_geneve_pop_header(struct dp_packet *packet)
 
     memcpy(tnl->metadata.opts.gnv, gnh->options, opts_len);
     tnl->metadata.present.len = opts_len;
-    tnl->flags |= FLOW_TNL_F_UDPIF;
+    if (opts_len) {
+        tnl->flags |= FLOW_TNL_F_UDPIF;
+    }
 
     packet->packet_type = htonl(PT_ETH);
     dp_packet_reset_packet(packet, hlen);
-- 
2.21.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to