summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lnet/lnet/router.c
diff options
context:
space:
mode:
authorLiang Zhen <liang.zhen@intel.com>2016-03-02 17:01:44 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-02 15:23:49 -0800
commite816f2352862db069c147d739b934a9544584ac9 (patch)
treeb5b5f27440471726f0ed214e6625c80b3a388a32 /drivers/staging/lustre/lnet/lnet/router.c
parent4ae51a74f048c820ff85ff68cace8d73bc51b728 (diff)
downloadlinux-0-day-e816f2352862db069c147d739b934a9544584ac9.tar.gz
linux-0-day-e816f2352862db069c147d739b934a9544584ac9.tar.xz
staging: lustre: set downis to 1 if there's no NI for remote net
lnet_route_t::lr_downis is marked as zero even if there is no NI to target network, this is wrong and breaks logic of ARF. This patch fixes this problem. Signed-off-by: Liang Zhen <liang.zhen@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6060 Reviewed-on: http://review.whamcloud.com/13417 Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/lnet/router.c')
-rw-r--r--drivers/staging/lustre/lnet/lnet/router.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c
index 5e8b0ba763e96..2eae8f60a8783 100644
--- a/drivers/staging/lustre/lnet/lnet/router.c
+++ b/drivers/staging/lustre/lnet/lnet/router.c
@@ -718,6 +718,13 @@ lnet_parse_rc_info(lnet_rc_data_t *rcd)
rte->lr_downis = 0;
continue;
}
+ /**
+ * if @down is zero and this route is single-hop, it means
+ * we can't find NI for target network
+ */
+ if (!down && rte->lr_hops == 1)
+ down = 1;
+
rte->lr_downis = down;
}
}