From: leonidk Date: Wed, 2 Jul 2008 12:06:40 +0000 (+0000) Subject: [IBAL] The CEP manager currently keeps a separate field to store the initiator depth... X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=89f4758f2f94443fe571efe9a303f6fa9cc2b0bd;p=~shefty%2Frdma-win.git [IBAL] The CEP manager currently keeps a separate field to store the initiator depth requested in a REQ. When the user sends the REP, the CEP stored the responder resources as the minimum of the requested depth or the CA's capabilities. 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 git-svn-id: svn://openib.tc.cornell.edu/gen1@1322 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/core/al/kernel/al_cm_cep.c b/trunk/core/al/kernel/al_cm_cep.c index 23656953..33455d78 100644 --- a/trunk/core/al/kernel/al_cm_cep.c +++ b/trunk/core/al/kernel/al_cm_cep.c @@ -279,6 +279,10 @@ typedef struct _al_kcep /* Parameters to format QP modification structure. */ net32_t sq_psn; net32_t rq_psn; + /* + * Note that we store the requested initiator depth as received in the REQ + * and cap it when sending the REP to the actual capabilities of the HCA. + */ uint8_t resp_res; uint8_t init_depth; uint8_t rnr_nak_timeout; @@ -292,9 +296,6 @@ typedef struct _al_kcep /* PKEY to make sure a LAP is on the same partition. */ net16_t pkey; - /* Initiator depth as received in the REQ. */ - uint8_t req_init_depth; - /* * Primary and alternate path info, used to create the address vectors for * sending MADs, to locate the port CM agent to use for outgoing sends, @@ -832,7 +833,7 @@ __save_wire_req( p_cep->target_ack_delay = 0; /* Store the requested initiator depth. */ - p_cep->req_init_depth = conn_req_get_init_depth( p_req ); + p_cep->resp_res = conn_req_get_init_depth( p_req ); /* * Store the provided responder resources. These turn into the local @@ -4811,7 +4812,7 @@ __save_user_rep( ci_ca_lock_attr( p_cm_rep->h_qp->obj.p_ci_ca ); /* Check the CA's responder resource max and trim if necessary. */ if( (p_cm_rep->h_qp->obj.p_ci_ca->p_pnp_attr->max_qp_resp_res < - p_cep->req_init_depth) ) + p_cep->resp_res) ) { /* * The CA cannot handle the requested responder resources. @@ -4820,11 +4821,6 @@ __save_user_rep( p_cep->resp_res = p_cm_rep->h_qp->obj.p_ci_ca->p_pnp_attr->max_qp_resp_res; } - else - { - /* The CA supports the requested responder resources. */ - p_cep->resp_res = p_cep->req_init_depth; - } ci_ca_unlock_attr( p_cm_rep->h_qp->obj.p_ci_ca ); p_cep->rnr_nak_timeout = p_cm_rep->rnr_nak_timeout;