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 BF5CBA04DD; Tue, 21 Jan 2020 23:34:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C426FF3E; Tue, 21 Jan 2020 23:34:13 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 34E70F11 for ; Tue, 21 Jan 2020 23:34:12 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2020 14:34:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,347,1574150400"; d="scan'208";a="307342496" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 21 Jan 2020 14:34:10 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Jan 2020 14:34:00 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Jan 2020 14:34:00 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Jan 2020 14:33:58 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q/lRqyQ/P85nUI66mitq+F4RqmkOTOkCXI/eVW+V0beJEpfgsuIwyT1RDShWt+f6Ga0IzESQbQ6O31WMf+mLLzuWrCa+7MQVGWHA8oVvm6TPM0NvOB4WQkDclz6JR2o1GyJ+Bkk5PD32ECwGFkAMilt13CktvTBjH1Peuwe3FvpYULGuy98pwwOQBkBZ5b6nKKDrwjlRj1CTXEEJlIWQiAG4wA/y6hB+zKwsR/UJX/axszMkkl+24CyjPT1XDNq741UGC6Gb6/tVcGRDYRDptGQAGN7fFQO7VlC3UGJtvEpCdXPo7mepjqtnbDgGjckqIdrk6YScIhZzqvJPih9p+A== 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=BUpdHU4nWrmT+ND6hLICxhLOtoGa3qQ3YZrTbR6INpc=; b=i/5qrlOfnPmTme3i9YhpsqObGSYBXNm08NjwB8Zgj/KekoGF1WGL0bhoE9pJU2eCy8H5pwm7ZhT7uHbiPU2yM+hIdNCXKwZi+KnihmMaZGTllVWMWwrp8dBzpv/lfvs1a5WRR3nSAxwaWvJFKpSKXsi81ub5KvXxp01E74Day3AFA9INZ7xbPcmehgR8icFEBikPXAcJY3Ybe/+QYLXxnAZ1Hl/WSrNePunI8K2AH4EVUTRMxnl3lZimvDAlEIw8LKCqUB4sVBmTsrp3rm6dXm0xXMVOcs7OflKSP7rkzL0xgIhDNMi/C8bqCMKCrjd8h8nSMUGWmWK6JKgeSVtt2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BUpdHU4nWrmT+ND6hLICxhLOtoGa3qQ3YZrTbR6INpc=; b=MQvWq3h9kYKcRvy4ry0d9Ahuyh+qUST3XI3Fq6OGfHpNoygN2IQPmdcOYY7TWVVRdF+Jl+RCpRBF3J7i2AgbwKvk8dW0BfOk9+54zT5jN4A0GKwqXDEMZlMpPWJO5jnVPL4BT23/BdFvwn2mTAajKwpZwxzr181IjotawxRM8bA= Received: from SN6PR11MB2847.namprd11.prod.outlook.com (52.135.90.31) by SN6PR11MB3280.namprd11.prod.outlook.com (52.135.111.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.24; Tue, 21 Jan 2020 22:33:47 +0000 Received: from SN6PR11MB2847.namprd11.prod.outlook.com ([fe80::3053:f119:eadf:6c7a]) by SN6PR11MB2847.namprd11.prod.outlook.com ([fe80::3053:f119:eadf:6c7a%7]) with mapi id 15.20.2644.024; Tue, 21 Jan 2020 22:33:47 +0000 From: "De Lara Guarch, Pablo" To: "Ananyev, Konstantin" , "Smoczynski, MarcinX" , "akhil.goyal@nxp.com" , "Zhang, Roy Fan" , "Doherty, Declan" , "Nicolau, Radu" CC: "dev@dpdk.org" , "Smoczynski, MarcinX" Thread-Topic: [dpdk-dev] [PATCH v3 2/6] crypto/aesni_gcm: cpu crypto support Thread-Index: AQHVy9IFMBKkeG41oEC1d177qz2Ke6f1Ka8AgAANBwCAAAUnwIAACd0AgAB2y2A= Date: Tue, 21 Jan 2020 22:33:47 +0000 Message-ID: References: <20200115182832.17012-1-marcinx.smoczynski@intel.com> <20200115182832.17012-3-marcinx.smoczynski@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWExYWQ5NmQtNzA0My00NjQ1LWEzMDYtMWFmMTAzYzZmODk3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMDNkeldTc2ZvSnFyK1BHZzlTTFNBZTltSTZ6eTRsbjZ6TVFRbUxhM01Yak9iMytcLzBUdVJ1Wm1aQ2grMGwrNXkifQ== authentication-results: spf=none (sender IP is ) smtp.mailfrom=pablo.de.lara.guarch@intel.com; x-originating-ip: [192.198.151.173] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5df2c53f-85db-49d7-c0db-08d79ec1fb28 x-ms-traffictypediagnostic: SN6PR11MB3280: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0289B6431E x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(189003)(199004)(86362001)(66476007)(55016002)(64756008)(66946007)(107886003)(66446008)(66556008)(4326008)(71200400001)(2906002)(53546011)(5660300002)(7696005)(6506007)(76116006)(52536014)(498600001)(6636002)(110136005)(54906003)(81156014)(8936002)(9686003)(81166006)(26005)(8676002)(186003)(33656002)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR11MB3280; H:SN6PR11MB2847.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: E0TwvpEqSDKZKZzbRmecT1g3lB6CQX6EJfNhtPaOlFRqtN0VBfMRuUdCrnSXJF4LvwrHoGuQohjL0TNGOqvALwdEt7Ryam4uQqZOUMOLglqnwLWgkgmQQqMr+6xlDJC0Eq0jl8VV4VhcTvia8oZU6JgSgLon7otlbHCGXX0LuHyI3dZBBxNn5WY7t4UDyUU0lfxawKG0deNdzwYfdRpa8bDghuT5rdcWoyeid4PHrpcJZmvbo69XNgPpeTHe8oDGX9xL9yv89oYRq2g8HSJFatm8HbxlegFqlgk4gVaxZfPzRTWyWe6G5VPO2EbvC9zRfzqzfAzrxdh7LOyfH/LxmCDq13da0ZDLa32hCSzX5P6Ivl5Bc6Kb3k0AXnx+CwDyo/VHCqxl3MC3Nz7aR1Giu23ofV/wvBJ33HF2Xhqoo+9YcZUrOurc1sbsT6F/mc8zAS7uP2o1bTTHuZu3gfmhJ9hQ47gUjFF6kLcZNMfbhECzoYTW8QZgltQhH6PtBvqm Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5df2c53f-85db-49d7-c0db-08d79ec1fb28 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2020 22:33:47.4514 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: I/+7vDMq90LHwm2xITRl/r4skQCGbnRQ/ndwl3gk9BuLsTVwlw7kbuDp++0SdDIPAfjKhVVfVrOqeesvxEpAWPH94Kj5R7h95+DNFSi27W8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3280 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 2/6] crypto/aesni_gcm: cpu crypto support 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" > -----Original Message----- > From: Ananyev, Konstantin > Sent: Tuesday, January 21, 2020 3:23 PM > To: De Lara Guarch, Pablo ; Smoczynski, > MarcinX ; akhil.goyal@nxp.com; Zhang, Roy > Fan ; Doherty, Declan = ; > Nicolau, Radu > Cc: dev@dpdk.org; Smoczynski, MarcinX > Subject: RE: [dpdk-dev] [PATCH v3 2/6] crypto/aesni_gcm: cpu crypto suppo= rt >=20 >=20 >=20 > > > > > Add support for CPU crypto mode by introducing required handler. > > > > > Crypto mode (sync/async) is chosen during sym session create if > > > > > an appropriate flag is set in an xform type number. > > > > > > > > > > Authenticated encryption and decryption are supported with tag > > > > > generation/verification. > > > > > > > > > > Signed-off-by: Marcin Smoczynski > > > > > --- > > > > > drivers/crypto/aesni_gcm/aesni_gcm_ops.h | 9 ++ > > > > > drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 149 > +++++++++++++++++- > > > > > drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 3 + > > > > > .../crypto/aesni_gcm/aesni_gcm_pmd_private.h | 18 ++- > > > > > 4 files changed, 169 insertions(+), 10 deletions(-) > > > > > > > > > > diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_ops.h > > > > > b/drivers/crypto/aesni_gcm/aesni_gcm_ops.h > > > > > index e272f1067..404c0adff 100644 > > > > > > > > ... > > > > > > > > > > /* AES-GMAC */ > > > > > - if (xform->type =3D=3D RTE_CRYPTO_SYM_XFORM_AUTH) { > > > > > + if (xform_type =3D=3D RTE_CRYPTO_SYM_XFORM_AUTH) { > > > > > auth_xform =3D xform; > > > > > if (auth_xform->auth.algo !=3D RTE_CRYPTO_AUTH_AES_GMAC) { > > > > > > > > Could you add support for AES-GMAC, so all algorithms supported by > > > > this PMD > > > support this new API? > > > > > > Not sure I get you here... > > > This code is present in current version of the driver too, no > > > addition/deletions as I can see: > > > > > > /* AES-GMAC */ > > > if (xform->type =3D=3D RTE_CRYPTO_SYM_XFORM_AUTH) { > > > auth_xform =3D xform; > > > if (auth_xform->auth.algo !=3D RTE_CRYPTO_AUTH_AES_GM= AC) { > > > AESNI_GCM_LOG(ERR, "Only AES GMAC is supporte= d as an " > > > "authentication only algorithm"); > > > return -ENOTSUP; > > > } > > > > > > > > > The only thing is changed: xform type calculation. > > > > From what I can see, sess->op is not set for AES-GMAC. > > In aesni_gcm_pmd_cpu_crypto_process(), this value is checked, In the > > switch that is in line 471. >=20 > Ah, you mean sess->ops.* are not initialized properly for GMAC, right? Correct. Actually, sess->op is set, but in the switch in line 471, only AESNI_GCM_OP_AUTHENTICATED_ENCRYPTION and AESNI_GCM_OP_AUTHENTICATED_DECRYPTION are used, which I would think that it means that any GMAC operation would fail. Pablo >=20 > > > > Looks like in this case, this would return an invalid status. > > > > Am I getting this wrong? > > > > Thanks! > > Pablo > > > > > Konstantin