* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
CFS_MODULE_PARM(peer_buffer_credits, "i", int, 0444,
"# per-peer router buffer credits");
-static int peer_timeout = 0;
+static int peer_timeout = 180;
CFS_MODULE_PARM(peer_timeout, "i", int, 0444,
"Seconds without aliveness news to declare peer dead (<=0 to disable)");
static int fmr_pool_size = 512;
CFS_MODULE_PARM(fmr_pool_size, "i", int, 0444,
- "size of the fmr pool (>= ntx)");
+ "size of the fmr pool (>= ntx / 4)");
static int fmr_flush_trigger = 384;
CFS_MODULE_PARM(fmr_flush_trigger, "i", int, 0444,
CFS_MODULE_PARM(pmr_pool_size, "i", int, 0444,
"size of the MR cache pmr pool");
+/*
+ * 0: disable failover
+ * 1: enable failover if necessary
+ * 2: force to failover (for debug)
+ */
+static int dev_failover = 0;
+CFS_MODULE_PARM(dev_failover, "i", int, 0444,
+ "HCA failover for bonding (0 off, 1 on, other values reserved)");
+
kib_tunables_t kiblnd_tunables = {
+ .kib_dev_failover = &dev_failover,
.kib_service = &service,
.kib_cksum = &cksum,
.kib_timeout = &timeout,
O2IBLND_FMR_POOL_SIZE,
O2IBLND_FMR_FLUSH_TRIGGER,
O2IBLND_FMR_CACHE,
- O2IBLND_PMR_POOL_SIZE
+ O2IBLND_PMR_POOL_SIZE,
+ O2IBLND_DEV_FAILOVER
};
#else
#define O2IBLND_FMR_FLUSH_TRIGGER CTL_UNNUMBERED
#define O2IBLND_FMR_CACHE CTL_UNNUMBERED
#define O2IBLND_PMR_POOL_SIZE CTL_UNNUMBERED
+#define O2IBLND_DEV_FAILOVER CTL_UNNUMBERED
#endif
.mode = 0444,
.proc_handler = &proc_dointvec
},
+ {
+ .ctl_name = O2IBLND_DEV_FAILOVER,
+ .procname = "dev_failover",
+ .data = &dev_failover,
+ .maxlen = sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec
+ },
{0}
};
int
kiblnd_tunables_init (void)
{
- if (*kiblnd_tunables.kib_credits > *kiblnd_tunables.kib_ntx) {
- CERROR("Can't set credits(%d) > ntx(%d)\n",
- *kiblnd_tunables.kib_credits,
- *kiblnd_tunables.kib_ntx);
- return -EINVAL;
- }
-
if (kiblnd_translate_mtu(*kiblnd_tunables.kib_ib_mtu) < 0) {
CERROR("Invalid ib_mtu %d, expected 256/512/1024/2048/4096\n",
*kiblnd_tunables.kib_ib_mtu);