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 E1E00A0C43; Tue, 16 Nov 2021 11:37:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C50741172; Tue, 16 Nov 2021 11:37:33 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2047.outbound.protection.outlook.com [40.107.20.47]) by mails.dpdk.org (Postfix) with ESMTP id 7DEB041104 for ; Tue, 16 Nov 2021 11:37:31 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I/u3CAO0JXKTlvVy5KuDSrX9qLhYXRtxQbLi2ZVMejRui52GEdRkgN8d8/5U2H2eAEia2f4MdGPxNVLFCIhfaHzKyY0ge4sdYa9YdyT6qkM3p64pnAnoHSiohZLn5SgjZvxHuUYM9UVVwm9lOFbHKS7FEHPB/YseHnzX8qKauoCdrRLfpPwOm2llVthr4bn5a74AYfhlav2y/xwTdkWvxZowHF29CTaQlc43HtALikb+ztXp/5SfwCqINBrJdz2lOfMlcI3IZ55wZAK7RkenPvlg7zwB64ItPynNG+YhCFkeO/Go15rJd4PuB5/uTzDUU8iXsoFCGbJFhIUpMu/DKA== 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=x1f053dHDoIvKW0wohO0EmUVa8cVn6nRifffPEyP/2k=; b=OnKFLP9Vul+0Tid4eI4M4cHr+qFklTEoIbDJ1bScaDSjDVIfh/YevCnKA9a9GmO3RxPiTr5PCH384oVlDyVvcX9UN9tsdZZJL9cdHgzgB+iG1WWtAAKhjgboEb/YJlkacTQfqWWjKiDeh8hrpCOItBccxXivQQnmmrtZhqo1wZsrlaacKXFQHLUF7C7hxgH0GK6zDxGMP4QP1a26zFIv9xntw+lBv+5kK2yhdWiSlUZyKMBirzqzapOTON6lU+LKiM6Xm1uf/k2WnYHtqlMeP8SPkABszVdURuTWsmJwxrsIS+/BanhKxzxmPYAuQMURvf+MmaF2+wh8Z6kxU2H6ZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x1f053dHDoIvKW0wohO0EmUVa8cVn6nRifffPEyP/2k=; b=JxUt0If62wzUbFsjtm5KQgY1zicrLGdoGw1Q4jOw75fivAovQjZRi+zS/sIWnS68FtWakVhBweQVim6/RVAiuZBWkT6qYS8XpBRi34A5jW9kK0ZaPlPt8gUWDH3hi9PQMcgYCdbmxGFTKorHbFbObDi+45UQOkjM66pToCRWFC4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by AM6PR04MB6583.eurprd04.prod.outlook.com (2603:10a6:20b:fd::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26; Tue, 16 Nov 2021 10:37:30 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::9895:b941:f782:6999]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::9895:b941:f782:6999%9]) with mapi id 15.20.4649.017; Tue, 16 Nov 2021 10:37:30 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: Gagandeep Singh Subject: [PATCH v2] app/test-crypto-perf: fix segment size for IPsec operation Date: Tue, 16 Nov 2021 16:07:14 +0530 Message-Id: <20211116103714.2148007-1-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211116102301.2142361-1-g.singh@nxp.com> References: <20211116102301.2142361-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG3P274CA0021.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::33) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 Received: from lsv03457.swis.in-blr01.nxp.com (14.142.151.118) by SG3P274CA0021.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Tue, 16 Nov 2021 10:37:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 20f804cf-fd92-4340-b17e-08d9a8ed1746 X-MS-TrafficTypeDiagnostic: AM6PR04MB6583: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1186; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iSwUoH7edWpjmZ4+CAQA8OeFDTYuUK9sDDKJltvMFzGdaJNNETY6f1Br6ab/tUytNgMET7WB7lttf7fh9N/+WHV6PUxgkYM2xBeaMVPbfFMBXT7tnU8gichNp70M9rVEmqo0v5nQhUCtJcI3bCE9eUeHvd1/7XM/ddQ5BxM4MZs8ewoIfAq4LWwwLoUBZrUpfxGfO8Xqp7sYOdEyVLRH1OBc9U0mOvZxZQPaNUm67JdMgMB3Fbugpb0buxHzFpV5CJ+TNNycjPm1Drr1uHMbzsB46ObKf8tiJxPbzspJH6H/hmtNHnVpuxdp72AGnB2Po3/OpeipfdPP0v52LPsff2Jn1S6/ne4swzdXz7DBwvp1E28D156xDomH7441Q4hbDLtfstZ3ExxmKvRoyffLefwDJlt0nDFiwpeDhnSaeTcbBemiPoSajyoAXVnVOqkjPWkXKYmGOoIXwK0GClkRcY/OrtlkvC7Vurc8SRyH3aXkQ+sma/4PHiUxMjpixalladY9S8iHFzMWsEQfqhFWUW1uukG7fUyhk3co/vsWMsJrFfxktS1MCIwBwJmjQE9+0ejm0CGgHwGG2iKZ6mp+9aj4XlVw1rSQ5kKRYtzd4J9M0it1M+mRkQht4KFSAYXCV3jzSnwMYWrG6NFQVFU+NJ4cfAN0Om8f9FuJNYfy7tU9kkGkwcb95+wu9NaEjH0N9b1XZM4+MlbL4nyQ3KeRpQsiqTyPOZDWjD9zhbFHrsn890wKylxpQALmDPhg0Omv X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8198.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(55236004)(2616005)(956004)(86362001)(6666004)(316002)(4326008)(6486002)(2906002)(66556008)(66476007)(66946007)(38350700002)(38100700002)(36756003)(1006002)(508600001)(83380400001)(8936002)(26005)(7696005)(186003)(5660300002)(52116002)(8676002)(1076003)(110426009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?upmPyYlrmltYKd+2Uycu67kq0MKHWF5CsUgL4Et40R0bGPtNrxMxy/7NDIEa?= =?us-ascii?Q?BnvkJCs5v69dgZa6Vd7mvxiIdwvE+Cgoyz7wMwfyTUChdCgqLxGNAP/eZDhE?= =?us-ascii?Q?gy+R2cdYOIIGM6xEHFWt48hLzaHGg4ve2VH76GCcDkxykDTttGmoGcR+tQoW?= =?us-ascii?Q?GzSfpON8v7HdhJ+VsTqrHdV11Clhp9n3IvgTS+V9uaNjv66Ju+nyxkvJJYvV?= =?us-ascii?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0DexO2NsrdpvF?= =?us-ascii?Q?bgZYRHI4tT6usIRb/iYuynYtTgFe/rBymYq5cAMFALA040PUrXbhBQ+3egG5?= =?us-ascii?Q?Hg0cyy0xWXlkD0MzVUqzdLxbeab22VETKQki/NzZjnwh28fukIS37dBHLckm?= =?us-ascii?Q?bStlvYjYIaoiC7Oy8czxOpLMbgTRa2FpfWdwG1i+XnP7O9DFuQVKjYSWkExK?= =?us-ascii?Q?3uGaDXY/HQ8LAVGtPw/Fi9vymuEh3alFtxyBymmLxWnvLIzVpB/bPSdaYWIl?= =?us-ascii?Q?6k8kFP1NEu5B/BimApOCo69KHSL2u0u1FznZkx/UhkbhcKiIVGaq79yhs/4W?= =?us-ascii?Q?BdVRUPmcduuFX3EiyuvHzCPdbcpzBIYBO6y8O3uCI69b9gXZFs4JQtVGMbm/?= =?us-ascii?Q?dljOqcL/qkM4Tb2KE4NXnJ61ycJbBoy7vYKf0rDlGHNhIub/ttboI8ZAMB8g?= =?us-ascii?Q?3cCbYJJSzV7fBYKTqng=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 20f804cf-fd92-4340-b17e-08d9a8ed1746 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2021 10:37:30.5270 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zgmzV9zSf0kAPGu9+4Z/pL0pQnoqcmL+5jC1VuNkceuVntW/aYGRhHS/A5P98XOK X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB6583 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 Application calculates segment size based on buffer size plus digest size only, But if the operation mode is IPsec then packet length can be increased up to 73 bytes due to IPsec overhead. In this patch, adding the IPsec overhead length in segment size when there is no user given segment size. Fixes: 28dde5da503e ("app/crypto-perf: support lookaside IPsec") Signed-off-by: Gagandeep Singh --- v2-change-log: Update commit message with fixline. app/test-crypto-perf/cperf_options.h | 1 + app/test-crypto-perf/cperf_options_parsing.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/test-crypto-perf/cperf_options.h b/app/test-crypto-perf/cperf_options.h index 031b238b20..cdbc027b89 100644 --- a/app/test-crypto-perf/cperf_options.h +++ b/app/test-crypto-perf/cperf_options.h @@ -61,6 +61,7 @@ #define CPERF_PMDCC_DELAY_MS ("pmd-cyclecount-delay-ms") #define MAX_LIST 32 +#define CPERF_IPSEC_OVERHEAD 73 enum cperf_perf_test_type { CPERF_TEST_TYPE_THROUGHPUT, diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c index c244f81bbf..268f544936 100644 --- a/app/test-crypto-perf/cperf_options_parsing.c +++ b/app/test-crypto-perf/cperf_options_parsing.c @@ -1132,9 +1132,12 @@ cperf_options_check(struct cperf_options *options) * If segment size is not set, assume only one segment, * big enough to contain the largest buffer and the digest */ - if (options->segment_sz == 0) + if (options->segment_sz == 0) { options->segment_sz = options->max_buffer_size + options->digest_sz; + if (options->op_type == CPERF_IPSEC) + options->segment_sz += CPERF_IPSEC_OVERHEAD; + } if (options->segment_sz < options->digest_sz) { RTE_LOG(ERR, USER1, -- 2.25.1