[ovs-dev] [PATCH 1/1] netdev-native-tnl: Set FLOW_TNL_F_UDPIF only if geneve options exists
Salem Sol
salems at nvidia.com
Thu Feb 4 10:23:38 UTC 2021
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 <salems at nvidia.com>
Reviewed-by: Eli Britstein <elibr at nvidia.com>
---
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
More information about the dev
mailing list