From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0071.outbound.protection.outlook.com [104.47.40.71]) by dpdk.org (Postfix) with ESMTP id 91A431B207 for ; Wed, 10 Oct 2018 07:38:38 +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=/kja1/TWuLOjgJONEaCCDuET5ihrTCB4cumnnAWJbPo=; b=LKL01jTCTvEJhPbsYc+3BtLdz6LYBh9vFNabIKTGqLebOJRSxh/6359LAmPeG8BGgLSWGf5PaEzv1MXgdCefD9kic8k2YXCRE0onLmgNJ8OBvlLjhf0TARYbxPkedihVNL2FnduwWjd1mVlRzoNA0Tmy+PKGjKWxyVrcvuRe+vw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from [10.88.100.222] (115.113.156.2) by DM6PR07MB4908.namprd07.prod.outlook.com (2603:10b6:5:a3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.27; Wed, 10 Oct 2018 05:38:32 +0000 To: Thomas Monjalon , "Trahe, Fiona" Cc: "dev@dpdk.org" , Akhil Goyal , Anoob Joseph , "De Lara Guarch, Pablo" , Murthy NSSR , Jerin Jacob , Narayana Prasad , Ankur Dwivedi , Nithin Dabilpuram , Ragothaman Jayaraman , Srisivasubramanian S , Tejasree Kondoj References: <1528476325-15585-1-git-send-email-anoob.joseph@caviumnetworks.com> <46633655.Q4LKdWAF6e@xps> <348A99DA5F5B7549AA880327E580B43589645898@IRSMSX101.ger.corp.intel.com> <30793843.hyrbbjGcfd@xps> From: "Joseph, Anoob" Message-ID: <659e0e2f-8f6f-f76b-e248-1da846ebb2b7@caviumnetworks.com> Date: Wed, 10 Oct 2018 11:09:43 +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: <30793843.hyrbbjGcfd@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: BMXPR01CA0035.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::21) To DM6PR07MB4908.namprd07.prod.outlook.com (2603:10b6:5:a3::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b9d796c4-74c8-4744-2ed1-08d62e72a03e X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB4908; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4908; 3:0goJK0VQz+qYjbSJfhcY5U15dclJDJgE0+TJfgs7B62mhBGK1WbxOruPYDG3LjwMOjUpW31ZM6Oe4hXePbR8tdLJ35om+Z3ECxwLnc/ixD/LN/4RLG8w3YC6uPyXSkGh61RbVnJNLtWu79HbPGov6pAJvJFqC16SoZ99e4+sar8WCN/vh37pE7D445CAZ2KZA1xzqRX7E5ZRHtc5ZpuY6Rz8wFlMoRod749aLefOZFtHnOkgg/n8YQQw/BIPtHwR; 25:tjde2SKDwugpMsTgOSZh4GmAf4iTsSLfMePfxGQ3lQgV5wA3Ucu3U9lzf51SPdYabwFYIa0bjaMKFa8KU1Wp2byV50yymurPe2L8dPOYgkCuaimETeLHds2rOyi3kw+mQ10iYErEwxgP8ZDA4vI1GYrdCCN5qoykeGUASjE2OT41Xh16cZ8ry+xkPaN4OR0se57g/BtHP3/Qp9dKbxuOKuETd0I5iSESNmBz9Cs4Ch5fs+Iy5gU7U8dvakrERmMgfQQEWevIvxiDNySAXaeCndad6/6eu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PLdkIZ1FTngVDDbj3ObSLPQ6k8FiNhoxZzE+vB3MkOVHMPMePO6iQOUFYPy+hXOKmkf5qv/ecHp+IV7hd88Je9RrM+Q4qUhoqSB5lt3qqONLSx8Qtt53y0OI/VHGIj5ukmE79clMNOW56IXGayeG/paTDvfyZ1hqhF7dtStqD26E6czNJwDf8O1FLFZEPYwXA== 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)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201708071742011)(7699051); SRVR:DM6PR07MB4908; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB4908; X-Forefront-PRVS: 08213D42D3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(376002)(396003)(39860400002)(346002)(136003)(366004)(199004)(189003)(229853002)(25786009)(3260700006)(446003)(6246003)(6666003)(53936002)(6116002)(97736004)(230700001)(8936002)(16526019)(36756003)(107886003)(3846002)(50466002)(486006)(81166006)(5660300001)(186003)(4326008)(2616005)(77096007)(956004)(8676002)(26005)(52116002)(93886005)(54906003)(65826007)(110136005)(11346002)(478600001)(476003)(67846002)(31686004)(42882007)(81156014)(16576012)(23676004)(52146003)(47776003)(386003)(53546011)(106356001)(72206003)(105586002)(58126008)(31696002)(2906002)(64126003)(76176011)(14444005)(316002)(66066001)(305945005)(2486003)(68736007)(65806001)(55236004)(6486002)(7736002)(65956001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB4908; H:[10.88.100.222]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Di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TKSMYPh+CmZuBVWR1oH+ZN5PA6+20BQW2goITkF7RD/sLdhEgZbYlz7irVXzY/KQjIJRGAIqXKRLQJCaR/xZtQI3p21YLBtrMbQtgZopzn27wreSHqfwPa8Fsh+dGnwoI3m43TMoDCZQuyR1Y1UWwL0+PaXlw+tvCOast7SHedMw2ckwtZBDJiBBFC6mm4IcyPsA2xtcB5xCZTj7vebsG9nXjHU40jLP2emffLgfv1zMKF+VRZWHZrKBV1W9S1ta3F712zVrEA==; 5:dKuwiCC7kvVpchJfmRFUBCfv+/WTVyDPQM1cox7tpjads+hBaVYDpoMJS5K6pBgGn4eWSz1VeE1OEpKcwKjszsSEgL/eysZ2vLveQiAqOVu1+SS/fr2ojQ6RVTV/WaZUlEiog1/H7WrIjZ5ABRDpA9zdfb/vmzn80jIuXK+Fk0w=; 7:aVMVKdjFInu8/QTnb5oRXiHn9ZsBf8deNVya8+fD7w4e0CKJqrfUFdD5mmb0CVgQLHaHPNEfKGpH/hI6ucCJKj/oGMDj8IfiWGmR5AmiWdlC1IvEr8spfcOSOHXNRPIlu39A3ryIGhl4SZ1iNsJ4x8kA4CTNkVJxdx1wyXV0ZQaHuB2g6Jszd1hPeBNB5riyVvJXVy6wXFSV0XNlf4JQXGNA1Wbtk37zzvuga09/tcALsNqRt099AWc93jkVaLux SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2018 05:38:32.8833 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b9d796c4-74c8-4744-2ed1-08d62e72a03e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB4908 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: Wed, 10 Oct 2018 05:38:39 -0000 Hi Fiona, We were following the QAT approach for defining the capabilities. OCTEON TX crypto PMD has similar number of capabilities and QAT was the close model that we could follow. I can see the advantages of the macro approach, but that would give a checkpatch warning. Also, Thomas didn't really like the idea of having long macros. So we have fixed it in the upstream code. I would like to understand what would be your approach when you add asymmetric support. We are also adding asymmetric support and would like to understand how you would be adding, while supporting devices with varying capability. Thanks, Anoob On 09-10-2018 01:57, Thomas Monjalon wrote: > External Email > > 08/10/2018 17:59, Trahe, Fiona: >> Hi Akhil, Joseph, Thomas, >> Just spotted this now. >> See below. >> >> From: Thomas Monjalon [mailto:thomas@monjalon.net] >>> 24/09/2018 13:36, Joseph, Anoob: >>>> 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? >>> I think we should avoid adding some code in a .h file. >>> And it is even worst when using macros. >>> >>> I suggest defining the capabilities in a .c file. >>> If you don't want to bloat the main .c file, you can create a function >>> defined in another .c file. >>> >> I can't remember all the variations we tried, but there were a few. >> I think the macro works well in this case. >> What is the issue we need to solve? > It is a discussion about best practice. > My answer is: avoid long macros and avoid instructions in .h file. > > >