1 /* sysctls for configuring RxRPC operating parameters
3 * Copyright (C) 2014 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
12 #include <linux/sysctl.h>
14 #include <net/af_rxrpc.h>
15 #include "ar-internal.h"
17 static struct ctl_table_header *rxrpc_sysctl_reg_table;
18 static const unsigned zero = 0;
19 static const unsigned one = 1;
22 * RxRPC operating parameters.
24 * See Documentation/networking/rxrpc.txt and the variable definitions for more
25 * information on the individual parameters.
27 static struct ctl_table rxrpc_sysctl_table[] = {
28 /* Values measured in milliseconds */
30 .procname = "req_ack_delay",
31 .data = &rxrpc_requested_ack_delay,
32 .maxlen = sizeof(unsigned),
34 .proc_handler = proc_dointvec_ms_jiffies,
35 .extra1 = (void *)&zero,
38 .procname = "soft_ack_delay",
39 .data = &rxrpc_soft_ack_delay,
40 .maxlen = sizeof(unsigned),
42 .proc_handler = proc_dointvec_ms_jiffies,
43 .extra1 = (void *)&one,
46 .procname = "idle_ack_delay",
47 .data = &rxrpc_idle_ack_delay,
48 .maxlen = sizeof(unsigned),
50 .proc_handler = proc_dointvec_ms_jiffies,
51 .extra1 = (void *)&one,
54 .procname = "resend_timeout",
55 .data = &rxrpc_resend_timeout,
56 .maxlen = sizeof(unsigned),
58 .proc_handler = proc_dointvec_ms_jiffies,
59 .extra1 = (void *)&one,
62 /* Values measured in seconds but used in jiffies */
64 .procname = "max_call_lifetime",
65 .data = &rxrpc_max_call_lifetime,
66 .maxlen = sizeof(unsigned),
68 .proc_handler = proc_dointvec_jiffies,
69 .extra1 = (void *)&one,
72 .procname = "dead_call_expiry",
73 .data = &rxrpc_dead_call_expiry,
74 .maxlen = sizeof(unsigned),
76 .proc_handler = proc_dointvec_jiffies,
77 .extra1 = (void *)&one,
80 /* Values measured in seconds */
82 .procname = "connection_expiry",
83 .data = &rxrpc_connection_expiry,
84 .maxlen = sizeof(unsigned),
86 .proc_handler = proc_dointvec_minmax,
87 .extra1 = (void *)&one,
90 .procname = "transport_expiry",
91 .data = &rxrpc_transport_expiry,
92 .maxlen = sizeof(unsigned),
94 .proc_handler = proc_dointvec_minmax,
95 .extra1 = (void *)&one,
100 int __init rxrpc_sysctl_init(void)
102 rxrpc_sysctl_reg_table = register_net_sysctl(&init_net, "net/rxrpc",
104 if (!rxrpc_sysctl_reg_table)
109 void rxrpc_sysctl_exit(void)
111 if (rxrpc_sysctl_reg_table)
112 unregister_net_sysctl_table(rxrpc_sysctl_reg_table);