[openib-general] cm_id state information

Sean Hefty mshefty at ichips.intel.com
Thu May 5 11:10:04 PDT 2005


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



More information about the general mailing list