]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: make retry count a module parameter
authorAmir Vadai <amirv@mellanox.co.il>
Sun, 13 Feb 2011 10:08:24 +0000 (12:08 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:43 +0000 (05:05 -0700)
Setting a lower value means faster path migration in APM

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp.h
drivers/infiniband/ulp/sdp/sdp_cma.c

index b28df685024e6fff025deed82e1b256df2514f20..3a3433ae194c04684cc2c9e9042b80264e8a0fe8 100644 (file)
@@ -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)
index 64dc6d023573f53c9b7cacb21edecca2b0b3eeba..7ab188c6198e283781fc48b9f270cfeab0e7aacd 100644 (file)
@@ -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) {