[openib-general] What context can CM be called from?

Sean Hefty sean.hefty at intel.com
Mon Mar 28 16:14:15 PST 2005


>Is it supposed to be OK to call CM functions such as ib_send_cm_dreq()
>from interrupt context?  ib_send_cm_dreq() calls cm_alloc_msg(), and
>in the current CM code, cm_alloc_msg() does
>
>	m = kmalloc(sizeof *m, GFP_KERNEL);

In short, no.

We might be able to change the CM to be called at interrupt, but doing so
requires changes to the verbs implementation.  The cm_alloc_msg() calls
ib_create_ah(), which I believes calls kmalloc in a similar fashion.  I
should also note that cm_free_msg() calls ib_destroy_ah().

I looked at associating the address handle with the cm_id, rather than the
message, but it made things more difficult when sending messages that were
not associated with a cm_id.

- Sean




More information about the general mailing list