On Mon, 3 Jun 2013 18:36:52 +0200 Thomas Monjalon <thomas.monjalon at 6wind.com> wrote:
> 03/06/2013 17:41, Stephen Hemminger : > > On Mon, 03 Jun 2013 10:58:01 +0200 > > Damien Millescamps <damien.millescamps at 6wind.com> wrote: > > > > > > > > --- a/lib/librte_eal/common/include/rte_pci.h 2013-05-29 > > > > 08:45:38.000000000 -0700 +++ > > > > b/lib/librte_eal/common/include/rte_pci.h 2013-05-29 > > > > 09:02:50.000000000 -0700 @@ -151,12 +151,11 @@ struct rte_pci_driver { > > > > > > > > pci_devinit_t *devinit; /**< Device init. > > > > function. > > > > */ struct rte_pci_id *id_table; /**< ID table, NULL > > > > terminated. */ uint32_t drv_flags; /**< > > > > Flags > > > > contolling handling of device. */ > > > > > > > > + const char *module_name; /**< Associated kernel > > > > module */ > > > > > > You solution only permits for one module to be checked during > > > initialization, while the former solution using flags could be easily > > > extended to check for more than one module. > > > However it is true that there is a problem with this module check since > > > it is historically hard-coded for "igb_uio". > > > > It is one module per driver which works quite well. > > The code identifies the module to load based on the PCI id. > > There are cases where we need more than one kernel module for 2 reasons: > - in this case, igb_uio is built and inserted without dependency on uio > - some other PMDs/NICs, several modules without dependency links could > be > needed > > Please could you refactor your patch accordingly ? > Thanks There is nothing that says a PMD could load a second module, but why not put that special case code in the the driver. Or make it a list of strings.