From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 536D91B0B for ; Mon, 18 Jun 2018 10:38:46 +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 fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2018 01:38:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,238,1526367600"; d="scan'208";a="65445127" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga001.jf.intel.com with ESMTP; 18 Jun 2018 01:38:43 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.139]) by IRSMSX154.ger.corp.intel.com ([169.254.12.250]) with mapi id 14.03.0319.002; Mon, 18 Jun 2018 09:38:42 +0100 From: "De Lara Guarch, Pablo" To: Akhil Goyal , "Verma, Shally" CC: "Trahe, Fiona" , "dev@dpdk.org" , "Athreya, Narayana Prasad" , "Sahu, Sunila" , "Gupta, Ashish" Thread-Topic: [dpdk-dev] [PATCH v3 4/6] test/crypto: add unit testcase for asym crypto Thread-Index: AQHT7NwQZXgFaOIsBkSV4DQ2rgKI06RklDyAgAAZTgCAAFsGoIAAmsgAgAAQbgCAAAJpAIAADPOAgAAb+zA= Date: Mon, 18 Jun 2018 08:38:42 +0000 Message-ID: References: <1526450713-17299-1-git-send-email-shally.verma@caviumnetworks.com> <1526450713-17299-5-git-send-email-shally.verma@caviumnetworks.com> <9e3ed323-6ca2-abfc-2e7f-5dce5fab26ef@nxp.com> <7beb0f7b-7179-c3a1-5e50-f51db1c76ff3@nxp.com> In-Reply-To: <7beb0f7b-7179-c3a1-5e50-f51db1c76ff3@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2ZjM2Y5NmEtMjlhOC00ZjUzLWFmNGItYTE2ODRjNDQwZmJmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRFBkaHAxcW4zQ0lLbnBoVVR6UTJNRjFFUGRmVVFtRGlXajcyNm84Zmx2ODVIbDB3bmF3MmsxZHFUS0dtZHllYSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 4/6] test/crypto: add unit testcase for asym crypto 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: , X-List-Received-Date: Mon, 18 Jun 2018 08:38:46 -0000 Hi, > -----Original Message----- > From: Akhil Goyal [mailto:akhil.goyal@nxp.com] > Sent: Monday, June 18, 2018 8:35 AM > To: Verma, Shally ; Akhil Goyal > ; De Lara Guarch, Pablo > > Cc: Trahe, Fiona ; dev@dpdk.org; Athreya, Narayana > Prasad ; Sahu, Sunila > ; Gupta, Ashish > Subject: Re: [dpdk-dev] [PATCH v3 4/6] test/crypto: add unit testcase for= asym > crypto >=20 > Hi Shally, > On 6/18/2018 12:18 PM, Verma, Shally wrote: > > Hi > > > >> -----Original Message----- > >> From: Akhil Goyal [mailto:akhil.goyal@nxp.com] > >> Sent: 18 June 2018 12:10 > >> To: Verma, Shally ; De Lara Guarch, Pablo > >> > >> Cc: Trahe, Fiona ; akhil.goyal@nxp.com; > >> dev@dpdk.org; Athreya, Narayana Prasad > >> ; Sahu, Sunila > >> ; Gupta, Ashish > >> Subject: Re: [dpdk-dev] [PATCH v3 4/6] test/crypto: add unit testcase > >> for asym crypto > >> > > > > //snip > > > >>>>>>> +static int > >>>>>>> +test_rsa(struct rsa_test_data *t) > >>>>>> > >>>>>> ... > >>>>>> > >>>>>>> + rsa->n =3D > >>>>>>> + BN_bin2bn( > >>>>>>> + (const unsigned char *)rsa_xform.rsa.n.data= , > >>>>>>> + rsa_xform.rsa.n.length, > >>>>>>> + rsa->n); > >>>>>> > >>>>>> I am getting a compilation error: > >>>>>> > >>>>>> /test/test/test_cryptodev_asym.c:322:5: error: > >>>>>> dereferencing pointer to incomplete type 'RSA {aka struct rsa_st}' > >>>>>> rsa->n =3D > >>>>>> ^~ > >>>>>> > >>>>>> My OpenSSL version is 1.1.0h. > >>>>>> > >>>>> [Shally] This library is tested with version 1.0.2m (mentioned > >>>>> above) and also one supported by openssl PMD . So, you need to take > similar version. > >>>> > >>>> I'd say we should support the latest stable version of OpenSSL. > >>>> Could you get the latest 1.1.0? > >>> [Shally] Openssl PMD uses 1.0.2h. If we move test to 1.1.0 then dpdk > >>> would need to be set to link to two different version of libcrypto wh= enever > openssl PMD is enabled which seems like a cumbersome process for users. > >>> So I recommend for now to stick to one version. > >>> > >> > >> OpenSSL PMD can get compiled/linked with any of the versions 1.0.2 or > >> 1.1. We cannot control the above applications which version it is usin= g. > >> So we should not add limitation for openssl version. Please check > >> below snippet in the PMD if this is suitable in your case. > >> > >> +#if (OPENSSL_VERSION_NUMBER < 0x10100000L) static HMAC_CTX > >> +*HMAC_CTX_new(void) { > >> + HMAC_CTX *ctx =3D OPENSSL_malloc(sizeof(*ctx)); > >> + > >> + if (ctx !=3D NULL) > >> + HMAC_CTX_init(ctx); > >> + return ctx; > >> +} > >> + > >> +static void HMAC_CTX_free(HMAC_CTX *ctx) { > >> + if (ctx !=3D NULL) { > >> + HMAC_CTX_cleanup(ctx); > >> + OPENSSL_free(ctx); > >> + } > >> +} > >> +#endif > >> > > [Shally] Are we just planning to make PMD/test compatible for all lib v= ersions? > Won't it then be too many version compatibility checks in PMD/test and a > maintainability issue than having implementation mentioned to be compatib= le > with specific version? > > >=20 > I think we should at least support the latest stable version. As per the = openssl > website "The latest stable version is the 1.1.0 series. The > 1.0.2 series is our Long Term Support (LTS) release, supported until 31st > December 2019". I think Pablo also suggested to support openssl 1.1. I think we should keep supporting OpenSSL 1.1, even though our documentatio= n says that we support up to 1.0.2 (which we should fix!). Knowing that Ubuntu and Fedora have 1.1 version in their latest versions, I think it is a good idea to keep supporting this, As many users will be using this version and we would be breaking their cod= e if he change this. Thanks, Pablo >=20 > Thanks, > Akhil > >> > >>> Thanks > >>> Shally > >>> > >>>> > >>>> Thanks, > >>>> Pablo > >