(SPAM?) Re: [openib-general][PATCH][RFC]: CMA header
Sean Hefty
mshefty at ichips.intel.com
Tue Sep 20 09:51:44 PDT 2005
Guy German wrote:
>>> typedef void (*ib_cma_event_handler)(enum ib_cma_event event, void
>>> *context, const void *private_data);
>>> typedef void (*ib_cma_listen_handler)(void *cma_id, struct ib_device
>>> *device, void *private_data, void *context);
>>
>> I think we can merge these two handlers. We do not want to pass back
>> struct ib_device* to a caller. The device needs to be associated with
>> the cma_id up front.
>
> The listen handler passes also the new cma_id. Do you think it is better
> to merge them and pass null in this field in the "active side" case? (or
> maybe pass the same cma_id back in the handler)...
It seems like something like:
ib_cma_event_handler(struct ib_cma_id*, struct ib_cma_event event);
struct ib_cma_event {
enum ib_cma_event event;
/* per event needed data, if any... */
struct ib_cma_id *listen_id;
void *private_data;
int private_data_len; /* needed? */
}
would work for any case. I don't know that we need to distinguish between
active and passive sides once a connection is established, and if we want to
support peer to peer connections at some point in time. It's just not clear to
me that once a connection has been established, if the listen handler is still
invoked for the new cma_id (e.g. disconnect), or is the cma_event_handler invoked?
- Sean
More information about the general
mailing list