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 7EB7543CEB; Wed, 20 Mar 2024 01:14:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E6EF24029F; Wed, 20 Mar 2024 01:14:39 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2059.outbound.protection.outlook.com [40.107.243.59]) by mails.dpdk.org (Postfix) with ESMTP id DCFC240298 for ; Wed, 20 Mar 2024 01:14:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fXx3UPAfOccDjtPCA0vMQ0hXobCr+Ox9TJ77BGl4YYY0mMBg1wmqPxXqO+KTp3FBZ2Ac7Nzib94J6r8yZipZO6Urb3rhLOXZ4M2e+mGtP8aSaPIlNk0QdUfhUOnL2HGT7PeUXZi1fYhx8eppqQCNiPKLrwJlMHRA2YxlE+mMGbcBsl51jqUbwYXaE2YjztFQHHflROXTfhZYN4d/o0VjinPB7QDt0hkwI+koOqdcecetYNo+yBb+xVhRp4u1k728R9f3PY5mz/lV4iJVcrVo77NR8ZuaM1Q9Y0Rj/duN1VKmch6Z4vekBGa2VdX71F2rObAWMfWx8Tp5t8ajsqSxTw== 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=5StxdPf0On3MSFXN73iYnerKLFuHIi25kcv6qf3OXak=; b=MRqYC7yYyc4zSvJGnK6O6+OJ/n7eXp23H5GBla4jEp4RJYN4CqeKWOmRyb5PZIIK4fDsbqi5HYORycJzDXjoBFW9QB024p4gPSCn8Crnb2P7bLsAnBCyqH0PbxNufLR8MKxoPaGkRZQwf02cAkjd0lzcpqofXJPy/VgYVKEqE/mB/l7B9ikKjpA00j1vkjxz526vPNho8QCmESU8ZPmcrM0urAsZAXDwuJJsFhY8yf0MzaiBuLKilf1AU1IsE4JTxk52yMllVwMzQbD4YxJFNs7xLAnKouIxDL4UiavEZ9OCsDLNpXjAnzK7+ShlPj6weSMN2RiMyk9rDXOn8T57dw== 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=5StxdPf0On3MSFXN73iYnerKLFuHIi25kcv6qf3OXak=; b=G4ebKfNvnT1OCLrKQcKwzGh8BBZ7PEktr3zTTO8LtC60dbz6E6QQ83cwGs//lKVjhYaWmUtc8xEnI0SA/OC7jPY5+qu1t7svyGtxfzQOPvdqVqJoYki0NQ70MN1zfqSljhQlRyvVBwvRSvqZdVAq4rX6aQ6DIix/FEr3iUn3AX4lmFwpiMmce31u6ffz0hdFdHJBWnmd8SitLa4ceDDYOZTsoDnYIVh7zzXuxnAnS1vKVtv9b6OPA9HYVrrbiYWa+k701GjbrZcjJS0s+5WsXnhrar075FcZ1NsEKzS2bQneGUL64WsYuJJxiK+URl36uNqSfyMMMNzTYheg+86AMw== Received: from CO6PR12MB5396.namprd12.prod.outlook.com (2603:10b6:303:139::8) by PH7PR12MB6955.namprd12.prod.outlook.com (2603:10b6:510:1b8::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27; Wed, 20 Mar 2024 00:14:34 +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; Wed, 20 Mar 2024 00:14:34 +0000 From: Suanming Mou To: "Power, Ciara" , "gakhil@marvell.com" CC: "dev@dpdk.org" Subject: RE: [PATCH v2] app/test-crypto-perf: add throughput OOP decryption Thread-Topic: [PATCH v2] app/test-crypto-perf: add throughput OOP decryption Thread-Index: AQHaefMuRGSqIchJZUOuwn/Kojs97rE/LHyAgACQTDA= Date: Wed, 20 Mar 2024 00:14:34 +0000 Message-ID: References: <20240105100104.908543-1-suanmingm@nvidia.com> <20240319114623.1137757-1-suanmingm@nvidia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR12MB5396:EE_|PH7PR12MB6955:EE_ x-ms-office365-filtering-correlation-id: 63dd655f-f14c-4c33-02f4-08dc4872b90e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Auxb6PIEZvKQlR8iq6d0JLwOecuKoo6lQzE0SMjHFtqhv+bJ92okIpO273KbQJ/EsX19qCkOYwkKji84Z9ECFi5KoudwLJ4kzbOimuxJKyY+zkoHbZhw4bFPZncqQq5jrWGk6AJgphkBoH1DgyJ7MWWMf+AfmJkrElfsiRTRGe5S2PEi9SC88v5Yh3K68PdkwyYLtkSDY5ZV9qywfoIPDSCx2k8W5M25BUgpAtA5lgdcAqRRkOiqtA7GnzyxDS4+gzSR4rgt47eSKQgQDtGTLsXMZdgo2Ar7L40Q6qFAxQ4zHH2pRITxzXsWKorTt5grYz1+bJNbacjU/R307qpvxW9R9OmAlOzDemzEB9fSHQyOKHvfOekuQjJeIA2ayokn2t7TCUjUme2cY6MftlTshM9/G8ozp9cAnEeJDYnSGvjHAq7addjpTDarbROzI9Ucx02EKBMvH4DCRm3HVJRr/TYNl3MCYCO6xnf2IPBcMDJZCNfUaIjw2NmHLW5XISuQqDPYV7nKTm9b1QmVqQKmUX42/iOOjhRm2m4a6T2WnUvRfQgQSQFXIXK4U9Osp66RGcoERQukhf7uXcxZppvt2nHEbRiWm/MSvhyvhwyVauG0gyCgiQGtsnm9PUZdItESkR3A1bnELhMVnmujsjlUboE7uPsYZI5IXTUVSlLAuq4NI9AxXXh47XhajVyzE1aBSrydyNNvDIaZruOJ+zcTJKCBfsfsWsVV/Q+othTtZo4= 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)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?TU2x9mwJLAhMJwxDQewFSNuhngetFoP6JycW+Z021XrITz9v3anvYGJe5363?= =?us-ascii?Q?5agXniT4cS6yqS1RXyUJylnx8wDO82mkorDSPDb1O7iCzM96uEFIclMpWkzq?= =?us-ascii?Q?Q0ma0Ywa1LwL7fYQ16L02jYBtuizZnroDb/9mPjMfptn0cM05+900DBv9L/r?= =?us-ascii?Q?QHu62ZEjDdv/Cz3Y0c4XRWgnmHV5FPN5FplKUv8j82CBhPfsHCRrUfGdwfEQ?= =?us-ascii?Q?xb6ywBatIcflyxGpS0dtZrayjiu7rH8ZDS/qvXYgSYbeG2CB9vzYnO43d8IM?= =?us-ascii?Q?tiHXXfB7btANUFxfhg4uynhn9gebOvkL52uj6sWOTgd+yvJ3rKPmCUewcqH6?= =?us-ascii?Q?YRYp9XmQF1IaTAH6XybIArhm0Nl5iTKm+WLaCM93DWTBJaDRq7YDqj48Ysle?= =?us-ascii?Q?JQfI7FeUjL1FVgH2Vk9Oxv9sxlcHsiF4neY9iaBDaAIrUbkkN8Woe4h0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hLlp2I8TSSswyfojB6K3jRt9NjbdsZ/j1VdgP2D7Kq?= =?us-ascii?Q?WErw0xBGGq/eqoze2TzyugoFi1acjE/NA3fiWebULxzMcn18QHt7Rji4y2aw?= =?us-ascii?Q?4lMH1wjAASVHWh2DzmetzAJKdf4N+k3HdXtuH9G/pESIrk/92FTc+FxEIUth?= =?us-ascii?Q?Jw3ZELBoBNc9t6YPdXRJ1GkMpX52nr0HiqtN1ItyVndjxcBr3EGTBZenrIlb?= =?us-ascii?Q?hmD++Oww/53Sj1qPx8N7itdG3ZFUmR/x8Hg6p7FI?= 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: 63dd655f-f14c-4c33-02f4-08dc4872b90e X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2024 00:14:34.7837 (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: 93Z3y3zgQVK5Xrb9cLlxTNVxKLw0fdFNgQghLTQt1+VHy4o2tIiwtK0yftdjG4F6oYJtk4mmT0OegiLNE+LFCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6955 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 > -----Original Message----- > From: Power, Ciara > Sent: Tuesday, March 19, 2024 11:15 PM > To: Suanming Mou ; gakhil@marvell.com > Cc: dev@dpdk.org > Subject: RE: [PATCH v2] app/test-crypto-perf: add throughput OOP decrypti= on >=20 >=20 >=20 > > -----Original Message----- > > From: Suanming Mou > > Sent: Tuesday, March 19, 2024 11:46 AM > > To: gakhil@marvell.com; Power, Ciara > > Cc: dev@dpdk.org > > Subject: [PATCH v2] app/test-crypto-perf: add throughput OOP > > decryption > > > > 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 thr= oughput. > > > > [1]: > > http://mails.dpdk.org/archives/dev/2023-July/273328.html > > > > 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 | 34 > > +++++++++++++++++--- > > 3 files changed, 41 insertions(+), 6 deletions(-) > > > > diff --git a/app/test-crypto-perf/cperf_ops.c > > b/app/test-crypto-perf/cperf_ops.c > > index d3fd115bc0..714616c697 100644 > > --- a/app/test-crypto-perf/cperf_ops.c > > +++ b/app/test-crypto-perf/cperf_ops.c > > @@ -644,7 +644,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 > > 8c20974273..90526e676f 100644 > > --- a/app/test-crypto-perf/cperf_options_parsing.c > > +++ b/app/test-crypto-perf/cperf_options_parsing.c > > @@ -1341,6 +1341,14 @@ cperf_options_check(struct cperf_options > > *options) > > } > > } > > > > + if (options->test =3D=3D CPERF_TEST_TYPE_THROUGHPUT && > > + (options->aead_op =3D=3D RTE_CRYPTO_AEAD_OP_DECRYPT || > > + options->auth_op =3D=3D RTE_CRYPTO_AUTH_OP_VERIFY) && > > + !options->out_of_place) { > > + RTE_LOG(ERR, USER1, "Only out-of-place is allowed in > > throughput decryption.\n"); > > + return -EINVAL; > > + } >=20 > Not totally following some of this, why do we only want to add this for O= OP > mode? >=20 > For example an inplace command I can use before this patch but not after: > ./build/app/dpdk-test-crypto-perf -l 2,3 -- --ptest throughput --optype a= ead -- > aead-algo aes-gcm --aead-op decrypt --devtype crypto_qat --aead-key-sz 16 >=20 > I get an error; > USER1: Only out-of-place is allowed in throughput decryption. > USER1: Checking one or more user options failed >=20 > Do we want to always force the user to use OOP + test vector file for the= se > throughput decryption tests? > Or should we just add a warning that the throughput may not be reflecting= the > "success" verify path in PMD if using inplace and the dummy data. >=20 > I am not sure. > If we do want to add the limitation on the throughput tests, these change= s I think > are ok for that. Yes, think about that, in throughput mode, we will not fill the test data t= ime to time, otherwise the testing is useless. So that means the test data should not be overwritten, otherwise decryption= will be with invalid data after the first round of decryption. Since the 1= st round decryption overwritten the data to the original buf. In that case,= test decryption throughput in non-oop mode is meaningless.=20 That's the reason we add that limit to avoid the invalid data issue. >=20 > Thanks, > Ciara >=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 e3d266d7a4..b347baa913 100644 > > --- a/app/test-crypto-perf/cperf_test_throughput.c > > +++ b/app/test-crypto-perf/cperf_test_throughput.c > > @@ -99,6 +99,26 @@ 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); } > > + > > int > > cperf_throughput_test_runner(void *test_ctx) { @@ -144,6 +164,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= ; > @@ > > -176,11 +199,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