From 707a350138976a588edfa1250d368b328465c619 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Mon, 17 Jun 2019 12:25:48 -0700 Subject: [PATCH] LU-12381 ko2iblnd: ignore down interfaces The for_each_netdev() loop in kiblnd_create_dev() scans for all network devices on a system. Currently the code exit when an network device is down but the device could be something besides an IB device. Instead of exiting just ignore any device that is down. This patch is back-ported from the following one: Lustre-commit: 1dea5aac9d9be99c4b317a491f308872b97bf0e6 Lustre-change: https://review.whamcloud.com/35098 Test-Parameters: trivial Fixes: c4b39bf56bbc ("LU-11893 o2iblnd: add secondary IP address handling") Change-Id: I0a3bf808d849cd00711b6ef2e4e5bbd876b64903 Signed-off-by: James Simmons Reviewed-by: Chris Horn Reviewed-by: Amir Shehata Reviewed-on: https://review.whamcloud.com/35249 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lnet/klnds/o2iblnd/o2iblnd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lnet/klnds/o2iblnd/o2iblnd.c b/lnet/klnds/o2iblnd/o2iblnd.c index 3a21fde..b42af07 100644 --- a/lnet/klnds/o2iblnd/o2iblnd.c +++ b/lnet/klnds/o2iblnd/o2iblnd.c @@ -2882,16 +2882,16 @@ kiblnd_create_dev(char *ifname) flags = dev_get_flags(netdev); if (!(flags & IFF_UP)) { - CERROR("Can't query IPoIB interface %s: it's down\n", - netdev->name); - goto unlock; + CWARN("Can't query IPoIB interface %s: it's down\n", + netdev->name); + continue; } in_dev = __in_dev_get_rtnl(netdev); if (!in_dev) { CWARN("Interface %s has no IPv4 status.\n", netdev->name); - goto unlock; + continue; } for_ifa(in_dev) -- 1.8.3.1