Message ID | 20180910150900.10564.91528.stgit@manet.1015granger.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-nfs-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 242A0109C for <patchwork-linux-nfs@patchwork.kernel.org>; Mon, 10 Sep 2018 15:09:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13DE328EDC for <patchwork-linux-nfs@patchwork.kernel.org>; Mon, 10 Sep 2018 15:09:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0808228F80; Mon, 10 Sep 2018 15:09:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8D4528EDC for <patchwork-linux-nfs@patchwork.kernel.org>; Mon, 10 Sep 2018 15:09:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728095AbeIJUDe (ORCPT <rfc822;patchwork-linux-nfs@patchwork.kernel.org>); Mon, 10 Sep 2018 16:03:34 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:51200 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727411AbeIJUDe (ORCPT <rfc822;linux-nfs@vger.kernel.org>); Mon, 10 Sep 2018 16:03:34 -0400 Received: by mail-it0-f65.google.com with SMTP id e14-v6so29941446itf.1; Mon, 10 Sep 2018 08:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=9tTb/78Zol2w1A0USSNlFYpO+IZVFHTYv0sadfMYeBY=; b=clVopDuNaevuqaasKAP8ARywRCttvX9fQh62IJP/aj7MI57nUhva/jDD9reH6dyoIC MbIyGA3j9d5nMG5yqgbjeBCP66Zhtvb2jIvSAPVmWE2WpQNN4NfDwPVqx4s2A51fCg6n k9D/W9DT6IIQv8xPIEkZOk+KfaUkexr1VqzsAPLg2eUvCkzeW/RXzUNrDrYfbdsEtuGB EVpHVsGfAD8OMqEZIcFMqLq3WCNJqUHqGhTVF5yuzl8VMdI8WNLrPqf2iURSLTeXvjt5 xArB8MhXeKLBLFWZgjTXvMf7RxGqIHGfgsV+j7FkETgaueb7uRllLxHcFCpdGS5W++wK NBGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=9tTb/78Zol2w1A0USSNlFYpO+IZVFHTYv0sadfMYeBY=; b=B3IlkEd14PwyJqOkaN0eTtLda8X9F6CW2h0WP52e7ad920NbDsZ6WH40eHglE+BbFb O2/hfbmUdCGz+HMQrA1TCi4k7wu41vNKZixOZE2txfCMzUqNXmlJ+92I2n7VxOAodYAf Cte+TTds94Fucyr3GPLt49+wRnbcaYG6Xw9VnlHtRcAkfDs1OMz1UGc/d3N6aW0LPXMd 2B+zh6TepK26rPLQ18hu2uJHaiO6hsO1+8PBpoaEv2Kl6Bx1nWGBpz7kQrfCCAuw8uoo QBFuP/nllon5nlh8ROrrU53CxlStD93PmzLjWvLvho9BwTgxkvDgcmM/YaL5hbkAks6k SHdw== X-Gm-Message-State: APzg51CUXuzxLBcH5p0fApRaBK7d6ZJC5C5NJx39VGOBe9wIxNs+zoiR SwS+nHhX518tURrhGsbTdu59oc3R X-Google-Smtp-Source: ANB0Vda1P7KwGjDknnH72s3a2VNCyC8ttNByLCcuR62AoU1EflgUMTX8RWaVZPVpH/XZyjeEH+cEuw== X-Received: by 2002:a02:344a:: with SMTP id z10-v6mr6033804jaz.111.1536592142005; Mon, 10 Sep 2018 08:09:02 -0700 (PDT) Received: from gateway.1015granger.net (c-68-61-232-219.hsd1.mi.comcast.net. [68.61.232.219]) by smtp.gmail.com with ESMTPSA id p18-v6sm4900833ioh.39.2018.09.10.08.09.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Sep 2018 08:09:01 -0700 (PDT) Received: from manet.1015granger.net (manet.1015granger.net [192.168.1.51]) by gateway.1015granger.net (8.14.7/8.14.7) with ESMTP id w8AF90nN015150; Mon, 10 Sep 2018 15:09:00 GMT Subject: [PATCH v1 01/22] xprtrdma: Reset credit grant properly after a disconnect From: Chuck Lever <chuck.lever@oracle.com> To: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org Date: Mon, 10 Sep 2018 11:09:00 -0400 Message-ID: <20180910150900.10564.91528.stgit@manet.1015granger.net> In-Reply-To: <20180910150040.10564.97487.stgit@manet.1015granger.net> References: <20180910150040.10564.97487.stgit@manet.1015granger.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: <linux-nfs.vger.kernel.org> X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
NFS/RDMA client patches for v4.20
|
expand
|
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index 143ce25..98cbc7b 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c @@ -468,6 +468,12 @@ xprt->reestablish_timeout = 0; xprt_disconnect_done(xprt); rpcrdma_ep_disconnect(ep, ia); + + /* Prepare @xprt for the next connection by reinitializing + * its credit grant to one (see RFC 8166, Section 3.3.3). + */ + r_xprt->rx_buf.rb_credits = 1; + xprt->cwnd = RPC_CWNDSHIFT; } /**
On a fresh connection, an RPC/RDMA client is supposed to send only one RPC Call until it gets a credit grant in the first RPC Reply from the server [RFC 8166, Section 3.3.3]. There is a bug in the Linux client's credit accounting mechanism introduced by commit e7ce710a8802 ("xprtrdma: Avoid deadlock when credit window is reset"). On connect, it simply dumps all pending RPC Calls onto the new connection. Servers have been tolerant of this bad behavior. Currently no server implementation ever changes its credit grant over reconnects, and servers always repost enough Receives before connections are fully established. To correct this issue, ensure that the client resets both the credit grant _and_ the congestion window when handling a reconnect. Fixes: e7ce710a8802 ("xprtrdma: Avoid deadlock when credit ... ") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: stable@kernel.org --- net/sunrpc/xprtrdma/transport.c | 6 ++++++ 1 file changed, 6 insertions(+)