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 8F282A0C51; Fri, 16 Jul 2021 21:34:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E65D4067B; Fri, 16 Jul 2021 21:34:05 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id B254240151 for ; Fri, 16 Jul 2021 21:34:03 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16GJPjXi002209; Fri, 16 Jul 2021 12:34:02 -0700 Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam08lp2046.outbound.protection.outlook.com [104.47.74.46]) by mx0a-0016f401.pphosted.com with ESMTP id 39tw30m1jm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Jul 2021 12:34:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KOKhbbAgFrJXr2cC68S3nuwlJxAIuwRnQiKxeYan/PadzC22UanJW507TFjNutcgkfe2UldagiK2hesN7scRr8lQWcI+dU73XDcY0wdr4ywdJMRS38fqaNRJBcWoWd2QhSXXAT4aI0LLPoago1fIFEHg4XBZJh3YCOENOvhXNQShtZrMepepwp24NNThW+NAypMC+B0puC8HNbmOAtQ8AdUNxapvXY+67Waidx6hdqsjzXPi9Xh23G6vBfJB9QIIxn4RxSs1mEqqn+Pcwni54YJ8cFYUgAw3hD6tP9DHGsnE8Ro61+m/710U6J+HgVMVC0M8o+RD2Ja+w0JNKP0dcw== 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=0dCeGA8o/xCcvoo6J1LAghvXOuo4pA5plAJsjytwbYQ=; b=JEC63OzjEd8Sl84uKKwRurFOlHy2+l39JwTZyCCvqDN1cXtcJ5rt6ADVR+hQ5W57LeU8LZ7WXpKPeMFMowCyNowcbRjG2a3jPUe/wajDtz0tzDJTuhbNFPwXI+/OurZzWVd1ok+hW4lLFFmyL0mGnbnh91hwyO5lz3KooaZiW1TWrTnxiuZUEwYv7HyGy1y3Uk+0qRYd+DUI01DF6WW416rJkOFNQsGUv+PQvhkdYGxPujnAWAUtx63GZcyhIOO3SFpiZmqV/zkxA4PFDCk8VKWDGSSPOL+SDv+aYEgqNotHCmF380aPEerN4tGVVWjxgqunfOF9WVQ7TGuOu35FRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0dCeGA8o/xCcvoo6J1LAghvXOuo4pA5plAJsjytwbYQ=; b=o5yghh11isg8fyFugrV/fRcb1Atbj1LBVP6yJFp0cN3oY4hBp6w7apc56KfjLhklFuETtkyL2/MefRc0BQr43K+gGx9Eu1xaolJClJs/PWUHF2/ZhP3ICIoAuqEyaIRUKa4Jlc5Q/FOF4quiiCrdMnoVCOqaQEFid8EYH7dPGqI= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO1PR18MB4761.namprd18.prod.outlook.com (2603:10b6:303:e8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Fri, 16 Jul 2021 19:34:00 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::1455:9a67:a6e7:e557]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::1455:9a67:a6e7:e557%6]) with mapi id 15.20.4331.028; Fri, 16 Jul 2021 19:34:00 +0000 From: Akhil Goyal To: Shiri Kuzin , "dev@dpdk.org" CC: "matan@nvidia.com" , "suanmingm@nvidia.com" , "david.marchand@redhat.com" Thread-Topic: [EXT] [PATCH v8 04/16] crypto/mlx5: add basic operations Thread-Index: AQHXeZhdV7pNCGX1qkWXTjwvbsdTTKtF/gXw Date: Fri, 16 Jul 2021 19:34:00 +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: <20210715164126.54073-5-shirik@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=marvell.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e68ec212-7ade-4078-6dfc-08d94890a9a8 x-ms-traffictypediagnostic: CO1PR18MB4761: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ViSIbqgRwD2Mk3HcO1TsxPmPo7wzeSIhnETO7qPa167jALTuDSpY7Br5JpHtDegB8NQQxF84iPNHfwkqnyDDvF7T59L8Bpq73S1bGeEQDfZ86SiW1jgLAQ6vU5lspVdvOTUQMJbl6sNJBmO2FmuQ0CgkH0+QpXxLX63iqoI9hwzhrzMXgmUtlL26g871Fcmu93DZfb0+ZQSHDGb8OdP8ahELr+S9DCOiZwPfgX4RD4CaMCKVjoT2Iyvsgm5VkUi3YV6WkHe0JIik22DEmISLRqdQLZBSe2GumNyCuK5NUFc6Do83vxX/1LR4Q1R5LB5qf4PkgwZSHt/edQrm+h+muF/2JOZWZvMxUsKxdnn1cBgwU99/SDsIBdSwnaDG19EnahT5UB9F+mTB6bEXzDHLttLcEUuj/UB/uy+ujpqG7AGFsw1SK+77K6lIlUk+JjkOQOgTZRm4H24UkPCE4dzpNxEQimwyG8oKBBl0HDEKuyGkBc2gXkdy2ZtDZ6UrdAa0B/K00t11qtKlEZ7+0ZW6/oIYe61B+Tieyzx2hukwZ3DUIUblV4PwIViwCOL3sfiE6S/+YVTmuTFlSvAqpl5Bj2ECQgXyeg765iwYZKzmRPO+EgMqLhV0PLeYFr1Re2LJZhwMhQNpYr1f87367EqYMKOHZ/WDXWV7ScIXr1CBvpfPeZuD2gmFf8B+mjha3GNpiedTzHPNJdiwlyJHRRfWxg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(396003)(366004)(39860400002)(376002)(136003)(26005)(55016002)(83380400001)(9686003)(4326008)(186003)(316002)(110136005)(5660300002)(54906003)(8936002)(2906002)(7696005)(8676002)(71200400001)(478600001)(122000001)(66946007)(66556008)(66446008)(66476007)(38100700002)(64756008)(52536014)(6506007)(76116006)(33656002)(86362001)(38070700004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?h92o7ZRpWEjm2rwPdgx5tR+SB72NytiF3uVp4/baF/aF+crVw0YM3bbJaC22?= =?us-ascii?Q?FmojuENwwoJKOuWuABIAfTuv/7BAqbU4Fxu6aWCKqKqC3gKOS/N3ODzPqzUL?= =?us-ascii?Q?A3s2FS0gMnJJbrKmfxlCvvqhqa98NoNZ/7wRxfK+M72MG9IffniXAX6AO8d0?= =?us-ascii?Q?Q43NHyRd3GtfNulWu2u6xkegYAVyy+6pOoeJdeJfAkEZuambH+KWlGUhoETj?= =?us-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eQLqL9XxbnBGFTuzkSre9?= =?us-ascii?Q?frb5iBq8NfPvRT+4FUN1UvBMIZs3YYxbIUNbf94osoKU+wgXXr5sPAHzK/MQ?= =?us-ascii?Q?2EP8Vyn8Oh1LMBUk6Df/1Zen/otE+F5M17fwX2FpAcVmOAmZVXTIAiVyUDiQ?= =?us-ascii?Q?AnLXKbeMkABZfs87Zl5abcY/rnDfRmvHfLT17/ObTKehvLKEDmdCsMzTZwBt?= =?us-ascii?Q?EmQ=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e68ec212-7ade-4078-6dfc-08d94890a9a8 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2021 19:34:00.7438 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 25MYQG51/2lgW6ywkjRCaJJLE0ZrEbzb4uORv1lVWJA5kK9BsNY/HHtF9nkMTJJZGmCWsiwL0cZu5co1YL9W/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4761 X-Proofpoint-ORIG-GUID: XdYAHtddPDXvUvVCXxOcdPS84ocDWqYX X-Proofpoint-GUID: XdYAHtddPDXvUvVCXxOcdPS84ocDWqYX X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-16_09:2021-07-16, 2021-07-16 signatures=0 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" > The basic dev control operations are configure, close and get info. >=20 > 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. >=20 > Added config struct to user private data with the fields socket id, > number of queue pairs and feature flags to be disabled. >=20 > 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(-) >=20 > 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, > } > } >=20 > -static unsigned int > -mlx5_crypto_sym_session_get_size(struct rte_cryptodev *dev > __rte_unused) > -{ > - return sizeof(struct mlx5_crypto_session); > -} > - I do not get the reason to remove above function, it was introduced in the = previous patch. It looks the patches are not properly split. > 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; >=20 > + 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; > } The patch title and the patch do not match. Title says, add basic operations, which should introduce the Configure and close ops. But here the configure and close ops Were already there and you are introducing some new checks In them. >=20 > @@ -130,9 +135,16 @@ mlx5_crypto_dev_close(struct rte_cryptodev *dev) > struct mlx5_crypto_priv *priv =3D dev->data->dev_private; >=20 > 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; > }; >=20 > struct mlx5_crypto_dek { > -- > 2.27.0