[ofw] [PATCH] Cleanup how the CEP manager handles requested initiator depth

Leonid Keller leonid at mellanox.co.il
Wed Jul 2 05:10:30 PDT 2008


Applied in 1322. Thank you. 

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Fab Tillier
> Sent: Wednesday, July 02, 2008 12:54 AM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH] Cleanup how the CEP manager handles 
> requested initiator depth
> 
> 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 <ftillier at microsoft.com>
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\core\al\kernel\al_cm_cep.c trunk\core\al\kernel\al_cm_cep.c
> --- old\core\al\kernel\al_cm_cep.c      Tue Jul 01 13:27:39 2008
> +++ trunk\core\al\kernel\al_cm_cep.c    Tue Jul 01 13:26:53 2008
> @@ -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 @@ -4818,7 +4819,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.
> @@ -4827,11 +4828,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;
> 



More information about the ofw mailing list