[openib-general] Re: [RFC] userspace CM/verbs QP
Libor Michalek
libor at topspin.com
Thu Mar 3 16:57:05 PST 2005
On Thu, Mar 03, 2005 at 04:37:45PM -0800, Roland Dreier wrote:
> Libor> Roland, As it currently stands, the userspace CM needs to
> Libor> pass a QP from userspace to kernel space in order to pass
> Libor> it on to the kernel CM. I'm thinking that the best way to
> Libor> handle this is for the uCM library to pass uCM kernel the
> Libor> uverbs QP handle, and then have the kernel uCM lookup the
> Libor> QP from ib_uverbs. Unfortunetly this means ib_uverbs would
> Libor> need to export a lookup function.
>
> Libor> Would you like a patch, or do you have some other idea?
>
> Hmm, I guess that would be OK. It does mean you have to hold a mutex
> to avoid another userspace thread killing the QP out from under you,
> which is a little ugly to expose...
I was thinking of maybe ref counting the access, either in ib_qp or
ib_uobject. Adding a pair of functions, lookup and return, to manage
the ref count...
> What do you really need to do with the QP? Can you just have
> userspace pass the information like QP number that you need?
I thought about that, here's the current list, but we would need to
lookup the pd anyway:
qp->pd,
qp->qp_num
qp->qp_type
qp->srq
qp->device
-Libor
More information about the general
mailing list