[ibbus] Add support for APM using the CM to pass messages.
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 24 Sep 2009 09:33:33 +0000 (09:33 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 24 Sep 2009 09:33:33 +0000 (09:33 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2466 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/al_cm_qp.c
core/al/kernel/al_cm_cep.c
core/al/kernel/al_proxy_cep.c

index dc1aead..b2f362f 100644 (file)
@@ -1307,7 +1307,7 @@ __cep_conn_rep(
        if( status != IB_SUCCESS )\r
        {\r
                AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,\r
-                       ("__cep_pre_req returned %s\n", ib_get_err_str(status)) );\r
+                       ("__cep_pre_rep returned %s\n", ib_get_err_str(status)) );\r
                goto err;\r
        }\r
 \r
@@ -1747,6 +1747,12 @@ ib_cm_apr(
        }\r
        \r
        status = al_cep_send_apr( h_cm_lap.h_al, h_cm_lap.cid );\r
+       if( status != IB_SUCCESS )\r
+       {\r
+               AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,\r
+                       ("al_cep_send_apr returned %s.\n",\r
+                       ib_get_err_str( status )) );\r
+       }\r
 \r
        AL_EXIT( AL_DBG_CM );\r
        return status;\r
index f1ee549..0cb0cb0 100644 (file)
@@ -1122,7 +1122,7 @@ __req_handler(
                        /* Reject the request for insufficient resources. */\r
                        reason = IB_REJ_INSUF_RESOURCES;\r
                        AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,\r
-                               ("al_create_cep failed\nREJ sent for insufficient resources.\n") );\r
+                               ("__create_cep failed\nREJ sent for insufficient resources.\n") );\r
                        goto reject;\r
                }\r
 \r
@@ -4696,6 +4696,12 @@ kal_cep_pre_req(
                        p_cep->p_mad = NULL;\r
                        break;\r
                }\r
+               if(p_cm_req->h_qp->type == IB_QPT_RELIABLE_CONN ||\r
+                       p_cm_req->h_qp->type == IB_QPT_UNRELIABLE_CONN) \r
+               {\r
+                       ((al_conn_qp_t *)(p_cm_req->h_qp))->cid = cid;\r
+               }\r
+\r
 \r
                /* Format the INIT qp modify attributes. */\r
                if( p_init )\r
@@ -5412,7 +5418,7 @@ __format_lap(
 \r
        __format_mad_hdr( p_mad->p_mad_buf, p_cep, CM_LAP_ATTR_ID );\r
 \r
-       __format_mad_av( p_mad, &p_cep->av[p_cep->idx_primary] );\r
+       __format_mad_av( p_mad, &p_cep->av[((p_cep->idx_primary + 1) & 0x1)] );\r
 \r
        p_lap = (mad_cm_lap_t*)p_mad->p_mad_buf;\r
 \r
index 6602966..0e7580f 100644 (file)
@@ -634,8 +634,6 @@ proxy_cep_send_apr(
 \r
        AL_ENTER( AL_DBG_CM );\r
 \r
-       UNUSED_PARAM( p_ret_bytes );\r
-\r
        p_context = (al_dev_open_context_t*)p_open_context;\r
 \r
        /* Validate user parameters. */\r
@@ -649,6 +647,8 @@ proxy_cep_send_apr(
        (*(ib_api_status_t*)cl_ioctl_out_buf( h_ioctl )) = al_cep_send_apr(\r
                p_context->h_al, *(net32_t*)cl_ioctl_in_buf( h_ioctl ) );\r
 \r
+       *p_ret_bytes = sizeof(ib_api_status_t);\r
+\r
        AL_EXIT( AL_DBG_CM );\r
        return CL_SUCCESS;\r
 }\r