aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c
diff options
context:
space:
mode:
authorAmir Shehata <amir.shehata@intel.com>2016-05-06 21:30:26 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-05-09 14:05:23 +0200
commit025ba826316c9809073702302578efcfa4ba3f6f (patch)
tree819c1fa83fc6539b698f51bdcd4805578a98a93e /drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c
parentstaging: lustre: o2iblnd: convert macros to inline functions (diff)
downloadlinux-dev-025ba826316c9809073702302578efcfa4ba3f6f.tar.xz
linux-dev-025ba826316c9809073702302578efcfa4ba3f6f.zip
staging: lustre: o2iblnd: create default o2iblnd tunable settings
Create and set the default o2iblnd tunables when the ko2iblnd module loads. Move kiblnd_tunables_setup() to when the NI iterface is initialized. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7101 Reviewed-on: http://review.whamcloud.com/16367 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Olaf Weber <olaf@sgi.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c')
-rw-r--r--drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c
index a6415fc995b4..cc1469dc7c2b 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c
@@ -171,6 +171,8 @@ kib_tunables_t kiblnd_tunables = {
.kib_nscheds = &nscheds
};
+static struct lnet_ioctl_config_o2iblnd_tunables default_tunables;
+
/* # messages/RDMAs in-flight */
int kiblnd_msg_queue_size(int version, lnet_ni_t *ni)
{
@@ -182,8 +184,7 @@ int kiblnd_msg_queue_size(int version, lnet_ni_t *ni)
return peer_credits;
}
-int
-kiblnd_tunables_init(void)
+int kiblnd_tunables_setup(void)
{
if (kiblnd_translate_mtu(*kiblnd_tunables.kib_ib_mtu) < 0) {
CERROR("Invalid ib_mtu %d, expected 256/512/1024/2048/4096\n",
@@ -234,3 +235,14 @@ kiblnd_tunables_init(void)
return 0;
}
+
+void kiblnd_tunables_init(void)
+{
+ default_tunables.lnd_version = 0;
+ default_tunables.lnd_peercredits_hiw = peer_credits_hiw,
+ default_tunables.lnd_map_on_demand = map_on_demand;
+ default_tunables.lnd_concurrent_sends = concurrent_sends;
+ default_tunables.lnd_fmr_pool_size = fmr_pool_size;
+ default_tunables.lnd_fmr_flush_trigger = fmr_flush_trigger;
+ default_tunables.lnd_fmr_cache = fmr_cache;
+}