From: Liang Zhen Date: Wed, 2 Mar 2016 22:01:44 +0000 (-0500) Subject: staging: lustre: set downis to 1 if there's no NI for remote net X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e816f2352862db069c147d739b934a9544584ac9;p=linux-beck.git 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 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6060 Reviewed-on: http://review.whamcloud.com/13417 Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c index 5e8b0ba763e9..2eae8f60a878 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; } }