summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/ar-transport.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-02-07 19:58:44 +0100
committerDavid Howells <dhowells@redhat.com>2014-02-26 18:25:06 +0100
commit5873c0834f8896aa9da338b941035a2f8b29e99b (patch)
tree4faf1ab1a7f95be86c5d9d775b82b6d01012c9a5 /net/rxrpc/ar-transport.c
parentaf_rxrpc: Fix UDP MTU calculation from ICMP_FRAG_NEEDED (diff)
downloadlinux-5873c0834f8896aa9da338b941035a2f8b29e99b.tar.xz
linux-5873c0834f8896aa9da338b941035a2f8b29e99b.zip
af_rxrpc: Add sysctls for configuring RxRPC parameters
Add sysctls for configuring RxRPC protocol handling, specifically controls on delays before ack generation, the delay before resending a packet, the maximum lifetime of a call and the expiration times of calls, connections and transports that haven't been recently used. More info added in Documentation/networking/rxrpc.txt. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/ar-transport.c')
-rw-r--r--net/rxrpc/ar-transport.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/rxrpc/ar-transport.c b/net/rxrpc/ar-transport.c
index 92df566930b9..1976dec84f29 100644
--- a/net/rxrpc/ar-transport.c
+++ b/net/rxrpc/ar-transport.c
@@ -17,11 +17,15 @@
#include <net/af_rxrpc.h>
#include "ar-internal.h"
+/*
+ * Time after last use at which transport record is cleaned up.
+ */
+unsigned rxrpc_transport_expiry = 3600 * 24;
+
static void rxrpc_transport_reaper(struct work_struct *work);
static LIST_HEAD(rxrpc_transports);
static DEFINE_RWLOCK(rxrpc_transport_lock);
-static unsigned long rxrpc_transport_timeout = 3600 * 24;
static DECLARE_DELAYED_WORK(rxrpc_transport_reap, rxrpc_transport_reaper);
/*
@@ -235,7 +239,7 @@ static void rxrpc_transport_reaper(struct work_struct *work)
if (likely(atomic_read(&trans->usage) > 0))
continue;
- reap_time = trans->put_time + rxrpc_transport_timeout;
+ reap_time = trans->put_time + rxrpc_transport_expiry;
if (reap_time <= now)
list_move_tail(&trans->link, &graveyard);
else if (reap_time < earliest)
@@ -271,7 +275,7 @@ void __exit rxrpc_destroy_all_transports(void)
{
_enter("");
- rxrpc_transport_timeout = 0;
+ rxrpc_transport_expiry = 0;
cancel_delayed_work(&rxrpc_transport_reap);
rxrpc_queue_delayed_work(&rxrpc_transport_reap, 0);