DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v3] igb_uio: bind error if pcie bridge
@ 2018-03-29 16:37 Ajit Khaparde
  2018-03-30 10:34 ` Ferruh Yigit
  2018-04-16 15:35 ` Ferruh Yigit
  0 siblings, 2 replies; 12+ messages in thread
From: Ajit Khaparde @ 2018-03-29 16:37 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Darren Edamura, Rahul Gupta, Scott Branden

From: Darren Edamura <darren.edamura@broadcom.com>

Probe function should exit immediately if pcie bridge detected

Signed-off-by: Darren Edamura <darren.edamura@broadcom.com>
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
----
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)) {
+		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;
-- 
2.14.3 (Apple Git-98)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v3] igb_uio: bind error if pcie bridge
  2018-03-29 16:37 [dpdk-dev] [PATCH v3] igb_uio: bind error if pcie bridge Ajit Khaparde
@ 2018-03-30 10:34 ` Ferruh Yigit
  2018-04-11 21:36   ` Thomas Monjalon
  2018-04-16 15:35 ` Ferruh Yigit
  1 sibling, 1 reply; 12+ messages in thread
From: Ferruh Yigit @ 2018-03-30 10:34 UTC (permalink / raw)
  To: Ajit Khaparde, dev; +Cc: Darren Edamura, Rahul Gupta, Scott Branden

On 3/29/2018 5:37 PM, Ajit Khaparde wrote:
> From: Darren Edamura <darren.edamura@broadcom.com>
> 
> Probe function should exit immediately if pcie bridge detected
> 
> Signed-off-by: Darren Edamura <darren.edamura@broadcom.com>
> Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v3] igb_uio: bind error if pcie bridge
  2018-03-30 10:34 ` Ferruh Yigit
@ 2018-04-11 21:36   ` Thomas Monjalon
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2018-04-11 21:36 UTC (permalink / raw)
  To: Ajit Khaparde
  Cc: dev, Ferruh Yigit, Darren Edamura, Rahul Gupta, Scott Branden

30/03/2018 12:34, Ferruh Yigit:
> On 3/29/2018 5:37 PM, Ajit Khaparde wrote:
> > From: Darren Edamura <darren.edamura@broadcom.com>
> > 
> > Probe function should exit immediately if pcie bridge detected
> > 
> > Signed-off-by: Darren Edamura <darren.edamura@broadcom.com>
> > Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
> > Signed-off-by: Scott Branden <scott.branden@broadcom.com>
> > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v3] igb_uio: bind error if pcie bridge
  2018-03-29 16:37 [dpdk-dev] [PATCH v3] igb_uio: bind error if pcie bridge Ajit Khaparde
  2018-03-30 10:34 ` Ferruh Yigit
@ 2018-04-16 15:35 ` Ferruh Yigit
  2018-04-16 20:51   ` [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in supported by linux kernel Ajit Khaparde
  1 sibling, 1 reply; 12+ messages in thread
From: Ferruh Yigit @ 2018-04-16 15:35 UTC (permalink / raw)
  To: Ajit Khaparde, dev; +Cc: Darren Edamura, Rahul Gupta, Scott Branden

On 3/29/2018 5:37 PM, Ajit Khaparde wrote:
> From: Darren Edamura <darren.edamura@broadcom.com>
> 
> Probe function should exit immediately if pcie bridge detected
> 
> Signed-off-by: Darren Edamura <darren.edamura@broadcom.com>
> Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ----
> 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;
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in supported by linux kernel
  2018-04-16 15:35 ` Ferruh Yigit
@ 2018-04-16 20:51   ` Ajit Khaparde
  2018-04-17  9:35     ` Ferruh Yigit
  2018-04-17 12:58     ` Iremonger, Bernard
  0 siblings, 2 replies; 12+ messages in thread
From: Ajit Khaparde @ 2018-04-16 20:51 UTC (permalink / raw)
  To: dev; +Cc: Scott Branden

From: Scott Branden <scott.branden@broadcom.com>

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.

Fix build error when calling pci_is_bridge by not calling/supporting
pci_is_bridge with kernel versions before 3.16.

Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 kernel/linux/igb_uio/compat.h  | 4 ++++
 kernel/linux/igb_uio/igb_uio.c | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/kernel/linux/igb_uio/compat.h b/kernel/linux/igb_uio/compat.h
index ce456d4bb..b48c4cc91 100644
--- a/kernel/linux/igb_uio/compat.h
+++ b/kernel/linux/igb_uio/compat.h
@@ -132,3 +132,7 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev)
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
 #define HAVE_PCI_MSI_MASK_IRQ 1
 #endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
+#define HAVE_PCI_IS_BRIDGE_API 1
+#endif
diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c
index cbc5ab63a..cd9b7e721 100644
--- a/kernel/linux/igb_uio/igb_uio.c
+++ b/kernel/linux/igb_uio/igb_uio.c
@@ -473,10 +473,12 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	void *map_addr;
 	int err;
 
+#ifdef HAVE_PCI_IS_BRIDGE_API
 	if (pci_is_bridge(dev)) {
 		dev_warn(&dev->dev, "Ignoring PCI bridge device\n");
 		return -ENODEV;
 	}
+#endif
 
 	udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL);
 	if (!udev)
-- 
2.15.1 (Apple Git-101)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in supported by linux kernel
  2018-04-16 20:51   ` [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in supported by linux kernel Ajit Khaparde
@ 2018-04-17  9:35     ` Ferruh Yigit
  2018-04-17 12:58     ` Iremonger, Bernard
  1 sibling, 0 replies; 12+ messages in thread
From: Ferruh Yigit @ 2018-04-17  9:35 UTC (permalink / raw)
  To: Ajit Khaparde, dev; +Cc: Scott Branden

On 4/16/2018 9:51 PM, Ajit Khaparde wrote:
> From: Scott Branden <scott.branden@broadcom.com>
> 
> 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.
> 
> Fix build error when calling pci_is_bridge by not calling/supporting
> pci_is_bridge with kernel versions before 3.16.

Thanks for the patch, this is mainly solves the issue, only a few nit-picking:
can you covert title to a fix patch and add a fixes line please? This is to fix
the build error with some kernels.

> 
> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  kernel/linux/igb_uio/compat.h  | 4 ++++
>  kernel/linux/igb_uio/igb_uio.c | 2 ++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/kernel/linux/igb_uio/compat.h b/kernel/linux/igb_uio/compat.h
> index ce456d4bb..b48c4cc91 100644
> --- a/kernel/linux/igb_uio/compat.h
> +++ b/kernel/linux/igb_uio/compat.h
> @@ -132,3 +132,7 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev)
>  #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
>  #define HAVE_PCI_MSI_MASK_IRQ 1
>  #endif
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
> +#define HAVE_PCI_IS_BRIDGE_API 1
> +#endif

Can you keep check with version order, add this part after "3.3.0" one, I am
aware "4, 8, 0" one breaks the order it seems that has slipped...

> diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c
> index cbc5ab63a..cd9b7e721 100644
> --- a/kernel/linux/igb_uio/igb_uio.c
> +++ b/kernel/linux/igb_uio/igb_uio.c
> @@ -473,10 +473,12 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
>  	void *map_addr;
>  	int err;
>  
> +#ifdef HAVE_PCI_IS_BRIDGE_API
>  	if (pci_is_bridge(dev)) {
>  		dev_warn(&dev->dev, "Ignoring PCI bridge device\n");
>  		return -ENODEV;
>  	}
> +#endif
>  
>  	udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL);
>  	if (!udev)
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in supported by linux kernel
  2018-04-16 20:51   ` [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in supported by linux kernel Ajit Khaparde
  2018-04-17  9:35     ` Ferruh Yigit
@ 2018-04-17 12:58     ` Iremonger, Bernard
  2018-04-17 13:33       ` Ferruh Yigit
  1 sibling, 1 reply; 12+ messages in thread
From: Iremonger, Bernard @ 2018-04-17 12:58 UTC (permalink / raw)
  To: Ajit Khaparde, dev; +Cc: Scott Branden

Hi Scott, Ajit,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ajit Khaparde
> Sent: Monday, April 16, 2018 9:51 PM
> To: dev@dpdk.org
> Cc: Scott Branden <scott.branden@broadcom.com>
> Subject: [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in supported by
> linux kernel
> 
> From: Scott Branden <scott.branden@broadcom.com>
> 
> 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.
> 
> Fix build error when calling pci_is_bridge by not calling/supporting pci_is_bridge
> with kernel versions before 3.16.
> 
> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  kernel/linux/igb_uio/compat.h  | 4 ++++  kernel/linux/igb_uio/igb_uio.c | 2 ++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/kernel/linux/igb_uio/compat.h b/kernel/linux/igb_uio/compat.h
> index ce456d4bb..b48c4cc91 100644
> --- a/kernel/linux/igb_uio/compat.h
> +++ b/kernel/linux/igb_uio/compat.h
> @@ -132,3 +132,7 @@ static bool pci_check_and_mask_intx(struct pci_dev
> *pdev)  #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)  #define
> HAVE_PCI_MSI_MASK_IRQ 1  #endif
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) #define
> +HAVE_PCI_IS_BRIDGE_API 1 #endif
> diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c index
> cbc5ab63a..cd9b7e721 100644
> --- a/kernel/linux/igb_uio/igb_uio.c
> +++ b/kernel/linux/igb_uio/igb_uio.c
> @@ -473,10 +473,12 @@ igbuio_pci_probe(struct pci_dev *dev, const struct
> pci_device_id *id)
>  	void *map_addr;
>  	int err;
> 
> +#ifdef HAVE_PCI_IS_BRIDGE_API
>  	if (pci_is_bridge(dev)) {
>  		dev_warn(&dev->dev, "Ignoring PCI bridge device\n");
>  		return -ENODEV;
>  	}
> +#endif
> 
>  	udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL);
>  	if (!udev)
> --
> 2.15.1 (Apple Git-101)

This patch fixes the compile error seen on the master branch.
However there are the following checkpatch.pl  warnings:

WARNING: LINUX_VERSION_CODE should be avoided, code should be for the version to which it is merged
#40: FILE: kernel/linux/igb_uio/compat.h:136:
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)

WARNING: Comparisons should place the constant on the right side of the test
#40: FILE: kernel/linux/igb_uio/compat.h:136:
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)

total: 0 errors, 2 warnings, 19 lines checked

Regards,

Bernard.
 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in supported by linux kernel
  2018-04-17 12:58     ` Iremonger, Bernard
@ 2018-04-17 13:33       ` Ferruh Yigit
  2018-04-17 13:49         ` Iremonger, Bernard
  0 siblings, 1 reply; 12+ messages in thread
From: Ferruh Yigit @ 2018-04-17 13:33 UTC (permalink / raw)
  To: Iremonger, Bernard, Ajit Khaparde, dev; +Cc: Scott Branden

On 4/17/2018 1:58 PM, Iremonger, Bernard wrote:
> Hi Scott, Ajit,
> 
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ajit Khaparde
>> Sent: Monday, April 16, 2018 9:51 PM
>> To: dev@dpdk.org
>> Cc: Scott Branden <scott.branden@broadcom.com>
>> Subject: [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in supported by
>> linux kernel
>>
>> From: Scott Branden <scott.branden@broadcom.com>
>>
>> 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.
>>
>> Fix build error when calling pci_is_bridge by not calling/supporting pci_is_bridge
>> with kernel versions before 3.16.
>>
>> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
>> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>

<...>

> This patch fixes the compile error seen on the master branch.
> However there are the following checkpatch.pl  warnings:
> 
> WARNING: LINUX_VERSION_CODE should be avoided, code should be for the version to which it is merged
> #40: FILE: kernel/linux/igb_uio/compat.h:136:
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)

We need version check, so we can ignore this warning

> WARNING: Comparisons should place the constant on the right side of the test
> #40: FILE: kernel/linux/igb_uio/compat.h:136:
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)

Other checks are also like this, I believe better to be compatible.

I think we can ignore both warnings for this case.

> 
> total: 0 errors, 2 warnings, 19 lines checked
> 
> Regards,
> 
> Bernard.
>  
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in supported by linux kernel
  2018-04-17 13:33       ` Ferruh Yigit
@ 2018-04-17 13:49         ` Iremonger, Bernard
  2018-04-17 17:52           ` [dpdk-dev] [PATCH v2] igb_uio: only check for pci bridge if " Ajit Khaparde
  0 siblings, 1 reply; 12+ messages in thread
From: Iremonger, Bernard @ 2018-04-17 13:49 UTC (permalink / raw)
  To: Yigit, Ferruh, Ajit Khaparde, dev; +Cc: Scott Branden


> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Tuesday, April 17, 2018 2:34 PM
> To: Iremonger, Bernard <bernard.iremonger@intel.com>; Ajit Khaparde
> <ajit.khaparde@broadcom.com>; dev@dpdk.org
> Cc: Scott Branden <scott.branden@broadcom.com>
> Subject: Re: [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in supported
> by linux kernel
> 
> On 4/17/2018 1:58 PM, Iremonger, Bernard wrote:
> > Hi Scott, Ajit,
> >
> >> -----Original Message-----
> >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ajit Khaparde
> >> Sent: Monday, April 16, 2018 9:51 PM
> >> To: dev@dpdk.org
> >> Cc: Scott Branden <scott.branden@broadcom.com>
> >> Subject: [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in
> >> supported by linux kernel
> >>
> >> From: Scott Branden <scott.branden@broadcom.com>
> >>
> >> 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.
> >>
> >> Fix build error when calling pci_is_bridge by not calling/supporting
> >> pci_is_bridge with kernel versions before 3.16.
> >>
> >> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
> >> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v2] igb_uio: only check for pci bridge if supported by linux kernel
  2018-04-17 13:49         ` Iremonger, Bernard
@ 2018-04-17 17:52           ` Ajit Khaparde
  2018-04-17 18:07             ` Ferruh Yigit
  0 siblings, 1 reply; 12+ messages in thread
From: Ajit Khaparde @ 2018-04-17 17:52 UTC (permalink / raw)
  To: dev; +Cc: Scott Branden

From: Scott Branden <scott.branden@broadcom.com>

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.

Fix build error when calling pci_is_bridge by not calling/supporting
pci_is_bridge with kernel versions before 3.16.

Fixes: 6f0841b7701b ("igb_uio: bind error if PCIe bridge")

Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
--
v1->v2: add fixes line in commit message.
---
 kernel/linux/igb_uio/compat.h  | 4 ++++
 kernel/linux/igb_uio/igb_uio.c | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/kernel/linux/igb_uio/compat.h b/kernel/linux/igb_uio/compat.h
index ce456d4bb..d9f4d29fc 100644
--- a/kernel/linux/igb_uio/compat.h
+++ b/kernel/linux/igb_uio/compat.h
@@ -121,6 +121,10 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev)
 
 #endif /* < 3.3.0 */
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
+#define HAVE_PCI_IS_BRIDGE_API 1
+#endif
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
 #define HAVE_ALLOC_IRQ_VECTORS 1
 #endif
diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c
index cbc5ab63a..cd9b7e721 100644
--- a/kernel/linux/igb_uio/igb_uio.c
+++ b/kernel/linux/igb_uio/igb_uio.c
@@ -473,10 +473,12 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	void *map_addr;
 	int err;
 
+#ifdef HAVE_PCI_IS_BRIDGE_API
 	if (pci_is_bridge(dev)) {
 		dev_warn(&dev->dev, "Ignoring PCI bridge device\n");
 		return -ENODEV;
 	}
+#endif
 
 	udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL);
 	if (!udev)
-- 
2.15.1 (Apple Git-101)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2] igb_uio: only check for pci bridge if supported by linux kernel
  2018-04-17 17:52           ` [dpdk-dev] [PATCH v2] igb_uio: only check for pci bridge if " Ajit Khaparde
@ 2018-04-17 18:07             ` Ferruh Yigit
  2018-04-20  9:08               ` Thomas Monjalon
  0 siblings, 1 reply; 12+ messages in thread
From: Ferruh Yigit @ 2018-04-17 18:07 UTC (permalink / raw)
  To: Ajit Khaparde, dev; +Cc: Scott Branden

On 4/17/2018 6:52 PM, Ajit Khaparde wrote:
> From: Scott Branden <scott.branden@broadcom.com>
> 
> 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.
> 
> Fix build error when calling pci_is_bridge by not calling/supporting
> pci_is_bridge with kernel versions before 3.16.
> 
> Fixes: 6f0841b7701b ("igb_uio: bind error if PCIe bridge")
> 
> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2] igb_uio: only check for pci bridge if supported by linux kernel
  2018-04-17 18:07             ` Ferruh Yigit
@ 2018-04-20  9:08               ` Thomas Monjalon
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2018-04-20  9:08 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dev, Ferruh Yigit, Scott Branden

17/04/2018 20:07, Ferruh Yigit:
> On 4/17/2018 6:52 PM, Ajit Khaparde wrote:
> > From: Scott Branden <scott.branden@broadcom.com>
> > 
> > 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.
> > 
> > Fix build error when calling pci_is_bridge by not calling/supporting
> > pci_is_bridge with kernel versions before 3.16.
> > 
> > Fixes: 6f0841b7701b ("igb_uio: bind error if PCIe bridge")
> > 
> > Signed-off-by: Scott Branden <scott.branden@broadcom.com>
> > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> > Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-04-20  9:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 16:37 [dpdk-dev] [PATCH v3] igb_uio: bind error if pcie bridge Ajit Khaparde
2018-03-30 10:34 ` Ferruh Yigit
2018-04-11 21:36   ` Thomas Monjalon
2018-04-16 15:35 ` Ferruh Yigit
2018-04-16 20:51   ` [dpdk-dev] [PATCH] igb_uio: only check for pci bridge in supported by linux kernel Ajit Khaparde
2018-04-17  9:35     ` Ferruh Yigit
2018-04-17 12:58     ` Iremonger, Bernard
2018-04-17 13:33       ` Ferruh Yigit
2018-04-17 13:49         ` Iremonger, Bernard
2018-04-17 17:52           ` [dpdk-dev] [PATCH v2] igb_uio: only check for pci bridge if " Ajit Khaparde
2018-04-17 18:07             ` Ferruh Yigit
2018-04-20  9:08               ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).