From: Thomas Monjalon Subject: Re: [PATCH 4/7] eal: support different modules Date: Mon, 3 Jun 2013 18:36:52 +0200 Message-ID: <201306031836.52362.thomas.monjalon@6wind.com> References: <20130530171234.301927271@vyatta.com> <51AC5A99.1050207@6wind.com> <20130603084154.70219c8f@nehalam.linuxnetplumber.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Stephen Hemminger Return-path: In-Reply-To: <20130603084154.70219c8f-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@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" 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 -- Thomas