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 B1B5E4C91; Mon, 21 Jan 2019 07:28:08 +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 AE42C780064; Mon, 21 Jan 2019 06:28:07 +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:28:04 -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:28:04 -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 x0L6S3E3014804; Mon, 21 Jan 2019 06:28:03 GMT Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 401C11616EF; Mon, 21 Jan 2019 06:28:03 +0000 (GMT) From: Andrew Rybchenko To: Jiayu Hu CC: , Date: Mon, 21 Jan 2019 06:27:59 +0000 Message-ID: <1548052079-19045-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.861200-4.000000-10 X-TMASE-MatchedRID: vZeKjQDJ40UD2WXLXdz+ASPX+ZVQuTz0myiLZetSf8mfop0ytGwvXiq2 rl3dzGQ1Wz5CTyymPMvS+EXNM9a9iiioeyaRVUwkMCgkvZ/zjsT2+XGn0UnTqPTf76n8cTbzMiB 0iZ/OlE8ZJq14MKqN9Xsv1cScW4RzQK3Ij3iKlkU4oGQUCbwY5Q+g7mdwjo656FtDZCmYBJ3KTL w/lNgw8g== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.861200-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24376.006 X-MDID: 1548052088-M7Bkk7oHgLom Subject: [dpdk-stable] [PATCH v2] gso: fix VxLAN/GRE tunnel checks X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jan 2019 06:28:08 -0000 Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits. As the result, for example, IPIP or MPLSinUDP tunnel packets may be incorrected 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