[openib-general] Re: [RFC] userspace CM/verbs QP
Roland Dreier
roland at topspin.com
Fri Mar 4 08:58:41 PST 2005
I thought about this a little more. There is a problem with letting
the CM module look up QPs in the userspace verbs table: it becomes
very awkward to check that the the QP belongs to a context (==
userspace verbs file descriptor) owned by the CM user.
I see the following solutions:
1. Don't worry about checking. There's nothing too evil a CM user
can do with a QP beyond getting another QP to connect to it, since
the CM user can't modify a QP unless it legitimately owns it. And
an evil user can always guess the QPN instead of the QP handle anyway.
2. Change the CM API so that it just takes the QPN, QP type, SRQ
status and device directly rather than reading it out of the QP.
This lets the userspace CM just get the info from userspace
without needing to look at the QP at all. Of course it does raise
the issue of how userspace should specify the device.
3. Merge the userspace CM into userspace verbs support so they use
the same context. Ugh.
Personally I would lean slightly towards #2, since it feels to me like
even the kernel CM API would be cleaner that way. However I don't
have a good answer for how userspace should specify which device to
use.
- R.
More information about the general
mailing list