sysctl.c (ecb41832bd2a7a3f8ac93527cec5e51e3827daed) sysctl.c (eec4844fae7c033a0c1fc1eb3b8517aeb8b6cc49)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/* sysctls for configuring RxRPC operating parameters
3 *
4 * Copyright (C) 2014 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
6 */
7
8#include <linux/sysctl.h>
9#include <net/sock.h>
10#include <net/af_rxrpc.h>
11#include "ar-internal.h"
12
13static struct ctl_table_header *rxrpc_sysctl_reg_table;
1// SPDX-License-Identifier: GPL-2.0-or-later
2/* sysctls for configuring RxRPC operating parameters
3 *
4 * Copyright (C) 2014 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
6 */
7
8#include <linux/sysctl.h>
9#include <net/sock.h>
10#include <net/af_rxrpc.h>
11#include "ar-internal.h"
12
13static struct ctl_table_header *rxrpc_sysctl_reg_table;
14static const unsigned int one = 1;
15static const unsigned int four = 4;
16static const unsigned int thirtytwo = 32;
17static const unsigned int n_65535 = 65535;
18static const unsigned int n_max_acks = RXRPC_RXTX_BUFF_SIZE - 1;
19static const unsigned long one_jiffy = 1;
20static const unsigned long max_jiffies = MAX_JIFFY_OFFSET;
21
22/*

--- 69 unchanged lines hidden (view full) ---

92 .extra1 = (void *)&rxrpc_reap_client_connections,
93 },
94 {
95 .procname = "reap_client_conns",
96 .data = &rxrpc_reap_client_connections,
97 .maxlen = sizeof(unsigned int),
98 .mode = 0644,
99 .proc_handler = proc_dointvec_minmax,
14static const unsigned int four = 4;
15static const unsigned int thirtytwo = 32;
16static const unsigned int n_65535 = 65535;
17static const unsigned int n_max_acks = RXRPC_RXTX_BUFF_SIZE - 1;
18static const unsigned long one_jiffy = 1;
19static const unsigned long max_jiffies = MAX_JIFFY_OFFSET;
20
21/*

--- 69 unchanged lines hidden (view full) ---

91 .extra1 = (void *)&rxrpc_reap_client_connections,
92 },
93 {
94 .procname = "reap_client_conns",
95 .data = &rxrpc_reap_client_connections,
96 .maxlen = sizeof(unsigned int),
97 .mode = 0644,
98 .proc_handler = proc_dointvec_minmax,
100 .extra1 = (void *)&one,
99 .extra1 = (void *)SYSCTL_ONE,
101 .extra2 = (void *)&rxrpc_max_client_connections,
102 },
103 {
104 .procname = "max_backlog",
105 .data = &rxrpc_max_backlog,
106 .maxlen = sizeof(unsigned int),
107 .mode = 0644,
108 .proc_handler = proc_dointvec_minmax,
109 .extra1 = (void *)&four,
110 .extra2 = (void *)&thirtytwo,
111 },
112 {
113 .procname = "rx_window_size",
114 .data = &rxrpc_rx_window_size,
115 .maxlen = sizeof(unsigned int),
116 .mode = 0644,
117 .proc_handler = proc_dointvec_minmax,
100 .extra2 = (void *)&rxrpc_max_client_connections,
101 },
102 {
103 .procname = "max_backlog",
104 .data = &rxrpc_max_backlog,
105 .maxlen = sizeof(unsigned int),
106 .mode = 0644,
107 .proc_handler = proc_dointvec_minmax,
108 .extra1 = (void *)&four,
109 .extra2 = (void *)&thirtytwo,
110 },
111 {
112 .procname = "rx_window_size",
113 .data = &rxrpc_rx_window_size,
114 .maxlen = sizeof(unsigned int),
115 .mode = 0644,
116 .proc_handler = proc_dointvec_minmax,
118 .extra1 = (void *)&one,
117 .extra1 = (void *)SYSCTL_ONE,
119 .extra2 = (void *)&n_max_acks,
120 },
121 {
122 .procname = "rx_mtu",
123 .data = &rxrpc_rx_mtu,
124 .maxlen = sizeof(unsigned int),
125 .mode = 0644,
126 .proc_handler = proc_dointvec_minmax,
118 .extra2 = (void *)&n_max_acks,
119 },
120 {
121 .procname = "rx_mtu",
122 .data = &rxrpc_rx_mtu,
123 .maxlen = sizeof(unsigned int),
124 .mode = 0644,
125 .proc_handler = proc_dointvec_minmax,
127 .extra1 = (void *)&one,
126 .extra1 = (void *)SYSCTL_ONE,
128 .extra2 = (void *)&n_65535,
129 },
130 {
131 .procname = "rx_jumbo_max",
132 .data = &rxrpc_rx_jumbo_max,
133 .maxlen = sizeof(unsigned int),
134 .mode = 0644,
135 .proc_handler = proc_dointvec_minmax,
127 .extra2 = (void *)&n_65535,
128 },
129 {
130 .procname = "rx_jumbo_max",
131 .data = &rxrpc_rx_jumbo_max,
132 .maxlen = sizeof(unsigned int),
133 .mode = 0644,
134 .proc_handler = proc_dointvec_minmax,
136 .extra1 = (void *)&one,
135 .extra1 = (void *)SYSCTL_ONE,
137 .extra2 = (void *)&four,
138 },
139
140 { }
141};
142
143int __init rxrpc_sysctl_init(void)
144{

--- 12 unchanged lines hidden ---
136 .extra2 = (void *)&four,
137 },
138
139 { }
140};
141
142int __init rxrpc_sysctl_init(void)
143{

--- 12 unchanged lines hidden ---