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 95C5DA2EDB for ; Wed, 2 Oct 2019 13:18:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC3C41BEDA; Wed, 2 Oct 2019 13:18:19 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 4D0BD1BEC8 for ; Wed, 2 Oct 2019 13:18:18 +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 x92BEVQC017854; Wed, 2 Oct 2019 04:18:17 -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 : content-transfer-encoding : mime-version; s=pfpt0818; bh=OO5ffoItktu0ywPrTDYiFIEipDMbTFWT4d/6FzfqE/c=; b=MfLcyzNsaHnLVDGuODsS8qfGONsCJMTdITuX0O6/T1c3jMPgGDWyt13v7OGZy57jZ6fA xKSg4FUgFUU33s2nhvr4IbRYZLzYj0mKUcKNSeQbxfKL4qNVaIA7QgP3YfeHi+R3kBIw V3dLwdipgwuCBMOvEd+hUSkJ2uUKnfOKa+CQI7cvB/1E6ihlQ3eycY5DxpoAUCrHmnZZ c1pRJPwpLCnJDKOs+y+DLdxXZQP6FLICL8RuyF8RAijIbDPYp6MFn/6TXrigMUIi/a1t V3u3OufbwgH8M2nmisO0JL8xwAjC1zreG8rospqOWhxTs6C6GCa92QrWoLn+QAAF5g6h IA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2vcjbn1mf8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 02 Oct 2019 04:18:17 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 2 Oct 2019 04:18:16 -0700 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (104.47.41.51) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 2 Oct 2019 04:18:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WjdwTodsVjQa16rkgXLzxf+FKh9hofveDwj2fevxD6OrY3W8Y+t7XaYDfgQNFU03AsJYnAxqf71NL8opC0+X5Ir3pVDTQPW7M6cWDXX+pZAZfR+lHJ/Xkl4rj8nJMXvJbdF6Zg8AfuCdMOqn+MQKWZD+PHeSUYU/4PZ9kI8o3HLk8ZtDx7JqdzAKfLLbmbhpiPXOZu43RkT8zk+bzN0A15ThECMir9/E8rZMYliI+c1bGqXIPgBnzrWZStecjLo0UA/FqvNA5fNCyP0cP8lhE3U78FfQncQZbLNqf/M9q36M67CVILzk1Kw1hCL6whm3yUfBMUWn/FXdDte1kt0Stg== 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=OO5ffoItktu0ywPrTDYiFIEipDMbTFWT4d/6FzfqE/c=; b=LjhG1TTnRl4u8NgAZCSBC0CVacsYVBQkUgZMbt6SfIYBrhrFxPoOKZPMmUiU7nOgQYjeG8W31Z3tnFG++tUrU5l6bGvHy3C5X8ZvauCPhbdRzLCBCbfK7onI735WD+Bt49ty8956twpsiu3/EddKDRe0+SATSPM2mq0trk97Pxlc3KewTnqecGWdX2JlQfodDihrlr9+Bba6h7FzUDk8T6fLnlPNly6EaOodJ2ITgev/Tks8VPul0KVaimlgTZ7p3QvF+v/8KzcrQmz6SvYuPfQ3d5tp3ZNkuquvFsKATuK2al302Igu70pa5hUpeki1JF5gY1vq3bjECFIDLX2gFQ== 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=OO5ffoItktu0ywPrTDYiFIEipDMbTFWT4d/6FzfqE/c=; b=ONUkHvv6FoJ8omK6pye6TZYr64bhj6lUx0iivf7aY1E3eHctAL8IEAs5jZCmCCtYcLA/cn4OUqNTiObLpm4P9mo41Vk4ipz7gIt/4LzZnFNwE52ikG0sn5zc56VxnzwI+ztXOgeAa92+viLyYECA7tUvgAOvC1NvX2kvUsAkLmw= Received: from MN2PR18MB2877.namprd18.prod.outlook.com (20.179.20.218) by MN2PR18MB2752.namprd18.prod.outlook.com (20.179.21.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.18; Wed, 2 Oct 2019 11:18:13 +0000 Received: from MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::6d15:3367:4c9:5385]) by MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::6d15:3367:4c9:5385%7]) with mapi id 15.20.2305.023; Wed, 2 Oct 2019 11:18:13 +0000 From: Anoob Joseph To: Akhil Goyal , Pablo de Lara CC: Kanaka Durga Kotamarthy , "Jerin Jacob Kollanukkaran" , Narayana Prasad Raju Athreya , Fiona Trahe , Shally Verma , Sunila Sahu , "dev@dpdk.org" Thread-Topic: [PATCH 3/8] crypto/octeontx: add asymmetric session operations Thread-Index: AQHVZxKeFv4yCIXe+Eqbqa0hNsH//6dF4VCAgAF1l+A= Date: Wed, 2 Oct 2019 11:18:13 +0000 Message-ID: References: <1568035687-25492-1-git-send-email-anoobj@marvell.com> <1568035687-25492-4-git-send-email-anoobj@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: [122.175.98.131] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 123fe3b8-435b-432a-94d4-08d7472a3737 x-ms-traffictypediagnostic: MN2PR18MB2752: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-forefront-prvs: 0178184651 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(376002)(346002)(366004)(39860400002)(189003)(13464003)(199004)(66446008)(66476007)(4326008)(9686003)(305945005)(76116006)(54906003)(110136005)(7736002)(76176011)(8676002)(8936002)(2906002)(66556008)(7696005)(102836004)(26005)(99286004)(81156014)(53546011)(66946007)(6506007)(186003)(64756008)(81166006)(33656002)(486006)(71190400001)(71200400001)(74316002)(476003)(66066001)(11346002)(446003)(256004)(229853002)(86362001)(52536014)(478600001)(6436002)(55016002)(25786009)(316002)(14454004)(5660300002)(6246003)(3846002)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2752; H:MN2PR18MB2877.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: BCL:0; x-microsoft-antispam-message-info: Io1f3WfqvGiyjUmHBjsnX5BY3hgDUIgS4kt/vnkvD1WRm4YYoY72bKQ0ThK9AQu3B4PCzkvg8rO0XBquKtsvX+WwPNh199YVsiSe6prbaw7o0JhI9KfYaDqURHaCFQgn27BRGKAlVGHYv84AcRfWeEdTdx2742bzjkrvteGMua8VH3OFqZ8z7Ki2DG1X26KV9JXA19FKXCUFYVSQ/XsiPLvtPALHq2Ye2ZCcEpilzuG5fTpciNDVj4ljV1EjJgoKWbbURK+zoG2bvRZXTqkWg/V9OgsffPlnNNsSlY8HTcM+1dTbDhOXjN/2YvZGPzYQyuzlfqZdjojwnB0pqg5FddrzLTXn4Y6PBZp16Obq353iMvcPw28tpVHGSRK0VoszLCXzJTqekYXngVBb74uOPxdQbDiu7oaqKo02bXGbB+0= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 123fe3b8-435b-432a-94d4-08d7472a3737 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Oct 2019 11:18:13.5043 (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: xAKE6YzwtyOnEEZaFRq/lkPyvAaKVabG6Rx76H5Eq/ZghKT6GlZ6ditvwluD1W7e7loB6zhbRpu8DTpZQKEIRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2752 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-02_06:2019-10-01,2019-10-02 signatures=0 Subject: Re: [dpdk-dev] [PATCH 3/8] crypto/octeontx: add asymmetric session operations 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 Akhil, Please see inline. Thanks, Anoob > -----Original Message----- > From: Akhil Goyal > Sent: Tuesday, October 1, 2019 6:27 PM > To: Anoob Joseph ; Pablo de Lara > > Cc: Kanaka Durga Kotamarthy ; Jerin Jacob > Kollanukkaran ; Narayana Prasad Raju Athreya > ; Fiona Trahe ; Shally Verma > ; Sunila Sahu ; dev@dpdk.org > Subject: RE: [PATCH 3/8] crypto/octeontx: add asymmetric session operatio= ns >=20 > Hi Anoob, >=20 > Just a couple of nits >=20 > > + > > +static __rte_always_inline void > > +cpt_modex_param_normalize(uint8_t **data, size_t *len) { > > + size_t i; > > + > > + /* Strip leading NUL bytes */ >=20 > Typo NULL [Anoob] It is intentional. "NUL is a ASCII character which ascii value is 0 whereas NULL is a macro de= fined in stddef.h and several more header file with value of ((void *)0)." =20 >=20 > > + > > + for (i =3D 0; i < *len; i++) { > > + if ((*data)[i] !=3D 0) > > + break; > > + } > > + > > + *data +=3D i; > > + *len -=3D i; > > +} > > + >=20 > <.snip.> >=20 > > +static __rte_always_inline void > > +cpt_free_asym_session_parameters(struct cpt_asym_sess_misc *sess) { > > + struct rte_crypto_modex_xform *mod; > > + struct rte_crypto_rsa_xform *rsa; > > + > > + switch (sess->xfrm_type) { > > + case RTE_CRYPTO_ASYM_XFORM_RSA: > > + rsa =3D &sess->rsa_ctx; > > + if (rsa->n.data) > > + rte_free(rsa->n.data); > > + break; > > + case RTE_CRYPTO_ASYM_XFORM_MODEX: > > + mod =3D &sess->mod_ctx; > > + if (mod->modulus.data) > > + rte_free(mod->modulus.data); > > + break; > > + default: > > + break; >=20 >=20 > Do we need an error print here? [Anoob] I'll add DP logs here. =20 >=20 > > + } > > +} > > +