From patchwork Wed Oct 18 00:31:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Kumar X-Patchwork-Id: 827382 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yGtL60wRBz9t30 for ; Wed, 18 Oct 2017 11:32:13 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C059A941; Wed, 18 Oct 2017 00:32:09 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 31CE2941 for ; Wed, 18 Oct 2017 00:32:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from EX13-EDG-OU-001.vmware.com (ex13-edg-ou-001.vmware.com [208.91.0.189]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id A85964A5 for ; Wed, 18 Oct 2017 00:32:08 +0000 (UTC) Received: from sc9-mailhost1.vmware.com (10.113.161.71) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Tue, 17 Oct 2017 17:32:04 -0700 Received: from localhost.localdomain (htb-1s-eng-dhcp106.eng.vmware.com [10.33.78.106]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id E5719180B0; Tue, 17 Oct 2017 17:32:07 -0700 (PDT) From: Anand Kumar To: Date: Tue, 17 Oct 2017 17:31:59 -0700 Message-ID: <20171018003159.4056-1-kumaranand@vmware.com> X-Mailer: git-send-email 2.9.3.windows.1 MIME-Version: 1.0 Received-SPF: None (EX13-EDG-OU-001.vmware.com: kumaranand@vmware.com does not designate permitted sender hosts) X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] datapath-windows: Update OvsIPv4TunnelKey flags in geneve decap. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org 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 Acked-by: Nithin Raju Acked-by: Sairam Venugopal --- 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); tunKey->tunnelId = GENEVE_VNI_TO_TUNNELID(geneveHdr->vni); tunKey->tunOptLen = (uint8)geneveHdr->optLen * 4; if (tunKey->tunOptLen > TUN_OPT_MAX_LEN ||