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 0B9EDA0C41; Wed, 17 Nov 2021 08:40:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C52914068C; Wed, 17 Nov 2021 08:40:56 +0100 (CET) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20062.outbound.protection.outlook.com [40.107.2.62]) by mails.dpdk.org (Postfix) with ESMTP id 97AE240040 for ; Wed, 17 Nov 2021 08:40:55 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EnjR7haVrGoi9k39ZG89jRj9qlRVIDUC/WwQ+DW5MkzLvWqEOa624V/S9xgcUHZxnEFM8k9FG/WPugf6GZDG8jtqwvmCWIgd//n+CeXMLJvFHDisEJ5eYn3yiEWBiY5zktKJOoZ01mHv/9NUatMrh6bYM7ep1XQiWU36oXwvW7Ox3YuWki8ee94EVFE3dfcXMPP/N5LleSu/f4qhTZ2VOW3BXbVTftXPHM7oRrNFjEkWN2DY4OMsJgOWotmTNsqbd4CdzcVE7PJvg7FzqMYk44Muv3udCEgch+Hqq5TkgDJhT76SA2FZR7sX4oVHoP+5HzrDNvz5WGg7lfORCEbDLA== 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=ZgwdmkikFGYL1Q2XoqU8wGVAhRuj9ltw7eDyDDH09Do=; b=dKjeiikoXVFzAgyMr7Huy7Fgl31NrcDezhkWtXEGmMt/bLdpI2P6qfDeogsYEEheORN4jl3sFqVFlrFpafb6LMaJYuhqlKKDJLyffxSn6UPf45IDDgx6WnLjZG91fxLi3xFonL66DhX9GzohpPDOVJ313+ZdIMkSRcvF1E4ZTxZRWN25a4X6gKbRFmr1JS9xyz4MzffncjNvZIBMcSVh8HysYp3JWU5yEjOTxyGv7pDwnRLPSA0Y5CzyPWO3X03p1IFfVm7mQcu3YExQTHsTsGgYSW97iyOXQAliUQ4Z8ntCGg/FWlRLEAJHYk2i0XBFzYOY0XNwL57BABoa2qpXZQ== 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=ZgwdmkikFGYL1Q2XoqU8wGVAhRuj9ltw7eDyDDH09Do=; b=L8AFfmYX5xv9upDv9Z1AakFBHzH5Gx14Ym1/d82TGLib6f1TOTJp8LgiF2zY+g5AabPwhXFrTTo2RPGt8vKTrdBryNot2rdQisa4IXrnqtTphgUv9ZI+HBwi2YKphFc9MZVVk9plf2q+ru1QhJsUN9W8bSE8ow16Yn/V39hxdaw= 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 AM6PR04MB6024.eurprd04.prod.outlook.com (2603:10a6:20b:b6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26; Wed, 17 Nov 2021 07:40:54 +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.026; Wed, 17 Nov 2021 07:40:54 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: Gagandeep Singh Subject: [PATCH v3] app/test-crypto-perf: fix segment size for IPsec operation Date: Wed, 17 Nov 2021 13:10:31 +0530 Message-Id: <20211117074031.2297112-1-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211116103714.2148007-1-g.singh@nxp.com> References: <20211116103714.2148007-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR02CA0014.apcprd02.prod.outlook.com (2603:1096:4:194::19) 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 SI2PR02CA0014.apcprd02.prod.outlook.com (2603:1096:4:194::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26 via Frontend Transport; Wed, 17 Nov 2021 07:40:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2c5987f1-d9b0-410a-6054-08d9a99d95b9 X-MS-TrafficTypeDiagnostic: AM6PR04MB6024: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:415; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mLs3/Bb1uUDn9muQapomZrRclrNl+VnwHNuAzw+nW/xOBEHIWBcJuPoMPBZP5oo3m8SqHvDj0GbiVBE/mlg8gLiBbtZDOSLjg3SEdUAQvEA7mfBtt2iGrGgdEPZn9dV54n8rzjO6vUF8/NFfDgKfNL7ZIY22ZBCgelAE0sDTP8EA8exigU7g8QScMDSIJ7XPt3M4efXbSFZQo6cIvpLWCEAlFWp+4nLVXzXj3kedPK66Nm7OrqbnntpUyg05GWu+j+3HfaD234yCCAFJYaKQkPoAUsa6UmHfeR9+riU9s2O1Mmo0pCvPUl9ZjFkI2bMWf/szlZ3FS1UJV33Gao6A/ew9V5/69McjhVUO5OXENS/mTU1EhFtgywF5D1gRw3LR8yALjTtPzaIUH6Nx99YuQQoOn3WBKu5N4+A+blX0Hdap8z/p8mB+jt4aMNQ1jw/L1dZPs9cArIKas0q7WxGzAEU6P1m+CD5ePG1DhzswjqsbMlYZwHLKck0sYq+CnVbdDSNPhvc930rpNLcznTKq3OqrnfqT6j0T8leaL+6iIqiKqCv9hUA4nrYty59bRrEv8i/q+zw8iV2rgPXIDz4zhdUlUsSBzzNRIuJwC4uJ9fDsXJQGfl4ilGT74DgJ1YIHH7/vcPD8aJMk0A15Yr1n6Xc+6dEtNr4phrmULqY1c08PFPZbXHlo6smMuSF1lcO6XiU0kw11+WCBmdVbc3fPr6I5F7ZLxruheMJaE5gwoR8= 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)(66556008)(66476007)(66946007)(36756003)(38350700002)(38100700002)(26005)(6666004)(8936002)(52116002)(508600001)(83380400001)(316002)(956004)(186003)(55236004)(2906002)(7696005)(5660300002)(4326008)(8676002)(86362001)(1076003)(1006002)(2616005)(6486002)(110426009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?WKMo5K9A4FEBpuWPPfPXpylYbbQRE3YkJ3kD1PbMxeeVIPAkidDA8LOXeGA5?= =?us-ascii?Q?x3z6axhi4NOONlcjFYIG4DnYStPwwNR/xsqJz/Sfw6jzaC6kQQ7YrCAyMtnX?= =?us-ascii?Q?NRa/XJCvuQ/yFJSUHcwT9AQz+3IynsURnNHdf9dckq4LTLQwNhyYA9/ZBrOW?= =?us-ascii?Q?rDhW9XaxjLz/OLEuGMqhzq1P+hKU/+ATfAHBvnj3SwP0OAhtHdpKGFhwuISL?= =?us-ascii?Q?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pDg7zzkTLzB+a?= =?us-ascii?Q?umRIjFU7Wi466VZEFZy8E7m/PFQfJa9LnWJAfa1Co+PIL0lW02/nAG18YS70?= =?us-ascii?Q?WEaD8u9hnM7nwcjkIrbccxRYQHUZc3VFTNd4hmTTu7DH6dKTFGEi1P4Sh0OT?= =?us-ascii?Q?sGVwzZ0KXcBUAW1wRwTtdwHwo3DjocwO+c9+xMItEKCVfZlRLyXbP5sqLVBb?= =?us-ascii?Q?VOlcdjm+xGuidNgvcYCKnATmdoAEChDioik7+G37n8HFD1ENqiFO3tWHC1Na?= =?us-ascii?Q?t4D8zE/rXHERrU97Igaq03FQkAG03xptqY05+r08+5l8f3YK9y6ed30i24QE?= =?us-ascii?Q?rHB/0atTgDuUUoZi9u3NOJ+aUIoV3Z5sYRRKHyR3yYHq8P7hQ0MhhcrbbRuj?= =?us-ascii?Q?1xr7xCE3dE8+ekO3izLbNGGxdtMPUiBFbMizeXs5kfAVFkE7ShfnvVGLe2UH?= =?us-ascii?Q?1c5Tr170keXZfOe8h5k=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c5987f1-d9b0-410a-6054-08d9a99d95b9 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2021 07:40:54.3190 (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: 3BufnnQBrx0l3INQD4DY7esTXzhKFl08U01O56zR5t7ec2pZuJ0jqSfpnhS4uCkI X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB6024 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 by some more bytes depends upon the algorithm. In this patch, increasing segment size with RTE_PKTMBUF_HEADROOM 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. v3-change-log: increasing the segment sizeby headroom size instead of an algo specific max overhead value. app/test-crypto-perf/cperf_options_parsing.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c index c244f81bbf..771e116ebb 100644 --- a/app/test-crypto-perf/cperf_options_parsing.c +++ b/app/test-crypto-perf/cperf_options_parsing.c @@ -1132,9 +1132,17 @@ 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; + /* In IPsec operation, packet length will be increased + * by some bytes depend upon the algorithm, so increasing + * the segment size by headroom to cover the most of + * the scenarios. + */ + if (options->op_type == CPERF_IPSEC) + options->segment_sz += RTE_PKTMBUF_HEADROOM; + } if (options->segment_sz < options->digest_sz) { RTE_LOG(ERR, USER1, -- 2.25.1