From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id EDB235A81 for ; Sat, 31 Jan 2015 15:19:46 +0100 (CET) Received: from [2001:470:8:a08:215:ff:fecc:4872] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1YHYtg-00022b-Bj; Sat, 31 Jan 2015 09:19:45 -0500 Date: Sat, 31 Jan 2015 09:19:35 -0500 From: Neil Horman To: "Chen Jing D(Mark)" Message-ID: <20150131141935.GB22012@localhost.localdomain> References: <1422594454-11045-1-git-send-email-jing.d.chen@intel.com> <1422594454-11045-5-git-send-email-jing.d.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1422594454-11045-5-git-send-email-jing.d.chen@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 04/18] fm10k: add fm10k device id 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: Sat, 31 Jan 2015 14:19:47 -0000 On Fri, Jan 30, 2015 at 01:07:20PM +0800, Chen Jing D(Mark) wrote: > From: Jeff Shaw > > Add fm10k device ID list into rte_pci_dev_ids.h. > > Signed-off-by: Jeff Shaw > Signed-off-by: Chen Jing D(Mark) > --- > lib/librte_eal/common/include/rte_pci_dev_ids.h | 22 ++++++++++++++++++++++ > 1 files changed, 22 insertions(+), 0 deletions(-) > > diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h > index c922de9..f54800e 100644 > --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h > +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h > @@ -132,6 +132,14 @@ > #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) > #endif > > +#ifndef RTE_PCI_DEV_ID_DECL_FM10K > +#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) > +#endif > + > +#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF > +#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) > +#endif > + I know this isn't the job of this patch series, but I don't really understand why we bother with this pattern for filling out pci id tables. A PMD supports specific hardware, we might as well use the generic RTE_PCI_DEVICE macro in the driver rather than creating a FM10K specific wrapper, only to have to do some ifdef trickery in the rte_cpi_dev_ids file and some include magic to fill it out. I'd suggest that you just use RTE_PCI_DEVICE macro here, and make your own table (keep the specific device id values in the common file. Then we can clean out the macro maggic in a later update. Neil