From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690067.outbound.protection.outlook.com [40.107.69.67]) by dpdk.org (Postfix) with ESMTP id A304514E8 for ; Mon, 18 Jun 2018 18:23:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Of3ZJzC7zIytxssdtwq2uuhZHlTajV6cIokjz8tM+dY=; b=BMP68tKWqqJdqz0glRR21amQ7pw6aj97oN3t8qc7Of4S5UMDgQrrqdxb+pMIEs99mxLUt4WPsfqLekFfpsqZ/+CIpPVGqFpM/rN7bql5Ah0vVWkoOdUsXGD+mUnw9nBblVyk0kZuj5d2Xz/7atdqBDrjaquftw1YaxpBMLYvnCc= Received: from CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) by CY4PR0701MB3618.namprd07.prod.outlook.com (52.132.101.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.19; Mon, 18 Jun 2018 16:22:59 +0000 Received: from CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f55a:7354:8d2f:cf0b]) by CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f55a:7354:8d2f:cf0b%2]) with mapi id 15.20.0863.016; Mon, 18 Jun 2018 16:22:59 +0000 From: "Verma, Shally" To: "De Lara Guarch, Pablo" , Akhil Goyal 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: AQHUBjohrgdYj7jKoEOd9TIeonFbyaRkhh9QgABQ/QCAAKdhoIAAE1AAgAAAn5CAAA6+gIAAEecAgACBUFA= Date: Mon, 18 Jun 2018 16:22:58 +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: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shally.Verma@cavium.com; x-originating-ip: [117.98.211.75] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR0701MB3618; 7:9SenDPaZ5EJDPb9fVWIYmRVDH2WcGTDnxKKqh73+PYMNCXzf13fywqWeSt2nYL8csqqP3+9T79MiIUCjeXqy7yvbKQuIP/IRXz+It8fpjvqmf+c7F+O7ei9o948PpRbIPl2PVkQd3Tv3JxAuyEp0otWS5QZ2v4ccKALhE+ocp9J+XQXI/ByaiKjhMXSBELN9aSmYIg9JzSgnzrMzMsGgyTMaP+NdXXz8WZ4tQIdfbrVoiGMVHWrUHugvXU6kCz5m x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(396003)(39850400004)(366004)(39380400002)(376002)(346002)(199004)(189003)(13464003)(9686003)(81156014)(4326008)(476003)(53936002)(11346002)(76176011)(55016002)(110136005)(446003)(93886005)(74316002)(105586002)(305945005)(7736002)(107886003)(229853002)(5250100002)(68736007)(8656006)(8936002)(6436002)(54906003)(81166006)(86362001)(106356001)(316002)(486006)(26005)(6506007)(99286004)(25786009)(186003)(7696005)(102836004)(8676002)(6246003)(33656002)(6116002)(72206003)(3846002)(5660300001)(14454004)(478600001)(2906002)(3280700002)(2900100001)(3660700001)(66066001)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3618; H:CY4PR0701MB3634.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-office365-filtering-correlation-id: f0e4c004-7af0-4310-18b6-08d5d537c197 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3618; x-ms-traffictypediagnostic: CY4PR0701MB3618: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(278428928389397)(185117386973197)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:CY4PR0701MB3618; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3618; x-forefront-prvs: 0707248B64 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: XEk4GmLZIOQsJYZ4M2kD/L2RkEwyTUqTL+quPCm+dZdQmz4RQn4X3RjbRW2r37sB+2E5ip5eJhfFJwvcS3ExJwrtm8/LPAsXaAQzIjzU1ZO/UjUqYlt6VnKWOn+jr3bzfGkiVpXerHJn/LJKlF0f85NKp/Tb+XZqnAZ3gpZrKtjzM5/CJqig+6IU9RCoXkXY4FV3ilSjXY554CaxobJY7DPNA3FeJj1e1uC0wLzdtzE8yNJRMz1RE9AHgJCvE0MSdCAEas0NBOKhMpoBrfujjNK6753/IuoneiEVLJ/pEzkTVqYYAJ0Zl3ZKW/EkftGp6tYO0isCyjSsxLkxnyZcFw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0e4c004-7af0-4310-18b6-08d5d537c197 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2018 16:22:58.9834 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3618 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 16:23:03 -0000 >-----Original Message----- >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] >Sent: 18 June 2018 14:09 >To: Akhil Goyal ; Verma, Shally >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 > //snip >> >>>>>>> +static int >> >>>>>>> +test_rsa(struct rsa_test_data *t) >> >>>>>> >> >>>>>> ... >> >>>>>> >> >>>>>>> + rsa->n =3D >> >>>>>>> + BN_bin2bn( >> >>>>>>> + (const unsigned char *)rsa_xform.rsa.n.dat= a, >> >>>>>>> + 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 tak= e >> 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 w= henever >> 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 usi= ng. >> >> 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 = versions? >> Won't it then be too many version compatibility checks in PMD/test and a >> maintainability issue than having implementation mentioned to be compati= ble >> with specific version? >> > >> >> 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 31s= t >> December 2019". I think Pablo also suggested to support openssl 1.1. > >I think we should keep supporting OpenSSL 1.1, even though our documentati= on >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 co= de if he change this. [Shally] Will look into this . > >Thanks, >Pablo > >> >> Thanks, >> Akhil >> >> >> >>> Thanks >> >>> Shally >> >>> >> >>>> >> >>>> Thanks, >> >>>> Pablo >> >