* [dpdk-dev] [PATCH] dev: fix dev_attach proceeding with vdev on success
@ 2017-07-26 11:52 Gaetan Rivet
2017-07-31 7:46 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Gaetan Rivet @ 2017-07-26 11:52 UTC (permalink / raw)
To: dev; +Cc: Gaetan Rivet, stable, Jan Blunck
When rte_eal_hotplug_add() successfully probe a device, the return value
is zero. The check afterward only returns on error different from
-EINVAL. It should return also on success, as there is no need to
attempt probing the device with vdev.
Fixes: 0bba9e605048 ("eal: use new hotplug API in attach")
Cc: stable@dpdk.org
Cc: Jan Blunck <jblunck@infradead.org>
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 e10b9fd..d74f978 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 && ret != -EINVAL)
+ if (ret != -EINVAL)
return ret;
/*
--
2.1.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] dev: fix dev_attach proceeding with vdev on success
2017-07-26 11:52 [dpdk-dev] [PATCH] dev: fix dev_attach proceeding with vdev on success Gaetan Rivet
@ 2017-07-31 7:46 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2017-07-31 7:46 UTC (permalink / raw)
To: Gaetan Rivet; +Cc: stable, dev, Jan Blunck
26/07/2017 13:52, Gaetan Rivet:
> When rte_eal_hotplug_add() successfully probe a device, the return value
> is zero. The check afterward only returns on error different from
> -EINVAL. It should return also on success, as there is no need to
> attempt probing the device with vdev.
>
> Fixes: 0bba9e605048 ("eal: use new hotplug API in attach")
> Cc: stable@dpdk.org
> Cc: Jan Blunck <jblunck@infradead.org>
>
> Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-31 7:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-26 11:52 [dpdk-dev] [PATCH] dev: fix dev_attach proceeding with vdev on success Gaetan Rivet
2017-07-31 7:46 ` [dpdk-dev] [dpdk-stable] " 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).