summaryrefslogtreecommitdiff
path: root/net/rxrpc/conn_client.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-07-03 00:39:47 +0100
committerDavid Howells <dhowells@redhat.com>2020-09-08 21:11:47 +0100
commit288827d53e8edcca94caf6a507105fcbd20f419d (patch)
tree348797daf7765bf27e56aca258a47a5fdcad4677 /net/rxrpc/conn_client.c
parent245500d853e9f20036cec7df4f6984ece4c6bf26 (diff)
rxrpc: Allow multiple client connections to the same peer
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>
Diffstat (limited to 'net/rxrpc/conn_client.c')
-rw-r--r--net/rxrpc/conn_client.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c
index 8b41c87b3333..0e4e1879c24d 100644
--- a/net/rxrpc/conn_client.c
+++ b/net/rxrpc/conn_client.c
@@ -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;