- unsigned idx = 0;
-
- memset(blacklist, 0, sizeof (blacklist));
-
- TAILQ_FOREACH(dev, &device_list, next) {
- if (idx >= sizeof (blacklist) / sizeof (blacklist[0])) {
- printf("Error: too many devices to blacklist");
+ unsigned i = 0;
+ char pci_addr_str[16];
+
+ TAILQ_FOREACH(dev, &pci_device_list, next) {
+ snprintf(pci_addr_str, sizeof(pci_addr_str), PCI_PRI_FMT,
+ dev->addr.domain, dev->addr.bus, dev->addr.devid,
+ dev->addr.function);
+ if (rte_eal_devargs_add(RTE_DEVTYPE_BLACKLISTED_PCI,
+ pci_addr_str) < 0) {
+ printf("Error: cannot blacklist <%s>", pci_addr_str);