summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/conn_object.c
diff options
context:
space:
mode:
authorDavid Howells2017-06-14 18:56:50 +0200
committerDavid S. Miller2017-06-14 21:42:45 +0200
commitf7aec129a356ad049edddcb7e77b04a474fcf41f (patch)
tree103d3fb8a7c99b6c9ebaeaf20d2c891174d72f48 /net/rxrpc/conn_object.c
parentliquidio: fix VF driver off-by-one bug when setting ethtool -C ethX rx-frames (diff)
downloadkernel-qcow2-linux-f7aec129a356ad049edddcb7e77b04a474fcf41f.tar.gz
kernel-qcow2-linux-f7aec129a356ad049edddcb7e77b04a474fcf41f.tar.xz
kernel-qcow2-linux-f7aec129a356ad049edddcb7e77b04a474fcf41f.zip
rxrpc: Cache the congestion window setting
Cache the congestion window setting that was determined during a call's transmission phase when it finishes so that it can be used by the next call to the same peer, thereby shortcutting the slow-start algorithm. The value is stored in the rxrpc_peer struct and is accessed without locking. Each call takes the value that happens to be there when it starts and just overwrites the value when it finishes. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc/conn_object.c')
-rw-r--r--net/rxrpc/conn_object.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/rxrpc/conn_object.c b/net/rxrpc/conn_object.c
index 5bb255107427..929b50d5afe8 100644
--- a/net/rxrpc/conn_object.c
+++ b/net/rxrpc/conn_object.c
@@ -193,6 +193,8 @@ void rxrpc_disconnect_call(struct rxrpc_call *call)
{
struct rxrpc_connection *conn = call->conn;
+ call->peer->cong_cwnd = call->cong_cwnd;
+
spin_lock_bh(&conn->params.peer->lock);
hlist_del_init(&call->error_link);
spin_unlock_bh(&conn->params.peer->lock);