From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 9B72C4C9D; Mon, 21 Jan 2019 07:42:45 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id B53F740006C; Mon, 21 Jan 2019 06:42:44 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 20 Jan 2019 22:42:41 -0800 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Sun, 20 Jan 2019 22:42:41 -0800 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id x0L6geZu032045; Mon, 21 Jan 2019 06:42:40 GMT Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 385BC1616EF; Mon, 21 Jan 2019 06:42:40 +0000 (GMT) From: Andrew Rybchenko To: Jiayu Hu CC: , Date: Mon, 21 Jan 2019 06:42:38 +0000 Message-ID: <1548052958-9943-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1547818111-21817-1-git-send-email-arybchenko@solarflare.com> References: <1547818111-21817-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24376.006 X-TM-AS-Result: No-1.177600-4.000000-10 X-TMASE-MatchedRID: bs8P2jcUcu+Q6w1ORN+qMUyQ5fRSh265CZd9XmacsKSjxYyRBa/qJcFw gTvxipFajoczmuoPCq2V5eB1CEa/QXirjfLgLzoiMDhN6Lb3hiw7aww1dFuDKVTl/H43quIbLLE mvowdICHSlv1f7Y3vytJ4oLTSDSdd/P60wAOO7/OF15h6/oibNbKsWJ44GuEGPNxau39/BitFwH Zmk+dWMmhnUCrcDtVn X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.177600-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24376.006 X-MDID: 1548052965-FvRfVWmfBoC4 Subject: [dpdk-dev] [PATCH v3] gso: fix VxLAN/GRE tunnel checks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jan 2019 06:42:45 -0000 Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits. As the result, for example, IPIP or MPLSinUDP tunnel packets may be incorrectly treated internally as VXLAN. Fixes: b058d92ea95d ("gso: support VxLAN GSO") Fixes: 70e737e448c7 ("gso: support GRE GSO") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko --- lib/librte_gso/gso_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h index 6cd764ff5..b6ff1b886 100644 --- a/lib/librte_gso/gso_common.h +++ b/lib/librte_gso/gso_common.h @@ -22,12 +22,12 @@ (PKT_TX_TCP_SEG | PKT_TX_IPV4)) #define IS_IPV4_VXLAN_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \ - PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_VXLAN)) == \ + PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_MASK)) == \ (PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 | \ PKT_TX_TUNNEL_VXLAN)) #define IS_IPV4_GRE_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \ - PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_GRE)) == \ + PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_MASK)) == \ (PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 | \ PKT_TX_TUNNEL_GRE)) -- 2.17.1