From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0055.outbound.protection.outlook.com [104.47.42.55]) by dpdk.org (Postfix) with ESMTP id 7CDD11B1A0 for ; Tue, 19 Sep 2017 15:46:47 +0200 (CEST) Received: from BN3PR03CA0106.namprd03.prod.outlook.com (10.174.66.24) by BN6PR03MB2692.namprd03.prod.outlook.com (10.173.144.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Tue, 19 Sep 2017 13:46:43 +0000 Received: from BY2FFO11FD021.protection.gbl (2a01:111:f400:7c0c::177) by BN3PR03CA0106.outlook.office365.com (2603:10b6:400:4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.9 via Frontend Transport; Tue, 19 Sep 2017 13:46:43 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD021.mail.protection.outlook.com (10.1.15.210) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.35.14 via Frontend Transport; Tue, 19 Sep 2017 13:46:42 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8JDkdaF019070; Tue, 19 Sep 2017 06:46:40 -0700 To: Ferruh Yigit CC: , References: <20170823141213.25476-1-shreyansh.jain@nxp.com> <20170909112132.13936-1-shreyansh.jain@nxp.com> <20170909112132.13936-4-shreyansh.jain@nxp.com> <916531df-edb4-d0fe-cb86-32cedb6fc46a@intel.com> <690be1c8-67d1-31e0-b1dc-4b270b1f8519@nxp.com> <3bf46b37-6bcb-b6c5-62ea-5632f81f518a@intel.com> From: Shreyansh Jain Message-ID: Date: Tue, 19 Sep 2017 19:27:37 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <3bf46b37-6bcb-b6c5-62ea-5632f81f518a@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131503024027923829; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39380400002)(39860400002)(346002)(376002)(2980300002)(1110001)(1109001)(3190300001)(339900001)(57704003)(199003)(377454003)(189002)(24454002)(229853002)(105606002)(85426001)(53936002)(8936002)(33646002)(68736007)(31696002)(2950100002)(6916009)(81166006)(81156014)(8676002)(106466001)(2906002)(65806001)(86362001)(65956001)(50466002)(6246003)(4326008)(77096006)(53546010)(64126003)(47776003)(8656003)(36756003)(5660300001)(65826007)(230700001)(58126008)(97736004)(23676002)(356003)(104016004)(189998001)(316002)(83506001)(54906002)(498600001)(305945005)(31686004)(54356999)(76176999)(93886005)(6666003)(50986999)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2692; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD021; 1:ZOa386w78F50CxCsNXlMDBeAOxQBIljfkMUyVmoYRCzDncdH14HYIDhzGzSzsEjgoM58IpxIm6cNqMttZjeTjyiiWnF+h+o9LIbBhXfyfPquzjzHOsLd5JM92aqaMAhq X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d7d29975-4fc6-4d5f-ea75-08d4ff64dc76 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN6PR03MB2692; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2692; 3:nDaDc2yHGBJIGQPXDm14TJ4HWOg7As3PIa4YcDqm6N5jHnHihFZFWeGJg1LNxIWtfxR9Hxs5rpMnbAasFjGdu5oWc2a71sKsaKlv5DaMadPrGIr3bOjUnmZXoPA5p9r0/MN1r0VAed6jVsYJ2MGEeNlqsWh/6oaBpmn4ECkdk9p/lXhoCeuHARp/Wtj0ZAchl7YvTP8TIPie31lwv9Ece3D9wg/aH6x2mMdWJSZoh73XHIxDdR/BQR58W1okVU0mmXfMVJOcTsQwo3wR0oAd62f9TGeB6XsV+U/yR2bd+YnJO1zym8wkbv+PRukE3sEL6HxMz/VHI8kUfRMrObRK4YV1YapoqDT2T9Y2APD78zY=; 25:2SYeU3OQTQhNkdSNYzSjJhmwtJF3UVP8cG0BGMlaIjSmeNTSSwl6LhYd0xH7Y1ptDNm4QH8Wcjo0cEUqA2aQ2rUr3Izx7RSmeEb392882xTfhpTLsoBuj6hiK6x7s0pSK3srZugSJJ3BSRpfXVPffXoTKOr79eWPA+5kB3+zr1Z3ith5QzWEVM1IIkX916SiJMJyf7oTo6EnRZxc9Ntsi5cND8znVzzYxHsUN3aQPZ52w3IYHePZpbutmsN8GSGwPtZeVYjJvaXy+FlzWU8ITV/BaHYVClbby8SAgnA2ZxwW81f6pHJb0zMfaODc9GdNsd7e9cAipmvJr2W5Qafjsg== X-MS-TrafficTypeDiagnostic: BN6PR03MB2692: X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2692; 31:nF8je7H7K7/jlbYsyORT+kwCjgmUNuuH52BkKj/spoUvxaUO1mYh1mQw5EIB9ZgKW2yzVuKxyKAyNNVqpF552AGdH6HwTBZPD55lF+5UALo4cTHFNB7mMrWZvNtfIDLrsDFRezVR9bg2iL7oo/+oebwUj/udG7LObZ6pA2qTUJMzbs4bRSVG8PNdtZRrSmsM7QBAcRfZHcw1zPLwgChNjlAXOyBykCtwQVI8VzkZqCU=; 4:c/y2IBZw0iWcgNu5kaCmkdwmUbHf+dkd3ZDPM2ToSw48lv3bCot7/JzlWdWW+U3lLZUV79WtXFrA6e2gTGOSXsEwSkH7+bfx0KsO9dlSPjAsspPavJg+3GkIzhXXMw4vQC/jIPj4AEyDsFZuUawx42Cb91LwhCbeXh4xZcLC8hF3gz024mTDCgRKPUMW1abGcS4LfWmbzOzSvNS4/RULPCBMZ24Lod8zYJyEbQm8GplQEIjC+hKV2d6cH/jlLFEDtSxO+RAfN8CKs2IXznCPjdBDWS93Onqh0uskV6AOb+U= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123565025)(20161123561025)(20161123563025)(20161123556025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR03MB2692; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR03MB2692; X-Forefront-PRVS: 04359FAD81 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjAzTUIyNjkyOzIzOmZCR0FzWEVmZmUxRWFQQWJ1S3lDR0o1ZHox?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XDgxUPaIAsRP9GJlCuNuAnvvLzhOrQakNXqEs+QkY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2017 13:46:42.4335 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2692 Subject: Re: [dpdk-dev] [PATCH v4 03/41] bus/dpaa: add compatibility and helper macros 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: Tue, 19 Sep 2017 13:46:48 -0000 On Tuesday 19 September 2017 07:10 PM, Ferruh Yigit wrote: > On 9/19/2017 2:18 PM, Shreyansh Jain wrote: >> On Monday 18 September 2017 08:19 PM, Ferruh Yigit wrote: >>> On 9/9/2017 12:20 PM, Shreyansh Jain wrote: >>>> From: Hemant Agrawal >>>> >>>> Linked list, bit operations and compatibility macros. >>>> >>>> Signed-off-by: Geoff Thorpe >>>> Signed-off-by: Hemant Agrawal >>> >>> <...> >>> >>>> diff --git a/drivers/bus/dpaa/include/compat.h b/drivers/bus/dpaa/include/compat.h >>>> new file mode 100644 >>>> index 0000000..a1fd53e >>>> --- /dev/null >>>> +++ b/drivers/bus/dpaa/include/compat.h >>>> @@ -0,0 +1,389 @@ >>>> +/*- >>>> + * This file is provided under a dual BSD/GPLv2 license. When using or >>>> + * redistributing this file, you may do so under either license. >>> >>> The content of the file looks like for Linux, is the file coming from an >>> existing GPL license? If so, is it allowed to add BSD license to this? >>> >>>> + * >>>> + * BSD LICENSE >>>> + * >>>> + * Copyright 2011 Freescale Semiconductor, Inc. >>>> + * All rights reserved. >>>> + * >>>> + * Redistribution and use in source and binary forms, with or without >>>> + * modification, are permitted provided that the following conditions are met: >>>> + * * Redistributions of source code must retain the above copyright >>>> + * notice, this list of conditions and the following disclaimer. >>>> + * * Redistributions in binary form must reproduce the above copyright >>>> + * notice, this list of conditions and the following disclaimer in the >>>> + * documentation and/or other materials provided with the distribution. >>>> + * * Neither the name of the above-listed copyright holders nor the >>>> + * names of any contributors may be used to endorse or promote products >>>> + * derived from this software without specific prior written permission. >>>> + * >>>> + * GPL LICENSE SUMMARY >>>> + * >>>> + * ALTERNATIVELY, this software may be distributed under the terms of the >>>> + * GNU General Public License ("GPL") as published by the Free Software >>>> + * Foundation, either version 2 of that License or (at your option) any >>>> + * later version. >>>> + * >>>> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" >>>> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >>>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE >>>> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE >>>> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >>>> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >>>> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >>>> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >>>> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >>>> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE >>>> + * POSSIBILITY OF SUCH DAMAGE. >>>> + */ >>> > > <...> > >>>> + >>>> +#ifndef __DPAA_LIST_H >>>> +#define __DPAA_LIST_H >>>> + >>>> +/****************/ >>>> +/* Linked-lists */ >>>> +/****************/ >>> >>> Do we need to maintain a linked list implementation, why no just use >>> sys/queue.h ones as done many places in DPDK? >>> >>>> + >>>> +struct list_head { >>>> + struct list_head *prev; >>>> + struct list_head *next; >>>> +}; >>>> + >>> >>> <...> >>> >> >> The underlying DPAA infrastructure code is shared between kernel and >> userspace. That is why, changing the internal headers (for example, >> using RTE_* queues) is something I want to avoid until absolutely >> necessary. The outer layers (drivers/*/dpaa/) are something I am >> trying to keep as close to possible to DPDK. > > I understand you want to escape from maintaining a copy of common files > for DPDK, this has been done by many drivers, as not changing "base" > files, this makes sense. > > But for this case, file is "dpaa_list.h" and as far as I can see all it > has is linked list implementation, this looked easy to exclude, but if > not you can ignore the comment. Got your point. I will respin and see how much is the impact. Thanks for inputs. > >> >> - >> Shreyansh >> > >