[ofw] IBAL CM ignores responder resources of the passive side

Vijay Jayapala vijayjayapala at yahoo.com
Sat May 10 08:54:29 PDT 2014


Leonid Keller <leonid <at> mellanox.co.il> writes:

> 
> 
> 
> Hi guys,
>  
> Shortly:
> As far as understand, IBAL CM ignores responder resources of the passive 
side and use the active side InitDepth as an ultimate value for the 
responder resources.
> It’s look like a bug.
>  
> Details:
> Look at __save_user_rep(), which stores REP data into the CEP.
> It trims p_cep->resp_res in case it exceeds the HW capabilities.
> Then CM uses this field to set REP MAD resp_res field.
> For some reason __save_user_rep() doesn’t look at p_cm_rep->resp_res 
field, which claims the amount of responder resources the passive side is 
ready to allocate.
>  
> static void
> __save_user_rep(
>                 
IN                                                           cep_agent_t* 
const                                       p_port_cep,
>                 
IN                                                           kcep_t* 
const                                                   p_cep,
>                 IN                           const     iba_cm_rep* 
const                                         p_cm_rep,
>                 
IN                                                           
uint8_t                                                                     
            rnr_nak_timeout )
> {
>                 AL_ENTER( AL_DBG_CM );
>  
>                 p_cep->local_qpn = p_cm_rep->qpn;
>                 p_cep->rq_psn = p_cm_rep->starting_psn;
>                 p_cep->init_depth = p_cm_rep->init_depth;
>  
>                 ci_ca_lock_attr( p_port_cep->h_ca->obj.p_ci_ca );
>                 /* Check the CA's responder resource max and trim if 
necessary. */
>                 if( p_port_cep->h_ca->obj.p_ci_ca->p_pnp_attr-
>max_qp_resp_res <
>                                 p_cep->resp_res )
>                 {
>                                 /*
>                                  * The CA cannot handle the requested 
responder resources.
>                                  * Set the response to the CA's maximum.
>                                  */
>                                 p_cep->resp_res = 
>                                                 p_port_cep->h_ca-
>obj.p_ci_ca->p_pnp_attr->max_qp_resp_res;
>                 }
>  
>                 ci_ca_unlock_attr( p_port_cep->h_ca->obj.p_ci_ca );
>  
>                 p_cep->rnr_nak_timeout = rnr_nak_timeout;
>  
>                 AL_EXIT( AL_DBG_CM );
> }
>  
> I suggest to fix it the following way. What do you think ?
>  
> static void
> __save_user_rep(
>                 
IN                                                           cep_agent_t* 
const                                       p_port_cep,
>                 
IN                                                           kcep_t* 
const                                                   p_cep,
>                 IN                           const     iba_cm_rep* 
const                                         p_cm_rep,
>                 
IN                                                           
uint8_t                                                                     
            rnr_nak_timeout )
> {
>                 AL_ENTER( AL_DBG_CM );
>  
>                 p_cep->local_qpn = p_cm_rep->qpn;
>                 p_cep->rq_psn = p_cm_rep->starting_psn;
>                 p_cep->init_depth = p_cm_rep->init_depth;
>  
>                 ci_ca_lock_attr( p_port_cep->h_ca->obj.p_ci_ca );
>                 /* Check the CA's responder resource max and trim if 
necessary. */
>                 if( p_port_cep->h_ca->obj.p_ci_ca->p_pnp_attr-
>max_qp_resp_res <
>                                 p_cep->resp_res )
>                 {
>                                 /*
>                                  * The CA cannot handle the requested 
responder resources.
>                                  * Set the response to the CA's maximum.
>                                  */
>                                 p_cep->resp_res = 
>                                                 p_port_cep->h_ca-
>obj.p_ci_ca->p_pnp_attr->max_qp_resp_res;
>                 }
>  
>                 /* set responder resources, claimed by Accept, if they are 
less then Connect ones */
>                 if ( p_cm_rep->resp_res && (p_cep->resp_res > p_cm_rep-
>resp_res) )
>                                 p_cep->resp_res = p_cm_rep->resp_res;
>                 
>                 ci_ca_unlock_attr( p_port_cep->h_ca->obj.p_ci_ca );
>  
>                 p_cep->rnr_nak_timeout = rnr_nak_timeout;
>  
>                 AL_EXIT( AL_DBG_CM );
> }
> 
> 
> 
> _______________________________________________
> ofw mailing list
> ofw <at> lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw


Hi Leonid,

I have been using Mlnx_Winof_4.2.1165 drivers/SDK at my work place. Iam 
seeing this issue, i.e when i set the responder resource during the cm_req, 
it is not reflected in the cm_reply. So, when I call cm_rtu, I always get a 
response as invalid parameter.

Has this fix been included in the 4.2 drivers? 
Is there something Im missing in the ULP because of which im hitting this 
issue?

Would really appreciate any kind of help on this.

Thanks in advance.
Best Regards
Vijay




More information about the ofw mailing list