From: Amir Vadai Date: Sun, 13 Feb 2011 10:08:24 +0000 (+0200) Subject: sdp: make retry count a module parameter X-Git-Tag: v4.1.12-92~264^2~5^2~36 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=81f038f9af88d23a59869d88de0a7402a6bb6f72;p=users%2Fjedix%2Flinux-maple.git sdp: make retry count a module parameter Setting a lower value means faster path migration in APM Signed-off-by: Amir Vadai --- diff --git a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h index b28df685024e6..3a3433ae194c0 100644 --- a/drivers/infiniband/ulp/sdp/sdp.h +++ b/drivers/infiniband/ulp/sdp/sdp.h @@ -65,7 +65,6 @@ #define SDP_RESOLVE_TIMEOUT 1000 #define SDP_ROUTE_TIMEOUT 1000 -#define SDP_RETRY_COUNT 5 #define SDP_KEEPALIVE_TIME (120 * 60 * HZ) #define SDP_FIN_WAIT_TIMEOUT (60 * HZ) /* like TCP_FIN_TIMEOUT */ #define SDP_CMA_TIMEWAIT_TIMEOUT (150 * HZ) diff --git a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c index 64dc6d023573f..7ab188c6198e2 100644 --- a/drivers/infiniband/ulp/sdp/sdp_cma.c +++ b/drivers/infiniband/ulp/sdp/sdp_cma.c @@ -52,6 +52,8 @@ #define SDP_MAJV_MINV 0x22 +SDP_MODPARAM_SINT(sdp_retry_count, 5, "IB layer retry count"); + SDP_MODPARAM_SINT(sdp_link_layer_ib_only, 0, "Support only link layer of " "type Infiniband"); @@ -465,7 +467,7 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_event *event) conn_param.private_data = &hh; conn_param.responder_resources = 4 /* TODO */; conn_param.initiator_depth = 4 /* TODO */; - conn_param.retry_count = SDP_RETRY_COUNT; + conn_param.retry_count = sdp_retry_count; SDP_DUMP_PACKET(sk, "TX", NULL, &hh.bsdh); if (sdp_apm_enable) { @@ -512,7 +514,7 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_event *event) conn_param.private_data = &hah; conn_param.responder_resources = 4 /* TODO */; conn_param.initiator_depth = 4 /* TODO */; - conn_param.retry_count = SDP_RETRY_COUNT; + conn_param.retry_count = sdp_retry_count; SDP_DUMP_PACKET(sk, "TX", NULL, &hah.bsdh); rc = rdma_accept(id, &conn_param); if (rc) {