]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[IBAL] The CEP manager currently keeps a separate field to store the initiator depth...
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 2 Jul 2008 12:06:40 +0000 (12:06 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 2 Jul 2008 12:06:40 +0000 (12:06 +0000)
This change eliminates the separate field, and uses the responder resources to store the received REQ's initiator depth.  This simplifies the code a bit.

Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1322 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/core/al/kernel/al_cm_cep.c

index 2365695332edcaa006983344b8020f63d8c7fcef..33455d7891ff2de0551b54349ad9698ae6d1f16f 100644 (file)
@@ -279,6 +279,10 @@ typedef struct _al_kcep
        /* Parameters to format QP modification structure. */\r
        net32_t                                         sq_psn;\r
        net32_t                                         rq_psn;\r
+       /*\r
+     * Note that we store the requested initiator depth as received in the REQ\r
+     * and cap it when sending the REP to the actual capabilities of the HCA.\r
+     */\r
        uint8_t                                         resp_res;\r
        uint8_t                                         init_depth;\r
        uint8_t                                         rnr_nak_timeout;\r
@@ -292,9 +296,6 @@ typedef struct _al_kcep
        /* PKEY to make sure a LAP is on the same partition. */\r
        net16_t                                         pkey;\r
 \r
-       /* Initiator depth as received in the REQ. */\r
-       uint8_t                                         req_init_depth;\r
-\r
        /*\r
         * Primary and alternate path info, used to create the address vectors for\r
         * sending MADs, to locate the port CM agent to use for outgoing sends,\r
@@ -832,7 +833,7 @@ __save_wire_req(
        p_cep->target_ack_delay = 0;\r
 \r
        /* Store the requested initiator depth. */\r
-       p_cep->req_init_depth = conn_req_get_init_depth( p_req );\r
+       p_cep->resp_res = conn_req_get_init_depth( p_req );\r
 \r
        /*\r
         * Store the provided responder resources.  These turn into the local\r
@@ -4811,7 +4812,7 @@ __save_user_rep(
        ci_ca_lock_attr( p_cm_rep->h_qp->obj.p_ci_ca );\r
        /* Check the CA's responder resource max and trim if necessary. */\r
        if( (p_cm_rep->h_qp->obj.p_ci_ca->p_pnp_attr->max_qp_resp_res <\r
-               p_cep->req_init_depth) )\r
+               p_cep->resp_res) )\r
        {\r
                /*\r
                 * The CA cannot handle the requested responder resources.\r
@@ -4820,11 +4821,6 @@ __save_user_rep(
                p_cep->resp_res = \r
                        p_cm_rep->h_qp->obj.p_ci_ca->p_pnp_attr->max_qp_resp_res;\r
        }\r
-       else\r
-       {\r
-               /* The CA supports the requested responder resources. */\r
-               p_cep->resp_res = p_cep->req_init_depth;\r
-       }\r
        ci_ca_unlock_attr( p_cm_rep->h_qp->obj.p_ci_ca );\r
 \r
        p_cep->rnr_nak_timeout = p_cm_rep->rnr_nak_timeout;\r