From f99b4b07a68133d73b7ed9134d931098ca633e3d Mon Sep 17 00:00:00 2001 From: Matan Azrad Date: Mon, 5 Feb 2018 12:48:22 +0000 Subject: [PATCH] net/vdev_netvsc: fix device detection error check 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 --- 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 a8a1a7fe4e..cbf4d590a4 100644 --- a/drivers/net/vdev_netvsc/vdev_netvsc.c +++ b/drivers/net/vdev_netvsc/vdev_netvsc.c @@ -388,7 +388,7 @@ vdev_netvsc_alarm(__rte_unused void *arg) 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) -- 2.20.1