From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 35A3DA0471 for ; Wed, 17 Jul 2019 10:27:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E98241DBF; Wed, 17 Jul 2019 10:27:13 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id CB843137C for ; Wed, 17 Jul 2019 10:27:12 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2019 01:27:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,273,1559545200"; d="scan'208";a="251425906" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 17 Jul 2019 01:27:10 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jul 2019 01:27:11 -0700 Received: from hasmsx111.ger.corp.intel.com (10.184.198.39) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jul 2019 01:27:10 -0700 Received: from HASMSX109.ger.corp.intel.com ([169.254.3.134]) by HASMSX111.ger.corp.intel.com ([169.254.5.115]) with mapi id 14.03.0439.000; Wed, 17 Jul 2019 11:27:08 +0300 From: "Kusztal, ArkadiuszX" To: Shally Verma , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "Trahe, Fiona" Thread-Topic: [EXT] [PATCH v3 04/11] test: add cipher field to RSA test Thread-Index: AQHVPAfCKGRwlxxAE0mfbVCW/0/VUabOO8oAgAA7OtA= Date: Wed, 17 Jul 2019 08:27:08 +0000 Message-ID: <06EE24DD0B19E248B53F6DC8657831551B280851@hasmsx109.ger.corp.intel.com> References: <20190716185304.12592-1-arkadiuszx.kusztal@intel.com> <20190716185304.12592-5-arkadiuszx.kusztal@intel.com> In-Reply-To: Accept-Language: pl-PL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.184.70.11] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [EXT] [PATCH v3 04/11] test: add cipher field to RSA test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Shally Verma [mailto:shallyv@marvell.com] > Sent: Wednesday, July 17, 2019 9:42 AM > To: Kusztal, ArkadiuszX ; dev@dpdk.org > Cc: akhil.goyal@nxp.com; Trahe, Fiona > Subject: RE: [EXT] [PATCH v3 04/11] test: add cipher field to RSA test >=20 >=20 >=20 > > -----Original Message----- > > From: Arek Kusztal > > Sent: Wednesday, July 17, 2019 12:23 AM > > To: dev@dpdk.org > > Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; Shally Verma > > ; Arek Kusztal > > Subject: [EXT] [PATCH v3 04/11] test: add cipher field to RSA test > > > > External Email > > > > ---------------------------------------------------------------------- > > This patch adds cipher field to RSA test cases > > > > Signed-off-by: Arek Kusztal > > --- > > app/test/test_cryptodev_asym.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/app/test/test_cryptodev_asym.c > > b/app/test/test_cryptodev_asym.c index 4dee164..8391545 100644 > > --- a/app/test/test_cryptodev_asym.c > > +++ b/app/test/test_cryptodev_asym.c > > @@ -164,6 +164,7 @@ queue_ops_rsa_enc_dec(struct > > rte_cryptodev_asym_session *sess) > > uint8_t dev_id =3D ts_params->valid_devs[0]; > > struct rte_crypto_op *op, *result_op; > > struct rte_crypto_asym_op *asym_op; > > + uint8_t cipher_buf[TEST_DATA_SIZE] =3D {0}; > > int ret, status =3D TEST_SUCCESS; > > > > /* Set up crypto op data structure */ @@ -180,6 +181,8 @@ > > queue_ops_rsa_enc_dec(struct rte_cryptodev_asym_session *sess) > > asym_op->rsa.op_type =3D RTE_CRYPTO_ASYM_OP_ENCRYPT; > > > > asym_op->rsa.message.data =3D rsaplaintext.data; > > + asym_op->rsa.cipher.data =3D cipher_buf; > > + asym_op->rsa.cipher.length =3D 0; > [Shally] I think this should be initialized to length of buffer available= i.e. RSA > Key size? PMD can override it with length of actual data written at outpu= t, > which has to be less than , equal to RSA_key size. [AK] - its because API comments are ambiguous in this case and we have only= one field describing array length. I would suggest to rephrase cipher field API comments from "length in bytes * of this field needs to be greater or equal to the length of * corresponding RSA key in bytes" To "underlying array should have allocated enough memory to hold cipher out= put (bigger or equal to RSA key size". Then length could and I think should= be zero or unspecified at this point.=20 What do you think?=20 >=20 > > asym_op->rsa.message.length =3D rsaplaintext.len; > > asym_op->rsa.pad =3D RTE_CRYPTO_RSA_PKCS1_V1_5_BT2; > > > > -- > > 2.1.0