From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A96F8A034F for ; Wed, 10 Nov 2021 07:37:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A3F28410EF; Wed, 10 Nov 2021 07:37:43 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on2078.outbound.protection.outlook.com [40.107.102.78]) by mails.dpdk.org (Postfix) with ESMTP id 80415410E0 for ; Wed, 10 Nov 2021 07:37:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OIzElR+kvuhomT6Tj5sjT7rsEa547eZY5GeI6tt41bXdvKH6OV6NYS/F4rjFwgUeSmgwWAXot4yK3vGT6kUTCkf5E1jEPY/MMgJzDgPSwyEvvIOtEaYNf8MPInAv/0xSvaa+vkO/HqVQiuVeM+EUhDuDmH2wyKtyOKrE9YCHjbiuwrCGFU1s1hqrGcdf77L9DytoapkhOYBbRHoP67JNReWxzYBVhn/tXZP4z05qAbCo5HMYG7fe+6hp/3Fh+/ib09VT0ejE9GlbRSaQlhysOmlHu7L9rg6vSSnCHeAJiRMo8QWPzx5QQLbqUIAqkN5Gv7n8animMsggs4rlLpr07A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=x/PslqqaZEiiEOdin7yHeykmWEDvl3PLSr/JbCBB7I4=; b=TwCPrifRoDo4CqCenwyysZQSScCUPPrr49+If6b88kBZk9nDAuDUc43yurp5ZzEPpXyZs0Rn70DSwM2hssgLtoHqpQRvCY/UC5qWPkO6pZGV+fKtNVvgFg0qk5tgIleniBA4o8JyGXKSIG8YrXPL8qAK+1hu9hfIVUUv1h464RcYdnlirfcGyqg3RgO+74lUSeSLYlH/4iMauPMyu0F4qcaUXVGp/jHBBBuOiE65h7Z1bLXnlxtYN97tESougy+v9edGauAkOjdkvCKTp0E1ljTlYIy7rRiLn+5ufd6/oTt2QfkyKIbkdgLw+cemm8qoYkidP5ZPMIySP105zaO9zA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=6wind.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x/PslqqaZEiiEOdin7yHeykmWEDvl3PLSr/JbCBB7I4=; b=s/wQeXeXqCQNuSm83MKeNkZ6k7KjBNdYY9I6z27x8uAvp4lnzqM38ZqIgGtBF5jbHQ1TbJH7KDqP4aLd1vt3CosPYAT7Dn718JNBQ0Sf7WaUADpX9JQ7/ISX87QFiXWgTCLXTeBH+od9WDOazQb6JvG1/VOyHXZeJzaIFlW6byHg4JNOvCX/6BtAF11P70e+QAHgUV2ExU22rbz0gre4i6t0eRFghlSabbgc/TwlhIL0onoArwkFxy/opWBm00b0wFs0KD+HWrAiECwx+FKZWk8kJUmYvxuvWKWuHgF4lSfMo+ZrtFMF+7AWGJEQ3e7a9IajfTVNtfk2OJ9YNlTKOw== Received: from DS7PR06CA0008.namprd06.prod.outlook.com (2603:10b6:8:2a::15) by DM6PR12MB2748.namprd12.prod.outlook.com (2603:10b6:5:43::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Wed, 10 Nov 2021 06:37:39 +0000 Received: from DM6NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2a:cafe::4c) by DS7PR06CA0008.outlook.office365.com (2603:10b6:8:2a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:37:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT053.mail.protection.outlook.com (10.13.173.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:37:39 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:37:36 +0000 From: Xueming Li To: Mohsin Kazmi CC: Luca Boccassi , Qi Zhang , Olivier Matz , dpdk stable Date: Wed, 10 Nov 2021 14:28:52 +0800 Message-ID: <20211110063216.2744012-49-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d40f85c4-654d-4147-ff55-08d9a414973b X-MS-TrafficTypeDiagnostic: DM6PR12MB2748: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XwlJGwPUgKK4tMOk4kIdMDymAjT18Hp0zBcbexN83nMvB7ZRlvCN1so557oRy081OD/f/H4UqIrh7E30mFU2yRyabrPhZaMrV0kZ7b+GcPNMzQh40jMCUUeV4dVUtXetcCB69tq1YYrxTRdc3VPaXn2XRh/NIH0NovE9QeOy0I61pDdDmctPrvLOrxnRU/ll8aVrq45eb2dRG4O3jbA8KbgPbY5AhuAPl7wcCZcjb04hmgNB8xuChWo7ZCo4m/iLMH9Mntyjblmq8IfY958UVdslcJ+uCbx4IlPON/JGFJmWKD8e0PQDLSLBy6ht2DRYtPyjLuiLfZSjKPs7BYjpGTEiGAZZMfEb/2ffim9FQR4soqbPlU/mgrHoeTXUOxES5zrNMLQvg4TP+GGTAPY+8c+D6GHk73JKb/9Emffhgz6SBLYk/NKVQCvLBi27kMbb+AKlOhIcZVXJk3BRSsuKGaAJ5DXMITtERhiIVz2sxCyDDjAQ7bg/N3LqXKpb+TiG+CBBHLJXzZ0goNZOtaHrfjeZruQUkTi7Bv/qnGl4Ae2D9nMERY7sqFUMSctHeGUbXURlki3etGPNSmyFR1VJNdE2NvNltBEpICZm60YeTfKSavhbDlnDA9hiRxPBts21h2tsVvS6L6+CCuN2bxf3wJSnRxhIn2IuF26Pq8oBoCd/OtGi62bWROhe9SjI+HFsv0siVwIXZHcJ9lgYOy4OO1woUp/mEms1N8t1tAaasXvXo86ueqGfuhX9+Ueur1Jf5zd/+yg5hG56tZ67xT0XqofDNKNY5ykp+MHmDrHgT/JFJllWMMcGwxOxc+jZSMJpklizJYqsZz7hHyUXywSndQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(53546011)(6916009)(36756003)(83380400001)(508600001)(55016002)(54906003)(4326008)(1076003)(47076005)(70206006)(4001150100001)(2616005)(7636003)(82310400003)(16526019)(186003)(7696005)(86362001)(8676002)(6286002)(336012)(6666004)(8936002)(316002)(356005)(2906002)(36860700001)(966005)(426003)(5660300002)(26005)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:37:39.2019 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d40f85c4-654d-4147-ff55-08d9a414973b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2748 Subject: [dpdk-stable] patch 'net: fix checksum offload for outer IPv4' has been queued to stable release 20.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 20.11.4 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/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/8cbd4cec761f50557d0a0b174e4b1bbd1de58fd9 Thanks. Xueming Li --- >From 8cbd4cec761f50557d0a0b174e4b1bbd1de58fd9 Mon Sep 17 00:00:00 2001 From: Mohsin Kazmi Date: Tue, 7 Sep 2021 12:49:16 +0200 Subject: [PATCH] net: fix checksum offload for outer IPv4 Cc: Xueming Li [ upstream commit 818ce1132ab69c5bb34ede0120776f71969dc091 ] Preparation of the headers for the hardware offload misses the outer IPv4 checksum offload. It results in bad checksum computed by hardware NIC. This patch fixes the issue by setting the outer IPv4 checksum field to 0. Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation") Signed-off-by: Mohsin Kazmi Acked-by: Qi Zhang Acked-by: Olivier Matz --- lib/librte_net/rte_net.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h index 434435ffa2..42639bc154 100644 --- a/lib/librte_net/rte_net.h +++ b/lib/librte_net/rte_net.h @@ -125,11 +125,22 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags) * Mainly it is required to avoid fragmented headers check if * no offloads are requested. */ - if (!(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK | PKT_TX_TCP_SEG))) + if (!(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK | PKT_TX_TCP_SEG | + PKT_TX_OUTER_IP_CKSUM))) return 0; - if (ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6)) + if (ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6)) { inner_l3_offset += m->outer_l2_len + m->outer_l3_len; + /* + * prepare outer IPv4 header checksum by setting it to 0, + * in order to be computed by hardware NICs. + */ + if (ol_flags & PKT_TX_OUTER_IP_CKSUM) { + ipv4_hdr = rte_pktmbuf_mtod_offset(m, + struct rte_ipv4_hdr *, m->outer_l2_len); + ipv4_hdr->hdr_checksum = 0; + } + } /* * Check if headers are fragmented. -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:04.249069977 +0800 +++ 0048-net-fix-checksum-offload-for-outer-IPv4.patch 2021-11-10 14:17:01.804079970 +0800 @@ -1 +1 @@ -From 818ce1132ab69c5bb34ede0120776f71969dc091 Mon Sep 17 00:00:00 2001 +From 8cbd4cec761f50557d0a0b174e4b1bbd1de58fd9 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 818ce1132ab69c5bb34ede0120776f71969dc091 ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ - lib/net/rte_net.h | 15 +++++++++++++-- + lib/librte_net/rte_net.h | 15 +++++++++++++-- @@ -23 +25 @@ -diff --git a/lib/net/rte_net.h b/lib/net/rte_net.h +diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h @@ -25,2 +27,2 @@ ---- a/lib/net/rte_net.h -+++ b/lib/net/rte_net.h +--- a/lib/librte_net/rte_net.h ++++ b/lib/librte_net/rte_net.h