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 32F8B43B86 for ; Tue, 5 Mar 2024 10:54:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DD6E4026B; Tue, 5 Mar 2024 10:54:22 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2065.outbound.protection.outlook.com [40.107.237.65]) by mails.dpdk.org (Postfix) with ESMTP id B08A04014F for ; Tue, 5 Mar 2024 10:54:20 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CdoEuwFOesxZQfiiBP2hwgS33sULiJCeB1ZTQmnNHiVj32luPf1qkqVEt/82FmokQq6a8PSv2bv07qA6PpfPT73YlmHs/NFU1sfk0CyqE0XW2TQ2/l32JYMJWP7sCm4NcqbnQ65zQfEJh5zSiJNC7cIKZxM4T7AiZdrocSRtZjXcBa3O0egFC8cLh160Gbq/028mGi7YqQeWWVsK43O8jejodIE8HFh4OFSqItkOH/wW7Gy86f7vTKs6At/IJQ9LebJnTNYHgrkJtKBD37jnYEpkYdEMMzfThmlAinj0GmKzXmWA4DD8zN+0oS7FlBDKalfsOBwo/UkGwq7in29FYA== 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=sAg6WBUQBVuBwgUDwHc2ZikXhbhCRV32x+W4bAE4h5M=; b=K/qrTZZC1E49BfQr0p/rWL47+VZYaMBfHCET19Luzj7wpMx5Mrm2CST5FoGjhWpPnwnMs7ic/LX4lzZgzj4rQekR32C79QgO5d1onfUyX3u5tBEsiYL0t8BXWImxS08pXO1XhDo/VX68tHDTeEkGJb6KRPlUF59j1yO3PIyJ7BM6DEYXb1MDqAIk6O2YniDuzcxpBuykdxlsgefLkrYHwO1AmsmuPRGsJsMy3w3vviNzmnLj/27bBOigkD2ObBrEOIuJxALFkH55ak5fMO3aS+OmSBcvPJXoblTjs1vxqrgOmbhG41Vpoab84mDoQIge7+RdH+V3GlrM6qIm4V6tpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=marvell.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 (0) 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=sAg6WBUQBVuBwgUDwHc2ZikXhbhCRV32x+W4bAE4h5M=; b=XwI2ZsfQrh/gFIeRas1hsLDlWQFywBmOYo4HeQk/nuU78Hac04YWeXwFh+FOoWvK7ogXJBIdyzxGOJOOVHDa9Rq+9Ak9DonBjx3KDqRyowbcwGgd4JXi0u5GGWs3/FdxnbsDTlwEPMFlGM4wD8C4GL2VpclGPiIKEcOgd1c4nkhLDw49/Rq2ozwlFS9dJd8ucMnCPghJEbhnqGd6enBwmZ/yl5G42xTbAWH4TToO+DlKY89G8Sb3sM1aB7e10RYxzj+TvMuPKxrjjCfCSds99Khmwlg/4efVqWVlFVXqRvGryH8ufQhLqGqWxRfrWR139fhr5oO3/hgLuDzrVeUSPw== Received: from BYAPR21CA0022.namprd21.prod.outlook.com (2603:10b6:a03:114::32) by CH0PR12MB8551.namprd12.prod.outlook.com (2603:10b6:610:186::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 09:54:18 +0000 Received: from SJ5PEPF000001D1.namprd05.prod.outlook.com (2603:10b6:a03:114:cafe::a8) by BYAPR21CA0022.outlook.office365.com (2603:10b6:a03:114::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.5 via Frontend Transport; Tue, 5 Mar 2024 09:54:18 +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 SJ5PEPF000001D1.mail.protection.outlook.com (10.167.242.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:54:17 +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.41; Tue, 5 Mar 2024 01:54:05 -0800 Received: from nvidia.com (10.126.231.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.1258.12; Tue, 5 Mar 2024 01:54:04 -0800 From: Xueming Li To: Suanming Mou CC: Anoob Joseph , dpdk stable Subject: patch 'app/crypto-perf: fix encrypt operation verification' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:46:49 +0800 Message-ID: <20240305094757.439387-69-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.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-TrafficTypeDiagnostic: SJ5PEPF000001D1:EE_|CH0PR12MB8551:EE_ X-MS-Office365-Filtering-Correlation-Id: 8c530e04-309e-4cd6-c48c-08dc3cfa3941 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2TUKisfaCg1LEQY6jByRJ6eiStuJifBprhwWrtKKjmq3GXfz3Fj0Q6mY+8WhqIz15HB/aaAFba/fAZmCeDxmP9E91R0a2Y7JgNPMRDKrG60Mt2YnDhkNBuoU6iIl98oIBbmD3PVeLny1Fh1G0yx/teqv/wwQ5gjkTrczsT921Eqhhx0SDXnW5AXia4z/jDl2TY4VeXzWnR1BN+sV00zibhClXM5dQl2Y0beHfZ2lx0R05hfALkTlfJRZqoSf4GrNwi5dloaaRf6pkbP9DaUxefni16epKUkEHgSqUB6ts570aHuvgsc49YP7Vx6LhCQe59/Hv76LMR94V4Uy89qM3agbmtbifGNavVW1Gg3L+8UFzbTVLCY2aMIpFZrftP0sB7GKREGCWhs8MeP2EuoeRjJhIpC3RtjPXhf2yoxVC8oGgDY3dqjHE149Sb7TBBnJpUKisGybqnGI+PN9Y65DHInQfoKBjj3wHu2i5CYtvhSA/G4KPnrAnkG5KdezTIYsaO2LLWtHrWud+DK/iPjD8Wa4Vq9AgEdEuBzj9OH38DiKXnbsAvrwhbv7V0CA9Ouv09CtFwNQ0ZVWJQMTIGQc3RCngQ+kTsCoHCpvezfTi+r7WUKxpfQGUiva04ZyM4VhuLSF5fVMRyHL81iYJp0gvcSqbi7szSudzWZsVOkbsg6KVXTy+BcXkyBE9yzYvR1ZH+jKcVge/9JwW4dEqWF36kTfsIdeEQsbUwKNZBTxcZgtbxwR8S4q2M7Joqs5JOcX 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:(13230031)(36860700004)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:54:17.9713 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8c530e04-309e-4cd6-c48c-08dc3cfa3941 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: SJ5PEPF000001D1.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB8551 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 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/24. 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=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b7fd1f73feff644ae8483546f3fb5c9903f5e6e6 Thanks. Xueming Li --- >From b7fd1f73feff644ae8483546f3fb5c9903f5e6e6 Mon Sep 17 00:00:00 2001 From: Suanming Mou Date: Fri, 5 Jan 2024 08:03:23 +0800 Subject: [PATCH] app/crypto-perf: fix encrypt operation verification Cc: Xueming Li [ upstream commit 7d55ca15124c47561120d23d5023843ad99c1a81 ] AEAD uses RTE_CRYPTO_AEAD_OP_* with aead_op and CIPHER uses RTE_CRYPTO_CIPHER_OP_* with cipher_op in current code. This commit aligns aead_op and cipher_op operation to fix incorrect AEAD verification. Fixes: df52cb3b6e13 ("app/crypto-perf: move verify as single test type") Signed-off-by: Suanming Mou Acked-by: Anoob Joseph --- app/test-crypto-perf/cperf_test_verify.c | 55 ++++++++++++------------ 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c index 8aa714b969..2b0d3f142b 100644 --- a/app/test-crypto-perf/cperf_test_verify.c +++ b/app/test-crypto-perf/cperf_test_verify.c @@ -111,8 +111,10 @@ cperf_verify_op(struct rte_crypto_op *op, uint32_t len; uint16_t nb_segs; uint8_t *data; - uint32_t cipher_offset, auth_offset; - uint8_t cipher, auth; + uint32_t cipher_offset, auth_offset = 0; + bool cipher = false; + bool digest_verify = false; + bool is_encrypt = false; int res = 0; if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) @@ -150,42 +152,43 @@ cperf_verify_op(struct rte_crypto_op *op, switch (options->op_type) { case CPERF_CIPHER_ONLY: - cipher = 1; + cipher = true; cipher_offset = 0; - auth = 0; - auth_offset = 0; - break; - case CPERF_CIPHER_THEN_AUTH: - cipher = 1; - cipher_offset = 0; - auth = 1; - auth_offset = options->test_buffer_size; + is_encrypt = options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT; break; case CPERF_AUTH_ONLY: - cipher = 0; cipher_offset = 0; - auth = 1; - auth_offset = options->test_buffer_size; + if (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE) { + auth_offset = options->test_buffer_size; + digest_verify = true; + } break; + case CPERF_CIPHER_THEN_AUTH: case CPERF_AUTH_THEN_CIPHER: - cipher = 1; + cipher = true; cipher_offset = 0; - auth = 1; - auth_offset = options->test_buffer_size; + if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) { + auth_offset = options->test_buffer_size; + digest_verify = true; + is_encrypt = true; + } break; case CPERF_AEAD: - cipher = 1; + cipher = true; cipher_offset = 0; - auth = 1; - auth_offset = options->test_buffer_size; + if (options->aead_op == RTE_CRYPTO_AEAD_OP_ENCRYPT) { + auth_offset = options->test_buffer_size; + digest_verify = true; + is_encrypt = true; + } break; default: res = 1; goto out; } - if (cipher == 1) { - if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) + if (cipher) { + if (is_encrypt) res += !!memcmp(data + cipher_offset, vector->ciphertext.data, options->test_buffer_size); @@ -195,12 +198,8 @@ cperf_verify_op(struct rte_crypto_op *op, options->test_buffer_size); } - if (auth == 1) { - if (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE) - res += !!memcmp(data + auth_offset, - vector->digest.data, - options->digest_sz); - } + if (digest_verify) + res += !!memcmp(data + auth_offset, vector->digest.data, options->digest_sz); out: rte_free(data); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:32.985038467 +0800 +++ 0068-app-crypto-perf-fix-encrypt-operation-verification.patch 2024-03-05 17:39:30.793566494 +0800 @@ -1 +1 @@ -From 7d55ca15124c47561120d23d5023843ad99c1a81 Mon Sep 17 00:00:00 2001 +From b7fd1f73feff644ae8483546f3fb5c9903f5e6e6 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 7d55ca15124c47561120d23d5023843ad99c1a81 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org