Whamcloud - gitweb
LU-15186 o2iblnd: Default map_on_demand to 1
[fs/lustre-release.git] / lnet / klnds / o2iblnd / o2iblnd_modparams.c
index a9ac2d8..95e7200 100644 (file)
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/klnds/o2iblnd/o2iblnd_modparams.c
  *
@@ -92,7 +91,7 @@ MODULE_PARM_DESC(ipif_name, "IPoIB interface name");
 
 static int retry_count = 5;
 module_param(retry_count, int, 0644);
-MODULE_PARM_DESC(retry_count, "Retransmissions when no ACK received");
+MODULE_PARM_DESC(retry_count, "Number of times to retry connection operations");
 
 static int rnr_retry_count = 6;
 module_param(rnr_retry_count, int, 0644);
@@ -141,13 +140,11 @@ MODULE_PARM_DESC(use_fastreg_gaps, "Enable discontiguous fastreg fragment suppor
  *     the behavior when transmit with GAPS verses contiguous.
  */
 #ifdef HAVE_IB_GET_DMA_MR
-#define IBLND_DEFAULT_MAP_ON_DEMAND 0
 #define MOD_STR "map on demand"
 #else
-#define IBLND_DEFAULT_MAP_ON_DEMAND 1
 #define MOD_STR "map on demand (obsolete)"
 #endif
-static int map_on_demand = IBLND_DEFAULT_MAP_ON_DEMAND;
+static int map_on_demand = 1;
 module_param(map_on_demand, int, 0444);
 MODULE_PARM_DESC(map_on_demand, MOD_STR);
 
@@ -236,7 +233,9 @@ kiblnd_tunables_setup(struct lnet_ni *ni)
        /* Current API version */
        tunables->lnd_version = CURRENT_LND_VERSION;
 
-       if (kiblnd_translate_mtu(*kiblnd_tunables.kib_ib_mtu) < 0) {
+       if (*kiblnd_tunables.kib_ib_mtu &&
+           ib_mtu_enum_to_int(ib_mtu_int_to_enum(*kiblnd_tunables.kib_ib_mtu)) !=
+           *kiblnd_tunables.kib_ib_mtu) {
                CERROR("Invalid ib_mtu %d, expected 256/512/1024/2048/4096\n",
                       *kiblnd_tunables.kib_ib_mtu);
                return -EINVAL;