From patchwork Fri Sep 11 13:04:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 7161611 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 28FDE9F380 for ; Fri, 11 Sep 2015 13:07:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29CFC20774 for ; Fri, 11 Sep 2015 13:07:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F198A205EB for ; Fri, 11 Sep 2015 13:07:12 +0000 (UTC) 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-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;