]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: select privileged port numbers at random
authorChuck Lever <cel@netapp.com>
Thu, 25 May 2006 05:40:49 +0000 (01:40 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 9 Jun 2006 13:34:05 +0000 (09:34 -0400)
commit0066c21309575f8558799465ebdd48b58dc9b6c5
treebcce3ef7e2f66465b09dc485fb1a280c111b2e31
parente3c09e9a2f4a72cd39cbf14eaeed2256a31f9fd2
SUNRPC: select privileged port numbers at random

Make the RPC client select privileged ephemeral source ports at
random.  This improves DRC behavior on the server by using the
same port when reconnecting for the same mount point, but using
a different port for fresh mounts.

The Linux TCP implementation already does this for nonprivileged
ports.  Note that TCP sockets in TIME_WAIT will prevent quick reuse
of a random ephemeral port number by leaving the port INUSE until
the connection transitions out of TIME_WAIT.

Test plan:
Connectathon against every known server implementation using multiple
mount points.  Locking especially.

Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/xprtsock.c