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 80D7343837; Fri, 5 Jan 2024 07:56:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0EA42402CC; Fri, 5 Jan 2024 07:56:34 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id 5F896402AC; Fri, 5 Jan 2024 07:56:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=er/TPOVE3DsByBxH1O/k7QQzdp5Cu34JjUbM/ME3d7V0j3Y1Wh11UCcCgIO73NFLvSkdeHPFNC18Gj9QbR2YgyUcuLUm2IVbeFSkXuJzMuAC1Ddw58GK+PCMujfAXmv/PfKo0R399kIAZASNmEOOGQPdARn0333T48loSYmgTSoKcLbvFldBRXtgzbog16JwScmGf6+heP+SKDPSDF3hDtiqLgipIScTHRnWx0hUDRMAmSWTNKzKKWf8AuM9IpVAq99wOFDaw/S8QQF1LrvBQ0bqj6HLB531vEsO5j36GoELD36wkvP7UE/FvYZcWSbxyj8V4FkInq4rF1HBcZa/cw== 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=Njegjmffsr9aCXJ3/MMCeNiLGzBOYJoBQ4APA9EiTH4=; b=gVPdqi50wN0ewuuObiwrlB1OoJ43PyEnVwYVv8nwylOHuxdCEy6yMhZTuMUaFQfvEM+f/GIZaSk5HnYWVWQDp/8DXXhuIoMlTfv/CMQxYN5uH/VOUGgHp1YIcSs7/3VaglwLdElKpqhV89wJy50lGGQthhFhPh8G0yUIcMBTo9yL82cK4y8WjjN3WIb+YVo4doAjzftBh3rKu20W6Gp/wAt24G6L0+9RASaEd34ceDa+T2HTigoGY+e6Eat/DtCC/15rVO3sBfQJi+h4wKr1E0aEsS95FPgqCoyDGPRyquQ6kPnDCZVYytD+SP9Q3W0hTxjh9+BzVAMSb9bQp+BeSA== 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=Njegjmffsr9aCXJ3/MMCeNiLGzBOYJoBQ4APA9EiTH4=; b=I2QlVhR2bBFCiUTRHNXZAcfnC/hsw2PWqGgYe8O8aGns288YB2MPJZJoncwi1dyVRqR2/30t0AId+q1MfQ97q8tPnUp6g40XVq6U/kz+68wFxIXYbLQUYWiN6nX3Ak+xVstum+lH/E3iZ6cJTEr3OO7UBF3uvHKS4+7xQwOLYMM0mq378aa/SDLtV0H5Fy1SljhhePlbggQTZgoEeVt52MHEFEVJThsxiu6/vfWE5qY9XVc6ncSmjcrsBzA/6/YAc1WwNI7rznAAi0fpAVKpZix4fArh6DPIfukTTi+iWkgR9DkyaVMyvY/MJY4/nfQ84Nx8J9vRWFJdiLySol2C/g== Received: from BLAPR03CA0091.namprd03.prod.outlook.com (2603:10b6:208:32a::6) by DS7PR12MB5910.namprd12.prod.outlook.com (2603:10b6:8:7b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Fri, 5 Jan 2024 06:56:29 +0000 Received: from BL6PEPF0001AB72.namprd02.prod.outlook.com (2603:10b6:208:32a:cafe::bf) by BLAPR03CA0091.outlook.office365.com (2603:10b6:208:32a::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.15 via Frontend Transport; Fri, 5 Jan 2024 06:56:29 +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 BL6PEPF0001AB72.mail.protection.outlook.com (10.167.242.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Fri, 5 Jan 2024 06:56:29 +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; Thu, 4 Jan 2024 22:56:13 -0800 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.41; Thu, 4 Jan 2024 22:56:11 -0800 From: Suanming Mou To: , CC: , Subject: [PATCH] app/test-crypto-perf: add missed resubmission fix Date: Fri, 5 Jan 2024 14:55:56 +0800 Message-ID: <20240105065556.906471-1-suanmingm@nvidia.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB72:EE_|DS7PR12MB5910:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d4766bc-37ca-4272-646f-08dc0dbb71aa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SNYFf8M+Tdgl6DRDT7JO+iO0+kqKy+NF9bm4fusgoYvKWGNHMlTYXJzwI0ko69M73CaCCmxypIjX6xnU8La5hxZ6Jjw/u7j5qrL1XUW+OXqv3MqlDWeUYFjl+PN51HcYDvSU7fi5bnH6uYaHzEeQDt5mmhriQ7yAQo7U6g5HJrzr4Af6k5919P/405qoOdmQ7b2umftYKesZpA5hjYrz4Qgnb6kLXt458+AEi6G+AnfRK3/hqX6lG3hhvBHdDyz8CRw3UTnLBko3d6VHV2DKohA2C+wayGzRuoDCKsKjyPFJufmJ3L79YF1RZfzojl6lbNrsbapjgIbl5KIy1V9aziAad5V29Uoo2y2rOIp+RIXwGOIBFckrzl640LOZxUTWSVQJQUp5VXgIL30PDuyVKima2uPSbFPiJnTY2mzEO5t1VJvefWTYglEBQSS3S40B2Xh4OzSvWxpDUFrkBRvbbiIsibmaoSLEyu5dDAfKJn/jrqugsVfMOZkzX+pGLbq5RIs8r3F651pW40isGUHHQXGzOTAJCDyUNS3l3M/VGrFLtcTAgEubhtNjKF0U3M64P4MdC51Bd1VGcyok+IvGiEFN40t2BmAkzLlIwBltMmqOuMaL2cv3f0Tl5AFDOWxkLvgqjOdg99IPOnpd3l9rmqGrXoCmzwr0+zgHwzssVC7ye+yD2x+mtYdt4EL70IgGIhtNlbL4U8v+q+hHJ5V1dgiB09cpugzbcA/QUgM051T1z6jQh2sc74J1kWbT6bJ+ 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)(136003)(376002)(39860400002)(346002)(396003)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(82310400011)(46966006)(36840700001)(40470700004)(336012)(83380400001)(26005)(2616005)(36860700001)(47076005)(426003)(8936002)(16526019)(1076003)(41300700001)(6286002)(5660300002)(8676002)(6666004)(2906002)(478600001)(316002)(4326008)(54906003)(7696005)(110136005)(70586007)(82740400003)(86362001)(7636003)(70206006)(356005)(36756003)(55016003)(40480700001)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2024 06:56:29.4930 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9d4766bc-37ca-4272-646f-08dc0dbb71aa 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: BL6PEPF0001AB72.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5910 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] 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 --- app/test-crypto-perf/cperf_test_verify.c | 14 +++++++++++++- 1 file changed, 13 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..0328bb5724 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,19 @@ 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