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 2EE754301F for ; Thu, 10 Aug 2023 02:08:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28DDB40DD8; Thu, 10 Aug 2023 02:08:27 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2040.outbound.protection.outlook.com [40.107.94.40]) by mails.dpdk.org (Postfix) with ESMTP id 6BA7C406B6 for ; Thu, 10 Aug 2023 02:08:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WjrAU1hKneWA//FbHhxdbiLTwgTcSWwSLrkMW/AFje85LkLOp/Iy6u2lKSEAKNLQr4R982lTkK/spBWAuEmtLAr7ZKXa3vx32zOFR2slzPPffJzCOaNd0NfvJWueV6FxD/6aMgCXa3SPjWWnB62x81M42KR2BTFxVMnAzIWFTsTTd9MCjTfcwoCmtOPj+mLsAYxfR9sRmUiVP/rg0D/WxtrNsnq5Q6XyWcOdvlnYUhC3PXCcu4jKZHcM2ayQSAk+U19MyV7rdtvi7+B5PuazseTcq5zDqg7EZKweRISeyJ1HwMr3hqyqSb8jKOICognj6SYWTo/PXrA58bzqRXbe5Q== 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=2N18K+9/YSbTq2R84jxn26QdiK0OWWbvD18SzndgitU=; b=WZ+HrX0jID+ByPc68DJjTRzeLpRULjU3fuQUKxXpw4TRZreabaQJEb5KitA8MHi0naa1yyVqfPSJF5YNzE3qqf1mmVAnmcyuSZse1Udsm6J/eZItjxllzwoGJ8WoxTg5SYJHyJ2cZOQVoVxhuten8rMwxYpK+0VeDKUDAH6WbBZuovii0VANTccrr2ToA6i9YJZXQ5E9KNwNv15F6ZNvH6mjMCIOCU6qirxzV5YWc2peQSj2L5HcOfFbPdyagm9yYgawl+Gnfxr7TYViSfKjDJlk7np9xUclhsF8k+8Mck+mCN7sDx7L3rlAvNTKu5G8e3rk+tACQdqVyrsaR+U4Tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=gmail.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=2N18K+9/YSbTq2R84jxn26QdiK0OWWbvD18SzndgitU=; b=cg7rd4HfW56XpJ/pMSRaTI64KOES4eMGWAMZXtMHFXTCrBuTVJJQk1INYEgtN3V3IG4FkuTW27sBfJt79VE9rvOQsFgMaZsdZUR6DtZSs6FTJxzB/OHy9xq7Ps0SbpXIFsEQ7PveKWHgkLjaZMWCku5Vxf3OO9ZHJ9e1il1GkZoKc8gIsleWZf9ueLw8aNDj4psE+GqSr1I2CuWNgm24HF30MIGDuO4nzthCUnn/g9ExXtCpG+/r6URsjYL69or3B1GK11vqsZc7tqakmo/vGm2drid190/wkMkVv0RsS6U5uKdNGORLrIxiXmquXR8DRhrH4aWoORK2UyNQOpG6sw== Received: from DM6PR07CA0101.namprd07.prod.outlook.com (2603:10b6:5:337::34) by MN2PR12MB4533.namprd12.prod.outlook.com (2603:10b6:208:266::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.30; Thu, 10 Aug 2023 00:08:22 +0000 Received: from CY4PEPF0000E9D5.namprd05.prod.outlook.com (2603:10b6:5:337:cafe::41) by DM6PR07CA0101.outlook.office365.com (2603:10b6:5:337::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.28 via Frontend Transport; Thu, 10 Aug 2023 00:08:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000E9D5.mail.protection.outlook.com (10.167.241.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Thu, 10 Aug 2023 00:08:21 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Wed, 9 Aug 2023 17:08:09 -0700 Received: from nvidia.com (10.126.230.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Wed, 9 Aug 2023 17:08:07 -0700 From: Xueming Li To: Xiao Liang CC: Konstantin Ananyev , Radu Nicolau , dpdk stable Subject: patch 'ipsec: fix NAT-T header length' has been queued to stable release 22.11.3 Date: Thu, 10 Aug 2023 08:06:50 +0800 Message-ID: <20230810000717.2191-9-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230810000717.2191-1-xuemingl@nvidia.com> References: <20230625063544.11183-1-xuemingl@nvidia.com> <20230810000717.2191-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D5:EE_|MN2PR12MB4533:EE_ X-MS-Office365-Filtering-Correlation-Id: 3761489f-d683-4201-f4a8-08db9935e8ae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UnJeKhhFBCRW2/dFkkY3U05r8P5q4DdSlhZkMnjcaRbXmi0ehQtwAtcaBempGC71Q/8PsqvQ8EKBBlJCVaIbK8NWfPGikbHhOQ088fZF7+uNWTaR/9paK5YRsT7XY0SmAP1jwFqetiVK8Pe3y7BgpAetPPGbNKq6VD47t0C9atkV9wQv2ZaVnVPj/ZFjdqO8kdmOp6C2CM92TIEczKTIJl6GdOm4eOt3roe/dbu2c0GTKJuHyXGcWmMoZYi57IhyrZrGDBGBhcM3IbetbYsn2LmWocLBfXBweR/oShXyBqAUIhpQiYb2dc/Tg8MabDsto0YcsN6KLBmNAeC5JtLA9LgPWXamAmjxsZIXXzhd1pMHjBbo7hIN6rdwPj/bDegb33pHzI7Yatyfulqij52CwVPhQv28K3HdicB+KddjBEX8FXs1CAIvVi0Z2BoJ/JyoYI2VgCeByfimw/37md5no3BzYxdchipsmI+R+C38p0GTAcMjJxCqrYh7wIkOtN167TNG+BpfPPbrTSyHgy/MYrsXgW+UE3ycNvJ7riYVTsycpngDfhC34Y2IdVLcvupdUeeJzOg6rPt48rRHJQ/+s4szZQZP9/JrAYpDkytyYAaJd98V1SzhENtBNdsZm937wbjKtX7uF0hFPjqi49mYoc077pSGRdfPn1WjADvwIYl8HxW2OH2gm5x+L3Qg7x0HbyaPrKMFnjL4KaZ54f5d10v1WpOxFoLQ3JddGVmQoN3pOnx1yKbit5jH0vCRsxVmEIbQIh6B2ExQWWGEn1lnnw3NkvSC4iaQhcqrDG6zQL27KLVoxgKXdZLtDD2u6b/e X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(376002)(136003)(39860400002)(396003)(346002)(186006)(451199021)(1800799006)(82310400008)(40470700004)(46966006)(36840700001)(6666004)(16526019)(36860700001)(2906002)(336012)(47076005)(7696005)(6286002)(54906003)(2616005)(82740400003)(83380400001)(1076003)(26005)(53546011)(966005)(356005)(478600001)(426003)(7636003)(316002)(4326008)(70586007)(70206006)(6916009)(41300700001)(40460700003)(8676002)(8936002)(40480700001)(5660300002)(55016003)(36756003)(86362001)(23180200003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2023 00:08:21.7747 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3761489f-d683-4201-f4a8-08db9935e8ae X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D5.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4533 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 Hi, FYI, your patch has been queued to stable release 22.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/11/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=06ba23cad245de70f98e374ef19a5191e81a2ead Thanks. Xueming Li --- >From 06ba23cad245de70f98e374ef19a5191e81a2ead Mon Sep 17 00:00:00 2001 From: Xiao Liang Date: Tue, 11 Jul 2023 10:18:47 +0800 Subject: [PATCH] ipsec: fix NAT-T header length Cc: Xueming Li [ upstream commit 5d89d22e9e49771059ecc6383aa4313394fc72f7 ] UDP header and L2 header (if any) length is included in sa->hdr_len. Take care of that in L3 header and packet length calculation. Fixes: 01eef5907fc3 ("ipsec: support NAT-T") Signed-off-by: Xiao Liang Acked-by: Konstantin Ananyev Acked-by: Radu Nicolau --- lib/ipsec/esp_outb.c | 2 +- lib/ipsec/sa.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ipsec/esp_outb.c b/lib/ipsec/esp_outb.c index 9cbd9202f6..ec87b1dce2 100644 --- a/lib/ipsec/esp_outb.c +++ b/lib/ipsec/esp_outb.c @@ -198,7 +198,7 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc, struct rte_udp_hdr *udph = (struct rte_udp_hdr *) (ph + sa->hdr_len - sizeof(struct rte_udp_hdr)); udph->dgram_len = rte_cpu_to_be_16(mb->pkt_len - sqh_len - - sa->hdr_l3_off - sa->hdr_len); + sa->hdr_len + sizeof(struct rte_udp_hdr)); } /* update original and new ip header fields */ diff --git a/lib/ipsec/sa.c b/lib/ipsec/sa.c index 59a547637d..2297bd6d72 100644 --- a/lib/ipsec/sa.c +++ b/lib/ipsec/sa.c @@ -371,7 +371,7 @@ esp_outb_tun_init(struct rte_ipsec_sa *sa, const struct rte_ipsec_sa_prm *prm) /* update l2_len and l3_len fields for outbound mbuf */ sa->tx_offload.val = rte_mbuf_tx_offload(sa->hdr_l3_off, - sa->hdr_len - sa->hdr_l3_off, 0, 0, 0, 0, 0); + prm->tun.hdr_len - sa->hdr_l3_off, 0, 0, 0, 0, 0); esp_outb_init(sa, sa->hdr_len, prm->ipsec_xform.esn.value); } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-08-09 21:51:20.777722800 +0800 +++ 0101-ipsec-fix-NAT-T-header-length.patch 2023-08-09 21:51:18.264352000 +0800 @@ -1 +1 @@ -From 5d89d22e9e49771059ecc6383aa4313394fc72f7 Mon Sep 17 00:00:00 2001 +From 06ba23cad245de70f98e374ef19a5191e81a2ead Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 5d89d22e9e49771059ecc6383aa4313394fc72f7 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org