From: Stephen Hemminger Subject: Re: [PATCH 4/7] eal: support different modules Date: Mon, 3 Jun 2013 10:26:29 -0700 Message-ID: <20130603102629.713d917c@nehalam.linuxnetplumber.net> References: <20130530171234.301927271@vyatta.com> <51AC5A99.1050207@6wind.com> <20130603084154.70219c8f@nehalam.linuxnetplumber.net> <201306031836.52362.thomas.monjalon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Thomas Monjalon Return-path: In-Reply-To: <201306031836.52362.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On Mon, 3 Jun 2013 18:36:52 +0200 Thomas Monjalon wrote: > 03/06/2013 17:41, Stephen Hemminger : > > On Mon, 03 Jun 2013 10:58:01 +0200 > > Damien Millescamps 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.