[Openib-windows] RE: [PATCH] create cq with invalid CQ

Fab Tillier ftillier at silverstorm.com
Tue Sep 6 12:40:52 PDT 2005


> From: Yossi Leybovich [mailto:sleybo at mellanox.co.il]
> Sent: Tuesday, September 06, 2005 9:52 AM
> 
...
> We found that the cid field is initialized only in init_conn_qp , so if you
> call the function with invalid cq the code will call the destroy function that
> in case of connected QP will test and set the cid field ( which is
> uninitialized)
...
> That will cause the cep destroy function to be called .... and the machine
> hang.
> Here is patch that fix this.
>
> Signed-off-by: Yossi Leybovich (sleybo at mellanox.co.il)
> Index: al_qp.c
> ===================================================================
> --- al_qp.c     (revision 346)
> +++ al_qp.c     (working copy)
> @@ -623,6 +623,9 @@
>         p_qp->pfn_init_dgrm_svc = al_bad_init_dgrm_svc;
>         p_qp->pfn_join_mcast = al_bad_join_mcast;
> 
> +       if(p_qp->type == IB_QPT_RELIABLE_CONN ||
> +               p_qp->type == IB_QPT_UNRELIABLE_CONN)
> +                       ((al_conn_qp_t*)p_qp)->cid = AL_INVALID_CID;

Multi-line if statements should have curlies (on separate lines for legibility).

>         return status;
>  }

Thanks, applied (with changes noted above) in revision 60.

- Fab




More information about the ofw mailing list