Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755218AbbFLPnq (ORCPT ); Fri, 12 Jun 2015 11:43:46 -0400 Received: from mail-ig0-f193.google.com ([209.85.213.193]:34606 "EHLO mail-ig0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752334AbbFLPnp (ORCPT ); Fri, 12 Jun 2015 11:43:45 -0400 Message-ID: <1434123822.27504.89.camel@edumazet-glaptop2.roam.corp.google.com> Subject: Re: [REGRESSION] NFS is creating a hidden port (left over from xs_bind() ) From: Eric Dumazet To: Trond Myklebust Cc: Steven Rostedt , Anna Schumaker , Linux NFS Mailing List , Linux Network Devel Mailing List , LKML , Andrew Morton Date: Fri, 12 Jun 2015 08:43:42 -0700 In-Reply-To: References: <20150611234929.7b48d314@gandalf.local.home> <1434120035.27504.77.camel@edumazet-glaptop2.roam.corp.google.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1437 Lines: 41 On Fri, 2015-06-12 at 10:57 -0400, Trond Myklebust wrote: > On Fri, Jun 12, 2015 at 10:40 AM, Eric Dumazet wrote: > > Strange, because the usual way to not have time-wait is to use SO_LINGER > > with linger=0 > > > > And apparently xs_tcp_finish_connecting() has this : > > > > sock_reset_flag(sk, SOCK_LINGER); > > tcp_sk(sk)->linger2 = 0; > > Are you sure? I thought that SO_LINGER is more about controlling how > the socket behaves w.r.t. waiting for the TCP_CLOSE state to be > achieved (i.e. about aborting the FIN state negotiation early). I've > never observed an effect on the TCP time-wait states. Definitely this is standard way to avoid time-wait states. Maybe not very well documented. We probably should... http://stackoverflow.com/questions/3757289/tcp-option-so-linger-zero-when-its-required > Yes. SO_REUSEADDR has the problem that it requires you bind to > something other than 0.0.0.0, so it is less appropriate for outgoing > connections; the RPC code really should not have to worry about > routing and routability of a particular source address. OK understood. Are you trying to reuse same 4-tuple ? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/