DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] pci: fix probing blacklisted device with RTE_PCI_DRV_MULTIPLE flag
@ 2013-04-16  8:31 Julien Courtat
  2013-04-16 15:11 ` Thomas Monjalon
  2016-08-26  0:33 ` Stephen Hemminger
  0 siblings, 2 replies; 3+ messages in thread
From: Julien Courtat @ 2013-04-16  8:31 UTC (permalink / raw)
  To: dev

When blacklisting network adapters that share a PCI bus address with multiple
ports such as Mellanox ConnectX-3 (librte_pmd_mlx4), RTE applications
enter infinite loops while probing PCI devices.

This commit removes this probe on subsequent instances for blacklisted devices
that have RTE_PCI_DRV_MULTIPLE set.

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
---
 lib/librte_eal/common/eal_common_pci.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index 3a6ab70..4e1a944 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -91,9 +91,11 @@ pci_probe_all_drivers(struct rte_pci_device *dev)
 		if (rte_eal_pci_probe_one_driver(dr, dev))
 			continue;
 		/* initialize subsequent driver instances for this device */
-		if (dr->drv_flags & RTE_PCI_DRV_MULTIPLE)
+		if ((dr->drv_flags & RTE_PCI_DRV_MULTIPLE) &&
+		    (!dev->blacklisted)) {
 			while (rte_eal_pci_probe_one_driver(dr, dev) == 0)
 				;
+		}
 		return 0;
 	}
 	return -1;
-- 
1.7.2.5

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

* Re: [dpdk-dev] [PATCH] pci: fix probing blacklisted device with RTE_PCI_DRV_MULTIPLE flag
  2013-04-16  8:31 [dpdk-dev] [PATCH] pci: fix probing blacklisted device with RTE_PCI_DRV_MULTIPLE flag Julien Courtat
@ 2013-04-16 15:11 ` Thomas Monjalon
  2016-08-26  0:33 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2013-04-16 15:11 UTC (permalink / raw)
  To: Julien Courtat; +Cc: dev

pushed, thanks !

16/04/2013 10:31, Julien Courtat :
> When blacklisting network adapters that share a PCI bus address with multiple
> ports such as Mellanox ConnectX-3 (librte_pmd_mlx4), RTE applications
> enter infinite loops while probing PCI devices.
> 
> This commit removes this probe on subsequent instances for blacklisted devices
> that have RTE_PCI_DRV_MULTIPLE set.
> 
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
> ---
>  lib/librte_eal/common/eal_common_pci.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
> index 3a6ab70..4e1a944 100644
> --- a/lib/librte_eal/common/eal_common_pci.c
> +++ b/lib/librte_eal/common/eal_common_pci.c
> @@ -91,9 +91,11 @@ pci_probe_all_drivers(struct rte_pci_device *dev)
>  		if (rte_eal_pci_probe_one_driver(dr, dev))
>  			continue;
>  		/* initialize subsequent driver instances for this device */
> -		if (dr->drv_flags & RTE_PCI_DRV_MULTIPLE)
> +		if ((dr->drv_flags & RTE_PCI_DRV_MULTIPLE) &&
> +		    (!dev->blacklisted)) {
>  			while (rte_eal_pci_probe_one_driver(dr, dev) == 0)
>  				;
> +		}
>  		return 0;
>  	}
>  	return -1;

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

* Re: [dpdk-dev] [PATCH] pci: fix probing blacklisted device with RTE_PCI_DRV_MULTIPLE flag
  2013-04-16  8:31 [dpdk-dev] [PATCH] pci: fix probing blacklisted device with RTE_PCI_DRV_MULTIPLE flag Julien Courtat
  2013-04-16 15:11 ` Thomas Monjalon
@ 2016-08-26  0:33 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2016-08-26  0:33 UTC (permalink / raw)
  To: Julien Courtat; +Cc: dev

On Tue, 16 Apr 2013 10:31:48 +0200
Julien Courtat <julien.courtat@6wind.com> wrote:

> +		if ((dr->drv_flags & RTE_PCI_DRV_MULTIPLE) &&
> +		    (!dev->blacklisted)) {

parens around !dev->blacklisted are unnecessary

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

end of thread, other threads:[~2016-08-26  0:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-16  8:31 [dpdk-dev] [PATCH] pci: fix probing blacklisted device with RTE_PCI_DRV_MULTIPLE flag Julien Courtat
2013-04-16 15:11 ` Thomas Monjalon
2016-08-26  0:33 ` Stephen Hemminger

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).