From: Matan Azrad <matan@mellanox.com>
To: Matan Azrad <matan@mellanox.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/vdev_netvsc: fix device detection error check
Date: Mon, 5 Feb 2018 12:48:22 +0000 [thread overview]
Message-ID: <1517834902-19874-1-git-send-email-matan@mellanox.com> (raw)
The vdev_netvsc driver does periodic detection of PCI devices matched
to the netvsc existed interfaces.
When it finds a match, the PCI address is written to the pipe of the
associated fail-safe PMD instance and a positive value is returned to
the periodic check which is wrongly considered as error.
Change the check to consider only a negative value as error.
Fixes: e7dc5d7becc5 ("net/vdev_netvsc: implement core functionality")
Signed-off-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index a8a1a7f..cbf4d59 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -388,7 +388,7 @@ static LIST_HEAD(, vdev_netvsc_ctx) vdev_netvsc_ctx_list =
LIST_FOREACH(ctx, &vdev_netvsc_ctx_list, entry) {
ret = vdev_netvsc_foreach_iface(vdev_netvsc_device_probe, ctx);
- if (ret)
+ if (ret < 0)
break;
}
if (!vdev_netvsc_ctx_count)
--
1.8.3.1
next reply other threads:[~2018-02-05 12:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 12:48 Matan Azrad [this message]
2018-02-05 17:27 ` Ferruh Yigit
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=1517834902-19874-1-git-send-email-matan@mellanox.com \
--to=matan@mellanox.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).