Re: [REGRESSION] NFS is creating a hidden port (left over from xs_bind() )
From: Eric Dumazet
Date: Fri Jun 12 2015 - 11:43:51 EST
On Fri, 2015-06-12 at 10:57 -0400, Trond Myklebust wrote:
> On Fri, Jun 12, 2015 at 10:40 AM, Eric Dumazet <eric.dumazet@xxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/