From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0070.outbound.protection.outlook.com [104.47.32.70]) by dpdk.org (Postfix) with ESMTP id E3CFC1041 for ; Mon, 18 Jun 2018 08:50:48 +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=Hxnh2eDRTQh9XekXmwingkBueZpT4iHgkk4p3DdoL5c=; b=Ul6WIv7eYLL5IC9uPFgJSHdqY2vdxEtmOgysBJjJc46v5lkIDEi2mvB4qvcq7I+bV+3fwsZWC8pOP6fFT/Ift0fNbFVjvOTQxhA5zYazgGxsCedWbus9v1NHHEed+h9dE1/8ke1XL7f+wOv1kA7PK5PXH3nY33Itxixxt4Kykk0= Received: from CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) by CY4PR0701MB3731.namprd07.prod.outlook.com (52.132.102.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.16; Mon, 18 Jun 2018 06:48:17 +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 06:48:16 +0000 From: "Verma, Shally" To: Akhil Goyal , "De Lara Guarch, Pablo" 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/QCAAKdhoIAAE1AAgAAAn5A= Date: Mon, 18 Jun 2018 06:48:16 +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> In-Reply-To: <9e3ed323-6ca2-abfc-2e7f-5dce5fab26ef@nxp.com> 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: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR0701MB3731; 7:nM8tw2WtLUaYwzuG8pNdy34wLHeXJPNzhzaVT3Ma/2bqj/Oq+D1EJhssT+URsVi/IftlenXOFocYIA6wEHuHPeYk6ggbA7VjM3+JoLQnXwXXlIxfDkEWOPAGABanjy/Ad5lSg2z/ip//f0gc/KvSJlaL1Wo5S1ylynMFFi78oBPSEzZINEUV8QvYpiZIzMz2ISf04JdUWI+M4P8fFF2pSHIutd3tgEOLU63YFgNBXycoONqswrFeefiIjU4+GXd6 x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(346002)(376002)(39380400002)(39850400004)(396003)(366004)(199004)(189003)(13464003)(99286004)(55236004)(476003)(486006)(102836004)(55016002)(107886003)(4326008)(316002)(110136005)(54906003)(6246003)(5660300001)(74316002)(5250100002)(11346002)(186003)(6436002)(76176011)(26005)(3660700001)(72206003)(3280700002)(7696005)(2900100001)(6506007)(229853002)(478600001)(305945005)(25786009)(8676002)(446003)(93886005)(86362001)(7736002)(9686003)(68736007)(105586002)(106356001)(97736004)(8936002)(81166006)(33656002)(81156014)(2906002)(6116002)(53936002)(8656006)(14454004)(3846002)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3731; H:CY4PR0701MB3634.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-office365-filtering-correlation-id: b921c07d-dd95-4e00-972e-08d5d4e7786c x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3731; x-ms-traffictypediagnostic: CY4PR0701MB3731: 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)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:CY4PR0701MB3731; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3731; x-forefront-prvs: 0707248B64 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: c5uEID8Z9Tugp2kS9AgvupkSTIftS0ENzlLFOdyKPSEzhJabtXd367JkQyIBUoj2QHC5YDH0EcSdjCxFiy/XdFWNpatTVGpe29kzKM5zxdUD9XBzur9RNiXfyDiZHP3pM5BmdclD6YztM7ddN+xz2rL6+Don4HM+6wGbiigmvHWoR55+g3xA6m4q/H0K1ZxNWORGCTM/2oZDnOhVy1DnBmBuSwQxxtqoui1tU9eYFHa8wYz0G8molw9SD2lsiF0MKRa3CMw68mKc3oQpRjuAgC9dEL16kTqU3Sn/HyskbLAINCmWPQWwjhI+lKc312jbQ6QamRx4DlwAQckyOxeppw== 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: b921c07d-dd95-4e00-972e-08d5d4e7786c X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2018 06:48:16.4928 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3731 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 06:50:49 -0000 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.or= g; 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 wou= ld need to be set >> to link to two different version of libcrypto whenever openssl PMD is en= abled 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 using. >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 versi= ons? 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? > >> Thanks >> Shally >> >>> >>> Thanks, >>> Pablo