From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so1.wedos.net (wes1-so1-b.wedos.net [46.28.106.43]) by dpdk.org (Postfix) with ESMTP id BCA4C298F for ; Mon, 24 Oct 2016 18:23:32 +0200 (CEST) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so1.wedos.net (Postfix) with ESMTPSA id 3t2hRS24wCzBVr; Mon, 24 Oct 2016 18:23:32 +0200 (CEST) Date: Mon, 24 Oct 2016 18:21:05 +0200 From: Jan Viktorin To: Shreyansh Jain , Cc: , , Hemant Agrawal Message-ID: <20161024182105.002bee08@pcviktorin.fit.vutbr.cz> In-Reply-To: <1477310380-17944-7-git-send-email-shreyansh.jain@nxp.com> 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> Organization: RehiveTech MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Mon, 24 Oct 2016 16:23:32 -0000 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? > +}; > + [...] > + > +/** > + * 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? > + const struct rte_soc_id *id_table; /**< ID table, NULL terminated */ > +}; > + [...] > +#endif -- Jan Viktorin E-mail: Viktorin@RehiveTech.com System Architect Web: www.RehiveTech.com RehiveTech Brno, Czech Republic