[openib-general] [PATCH RFC] return qp pointer as part of ib_wc

Michael S. Tsirkin mst at mellanox.co.il
Tue Jan 9 20:56:20 PST 2007


> Quoting Roland Dreier <rdreier at cisco.com>:
> Subject: Re: [PATCH RFC] return qp pointer as part of ib_wc
> 
> Looking at this in depth, I see one very iffy part:
> 
>  > @@ -652,7 +653,7 @@ static void build_smp_wc(u64 wr_id, u16 slid, u16 pkey_index, u8 port_num,
>  >  	wc->pkey_index = pkey_index;
>  >  	wc->byte_len = sizeof(struct ib_mad) + sizeof(struct ib_grh);
>  >  	wc->src_qp = IB_QP0;
>  > -	wc->qp_num = IB_QP0;
>  > +	wc->qp = qp;
> 
> this is now returning a pointer to the MAD layer's internal QP.  I
> guess this is OK -- the only user of the pointer seems to be the mthca
> MAD_IFC command, which just grabs the QP number anyway.  But I just
> wanted to point out this wart...

What's the problem with this?

-- 
MST




More information about the general mailing list