From patchwork Tue Aug 11 12:20:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 11709201 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 815E91392 for ; Tue, 11 Aug 2020 12:21:31 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 69A092075D for ; Tue, 11 Aug 2020 12:21:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69A092075D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lustre-devel-bounces@lists.lustre.org Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 2B6AF2F3785; Tue, 11 Aug 2020 05:20:57 -0700 (PDT) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from smtp4.ccs.ornl.gov (smtp4.ccs.ornl.gov [160.91.203.40]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id B90E32F82FF for ; Tue, 11 Aug 2020 05:20:29 -0700 (PDT) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp4.ccs.ornl.gov (Postfix) with ESMTP id 2FEE81005658; Tue, 11 Aug 2020 08:20:21 -0400 (EDT) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id 2E9C82B7; Tue, 11 Aug 2020 08:20:21 -0400 (EDT) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Tue, 11 Aug 2020 08:20:19 -0400 Message-Id: <1597148419-20629-24-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1597148419-20629-1-git-send-email-jsimmons@infradead.org> References: <1597148419-20629-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 23/23] lnet: socklnd: NID to interface mapping issues X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Serguei Smirnov , Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" From: Serguei Smirnov Fix the NID to interface mapping in ksocknal_startup to make sure the messages go out the interface assigned by LNet on a system with multiple interfaces configured. Fixes: 3aa523159321 ("lnet: consoldate secondary IP address handling") WC-bug-id: https://jira.whamcloud.com/browse/LU-13790 Lustre-commit: 00f672da3ba9a ("LU-13790 socklnd: NID to interface mapping issues") Signed-off-by: Serguei Smirnov Reviewed-on: https://review.whamcloud.com/39408 Reviewed-by: Amir Shehata Reviewed-by: James Simmons Reviewed-by: Neil Brown Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- net/lnet/klnds/socklnd/socklnd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/lnet/klnds/socklnd/socklnd.c b/net/lnet/klnds/socklnd/socklnd.c index 91925475..a7c0b65 100644 --- a/net/lnet/klnds/socklnd/socklnd.c +++ b/net/lnet/klnds/socklnd/socklnd.c @@ -2694,7 +2694,7 @@ static int ksocknal_push(struct lnet_ni *ni, struct lnet_process_id id) ni->ni_interfaces[i]) != 0) continue; - ksi = &net->ksnn_interfaces[j]; + ksi = &net->ksnn_interfaces[net->ksnn_ninterfaces]; ni->ni_dev_cpt = ifaces[j].li_cpt; ksi->ksni_ipaddr = ifaces[j].li_ipaddr; ksi->ksni_index =