]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rdma_cm, sdp: bug fixes and some changes to APM logic
authorAmir Vadai <amirv@mellanox.co.il>
Thu, 27 Jan 2011 08:42:56 +0000 (10:42 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:42 +0000 (05:05 -0700)
- We no longer rely on the private data buffer of the LAP/APR messages for passive side LID improvement.
    Instead, we use the protocol defined LID improvement APR error code.
    - Two paths are allocated on id creation to simplify code.
    - Various small bug fixes.
    - Added a missing ref_count get
    - Some code cleanup.
    - Important: rdma_enable_apm may be called only upon receiving RDMA_CM_ROUTE_RESOLVED event.
      This was done to break symmetry on failover and possibly on other occasions.

Signed-off-by: Nir Muchtar <nirm@voltaire.com>
Signed-off-by: Moni Shoua <monis@voltaire.com>
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp.h
drivers/infiniband/ulp/sdp/sdp_cma.c
drivers/infiniband/ulp/sdp/sdp_dbg.h

index 1c1e7947b4fa4f35b5b18c23db3458faf59586c6..b28df685024e6fff025deed82e1b256df2514f20 100644 (file)
@@ -60,7 +60,7 @@
 #define SDP_RX_ARMING_DELAY    (msecs_to_jiffies(10))
 #define SDP_RDMA_READ_TIMEOUT  (60 * HZ) /* timeout - fatal hw error */
 
-#define SDP_SRCAVAIL_CANCEL_TIMEOUT (HZ * 5)
+#define SDP_SRCAVAIL_CANCEL_TIMEOUT (HZ * 60)
 #define SDP_SRCAVAIL_ADV_TIMEOUT (1 * HZ)
 
 #define SDP_RESOLVE_TIMEOUT 1000
index 52c8a8eea056d7fe1547a3cdcca06d5cbc1cc583..93965953600cc2444dc63f5244476f62d6de10fc 100644 (file)
@@ -418,12 +418,6 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
                        break;
                }
 
-               if (sdp_apm_enable) {
-                       rc = rdma_enable_apm(id, RDMA_ALT_PATH_BEST);
-                       if (rc)
-                               sdp_warn(sk, "APM couldn't be enabled: %d\n", rc);
-               }
-
                rc = rdma_resolve_route(id, SDP_ROUTE_TIMEOUT);
                break;
        case RDMA_CM_EVENT_ADDR_ERROR:
@@ -473,6 +467,13 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
                conn_param.initiator_depth = 4 /* TODO */;
                conn_param.retry_count = SDP_RETRY_COUNT;
                SDP_DUMP_PACKET(sk, "TX", NULL, &hh.bsdh);
+
+               if (sdp_apm_enable) {
+                       rc = rdma_enable_apm(id, RDMA_ALT_PATH_BEST);
+                       if (rc)
+                               sdp_warn(sk, "APM couldn't be enabled: %d\n", rc);
+               }
+
                rc = rdma_connect(id, &conn_param);
                break;
 
index b0267173714281f5a7a03b39e174149b4a52385a..57c4f811a6652b4ebd9b7cee8324dc0b9cfabe47 100644 (file)
@@ -108,7 +108,7 @@ extern int sdp_debug_level;
                sdp_print_history(sk);                                  \
                SDP_WARN_ON(1); \
        } else { \
-               sdp_dbg(sk, "%s:%d - %s (%s) ref = %d.\n", __func__, __LINE__, \
+               sdp_dbg_data(sk, "%s:%d - %s (%s) ref = %d.\n", __func__, __LINE__, \
                        #sock_op, msg, atomic_read(&(sk)->sk_refcnt)); \
                sock_op(sk); \
        }\