4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 only,
8 * as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License version 2 for more details (a copy is included
14 * in the LICENSE file that accompanied this code).
16 * You should have received a copy of the GNU General Public License
17 * version 2 along with this program; If not, see
18 * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
20 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
21 * CA 95054 USA or visit www.sun.com if you need additional information or
27 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
28 * Use is subject to license terms.
31 * This file is part of Lustre, http://www.lustre.org/
32 * Lustre is a trademark of Sun Microsystems, Inc.
34 * lnet/klnds/ralnd/ralnd_modparams.c
36 * Author: Eric Barton <eric@bartonsoftware.com>
41 static int n_connd = 4;
42 CFS_MODULE_PARM(n_connd, "i", int, 0444,
43 "# of connection daemons");
45 static int min_reconnect_interval = 1;
46 CFS_MODULE_PARM(min_reconnect_interval, "i", int, 0644,
47 "minimum connection retry interval (seconds)");
49 static int max_reconnect_interval = 60;
50 CFS_MODULE_PARM(max_reconnect_interval, "i", int, 0644,
51 "maximum connection retry interval (seconds)");
54 CFS_MODULE_PARM(ntx, "i", int, 0444,
55 "# of transmit descriptors");
57 static int credits = 128;
58 CFS_MODULE_PARM(credits, "i", int, 0444,
59 "# concurrent sends");
61 static int peer_credits = 32;
62 CFS_MODULE_PARM(peer_credits, "i", int, 0444,
63 "# concurrent sends to 1 peer");
65 static int fma_cq_size = 8192;
66 CFS_MODULE_PARM(fma_cq_size, "i", int, 0444,
67 "size of the completion queue");
69 static int timeout = 30;
70 CFS_MODULE_PARM(timeout, "i", int, 0644,
71 "communications timeout (seconds)");
73 static int max_immediate = (2<<10);
74 CFS_MODULE_PARM(max_immediate, "i", int, 0644,
75 "immediate/RDMA breakpoint");
77 kra_tunables_t kranal_tunables = {
78 .kra_n_connd = &n_connd,
79 .kra_min_reconnect_interval = &min_reconnect_interval,
80 .kra_max_reconnect_interval = &max_reconnect_interval,
82 .kra_credits = &credits,
83 .kra_peercredits = &peer_credits,
84 .kra_fma_cq_size = &fma_cq_size,
85 .kra_timeout = &timeout,
86 .kra_max_immediate = &max_immediate,
89 #if CONFIG_SYSCTL && !CFS_SYSFS_MODULE_PARM
91 static struct ctl_table kranal_ctl_table[] = {
94 .procname = "n_connd",
96 .maxlen = sizeof(int),
98 .proc_handler = &proc_dointvec
102 .procname = "min_reconnect_interval",
103 .data = &min_reconnect_interval,
104 .maxlen = sizeof(int),
106 .proc_handler = &proc_dointvec
110 .procname = "max_reconnect_interval",
111 .data = &max_reconnect_interval,
112 .maxlen = sizeof(int),
114 .proc_handler = &proc_dointvec
120 .maxlen = sizeof(int),
122 .proc_handler = &proc_dointvec
126 .procname = "credits",
128 .maxlen = sizeof(int),
130 .proc_handler = &proc_dointvec
134 .procname = "peer_credits",
135 .data = &peer_credits,
136 .maxlen = sizeof(int),
138 .proc_handler = &proc_dointvec
142 .procname = "fma_cq_size",
143 .data = &fma_cq_size,
144 .maxlen = sizeof(int),
146 .proc_handler = &proc_dointvec
150 .procname = "timeout",
152 .maxlen = sizeof(int),
154 .proc_handler = &proc_dointvec
158 .procname = "max_immediate",
159 .data = &max_immediate,
160 .maxlen = sizeof(int),
162 .proc_handler = &proc_dointvec
167 static struct ctl_table kranal_top_ctl_table[] = {
174 .child = kranal_ctl_table
180 kranal_tunables_init ()
182 kranal_tunables.kra_sysctl =
183 register_sysctl_table(kranal_top_ctl_table);
185 if (kranal_tunables.kra_sysctl == NULL)
186 CWARN("Can't setup /proc tunables\n");
191 void kranal_tunables_fini()
193 if (kranal_tunables.kra_sysctl != NULL)
194 unregister_sysctl_table(kranal_tunables.kra_sysctl);
200 kranal_tunables_init ()
206 kranal_tunables_fini ()