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 586BFA04DD; Tue, 21 Jan 2020 14:53:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6B60F2C6A; Tue, 21 Jan 2020 14:53:18 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 13C122BF5 for ; Tue, 21 Jan 2020 14:53:16 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2020 05:53:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,346,1574150400"; d="scan'208";a="215541880" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga007.jf.intel.com with ESMTP; 21 Jan 2020 05:53:15 -0800 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Jan 2020 05:53:15 -0800 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Jan 2020 05:53:15 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.40) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Jan 2020 05:53:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UbBr5uppq7yLQxVY3yk0mza+64E5fTiknD9hD/0PpA/sgXvHpnSjU+RLPl/HO3zUVoVtzwyVkQl9rvYoxAQTmUk6Oas6ZxO/Ji7Q/i6fI5eE1x1bPZrT9mL5sxAtTEzdvYnPwBBffsOQO6dFTbLN/oqqa76aS2VwBRo5nYGWqUxVvXLRcZICfbWDaHzTjy73v5MMBCtk+ay3CXqMzZ3vVZZpYoWlTY1Kd30hkAIB8gSXOMYTUg/PgHVTbxpVfbTgO9gnAaoug//CDIi0yG7uAscqt80VqL9XeSeNkl+JQrTaJggp9eP8K+U4pN0kSjI16Hz4d9FHy2eCHeMFVsUtQA== 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=tElJljXV11OR0Q36MNaT94aXnewWz/udPMOFx7gNqvE=; b=FhjLKWL2ampLCRsD5JESKXCUCH9WPMhXT+7/t9ZEFkj/4Gc1L3Hnnu2BI+ILEndXQKRRa1Pu6mBVyCkDlhO0gXMc1AEHU16ZquUpldjURYMbnzy28d+j9mAHwsn8JZDYLMUxoAUS9Z9u3cPCj/unRqnkEt62SWCogGHXP5V20eh7U6mZYUHw9KagBifJCkj0PQ0Vha7jBrzKC8V4b58T7DEL2XguX5qqbp8Zcy2weNdEqcwFKG0GYn6s4Q7PsiWdXW3uNda0pD0SxJ7PcTHK8/EGvFdvJ/ZhbVXWvlPQog7YCTihGeds/90U5N1hVV0/hGexINT6JynH+LM0tfI2Fw== 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=tElJljXV11OR0Q36MNaT94aXnewWz/udPMOFx7gNqvE=; b=YKjVrAfQy/qO2nydY2q7PrXX1mAXrk4JT0Llivfpe4Fvdt6xSjwiqT4DQdewlCHuk9DQauN1GuZqjVZadcC4Pt8mmvXnLwyZif0Kq4t8PLXDqJlYaMZIAcf3LyFYYpAUN185/7NXNr+Weg19FpRgqvrLJSp7UpHLMWnN+SJ0lrA= Received: from SN6PR11MB2847.namprd11.prod.outlook.com (52.135.90.31) by SN6PR11MB2942.namprd11.prod.outlook.com (52.135.123.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20; Tue, 21 Jan 2020 13:53:13 +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 13:53:13 +0000 From: "De Lara Guarch, Pablo" To: "Smoczynski, MarcinX" , "akhil.goyal@nxp.com" , "Ananyev, Konstantin" , "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: AQHVy9IFMBKkeG41oEC1d177qz2Ke6f1Ka8A Date: Tue, 21 Jan 2020 13:53:13 +0000 Message-ID: References: <20200115182832.17012-1-marcinx.smoczynski@intel.com> <20200115182832.17012-3-marcinx.smoczynski@intel.com> In-Reply-To: <20200115182832.17012-3-marcinx.smoczynski@intel.com> 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: 3f5f42e5-bbc4-404f-50bf-08d79e79423c x-ms-traffictypediagnostic: SN6PR11MB2942: 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:2089; x-forefront-prvs: 0289B6431E x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(396003)(376002)(366004)(39860400002)(136003)(189003)(199004)(76116006)(66556008)(64756008)(66476007)(66946007)(7696005)(8936002)(81156014)(81166006)(86362001)(66446008)(8676002)(186003)(478600001)(6636002)(4326008)(107886003)(71200400001)(5660300002)(33656002)(26005)(53546011)(6506007)(9686003)(55016002)(54906003)(2906002)(110136005)(316002)(52536014)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR11MB2942; 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: /kV8hNR+MjsRkMifFdVNHs7HPGBSW0R8KDcsTn/DK8IOo8vwsu9VHqfbv/TT+I7yD//zFVEIfFpEVBOrMOalYY3X4LFGI47gdqnM+6VRyHpjTsmCOH9x7sIb8/4cydwOtZueH6h86V1Jgg75Ynw+kJZ9m//XqCvXinlHkl7rFCG5q7ckXEFadmzOsRFKf6fCihpWS4mIPgfkD7Ag6ex5VXkP52DgWWGnS+roiM/JyQBfNsdEAt7ymXEWlj1kuCvUjGHZqNd+StLDFhx3PCiN++YTy7IfLl0zoQToowUOe9YOdasSKuyvWkfJCU7TaJVtXue8V1ePDgShZFEeSZVC1FqJLBYlhjEobpEKSG7XVOXJ/VyRBOizPKKXD9P2UzqFTtdIKiSbhTNPTACQ4cpriIxvuf2S5To8s5UJXRhXYxA/oggKRvvAoijJD32NE0dLAryc1tDt3wzoJmf3iT/qWKiTB9fTgZvEQvlWlrOqtePPngj3NDHR6F3vaLcNIXJT Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 3f5f42e5-bbc4-404f-50bf-08d79e79423c X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2020 13:53:13.3856 (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: /dywrKWR1WkWROXNJ57i48zeJwYPBAl2w1AMLJQmj2o+kvVCCD30fUeXlB8HlJJyUothK+p8rIMRxKq2j9x8hnLsDK/jU2lFTwniyydljeo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2942 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" Hi Marcin, > -----Original Message----- > From: dev On Behalf Of Marcin Smoczynski > Sent: Wednesday, January 15, 2020 6:28 PM > To: akhil.goyal@nxp.com; Ananyev, Konstantin > ; Zhang, Roy Fan ; > Doherty, Declan ; Nicolau, Radu > > Cc: dev@dpdk.org; Smoczynski, MarcinX > Subject: [dpdk-dev] [PATCH v3 2/6] crypto/aesni_gcm: cpu crypto support >=20 > Add support for CPU crypto mode by introducing required handler. > Crypto mode (sync/async) is chosen during sym session create if an approp= riate > flag is set in an xform type number. >=20 > Authenticated encryption and decryption are supported with tag > generation/verification. >=20 > 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(-) >=20 > diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_ops.h > b/drivers/crypto/aesni_gcm/aesni_gcm_ops.h > index e272f1067..404c0adff 100644 ... > --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c > +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c > @@ -25,9 +25,16 @@ aesni_gcm_set_session_parameters(const struct > aesni_gcm_ops *gcm_ops, > const struct rte_crypto_sym_xform *aead_xform; > uint8_t key_length; > const uint8_t *key; > + uint32_t xform_type; > + > + /* check for CPU-crypto mode */ > + xform_type =3D xform->type; > + sess->mode =3D xform_type | RTE_CRYPTO_SYM_CPU_CRYPTO ? > + AESNI_GCM_MODE_SYNC : AESNI_GCM_MODE_ASYNC; > + xform_type &=3D RTE_CRYPTO_SYM_XFORM_TYPE_MASK; >=20 > /* 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? > AESNI_GCM_LOG(ERR, "Only AES GMAC is supported as > an " > @@ -49,7 +56,7 @@ aesni_gcm_set_session_parameters(const struct > aesni_gcm_ops *gcm_ops, > sess->req_digest_length =3D auth_xform->auth.digest_length; ... > --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c > +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c > @@ -331,9 +331,12 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops =3D { > .queue_pair_release =3D aesni_gcm_pmd_qp_release, > .queue_pair_count =3D aesni_gcm_pmd_qp_count, >=20 > + .sym_cpu_process =3D aesni_gcm_pmd_cpu_crypto_process, > + > .sym_session_get_size =3D > aesni_gcm_pmd_sym_session_get_size, > .sym_session_configure =3D > aesni_gcm_pmd_sym_session_configure, > .sym_session_clear =3D aesni_gcm_pmd_sym_session_clear > }; >=20 > struct rte_cryptodev_ops *rte_aesni_gcm_pmd_ops =3D &aesni_gcm_pmd_ops; > + Remove this extra line. Thanks! Pablo