[ovs-dev] [PATCH] datapath-windows: Update OvsIPv4TunnelKey flags in geneve decap.
Anand Kumar
kumaranand at vmware.com
Wed Oct 18 20:06:55 UTC 2017
Hi Shashank,
I have set the tunnel key flags OVS_TNL_F_GENEVE_OPT by default to match the linux behavior @https://github.com/openvswitch/ovs/blob/master/datapath/linux/compat/geneve.c#L242
Thanks,
Anand Kumar
On 10/18/17, 9:07 AM, "Shashank Ram" <rams at vmware.com> wrote:
On 10/17/17, 5:31 PM, "ovs-dev-bounces at openvswitch.org on behalf of Anand Kumar" <ovs-dev-bounces at openvswitch.org on behalf of kumaranand at vmware.com> wrote:
Set the geneve flags OVS_TNL_F_GENEVE_OPT and OVS_TNL_F_CRT_OPT
in OvsDecapGeneve, so that windows behavior is similiar to linux
https://github.com/openvswitch/ovs/blob/master/datapath/linux/compat/geneve.c#L242
Signed-off-by: Anand Kumar <kumaranand at vmware.com>
---
datapath-windows/ovsext/Geneve.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/datapath-windows/ovsext/Geneve.c b/datapath-windows/ovsext/Geneve.c
index 43374e2..77244b1 100644
--- a/datapath-windows/ovsext/Geneve.c
+++ b/datapath-windows/ovsext/Geneve.c
@@ -324,10 +324,10 @@ NDIS_STATUS OvsDecapGeneve(POVS_SWITCH_CONTEXT switchContext,
status = STATUS_NDIS_INVALID_PACKET;
goto dropNbl;
}
- tunKey->flags = OVS_TNL_F_KEY;
- if (geneveHdr->oam) {
- tunKey->flags |= OVS_TNL_F_OAM;
- }
+ /* Update tunnelKey flags. */
+ tunKey->flags = OVS_TNL_F_KEY | OVS_TNL_F_GENEVE_OPT |
+ (geneveHdr->oam ? OVS_TNL_F_OAM : 0) |
+ (geneveHdr->critical ? OVS_TNL_F_CRT_OPT : 0);
Shouldn’t OVS_TNL_F_GENEVE_OPT be set only when the options header is present?
tunKey->tunnelId = GENEVE_VNI_TO_TUNNELID(geneveHdr->vni);
tunKey->tunOptLen = (uint8)geneveHdr->optLen * 4;
if (tunKey->tunOptLen > TUN_OPT_MAX_LEN ||
--
_______________________________________________
More information about the dev
mailing list