Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2340179imm; Mon, 28 May 2018 06:21:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqvB3asFk+R8R87BqroP6dkbbD2bkLWe0ZC1by+IzwGdQwYy+9wGTBC2zmYp8VlvqQ80tno X-Received: by 2002:aa7:83c7:: with SMTP id j7-v6mr13481575pfn.50.1527513690429; Mon, 28 May 2018 06:21:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527513690; cv=none; d=google.com; s=arc-20160816; b=kIF2Q/rwfUc54Ll+5HWu9iWujqK1T7tUxljx3axVdl7/q0M+2vl19AiJBl2KyI09F9 a78fz/UnZ/i7T9JP3hlRMqi4uwTjXMf85aeTuZwDH0nJyPmkgU3kBDrFuG3kz15sIVB2 IYydk6zk5PuDn2s4Lpl+4h52pEy7GnZ6LkBtwqPDvLpK2si3Vo3e294qlvSyo/X2aAE/ hon/mXuvmO9sldqJaLDg9NjdHp/Y+HPFQfucgGYYnxUUiCYHKtJWkGc1IpwBsULQADss kVAKgbApmvUYj5rOcX95RuQp2IKCxHDoAVP6R6j35lfG6CXB8AovKCFqnFZQSCd7yYQ6 26og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=BGhOVnWjSDUZawTRF+hNdOhCl2ZNFojHDBmYUUdPGZk=; b=L87R5uCkBOKlr0i3UEHNYTWfIgTFkdOoAUF3TUZF6T4SqDLzM3PPj3h23VITztgHFT 1P7amkpfhR6M9bfdY7hHbmEUwdeVpNg4R6rwP93tfHzb8N3StHx+yDBzxWqpw0jwYls3 5wTKxUZ5EFso4AUkR95jWpNSOFzreJGrctO/dG82DsEKZOIBDp4my7/c5AtFAEe99RqG GkPYlx8HBXJaIIke+n/ltMGSl+CfZbkZWH4eRKqDQ/xhsTfOWBApMtP22Z9oH69euIyS E+v7SqFyTFp4CS/f4wQZZ3blyVXK6WArRw6Usa1UXlq7f92ZwTQ6gA4r7FguxyzjrDCo 8mGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mwW0Y7iw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z6-v6si10367312pgr.4.2018.05.28.06.21.15; Mon, 28 May 2018 06:21:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mwW0Y7iw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165319AbeE1NUe (ORCPT + 99 others); Mon, 28 May 2018 09:20:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:39024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163362AbeE1KtQ (ORCPT ); Mon, 28 May 2018 06:49:16 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 88C8F20660; Mon, 28 May 2018 10:49:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504556; bh=Cv3NGdSa6q4rqk+UO0t7XIsmN7vLHasDbDugsRtX8Ok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mwW0Y7iwObPwLFQG1WXBWZ0dHfGxuXXckyXe95MgZquPKtnXtGxSMNigFC+3HPv/U D6u+ClGwY6d1vfc3j9wvJTXbcIP19+bYvkz1m1FLgxMENI48MOzIlu4DTnTAfBpM9l tcMSJTIJyS/X3H1tp54Oa839668VjD2H47Ok2nbc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Karsten Graul , Ursula Braun , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 174/496] net/smc: use link_id of server in confirm link reply Date: Mon, 28 May 2018 11:59:19 +0200 Message-Id: <20180528100327.212059258@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Karsten Graul [ Upstream commit 2be922f31606f114119f48de3207d122a90e7357 ] The CONFIRM LINK reply message must contain the link_id sent by the server. And set the link_id explicitly when initializing the link. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/smc/smc_core.c | 1 + net/smc/smc_llc.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -174,6 +174,7 @@ static int smc_lgr_create(struct smc_soc lnk = &lgr->lnk[SMC_SINGLE_LINK]; /* initialize link */ + lnk->link_id = SMC_SINGLE_LINK; lnk->smcibdev = smcibdev; lnk->ibport = ibport; lnk->path_mtu = smcibdev->pattr[ibport - 1].active_mtu; --- a/net/smc/smc_llc.c +++ b/net/smc/smc_llc.c @@ -92,7 +92,7 @@ int smc_llc_send_confirm_link(struct smc memcpy(confllc->sender_mac, mac, ETH_ALEN); memcpy(confllc->sender_gid, gid, SMC_GID_SIZE); hton24(confllc->sender_qp_num, link->roce_qp->qp_num); - /* confllc->link_num = SMC_SINGLE_LINK; already done by memset above */ + confllc->link_num = link->link_id; memcpy(confllc->link_uid, lgr->id, SMC_LGR_ID_SIZE); confllc->max_links = SMC_LINKS_PER_LGR_MAX; /* send llc message */