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 D1834A0543 for ; Tue, 21 Jun 2022 10:03:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C778540151; Tue, 21 Jun 2022 10:03:24 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2068.outbound.protection.outlook.com [40.107.243.68]) by mails.dpdk.org (Postfix) with ESMTP id 97420427E9 for ; Tue, 21 Jun 2022 10:03:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XdT+l8zg2LMAv6wnxRepNqQFeR1YEfdsZCoWdIlF1hKW3OVhidrLry3Kb9xkqGwPkT3LFXIxwSQxVtQKrGkNKdUlNOcacU9iFcFU3Je8vALg1ms/DGfkmXtZuvyBJvrdcUZ8U+e0Mt2HJA2Sif5zDyYmv6NEdPD3uEdpUQPEuIQwNW48OXkpUBa24HhEOdbXAIaBX8Pp7CQwL+LQVQ7dAOCWgX7rfa0pYoNxykOzATXHvzWfjhhzIr5wBhHBNArmXnI+zG4L7xeejdAN6KE192u8ll9kbbgqHmKEgSy3WSP9Gt9FqA4nUuS4Qp5zbKZbrj42c3Q3R9c2IN2DUP9PSg== 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=fWiy5HUd/EW+J25On8jUNC3n9HIZpaYOzulX+Yiwgoc=; b=K5Ztee7mwsfrmQCZDSDED/Qr4Gqo1HJXRz9w7blSHr6NTp78u/QLTBfSdo3vcHQxuvw7I+tLG9lxELZgl7iTDCUnb5Q61OunneHfQWXWpTrh3S13l83SZ8Y6DQ9tzs2pAzyc8eloDyRSZ+Zf2gPaZArKduHokvE9IY7zCBZWfPLbV0jU+rRW87gtw64iVsAjWMf4rdMV5+yIlJ/oc52FV0sXBPmJz9xhu4PlxtL254totXexLOOikCXR47XRS3HDQYAoNmHpOgzJLq6ENr+e47SMTUAvi3YhBrvATmZbsV7ceRyVOTnn5dRecJLBqgNSEEzlNMZe6dU9K8/7Zh6lIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=intel.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=fWiy5HUd/EW+J25On8jUNC3n9HIZpaYOzulX+Yiwgoc=; b=hQ31h8jzpxYiQFrBetsYvzdW3FXLPV3v6rzV3Nxg5FGN9VyekxTl+kqQFc8nNKH1W4oh5bNW0s7xi3R3Vkq1F5lfWg3Dhb5YRWxsRAETjvGzNAPZjtyXlMIkEsik2gQHkRaSGczZq9R6Avi0pAr0Hg3ssgc0h1P5ygONeQyIstQgnXxtDr48Rflocwko9rkstT4ydVwMhsXzmFdn25i6es4LTWD2s2S8+G9Ko18nIfyLyoL+wPU28nEyBClUDVS7wnakdwhhSenLDxuNnV3qXtBuNDtdIp39qYZKXwFxM+Lj/PfUBP1ewUhk3Pe+fGaa180L+F6rvUd5TWqgBWh3mA== Received: from BN6PR19CA0114.namprd19.prod.outlook.com (2603:10b6:404:a0::28) by DM6PR12MB4879.namprd12.prod.outlook.com (2603:10b6:5:1b5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.13; Tue, 21 Jun 2022 08:03:22 +0000 Received: from BN8NAM11FT032.eop-nam11.prod.protection.outlook.com (2603:10b6:404:a0:cafe::78) by BN6PR19CA0114.outlook.office365.com (2603:10b6:404:a0::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.22 via Frontend Transport; Tue, 21 Jun 2022 08:03:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) 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 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT032.mail.protection.outlook.com (10.13.177.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:03:21 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:03:20 +0000 Received: from nvidia.com (10.126.230.35) 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.22; Tue, 21 Jun 2022 01:03:18 -0700 From: Xueming Li To: Pablo de Lara CC: Fan Zhang , Radu Nicolau , dpdk stable Subject: patch 'crypto/ipsec_mb: fix GMAC parameters setting' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:01:08 +0300 Message-ID: <20220621080301.2315720-3-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] 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-Office365-Filtering-Correlation-Id: 85a1502b-0c7c-4815-c159-08da535c8256 X-MS-TrafficTypeDiagnostic: DM6PR12MB4879:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LKlk3kHDVhpSB5/rZxSCzic++BX3Y3jrf4mghll9ztdsmEv8UKi+Z0zYtGG5+Zs7NrDCp4SVFUWEN581+lNPq/CLyIcC057uEiXgVwM4nALNpeHK83IRdnQ8OELPc+nTIBAy5BIE12ZeQ/8zhsm/il0VQ7Z8BzP4jZlLtMUA6qeYTKtIFXjTPCbbPyk50tP77WAVhG/A4+M1wR0tFgqAIxnTaHLCH5+1249zwCl2ZwXW2zkKvLK+5upDF4URbPHBPDicsXKnS/dpmDq8yo1kBRE1UnV3HCy9fjQ0EjRJyiwMQSl69AYApL4jQPEMD/FomwIb19Si9jSM35K08W6sYjTExADKQKWhfrfaAJRHuEzrWDYjfG0uAuDYfz/JI/t249OuMEt9ETCFHOJwcBvVxooiysU5tO3SCw/fx4RoItGIZlZ0cl7Ffq8P58pHa8HsumcZ3ax0x3SSKAScTIQ6GhUr2r0MkOedzG/EYex3/mfFYeDtGYBZt9z2uwrtvlBcSU0zQjbeFl65GeObJmRweNPPdRn9hkDtKrAN+shqzID3t/MJ+LC7LmPimCQuCbIJo2apFqlal8HsGLw2PYZAuAJC/rfOStO+wPQyxF0/Xtu5tTsdeT5yVA78WAixnrsjA3hdXLUqZVIqF2+labPw9hQ+4ckC1iosGQDz0pk9hEoOZvyssn2A23VGyipbOe1buMpjNNpz/zsrkWbKzF8kAr86g6GI7SMNr0rmB+Udy1Bx9kniDGEK4HeaIfZULfZy2ExXcZhnBS2SSVJB5dO45JGVvWFUHvfWFINdS9s9AFHTpks63m8ZCdEdmyi28XCjAaQdqvC8hVttRxcf+FxjX4Lc1Re2O/v4G7wYMRcK8EY= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(396003)(136003)(346002)(376002)(40470700004)(46966006)(36840700001)(356005)(7696005)(86362001)(26005)(2616005)(6666004)(83380400001)(1076003)(47076005)(41300700001)(82740400003)(40460700003)(426003)(6286002)(16526019)(336012)(81166007)(186003)(53546011)(70586007)(8676002)(70206006)(6916009)(36860700001)(966005)(8936002)(82310400005)(55016003)(5660300002)(316002)(36756003)(4326008)(2906002)(40480700001)(478600001)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:03:21.3448 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 85a1502b-0c7c-4815-c159-08da535c8256 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT032.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4879 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.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 06/23/22. 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/3a9281f20e36c3ccf49ad421ac99a28a650f220c Thanks. Xueming Li --- >From 3a9281f20e36c3ccf49ad421ac99a28a650f220c Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Tue, 22 Mar 2022 13:39:10 +0000 Subject: [PATCH] crypto/ipsec_mb: fix GMAC parameters setting Cc: Xueming Li [ upstream commit 837269c2e5c5a8813adfcf59f23b80569048ddeb ] AES-GMAC requires plaintext length to be 0 when using AES-GCM, so only AAD data is used. Fixes: a501609ea646 ("crypto/ipsec_mb: fix length and offset settings") Signed-off-by: Pablo de Lara Acked-by: Fan Zhang Acked-by: Radu Nicolau Tested-by: Radu Nicolau --- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index ab9864739d..94055d8177 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -1438,9 +1438,9 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp, op->sym->aead.data.offset; job->msg_len_to_hash_in_bytes = op->sym->aead.data.length; - } else { - job->msg_len_to_cipher_in_bytes = 0; + } else { /* AES-GMAC only, only AAD used */ job->msg_len_to_hash_in_bytes = 0; + job->hash_start_src_offset_in_bytes = 0; } job->iv = rte_crypto_op_ctod_offset(op, uint8_t *, @@ -1524,8 +1524,19 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp, op->sym->cipher.data.length; break; #endif - case CCM: case GCM: + if (session->cipher.mode == NULL_CIPHER) { + /* AES-GMAC only (only AAD used) */ + job->msg_len_to_cipher_in_bytes = 0; + job->cipher_start_src_offset_in_bytes = 0; + } else { + job->cipher_start_src_offset_in_bytes = + op->sym->aead.data.offset; + job->msg_len_to_cipher_in_bytes = + op->sym->aead.data.length; + } + break; + case CCM: #if IMB_VERSION(0, 54, 3) <= IMB_VERSION_NUM case IMB_CIPHER_CHACHA20_POLY1305: #endif -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:49.407352537 +0800 +++ 0002-crypto-ipsec_mb-fix-GMAC-parameters-setting.patch 2022-06-21 15:37:48.954450956 +0800 @@ -1 +1 @@ -From 837269c2e5c5a8813adfcf59f23b80569048ddeb Mon Sep 17 00:00:00 2001 +From 3a9281f20e36c3ccf49ad421ac99a28a650f220c Mon Sep 17 00:00:00 2001 @@ -3 +3 @@ -Date: Wed, 9 Mar 2022 10:45:14 +0000 +Date: Tue, 22 Mar 2022 13:39:10 +0000 @@ -4,0 +5 @@ +Cc: Xueming Li @@ -5,0 +7 @@ +[ upstream commit 837269c2e5c5a8813adfcf59f23b80569048ddeb ] @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -17,2 +18,2 @@ - drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) + drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) @@ -20,5 +21,5 @@ -diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c -index c974886032..afa0b6e3a4 100644 ---- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c -+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c -@@ -1296,9 +1296,9 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp, +diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +index ab9864739d..94055d8177 100644 +--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c ++++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +@@ -1438,9 +1438,9 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp, @@ -36,2 +37 @@ -@@ -1378,8 +1378,18 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp, - job->msg_len_to_cipher_in_bits = +@@ -1524,8 +1524,19 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp, @@ -40,3 +40,4 @@ -- case IMB_CIPHER_CCM: - case IMB_CIPHER_GCM: -+ if (session->cipher.mode == IMB_CIPHER_NULL) { + #endif +- case CCM: + case GCM: ++ if (session->cipher.mode == NULL_CIPHER) { @@ -49 +50,2 @@ -+ job->msg_len_to_cipher_in_bytes = op->sym->aead.data.length; ++ job->msg_len_to_cipher_in_bytes = ++ op->sym->aead.data.length; @@ -52 +54,2 @@ -+ case IMB_CIPHER_CCM: ++ case CCM: + #if IMB_VERSION(0, 54, 3) <= IMB_VERSION_NUM @@ -54,2 +57 @@ - job->cipher_start_src_offset_in_bytes = - op->sym->aead.data.offset; + #endif