From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v5 06/21] eal/soc: introduce very essential SoC infra definitions Date: Tue, 25 Oct 2016 18:08:39 +0530 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , , Hemant Agrawal To: Jan Viktorin 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) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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