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 B276AA0C49; Tue, 20 Jul 2021 10:36:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 778184068F; Tue, 20 Jul 2021 10:36:10 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 8C9594068B for ; Tue, 20 Jul 2021 10:36:08 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16K8Vsnf017028; Tue, 20 Jul 2021 01:36:08 -0700 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2105.outbound.protection.outlook.com [104.47.58.105]) by mx0b-0016f401.pphosted.com with ESMTP id 39vytqdfdw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Jul 2021 01:36:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ki6Ag/WqHcKOoTDySJa5ADy8C/NHhHOdoE6n/naj0nI3eYc2KhsIiFdnaQP2HKzM0+VAU9HTFk8cBIi6NJhMHTjiYAk1uH914Fbu/9vCz9eh7n9uLqqasfrrG08HldQgRiApR2PHV5FhmXxDdgNhIfHcigh+yplz7f3mHZmGUttGRcl6FUFoqMVEFxXfCfU1i57FOag4bJ8pyIyqIJ/7AOSxpWoR+uqM8hFVVLKUcqMFYt7uurEqBS84ju75Yae9d49E1YGnI2Rdm5B73+Pxd5PZFanFEBtTCE2x9BlBKSUwEHGAbbpL/2k5G2CejDoZVgnypnT5xCAfJUkYPa9yZw== 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=ZoUt4wQEG54WdTXvotiJhsXmJTy6Eku9zn76FLBadJk=; b=eNvUQrD2V1faf7pnacdtu4e8wEd+1GGTPMSIFwBj03ohMUcudMwiS/8o0Zz5bjotLbrPLa4Mq0QyiML/jPp/qRnuqwnnYWMicPJ1LS6NbN9IHhRnPvo7o0aiXCHnnppNponAmjO6wyFYIvh/GUvg/UE9GiXjIvruHKAf9PyIxNzSTiwkV2uobLgv5pzTqTLrhEOW6EARnzbHhXW3gZOZNKCn2h4XSYzFoU1HaBnlgzgTqA+2RWiyqORkvm0Z4cPizj1nec2QNV+mlHyk8nKbtJrZNqKv4rkw2jckuOCA5Rrtdv544nYGNhKtC+aCsf/JeZ9E/lOrytrOsxVq8Z0oiQ== 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=ZoUt4wQEG54WdTXvotiJhsXmJTy6Eku9zn76FLBadJk=; b=DcRIrJuMkaNR1PSsW5VRt2+zCruAGLe9tHupa1ImwvZwvmkNjmcXQHBVV/k9WhGFIhvwCP4FdWeJKbD+2smipKJBo5yGsnxLiT27vOBaGyFLBhR2cZYCiMtCwQ5s9ka0+h3HMMiaB/dtYu5U5CZeZNfQhHDTsw9POBcPcfTUi7Q= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO1PR18MB4556.namprd18.prod.outlook.com (2603:10b6:303:ff::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Tue, 20 Jul 2021 08:36:05 +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.034; Tue, 20 Jul 2021 08:36:05 +0000 From: Akhil Goyal To: Suanming Mou , Shiri Kuzin , "dev@dpdk.org" CC: Matan Azrad , "david.marchand@redhat.com" Thread-Topic: [EXT] [PATCH v8 02/16] crypto/mlx5: add DEK object management Thread-Index: AQHXeZhaMdCELImi8ki1pN4sYTFFgKtF/HPQgAWTlwCAAAEOoA== Date: Tue, 20 Jul 2021 08:36:04 +0000 Message-ID: References: <20210715150817.51485-1-shirik@nvidia.com> <20210715164126.54073-1-shirik@nvidia.com> <20210715164126.54073-3-shirik@nvidia.com> In-Reply-To: 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: 013e895c-8f93-40c0-6635-08d94b5969e6 x-ms-traffictypediagnostic: CO1PR18MB4556: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4303; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9g+u5b3eSjZQwzxRQGKb3K3ufhi9V7Ew5DcECMkpOJKQLEKNsQAY512yr3DYxEQLeg4S4crykIrQbM7SUbAjVYJqQTgn29jwwlenTe9d1R2CPcmEahXfD4EewTrvyQrwEpgzGlw3idEQ3ikOu5zy5Z4JMHzFdJcoFoE5Dr0o8HdspYQ4ZCFh3CzqL6Sy7F+h3DMY1orCTGDHt0pPeJhebYwebNWFLlVI3VNuL2jUomrkgwH52NASnkQ9otWBHtqaF3zTw57JSvH21x3SUHBqsEvIOzWleUY/qjyKK6ljKBLTBYigV3y0Nfl7f3+5s+jvjkABlYV4DFTOwJlN+M3fX2UPpvpF1zcPb8i4YsJSty4L1AmQzqhe69gkygG+iB3KRUecWuxSPsifiAhpaCQLkbqs/XhzX7nFbSNF2CqmWxi/8+2S5ifQ/QUqgMQezwq2DjAE9gbS91JqMvFbO/RoSWG3RYpeSt3l3glwat9dOY9UdyekdBGHEuGpUgSH4tqP4/C2wbrSJVpG2eTP/elHZT9o635efeTDWXoru3vJHWA7h8QIRTPYArauuOLZr2ow1y3nc0ipB1v33/4orzltLqgeFjFNnmO5/zsJ3nyOy60B5opULW4P0rXgz0MdByNx2mpXYQjr4Fg0woXHFa5IA8vpaZvo6hh+VLV7QMpkbC8/NzeuagkOgwWUdsGmN+VZwn2dx1M4q3/kb2YI0R/HYA== 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)(366004)(396003)(376002)(346002)(136003)(39860400002)(316002)(66556008)(76116006)(64756008)(66446008)(66476007)(66946007)(86362001)(5660300002)(52536014)(71200400001)(4326008)(6506007)(38100700002)(33656002)(8676002)(478600001)(7696005)(55016002)(9686003)(8936002)(110136005)(2906002)(122000001)(186003)(54906003)(55236004)(83380400001)(26005)(38070700004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/dSAExBtWcnoYxm+tJf4bmEfjW+RYTWVbhRBYHpVeELJuWem0mVHlAwXQa5+?= =?us-ascii?Q?wlwy8RF/0PNwo8qe23meE1BExxixnpORfekW2j3Bmzkkz5TyhB7Wi7P16KMO?= =?us-ascii?Q?wJNiNo/Q9FyKAfhR/TX6hjXAEq/4kU+Q7A3T7gRTDqfGHxMMTyP+Sw5Qte0d?= =?us-ascii?Q?MFJXgZ2vguLHHmShKAhvN2dIGA1HvJ2TQgfL5EavTBS/Cjo+GCERJraXms3Q?= =?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JinTg8h5wBv5Lovzv?= =?us-ascii?Q?aTcU1NUF3lOYkQFuI2rT4/mNC6+c69sHe8dM1o/NH5HuXtmJY61PQsHSsjTV?= =?us-ascii?Q?YPkNpa+5O4m7ujG3PE17yxsJteF2l0uf0i3DH73QGnVfnArJfxeuHSajkn67?= =?us-ascii?Q?FyscXN8z20qdL34Pne5/xDTTsJJQgP5IJN+PFwGoa1rufGK8glSeHxsdoKWW?= =?us-ascii?Q?LeyJKdv3u6JN0E2KJac+uGd4?= 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: 013e895c-8f93-40c0-6635-08d94b5969e6 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2021 08:36:04.9231 (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: w7jgEJ7BZ89OV2tTkCTTaUh2A78D3NsXVw7voHaYZwPwosGWOYLt3uaAirnmRlpWaVEIDT5M0D+VvgyRC9zHWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4556 X-Proofpoint-ORIG-GUID: Nh4R4WfgzeoAsuq5joK7dLi7vWGSmSz1 X-Proofpoint-GUID: Nh4R4WfgzeoAsuq5joK7dLi7vWGSmSz1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-20_04:2021-07-19, 2021-07-20 signatures=0 Subject: Re: [dpdk-dev] [EXT] [PATCH v8 02/16] crypto/mlx5: add DEK object management 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" > > > A DEK(Data encryption Key) is an mlx5 HW object which represents the > > > cipher algorithm key. > > > The DEKs are used during data encryption/decryption operations. > > > > > > In symmetric algorithms like AES-STS, we use the same DEK for both > > > encryption and decryption. > > > > > > Use the mlx5 hash-list tool to manage the DEK objects in the PMD. > > > > > > Provide the compare, create and destroy functions to manage DEKs in > > > hash-list and introduce an internal API to setup and unset the DEK > > > management and to prepare and destroy specific DEK object. > > > > > > The DEK hash-list will be created in dev_configure routine and > > > destroyed in dev_close routine. > > > > > > Signed-off-by: Shiri Kuzin > > > Acked-by: Matan Azrad > > > --- > > > drivers/crypto/mlx5/meson.build | 1 + > > > drivers/crypto/mlx5/mlx5_crypto.c | 42 ++++--- > > > drivers/crypto/mlx5/mlx5_crypto.h | 51 ++++++++ > > > drivers/crypto/mlx5/mlx5_crypto_dek.c | 161 > > > ++++++++++++++++++++++++++ > > > 4 files changed, 239 insertions(+), 16 deletions(-) create mode > > > 100644 drivers/crypto/mlx5/mlx5_crypto.h create mode 100644 > > > drivers/crypto/mlx5/mlx5_crypto_dek.c > > > > > > diff --git a/drivers/crypto/mlx5/meson.build > > > b/drivers/crypto/mlx5/meson.build index 6fd70bc477..d55cdbfe6f > 100644 > > > --- a/drivers/crypto/mlx5/meson.build > > > +++ b/drivers/crypto/mlx5/meson.build > > > @@ -11,6 +11,7 @@ fmt_name =3D 'mlx5_crypto' > > > deps +=3D ['common_mlx5', 'eal', 'cryptodev'] sources =3D files( > > > 'mlx5_crypto.c', > > > + 'mlx5_crypto_dek.c', > > > ) > > > cflags_options =3D [ > > > '-std=3Dc11', > > > diff --git a/drivers/crypto/mlx5/mlx5_crypto.c > > > b/drivers/crypto/mlx5/mlx5_crypto.c > > > index fbe3c21aae..d2d82c7b15 100644 > > > --- a/drivers/crypto/mlx5/mlx5_crypto.c > > > +++ b/drivers/crypto/mlx5/mlx5_crypto.c > > > @@ -3,12 +3,9 @@ > > > */ > > > > > > #include > > > -#include > > > #include > > > +#include > > > #include > > > -#include > > > -#include > > > -#include > > > > There is some issue in the splitting of the patches, The above headers = are > added > > in first patch and moved to a header file in this patch. > > Take reference of the cnxk crypto driver which got merged recently. >=20 > The main reason is that in the patch we add a new c file: > drivers/crypto/mlx5/mlx5_crypto_dek.c > Now mlx5_crypto.c and that new c file both share the new h file > mlx5_crypto.h, so all the common includes are moved to the mlx5_crypto.h > file. > The header files include are changed due to the new add codes. >=20 Is it not good to add these headers to mlx5_crypto.h in the first place?