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 2F207A0530; Wed, 22 Jan 2020 13:43:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2F3E72BB9; Wed, 22 Jan 2020 13:43:38 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C3EF1F04 for ; Wed, 22 Jan 2020 13:43:35 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2020 04:43:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,350,1574150400"; d="scan'208";a="374911975" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 22 Jan 2020 04:43:34 -0800 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 22 Jan 2020 04:43:34 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 22 Jan 2020 04:43:33 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.107) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 22 Jan 2020 04:43:33 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lnx0AgVgAl//nKjU3qnsdp9Txf3s4mjxah7iReHLtO9J4mqgmgcRit1nD0y2DVjaVXBtcEdvwF4he5abAMfkNcsY122SsMSwx01JQq93RpnqKSUlRiGb1LFNExVrhqwRUH2yHFMZqPfoePS1zTx+vE58bXxYnd58chMgzyPNVJQ0iNNJvq/0BAmX1gnuWDn8+jMu9kRzKS2+/K5aiHCtdBy91XQ3x7JT9C+Dja8p2nCXacAhYRBamY2fCgMqCXlQ7UhN2GkFbAU1jR02bp79DWMnL/jm89XbfqFZTkXbyGIXj50LnybyGTH90Bi41waLXIewzC+CjXf4sekvTshDFA== 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=qV+otBToQs0JnmmZlDdDrVQmCvdv3VgYAQbW4JQ6J/Y=; b=PmYyKXnacG8BCIpXixslURg/eaUhCkz+A0VGz2txpVBk9JepJ0ZMJLltCn3XE0KDyY2WdvwAXTQ7t/1JrRBlXXDfYH9WgIEMlUe1ydhh1+A+yfKYm6iGCeMZa0RLPkVuIrsSkOTUalGdibik8lDAzXKXWAciE0nkuRBTGpdDTTRiTVGu/1dpmsposTAMdMxf6BoUaxAwrTP6ogQfVj7TSR1bl+mkn+dlzk7IQZfZOPJLUmbWMJE3/qUSeA7vcioCshsw1oYIudga4p47XPl4Kzp7f+WW7gkWDL7qLViC5P3o+M8x0e2Ahy6HCoYnMUNM2fuO9/agP5+u1WIJQYbogQ== 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=qV+otBToQs0JnmmZlDdDrVQmCvdv3VgYAQbW4JQ6J/Y=; b=jaMXWS4RrYhxj65VlNib6l0ghywx0R5drspp1eJTFZVExOzbzwQTab44BqNVgN2fHL1lEWE6KBpk5SzPEu/O+Dq95L9Z+mGxjvbhftcsR2g1ZwslSDvDsoGilQXmWArkhnijScErhHevqlFDwFiDaAGjd077cMH/i+rzLLJ2XpQ= Received: from BN7PR11MB2547.namprd11.prod.outlook.com (52.135.255.146) by BN7PR11MB2705.namprd11.prod.outlook.com (52.135.247.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20; Wed, 22 Jan 2020 12:43:32 +0000 Received: from BN7PR11MB2547.namprd11.prod.outlook.com ([fe80::e03c:e55a:c03f:5f4f]) by BN7PR11MB2547.namprd11.prod.outlook.com ([fe80::e03c:e55a:c03f:5f4f%7]) with mapi id 15.20.2644.028; Wed, 22 Jan 2020 12:43:31 +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+Qy7lXruaf1LJqAgAAHu6CAAAiqgIAACD8QgAB4zoCAAO0ZsA== Date: Wed, 22 Jan 2020 12:43:31 +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: e36cf328-67dd-4618-c76a-08d79f38afff x-ms-traffictypediagnostic: BN7PR11MB2705: 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:9508; x-forefront-prvs: 029097202E x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(346002)(396003)(136003)(376002)(39860400002)(189003)(199004)(64756008)(76116006)(66556008)(66476007)(66946007)(478600001)(2906002)(81166006)(71200400001)(8936002)(5660300002)(6506007)(81156014)(8676002)(52536014)(7696005)(66446008)(9686003)(33656002)(55016002)(6636002)(26005)(186003)(86362001)(110136005)(316002)(4326008)(107886003)(54906003)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:BN7PR11MB2705; H:BN7PR11MB2547.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: 1vShYWJdTi1ZcLRMVwrEpNskdh5t0jEe5uoVGwALJt1eEceo8lrDl0GHrYx9dqZA9sbVzsAiJsUuvRZdnh20Cwz2kBCUhQ/xIV4Wv/6+3PoVPFqnTcFFrYMqeS9pJWs/Gsy4MrrNbk7BjlKA36IRdUuncqN2oFStE0gAcYMJzv+3eRGZ5BHIZM0AQjXzj0OhbprvRB38LZmDL9nlMuUYz6saudTFdxlM92Z6p/FZ12kzUSaDIZ4bZOPUqsw2BxFFq7BtuBnWGQPm4FkY5II0bEa/q0b7MPmpofxeRSpiqdhIafoYP38q95yUi8qQSp+6nnPqk1BtfCfEsFHbUbvducXSrJCYX09MR2KSbmdOP0hofkAsrJpwnjWBixF8GcEkFDxPREKBEZSPfiaXpmczfwbyJEHACnNVJj3X3VuStE5IJ+tCkjjpEQfIwMMlS72E8L6nTIrksOuCRkasVP8C5mFNnMPZlaIdlM//t/YOO06+XXK0Xrk3FOS47fFD3jeN Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e36cf328-67dd-4618-c76a-08d79f38afff X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jan 2020 12:43:31.4735 (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: EXzK5CV9vmbltlR3yiU2Gs09aDUINhbVQhd1vR3qQsWp+wwTn+Xe2FjJYiLkMNQsYHOZmKmjVybhuJP+0fZpeodTk29H1qJrp87ISfWi4Is= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2705 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 b= y > > > > > 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_= GMAC) { > > > > AESNI_GCM_LOG(ERR, "Only AES GMAC is suppor= ted 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. > > > > Ah, you mean sess->ops.* are not initialized properly for GMAC, right? >=20 > 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. Yep, you right, good catch. Will try to address in v4. Thanks Konstantin >=20 > Pablo > > > > > > > > Looks like in this case, this would return an invalid status. > > > > > > Am I getting this wrong? > > > > > > Thanks! > > > Pablo > > > > > > > Konstantin