From: Gaetan Rivet <gaetan.rivet@6wind.com>
To: dev@dpdk.org
Cc: Gaetan Rivet <gaetan.rivet@6wind.com>
Subject: [dpdk-dev] [PATCH] dev: fix virtual dev attach
Date: Mon, 31 Jul 2017 12:57:05 +0200 [thread overview]
Message-ID: <30721dc00d3d6e2509974511ba4c7d1850191d77.1501496837.git.gaetan.rivet@6wind.com> (raw)
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
next reply other threads:[~2017-07-31 10:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-31 10:57 Gaetan Rivet [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30721dc00d3d6e2509974511ba4c7d1850191d77.1501496837.git.gaetan.rivet@6wind.com \
--to=gaetan.rivet@6wind.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).