[openib-general] [PATCH] initial CM module
frank zago
fzago at systemfabricworks.com
Thu Dec 16 14:10:52 PST 2004
Hi Sean,
>This patch adds in the initial CM API and module code. The module loads,
>unloads, and allocates/deallocates connection structures, but that's about it.
>This patch does not include changes needed to Kconfig or the Makefile, since I'm
>not sure that it makes sense to change these yet.
>
>I will commit this unless there are any objections.
>[...]
>
>+int ib_send_cm_req(struct ib_cm_id *cm_id,
>+ struct ib_cm_req_param *param);
>+
>
>+int ib_send_cm_rep(struct ib_cm_id *cm_id,
>+ struct ib_cm_req_param *param);
>+
>+int ib_send_cm_rtu(struct ib_cm_id *cm_id,
>+ void *private_data,
>+ u8 private_data_len);
>
>
I've used several CM and I found this kind of interface to be painful to
use.
I'd rather see an interface similar to Topspin's where you register a CM
callback, get CM events and react (or not) to these.
With the interface you propose it takes maybe 200 lines of code to
establish a simple connection, while with a callback it can be down to
30 lines. It should be as easy as possible for an application or a
driver to establish a connection. I shouldn't have to rewrite a CM state
machine every time I need a connection.
Frank.
More information about the general
mailing list