[dpdk-dev] [PATCH v3 10/20] eal/dev: implement device iteration initialization

Thomas Monjalon thomas at monjalon.net
Mon Apr 23 00:29:55 CEST 2018


28/03/2018 13:17, Neil Horman:
> On Wed, Mar 28, 2018 at 10:10:07AM +0200, Gaëtan 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ëtan Rivet [mailto:gaetan.rivet at 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ëtan Rivet wrote:
> > > > > > > Neat. The issue is that rte_log.h is not symlink-ed until librte_eal
> > > > > > > is processed. rte_log cannot be included.
> > > > > > >
> > > > > > Sure it can - just pass -I/path/to/eal as a cflag.
> > > > > >
> > > > > > /Bruce
> > > > > 
> > > > > When you put it this way... :)
> > > > > 
> > > > > Sure, this is a solution, of which early symlink was a genericization.
> > > > > I'm just not a fan of having co-dependent libraries.
> > > > > 
> > > > > But this will probably come to that.
> > > > > 
> > > > 
> > > > 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 less hacky
> > > > to some folks.
> > > > 
> > > > /Bruce
> > > > 
> > > This seems like a good alternative to me.  I'm not entirely sure why the logging
> > > functions are integrated to EAL anyway.  
> > > 
> > > Neil
> > >  
> > 
> > As I said earlier:
> > 
> > > > > > > > > Ideally rte_log could be made independent (starting skimming EAL
> > > > > > > > > from all the fat), but this is much less trivial.
> > 
> > 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.
> > 
> > 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.
> > 
> I'm fine with just adding another include path to the CFLAGS for this purpose in
> the short term, just saying I'm not sure why the log library got integrated into
> EAL in the first place.
> 
> 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 complex
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 optional.

Anyway, these are considerations for the long run.




More information about the dev mailing list