• C
    SUNRPC: select privileged port numbers at random · b85d8806
    Chuck Lever 提交于
    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: NChuck Lever <cel@netapp.com>
    Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
    b85d8806
xprtsock.c 34.5 KB