From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM05-DM3-obe.outbound.protection.outlook.com (mail-eopbgr730059.outbound.protection.outlook.com [40.107.73.59]) by dpdk.org (Postfix) with ESMTP id 57EFD2B8C for ; Mon, 24 Sep 2018 13:38:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qpw9oMsAq/EgZxd/asQ6xyhl85UCbARV0ajNgFc6bLI=; b=WDFdTcNucbD+nlojtDyL3CcTAmnsBnoP47MrfdIk23Tjr2tJ5YkTsXxh+FydNaUO/7fktGZl3YblqBg+AC7U6E1YF1Rgk7GHSjn8z88a8/cy1qGJot7i5YDA5T6x02H04/jCav5F/b+oSL1xoJPuAUkL9DpF0JhFJZC5eku/p4Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from [10.88.100.222] (115.113.156.2) by BYAPR07MB4904.namprd07.prod.outlook.com (2603:10b6:a02:ef::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Mon, 24 Sep 2018 11:35:53 +0000 From: "Joseph, Anoob" To: Fiona Trahe Cc: Akhil Goyal , Anoob Joseph , Pablo de Lara , Thomas Monjalon , Murthy NSSR , Jerin Jacob , Narayana Prasad , dev@dpdk.org, Ankur Dwivedi , Nithin Dabilpuram , Ragothaman Jayaraman , Srisivasubramanian S , Tejasree Kondoj References: <1528476325-15585-1-git-send-email-anoob.joseph@caviumnetworks.com> <1536033560-21541-1-git-send-email-ajoseph@caviumnetworks.com> <1536033560-21541-10-git-send-email-ajoseph@caviumnetworks.com> <0b2cecb1-f055-61d6-3c10-802d0d647b96@nxp.com> <21787cc6-1151-53e9-a86b-aa008b421fb1@caviumnetworks.com> Message-ID: Date: Mon, 24 Sep 2018 17:06:54 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <21787cc6-1151-53e9-a86b-aa008b421fb1@caviumnetworks.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: MA1PR0101CA0042.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::28) To BYAPR07MB4904.namprd07.prod.outlook.com (2603:10b6:a02:ef::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3d80d2dc-9830-46ee-58ca-08d62211e56a X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4904; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4904; 3:7ocSepw4w7UvLI7eYj53YIy7p2MRxWjt1r6kHTKXgsnhRKaQug1d875dmbOa/QUgdAGuajamwchx6Q0G/00iNxZHJyacu3+M2k2Ystajuk4r2sRWvpgum0Up/wP7kFG1o9fgEsyjDRVrSHoO7qN34OQefYsjILGD9C6BjpvbaoBVWsyJwkV+P7V+U5dxewlqWAxBZ/NybVnabpgEYAkmlCSWOXBN3QhEWKrMfUYJOikA8fujeAxsHjK1TtVoF38H; 25:feMvtm9gCLJQUoFi5o+VzKKCuF5Ma180l0J53ueJQLaCGwIpP/4wz28QJ3Si3yKYBS0ulKxtFfVfGQyBypqu1Bm0MZRXmAiQgLYtlYw+m0ngdDn9zH7sX3iIWQEQ76p3F2OkayYKmcvESFkpjtFAr5Pyh4qrRDDhDZL5z4/DNsGvOPSfj+NOW3/pA9QLgZRP1US0gkMOIC3iFVCPhyv++diI4zKPF5gsefoP9c0gitnI6T5J7uzkwz2WytoEUTK9vGAtd5sScC6lQpVqv/LQwYQxhDmk8txAbE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S+9n9fp3D4b94HO74qZcya6xhy0XdPLpqCLs5xe+yYZfPSZoVW9tJfmfUgXceNs4ur8xh8he0+0XYLZ+BgdVcZIfmVMbF5UdjNQyrD8C1zZuYrIPaKFJ1oqMtkPUxa2XSHpNhS/FUO3B5Olb3iMjH6gSKDRlWl2w3UOdIFHVvUx6udSctIQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231355)(944501410)(52105095)(149066)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051); SRVR:BYAPR07MB4904; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4904; X-Forefront-PRVS: 0805EC9467 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(39860400002)(366004)(396003)(346002)(376002)(136003)(189003)(199004)(11346002)(8936002)(53546011)(52116002)(6486002)(305945005)(76176011)(476003)(66066001)(65806001)(58126008)(31696002)(316002)(67846002)(47776003)(478600001)(14444005)(54906003)(81166006)(386003)(97736004)(93886005)(3846002)(6116002)(50466002)(8676002)(77096007)(107886003)(6916009)(16526019)(65826007)(6246003)(2870700001)(6306002)(2906002)(65956001)(7736002)(229853002)(68736007)(5660300001)(53936002)(26005)(64126003)(3260700006)(966005)(106356001)(42882007)(72206003)(105586002)(2616005)(16576012)(36756003)(4326008)(52146003)(2486003)(446003)(81156014)(31686004)(486006)(25786009)(23676004)(956004); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4904; H:[10.88.100.222]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?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NzsSvwTE6kikVqBHVBkSZ+AQLTAnJXuphkbGeUaQRO+B7+Bm/UKdwgvBNsfbOseJ7lNEJPTG/7ciwQM47Bk7mrE1vlGYP5TCh9CcMTmX4hrd/UGbaan/kJxUXWL9xZDT13P15gcnTd0NZLaNkUHNb2RSS1yapamu/vPPXCIf2mD3+YjQ+ZA0yeWss2aJQt6HhkYCfWOWrTIl/qW+/F4eQ==; 5:dMfiCj2tjhxH1Gr64FU6lJRsYR+FLil3t5FimDMbpjllhZig5AX8VEEn2iMrUQcvMD5hq40R3T1ybmHdtEO1AQMjktgGYen1AdUHkCjR+Plc3M8hXZjxEPAhTd5AwK+avACdtAVnICrurKrdnx3RC8M3v2nl+pjkHU0+KQyo+aw=; 7:bSw3ZGIwiYo1NgGZaizqXNkBRWGQlEP9D0orWr9hB11ULkK0qr7jNwMWS9AjAUDJmzrH4dbSQJwVif+h7VVpAwq69Mflw7BZXiadQmvJYBJBF7IsmCYz9ulUdbFM0/LOogdoDwr6XE+MAcbpM4HfcMb508S9+GmBIJzbKBaCUkz1FQ2QeFtVye89+XPyg4fQu9f9yypQbxPO0eZeRKNzc4zBgaX4CkBZADxsR/O6hf9Pa6O7pgjyTn+zX02ZJnTQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2018 11:35:53.6681 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3d80d2dc-9830-46ee-58ca-08d62211e56a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4904 Subject: Re: [dpdk-dev] [PATCH v2 09/33] crypto/octeontx: adds symmetric capabilities X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2018 11:38:33 -0000 Hi Fiona, Can you please comment on this? We are adding all capabilities of octeontx-crypto PMD as a macro in otx_cryptodev_capabilites.h file and then we are using it from otx_cryptodev_ops.c. This is the approach followed by QAT crypto PMD. As per my understanding, this is to ensure that cryptodev_ops file remains simple. For other PMDs with fewer number of capabilities, the structure can be populated in the .c file itself without the size of the file coming into the picture. But this would cause checkpatch to report error. Akhil's suggestion is to move the entire definition to a header and include it from the .c file. I believe, the QAT approach was to avoid variable definition in the header. What do you think would be a better approach here? Thanks, Anoob On 17-09-2018 18:05, Joseph, Anoob wrote: > Hi Akhil, > > On 17-09-2018 17:31, Akhil Goyal wrote: >> External Email >> >>> diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c >>> b/drivers/crypto/octeontx/otx_cryptodev_ops.c >>> index d25f9c1..cc0030e 100644 >>> --- a/drivers/crypto/octeontx/otx_cryptodev_ops.c >>> +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c >>> @@ -10,9 +10,15 @@ >>>   #include "cpt_pmd_logs.h" >>> >>>   #include "otx_cryptodev.h" >>> +#include "otx_cryptodev_capabilities.h" >>>   #include "otx_cryptodev_hw_access.h" >>>   #include "otx_cryptodev_ops.h" >>> >>> +static const struct rte_cryptodev_capabilities otx_capabilities[] = { >>> +     OTX_SYM_CAPABILITIES, >>> +     RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() >>> +}; >>> + >> >> better to have otx_capabilities structure defined in the >> otx_cryptodev_capabilities.h >> >> I don't see any value addition of creating a macro in one file using >> in a separate structure in another file >> >> which doesn't have anything new in that structure. It would also give >> checkpatch error. >> >> You can directly have a capability structure without the #define. > This was the convention followed in qat driver. > > https://git.dpdk.org/dpdk/tree/drivers/crypto/qat/qat_sym_capabilities.h > > I guess it was to avoid variable definition in header. May be Pablo > too can comment on this. I'll make the change accordingly. > > Thanks, > Anoob >