From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) by dpdk.org (Postfix) with ESMTP id E8548234 for ; Mon, 3 Jun 2013 19:26:25 +0200 (CEST) Received: by mail-pa0-f53.google.com with SMTP id kq13so979497pab.26 for ; Mon, 03 Jun 2013 10:26:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=Xy52IkA1R/cnOcLopatX25BBckA0zQCrWz0+eoIENNQ=; b=ovRdAzR12iUczTeeym9FcIHkxMLXlontTWZy9PbzepBcah2qF+Ugd2wbw4cZucbqW/ eix7xzHObDfSuuurceGpHO5dLhzEDnFoc4gOZkPN1FHb0J5IEiF3rzOpoqzQ4ioSb2uE gDH1rejW3hZkZIemlwx8FNnUXq92QWIhaO0d4wEwseTlfy4efiFVn3dUqQUMLO3hgNkd xKNPzPbxQ2SvnOrcGnrQLkBJPMrS/4/OoDH5uTSKS5g4V2gko9eh0uakTm0G6n5cKnzV a8SkS1FPv7Gcoo+mGFqhUgLNbovtQ/iEXkC8SITr6WdYlg5eNOgOC3jjpvnS3hE24+Cl JWPA== X-Received: by 10.68.189.36 with SMTP id gf4mr24945863pbc.73.1370280392850; Mon, 03 Jun 2013 10:26:32 -0700 (PDT) Received: from nehalam.linuxnetplumber.net (static-50-53-71-109.bvtn.or.frontiernet.net. [50.53.71.109]) by mx.google.com with ESMTPSA id dc3sm21455911pbc.9.2013.06.03.10.26.31 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 03 Jun 2013 10:26:32 -0700 (PDT) Date: Mon, 3 Jun 2013 10:26:29 -0700 From: Stephen Hemminger To: Thomas Monjalon Message-ID: <20130603102629.713d917c@nehalam.linuxnetplumber.net> In-Reply-To: <201306031836.52362.thomas.monjalon@6wind.com> References: <20130530171234.301927271@vyatta.com> <51AC5A99.1050207@6wind.com> <20130603084154.70219c8f@nehalam.linuxnetplumber.net> <201306031836.52362.thomas.monjalon@6wind.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmqnpRPg5E7wGhGxPye4iprV4DTzfvyMvdmjD2RCuc6Z+TJRYeJelXT65q+vkpHloki3JbZ Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 4/7] eal: support different modules X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jun 2013 17:26:26 -0000 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.