Skip to content

Commit fe913e8

Browse files
Arlin DavisMukesh Kacker
authored andcommitted
cma: add module parameter to the response timeout
OFED 1.2 removed the rdma_set_option call used to adjust response timeout. We are running into some cases on larger clusters that require longer timeouts then the default. V2: Adjusted for rebase to kernel 3.7-rc4 Signed-off by: Arlin Davis <[email protected]> Signed-off-by: Vladimir Sokolovsky <[email protected]> Signed-off-by: Jack Morgenstein <[email protected]> (Ported from Mellanox OFED 2.4) Signed-off-by: Mukesh Kacker <[email protected]>
1 parent b953c0d commit fe913e8

File tree

1 file changed

+7
-3
lines changed
  • drivers/infiniband/core

1 file changed

+7
-3
lines changed

drivers/infiniband/core/cma.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ MODULE_LICENSE("Dual BSD/GPL");
6565
#define CMA_CM_MRA_SETTING (IB_CM_MRA_FLAG_DELAY | 24)
6666
#define CMA_IBOE_PACKET_LIFETIME 18
6767

68+
static int cma_response_timeout = CMA_CM_RESPONSE_TIMEOUT;
69+
module_param_named(cma_response_timeout, cma_response_timeout, int, 0644);
70+
MODULE_PARM_DESC(cma_response_timeout, "CMA_CM_RESPONSE_TIMEOUT (default=20)");
71+
6872
static void cma_add_one(struct ib_device *device);
6973
static void cma_remove_one(struct ib_device *device);
7074

@@ -2762,7 +2766,7 @@ static int cma_resolve_ib_udp(struct rdma_id_private *id_priv,
27622766

27632767
req.path = id_priv->id.route.path_rec;
27642768
req.service_id = rdma_get_service_id(&id_priv->id, cma_dst_addr(id_priv));
2765-
req.timeout_ms = 1 << (CMA_CM_RESPONSE_TIMEOUT - 8);
2769+
req.timeout_ms = 1 << (cma_response_timeout - 8);
27662770
req.max_cm_retries = CMA_MAX_CM_RETRIES;
27672771

27682772
ret = ib_send_cm_sidr_req(id_priv->cm_id.ib, &req);
@@ -2830,8 +2834,8 @@ static int cma_connect_ib(struct rdma_id_private *id_priv,
28302834
req.flow_control = conn_param->flow_control;
28312835
req.retry_count = min_t(u8, 7, conn_param->retry_count);
28322836
req.rnr_retry_count = min_t(u8, 7, conn_param->rnr_retry_count);
2833-
req.remote_cm_response_timeout = CMA_CM_RESPONSE_TIMEOUT;
2834-
req.local_cm_response_timeout = CMA_CM_RESPONSE_TIMEOUT;
2837+
req.remote_cm_response_timeout = cma_response_timeout;
2838+
req.local_cm_response_timeout = cma_response_timeout;
28352839
req.max_cm_retries = CMA_MAX_CM_RETRIES;
28362840
req.srq = id_priv->srq ? 1 : 0;
28372841

0 commit comments

Comments
 (0)