Sean,

Is there documentation or a piece of sample code that shows how to interact with the CM correctly?

james

On Thu, 5 May 2005, Sean Hefty wrote:

This came up on a separate thread...

Currently the cm_id structured defined in ib_cm.h exposes a state field. This (and a couple of other fields) were originally exposed only for debug purposes, but I've noticed that both kDAPL and SDP access this field.

The issue is that access to the cm_id state must be protected by a lock in order to guarantee correct operation of the CM state machine. Because CM messages can be received at any time, the cm_id state could change if it is accessed outside of the locks.

While in a CM callback, the reported event should be used to determine the correct operation to take, rather than reading the cm_id state. I will try to work up some patches to correct this.

I will at the very least add comment to ib_cm.h about using these fields, or move them into the internal CM data structures.

- Sean
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to