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 81EF2A0C49; Tue, 20 Jul 2021 10:49:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 533834068F; Tue, 20 Jul 2021 10:49:41 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2069.outbound.protection.outlook.com [40.107.92.69]) by mails.dpdk.org (Postfix) with ESMTP id B71674068B for ; Tue, 20 Jul 2021 10:49:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T+Kh+x3FAjQsXDrOBX/5ibAcv+uLHHiEGyBjpW0cr2jq4icRbJ5nnDfzGv5BqsnxCX3kYn4JAS5z9rKJZi5HUQ8u8/oNDnN8zw6nFHnP2yjA3UMlJPZN3YjMYp1CqPo023cNaDn65JbQ4hcAnvLtTtRsBPutm377sE7EPi31CrZCkOUQepZdV7Y7wXe2mylwDaPQcaGKOUeK1xEx91TTxykUZo74E1V7g4LlDf8hsdWtxzdmMIqigSYYldz13E+PNRo6a1W/dqKXam287+kihHyzmb3eebmy4ulzIgP7GZaPuJGheKc0KF/6s/Ji1kY7K0na7QZNxJWNp6xOptNVwg== 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=VW88fgfU5y7DHWcWf49PdW+CJTf5uS2Co0905z/gv2Q=; b=Utq7gBmdec8KWVxF657UNUg8LVq3OPPd4cJm3UMeQj3ICpKV7MjrTibqW0XmOEhIAQMaN3CbY9k3nryTwuBFmavmKsp67jGeS7bhyl9ObsumLY8TOsDKqgneqUZR8Dwjo6+IuCrCGElFgY6uYBCDsr4lMuZPl0YE146WGUj4rG34XX1/sjZXmkNJ+WLIZqCI1y0YcT5TPpPPQNZdNInd3SFLJeLBOlhU105P/TCYZPXri7zxJIVc39BZ6PQonoG5W9Ym0tO3zWaRpGEWoXL3dQutVVJ+/OAEQvqHv85uxzBoVqvBss7r3HBJM8GGlYf+H4yyDQIrwFlW+ZtlEg53kw== 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=VW88fgfU5y7DHWcWf49PdW+CJTf5uS2Co0905z/gv2Q=; b=Y9mIWAWqsGAkY1M8+6aCvpmTia8d1iBZmqjx1t3geIUGzhPM5CMnK0Xb6aU3eWMeYhDDtTLdNA04mV59a38cB4U2OdT9GHdc6ROp0V5TDh7pVftXGXWWRME830AJVEcR/eg2Y/MKtNIaPcQnLs81xT09FzLp2xB+EyhAun/0KK53YgChNd7tzpR6UtxDmjYEkKQ/FcPdq40yZSFPxhU8TuhI24KnFIHlFhnJjA+z++okLTVNwEhEKrPQAjwNAU2ys7dkwsysX2a0Ewec/L/hNBvy/9sJt664JZuhij7SD0SG/2gV1CvmWs4L7K/JTKw8kXyWkhgAH8BcU2j7Jqe7gQ== Received: from CO6PR12MB5396.namprd12.prod.outlook.com (2603:10b6:303:139::8) by CO6PR12MB5475.namprd12.prod.outlook.com (2603:10b6:5:354::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.24; Tue, 20 Jul 2021 08:49:38 +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:49:38 +0000 From: Suanming Mou To: Akhil Goyal , 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: AQHXeZhda1vufH/Cp0uVd8xWGlUr/atF/bMAgAWRJbCAAAKEAIAAALtg Date: Tue, 20 Jul 2021 08:49:37 +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: 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: 9497c689-94bf-4704-15ce-08d94b5b4e78 x-ms-traffictypediagnostic: CO6PR12MB5475: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V9qm5cpowvvaCw1DkdTPlK5ZWmpA9SSAl3/HDKdEYrEuBHGTynPd/LdJZAjay7MGD43b9/vUsr00gszVgMjGsdHYYviL2uaYO2p/BJiS2JfCvxdkPTyqVEAjsSunZ/R2DQk2hmArkGn/49gCF+9TKaqRCozHQdyedmr5Gx4Ka8PKxgy+7ePEn9yHUew4UvvDc4nYHVM3a2o/BwYMtBBg1Zq36lgos4DMMWDCmNgkF+xfFwynktAug/I24LgWOjIJYBsi51Tby5H9qKy3iq81zFniGFf1oNh+bbZbzEh5VT5AnyFymsx77Lg0JmB3S/f2Yr63sTbEOUTutaLkzFJTFq2t94HOPZikh1Un141nb5iRl6jmc5oQJtXobWn3eXpE2wyfax9A1e1sC/a8cvbDohGNERw26Qa81GzELCYBOjp8dWHASrU6hzfXrcg3MH/cjVaXyEK/ES/TTsrJ6dtCx40yDKn35H+pZhqQrfsRweac4iR1I3VTLcrPdDibRh79kNNwGQhpehuALLmW9bfy7YedNIhCmJREXE2jKIER4pyclEBby6311XQgbtFY3uOoryidy5+7V0QZBa3YXysM0D0R5vNaCb4R6bvcAv5HUSjIH6CZlBGE6YlSRAeay/LIKAf/LTHZLFwQnVIr4pVVLrKHFgUfuadfWIdVp1TOV7HnsH7n+Cl+hxpzVt9KXuIg9AcnZc5MthL37zAG2ydqGA== 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)(396003)(346002)(136003)(366004)(39860400002)(376002)(186003)(9686003)(33656002)(316002)(66556008)(64756008)(76116006)(66946007)(66476007)(53546011)(66446008)(8936002)(55016002)(54906003)(478600001)(122000001)(8676002)(71200400001)(52536014)(38100700002)(4326008)(110136005)(6506007)(7696005)(83380400001)(86362001)(5660300002)(26005)(2906002)(38070700004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hE8z1jsdldNEM8LekI09WNuUWpS4R1twns6i0ramxA1Zqf23MBXw/UeGHtFo?= =?us-ascii?Q?pP28/R42LQB8sW30Vgs3aTwHbaY+HNqUVEXc2zO2FV9rFSnugDC/ewF/joAC?= =?us-ascii?Q?9U2OHIo81XKqTjAoDM8bs6xcC+/+/k14WjCW6DdcIGUejQFE/ajV4mPtpLAG?= =?us-ascii?Q?eJqejX1HCbq1+m7JD5hb1YymitI98+Q9XY9LcVs41k3xMvIw9yoW2lcxQ4Wc?= =?us-ascii?Q?ffO2gUJfoI3ioWGokUrPmYLZHL7wabANOBcHXoM2ZYrANrG8EZlGw4Sg5avL?= =?us-ascii?Q?tf/AIZxP0I1DAQHGt5i66G4a5L0ZpZ9JtAe/f5b8BHAYaahxjjChuM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wy04yWN6Vs+zfuTm+6zGZj0BtTRn?= =?us-ascii?Q?+pqwptmXrPR9IcqpTZtSxTRdsM8K9+L4OhsR2iweiBDZW1PrXlkRzvfQQvWD?= =?us-ascii?Q?f43dvegErDwATtxhtDBUyeCI?= 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: 9497c689-94bf-4704-15ce-08d94b5b4e78 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2021 08:49:37.9120 (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: lAabCR7lNRYaPo2ayKhdyBKRKaSVQn+by6EF4s3tAikAP3VyZlygAkh1jPVKQrtuBkpvwkGkRjgT1X/9D1U8cg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5475 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" > -----Original Message----- > From: Akhil Goyal > Sent: Tuesday, July 20, 2021 4:36 PM > To: Suanming Mou ; Shiri Kuzin ; > dev@dpdk.org > Cc: Matan Azrad ; david.marchand@redhat.com > Subject: RE: [EXT] [PATCH v8 02/16] crypto/mlx5: add DEK object managemen= t >=20 > > > > 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. > > > > 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. > > > Is it not good to add these headers to mlx5_crypto.h in the first place? As we can see the single c file satisfied everything in the first patch, ad= d an extra h file with only with includes seems weird in the first patch. Then in this patch, we have two c file, we adjust the includes to the new s= hared h file. Everything is changed based on the new added codes. Please let us know if you insist on that or not.