From: Arlin Davis Date: Thu, 15 Nov 2012 10:45:26 +0000 (+0200) Subject: cma: add module parameter to the response timeout X-Git-Tag: v4.1.12-92~319^2^2~6^2~22 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fe913e8304587e7ad30a315db43fb044ed386458;p=users%2Fjedix%2Flinux-maple.git 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 Signed-off-by: Vladimir Sokolovsky Signed-off-by: Jack Morgenstein (Ported from Mellanox OFED 2.4) Signed-off-by: Mukesh Kacker --- diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 38ffe09815035..eef25eccbbacf 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -65,6 +65,10 @@ MODULE_LICENSE("Dual BSD/GPL"); #define CMA_CM_MRA_SETTING (IB_CM_MRA_FLAG_DELAY | 24) #define CMA_IBOE_PACKET_LIFETIME 18 +static int cma_response_timeout = CMA_CM_RESPONSE_TIMEOUT; +module_param_named(cma_response_timeout, cma_response_timeout, int, 0644); +MODULE_PARM_DESC(cma_response_timeout, "CMA_CM_RESPONSE_TIMEOUT (default=20)"); + static void cma_add_one(struct ib_device *device); static void cma_remove_one(struct ib_device *device); @@ -2762,7 +2766,7 @@ static int cma_resolve_ib_udp(struct rdma_id_private *id_priv, req.path = id_priv->id.route.path_rec; req.service_id = rdma_get_service_id(&id_priv->id, cma_dst_addr(id_priv)); - req.timeout_ms = 1 << (CMA_CM_RESPONSE_TIMEOUT - 8); + req.timeout_ms = 1 << (cma_response_timeout - 8); req.max_cm_retries = CMA_MAX_CM_RETRIES; 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, req.flow_control = conn_param->flow_control; req.retry_count = min_t(u8, 7, conn_param->retry_count); req.rnr_retry_count = min_t(u8, 7, conn_param->rnr_retry_count); - req.remote_cm_response_timeout = CMA_CM_RESPONSE_TIMEOUT; - req.local_cm_response_timeout = CMA_CM_RESPONSE_TIMEOUT; + req.remote_cm_response_timeout = cma_response_timeout; + req.local_cm_response_timeout = cma_response_timeout; req.max_cm_retries = CMA_MAX_CM_RETRIES; req.srq = id_priv->srq ? 1 : 0;