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 ED555A0548 for ; Sun, 28 Nov 2021 15:58:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0D474068A; Sun, 28 Nov 2021 15:58:31 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2087.outbound.protection.outlook.com [40.107.223.87]) by mails.dpdk.org (Postfix) with ESMTP id 5AEF84068A for ; Sun, 28 Nov 2021 15:58:29 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KHyVcah+HVEui6gDSXpeRQGt9b/2F1Ds0pSyk9gS6nEBTmKYf/7IuMrj4bHZOfkoNO3ZjLGCQaKM7QJWJteEfgt35D+eQ6bOeQWg/d/3xw4x0sxZpu0JaRTMOc+jvqpyQjlnJkz7ZBMyithSF6VwqlAhhfUr3LszqMTUPcBzdnNOrn7BDxFaTXe66Tqaz8PuhS+NY3cP5ExM0D9Do6vVkba4hrwSZy8l9q9wEQFu3sdWlcLT31NO0xNDuHCCeZrpqCh+5LscQMMNSZNmpfJt+EwD3GAzXc55pdcDEM+Ax6ADNrWzFAg73yFdHmsg/WXSDdGRYp8NxDY1CpCZR6VOXg== 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=zZEqTG3NHBOuH9DF1OsWrH7r7j6AaJr0gDp4/39BH1k=; b=X5S1frW3WGdM2dPiLdkRoGCYbzzkao64exJFqeKNJkuE8l/q8FimlYh2HqnYHml+pc0/Rs8Jhrx7TtSluAc7l/3AerDEx88FPAIYQTMvHLj44pefKjxIW4P1WHwD+3lhfc/mIn0bkBX+KYhid6hdugXtOnwQ5jK6W3SsbrN6e0IBJFrSVqejGo1zVRdcNtT9QfbKdMO5d7bcY9tLoDR791RbY1QSlNPXPoTG82Qb8SbrseK2DwK2L3Fo9DvAKgemmgiHMRl9wH9WgzF2pt9ppMqKZlXOFX7FcptYvJJREH9EYTs9HbzupmxPrN99lQJeVeP8ko15aSvgOQd+r2Vm9w== 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=zZEqTG3NHBOuH9DF1OsWrH7r7j6AaJr0gDp4/39BH1k=; b=W4d2fYm212fatkUwEHTGqlwaiAfv7W/TuUrkOD+PmndQrN3dBzP3kboBOQ1+BOzguGvAF94ZXHUkU+yeW2swbzATZ8TTnOqExLfsbWFTE++TrCzAzI+jQjQkNAbNBet2YDFrBS7n6khhTJSA7dW+LJB3wni4pPPtHBnUzn0wNdHySRBlk9nmg3vQu6oIakWS3XAqTW+xG0DvsRgZDMUCRszxEyTIJ8ZEaTwbCMPr6LeC9aiewEpt9Ya8tNfIEkF4ZCJzh9GgWHsdjMsHTNm1I9xDtXifxLvc7MZr2TMmDtcf8+2Dd0o0AGdEuNwE8ddPb3/P+/nqCiaGpFAhOFf66w== Received: from DM5PR20CA0034.namprd20.prod.outlook.com (2603:10b6:3:13d::20) by BN7PR12MB2596.namprd12.prod.outlook.com (2603:10b6:408:29::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Sun, 28 Nov 2021 14:58:27 +0000 Received: from DM6NAM11FT061.eop-nam11.prod.protection.outlook.com (2603:10b6:3:13d:cafe::db) by DM5PR20CA0034.outlook.office365.com (2603:10b6:3:13d::20) 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 14:58:27 +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 DM6NAM11FT061.mail.protection.outlook.com (10.13.173.138) 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 14:58:26 +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 14:58:25 +0000 From: Xueming Li To: Kai Ji CC: Luca Boccassi , Anoob Joseph , dpdk stable Subject: patch 'test/crypto: fix data lengths' has been queued to stable release 20.11.4 Date: Sun, 28 Nov 2021 22:53:36 +0800 Message-ID: <20211128145423.3974892-33-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: 1266b8ba-6c7a-4839-9421-08d9b27f8889 X-MS-TrafficTypeDiagnostic: BN7PR12MB2596: 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: KlGPlPvWbomDNEDnS39zG3zyqt5wzHOykDQ5E8MZMnaEbY6f+a/WnQwFv8hPPnM1JEh0oIdklCh65E50rD4IDD8vlnHGGx+WCVTCNoZmceUI9UQYA5QLY514gT7GANQfJXmpMdcWK/69X/RbyrxEHAzbfTOhxWWW3CTMpJ+YQs3SPrkd61LISaAuq55FwwX1CPf5bHCkHTTOLkf9EseXquKoFbPUg8U12cyna1zZtIEEae4hQ55gzFdyioH6wVvm+al7WJDYKF2kHOWX4gywFvHRLiTmQ/DiFBzBvGmt31k6cd1sBwRpMb8WlVgVKwCBleKpuwNPlQbx6miUO1CyyIPas1hOi2WmV/LyTSSfcBmfolurIZVKGX2IdWa7zv5D1MaOo0Lddc8M4Dh2OLQSF6jvL+c5rtzM6j1lCoTfwI1Q1FdcQa2MU6cct0yxojKjx1ldTdPZVPp8CklWB0D4O0h4Ryau9ztdikx+QvLH97Q18JopGDx620/FgmkFDV7pRITnDweKuAjtQC0jvSxlczSpmYjh+RpQoL8Uer7ekqVkHwuTdNV5pjCypNqvb1g8ufWbCIaMxRLhDfUM8X6lIOtio0iMnDcXERIekGlqJIzukTZq+E8eM7fr6cZmv3jZ0LkOJ3B7C7zjbaYaX7h3RWtpU3zLKZvyMKDqCK6R6TWiHVeoanzr8+NugPf6UlFO5rNeBwl6IqRUn9EyW4EcXVXcIo/D8xJqGhXJI3/yEma/6uC2/q15dZwl0BlEXcZs7ZchrQG6pEMBUkmm8Y5YUA8bYJcPjf+ex2FOx/Rn0tJSwDknYLS1jEY6o34tHdzubAfAsjYLPzPWkLCwuShe7A== 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)(47076005)(82310400004)(356005)(83380400001)(55016003)(7636003)(8676002)(8936002)(53546011)(36756003)(86362001)(7696005)(508600001)(316002)(54906003)(4001150100001)(2616005)(966005)(6916009)(186003)(16526019)(26005)(36860700001)(6286002)(336012)(2906002)(4326008)(70206006)(1076003)(6666004)(426003)(5660300002)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2021 14:58:26.9854 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1266b8ba-6c7a-4839-9421-08d9b27f8889 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: DM6NAM11FT061.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR12MB2596 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/fa912be2c5392c50dd9157070c3a0537cad53a90 Thanks. Xueming Li --- >From fa912be2c5392c50dd9157070c3a0537cad53a90 Mon Sep 17 00:00:00 2001 From: Kai Ji Date: Tue, 9 Nov 2021 10:42:31 +0000 Subject: [PATCH] test/crypto: fix data lengths Cc: Xueming Li [ upstream commit f52b75c61b7cf75e5c9a665e465dfbace2a18f30 ] This patch fixes incorrect data lengths computation in cryptodev unit test. Previously some data lengths were incorrectly set, which was insensitive for crypto op unit tets but is critical for raw data path API unit tests. The patch addressed the issue by setting the correct data lengths for some tests. Fixes: 681f540da52b ("cryptodev: do not use AAD in wireless algorithms") Fixes: e847fc512817 ("test/crypto: add encrypted digest case for AES-CTR-CMAC") Fixes: b1c1df46878d ("test/crypto: add ZUC test cases for auth-cipher") Signed-off-by: Kai Ji Acked-by: Anoob Joseph --- app/test/test_cryptodev.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 7270730145..7a205a2b00 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -3707,9 +3707,9 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata) /* Create KASUMI operation */ retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, - tdata->cipher_iv.len, - tdata->ciphertext.len, - tdata->validCipherOffsetInBits.len); + tdata->cipher_iv.len, + RTE_ALIGN_CEIL(tdata->validCipherLenInBits.len, 8), + tdata->validCipherOffsetInBits.len); if (retval < 0) return retval; @@ -5853,20 +5853,20 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata, ciphertext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, ciphertext_pad_len); memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len); - if (op_mode == OUT_OF_PLACE) - rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len); debug_hexdump(stdout, "ciphertext:", ciphertext, ciphertext_len); } else { + /* make sure enough space to cover partial digest verify case */ plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, - plaintext_pad_len); + ciphertext_pad_len); memcpy(plaintext, tdata->plaintext.data, plaintext_len); - if (op_mode == OUT_OF_PLACE) - rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len); debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len); } + if (op_mode == OUT_OF_PLACE) + rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len); + /* Create ZUC operation */ retval = create_wireless_algo_auth_cipher_operation( tdata->digest.data, tdata->digest.len, @@ -6867,19 +6867,19 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, ciphertext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, ciphertext_pad_len); memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len); - if (op_mode == OUT_OF_PLACE) - rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len); debug_hexdump(stdout, "ciphertext:", ciphertext, ciphertext_len); } else { + /* make sure enough space to cover partial digest verify case */ plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, - plaintext_pad_len); + ciphertext_pad_len); memcpy(plaintext, tdata->plaintext.data, plaintext_len); - if (op_mode == OUT_OF_PLACE) - rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len); debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len); } + if (op_mode == OUT_OF_PLACE) + rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len); + /* Create the operation */ retval = create_wireless_algo_auth_cipher_operation( tdata->digest_enc.data, tdata->digest_enc.len, -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-28 22:41:05.042473116 +0800 +++ 0032-test-crypto-fix-data-lengths.patch 2021-11-28 22:41:03.263542006 +0800 @@ -1 +1 @@ -From f52b75c61b7cf75e5c9a665e465dfbace2a18f30 Mon Sep 17 00:00:00 2001 +From fa912be2c5392c50dd9157070c3a0537cad53a90 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit f52b75c61b7cf75e5c9a665e465dfbace2a18f30 ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index 1b68d7c43b..29e8675e30 100644 +index 7270730145..7a205a2b00 100644 @@ -27 +29 @@ -@@ -4102,9 +4102,9 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata) +@@ -3707,9 +3707,9 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata) @@ -40 +42 @@ -@@ -6332,20 +6332,20 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata, +@@ -5853,20 +5853,20 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata, @@ -66 +68 @@ -@@ -7400,19 +7400,19 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, +@@ -6867,19 +6867,19 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,