rxrpc: Allow multiple client connections to the same peer
authorDavid Howells <dhowells@redhat.com>
Thu, 2 Jul 2020 23:39:47 +0000 (00:39 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 8 Sep 2020 20:11:47 +0000 (21:11 +0100)
Allow the number of parallel connections to a machine to be expanded from a
single connection to a maximum of four.  This allows up to 16 calls to be
in progress at the same time to any particular peer instead of 4.

Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/conn_client.c

index 8b41c87..0e4e187 100644 (file)
@@ -486,6 +486,12 @@ static void rxrpc_maybe_add_conn(struct rxrpc_bundle *bundle, gfp_t gfp)
        if (!usable)
                goto alloc_conn;
 
+       if (!bundle->avail_chans &&
+           !bundle->try_upgrade &&
+           !list_empty(&bundle->waiting_calls) &&
+           usable < ARRAY_SIZE(bundle->conns))
+               goto alloc_conn;
+
        spin_unlock(&bundle->channel_lock);
        _leave("");
        return;