From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matan Azrad Subject: [PATCH] net/vdev_netvsc: fix device detection error check Date: Mon, 5 Feb 2018 12:48:22 +0000 Message-ID: <1517834902-19874-1-git-send-email-matan@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain Cc: dev@dpdk.org To: Matan Azrad Return-path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0068.outbound.protection.outlook.com [104.47.1.68]) by dpdk.org (Postfix) with ESMTP id 7A1E01B2F4 for ; Mon, 5 Feb 2018 13:48:34 +0100 (CET) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 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