[dpdk-dev] [RFC PATCH 00/18] refactor eal driver registration code

Neil Horman nhorman at tuxdriver.com
Sat Sep 5 04:21:27 CEST 2015


On Fri, Sep 04, 2015 at 12:18:50PM +0100, Bruce Richardson wrote:
> On Fri, Sep 04, 2015 at 12:01:36PM +0100, Bernard Iremonger wrote:
> > At present the eal driver registration code is more complicated than it
> > needs to be.
> > 
> > This RFC proposes to simplify the eal driver registration code.
> > 
> > Remove the type field from the eal driver structure.
> > Refactor the eal driver registration code to use the name
> > field in the eal driver structure instead of the type field.
> > 
> > Modify all PMD's to use the modified eal driver structure.
> > Initialise the name field in the eal driver structure
> > in some PMD's where it is not initialised at present.
> > 
> >
> Hi,
> 
> I don't think I like this approach very much. It seems very brittle to remove
> the explicit type field and starting to rely on the drivers putting a prefix
> in the name instead i.e. implicit typing.
> 
> What is the major concern with marking drivers as virtual or physical? My thinking
> is that we should keep the type field, just perhaps change PDEV to be more
> descriptive in identifying the type of physical device, e.g. DEV_PCI.
> 
The issue is largely philisophical.  We shouldn't need to define the type of bus
a driver is on in the init structure of a pmd.  Instead we should register it
dynamically during pmd initalization

As you note, ennumerating the bus type (ie. PCI/USB/etc) is a step in the right
direction, but it would be better to register that dynamically than to encode it
in the data structure
Neil

> Regards,
> /Bruce
> 


More information about the dev mailing list