Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755178AbcCBWC2 (ORCPT ); Wed, 2 Mar 2016 17:02:28 -0500 Received: from smtp1.ccs.ornl.gov ([160.91.199.38]:59318 "EHLO smtp1.ccs.ornl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932556AbcCBWCZ (ORCPT ); Wed, 2 Mar 2016 17:02:25 -0500 From: James Simmons To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin Cc: Linux Kernel Mailing List , Lustre Development List , Liang Zhen Subject: [PATCH 01/27] staging: lustre: set downis to 1 if there's no NI for remote net Date: Wed, 2 Mar 2016 17:01:44 -0500 Message-Id: <1456956130-6110-2-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1456956130-6110-1-git-send-email-jsimmons@infradead.org> References: <1456956130-6110-1-git-send-email-jsimmons@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1100 Lines: 35 From: Liang Zhen 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 --- drivers/staging/lustre/lnet/lnet/router.c | 7 +++++++ 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 5e8b0ba..2eae8f6 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; } } -- 1.7.1