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 DBAB6A046B for ; Thu, 25 Jul 2019 06:16:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 393131C23F; Thu, 25 Jul 2019 06:16:02 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 339571C23A for ; Thu, 25 Jul 2019 06:16:00 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x6P4AlE0022541; Wed, 24 Jul 2019 21:15:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=pfpt0818; bh=WDJnFU4FR9lHz3bUzpVRyMPdaP6u8kznGdMcAIU6w/8=; b=JIVN+Tn+o5ZjN9/Z5scGwk0lyeovppLoFKNVeL2ZWt7PqhmYEBLfFoLklxupXMoenTTB Yd8avrivjDGZE/dArmYXnh/NwLzC00QAUJkNZyK8x3c1Jnmc+zawIGSf+oCJPBmB6NGP 97O4aios9P9rulS5nKFaz7yloxi8dW3Q6IDrEd5CKlS61y0UftwvucsoYAAA41FEc2hX +KMM5TLrY8Ry/D12j6q2XDoUGTmGfhP1L076i0w4Q0ZehlHnQlbTZsALPR/uTMWtsNIK sc+UAAsrXcsmoOQWC5/sM4y4aW2mGb4wqbqXaAepTm/Rkab2vDIbp39/pQZ9tGIaxDG6 GA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2tx61rfqae-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 24 Jul 2019 21:15:58 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 24 Jul 2019 21:15:42 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.59) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 24 Jul 2019 21:15:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ksRs38AqyYxRb5eYUk7Dak7UOZ9l5pSivXjctVuLTHidd3sFxh3OpQsLQQRSQ9fIKgEXZpiR0GjBfPg4cja3c3mo2onmqZhShfYSNr/Hn6PzmdyJkdtQVGFXfMgFgAK2FJ4VQi7rz6w+HaHtRP+LiziJiDsbcvACZA4EuoPNcowv3urf76413eNKpGVdVPKDPIG9B/TQ5m1pqrtzwjBLl1RyG/yUMb3egLbCshUxS6hCqnAbR0CnJ02gYzhyJ0tNL7ZTBHz4sTv2RPvhYtdeaG3LuHLhWMIT4NtQB3yLvzhBHsAMepTq+ylxxcHQIzFGRthyEOObpTSIBeTkrQR0cg== 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-SenderADCheck; bh=WDJnFU4FR9lHz3bUzpVRyMPdaP6u8kznGdMcAIU6w/8=; b=NvsUBnwsR7xIlaD376Rkf5dmgXQu6tmmS5hNlJSFG1QgBTa+o1ODuUoQiDhmAXUijTAOtxJYbeLbFVVKE0N7lwpdNIEOvmGZ4uJ3tP8Mso31Agj6+L/WXe6S2lIw1MY+4E2IWgqprsYRLQeapE6qY1FZ7oNG4BcQzcnWX+haPB+iaIyis7ByqCBwQ5mN5lsgYwIiQmrL2Hsq8SiskEPGJI+zp+xEVe6OsqR1Si0KhU0/lESsy6AEG+NTCrTy76jmO1ppia4nX9ZTds5A3KLXNfXA9f10jRdh9/DCviA7pynNSK6IV5/dtl0+X+RWC9WJCjxFstNnkCmOuUjdyot//w== 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.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WDJnFU4FR9lHz3bUzpVRyMPdaP6u8kznGdMcAIU6w/8=; b=wJU+ZJfcW6QwXA1CW9oqP4FoupRLT2KR/tpkG95rKzwZHBwGasaPoLWkq1hQnSbJmfTf3b0025QkwHWXxqRk7E6SQG8XHFVeI4qOPzlsZptGbsNbQZLMtj9YsTYx+7cyKCsQGnPr3QeDuXe327mFzs+ljJrWUMwjxlBGR7eBTws= Received: from BN8PR18MB2868.namprd18.prod.outlook.com (20.179.75.15) by BN8PR18MB2707.namprd18.prod.outlook.com (20.179.72.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.10; Thu, 25 Jul 2019 04:15:37 +0000 Received: from BN8PR18MB2868.namprd18.prod.outlook.com ([fe80::1466:c325:cc49:e57]) by BN8PR18MB2868.namprd18.prod.outlook.com ([fe80::1466:c325:cc49:e57%6]) with mapi id 15.20.2115.005; Thu, 25 Jul 2019 04:15:37 +0000 From: Anoob Joseph To: Ayuj Verma , "akhil.goyal@nxp.com" CC: "arkadiuszx.kusztal@intel.com" , "Shally Verma" , Sunila Sahu , "Kanaka Durga Kotamarthy" , "dev@dpdk.org" , "Fiona Trahe" Thread-Topic: [PATCH v1 0/2] declare crypto asym xform immutable Thread-Index: AQHVQf0VPcdF0o1ybE6M5aW83PjvgqbZdlWAgAE1vvA= Date: Thu, 25 Jul 2019 04:15:37 +0000 Message-ID: References: <1563958317-480-1-git-send-email-ayverma@marvell.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 319cad95-fd06-4df8-9f4d-08d710b6bf2c x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BN8PR18MB2707; x-ms-traffictypediagnostic: BN8PR18MB2707: x-ms-exchange-purlcount: 2 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0109D382B0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(376002)(366004)(346002)(396003)(136003)(189003)(199004)(81156014)(14454004)(229853002)(54906003)(74316002)(66066001)(4326008)(110136005)(99286004)(486006)(9686003)(54896002)(256004)(53936002)(236005)(476003)(33656002)(76176011)(14444005)(6306002)(478600001)(11346002)(446003)(55016002)(6436002)(316002)(7696005)(86362001)(7736002)(53546011)(6506007)(2501003)(68736007)(66446008)(66556008)(25786009)(102836004)(55236004)(9326002)(2906002)(790700001)(26005)(6246003)(186003)(6116002)(8936002)(71190400001)(66946007)(71200400001)(52536014)(8676002)(3846002)(64756008)(5660300002)(76116006)(66476007)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:BN8PR18MB2707; H:BN8PR18MB2868.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Q2n2bsu7htFpm+HLgYG3GrP34CqSVJeLFmxt2cyg8dEGgF5QAc0cTr5wHwUQx4OYDeoZe2SGx4Fm2wg+9DoLpw99leKZgsL5ZjNEy0DM8kE0QG9uAmNbk4YnVUpBlzdhqRURpP3sHfd9BbKhD0F7ppjpyJQL7vrHwjg0FhjDNE4NIFGPumQFcugrXLU8TYmHIIDxslnVMvVwdizwsxiCIMMyshrk+5hyyqyLJH3r5du59VrNMWsGqSUuCjH9Eqvr4ugOyRe9YLcItAkQFrE88wdakWN3sj2qLLAaifMFMHfzi4gLy6rMIV7J/xah+dxPdiPyhQb7+TUKyrfARqosRFrp8xcwnC0V/N3XstvhH3Dhp2maUUmE5Muvjqb7eTjh4RcjBLqYiDmGs+Qujy5ivp1NpePrRZY7+0JPYyJCwCM= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 319cad95-fd06-4df8-9f4d-08d710b6bf2c X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2019 04:15:37.2490 (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: anoobj@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR18MB2707 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-25_03:2019-07-24,2019-07-25 signatures=0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v1 0/2] declare crypto asym xform immutable 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" Hi Ayuj, I believe there are couple of issues with this patch. Are these experimental APIs? I believe they were made stable this release a= nd I'm not sure if it is a right practice to edit an API without deprecatio= n notice after it is made stable. Especially now that RC2 is done. @Akhil, = what is your take on this? I think, the approach here is wrong. If the lifetime of the session is expe= cted to be only few packets, then session-less (which I believe is in the p= ipeline) would make more sense. If the lifetime of the session is expected = to be more than that, then having this feature/limitation would make applic= ation more complicated. Also, since one asymmetric session can hold both pu= blic & private keys, the implicit assumption would be, the session can be u= sed for multiple kinds of operations. This change is in contradiction with = that. But my major concern is how this can lead to accidental errors. Making the = argument as const will mean the API won't edit its contents. But if there i= s a pointer in that (key happens to be a pointer inside the xform), having = const for xform will not help. This is my understanding. Please correct me = if I'm wrong. Also, I could have the xform allocated from stack (non const,= regular local variable) and then call the session_init. Would compiler thr= ow an issue in that case? I doubt so. void abc(const int t) { printf("%d\n", t); } void main() { int t =3D 0; abc(t); t =3D 2; abc(t); } To summarize, if this assumption is accepted, then compiler will not be abl= e to ensure it. And to properly use it, application will have to be drafted= differently. And when similar effect can be achieved by having session-les= s, this seems redundant. So this change is NACK from my side. Thanks, Anoob From: Ayuj Verma Sent: Wednesday, July 24, 2019 2:23 PM To: akhil.goyal@nxp.com Cc: arkadiuszx.kusztal@intel.com; Shally Verma ; Sunil= a Sahu ; Kanaka Durga Kotamarthy ; Anoob Joseph ; dev@dpdk.org; Fiona Trahe Subject: Re: [PATCH v1 0/2] declare crypto asym xform immutable +Fiona. ________________________________ From: Ayuj Verma > Sent: 24 July 2019 14:21:55 To: akhil.goyal@nxp.com > Cc: arkadiuszx.kusztal@intel.com >; Shally Verm= a >; Sunila Sahu >; Kanaka Durga Kotamarthy >; Anoob Joseph >; dev@dpdk.org >; Ayuj Verma > Subject: [PATCH v1 0/2] declare crypto asym xform immutable Mark asym xform as immutable till lifetime of session. It will save session setup time for PMDs, which doesn't require any manipulation of xform data, by directly using these buffers. * Updated xform type in session init/configure API as constant. * Updated doc with proper transform description. * Updated openssl PMD with above changes. Ayuj Verma (2): lib/crypto: declare crypto asym xform immutable crypto/openssl: mark asym xform constant doc/guides/prog_guide/cryptodev_lib.rst | 10 ++++++++++ drivers/crypto/openssl/rte_openssl_pmd_ops.c | 8 ++++---- lib/librte_cryptodev/rte_cryptodev.c | 2 +- lib/librte_cryptodev/rte_cryptodev.h | 2 +- lib/librte_cryptodev/rte_cryptodev_pmd.h | 2 +- 5 files changed, 17 insertions(+), 7 deletions(-) -- 1.8.3.1