From patchwork Fri Sep 11 13:04:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 516802 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 31D1F14030C for ; Fri, 11 Sep 2015 23:07:24 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=eO18TNMI; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZaO10-00075J-RS; Fri, 11 Sep 2015 13:05:18 +0000 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZaO0y-0005dX-4v for linux-arm-kernel@lists.infradead.org; Fri, 11 Sep 2015 13:05:16 +0000 Received: by padhk3 with SMTP id hk3so74784353pad.3 for ; Fri, 11 Sep 2015 06:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; bh=UUl/7ogxtrEPVDo43PtwCEXG1TLYqB1BR5SxCX2E9V0=; b=eO18TNMI+uz29fC4KgnFh06KHMlAC/oYa5blmNg66RLjFjdPNtHt04Sz/Ud2kXkDij LPDc1HcvkHncMz6me9mAH/Xz+7UqFZNvgFavEHpU0DmS79WW4aYlkLho4fAbHqLkTCHB kgZ02hSpvIvRbgpqu89HzWXXxoHs5dxJqC/XUoVc19cvqy19oQST56aBsKWNBR731yiP J82gAAgGyUToqYMZXl6v7IDJdPebaLx7ttskRJUtrpBjfQ8MbOHt3hLSgo9rihFO6T/2 sXfcrQStRdqz8GmWMWpl5CZCaiBRByttUWX0USLLKHHRLu1l9Wnj1yyI4M35OEK1yh4v kbcQ== X-Received: by 10.66.237.97 with SMTP id vb1mr86976545pac.139.1441976692965; Fri, 11 Sep 2015 06:04:52 -0700 (PDT) Received: from [172.29.161.118] ([172.29.161.118]) by smtp.gmail.com with ESMTPSA id uv5sm398625pbc.12.2015.09.11.06.04.51 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 11 Sep 2015 06:04:52 -0700 (PDT) Message-ID: <1441976691.4619.58.camel@edumazet-glaptop2.roam.corp.google.com> Subject: Re: NFS/TCP/IPv6 acting strangely in 4.2 From: Eric Dumazet To: Russell King - ARM Linux Date: Fri, 11 Sep 2015 06:04:51 -0700 In-Reply-To: <20150911113839.GO21084@n2100.arm.linux.org.uk> References: <20150911113839.GO21084@n2100.arm.linux.org.uk> X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150911_060516_232406_47574A6B X-CRM114-Status: GOOD ( 16.12 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c03:0:0:0:22e listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eric.dumazet[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, linux-nfs@vger.kernel.org, Trond Myklebust , Anna Schumaker , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org On Fri, 2015-09-11 at 12:38 +0100, Russell King - ARM Linux wrote: > I have a recent Marvell Armada 388 board here which uses the mvneta > driver. I'm seeing some weird effects with NFS with it acting as a > client. Unfortunately, the board does not have a functional RTC. > > The NFS server is the same NFS server that I've used for years with > multiple other clients (it's my main NFS server) and it continues to > support all other clients without any ill effect. The NFS server > kernel is rather old now, being a 3.x kernel. > > The NFS client appears to connect using TCP/IPv6 and initially is > accessible. Everything appears to work normally, and then the NFS > server appears to stop responding. > > Running tcpdump on the NFS server, and then dumping the captured > packets > with tshark (because tcpdump appears not to understand IPv6 SYNs on > the > NFS port) shows: > > 3 0.030036 armada388 -> n2100 TCP 843→nfs [SYN] Seq=936803106 > Win=28800 Len=0 MSS=1440 SACK_PERM=1 TSval=892366 TSecr=0 WS=128 > 4 0.030409 n2100 -> armada388 TCP nfs→843 [SYN, ACK] Seq=409465870 > Ack=936803107 Win=28560 Len=0 MSS=1440 SACK_PERM=1 > TSval=818169117 TSecr=892366 WS=64 > 5 0.030493 armada388 -> n2100 TCP [TCP Port numbers reused] > 843→nfs [SYN] Seq=936803633 Win=28800 Len=0 MSS=1440 SACK_PERM=1 > TSval=892366 TSecr=0 WS=128 Yes, this packet looks very wrong. Like two simultaneous connect with same source port. It is not a retransmit (Seq numbers differ) > 6 0.030699 n2100 -> armada388 TCP nfs→843 [RST, ACK] Seq=0 > Ack=936803634 Win=0 Len=0 > 7 0.030766 armada388 -> n2100 TCP 843→nfs [RST] Seq=936803107 > Win=0 Len=0 I suspect port reuse in NFS being broken. Have you tried to apply commit 099392048cd443349c50310f7fdc96070e40f4e7 Author: Trond Myklebust Date: Sat Aug 29 19:11:21 2015 -0700 SUNRPC: Prevent SYN+SYNACK+RST storms Add a shutdown() call before we release the socket in order to ensure the reset is sent before we try to reconnect. Signed-off-by: Trond Myklebust diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 214ca9dfb14e..7be90bc1a7c2 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -822,6 +822,8 @@ static void xs_reset_transport(struct sock_xprt *transport) if (atomic_read(&transport->xprt.swapper)) sk_clear_memalloc(sk); + kernel_sock_shutdown(sock, SHUT_RDWR); + write_lock_bh(&sk->sk_callback_lock); transport->inet = NULL; transport->sock = NULL;