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 6A20CA0525; Tue, 21 Jan 2020 15:52:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DB0EF397D; Tue, 21 Jan 2020 15:52:00 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B80F03772 for ; Tue, 21 Jan 2020 15:51:58 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2020 06:51:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,346,1574150400"; d="scan'208";a="244717440" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga002.jf.intel.com with ESMTP; 21 Jan 2020 06:51:57 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Jan 2020 06:51:56 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 21 Jan 2020 06:51:56 -0800 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 21 Jan 2020 06:51:56 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.49) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Jan 2020 06:51:55 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UhjdZ34g3zuKRWBluISmbrlhCycfd7ho0VJkE4ZeSVQq1xRcgTejKEIvi4WqliOeW1hZufwEahMKkAGRDga72nU5Lk/OroNL5dOY3aXy0A/q7p/41Eg0aqSyPrj0GGOMItGqNgjPvOQ3MA1QrbVC46P6wEdcr4PrV1WHJy9hYlFllwwxWHb80hc6nn4vfWhqNqBw0p/8wV60fMAt4l5waNeMG9gndt0eIjnMO3RiNxNtXGQMg86w6YNe4L75Ldv+BgsS7zahw0QcjdRc9B4A/Ym/KcaK29ItnLIGuysboCj2FD0TAzS4uosgMDbZpFljL5GIIfbjWUuywVtZXWfRIQ== 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=lT7llmBJGIcAICUulrXR8KngaZ3b524Ldz5tzDJwtg8=; b=XglJE/z7Z92KQWJpQuNhdpoORZ7De5mfw5fRs0nDjGG1AJCzgDlbC3CXxiTlfWQvTSa8gZn368NclN/PS628eCPu6YuLeXuJvuQxeOLQesSrNMU4iLJlGWzfoFaMBDo8siq6Uu8dvJ6jvUaC4Fc0LuzJhDEIMMBEalIZqYChn5gtrIL58zKwwJ8ipKRCHwUinivi/gWaOjsn4GTOfJTnN/LFBUtdCI5tS8XgzZ5gZMQsl5hC0EKFMipRP69fFKAk4zi8z8SwLWs+1cLqKcl61C5KeS0zVGvpQWMbc0FU1dECWgIb8XG62r6ZlT6flxY/5kDxdnDYYOsEDy00atcKEg== 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=lT7llmBJGIcAICUulrXR8KngaZ3b524Ldz5tzDJwtg8=; b=gjq8yw6BSq7BvqAoWBiVVe4vSoNId2sG5rufUcDf/rz9N5pFCJl6SqF6DK2sHYQUQHdjgb6AyB9I6Qb8OlB8BAuyOc5fkIhG/gf/YdomcHjXnmcMTvCKkzc61gOIoJrvjFDGn4F/l+uDcv0QCsIwzMQ1PDUSH4QPs6h2q4s/Qq8= Received: from SN6PR11MB2847.namprd11.prod.outlook.com (52.135.90.31) by SN6PR11MB3231.namprd11.prod.outlook.com (52.135.112.86) 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 14:51:53 +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 14:51:53 +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: AQHVy9IFMBKkeG41oEC1d177qz2Ke6f1Ka8AgAANBwCAAAUnwA== Date: Tue, 21 Jan 2020 14:51:53 +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.185] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: eca1fb36-097b-4b79-6670-08d79e817428 x-ms-traffictypediagnostic: SN6PR11MB3231: 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)(346002)(39860400002)(376002)(136003)(366004)(396003)(189003)(199004)(5660300002)(52536014)(2906002)(71200400001)(66946007)(76116006)(7696005)(66556008)(64756008)(81166006)(26005)(110136005)(81156014)(186003)(54906003)(53546011)(8676002)(6506007)(66446008)(66476007)(8936002)(316002)(55016002)(9686003)(6636002)(4326008)(478600001)(107886003)(33656002)(86362001)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR11MB3231; 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: T0ALCMl0CDH8i69pd2CWbvnUV3sTFc85rM0hP00bHM9ztMMX9oFmtM+yQVZBpprsmEZrqgE++a8tuDJGHGBSdsEIGcSKm1UdAIV6pqPR7wan71GwZ43NTfdYvYyhD+ZE04AzmN9+aZk1YYAwUhAHxEK4nb7fbe/PnBP1N8g7EgVIMDmYiTUN5BMBRqFc8j0BSWSQWw3rjWeQXJIohseXtfW2I5qXHJAujZqPpdonsmdTg4qmYdTh9FYjDLgpjRi1HLQP7cmCgwjP5fkaqfLLbzxgEjangS262pIyzWm4vYASUMxt92m9FhZ4gqlS62zKnMOk/P61anFPIrfT7Uo7464YnzVlVSdikqvis9kqO2Tx8PIk5AK1E/fgSsRe0opFd9ql5P39fvD6ozHdw0OLpL9YXjdrWvx7rKqrd6zvLgn6zCAX4SguutJMGchz7/thvV3MSIxvOv4Wcru2TrgQQQuJLBnjgFbtQHzo+KWcuo+jVYfpikAg6RedOTTyaPM0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: eca1fb36-097b-4b79-6670-08d79e817428 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2020 14:51:53.1529 (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: bgEpiguQSEtBQD12JfBVwizjn3cCWgchGN3zxh6QMFZbJoIFhrdBhu9qGHmGU8plaGc/R0BKcHmSEwEstYXSh5KfmhjQeWdLzOj8a/e2h+U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3231 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 2:29 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 Hi Konstantin, >=20 > Hi Pablo, >=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? >=20 > Not sure I get you here... > This code is present in current version of the driver too, no addition/de= letions as > I can see: >=20 > /* 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; > } >=20 >=20 > 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. Looks like in this case, this would return an invalid status. Am I getting this wrong? Thanks! Pablo > Konstantin