[dpdk-dev] [PATCH v2 1/1] pci: default to whitelist mode

Gaetan Rivet gaetan.rivet at 6wind.com
Tue Mar 28 14:01:29 CEST 2017


Expects all devices to be explicitly defined before being probed.

The blacklist mode can be prone to errors, coaxing users in capturing
devices that could be used for management or otherwise.
The whitelist mode offers users more control and highlight mistakes by
making them visible on the command line.

This is more useful to have a clear idea of the state of the system used,
which is better in the context of standalone / headless applications.

Using the -b option will revert to the original behavior.

Signed-off-by: Gaetan Rivet <gaetan.rivet at 6wind.com>
---
v2: justify this default behavior evolution.
---
 lib/librte_eal/common/eal_common_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index 15a0c48..ad0a8be 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -418,7 +418,7 @@ rte_eal_pci_probe(void)
 	int probe_all = 0;
 	int ret = 0;
 
-	if (rte_eal_devargs_type_count(RTE_DEVTYPE_WHITELISTED_PCI) == 0)
+	if (rte_eal_devargs_type_count(RTE_DEVTYPE_BLACKLISTED_PCI) > 0)
 		probe_all = 1;
 
 	TAILQ_FOREACH(dev, &pci_device_list, next) {
-- 
2.1.4



More information about the dev mailing list