From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 10/20] eal/dev: implement device iteration initialization Date: Mon, 23 Apr 2018 00:29:55 +0200 Message-ID: <3840634.tRnGvbobzp@xps> References: <20180328081007.balvfgy5cwnxdd7k@bidouze.vm.6wind.com> <20180328111730.GA9514@hmswarspite.think-freely.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: Neil Horman , =?ISO-8859-1?Q?Ga=EBtan?= Rivet , "Richardson, Bruce" , "Wiles, Keith" To: dev@dpdk.org Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id CF7C61B19 for ; Mon, 23 Apr 2018 00:29:57 +0200 (CEST) In-Reply-To: <20180328111730.GA9514@hmswarspite.think-freely.org> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 28/03/2018 13:17, Neil Horman: > On Wed, Mar 28, 2018 at 10:10:07AM +0200, Ga=EBtan Rivet wrote: > > On Tue, Mar 27, 2018 at 07:53:46PM -0400, Neil Horman wrote: > > > On Tue, Mar 27, 2018 at 08:48:01PM +0000, Richardson, Bruce wrote: > > > > From: Ga=EBtan Rivet [mailto:gaetan.rivet@6wind.com] > > > > > On Tue, Mar 27, 2018 at 09:28:07PM +0100, Bruce Richardson wrote: > > > > > > On Tue, Mar 27, 2018 at 10:20:40PM +0200, Ga=EBtan Rivet wrote: > > > > > > > Neat. The issue is that rte_log.h is not symlink-ed until lib= rte_eal > > > > > > > is processed. rte_log cannot be included. > > > > > > > > > > > > > Sure it can - just pass -I/path/to/eal as a cflag. > > > > > > > > > > > > /Bruce > > > > >=20 > > > > > When you put it this way... :) > > > > >=20 > > > > > Sure, this is a solution, of which early symlink was a genericiza= tion. > > > > > I'm just not a fan of having co-dependent libraries. > > > > >=20 > > > > > But this will probably come to that. > > > > >=20 > > > >=20 > > > > The other alternative is what was done with rte_compat.h - create a= new lib > > > > just with a single header file in it. Works ok too, and may seem le= ss hacky > > > > to some folks. > > > >=20 > > > > /Bruce > > > >=20 > > > This seems like a good alternative to me. I'm not entirely sure why = the logging > > > functions are integrated to EAL anyway. =20 > > >=20 > > > Neil > > > =20 > >=20 > > As I said earlier: > >=20 > > > > > > > > > Ideally rte_log could be made independent (starting skimm= ing EAL > > > > > > > > > from all the fat), but this is much less trivial. > >=20 > > rte_log could certainly stand on its own. I quickly attempted to make it > > a library, but this is too much work at this point. I think the EAL > > should be broken down, it is too monolithic. Problem is that many > > other libraries / applications, now relies on parts of the EAL that > > would need to be moved. > >=20 > > So any effort in this direction will be difficult to undertake (and > > badly received by the community, with good reasons), especially when > > the workaround is an additional -I cflag. > >=20 > I'm fine with just adding another include path to the CFLAGS for this pur= pose in > the short term, just saying I'm not sure why the log library got integrat= ed into > EAL in the first place. >=20 > Neil The log functions must be in EAL because they are different per-environment. The basic functions are the reason of EAL. I think the problem is somewhere else: we are trying to implemement the com= plex device logic in EAL. We should move all the bus and device logics outside of EAL, in my opinion. We should also move all the options parsing outside of EAL, and make it opt= ional. Anyway, these are considerations for the long run.