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 C442DA0C49; Tue, 20 Jul 2021 10:31:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60F9E4068F; Tue, 20 Jul 2021 10:31:24 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2057.outbound.protection.outlook.com [40.107.237.57]) by mails.dpdk.org (Postfix) with ESMTP id EC3984068B for ; Tue, 20 Jul 2021 10:31:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fif2/0wjIhdPtn0uWkFKssvlcEVRPP2y22DJu52fwJYgzZPhyMrH/p1FOpU22M+8pAOAzKF9X493cl1IegPGv2N4V2DHuuAfKRzbzwkTTYnOwu4aAPdTN6JHjqjoAIMfPZRl3lJ6Bc6nVqOPtq/pOP1r5JalMmQvFN/CURf8gu4ayVXvBHM7bt1oZvItBTETtuO+D68/pNZ7iP5enHqrO0uJ8oGGllnrwoGdPVvbU3GHdErd3qa9FB/U2tYk5KmratXVxQHekU7U8YyLgFEpB9xj7RJ0xT0n1fVQ7F6cmn5yp4CNNOVk+lZaGPa807jdc/kKQZ38r0pIvYZE0xHWvQ== 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=H5vATO2xM1+lbUerlapYoUCMV04GEzd1V6gSSGJWdME=; b=DKZN01I79SxwIsza2U1aZyU+jJ6A2/nDMkvPmJ9cZMvKdtkLsmPoFGz4dL6Sr3VB3+gI8lFW4UGtXQaeBi/g1g/NVWMGRZU4koc3ZUXXV4sxz3dYDSPO7W0IyA4NOqRfc8Jfw8QdapwzqtfqFXrkZN7Sa40lOta8INiWA7G/UUxWsRQdLk6EbvZK9zdMGGzFNBtouccJJlUAHjnpYKqdjHg28cXwqcoxHPdJVArvXZjc7N/SkRDkl1Ujmu8QwZUP8O3PjJnAwS7Kbs+y+WK08GZJxtEQ/xZ6E/ROOC7veAe//HsCdB2o41sNnHhwGzoM61EfoWm31oDB1o7RtWeQVA== 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=H5vATO2xM1+lbUerlapYoUCMV04GEzd1V6gSSGJWdME=; b=LbQCW65A9j8kkb1yIbjcZtSkVgPXEuYMm/zWO9/Uj5UP+IkBbxJBOiN9finM/cWiJTjNk05259H9g5lZ2AJDefHUEIW6fSNOPI1WG6OPS85euse9/49UdC+sNJMolshKlwpG9jz8nkQalT0tNZ/y+HKE+pl2MbRG4XoPYbZlJJr1MUxO0W0JnWK2rAELzwuw9BWGUF6Nsk9XLpeE+ytkKCNLyPonrOpZpflXaAwKCh6mqZvxRokouwGOUpX/CCIviDBFm3n1ftg/9ju7tOpHsDrIxmqrVkRhHaxbO2UbvpbC/FLk434TNQQoe4knqcF7hr4CVwjazLgVyhNNlvW83A== Received: from CO6PR12MB5396.namprd12.prod.outlook.com (2603:10b6:303:139::8) by CO6PR12MB5395.namprd12.prod.outlook.com (2603:10b6:303:13a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.22; Tue, 20 Jul 2021 08:31:20 +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:31:20 +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/bMAgAWRJbA= Date: Tue, 20 Jul 2021 08:31:20 +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: 35173f01-454d-43f6-4f8d-08d94b58c00e x-ms-traffictypediagnostic: CO6PR12MB5395: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1265; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8LaM0efcZTs9/R7TNLRJXWuKaOYaVGf/ROD04Ps5qJMvRBYbUxLs7FTlY6lzZZzp+7S1YMIuDLWN8PBstHI2RuGQ7RqXMRIGte3dx6PFdEaBQGvRHZ8g3WG8QJbQnzTQyA6nkzAVlLrrlvcUt8x9ySyV8b/y0dwhopaTnQtZ0BZrl+IUQo0PjGHnOszw1eLbO50Te9PczVZ8/U+uIytjq/+5dE+bHjVCF4zH+ymZ1e8UJ/LhttDjtrUnLS7SAACrkMPcChXGCi7K7RCNgNZ+S4MUIlHadf8xftjlKlkkel+q8dl67BtZ3TzyGiQMVPX/sXS8uIKHLkwJ8AFe76hBy24q71pkcFnww3I2KGSmvBTsL6cfwEHnpMhuqnCyfbNe6W5Pe7eH/JAm+1py7Q8o+tULbcUds4D64kZ+/2t8tlQDH+l4KJb0IAqce8Pic8mWPw2kZFeYs5V9fMS792bdeMHzXSme9d1/xYXZv7dA1nz1EbQlqfASrgpWozPNl0d4VCBox4L5CpoTUUgnFwBeKM3T0MjChsa0QFxauSs5nnKFJGGwSmC9NwyCauX8raJJCHvo9mMXdQD72SqRR1jZmxpm4UjFxxG7GTUNPX3oxUS04mRo47abdkrvjit5ywCsNF5RRhYMTnuICK5HymFk6s/mT3JS68uiLZItkzdpt6+d3afxqu5Cw9C9p+uZlaxEErNcC7agh1RwWRpSqv2ZXg== 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)(346002)(366004)(136003)(376002)(396003)(478600001)(38100700002)(186003)(33656002)(110136005)(83380400001)(2906002)(122000001)(5660300002)(86362001)(54906003)(71200400001)(8676002)(8936002)(52536014)(26005)(9686003)(66446008)(316002)(66946007)(76116006)(4326008)(53546011)(66476007)(66556008)(7696005)(64756008)(55016002)(6506007)(38070700004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?OEqbqxs2QvHdkqpmKETFrwRostDefIpH9SlbZ+eJ6vIb3b3jw0wx3uz7wG7l?= =?us-ascii?Q?4jOqvfczDdLS29CBs+kYuyxp94Q2qM2HUXcTat2yF4glkD4xnvkKpAQc7qr/?= =?us-ascii?Q?GY+RsTpHVQvAM+JZowNVNz9G9lBVlyXywtJ4iEM1gp3RiZe424dWKQVFTnSW?= =?us-ascii?Q?rt4fu5t5YwNU5J+XeuGsIwpclzH6ing+XwLnSN0ig9oIGDvYuwohUG6dwh9h?= =?us-ascii?Q?f+Fa7GubfQn2AtquWApzyENhfqDfIqj7PBgKBuKoucys+wGS7NFbRCC4fY6b?= =?us-ascii?Q?iYjOzm0WKwf8N4KzY4EWTzALunzlARFKiU3EQbEr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QuY52QBr6Fs1CVR8D20uPB+j+canrxkq8yqzfISfka3KvXDI?= =?us-ascii?Q?cumgwP16DdWZienMrFBaLkK9wuyv+NPOLLcs+WudouRTsfioXu1jluE+FNBr?= =?us-ascii?Q?zCWZr94yERUgQMA1UHj+AmFY?= 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: 35173f01-454d-43f6-4f8d-08d94b58c00e X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2021 08:31:20.0287 (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: Fsk+brLmV8kqCHmzTlYkmYwAwH93MpzPLFWGiPJVmkHurSzyN5p55HV01LIvYm5N5U1DIn9Etsb0xzxII9GJ3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5395 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: Saturday, July 17, 2021 3:26 AM > To: Shiri Kuzin ; dev@dpdk.org > Cc: Matan Azrad ; Suanming Mou > ; 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 >=20 > There is some issue in the splitting of the patches, The above headers ar= e 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/ml= x5/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 > >