devargs: allow to provide arguments per pci device for bsd
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 25 Apr 2014 11:59:44 +0000 (13:59 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 29 Apr 2014 23:31:30 +0000 (01:31 +0200)
The bsdapp part was missing in commit 8e245de6ca7e050e282cd49ffd5e68a5b6ff62f5.

Add the ability to pass some specific initialization arguments to PCI
devices at start-up.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
lib/librte_eal/bsdapp/eal/eal_pci.c

index 64bdea0..987b446 100644 (file)
@@ -66,6 +66,7 @@
 #include <rte_malloc.h>
 #include <rte_string_fns.h>
 #include <rte_debug.h>
+#include <rte_devargs.h>
 
 #include "rte_pci_dev_ids.h"
 #include "eal_filesystem.h"
@@ -471,7 +472,9 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d
                                dev->id.device_id, dr->name);
 
                /* no initialization when blacklisted, return without error */
-               if (dev->blacklisted) {
+               if (dev->devargs != NULL &&
+                       dev->devargs->type == RTE_DEVTYPE_BLACKLISTED_PCI) {
+
                        RTE_LOG(DEBUG, EAL, "  Device is blacklisted, not initializing\n");
                        return 0;
                }