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 C3D1D438CB; Mon, 15 Jan 2024 09:09:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 493854029F; Mon, 15 Jan 2024 09:09:05 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2047.outbound.protection.outlook.com [40.107.96.47]) by mails.dpdk.org (Postfix) with ESMTP id 1FD2040272; Mon, 15 Jan 2024 09:09:03 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kzthscIuzDGnA1gRvfzYRwpw1SApFojdSFy0xREb5THu1hbPCqR/rn6OeOZtyYo14XwiUoOdh3LoqJDW4QbBV3vpQYw1do8GtGN+D4IJEqQBuoWrKwS9OEYThSbcbtWJUuIUr7MSCI7F5Ss13uRpThEYI7nCIp4ar2XA4KyOQ5nGMqOAx9Mb7tXgEH/nCisERFwruoMazlYKHU29vNwJ4s23djL2YKw9bSVZfA+6QYcHB0nW06960FAaQoyuaRe7dwFL9JPfXk1zBwb/2BxkXH5temgksd0/TSOhvnjma4V6eKLhCZhejTZEd9wmPgwm7mvBtMaiWV+2odGE2PbAow== 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=g3naAwVDQH6vx5OlaLAc9u6jjQESzsOusI1FYXBHgwk=; b=gqmXcKDSnDBP6iIpP7ReBSyC4ibph7TLuSgFqWBzb8Ut7yh518PRX80tuWFwZnvOG1Atob7Pt7H6CyDOl5mr2oyT8+oR9/YmIMus7kqBFzI+eGOJHUW2zrwi9Ohr3jpKsak2Tw0Su5RqHaFCapQR8J8vyg72hYe/rJ6OE1pD/rlXZtOSbPN3pB66Rm24qDhIA1bJT2cvr9wII/51ahhtx8bkbQv3PAfWEDaW7iRjx+zvTuCiPPTOrt35IOgrj77cFpHuPwBvtzSdzMWOukQx61GsFE8ciPXtgr5aMpI6iwoWAbU90O7jCyUEiFTV7tNmwHAJkrRwIue6oy8rpWbj7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=g3naAwVDQH6vx5OlaLAc9u6jjQESzsOusI1FYXBHgwk=; b=cVF5RiPXh4Kpfe5cGGWKVl/3WXVfx+EcfvIgYw+P0292tkOG3DjW0Lr+2EQg4Fd1wRIItQs0QmDANAzqiMu10l7GtD+BHzVGAfM+tQKRHpAZ6hYeWSqB7JXXyztSuE3Op/XxZ7cjQABsD2PwIPSzDNi1U1eRO6EMOt1e0LIf8iBVQ3XbEVqugbb/I0WaGCT0M7lUe3bB0VRf3sJNR8/d1PmfzYnZGR8/mTXeZjeOdF6ySCBBRnWUtKWohxRum+B1kMnhUPBQUnYgWNRLMBR2qZAta/o0iw+JjW8RUDh9PdP/7zMjClJ24snyqfCOGSjd8+f4uDOJk0v+eGA6ZBsLsQ== Received: from MN2PR10CA0030.namprd10.prod.outlook.com (2603:10b6:208:120::43) by BN9PR12MB5068.namprd12.prod.outlook.com (2603:10b6:408:135::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.23; Mon, 15 Jan 2024 08:09:00 +0000 Received: from BL6PEPF0001AB59.namprd02.prod.outlook.com (2603:10b6:208:120:cafe::b2) by MN2PR10CA0030.outlook.office365.com (2603:10b6:208:120::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.26 via Frontend Transport; Mon, 15 Jan 2024 08:09:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL6PEPF0001AB59.mail.protection.outlook.com (10.167.241.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.14 via Frontend Transport; Mon, 15 Jan 2024 08:09:00 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 15 Jan 2024 00:08:48 -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.986.41; Mon, 15 Jan 2024 00:08:45 -0800 From: Suanming Mou To: , CC: , Subject: [PATCH v2] app/test-crypto-perf: add missed resubmission fix Date: Mon, 15 Jan 2024 16:08:30 +0800 Message-ID: <20240115080830.1051786-1-suanmingm@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240105065556.906471-1-suanmingm@nvidia.com> References: <20240105065556.906471-1-suanmingm@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB59:EE_|BN9PR12MB5068:EE_ X-MS-Office365-Filtering-Correlation-Id: 75c2ad68-9ca0-4c3d-ad10-08dc15a13b11 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WXsS/VI7QNGVyzmAnx7RhY142f9ae2s+QhjH1eOojiCHLo5smplJJfzQ2thDATBSPF/7hQ/Hl+/9oB0uNn2vJtu34TK3LP/lDkyx+Xdhl0S8f2GiuPdpSAO0RdmrPVPgTPF7wl+wEkCMuP6DcgkJvtzrb1/Y6n3DKdvWmJG0kk+wHqM8sGhO4jbynDYx9V17mMjMRGrE9HU17DwLK6vcP9F6xiZ2SjL4LvG5R7k9SMh0jgtGnRZU/Kgrh32wFMnYD6lr13pUr1FbS6KYrd5cehwKFlKYa22JP/Iemf9Sb6PN8A/+OZV2YrplNDGSFZd/njEQArZB3t5D0xcohXQ50zzFdWSYB9WYZI5VF+Gf782JaKRSo9SZWoWjN4l4+TkTzIIfgxfmLE9mUwtbLiD45H2yL7lH2ZhPk66XppFVY8YvW5FXo08LBQuco3ZzIrXzIJdBzvtDCcP8XYUZB9s5kvbrEC3FeCHtEWWcwgd0BwvU/hwNpGOFyjwvDzJtuBRUr6oeae+FsNhKv3JE/L0Tza828JG1BmN2VyF8qXEso/dhCPpw7EgVcBnO/CM0+KICKJgVV8WelKbdmAnqlsiaWfA+IasM9surlJra/JM5fYOwTEWF+yb7iyF5MrqiR9Pkd1K/Ssu6MpPDyL8EsJN9NgTenLSa7j+N7FaU9KAeFswhAJOzJDmzEW/sYQKiSV8IIIKoAZZK31dgcT3Utjyn9qIh8loO5Kug0UCqs/hmjWW1um8r/8ZA9q/O0jsWOr60 X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(396003)(39860400002)(376002)(136003)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(82310400011)(40470700004)(36840700001)(46966006)(5660300002)(2906002)(86362001)(356005)(7636003)(83380400001)(7696005)(6286002)(336012)(16526019)(36756003)(426003)(2616005)(26005)(1076003)(36860700001)(82740400003)(478600001)(6666004)(47076005)(8676002)(8936002)(41300700001)(4326008)(70586007)(54906003)(70206006)(316002)(110136005)(40480700001)(55016003)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2024 08:09:00.2668 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 75c2ad68-9ca0-4c3d-ad10-08dc15a13b11 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB59.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5068 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Currently, after enqueue_burst, there may be ops_unused ops left for next round enqueue. And in next round preparation, only ops_needed ops will be added. But if in the final round the left ops is less than ops_needed, there will be invalid ops between the new needed ops and previous unused ops. The previous unused ops should be moved front after the needed ops. In the commit[1], an resubmission fix was added to throughput test, and the fix was missed for verify. This commit adds the missed resubmission fix for verify. [1] commit 44e2980b70d1 ("app/crypto-perf: fix crypto operation resubmission") Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Cc: stable@dpdk.org Signed-off-by: Suanming Mou Acked-by: Anoob Joseph --- v2: code-style update. --- app/test-crypto-perf/cperf_test_verify.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c index 2b0d3f142b..10172a53a0 100644 --- a/app/test-crypto-perf/cperf_test_verify.c +++ b/app/test-crypto-perf/cperf_test_verify.c @@ -275,7 +275,6 @@ cperf_verify_test_runner(void *test_ctx) ops_needed, ctx->sess, ctx->options, ctx->test_vector, iv_offset, &imix_idx, NULL); - /* Populate the mbuf with the test vector, for verification */ for (i = 0; i < ops_needed; i++) cperf_mbuf_set(ops[i]->sym->m_src, @@ -293,6 +292,17 @@ cperf_verify_test_runner(void *test_ctx) } #endif /* CPERF_LINEARIZATION_ENABLE */ + /** + * When ops_needed is smaller than ops_enqd, the + * unused ops need to be moved to the front for + * next round use. + */ + if (unlikely(ops_enqd > ops_needed)) { + size_t nb_b_to_mov = ops_unused * sizeof(struct rte_crypto_op *); + + memmove(&ops[ops_needed], &ops[ops_enqd], nb_b_to_mov); + } + /* Enqueue burst of ops on crypto device */ ops_enqd = rte_cryptodev_enqueue_burst(ctx->dev_id, ctx->qp_id, ops, burst_size); -- 2.34.1