112198SEiji.Ota@Sun.COM /*
212198SEiji.Ota@Sun.COM * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
312198SEiji.Ota@Sun.COM */
412198SEiji.Ota@Sun.COM
512198SEiji.Ota@Sun.COM /*
6*12763SGiri.Adari@Sun.COM * This file contains code imported from the OFED rds source file sysctl.c
7*12763SGiri.Adari@Sun.COM * Oracle elects to have and use the contents of sysctl.c under and governed
8*12763SGiri.Adari@Sun.COM * by the OpenIB.org BSD license (see below for full license text). However,
9*12763SGiri.Adari@Sun.COM * the following notice accompanied the original version of this file:
10*12763SGiri.Adari@Sun.COM */
11*12763SGiri.Adari@Sun.COM
12*12763SGiri.Adari@Sun.COM /*
1312198SEiji.Ota@Sun.COM * Copyright (c) 2006 Oracle. All rights reserved.
1412198SEiji.Ota@Sun.COM *
1512198SEiji.Ota@Sun.COM * This software is available to you under a choice of one of two
1612198SEiji.Ota@Sun.COM * licenses. You may choose to be licensed under the terms of the GNU
1712198SEiji.Ota@Sun.COM * General Public License (GPL) Version 2, available from the file
1812198SEiji.Ota@Sun.COM * COPYING in the main directory of this source tree, or the
1912198SEiji.Ota@Sun.COM * OpenIB.org BSD license below:
2012198SEiji.Ota@Sun.COM *
2112198SEiji.Ota@Sun.COM * Redistribution and use in source and binary forms, with or
2212198SEiji.Ota@Sun.COM * without modification, are permitted provided that the following
2312198SEiji.Ota@Sun.COM * conditions are met:
2412198SEiji.Ota@Sun.COM *
2512198SEiji.Ota@Sun.COM * - Redistributions of source code must retain the above
2612198SEiji.Ota@Sun.COM * copyright notice, this list of conditions and the following
2712198SEiji.Ota@Sun.COM * disclaimer.
2812198SEiji.Ota@Sun.COM *
2912198SEiji.Ota@Sun.COM * - Redistributions in binary form must reproduce the above
3012198SEiji.Ota@Sun.COM * copyright notice, this list of conditions and the following
3112198SEiji.Ota@Sun.COM * disclaimer in the documentation and/or other materials
3212198SEiji.Ota@Sun.COM * provided with the distribution.
3312198SEiji.Ota@Sun.COM *
3412198SEiji.Ota@Sun.COM * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3512198SEiji.Ota@Sun.COM * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3612198SEiji.Ota@Sun.COM * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3712198SEiji.Ota@Sun.COM * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
3812198SEiji.Ota@Sun.COM * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
3912198SEiji.Ota@Sun.COM * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
4012198SEiji.Ota@Sun.COM * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
4112198SEiji.Ota@Sun.COM * SOFTWARE.
4212198SEiji.Ota@Sun.COM *
4312198SEiji.Ota@Sun.COM */
4412198SEiji.Ota@Sun.COM
4512198SEiji.Ota@Sun.COM #define HZ 100
4612198SEiji.Ota@Sun.COM #define msecs_to_jiffies(a) a
4712198SEiji.Ota@Sun.COM
4812198SEiji.Ota@Sun.COM static unsigned long rdsv3_sysctl_reconnect_min = 1;
4912198SEiji.Ota@Sun.COM
5012198SEiji.Ota@Sun.COM unsigned long rdsv3_sysctl_reconnect_min_jiffies;
5112198SEiji.Ota@Sun.COM unsigned long rdsv3_sysctl_reconnect_max_jiffies = HZ;
5212198SEiji.Ota@Sun.COM
5312198SEiji.Ota@Sun.COM unsigned int rdsv3_sysctl_max_unacked_packets = 8;
5412198SEiji.Ota@Sun.COM unsigned int rdsv3_sysctl_max_unacked_bytes = (16 << 20);
5512198SEiji.Ota@Sun.COM
5612198SEiji.Ota@Sun.COM unsigned int rdsv3_sysctl_ping_enable = 1;
5712198SEiji.Ota@Sun.COM
5812198SEiji.Ota@Sun.COM void
rdsv3_sysctl_exit(void)5912198SEiji.Ota@Sun.COM rdsv3_sysctl_exit(void)
6012198SEiji.Ota@Sun.COM {
6112198SEiji.Ota@Sun.COM }
6212198SEiji.Ota@Sun.COM
6312198SEiji.Ota@Sun.COM int
rdsv3_sysctl_init(void)6412198SEiji.Ota@Sun.COM rdsv3_sysctl_init(void)
6512198SEiji.Ota@Sun.COM {
6612198SEiji.Ota@Sun.COM rdsv3_sysctl_reconnect_min = msecs_to_jiffies(1);
6712198SEiji.Ota@Sun.COM rdsv3_sysctl_reconnect_min_jiffies = rdsv3_sysctl_reconnect_min;
6812198SEiji.Ota@Sun.COM
6912198SEiji.Ota@Sun.COM return (0);
7012198SEiji.Ota@Sun.COM }
71