From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v3] igb_uio: bind error if pcie bridge Date: Mon, 16 Apr 2018 16:35:23 +0100 Message-ID: References: <20180329163735.51606-1-ajit.khaparde@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Darren Edamura , Rahul Gupta , Scott Branden To: Ajit Khaparde , dev@dpdk.org Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 372C0AAA9 for ; Mon, 16 Apr 2018 17:35:26 +0200 (CEST) In-Reply-To: <20180329163735.51606-1-ajit.khaparde@broadcom.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 3/29/2018 5:37 PM, Ajit Khaparde wrote: > From: Darren Edamura > > Probe function should exit immediately if pcie bridge detected > > Signed-off-by: Darren Edamura > Signed-off-by: Rahul Gupta > Signed-off-by: Scott Branden > Signed-off-by: Ajit Khaparde > ---- > v1->v2: add a log message if the condition is true. > v2->v3: rebase against latest dpdk-next-net tree. > --- > kernel/linux/igb_uio/igb_uio.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c > index 4cae4dd27..cbc5ab63a 100644 > --- a/kernel/linux/igb_uio/igb_uio.c > +++ b/kernel/linux/igb_uio/igb_uio.c > @@ -473,6 +473,11 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) > void *map_addr; > int err; > > + if (pci_is_bridge(dev)) { Hi Ajit, I acked this patch and it is already applied but there is a build issue for this one. Starting from Linux v3.16 pci_is_bridge() is in linux/pci.h, in previous versions it is in drivers/pci/pci.h which is private header and using this API causing a build error. Can you please send a fix for this? It is possible to define a macro in igb_uio/compat.h based on kernel version check. And in igb_uio.c use that macro to enable/disable pci_is_bridge() check. Please don't use version check directly in igb_uio.c Thanks, ferruh > + dev_warn(&dev->dev, "Ignoring PCI bridge device\n"); > + return -ENODEV; > + } > + > udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL); > if (!udev) > return -ENOMEM; >