Re: [openib-general] [PATCH RFC] return qp pointer as part of ib_wc
> > > 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? > > It's a bit of a layering violation -- a consumer uses the MAD layer > through the agent abstraction and so on, and then ends up getting a > pointer to the MAD layer's QP struct. > > I don't think it's really a big deal but it's worth pointing out. Yea. Well, one can argue that passing ib_wc for a work request that a client didn't build is a layering violation too - e.g. the wr_id does not make much sense either, does it? But it still seems easier than invent a ib_mad_wc. -- MST ___ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
Re: [openib-general] [PATCH RFC] return qp pointer as part of ib_wc
> > 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? It's a bit of a layering violation -- a consumer uses the MAD layer through the agent abstraction and so on, and then ends up getting a pointer to the MAD layer's QP struct. I don't think it's really a big deal but it's worth pointing out. ___ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
Re: [openib-general] [PATCH RFC] return qp pointer as part of ib_wc
> Quoting Roland Dreier <[EMAIL PROTECTED]>: > 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 ___ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
Re: [openib-general] [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... - R. ___ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
Re: [openib-general] [PATCH RFC] return qp pointer as part of ib_wc
[EMAIL PROTECTED] wrote: > Roland Dreier wrote: >> This change makes sense to me. Does anyone object to queueing this >> for 2.6.21? > > Indeed, it makes much sense, do you any idea what would it > take to expose this capability also by libibverbs? > > Or. > Translating QP ID to a kernel pointer in kernel verbs should be trivial for almost any implemention I've ever imagined. But translating a QP ID to a useful user mode pointer in user mode verbs is considerably trickier, and definitely not something you would want to do automatically even if the application had no use for this automatic translation. ___ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
Re: [openib-general] [PATCH RFC] return qp pointer as part of ib_wc
Roland Dreier wrote: > > Indeed, it makes much sense, do you any idea what would it take to > > expose this capability also by libibverbs? > > I think the biggest problem would be libipathverbs, which is copying > work completion structures directly out of the kernel (which looks > pretty fragile if struct ibv_wc ever changes...). We'll take a look at this - thanks for pointing it out. ___ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
Re: [openib-general] [PATCH RFC] return qp pointer as part of ib_wc
> Indeed, it makes much sense, do you any idea what would it take to > expose this capability also by libibverbs? I think the biggest problem would be libipathverbs, which is copying work completion structures directly out of the kernel (which looks pretty fragile if struct ibv_wc ever changes...). - R. ___ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
Re: [openib-general] [PATCH RFC] return qp pointer as part of ib_wc
Roland Dreier wrote: > This change makes sense to me. Does anyone object to queueing this > for 2.6.21? Indeed, it makes much sense, do you any idea what would it take to expose this capability also by libibverbs? Or. ___ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
Re: [openib-general] [PATCH RFC] return qp pointer as part of ib_wc
> Quoting Roland Dreier <[EMAIL PROTECTED]>: > Subject: Re: [PATCH RFC] return qp pointer as part of ib_wc > > This change makes sense to me. Does anyone object to queueing this > for 2.6.21? And for-mm, pls: last version of IPoIB CM patch needs this. -- MST ___ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
Re: [openib-general] [PATCH RFC] return qp pointer as part of ib_wc
Ok with me. On Mon, 2007-01-08 at 13:40 -0800, Roland Dreier wrote: > This change makes sense to me. Does anyone object to queueing this > for 2.6.21? > > - R. > > ___ > openib-general mailing list > openib-general@openib.org > http://openib.org/mailman/listinfo/openib-general > > To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general > ___ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
Re: [openib-general] [PATCH RFC] return qp pointer as part of ib_wc
This change makes sense to me. Does anyone object to queueing this for 2.6.21? - R. ___ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general