DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] dev: fix virtual dev attach
@ 2017-07-31 10:57 Gaetan Rivet
  2017-07-31 10:59 ` [dpdk-dev] [PATCH v2] " Gaetan Rivet
  0 siblings, 1 reply; 4+ messages in thread
From: Gaetan Rivet @ 2017-07-31 10:57 UTC (permalink / raw)
  To: dev; +Cc: Gaetan Rivet

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 <gaetan.rivet@6wind.com>
---
 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

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

end of thread, other threads:[~2017-07-31 13:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-31 10:57 [dpdk-dev] [PATCH] dev: fix virtual dev attach Gaetan Rivet
2017-07-31 10:59 ` [dpdk-dev] [PATCH v2] " Gaetan Rivet
2017-07-31 12:58   ` [dpdk-dev] [PATCH v3] " Gaetan Rivet
2017-07-31 13:20     ` Thomas Monjalon

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