From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E7BC9A0C49; Tue, 20 Jul 2021 10:33:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96F8F4068F; Tue, 20 Jul 2021 10:33:21 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2055.outbound.protection.outlook.com [40.107.212.55]) by mails.dpdk.org (Postfix) with ESMTP id 6717A4068B for ; Tue, 20 Jul 2021 10:33:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qp/s3A9TEs7mtQK5IfE1k9GzF9jit0OU+sy8iELIQTxMyADmEkGrnT8o+mjFF8tk6mMS0qylIQ0mngHQ2h9+//jM1pqtGdcAYqUk5IeS8+IMmOtzHnntoT2qNodjoAeQ3SMuOrbAXQiNsnytJyGg37F0vKEzNsziaqlJL1V2wiZFPMIOyFUiLxrHjhTcDUrHitHpsqnc7u9Oer1Yj8jFdsD2mJV20Vfepu2NvyWxG8hO62lTZn00DqeCFw1s7yMkCNDEPjTWsUAWDSeV3bqRc2MYSOA3z1hCcEk/FAjlVKHmzY/KLS5XacouvObm6nyiNfHRzkC+0csRGxBzuQ54yA== 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=W9kEmzom+1Z2pAjLnWjnRhDt+W3Afpe8Tz2coB4sX6Q=; b=PmF1xTJb5L/Rx1MN7zFFWvzbKHYZga4VjaRlZv1hbFH2lcJW8g4pzzTcmaDEYsB6uso8sMMigRHgYWBEOHYjhQowezEQZ/sxT7T0COUMndOB/juRz2HaMnk0A0r/6XbSr1t2LZ7D9rkz6fBdi+bYlLJW+ZYp2+O62hgfM6qY1Bh5z5r9qiFd2YF6+twh848Ojnkne28nLO5veXVbHY74D/qwV4zlliIkkwV9G8dWkIxUZkIuAZvljHhVzwWyoD3TqVIEFRq09PPmP+fzRPU3DEv6qCtpvhYNXIXBeMPl1CuyfYaCLI15e1/0O2rUOZ09mRTeEbO0jYamIL3nj7Shyw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W9kEmzom+1Z2pAjLnWjnRhDt+W3Afpe8Tz2coB4sX6Q=; b=nUhyr5y2qGVcAfYtTE0NpHEmaX1ouT+gjhMtFMEaiTp76Itymtv+CDtJXzNz1jLqeGqZt9vlruFa9Tq8WWMsJlZV1SZ1OOUkwIX4YcVThdl7jSmHodTV/z/uEe4A+lNV3bqqV96U9t8lDy2Y8Wx4vS5V0E26LsohiOUFAsWtoojIAkr/fYl4+BUbwtuvZKJQe226cae1kuGCjEMErTmp3GhAxSO8wMo82UEGVd4CqBahP3Z3dLpZIj+0LtJhdSa1/lczAHLgT1ZknvD3DQWJpdbR3LCVb1kw9+fcSdacwhB8/calnu6FHBH7ok75QAqohzhE4u7g83KVSZdSE76VIw== Received: from CO6PR12MB5396.namprd12.prod.outlook.com (2603:10b6:303:139::8) by CO6PR12MB5409.namprd12.prod.outlook.com (2603:10b6:5:357::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.30; Tue, 20 Jul 2021 08:33:18 +0000 Received: from CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::3dfc:6b6a:662:7f51]) by CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::3dfc:6b6a:662:7f51%8]) with mapi id 15.20.4331.034; Tue, 20 Jul 2021 08:33:18 +0000 From: Suanming Mou To: Akhil Goyal , Shiri Kuzin , "dev@dpdk.org" CC: Matan Azrad , "david.marchand@redhat.com" Thread-Topic: [EXT] [PATCH v8 04/16] crypto/mlx5: add basic operations Thread-Index: AQHXeZhgl2XSLuqN5UWMvDbJ3YNd/atF/9wAgAWQQlA= Date: Tue, 20 Jul 2021 08:33:18 +0000 Message-ID: References: <20210715150817.51485-1-shirik@nvidia.com> <20210715164126.54073-1-shirik@nvidia.com> <20210715164126.54073-5-shirik@nvidia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d1146ad8-9c75-4336-8252-08d94b59067c x-ms-traffictypediagnostic: CO6PR12MB5409: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZD3WaTFE8RSkI0MGuJpjIWKdCBFwzUUa0ruTEKqMLE77vYdNOU1wA58ARCtEoD1X3U1UqNuWsFlkhAewCNnCARniBJ/d3bK2HFxs1K+T0sDaM3rIbc8JbPIxewV/RkVZZIn6qzcH6BdesPJ0gLdMWM7cjXqWev9fs6LaJSes4eYs8ttKXTIl7xij4rG7gxUwVvbB0Zg3ll1xLUiTouVrV8AK4ktm61qGlOvn4lEeuR0GyToxXR03RS+CJ0z5icVs95VWyEMA34olic3NgPRKYORLWt5mOf30O1q/MPLwN3+UAGgFBJp+qS6ZzgbqIUds0ZT8b4E4ULZhkoJuPJr2FjRAPE98hX36emUV2yIttk/ib8M39RFw17vQLNFaZjreCqV5Qr/jGiYpUzAIojNKt058Qf+JA9INxsZLHtsORxt1NXQQ7UFE3xHeAZsWcTsr+3Q/nLZOBldQxXxzjjH46UIQBkphcIy0Nrtq3uGUUObhvzFns+eQP4OWbu0lyhIUPuvk7g43NjPGxv/Ieu1WfH2HpfgvqWz/lEQxm3uupjpaaJIHxMEEgTIcbpTtjCrcVaP0w14P4HSbqN5lUeWPuX1pGhlDIA9eZFkPJ0tDYBxex9zK5Iq00bnKSjkyDKAr6FtSYjMIsxKVDYku2clEyCBAzXNmDtk32gYk78KZOZoDppCA17+Kjqs/tSzbqMwQF8Fez0vyf58AJ+CzF+wFzA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR12MB5396.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(136003)(376002)(396003)(346002)(366004)(33656002)(38100700002)(4326008)(186003)(2906002)(26005)(52536014)(71200400001)(8676002)(7696005)(86362001)(9686003)(122000001)(83380400001)(66446008)(64756008)(54906003)(66556008)(66476007)(66946007)(76116006)(55016002)(110136005)(316002)(6506007)(53546011)(5660300002)(8936002)(478600001)(38070700004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?SEg5FecIutyxaexbvn6jubLt4Qzg3ALFoHVIwdKeuSx4rn53chOntKa8byT5?= =?us-ascii?Q?FVIguQvAIm905MEBOHvP/JHWvVDBx08R9gLSkxfCvBoPIQBa7DYwDJAYa0yn?= =?us-ascii?Q?yrhW4lMNLGsxnf8Z5xJJGJkKaRpA0l6Ay0lxlNxJt/8H4N/4dK2vqtcjK5DB?= =?us-ascii?Q?gJZBAhQIWtJ66m7YKR3wBRRZAwwd+4Eo0vobfGS3E7YrrVklqWdwaSglE2HS?= =?us-ascii?Q?pi5T49KbPaTwG2UZdokDnmWJckGF/5HmVRrKBUWpNiZZMLyWkNIgW85/ajHq?= =?us-ascii?Q?oYrnWCeZNk6wyYD2woZiJOPL4wCC5Lul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= =?us-ascii?Q?sDvq11XcXoHdHuooQQlSV+jHsQIMyMiNaJTbxLrJwiH0ptyv62b8lsJiMSgw?= =?us-ascii?Q?rfujh2zPj5lFLMU/zwEjJViX/o/kjc1eLE0UqIRozwpWb5lzhZrJHkyNXFMN?= =?us-ascii?Q?rgsk7WWT53BMYYEafiPCWrKM?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5396.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1146ad8-9c75-4336-8252-08d94b59067c X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2021 08:33:18.1655 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wdM65ULtPCtNGWdslWlkaV3m1QhYaU4/Hg6V425zXhyxBQy9K52m86iLuRvGZxjc/hPdpILKKwZjhn5evsE1CA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5409 Subject: Re: [dpdk-dev] [EXT] [PATCH v8 04/16] crypto/mlx5: add basic operations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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: Akhil Goyal > Sent: Saturday, July 17, 2021 3:34 AM > To: Shiri Kuzin ; dev@dpdk.org > Cc: Matan Azrad ; Suanming Mou > ; david.marchand@redhat.com > Subject: RE: [EXT] [PATCH v8 04/16] crypto/mlx5: add basic operations >=20 > > The basic dev control operations are configure, close and get info. > > > > Extended the existing support of configure and close: > > -mlx5_crypto_dev_configure- function used to configure device. > > -mlx5_crypto_dev_close- function used to close a configured > > device. > > > > Added config struct to user private data with the fields socket id, > > number of queue pairs and feature flags to be disabled. > > > > Signed-off-by: Shiri Kuzin > > Acked-by: Matan Azrad > > --- > > drivers/crypto/mlx5/mlx5_crypto.c | 26 +++++++++++++++++++------- > > drivers/crypto/mlx5/mlx5_crypto.h | 1 + > > 2 files changed, 20 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/crypto/mlx5/mlx5_crypto.c > > b/drivers/crypto/mlx5/mlx5_crypto.c > > index 3f0c97d081..a7e44deb9e 100644 > > --- a/drivers/crypto/mlx5/mlx5_crypto.c > > +++ b/drivers/crypto/mlx5/mlx5_crypto.c > > @@ -105,22 +105,27 @@ mlx5_crypto_dev_infos_get(struct rte_cryptodev > > *dev, > > } > > } > > > > -static unsigned int > > -mlx5_crypto_sym_session_get_size(struct rte_cryptodev *dev > > __rte_unused) > > -{ > > - return sizeof(struct mlx5_crypto_session); > > -} > > - >=20 > I do not get the reason to remove above function, it was introduced in th= e > previous patch. > It looks the patches are not properly split. We are not removing the function here, in fact at the last of this patch, y= ou can say it is still there. It's just some code movement. >=20 > > static int > > mlx5_crypto_dev_configure(struct rte_cryptodev *dev, > > - struct rte_cryptodev_config *config __rte_unused) > > + struct rte_cryptodev_config *config) > > { > > struct mlx5_crypto_priv *priv =3D dev->data->dev_private; > > > > + if (config =3D=3D NULL) { > > + DRV_LOG(ERR, "Invalid crypto dev configure parameters."); > > + return -EINVAL; > > + } > > + if ((config->ff_disable & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) > > !=3D 0) { > > + DRV_LOG(ERR, > > + "Disabled symmetric crypto feature is not > > supported."); > > + return -ENOTSUP; > > + } > > if (mlx5_crypto_dek_setup(priv) !=3D 0) { > > DRV_LOG(ERR, "Dek hash list creation has failed."); > > return -ENOMEM; > > } > > + priv->dev_config =3D *config; > > + DRV_LOG(DEBUG, "Device %u was configured.", dev->driver_id); > > return 0; > > } >=20 > The patch title and the patch do not match. > Title says, add basic operations, which should introduce the Configure an= d close > ops. But here the configure and close ops Were already there and you are > introducing some new checks In them. Good suggestion, will try to implement the configure and close dev in this = patch. >=20 > > > > @@ -130,9 +135,16 @@ mlx5_crypto_dev_close(struct rte_cryptodev *dev) > > struct mlx5_crypto_priv *priv =3D dev->data->dev_private; > > > > mlx5_crypto_dek_unset(priv); > > + DRV_LOG(DEBUG, "Device %u was closed.", dev->driver_id); > > return 0; > > } > Logging could have been added in the patch where dev_close was added. >=20 > > > > +static unsigned int > > +mlx5_crypto_sym_session_get_size(struct rte_cryptodev *dev > > __rte_unused) > > +{ > > + return sizeof(struct mlx5_crypto_session); } > > + > > static int > > mlx5_crypto_sym_session_configure(struct rte_cryptodev *dev, > > struct rte_crypto_sym_xform *xform, diff --git > > a/drivers/crypto/mlx5/mlx5_crypto.h > > b/drivers/crypto/mlx5/mlx5_crypto.h > > index 167e9e57ad..a0df775407 100644 > > --- a/drivers/crypto/mlx5/mlx5_crypto.h > > +++ b/drivers/crypto/mlx5/mlx5_crypto.h > > @@ -24,6 +24,7 @@ struct mlx5_crypto_priv { > > uint32_t pdn; /* Protection Domain number. */ > > struct ibv_pd *pd; > > struct mlx5_hlist *dek_hlist; /* Dek hash list. */ > > + struct rte_cryptodev_config dev_config; > > }; > > > > struct mlx5_crypto_dek { > > -- > > 2.27.0