[openib-general] userspace CM API for per device handling
Sean Hefty
mshefty at ichips.intel.com
Wed Sep 14 14:32:55 PDT 2005
Roland Dreier wrote:
>>ibv_get_async_event(int fd, struct ibv_async_event *event);
>>ibv_get_cq_event(int fd, struct ibv_cq **cq, void **cq_context);
>
> This seems like mostly pain with little gain to me. A consumer doing
> a poll or something with multiple file descriptors still needs some
> mapping to some per-fd context so that it knows which fds are CQ event
> fds, which ones are async event fds, and which ones are neither. So
> it's pretty easy to go back to a verbs context.
I'm not sold on this change either. Right now I'm just trying to find a decent
API for the CM, and the one you mentioned works just as well.
As for mapping fd's to context, I think this depends on how the user groups
multiple file descriptors together and their threading model. A user could poll
only fd's associated with CQs; although, I don't think that the current
implementation of DAPL does this.
> If we wanted to be more symmetrical, we could have a CM API like
>
> struct ib_cm_context *ib_cm_get_context(struct ibv_context *dev_context);
> int ib_cm_get_event(struct ib_cm_context *context, struct ib_cm_event **event);
This API still gives the benefits that I was looking for, so I will go with
something like this for now. Thanks.
- Sean
More information about the general
mailing list