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 E793AA0525; Tue, 21 Jan 2020 16:23:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6E5444C81; Tue, 21 Jan 2020 16:23:13 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D82F24C81 for ; Tue, 21 Jan 2020 16:23:11 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2020 07:23:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,346,1574150400"; d="scan'208";a="221731766" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga008.fm.intel.com with ESMTP; 21 Jan 2020 07:23:10 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Jan 2020 07:23:09 -0800 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.58) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Jan 2020 07:23:09 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=diB4deD9hP7Eg7h2kA0I6RwRIRo03dp4WB3LZ1kb7abAnp+RsWRxswSp9+gx8P0DpwWtOA9//mJKHdF12HTB7aLiZLhVO2FX0XLOwlod7yvFpPV1GDYrqiDfVgFB5iOMy/J9X9k4T2RZjCJ1FaITytl3cQcr+L2wwNSL7Y07d7QYcWCGeGaTUUeTyp20KonxN9Bs7j/MGq87tnbkVDWhhIbzv28DwobEGJkmToebtCidBwDSDHKOR0ut217XTYFzTI1TSZUUZU8Yz6YCVmWBLYzcpe6udwTnqA7aY0i64xsYVJ+AtG6UQhLPlSTmmpppEo2zi/tqs15CoLrfy+pLsQ== 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=FooA7BFfYYVyXEM6yHubqTtNyu2To64McaINR8TAlko=; b=URYb8IYh/DG5B8qeZ9/4727+5enL5wI+Yc7EWVkPdnPf4q9xchyKQp8FIgqMLWQPnf+/E7/nfH+ZyDoU7sl1aX4SscUaGyerfYZdDhh9FORJCHp5r5u4dL+81s3TgOpS10HudXxwMsynSXXJASb/auEUDRGcHaNLekbAxqQAwcIvt893XgbBZLPAsHtpDJYiO4zeHAVcCXLCTEYhjjSUumbou1j4vCIBQBJtmPGNknK07wZWH/K2FT55h8SqgDnlbzTznAXXmhNif6VNjECYIAaNwPSgYp3KlP1r1MoG3W6a6jZY3/9V31YLm9fPQ7VZs/lKFziYv7Xtj8c4i1ooJA== 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=FooA7BFfYYVyXEM6yHubqTtNyu2To64McaINR8TAlko=; b=j9ct7TMkskI71v72LtLR9dfr6WfEtc4jrl8/kgIQ1AaFtvIEH5LGcz9yZKGkNTsC723tV4+/N4a2teR4P549H+q7pUb0NOdQqEjPRNEkLaodrNoC5VVuIm3mlmBNIPTE/D6dpfW4Yks2sd3CaV4hy5E4M+BxVU+3Dt7hTufv6as= Received: from SN6PR11MB2558.namprd11.prod.outlook.com (52.135.94.19) by SN6PR11MB2910.namprd11.prod.outlook.com (52.135.127.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.21; Tue, 21 Jan 2020 15:23:08 +0000 Received: from SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::4d86:362a:13c3:8386]) by SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::4d86:362a:13c3:8386%7]) with mapi id 15.20.2644.024; Tue, 21 Jan 2020 15:23:08 +0000 From: "Ananyev, Konstantin" To: "De Lara Guarch, Pablo" , "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: AQHVy9Hv++kqvH5P/0Cyg+Qy7lXruaf1LJqAgAAHu6CAAAiqgIAACD8Q Date: Tue, 21 Jan 2020 15:23:08 +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: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWExYWQ5NmQtNzA0My00NjQ1LWEzMDYtMWFmMTAzYzZmODk3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMDNkeldTc2ZvSnFyK1BHZzlTTFNBZTltSTZ6eTRsbjZ6TVFRbUxhM01Yak9iMytcLzBUdVJ1Wm1aQ2grMGwrNXkifQ== dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-ctpclassification: CTP_NT authentication-results: spf=none (sender IP is ) smtp.mailfrom=konstantin.ananyev@intel.com; x-originating-ip: [192.198.151.162] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 35cee45b-2c6b-4ba2-e969-08d79e85d1ca x-ms-traffictypediagnostic: SN6PR11MB2910: 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:7219; x-forefront-prvs: 0289B6431E x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(199004)(189003)(71200400001)(33656002)(52536014)(5660300002)(2906002)(81156014)(76116006)(86362001)(55016002)(6636002)(8936002)(64756008)(66556008)(8676002)(66446008)(81166006)(7696005)(66946007)(66476007)(54906003)(4326008)(107886003)(26005)(9686003)(186003)(110136005)(498600001)(6506007)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR11MB2910; H:SN6PR11MB2558.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bwc7+4kio+ywI2KEjNzUGMlEVIL2oMCXQ3RJf/30EpIVWA6L1tUi5vJ1pjPru/a5Hfbp0V3QVTmG61iLzK1mQjdBKvNHeXQjoqqKKdzSHACb+hAcfYUZKMok4joievjHBiYnYgAIJ7LKy7SRNpyCgtGc2emSVvHp32i5uwWTcYjp/kE8knLC3ssxZg6G5TPvjGCJBoC6ZDeas3Jj2zf9s4zi7pbtQ2LbAkq3LkJ4WjgRK3PnsbYZUPgN37XQUkO+cwkBIZrDT+qRJcjeP0i9qj0RXQ9P4en4Zf7J/92Yybb9k2ObD9XK9QIHh//24VLGrz4UGskbUOvmcDUt1oG3Uc1d5zAWi6u7xIPaiIeGuEd/zLOCY/jNedUh7pcZ3Th7eIASCf0JcMLD73W7H+Aao8K5Czx9qymZVoVEVhV3grTjRP3df1GwIKyT9lcTzA8ISNgXjzb3QNQQS3HhlbYyG9h4zyBmHYVt/4xYAljw6Sk5ZtjKjqJPMQ5PZPUCzgF/ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 35cee45b-2c6b-4ba2-e969-08d79e85d1ca X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2020 15:23:08.2810 (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: uRvNt56kCuuS10lbcicZt3MdG8fRjnQd/BvRh9pcJAzmBPR88QWYLnyNsvi1821QtrQSlc1qFOlAGh69cwlV/zZk4x9xD5I1n7qmiBqFmPc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2910 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" > > > > 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 th= is 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_GMAC= ) { > > AESNI_GCM_LOG(ERR, "Only AES GMAC is supported = as an " > > "authentication only algorithm"); > > return -ENOTSUP; > > } > > > > > > The only thing is changed: xform type calculation. >=20 > 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. Ah, you mean sess->ops.* are not initialized properly for GMAC, right? >=20 > Looks like in this case, this would return an invalid status. >=20 > Am I getting this wrong? >=20 > Thanks! > Pablo >=20 > > Konstantin