From patchwork Mon May 30 02:54:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 1636751 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=PtGJemLu; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LBKld3lHgz9s0w for ; Mon, 30 May 2022 12:55:25 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id F1C208423F; Mon, 30 May 2022 02:55:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2TIVS9ujakEm; Mon, 30 May 2022 02:55:22 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3F96084214; Mon, 30 May 2022 02:55:21 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EC7CBC0039; Mon, 30 May 2022 02:55:20 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6107DC002D for ; Mon, 30 May 2022 02:55:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3DDF540125 for ; Mon, 30 May 2022 02:55:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XkG6EYnQQmbn for ; Mon, 30 May 2022 02:55:17 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by smtp2.osuosl.org (Postfix) with ESMTPS id 51F354000B for ; Mon, 30 May 2022 02:55:17 +0000 (UTC) Received: by mail-pl1-x634.google.com with SMTP id d22so9131363plr.9 for ; Sun, 29 May 2022 19:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Gvrj2TVzFh1SAxeK7JADjm6zX5B2Zze65Qp6fbt9tKA=; b=PtGJemLuQQj7RpzI7kEkMoqUehaVXR4bZ+S5ZFU5GCRQoYAoCZNFZVjFwbRvccSxgM IqnRQbi2GQa2DV+xwyDUtzf7YHa533ZfqzZ9gc12c28WHgSUc2BAHtq8qXlY/3dBtEmD HkITcAQLARNLBtXANIC8MMFSft5aLcq5fbu2TPdqrzB0WSXRxVc9QrstQltk0Yl2vK0+ nsfVkKAIrbuh2EzDp4JQMjS8IVmkw6CKupVhuDgEpSgvjUZ7ytAQkqi+1WIQZIOw14nh m2QQ++6LnpOmwT7z1LKQusY0ZJWMY1UiChqR6/JszKIqSTtIZk404A5RlLCa7oP0MeHb ALJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Gvrj2TVzFh1SAxeK7JADjm6zX5B2Zze65Qp6fbt9tKA=; b=7XMp9CB6tTsZU6wXGdL7A+c/1QTB3vezeiM/74o6fs81g7jNDjCNhUZKrknFRhaNy7 gMTTcp33XJ+xZo/AUNfYlHVIgKU0jdeAVbUKUaf5IPWyf78vwzzsTb10IjSWkCE+IXlE sg9thIx2chLqnZn1ic72p5ugowL2AAnBhiq/AUzx5Iih0tnGx/iffP4MBcs5YT1Qyia5 Vkp5j1+R+KSH6RDVaAqyVF1DJFM6MjOQ9LWvRy8f3NLCUOy093mLAcWcP/Pi7ApXjkCn xreTcT6npALmw9Ke6xS03IoYbD3OCr2IPWxNV8BL6OvXiok9onN+6HDYyiNwANU4mZVP uceg== X-Gm-Message-State: AOAM533ndf7Wwziub8InF6NuRZh8Wf5oQbSpyhAYBHKcs66Jc0fqTH/E p6iqaVvFD/3rzEtxQixP9bYzuMByzjk= X-Google-Smtp-Source: ABdhPJyLmSkRqftv4Tt/QiwoohM0xzHy7Ka4FC3BjKOOKbzzQFHoXzvJhQhF2AqLst0WWqimo0fIug== X-Received: by 2002:a17:902:bf06:b0:14d:8c72:96c6 with SMTP id bi6-20020a170902bf0600b0014d8c7296c6mr54283022plb.156.1653879316289; Sun, 29 May 2022 19:55:16 -0700 (PDT) Received: from sc9-mailhost2.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id c9-20020a17090a8d0900b001e2cbb55b45sm2214412pjo.53.2022.05.29.19.55.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 May 2022 19:55:15 -0700 (PDT) From: William Tu To: dev@openvswitch.org Date: Sun, 29 May 2022 19:54:45 -0700 Message-Id: <20220530025445.1750-1-u9012063@gmail.com> X-Mailer: git-send-email 2.33.0.windows.2 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH v2] datapath-windows: Fix GRE/VxLAN/STT Tunnel RX. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" GRE/Vxlan/STT tunnel RX is broken due to incorrecly checking the 'tunKey->dst.si_family != AF_INET', which is actually set later after parsing the GRE header. Removing such chunk makes tunnel works. Fixes: edb2335861d6 ("datapath-windows: Add IPv6 Geneve tunnel support in Windows") Cc: Alin-Gabriel Serdean Signed-off-by: William Tu Signed-off-by: William Tu --- v2: talked to Wilson and add fixes to Vxlan.c and Stt.c --- datapath-windows/ovsext/Gre.c | 5 ----- datapath-windows/ovsext/Stt.c | 6 ------ datapath-windows/ovsext/Vxlan.c | 5 ----- 3 files changed, 16 deletions(-) diff --git a/datapath-windows/ovsext/Gre.c b/datapath-windows/ovsext/Gre.c index d87864029..54725dd17 100644 --- a/datapath-windows/ovsext/Gre.c +++ b/datapath-windows/ovsext/Gre.c @@ -332,11 +332,6 @@ OvsDecapGre(POVS_SWITCH_CONTEXT switchContext, *newNbl = NULL; - if (tunKey->dst.si_family != AF_INET) { - /*V6 tunnel support will be supported later*/ - return NDIS_STATUS_FAILURE; - } - status = OvsExtractLayers(curNbl, &layers); if (status != NDIS_STATUS_SUCCESS) { return status; diff --git a/datapath-windows/ovsext/Stt.c b/datapath-windows/ovsext/Stt.c index ebdebb690..09d317934 100644 --- a/datapath-windows/ovsext/Stt.c +++ b/datapath-windows/ovsext/Stt.c @@ -931,12 +931,6 @@ OvsDecapStt(POVS_SWITCH_CONTEXT switchContext, UINT32 advanceCnt, hdrLen; OVS_PACKET_HDR_INFO layers = { 0 }; - - if (tunKey->dst.si_family != AF_INET) { - /*V6 tunnel support will be supported later*/ - return NDIS_STATUS_FAILURE; - } - status = OvsExtractLayers(curNbl, &layers); if (status != NDIS_STATUS_SUCCESS) { return status; diff --git a/datapath-windows/ovsext/Vxlan.c b/datapath-windows/ovsext/Vxlan.c index d2c7a4a46..b268e7de2 100644 --- a/datapath-windows/ovsext/Vxlan.c +++ b/datapath-windows/ovsext/Vxlan.c @@ -412,11 +412,6 @@ OvsDecapVxlan(POVS_SWITCH_CONTEXT switchContext, NDIS_STATUS status; OVS_PACKET_HDR_INFO layers = { 0 }; - if (tunKey->dst.si_family != AF_INET) { - /*V6 tunnel support will be supported later*/ - return NDIS_STATUS_FAILURE; - } - status = OvsExtractLayers(curNbl, &layers); if (status != NDIS_STATUS_SUCCESS) { return status;