From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0051.outbound.protection.outlook.com [104.47.41.51]) by dpdk.org (Postfix) with ESMTP id 90DC3590B for ; Tue, 25 Oct 2016 07:35:14 +0200 (CEST) Received: from DM2PR03CA0003.namprd03.prod.outlook.com (10.141.96.13) by BLUPR0301MB1620.namprd03.prod.outlook.com (10.162.214.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.16; Tue, 25 Oct 2016 05:35:11 +0000 Received: from BN1BFFO11FD007.protection.gbl (2a01:111:f400:7c10::1:176) by DM2PR03CA0003.outlook.office365.com (2a01:111:e400:2428::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12 via Frontend Transport; Tue, 25 Oct 2016 05:35:11 +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 BN1BFFO11FD007.mail.protection.outlook.com (10.58.144.70) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.669.7 via Frontend Transport; Tue, 25 Oct 2016 05:35:09 +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 u9P5Z65g030406; Mon, 24 Oct 2016 22:35:07 -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 11:06:36 +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: <20161024182105.002bee08@pcviktorin.fit.vutbr.cz> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131218473101186327; (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)(97736004)(81156014)(31696002)(83506001)(50986999)(93886004)(85426001)(76176999)(11100500001)(305945005)(86362001)(36756003)(54356999)(19580395003)(7846002)(19580405001)(4001350100001)(586003)(92566002)(31686004)(68736007)(106466001)(77096005)(626004)(356003)(105606002)(8676002)(8936002)(23746002)(6666003)(50466002)(110136003)(64126003)(33646002)(81166006)(65826007)(5660300001)(65806001)(2950100002)(87936001)(65956001)(230700001)(8666005)(47776003)(189998001)(4326007)(6916009)(104016004)(2906002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0301MB1620; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD007; 1:qmpo/UjMbtZ6RwpjejU6Rf3tVJ2bJ44eEKlTVaTnHfSrzfw6xujJ44/UvQFA26yG/giF/Qy4/WaZjbzN7k3GaDNoNARAEMEyWPCdfCaF1lv9D8bYwz9tuscqLJk8hqoC1RsIxGIgbcn0KYLE3ssehfTGDdnuOS0Va9qgkhXY8GtfVyVYwn6cTfKEX1SmkoTYoA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5wJDiaEpfU1F0gdCxaldSueAgBXug/O0PFMchhlifruf1xI0SFJdZWNLQKVJ9BwrK7fsP6pqL1WJmHCrEdAmm2w1SFJMzELm9V3adAd2TuZsPjaJAmI4FJOoXp7MjIE7LfmPF9DyJgVxWEyWNu0lgaki9SaCxka0M+9xocdIXX9JVgYVeLbUvigMPgZq/bXu8svzc1nlxaYjyv2DwbSXw028qsWqXuu8C2yDHYVqDqOI0rhnVDtoApmad+hTGX3Y/5AkXVRs65Cd0H9+lkzD 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)(5005006)(8121501046)(13023025)(13018025)(13015025)(13024025)(13017025)(3002001)(10201501046)(6055026); SRVR:BLUPR0301MB1620; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR0301MB1620; X-Forefront-PRVS: 01068D0A20 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BLUPR0301MB1620; 23:ZxAV8mQljH5JuJL1fz+ZZ39Rwd3DRIxGiEA?= =?Windows-1252?Q?uzssSwpUi6HHRqKJnD+ogUvS+5+/lLshU0THEsGJNm+Pj8Ppt2/ZykDg?= =?Windows-1252?Q?MWyWngOd/JTculUqA3leu+EZ1fKHmnA5SkCoIDfLGCZrcVr17DDYAL91?= =?Windows-1252?Q?BM2hN5a+Z3DAPzAtEo4buZR9tAqRaqUb9XO/hAAETZTqfllP6Q2Ovl0n?= =?Windows-1252?Q?gq9CqzWVTsG1J8gLTzzkSMayYlrqd6QelVqlFcaFybeIgNS2to+CQkLg?= =?Windows-1252?Q?TmVy68wcuGX22ztBqltp/r9rYh1I01wCPG3Pm0BlocOf2zmOzfbd2r1o?= =?Windows-1252?Q?jotoh2G6z5Uhtvd7YHmjbmzwz+fzWl64iR4neEFib1bWxZ6Y59hZpNmv?= =?Windows-1252?Q?ZjCMtkwv/77wjQdbVWw1inI5lL3+CNW2ytAdz9vQotYajgoOR4bhyVp3?= =?Windows-1252?Q?ZWNycOmWZDOLq8TsdU6fPR7WZVcxt3jDaeezyvcOzphq/nVm8QU5en4/?= =?Windows-1252?Q?CVQzeQVjM47a/HoXUtMYL+kjLVXs1J/Hyp/GlI41i/t1qfupr3a+OT0M?= =?Windows-1252?Q?agl/l6tecLIf8uNIHBVYOAtW+bQVpw+N4Y/Nekf69/GQ7DPy+UXpZYeo?= =?Windows-1252?Q?TGoRzO2sX11K3KrOtclA0mj9zFmQSjD6HE2X9rYM68E6j7yZMfWNHf/X?= =?Windows-1252?Q?7eLxXYl9q61Wsbr/PWp3dBcd8m0xfEZ2Fy7m6q7KV5dxl5xaTOXUDz47?= =?Windows-1252?Q?ghnDPc1syOI22uXeVooEAdEfQm4W9cDOIUz+ko8JS/DIb4mdSIa+HhqP?= =?Windows-1252?Q?ELdf37J0YfDaa1TF6btZdZotDmJwbGKYmH9DctHI5FOBVw/bIHdSsaaE?= =?Windows-1252?Q?VjdU+AkGngRr94xObqC+WXMk9TscosuScIK8zaT+8E2pjeKGNYXl/YNZ?= =?Windows-1252?Q?/jFVnebKuaISn86xGj3yGyxbuOm+yxklVmjNhRfXPQc3flhZg2Cy6qPu?= =?Windows-1252?Q?8lObH4pjv6oF4QXwHpklQX+mv7gfAXnPBblmypoLAk2GrM3TH1XTMj8H?= =?Windows-1252?Q?c65WJONo6ZSJ+cbZ/d/gH5gKGh/MgBQFtKXQFo2eOBENf+aLkfu5p4ie?= =?Windows-1252?Q?Ho4qYh4QYNY/Aq/stu6C/WKF55qFLAJIrKxDOVL7dz3hxedwpyJpiVWU?= =?Windows-1252?Q?Ty2W+3VbdonNFR8mJ0+MLZxUQ1wKGGKHxtW3RnrDZa1k6RMA95lj9zYX?= =?Windows-1252?Q?5pvMS4l8u4tY8S89nX1QT/jPoAHPYZ6tupcPuezNUKAa8/AAlGx8mcPU?= =?Windows-1252?Q?gAMv5gFEKAeKqUClky5l5mW+J4DeDK2BnnZd0BkRv4ai72MWujyBjrGb?= =?Windows-1252?Q?Bjh6CRJlLe5O4kbXpOYZMGZll4c2s2wZgbTgyuHAwZb4JoL8i+9Ce7Y0?= =?Windows-1252?Q?T5avRFh13Uiln7qb17RbbSjpiGLvcpRz3d34ISF2h6ES0vqH/VELfink?= =?Windows-1252?Q?COM2rWK5qq4a468fcwfoOM3vw110QH0G0XsFnfX6FuH/+XUsG2A=3D?= =?Windows-1252?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1620; 6:k3JpDC8Tb+SeTWL7c512HySaW3GfUMZK6DMqowpn+5rgEd33fYIPpp1DQZbIQUnvE+3+earU4yvKGIRwuBXiwWtvusrSxlel4BjW/MMTyOPRtZp//HFGKwqWuO69mGRHphU0BQ54UkQ3TcoX46DBfX0YEh+AjP1L20SY55Ze8DlKO+TAKfhMBhEClwfaSmeAV0KN4EjOwoh1IXuSHxYp8gYoXEm+sxFhbHFt/fPp2KBktL89VzLTzQSzrJ6I6dszn0cCOoN1bOjEYnYg1SA5jRwCjDG5a1N3Gv3NIgcIW19KK6BZE4Jha0wT0PeOZW62; 5:zDE6ElVoFHf0pVrhTS/a8O8DVmUHq4Dbpj7KlM91jmI1+TF6oQNrPxcDzgUXteuERr11VU+O2QB+8GeerIfFfuGSprAhj2H/5Bwuc/LrjpSrI2jqfkJOat00A8S+8mQiheL7rWPljbmCFwcSavbYEk1fe5JGR+Ea2SX3pd1jqVNe6ODs06AgHt1u6j0DReUK; 24:c+QLHL+iTiZC9s6N2MdJemZOTH9TqHNpXNxJwbKCAR/FTqsBMEVwaT1oqT69Wrj5RRkhk+PCk7ED/tmNgxDXZhos3aypdG4LjZUYp6mf1i8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1620; 7:+SexsczzR47H35HhSpAbsKdY0fUuSMfrkDIWTpb9EYPn+gcFRfWfhImog/Ha0lz1lf8O0SF+DBoykZia9hD88e6KxHOElUYzAMRNoN0k2cSrFJ/LbobKE4V9ywCdLuPyAgJH3aKX58f/TtG1KYZGIwwig7m70a8n44HK7n7+Q807NWLLrf0fDBnXpdBgxkGplFS4uec9+FFjqk0PAj1ut/C2U1e56Hd6fzNcCqMYi8Qhvqx5sSHjI9YFltoAWL8rOmT+19qaX6+mo9qFrghAQx7OWxqLDS55bY96foieQsf8Lsd6PNvmjY/pudTDT/JMqF1N0RvEqyIGdMtqPB/XAk8rlf1hkqeGcFJXMr6CH5M= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2016 05:35:09.7598 (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: BLUPR0301MB1620 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 05:35:15 -0000 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. > >> + const struct rte_soc_id *id_table; /**< ID table, NULL terminated */ >> +}; >> + > > [...] > >> +#endif > > > - Shreyansh