From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0082.outbound.protection.outlook.com [104.47.37.82]) by dpdk.org (Postfix) with ESMTP id 1F7D458EC for ; Tue, 25 Oct 2016 14:37:15 +0200 (CEST) Received: from BN6PR03CA0069.namprd03.prod.outlook.com (10.173.137.31) by CY1PR03MB2380.namprd03.prod.outlook.com (10.167.8.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Tue, 25 Oct 2016 12:37:13 +0000 Received: from BY2FFO11FD037.protection.gbl (2a01:111:f400:7c0c::143) by BN6PR03CA0069.outlook.office365.com (2603:10b6:404:4c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.649.16 via Frontend Transport; Tue, 25 Oct 2016 12:37:13 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; rehivetech.com; dkim=none (message not signed) header.d=none;rehivetech.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 BY2FFO11FD037.mail.protection.outlook.com (10.1.14.222) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.679.5 via Frontend Transport; Tue, 25 Oct 2016 12:37:12 +0000 Received: from [10.232.14.87] ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u9PCb81i030281; Tue, 25 Oct 2016 05:37:09 -0700 To: Jan Viktorin References: <1476539108-13170-1-git-send-email-shreyansh.jain@nxp.com> <1477310380-17944-1-git-send-email-shreyansh.jain@nxp.com> <1477310380-17944-7-git-send-email-shreyansh.jain@nxp.com> <20161024182105.002bee08@pcviktorin.fit.vutbr.cz> CC: , , , Hemant Agrawal From: Shreyansh Jain Message-ID: Date: Tue, 25 Oct 2016 18:08:39 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131218726325723950; (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)(7916002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(377454003)(24454002)(87936001)(86362001)(6666003)(85426001)(105606002)(8936002)(4001350100001)(92566002)(106466001)(31696002)(65826007)(11100500001)(230700001)(50466002)(68736007)(626004)(65806001)(47776003)(65956001)(77096005)(586003)(93886004)(81156014)(81166006)(23746002)(305945005)(189998001)(7846002)(8676002)(2906002)(4326007)(19580405001)(64126003)(5660300001)(33646002)(110136003)(31686004)(6916009)(54356999)(19580395003)(8666005)(104016004)(97736004)(76176999)(356003)(83506001)(2950100002)(50986999)(36756003)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2380; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD037; 1:DWJD2m8zQcd/caD+NXbD3RiIn+k/5nrhXP4bGAYsxFmWFci1is8FbpuUXFZAJKO+UEhjAs3P9F7rjWlS5zRhJpBlCdwvwn3ED65ckjc63Nld2ddnaShhElYTM/cAzmILwlh9OpolvIg+SwapSeg0jN7SJUUI/SVozqWK9kbrcibDvLX7KUjA0ixBTGz3Ztx5DE4Is8EopRo7hxdAOKZfqc3/wEyul5L5DXa2b91GRYFHzOxONVMghTS4LmAv6A48HEL4Mky626xMCgVwL5lKyRIT4pGx6op/19Al7NNQPbzkckUJqF1fvPFL7A9tCIpTLXhcY+ouaILD5EgUCqYjAZGX3kViONeRHjb3jXhb2YVZ1863uyvyep8C+n15+LNn6+hhMO8FiSVefh3T8suJHR4dzXxYn/uyJqJ8Z9bleZdEbqaE41TgsbJCcuOrm3CM7RJqH9PKM2GLpxG9QaOwuYzGOp8DQbNn1o3JQsLwoZLLC7JTXSqYtH3tWS+GWczljkStKETUhPonVi1DgITpvCo25YuxZsI7hxQx104F4VLvaccmY91RDcCnISNdpsDDYw8ocW5lxmFV/++iec66rzKjQvSQHOqZiA1i2HH/HyE= X-MS-Office365-Filtering-Correlation-Id: 1d637264-65a6-48a1-b6c5-08d3fcd3a4e7 X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2380; 2:EpPKH/6L74t/b1t330MfPkQrVHMtOYC90iAhF9M1QFGyUq0PeTm7onAQITbhX/U1eTHob6hGSnDS/IaJ2aojTFrjTAqBuIRx0rbFU/zLkLSqD6QIFZfdBxz0PVe+VDzqljN19KzYKyH0FL5DMBL+XIS32MqFacZdpv5h9O7QqZs7O/J7ekgfef4Nf4+GQl/RrTlqhvHf5B9Ko922CTjyqw==; 3:meOsLnb0HmPBstXIo9jGoa5M2f//o1Tobm223ghK0OZMFcIFCwSSm4eI3AS2eePrQCWFJLhZa/C2TPhnxazthomgxmZEjEwHLnpqM1ka+LLTBBLSVnD4KvVwR4hTL8I1y/8A6Q0QlT9yzybyb1zrhprTdMZzQdj0Pfw/CeLh8Uq32hEPLGG3xrJLVyTyKveCYGLXm5mPw2L8kXslPMVJYqHGh7IC34OTO+vs17fS5RRZpWxBqX+D7cpAFg4gZYua; 25:TZhD5Pv1tR96q63q7z5VDJlKQls/090IwiPaPKzWCAty/RsDAy/NAy4wh6d8+bi//oDFza3hOYIREbDTXF8d2hTr5TberSXR/fFTau2sy5x0FzT1liURI5Qp+OTFslx2GsCbD5SFGik9wlCmW/z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Io6u6L9vriUQvyqtkqu4VzdrEvWE/dvjggM3EJ4Xz83ulvlWlTqzCQRnDhqjMlX1rd7OjW8Mz3269x6MCfogJOOBwWsWaKAxkulhrBRqIXFvJb6FPf7lM+wMrRm5D8BimWT5PPeliuZ0mNnvVm/Uur4XwWdNocwtzqjhfzHczShBV4PpfQuwXjcVIEssR+Qefk4yuB1s7MsMr8MD6p8Weibo1kWlDm5PvEm+A+9x X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13023025)(13018025)(5005006)(8121501046)(13017025)(13015025)(13024025)(3002001)(10201501046)(6055026); SRVR:CY1PR03MB2380; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR03MB2380; X-Forefront-PRVS: 01068D0A20 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CY1PR03MB2380; 23:YAF73fzOy0QPyqqqOXoqKgMyyVYCKYOYt3e31?= =?Windows-1252?Q?FIKeIFwVmeEd0OV7S7zQa3ynXhvBVRaArGAcFLHGWDlK1F3tlBK5XgbW?= =?Windows-1252?Q?YHG+qp3Vmw4mNrbCWMCEoaQ/wudFA5ZOQD2w8pBrr5sEz/7hZfozYWtA?= =?Windows-1252?Q?CW//66GvC0qBDHZMtR/rWF2lvwJnDGMgnqqFs0c5b8StEWlnESs0Fp8X?= =?Windows-1252?Q?dVEWOY2826fNVS5VQ4AsFeVCBv5BC358Pw/bXCdyPB4A6lfsYBAixUI7?= =?Windows-1252?Q?n6AtoOIlcsLqoExf1UhxMlj7Ol2PnPWXcDUo28xr8HmLTxsY/idUx4ZH?= =?Windows-1252?Q?eD4ALP6WDiqKdI+s4B+yeswrrBBvkkg0s1mNfo/OqaoOd6veNElgDnAd?= =?Windows-1252?Q?d5fKPzZGsNjQCElws+ZzV9pClNLZpACloRnFaYdVr7gtaQDCnHpjd27N?= =?Windows-1252?Q?0q7Qq8aNTL74QcAqaU6z6h60CilVwSMS/g0j4ts+5tXrf43lSdyR5TCs?= =?Windows-1252?Q?2WswL7Ka93WXUb4RCBe4hNuVLrZ+dBa0rd5et6Z4K53NVHPhrR5GlYdZ?= =?Windows-1252?Q?abnmT2JFIJtu3C8nrwlmZzoWgxN7iNuQJrWBa2qOxSnMdSERxbm/1Sgs?= =?Windows-1252?Q?ttSJhgXJVJLtFFoLMcyl3PqwrvlTNAUBlGu/mbEH1C1X4zBG4AFTpKwC?= =?Windows-1252?Q?21529dPF+fv+er0V7UG2P5uMs0CYFx/EV+wFSIYxoiy3Q8epmvG1nX6c?= =?Windows-1252?Q?UTrvbjRTBbo5M2TJYpSwQuAG63gOexxqdaUGRfIk0fDA7FfUBMnwnZa3?= =?Windows-1252?Q?QTEXJMgFItfyRbcWq5bo+bf4/7b7aTauQE8/DmZ4J8da4bZPCox/JTjT?= =?Windows-1252?Q?iU34LbVKOjB2v2GUu67H6jv3eR41J8c93/81wrfmhLuF1GFJuV0oPJ/U?= =?Windows-1252?Q?5fLUqRaIa78hn1EqolJpDPe0IanDNUWJAc33eHxVLMNopNTWUQXx8pOk?= =?Windows-1252?Q?SZicc38ascwJSBCau+o1EPRf0fF2+FmQtfm2MNsYNUUtWQmmdE/F/Ql3?= =?Windows-1252?Q?yrD5nXvtkeTMsBBdq2V1h9SS8Ug9whvkUUGByofV8JEb8IyQs5Ap/B0f?= =?Windows-1252?Q?2M1ylzvtHfBCXx4njIoKUslscMpoCtN1YNA0ZrltRrsNq89LwLWqcctR?= =?Windows-1252?Q?7cMKQNtqvwN0J8Nf0Z1U85GJ0wN1YFczjj8wRSxRI4hYerOC5JMYAJsJ?= =?Windows-1252?Q?uBY9rLD+m69ATHtr7GI3wGjXtqvQPuI2O5Qsbz/PhdTojIAInl0N7cLP?= =?Windows-1252?Q?aK0SBXCozRKGjYenaaKKD8bLfWXXgMwjt+r3JyQAkxG7D1EJ4Sn28DD3?= =?Windows-1252?Q?bQxiGNKcJJU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0eQdbjszgAJpLzu5qF/1r2hSaO5Tv6pVRwotqSYc5nakYYP47hkmERY4vXSEmgfsuhxr9XUfok4mdeOa1CKKXFfRHFOs/hHhhQrqWu2aZf3DagYqyE5b6Arl8lJG5ymjUnTLimc7LW9iLeAhjPteVw4whZtHOTab9wPMN4N9NjIUNhaOaDkdJ2qPQAbtoZgtLCOuWpa9l2+ZnAx0vKoRGEFgwxa4ncUIyTo9Ew= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2016 12:37:12.1979 (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: CY1PR03MB2380 Subject: Re: [dpdk-dev] [PATCH v5 06/21] eal/soc: introduce very essential SoC infra definitions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 12:37:15 -0000 On Tuesday 25 October 2016 11:06 AM, Shreyansh Jain wrote: > Hello Jan, > > On Monday 24 October 2016 09:51 PM, Jan Viktorin wrote: >> On Mon, 24 Oct 2016 17:29:25 +0530 >> Shreyansh Jain wrote: >> >>> From: Jan Viktorin >>> >>> Define initial structures and functions for the SoC infrastructure. >>> This patch supports only a very minimal functions for now. >>> More features will be added in the following commits. >>> >>> Includes rte_device/rte_driver inheritance of >>> rte_soc_device/rte_soc_driver. >>> >>> Signed-off-by: Jan Viktorin >>> Signed-off-by: Shreyansh Jain >>> Signed-off-by: Hemant Agrawal >>> --- >>> app/test/Makefile | 1 + >>> app/test/test_soc.c | 90 +++++++++++++++++++++ >>> lib/librte_eal/common/Makefile | 2 +- >>> lib/librte_eal/common/eal_private.h | 4 + >>> lib/librte_eal/common/include/rte_soc.h | 138 >>> ++++++++++++++++++++++++++++++++ >>> 5 files changed, 234 insertions(+), 1 deletion(-) >>> create mode 100644 app/test/test_soc.c >>> create mode 100644 lib/librte_eal/common/include/rte_soc.h >>> >>> diff --git a/app/test/Makefile b/app/test/Makefile >> >> [...] >> >>> +++ b/lib/librte_eal/common/include/rte_soc.h >>> @@ -0,0 +1,138 @@ >> >> [...] >> >>> + >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> + >>> +#include >>> +#include >>> + >>> +struct rte_soc_id { >>> + const char *compatible; /**< OF compatible specification */ >>> + uint64_t priv_data; /**< SoC Driver specific data */ >> >> Do you expect this to be a pointer? > > A 64 bit entry, which can be typecasted to pointer by implementations, > if required. Or, it might as well remain as a 64bit entry as ID. > >> >>> +}; >>> + >> >> [...] >> >>> + >>> +/** >>> + * Initialization function for the driver called during SoC probing. >>> + */ >>> +typedef int (soc_devinit_t)(struct rte_soc_driver *, struct >>> rte_soc_device *); >>> + >>> +/** >>> + * Uninitialization function for the driver called during hotplugging. >>> + */ >>> +typedef int (soc_devuninit_t)(struct rte_soc_device *); >>> + >>> +/** >>> + * A structure describing a SoC driver. >>> + */ >>> +struct rte_soc_driver { >>> + TAILQ_ENTRY(rte_soc_driver) next; /**< Next in list */ >>> + struct rte_driver driver; /**< Inherit core driver. */ >>> + soc_devinit_t *devinit; /**< Device initialization */ >>> + soc_devuninit_t *devuninit; /**< Device uninitialization */ >> >> Shouldn't those functions be named probe/remove? > > Indeed. I think there was a comment on v4 as well - I thought I had > fixed it but it seems I have mixed up my patches. I will send v6 > immediately with this fixed. Thanks for pointing out. Ah, I just noticed that I did change it - but in Patch 11. Ideally, it should have been done here itself. My bad. > >> >>> + const struct rte_soc_id *id_table; /**< ID table, NULL >>> terminated */ >>> +}; >>> + >> >> [...] >> >>> +#endif >> >> >> > > - > Shreyansh > - Shreyansh