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 B2CCB43804; Wed, 3 Jan 2024 05:01:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5642340649; Wed, 3 Jan 2024 05:01:03 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2068.outbound.protection.outlook.com [40.107.93.68]) by mails.dpdk.org (Postfix) with ESMTP id 91CAD40648 for ; Wed, 3 Jan 2024 05:01:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YeegBELgW8QdH8Yt5Of04mo2O8PQbK2ii6lx7+DALqODGKFURuvn+EZWqWIBUJ1VsmiBo0lCJtMPX21HNSXvHWmizbxQ5JhnG+42PcICP2yWFlHw9NP6HOKnJSRE/G1H5s099n0BozdtEAZPnXD6llIcweh0+1iO+3dbXX6Wf39n8cz8h4/ZQrfSQtZJhNMXVlemm96t3x7zcrn4WfJM9RpQUG8JNzpQNyLwSWUEMHpkbu6tPgCbz4EjWVsjBTwNz1qXuuuKRxjdvzMa0BNDn1XHt2s5su7pue4/C0A2+RhBMK1RHGPV9n9nM3gV3+zwEueT0kXWKXexMpkrz3sjig== 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=5KX0nJ/Zaad0WPRc1KJr7vn8wrti6QEatxJtkbgykng=; b=NcD2dnPPpDrOciFLAD5mhd6SFMjOFIf4RTSnYgReaM/N9vwiYWlRFUx8u0lw+7nH24J2I+tPycZhvvbNtGxM9aWzJT1d6QucZ+71pF1WnMq2FiVMMt1BQHF6LCXXqFmRY7fi+RFbxjFkkCioTf8qHtFoJjokhl/izM/HGy7FmxmKVyjpm/dtvP9AOJdT9oyjXDLIkZmBbbrD4L4xxCJREgSbez6P+EyvuYPkUlSy1h7O+MACRNb9zojSo9m/6dnv3yd1jSnTzMrSY1VWJGYHHZhMA0rPBzeBam/xui8nHCYVThzXljogo/DtLYSW5w4jDhlEy7azkaLhqNz/XjlpVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 (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=5KX0nJ/Zaad0WPRc1KJr7vn8wrti6QEatxJtkbgykng=; b=f0j9FsyiDNuHyR4Ll8fVYFSF3t3qR9C0vix0DRGbb1zGo9cXQY1GoAbbpzQ/Lkn4TpW4FdtQUFpBL2HHzBpREPi/ijMguynXgMpwtupWT/+jDhyfTbbfrZzlEEnV2cPRla62zARGc976fEOeKHjZUTEkRqmyXsTymlPw63xhaCQMTA2KoBMouCbI7oTq6706WIrwjylnNuEN19itwdAP8bp4W9h9HDKM4ge+HocvnwUrq7YDBDvAsPOnxow2YBeOdNh9W+Q0ITy0cYAbHQcxbpY24lU89vC+cECYkF5wT6uahU5euBRHlr7xAAvFRauFztC4sOkYX6NcjBNRm2RtiQ== Received: from BL0PR1501CA0027.namprd15.prod.outlook.com (2603:10b6:207:17::40) by BY5PR12MB4966.namprd12.prod.outlook.com (2603:10b6:a03:1da::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 04:00:56 +0000 Received: from MN1PEPF0000ECD5.namprd02.prod.outlook.com (2603:10b6:207:17:cafe::71) by BL0PR1501CA0027.outlook.office365.com (2603:10b6:207:17::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34 via Frontend Transport; Wed, 3 Jan 2024 04:00:56 +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 MN1PEPF0000ECD5.mail.protection.outlook.com (10.167.242.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Wed, 3 Jan 2024 04:00:56 +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, 2 Jan 2024 20:00:40 -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; Tue, 2 Jan 2024 20:00:39 -0800 From: Suanming Mou To: CC: Subject: [PATCH 1/2] app/test-crypto-perf: fix copy segment size calculation Date: Wed, 3 Jan 2024 12:00:23 +0800 Message-ID: <20240103040024.720600-2-suanmingm@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240103040024.720600-1-suanmingm@nvidia.com> References: <20240103040024.720600-1-suanmingm@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-TrafficTypeDiagnostic: MN1PEPF0000ECD5:EE_|BY5PR12MB4966:EE_ X-MS-Office365-Filtering-Correlation-Id: af1960d8-57eb-4d66-f745-08dc0c10966d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x/PFnHgSIUkmuISp5TtndSOfotFT3NQse1MJPBMRLf19vSeTjo+RW8j1h2FBM2zId+58LFYUi6eF1Hr77PGCsWGpprmxHgVQI4/2h9W38tXpZoYB8EVYosekLrxZQENDBpkOx++n2E1cLt9O9doV+g4y9OQ864lXtwoBeG1dUaMdJ6GR9L+yFkvRRBVfK/CmezhyghrevF4UikkMD/V3u/JwH0xzeq9Go1wwkfl0OrbnTQsI2bzElgbvYU4iBrLDWrsR0ZudJQzJMBSy9e41Vd0WaDAWvbKqAS8FF6kpv2aBPR9Hn7XDxvNrxNVnrwEdnj7ThkCBd7pOxnI6RwQPvv1HfQ05QQF6TbhAYZJHGS1Xx/aLLzy7lb5Kxn+Mu/HEM87YGwjaUipslsYgSx/xCgh4D5YUTViRW4Bmj4UjLGW3GzUy4RnG/RoghZQoIvSdTCmPi3A1/n63xlCAyompGHlsQoU2e17ZTAchHAqQwSZr/q1ALlk11SlVPYrvcOvdavnfQU6WOtIwZNxdwHqKE2QZGYcmWCQSo4ef1R/6LDNnvNTN828pijy8RZItWRHUrlO/Erhd1G5yVcYVfJo6trXCYxXt1LKUYNDXjN3o2yVBcvjUwAHUOnYVPZb2PlxNeJRI4tc0EJu8gyjMfSohvHaRbZptQkIA4KtbQPNhdlknluS7YUv8jy9/zPOf90sxdQ/RBHLTcrcLbI3ybI+fvnSQyDxeaiBBOZrQvKFHzBUY8hKj/tj7nQAekdOCJK0X 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)(4636009)(376002)(396003)(346002)(39860400002)(136003)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(82310400011)(36840700001)(40470700004)(46966006)(6286002)(336012)(426003)(83380400001)(1076003)(2616005)(26005)(16526019)(7696005)(36860700001)(6916009)(8676002)(4326008)(47076005)(5660300002)(41300700001)(2906002)(316002)(8936002)(478600001)(70586007)(70206006)(86362001)(356005)(36756003)(7636003)(82740400003)(6666004)(40480700001)(55016003)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 04:00:56.0691 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af1960d8-57eb-4d66-f745-08dc0c10966d 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: MN1PEPF0000ECD5.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4966 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 For the case crypto device requires headroom and tailroom, the segment_sz in options also contains the headroom_sz and tailroom_sz, but mbuf's data_len is user's segment_sz without headroom_sz and tailroom_sz. That means the data size to be copied should use user's segment_sz instead of options->segment_sz. This commit fixes the copy segment size calculation. Fixes: 14864c4217ce ("test/crypto-perf: populate mbuf in latency test") Signed-off-by: Suanming Mou --- app/test-crypto-perf/cperf_test_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c index ad2076dd2e..8faf832527 100644 --- a/app/test-crypto-perf/cperf_test_common.c +++ b/app/test-crypto-perf/cperf_test_common.c @@ -271,7 +271,7 @@ cperf_mbuf_set(struct rte_mbuf *mbuf, const struct cperf_options *options, const struct cperf_test_vector *test_vector) { - uint32_t segment_sz = options->segment_sz; + uint32_t segment_sz = options->segment_sz - options->headroom_sz - options->tailroom_sz; uint8_t *mbuf_data; uint8_t *test_data; uint32_t remaining_bytes = options->max_buffer_size; -- 2.34.1