Thread (4 messages) 4 messages, 2 authors, 2017-07-31
STALE3283d

[PATCH] dev: fix virtual dev attach

From: Gaetan Rivet <hidden>
Date: 2017-07-31 10:57:19
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

If the device cannot be parsed as a PCI device, the rte_devargs
function returns -EFAULT. This error code signifies that the address
given to the PCI bus is invalid. When it happens, the best course of
action is to try to plug the device using the vdev bus.

Fixes: 1c35f666df07 ("dev: fix attach proceeding with vdev on PCI
success")

Signed-off-by: Gaetan Rivet <redacted>
---
 lib/librte_eal/common/eal_common_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index d74f978..97b063e 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -74,7 +74,7 @@ int rte_eal_dev_attach(const char *name, const char *devargs)
 	}
 
 	ret = rte_eal_hotplug_add("pci", name, devargs);
-	if (ret != -EINVAL)
+	if (ret != -EINVAL && ret != -EFAULT)
 		return ret;
 
 	/*
-- 
2.1.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help