Message ID | 20210204102338.128960-1-salems@nvidia.com |
---|---|
State | Rejected |
Headers | show |
Series | [ovs-dev,1/1] netdev-native-tnl: Set FLOW_TNL_F_UDPIF only if geneve options exists | expand |
On 2/4/21 11:23 AM, Salem Sol wrote: > 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@nvidia.com> > Reviewed-by: Eli Britstein <elibr@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); > Hi, thanks for the patch, but it's very similar to one submitted in December: http://patchwork.ozlabs.org/project/openvswitch/patch/1608075680-99704-1-git-send-email-yihung.wei@gmail.com/ We're still waiting for v2 of that patch, though. Best regards, Ilya Maximets.
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);