From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9C025A04DB for ; Tue, 17 Nov 2020 12:15:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 95451F3E; Tue, 17 Nov 2020 12:15:00 +0100 (CET) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by dpdk.org (Postfix) with ESMTP id A48CBF3E for ; Tue, 17 Nov 2020 12:14:58 +0100 (CET) Received: by mail-wm1-f44.google.com with SMTP id h21so2859093wmb.2 for ; Tue, 17 Nov 2020 03:14:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LgfWa2sqdoubInLaBk0TXn83NDK3DAiIBlmhXQJ6yB0=; b=IXoWg/bIeECy0QkWL9tQAAM22kOBEog/hoFx3zI9AgMinOtQkeH+/SSsH3fYQXB8ro NaQg7isFBPPioKU9NAIb2wYDxoULdMHe6thusNJZdgl7OKMHGINuL0SwJjEqNoso5EeS Dklfu1NANuLLDgxw2i9zaUZhxTDXomus5znk37TFMOvILDR1riJMrwPqg57D86789xnT aj8vPxU6A/Lsg77/dokYgO4+QQlLNpiZVjYiG9orNsuIuaAVNHaRdY3xQyUjW9cCl/VP ReZIRzkb/O3c4Wn2OOi+NlLwHBvNB153X1VxgdQ/EIr8puKGdQa/RviGfDlz10kDLzSC nawQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LgfWa2sqdoubInLaBk0TXn83NDK3DAiIBlmhXQJ6yB0=; b=g9YkgbGb/+Rozurn1ACIPDuEy+XqqwJ5AZfBFQ32pWgru4zKDCD/WG+bOZMhKlg7hx ipnOt00HQPaSukqFY3MduN5qAiqPF8kK57i/GXFw2NymmmGqd2dP8wApufQPWfmi4YXL GKu5PfR5v3XGV7MxxFd1gLQ78QZBcMarxRf7z9PbUa7kYRu5wc6K6TAalRIW8y4CP6Dy pwiYBuBUZT54Hx35qLl03/xqCBdZtn1/oNzUR+Nq33REwcA1pmTISHsREwa0BGzF7mHj h47iWWqQepCCJf92SXgVAf+7AS1k2cJmqL5lH1iRv7GKIcuUSJOFroH8+03uvJ/1G80E uLkg== X-Gm-Message-State: AOAM533Yp4v0VauO6DSFeelISAkGJIH8SwVegsfN+me8hCcl/IIRUcj5 CbIWlCOSF3hlKY113pYv5Qs= X-Google-Smtp-Source: ABdhPJy8DC6RjbGUfOTUlZgTlw4F9cfdWkuRCY7YB+TlxFhuST/NlXQx6VsOJpbSInGRDVViTlJIrQ== X-Received: by 2002:a7b:c7d3:: with SMTP id z19mr3965022wmk.4.1605611697440; Tue, 17 Nov 2020 03:14:57 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id h15sm26749555wrw.15.2020.11.17.03.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 03:14:56 -0800 (PST) From: luca.boccassi@gmail.com To: Yi Yang Cc: Jiayu Hu , dpdk stable Date: Tue, 17 Nov 2020 11:13:45 +0000 Message-Id: <20201117111416.1961049-11-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201117111416.1961049-1-luca.boccassi@gmail.com> References: <20201109185030.3478760-2-luca.boccassi@gmail.com> <20201117111416.1961049-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'gro: fix packet type detection with IPv6 tunnel' has been queued to stable release 19.11.6 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/c36d11b5560e6bd64afcf66eb4b096c8844e6c31 Thanks. Luca Boccassi --- >From c36d11b5560e6bd64afcf66eb4b096c8844e6c31 Mon Sep 17 00:00:00 2001 From: Yi Yang Date: Thu, 5 Nov 2020 10:54:44 +0800 Subject: [PATCH] gro: fix packet type detection with IPv6 tunnel [ upstream commit b605df71beaac34f2af0df7eb9e759ca0c80acf3 ] For VxLAN packets, GRO will mistakenly reassemble them if inner L3 is IPv6, inner L4 is TCP or UDP, and outer L3 is IPv4 because the value of IS_IPV4_VXLAN_TCP4/UDP4_PKT is true for them. This fix makes sure IS_IPV4_TCP_PKT, IS_IPV4_UDP_PKT, IS_IPV4_VXLAN_TCP4_PKT and IS_IPV4_VXLAN_UDP4_PKT can make decision precisely. Fixes: e2d811063673 ("gro: support VXLAN UDP/IPv4") Fixes: 1ca5e6740852 ("gro: support UDP/IPv4") Fixes: 9e0b9d2ec0f4 ("gro: support VxLAN GRO") Fixes: 0d2cbe59b719 ("lib/gro: support TCP/IPv4") Signed-off-by: Yi Yang Acked-by: Jiayu Hu --- lib/librte_gro/rte_gro.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/librte_gro/rte_gro.c b/lib/librte_gro/rte_gro.c index 6618f4d32d..24e413d8ea 100644 --- a/lib/librte_gro/rte_gro.c +++ b/lib/librte_gro/rte_gro.c @@ -27,18 +27,21 @@ static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = { NULL}; #define IS_IPV4_TCP_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \ - ((ptype & RTE_PTYPE_L4_TCP) == RTE_PTYPE_L4_TCP)) + ((ptype & RTE_PTYPE_L4_TCP) == RTE_PTYPE_L4_TCP) && \ + (RTE_ETH_IS_TUNNEL_PKT(ptype) == 0)) #define IS_IPV4_VXLAN_TCP4_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \ ((ptype & RTE_PTYPE_L4_UDP) == RTE_PTYPE_L4_UDP) && \ ((ptype & RTE_PTYPE_TUNNEL_VXLAN) == \ RTE_PTYPE_TUNNEL_VXLAN) && \ - ((ptype & RTE_PTYPE_INNER_L4_TCP) == \ - RTE_PTYPE_INNER_L4_TCP) && \ - (((ptype & RTE_PTYPE_INNER_L3_MASK) & \ - (RTE_PTYPE_INNER_L3_IPV4 | \ - RTE_PTYPE_INNER_L3_IPV4_EXT | \ - RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN)) != 0)) + ((ptype & RTE_PTYPE_INNER_L4_TCP) == \ + RTE_PTYPE_INNER_L4_TCP) && \ + (((ptype & RTE_PTYPE_INNER_L3_MASK) == \ + RTE_PTYPE_INNER_L3_IPV4) || \ + ((ptype & RTE_PTYPE_INNER_L3_MASK) == \ + RTE_PTYPE_INNER_L3_IPV4_EXT) || \ + ((ptype & RTE_PTYPE_INNER_L3_MASK) == \ + RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN))) /* * GRO context structure. It keeps the table structures, which are -- 2.27.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-11-17 11:13:13.444499406 +0000 +++ 0011-gro-fix-packet-type-detection-with-IPv6-tunnel.patch 2020-11-17 11:13:12.873115642 +0000 @@ -1 +1 @@ -From b605df71beaac34f2af0df7eb9e759ca0c80acf3 Mon Sep 17 00:00:00 2001 +From c36d11b5560e6bd64afcf66eb4b096c8844e6c31 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b605df71beaac34f2af0df7eb9e759ca0c80acf3 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -24,2 +25,2 @@ - lib/librte_gro/rte_gro.c | 34 ++++++++++++++++++++-------------- - 1 file changed, 20 insertions(+), 14 deletions(-) + lib/librte_gro/rte_gro.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) @@ -28 +29 @@ -index e56bd20dbd..8ca4da67e9 100644 +index 6618f4d32d..24e413d8ea 100644 @@ -31 +32 @@ -@@ -32,32 +32,38 @@ static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = { +@@ -27,18 +27,21 @@ static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = { @@ -39,5 +39,0 @@ - #define IS_IPV4_UDP_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \ -- ((ptype & RTE_PTYPE_L4_UDP) == RTE_PTYPE_L4_UDP)) -+ ((ptype & RTE_PTYPE_L4_UDP) == RTE_PTYPE_L4_UDP) && \ -+ (RTE_ETH_IS_TUNNEL_PKT(ptype) == 0)) - @@ -56,19 +51,0 @@ -+ (((ptype & RTE_PTYPE_INNER_L3_MASK) == \ -+ RTE_PTYPE_INNER_L3_IPV4) || \ -+ ((ptype & RTE_PTYPE_INNER_L3_MASK) == \ -+ RTE_PTYPE_INNER_L3_IPV4_EXT) || \ -+ ((ptype & RTE_PTYPE_INNER_L3_MASK) == \ -+ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN))) - - #define IS_IPV4_VXLAN_UDP4_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \ - ((ptype & RTE_PTYPE_L4_UDP) == RTE_PTYPE_L4_UDP) && \ - ((ptype & RTE_PTYPE_TUNNEL_VXLAN) == \ - RTE_PTYPE_TUNNEL_VXLAN) && \ -- ((ptype & RTE_PTYPE_INNER_L4_UDP) == \ -- RTE_PTYPE_INNER_L4_UDP) && \ -- (((ptype & RTE_PTYPE_INNER_L3_MASK) & \ -- (RTE_PTYPE_INNER_L3_IPV4 | \ -- RTE_PTYPE_INNER_L3_IPV4_EXT | \ -- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN)) != 0)) -+ ((ptype & RTE_PTYPE_INNER_L4_UDP) == \ -+ RTE_PTYPE_INNER_L4_UDP) && \