@@ -642,6 +642,12 @@ struct kib_peer_ni {
int kiblnd_msg_queue_size(int version, struct lnet_ni *ni);
+static inline int kiblnd_timeout(void)
+{
+ return *kiblnd_tunables.kib_timeout ? *kiblnd_tunables.kib_timeout :
+ lnet_get_lnd_timeout();
+}
+
static inline int
kiblnd_concurrent_sends(int version, struct lnet_ni *ni)
{
@@ -1160,7 +1160,7 @@ static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
return;
}
- timeout_ns = lnet_get_lnd_timeout() * NSEC_PER_SEC;
+ timeout_ns = kiblnd_timeout() * NSEC_PER_SEC;
tx->tx_queued = 1;
tx->tx_deadline = ktime_add_ns(ktime_get(), timeout_ns);
@@ -1289,12 +1289,12 @@ static int kiblnd_resolve_addr(struct rdma_cm_id *cmid,
if (*kiblnd_tunables.kib_use_priv_port) {
rc = kiblnd_resolve_addr(cmid, &srcaddr, &dstaddr,
- lnet_get_lnd_timeout() * 1000);
+ kiblnd_timeout() * 1000);
} else {
rc = rdma_resolve_addr(cmid,
(struct sockaddr *)&srcaddr,
(struct sockaddr *)&dstaddr,
- lnet_get_lnd_timeout() * 1000);
+ kiblnd_timeout() * 1000);
}
if (rc != 0) {
/* Can't initiate address resolution: */
@@ -3021,7 +3021,7 @@ static int kiblnd_resolve_addr(struct rdma_cm_id *cmid,
rc = event->status;
} else {
rc = rdma_resolve_route(cmid,
- lnet_get_lnd_timeout() * 1000);
+ kiblnd_timeout() * 1000);
if (!rc) {
struct kib_net *net = peer_ni->ibp_ni->ni_data;
struct kib_dev *dev = net->ibn_dev;
@@ -3437,7 +3437,7 @@ static int kiblnd_resolve_addr(struct rdma_cm_id *cmid,
* interval.
*/
- lnd_timeout = lnet_get_lnd_timeout();
+ lnd_timeout = kiblnd_timeout();
if (lnd_timeout > n * p)
chunk = (chunk * n * p) / lnd_timeout;
if (!chunk)
@@ -45,7 +45,7 @@
module_param(cksum, int, 0644);
MODULE_PARM_DESC(cksum, "set non-zero to enable message (not RDMA) checksums");
-static int timeout = 50;
+static int timeout;
module_param(timeout, int, 0644);
MODULE_PARM_DESC(timeout, "timeout (seconds)");