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 DC62FA0C41 for ; Sun, 28 Nov 2021 16:01:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D2EA42761; Sun, 28 Nov 2021 16:01:26 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2063.outbound.protection.outlook.com [40.107.212.63]) by mails.dpdk.org (Postfix) with ESMTP id 80C4442768 for ; Sun, 28 Nov 2021 16:01:24 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h3OhUvYr05OkvwxaQqMNmHlQXughqTZjaEexxrge9vmqg/F4D+ZMyh7ODcZeM0JCoEk+jJZzMO6V9QXee3ZPsIK2OBD+M2QRh8zqyuFHdMK538NlPEaFJUcugLQVW9WoJnFYqjrlBGlj2R6mcBdL9eV6PDGVBkFemZREw/glxtr36q0m4QEJKTYUKv4m4nEwJN0FJ36k0RsnNHHnme9S30Brr8eRfR7sdbqb9XQf1TysRq/deO80GYFNMDllOZ7sW1BRe6Xr/PA64jCYsPuApC1ID0Dihxc6JqFizbp0SNHyjYg9fuVEg3yhdM8GQAJYha+oviBk8jAse/opGQDv2g== 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=IA+tGpDNotQSxMit5z9182JnKRUKSQ17zUhX4nBCba8=; b=WZnVwW1jt4XL0ChtmbzAXi3eEC6MCYGHepNEUf9ugMsRxco6Wtl1oGZpwfWa2lGDwRn0pKPZZq6Tno3Xg77fS07sqxXPVrFGXJZsxRqBUpgO376wgFp81wX5U9gNT+mGDEBuX/1vFtzzyZhgTl4FBpoXJwSGl5KvRWUQtSoKZWLq4HmGs3Py09Kw/drza3DM4NkvZeeEJuZX89n1fVn/Ddo8G1fWagS7VngIicelg4xqgMtPXyMzu/51QokU7oPu/wg53zKg5jCKG29S0QiNWTr0UMHPiklkHOF6tmysQaYsx01oOp6n8R49w4bkRUe3simpHWHNuI2NBzoSftT7vw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=marvell.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=IA+tGpDNotQSxMit5z9182JnKRUKSQ17zUhX4nBCba8=; b=UAaMSc5jhb7Ypn3v3KTdc5J63kJlF/i0Pfx5Tw+EK9INZx5G2mDI4G+Ili4PRA1bgw9BSPYsfL56rwDg3zdPkZhicQYm15BOqs0wVO2UbmVxKiEH1X57uSuUaQ7suuG1ZDhoDUNss8X0crtI3eqEwv7tZ7EfheN0iaYrncUCy+McEnH5UTbwyaXHNo7BCKyHqvSuR6M7UporqKXtU7+lnJPqY87fvBQ/duP+rPOzW80xfvs8uRo0fdPkzhu2aBXi5hZ0biBQGkqL5MyMElFjX2R4cglwvIRBOP9VbtAiNkJVoZjuKZyfD7euRSRuRMsQ9STdeFKvXT7PJBVZL8YP+g== Received: from BN9PR03CA0647.namprd03.prod.outlook.com (2603:10b6:408:13b::22) by DM6PR12MB4778.namprd12.prod.outlook.com (2603:10b6:5:167::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.21; Sun, 28 Nov 2021 15:01:20 +0000 Received: from BN8NAM11FT012.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13b:cafe::13) by BN9PR03CA0647.outlook.office365.com (2603:10b6:408:13b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.21 via Frontend Transport; Sun, 28 Nov 2021 15:01:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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.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 BN8NAM11FT012.mail.protection.outlook.com (10.13.177.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Sun, 28 Nov 2021 15:01:19 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 28 Nov 2021 15:01:06 +0000 From: Xueming Li To: Gagandeep Singh CC: Luca Boccassi , Akhil Goyal , "dpdk stable" Subject: patch 'drivers/crypto: fix IPsec TTL decrement option' has been queued to stable release 20.11.4 Date: Sun, 28 Nov 2021 22:54:02 +0800 Message-ID: <20211128145423.3974892-59-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211128145423.3974892-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> <20211128145423.3974892-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] 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: ae4ec7cd-f80b-4567-d6bc-08d9b27fef83 X-MS-TrafficTypeDiagnostic: DM6PR12MB4778: 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: HEmgYN1WGYAV3UCWvxBP3J0C/5Fu2fUKwYC3O1K7Ip3G1ozRrX+gHmJR17KBzbQwnF+aoNJ0FVbpv41g0CSFM7fIrZM73p/9M8wlVDJoWCsDwQnvIm4FJ+zLgS5aIKHfQL9tFJl6oyCs91ZTGJeHS87X4wq5Eg1RKmWBkyuRqTrn/xi9CqGKKry0gQLwxpKpFlzofgYla+nTM/ltWOMKHWy7xjaxFEA65c5yp7oKGvnibw/Le2BXwgUwq4JYKaMCZc+E8deq4E51u/IoepwxLnXnPlnwzZLCEzDI+3TjB/o5qi3x4TsyG4yxwUbm8kPnekun0EvNdsHjHyr7T/v0NbsOlABHmQj30JrXskpfvBNr2+yfp6XSdKIjwZuQ+vjagt49srCKnV7eI280lVT+FEivrEGKIkg8WoB4RVsfDb20Zde/gOjzxSXcUxpv1mwKrue2EWZkLnu8qsRdM4iLPv4Z4FHm26qWusTZtwXd3t7m/CoR9m9+jwzXu55RXA5g57YJ5FL29IwrvNHQ7CGk+zHf0bDoGt+IvnixRt3USA8JrCz4NsdReoYbXi6pC1DTupaFt2v7yz3XNhj/aZtb759d5QfU8dav2S8e1XiAH/4U7ecOxjgX6qPKrSAeSCpNlwIpSSzZfXmNPYx0S6OJ4zBHKyKODH8x6/QlEOVhr0ddhdUG8M8k37mqiLia1wGhv4/kvHenfuEBViq0+MNGzxjXRYrDXXLieN3/0fsvKz1DdFbjkKcQyHj0tHQuo2DSQzeG3q0QPANfChEO+Tmpi2B+axEUW7bOBQrBAo4c6moj7Fu2x6p84fVZWAyXER9U9jeJ7eC2wZXZrCA058eXzQ== 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)(7636003)(16526019)(186003)(54906003)(53546011)(36756003)(2906002)(316002)(508600001)(356005)(70586007)(36860700001)(83380400001)(6666004)(8676002)(4001150100001)(6916009)(70206006)(26005)(5660300002)(7696005)(1076003)(6286002)(47076005)(2616005)(426003)(336012)(4326008)(82310400004)(55016003)(86362001)(8936002)(966005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2021 15:01:19.6762 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ae4ec7cd-f80b-4567-d6bc-08d9b27fef83 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: BN8NAM11FT012.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4778 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 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/30/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/7626e554b849dfb4308a06d06f84f91d1c1143ca Thanks. Xueming Li --- >From 7626e554b849dfb4308a06d06f84f91d1c1143ca Mon Sep 17 00:00:00 2001 From: Gagandeep Singh Date: Thu, 18 Nov 2021 12:30:18 +0530 Subject: [PATCH] drivers/crypto: fix IPsec TTL decrement option Cc: Xueming Li [ upstream commit 0aa5986c280f34893b2a6bacf044cff31484fe0c ] dpaa, dpaa2 and caam_jr drivers decrement the inner IP header TTL for all packets and ignoring the dec_ttl option of SA. In this patch, using the dec_ttl to decide to decrement the packets inner IP header TTL or not. Fixes: 0a23d4b6f4c2 ("crypto/dpaa2_sec: support protocol offload IPsec") Fixes: 3e33486f80a5 ("crypto/caam_jr: add security offload") Fixes: 1f14d500bce1 ("crypto/dpaa_sec: support IPsec protocol offload") Signed-off-by: Gagandeep Singh Acked-by: Akhil Goyal --- drivers/crypto/caam_jr/caam_jr.c | 5 +++-- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 3 ++- drivers/crypto/dpaa_sec/dpaa_sec.c | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c index 3fb3fe0f8a..6fc8adf752 100644 --- a/drivers/crypto/caam_jr/caam_jr.c +++ b/drivers/crypto/caam_jr/caam_jr.c @@ -1881,8 +1881,9 @@ caam_jr_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, session->encap_pdb.options = (IPVERSION << PDBNH_ESP_ENCAP_SHIFT) | PDBOPTS_ESP_OIHI_PDB_INL | - PDBOPTS_ESP_IVSRC | - PDBHMO_ESP_ENCAP_DTTL; + PDBOPTS_ESP_IVSRC; + if (ipsec_xform->options.dec_ttl) + session->encap_pdb.options |= PDBHMO_ESP_ENCAP_DTTL; if (ipsec_xform->options.esn) session->encap_pdb.options |= PDBOPTS_ESP_ESN; session->encap_pdb.spi = ipsec_xform->spi; diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 9f189dd890..7e728d1cf7 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2910,8 +2910,9 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, encap_pdb.options = (IPVERSION << PDBNH_ESP_ENCAP_SHIFT) | PDBOPTS_ESP_OIHI_PDB_INL | PDBOPTS_ESP_IVSRC | - PDBHMO_ESP_ENCAP_DTTL | PDBHMO_ESP_SNR; + if (ipsec_xform->options.dec_ttl) + encap_pdb.options |= PDBHMO_ESP_ENCAP_DTTL; if (ipsec_xform->options.esn) encap_pdb.options |= PDBOPTS_ESP_ESN; encap_pdb.spi = ipsec_xform->spi; diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index a958d00b46..f29e674c01 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -2799,12 +2799,14 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, session->encap_pdb.ip_hdr_len = sizeof(struct rte_ipv6_hdr); } + session->encap_pdb.options = (IPVERSION << PDBNH_ESP_ENCAP_SHIFT) | PDBOPTS_ESP_OIHI_PDB_INL | PDBOPTS_ESP_IVSRC | - PDBHMO_ESP_ENCAP_DTTL | PDBHMO_ESP_SNR; + if (ipsec_xform->options.dec_ttl) + session->encap_pdb.options |= PDBHMO_ESP_ENCAP_DTTL; if (ipsec_xform->options.esn) session->encap_pdb.options |= PDBOPTS_ESP_ESN; session->encap_pdb.spi = ipsec_xform->spi; -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-28 22:41:06.261589500 +0800 +++ 0058-drivers-crypto-fix-IPsec-TTL-decrement-option.patch 2021-11-28 22:41:03.400206198 +0800 @@ -1 +1 @@ -From 0aa5986c280f34893b2a6bacf044cff31484fe0c Mon Sep 17 00:00:00 2001 +From 7626e554b849dfb4308a06d06f84f91d1c1143ca Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 0aa5986c280f34893b2a6bacf044cff31484fe0c ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +28 @@ -index 8c56610ac8..5909eca6e4 100644 +index 3fb3fe0f8a..6fc8adf752 100644 @@ -42 +44 @@ -index cb2ad435bf..2e8e4c6adf 100644 +index 9f189dd890..7e728d1cf7 100644 @@ -45 +47 @@ -@@ -2935,8 +2935,9 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, +@@ -2910,8 +2910,9 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, @@ -57 +59 @@ -index 454b9c4785..9a7d5eb8b7 100644 +index a958d00b46..f29e674c01 100644 @@ -60 +62 @@ -@@ -2898,12 +2898,14 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, +@@ -2799,12 +2799,14 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,