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 A7B1B43CB2; Thu, 14 Mar 2024 19:44:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C89F4029B; Thu, 14 Mar 2024 19:44:46 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 623C2400D7 for ; Thu, 14 Mar 2024 19:44:44 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42EF46Pd028873; Thu, 14 Mar 2024 11:44:43 -0700 Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3wv3j48xp6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Mar 2024 11:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WS6pa135INPbc2CZbb/pLNthG6MTqY6T8CLQgZvO4CL972HU5U+Rb3mz/0uv2/0Nx+XxtXBXOIil666MusRjdH3DoJAcd6k1/VYamboZBoj0YBTKIkqo1/HCipop8Hh2oLXY5arw5bzkzOCOVeJB32ybN2xQKZQfYZW72x+Ng+8HZ6TQef9tXFvOzMPmbLuZIWastzaEegjMhX8x+nsahZsFQ8ENRZOao+M88Fk4npTH6gPTnmVCF4hF8z3LTj+Iy+78J1Hj17NLqQ4WD7mrBfQYAtUEjn78fMfNbPZIUKBE/5Vkb7n+A+dGZK2puSrSXSlwTkoNEikNw5CifD9C5Q== 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=gptsv5V70N5TzMCx4pn7aEIqo+B708JvE+0dLcACa6E=; b=hiN3a994IErvr2ycEOwDp28g4meI4oPkTgTBz2SOb8CTyIndZkpIrG3SOm00fmLIZMSBOL5dXv1RckA7w5CjwDH8TRZxf7TO2ytGspMJDOvg0rbu7Yh9+41ay/47FEuEerXK4pzcpEQFXJ/O8TX8kTuOt8H/z6sht3OU99Ignt61fPKpZSVGU+aG/eDCxFj5EEbl22I5OpBj6tR/nZjpjgxGr3brLU/zVmqMEqA+T3HtKlbmoHoxWqUNZHJ7YKIHUQhFMBUWq499U8oPa8odlGcWXytC3F9IYsKF+6CK1aQeLcqD95yVXISeWDbd/RDrA+h3+6VYlIfXsKn3tFwQRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gptsv5V70N5TzMCx4pn7aEIqo+B708JvE+0dLcACa6E=; b=EOPRNRPni/TDoOQvE4OGQ3W4RXwrMxS7GHMjYr2yuvrx317AVwAKmXXHks2Id8OC1AL0Uf5rzkD4cJW2c9okhon/7myh1Bc9Ryx6jiSIRhSqiR32kXL006pLtJYUBvzBlseD2kOJ0b16269AGB4xaHBEu+JhZ3kcdB3wkbchG2g= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by SN4PR18MB4837.namprd18.prod.outlook.com (2603:10b6:806:21c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.19; Thu, 14 Mar 2024 18:44:40 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::4e74:4cf3:63b6:b149]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::4e74:4cf3:63b6:b149%4]) with mapi id 15.20.7386.017; Thu, 14 Mar 2024 18:44:40 +0000 From: Akhil Goyal To: Suanming Mou , 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: AQHaP742RYhcx/RoTEimHsaTWSKaH7E3+RBQ Date: Thu, 14 Mar 2024 18:44:40 +0000 Message-ID: References: <20240105100104.908543-1-suanmingm@nvidia.com> In-Reply-To: <20240105100104.908543-1-suanmingm@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR18MB4484:EE_|SN4PR18MB4837:EE_ x-ms-office365-filtering-correlation-id: c9501f15-0073-40af-ef35-08dc4456ce9e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Y0+qXRZftYUO1snYYK8vXqJ0AC6XzID1aZ/Qwqy4LmQwOds9I5oRZKdABPDzIicrSjpGFhsCfdWGaIlc7xduAxPRfpGNhqzbpJqVxqG38pJt0CJCia6Lzo977/xSc3A3OYeEAA++fzADzL/0kJ6NhtPmgf3lx3Kcy0ovW85hv5I0qZY1BqlsHdipYHf5Nn2buhfj3E50m8XH0oFxj7CqEs6KJwky8ccHBqdAiQ6tOZBfwtRerKIskuS/WEkh4bt910TnJd8NwIJ125fsBw6nCCKBMnL5QW8FMElH0R5Ix8FtLjB8g5i03jrrDK1xhpbCThNo7jmA1Kvz9+/GVYK11dBsJV9/fGrZ9eGanhBPdMioJ91Uwwaw6TTTSqH7dHPNhFSinVVGsJgyuvsB4jEKVn3Go65LNAPp8dsruSo61hSghuNSegKSAL7XB2n374u+B4ymj0jZw4C4Z2u+OTzyWs97zDMAcIMQUt86H5qSfjFDyloxCJKQiY19pTlY+sqCEXolXb3IRzWJEI6Ex2Em1/Cgk4C5CWPwR5nEVaVqpICkMRf4/bIVw9EbqSS76/dwys+/Lu8V8UWD4mY5sEAPKwsouyXqKqzousUoLCGJrH1kTzh0Zi8vpfJNx1p9OIJTMoIWSF0DxAU+i15mOpIkBURFRAPLG6o7SehNRE3qeazApSfEMwhgOp0D03WHr6MaohPH27SAYDNyDnDZi4YLrzbycqN41m7f4DoKZq2tJP0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(376005)(38070700009); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vmRzGwXMcglIlGk7wqdbzC2Mkln3WfnHElGdUXmsBlBmW3L16cK8932YbwP9?= =?us-ascii?Q?0KP4rlZzvEvXeokYk6xj9sLPQnZhE5Pfg8g2rDP6+3QRcv3fEPK0VOurQlzV?= =?us-ascii?Q?21pAsREO97aWUAQm0+06SPdmFMU1WBhlfCCWjQvAMwDce8VqDEOr96u1h43V?= =?us-ascii?Q?Bjx5K4cqDdU8ryVvKjkDv7E9H1zGbejNVCZL2sFqC13U5NdlzUZ00Awvcxsq?= =?us-ascii?Q?NvgXlIglTNLS5nfwsqTyKhVTxlykgx4u2S2r/+FPXgmE6M5eKiia8wiMQj9o?= =?us-ascii?Q?LyifmjbZ//rLDFwvSq2Sl9hvo7Uvi9hGvHEPKXbeMdMqqa9JpK5Kzjddb/cy?= =?us-ascii?Q?jHi7T79gdRjl8Vx2DrTp0Wz46B8TO828LfeGUS31rjRHoiYvoCBDnUJ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h5Zdyg0955uLy0oVcNXntN3IWUoPNmMUEzINRFAw/9?= =?us-ascii?Q?uwkmHofGSdILHczTfDv6aOx2kL23C2NsWShfNOBMbPLV5VbSmQbul/COymqV?= =?us-ascii?Q?XicqO/jbIaO9sOWugOWw3xd8iaHFPuCE0ohA7KtVwycKGdYywSfUfMw1IAi9?= =?us-ascii?Q?QkuCv0rgN1Rugni+RFsdN4zS1QboQ6vv+w6PJZbG8/+fLiHrWOvzbhzCimCw?= =?us-ascii?Q?dFgoeTPJAgaTbP961icdfH5BCPYUpI83FQyyj/x0mMUW82kmJ3AWkQPZlsQO?= =?us-ascii?Q?c53q3/chtkBohwharUY=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9501f15-0073-40af-ef35-08dc4456ce9e X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2024 18:44:40.3700 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: R/xfRoYgJsKFQZPVruZaq5Ey0Uts+46362RIPVvZQXV6tomKPBlWSjXkGrWIx/ee2byWeGh3QDpkOGIbmnoAIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR18MB4837 X-Proofpoint-GUID: cj7Q12QYEB24ai_ppY1zemIJWN_WK-Gf X-Proofpoint-ORIG-GUID: cj7Q12QYEB24ai_ppY1zemIJWN_WK-Gf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-14_13,2024-03-13_01,2023-05-22_02 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 > 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. >=20 > 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. >=20 > This commit adds the support of out-of-place decryption > testing for throughput. >=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(-) >=20 > diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cper= f_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, > } >=20 > 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-cryp= to- > 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 *options) > } > } >=20 > + 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; > + } This check is blocking cipher_only decryption which should pass irrespectiv= e of inplace/oop and Data correct/incorrect. > + > 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-cryp= to- > 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; > } >=20 > +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. > + Extra line > +} > + > 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); >=20 > + 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) > } >=20 > /* 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); >=20 > /** > * When ops_needed is smaller than ops_enqd, the > -- > 2.34.1