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 AB8FC43CF0; Tue, 19 Mar 2024 02:58:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 488F940281; Tue, 19 Mar 2024 02:58:01 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2097.outbound.protection.outlook.com [40.107.220.97]) by mails.dpdk.org (Postfix) with ESMTP id 624944021E for ; Tue, 19 Mar 2024 02:57:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VcJM9ShFM0g4Z4vqboEBZ5SvS2krqd7i0uK2BsUqwsoJJQretKIb/tmYKmAvsl7w9DT8hx20g1KiePbg6I1qrbKsvBZrQbWyTMHWdY7C4cldI5PeE/cuviZVy5gB0lEZA9HrlWi9lyPgboFB3+pB3lKek/yY3e0hjcEaEldmkqv5l/5vC+86nT6F56s2YTp3gQFdxxIxN/X6Pa3f3OIzga8gX7YPQtJzVKf0FuSqFIP7WgbL/2sz6029S9gLCZYDDrwBsaARkf2cltynEIWEO3A7/B9apNpRKijDPr4qus/25sZENifIOWFq6TV4vNvP2kpTx6N6D5KFCcL5/m1mmw== 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=fAjA1tPqcek2NrVa6CG468RXzrR5Ohb7yrpdn/iVciM=; b=Cc4pP8tL8ptqWosNiW/AePR6os33u9QESL4Z2dNv2rB+grGQGrowi+fn53QQWUhH5wTVh30ZYLDmRL31A+7KgGRbnB1MjtrLK18U+kim3wBiH8I7hxAMvtU4hYXQhTHJ8+3HnMFt/X6GwDlHfkKoaH9Xcj7JPK8AJdrnaBc79MmpI2wpFkmixjU/2xfVA8fA4IBdNx/97ZCC3ji8DWqbSjDaGXfcI5CSiyvnQb6VU58apSOeqLBgs4/IpsDJ2WTpPgtDQyD4330gz6VsAIYGXQMskLCB9qvK3+Pyc1X/x4BXcDOPYXOm4b2V3x6lcWqaCuLDz0mPppqNhlxqvk4tKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=fAjA1tPqcek2NrVa6CG468RXzrR5Ohb7yrpdn/iVciM=; b=A6sq4HRjFZWOnncdTXMhSd6vOmRgF9FToF6UInEUmWMt0qSoRHvFfo5Y7mhGy54pGUbEkwt3RhCi3Oj1OlUHrlC8ecnBHD1CQjKO4u8z4UwLmQEzX6/vtsKTAr02u6TuE9SPPR+SU6NdLulFxHsV1b+UhYXswCvFxYg92tccnOUp/rNtlAE4rIpY0vNJl9UuOQgEoBNHYztXFaEwueUvag6LbOfLDJEwwkwtpl5ZT2HHF7+YbZZP6gLHnmRrDcYv3fGZtP2oX9No6Vr7/3k8s0gO0CosTyfK+a0lBb1mA5bqZRqOgxu7IehRG8JDUX2HeaLNBvxGAA+cC8RTPXOL5g== Received: from CO6PR12MB5396.namprd12.prod.outlook.com (2603:10b6:303:139::8) by DS7PR12MB8273.namprd12.prod.outlook.com (2603:10b6:8:ed::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Tue, 19 Mar 2024 01:57:56 +0000 Received: from CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::8911:190e:1f1b:9d96]) by CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::8911:190e:1f1b:9d96%5]) with mapi id 15.20.7386.025; Tue, 19 Mar 2024 01:57:56 +0000 From: Suanming Mou To: Akhil Goyal , Anoob Joseph , "ciara.power@intel.com" CC: "dev@dpdk.org" Subject: RE: [EXT] [PATCH] app/test-crypto-perf: add throughput OOP decryption Thread-Topic: [EXT] [PATCH] app/test-crypto-perf: add throughput OOP decryption Thread-Index: AQHaP741fQ9w9f68TEG7BEM2I7WNn7E3/9sAgAbByvA= Date: Tue, 19 Mar 2024 01:57:56 +0000 Message-ID: References: <20240105100104.908543-1-suanmingm@nvidia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR12MB5396:EE_|DS7PR12MB8273:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gF9SxXrds/dNoH59qCe/ecOcytk6ILgmX/aRUNI9NJIbGOZdw753I4XCBxOCHR+Fi4nRhruG9jAt7Q613VfA1vXe+3aHSxlATzua6D5rIKphsp7dpPWkfBea6oDtoo9kj8voPsyy+CIa86iAGMTLuY2DpzBuhOlSGCl8684dmUMBRcHPEDqSRbeDFBUlGC0JaX2DX/ygcD393DTpC8zfG2N1eIy4mIED6Sa+GeWBDBCuqGPO+VtczpidTK2wuOx78lHoCxN8lXKaamKfMUpX0XzbN3Pnl+epEVm5zsP1hU0vnO+Rpwv/r5XFJkIJxAPL2hWjvi3S/sW18zYsm9QBJxj/aSrFWya7F2/AVjj1VQEdetvnuz6m9os386Y6s1nzx9oIReK4zYe4/aZRLVtOVpISZoa1TuE0ITUYyU5CmS5wsj5dyW1wSp0j9OgM83+J2pX125GsblBZTNwOUB9TA4ITekPlZi5bTUzLveLDkd1Y+3JDvOd2wY9bjhDJkBZThJ4cs0Y46+n1tsdK/Vlx9jcA2MjIENaBLIRtTIh46+gdn0K1Lhfa2l/0V6F7SFWb1bXYhFziaY2GH4TYDNjcNWdasfCXzNrKW3HS3HtWYfBZ+j2puONad8qjtSNnXlCX2QNq8DxrmVFDtpWLxFUNFcEfDD9pdSkdDV0SPq28Wm0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR12MB5396.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(366007)(1800799015); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?egtWpaomM7T4CgwlMxv+Y6RaHS/Zcy2tHu6MwNTBlfkWwf4OoJEgKb+Toczk?= =?us-ascii?Q?GnuSXwLRffrHRc6Zjp2vO56npv0fsYIXR74dq6hODVRlJRpYouhwBO2XcXzp?= =?us-ascii?Q?TdjZ4oR0kDN4c7kc04N0WuiMIj2f4viPQs2YybkeAUQrvwOComR4j1KQx39O?= =?us-ascii?Q?HAAOmcaqLtbeOCQiWbwNJ82t+18kKn1zrJoWVVuNdwa5lPyvnRaIJodhvxCb?= =?us-ascii?Q?lWFjl8FhaKHbDExbxM6yCUyBnG6n2sjnjo4bnUSSki0I93OHhDHBkdPQuxJz?= =?us-ascii?Q?Rdzj27J5Z7b1TqbtyBNlW7wo6bNpwCeaoYxqSCeyaq0ihFz+T4RjoZJokvEi?= =?us-ascii?Q?XR+VB1CX/hXZLZl49FzuYHsYz+K0HT8jHvsx5tF/9mRkmy1G9qc3bZIBOWkF?= =?us-ascii?Q?1iTpnQyNYstD/LqgrG5j82KqDAXjsQEbD8JIpCiwxfd+ucZlBST/10hjpGua?= =?us-ascii?Q?X06U2Xc9PlKIAOioeRhKJvks2x7SkoLEGA5GALv3I3PuDGD/u0HIm85VuSQY?= =?us-ascii?Q?cPX7Y7ZPslBGp3a5ZKCpwc7jD6+k+2fwqhNVyqXPH0ru9ngZfzgvggLV7zQr?= =?us-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bTtxVbUioB1w0xupSqF?= =?us-ascii?Q?OYaIBAoHYERXR44GdzWaKBOXRpwSgI5Nrp0bqbgf8giRiCX6mDGfk7s2qL67?= =?us-ascii?Q?2KKHwO05CK11UWeNHbL7VL6sRX8haawGulj4HFfs6HXEXmCyqCWnwJsixO5Z?= =?us-ascii?Q?csiMEOwRFvxwuyAw31IJhHTEKC1RwqP2sdsGxW5OqPOb?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5396.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a412d06a-fe2c-44b0-886a-08dc47b7ff23 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2024 01:57:56.4622 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NUnpILr5xunVn/2plfrfV7Ajix4hhdZAZpBNwmxRCZfI40Gkm4KUrV0B1vdgjAVls/76HXxkd1CpHcIirUzOOw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB8273 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 Hi Akhil Sorry for the late reply. > -----Original Message----- > From: Akhil Goyal > Sent: Friday, March 15, 2024 2:45 AM > To: Suanming Mou ; Anoob Joseph > ; ciara.power@intel.com > Cc: dev@dpdk.org > Subject: RE: [EXT] [PATCH] app/test-crypto-perf: add throughput OOP decry= ption >=20 > > During throughput running, re-filling the test data will impact the > > performance test result. So for now, to run decrypt throughput testing > > is not supported since the test data is not filled. > > > > But if user requires OOP(out-of-place) mode, the test data from source > > mbuf will never be modified, and if the test data can be prepared out > > of the running loop, the decryption test should be fine. > > > > This commit adds the support of out-of-place decryption testing for > > throughput. > > >=20 >=20 > > Signed-off-by: Suanming Mou > > --- > > app/test-crypto-perf/cperf_ops.c | 5 ++- > > app/test-crypto-perf/cperf_options_parsing.c | 8 +++++ > > app/test-crypto-perf/cperf_test_throughput.c | 37 +++++++++++++++++--- > > 3 files changed, 44 insertions(+), 6 deletions(-) > > > > diff --git a/app/test-crypto-perf/cperf_ops.c > > b/app/test-crypto-perf/cperf_ops.c > > index 84945d1313..1d57b78c2b 100644 > > --- a/app/test-crypto-perf/cperf_ops.c > > +++ b/app/test-crypto-perf/cperf_ops.c > > @@ -608,7 +608,10 @@ cperf_set_ops_aead(struct rte_crypto_op **ops, > > } > > > > if ((options->test =3D=3D CPERF_TEST_TYPE_VERIFY) || > > - (options->test =3D=3D CPERF_TEST_TYPE_LATENCY)) { > > + (options->test =3D=3D CPERF_TEST_TYPE_LATENCY) || > > + (options->test =3D=3D CPERF_TEST_TYPE_THROUGHPUT && > > + (options->aead_op =3D=3D RTE_CRYPTO_AEAD_OP_DECRYPT || > > + options->cipher_op =3D=3D RTE_CRYPTO_CIPHER_OP_DECRYPT))) { > > for (i =3D 0; i < nb_ops; i++) { > > uint8_t *iv_ptr =3D rte_crypto_op_ctod_offset(ops[i], > > uint8_t *, iv_offset); > > diff --git a/app/test-crypto-perf/cperf_options_parsing.c > > b/app/test-crypto- perf/cperf_options_parsing.c index > > 75afedc7fd..6caca44371 100644 > > --- a/app/test-crypto-perf/cperf_options_parsing.c > > +++ b/app/test-crypto-perf/cperf_options_parsing.c > > @@ -1291,6 +1291,14 @@ cperf_options_check(struct cperf_options *option= s) > > } > > } > > > > + if (options->test =3D=3D CPERF_TEST_TYPE_THROUGHPUT && > > + (options->aead_op =3D=3D RTE_CRYPTO_AEAD_OP_DECRYPT || > > + options->cipher_op =3D=3D RTE_CRYPTO_CIPHER_OP_DECRYPT) && > > + !options->out_of_place) { > > + RTE_LOG(ERR, USER1, "Only out-of-place is allowed in > > throughput decryption.\n"); > > + return -EINVAL; > > + } >=20 > This check is blocking cipher_only decryption which should pass irrespect= ive of > inplace/oop and Data correct/incorrect. Sorry, in that case I will remove "options->cipher_op =3D=3D RTE_CRYPTO_CIP= HER_OP_DECRYPT" and only kept " options->aead_op =3D=3D RTE_CRYPTO_AEAD_OP_= DECRYPT ", what do you think? >=20 > > + > > if (options->op_type =3D=3D CPERF_CIPHER_ONLY || > > options->op_type =3D=3D CPERF_CIPHER_THEN_AUTH || > > options->op_type =3D=3D CPERF_AUTH_THEN_CIPHER) { diff > --git > > a/app/test-crypto-perf/cperf_test_throughput.c b/app/test-crypto- > > perf/cperf_test_throughput.c index f8f8bd717f..eab25ec863 100644 > > --- a/app/test-crypto-perf/cperf_test_throughput.c > > +++ b/app/test-crypto-perf/cperf_test_throughput.c > > @@ -98,6 +98,29 @@ cperf_throughput_test_constructor(struct > > rte_mempool *sess_mp, > > return NULL; > > } > > > > +static void > > +cperf_verify_init_ops(struct rte_mempool *mp __rte_unused, > > + void *opaque_arg, > > + void *obj, > > + __rte_unused unsigned int i) > > +{ > > + uint16_t iv_offset =3D sizeof(struct rte_crypto_op) + > > + sizeof(struct rte_crypto_sym_op); > > + uint32_t imix_idx =3D 0; > > + struct cperf_throughput_ctx *ctx =3D opaque_arg; > > + struct rte_crypto_op *op =3D obj; > > + > > + (ctx->populate_ops)(&op, ctx->src_buf_offset, > > + ctx->dst_buf_offset, > > + 1, ctx->sess, ctx->options, > > + ctx->test_vector, iv_offset, &imix_idx, NULL); > > + > > + cperf_mbuf_set(op->sym->m_src, > > + ctx->options, > > + ctx->test_vector); > Unnecessary line break. >=20 > > + > Extra line Will update. >=20 > > +} > > + > > int > > cperf_throughput_test_runner(void *test_ctx) { @@ -143,6 +166,9 @@ > > cperf_throughput_test_runner(void *test_ctx) > > uint16_t iv_offset =3D sizeof(struct rte_crypto_op) + > > sizeof(struct rte_crypto_sym_op); > > > > + if (ctx->options->out_of_place) > > + rte_mempool_obj_iter(ctx->pool, cperf_verify_init_ops, (void > > *)ctx); > > + > > while (test_burst_size <=3D ctx->options->max_burst_size) { > > uint64_t ops_enqd =3D 0, ops_enqd_total =3D 0, ops_enqd_failed =3D 0= ; > > uint64_t ops_deqd =3D 0, ops_deqd_total =3D 0, ops_deqd_failed =3D 0= ; > @@ > > -175,11 +201,12 @@ cperf_throughput_test_runner(void *test_ctx) > > } > > > > /* Setup crypto op, attach mbuf etc */ > > - (ctx->populate_ops)(ops, ctx->src_buf_offset, > > - ctx->dst_buf_offset, > > - ops_needed, ctx->sess, > > - ctx->options, ctx->test_vector, > > - iv_offset, &imix_idx, &tsc_start); > > + if (!ctx->options->out_of_place) > > + (ctx->populate_ops)(ops, ctx->src_buf_offset, > > + ctx->dst_buf_offset, > > + ops_needed, ctx->sess, > > + ctx->options, ctx->test_vector, > > + iv_offset, &imix_idx, > > &tsc_start); > > > > /** > > * When ops_needed is smaller than ops_enqd, the > > -- > > 2.34.1