[ofa-general] hotplug event handle question

Sean Hefty mshefty at ichips.intel.com
Wed Apr 25 16:17:37 PDT 2007


>         if (!cma_comp(id_priv, CMA_CONNECT) &&
>             !cma_comp(id_priv, CMA_DISCONNECT))
>                 return -EINVAL;

This check only ensures that we have a valid underlying cm_id (cm_id.ib or 
cm_id.iw) and are bound to a device, with the underlying cm's providing the 
synchronization that we need.  To allow rdma_disconnect() to be called after the 
device has been removed will likely take a slight re-working of the states. 
(I'm more concerned about userspace clients calling rdma_disconnect at the wrong 
time and crashing the kernel than a misuse from kernel clients.)  I don't think 
that the device removal code should transition the QP into the error state 
underneath the user, so fixing rdma_disconnect seems like the way to go.

I will work on a fix for this.  In the meantime, the alternatives are either to 
remove the check or have the ULP transitioning QP into the error state.

Steve, I don't see where the iwarp code transitions the cm_id to CMA_DISCONNECT. 
  Does iwarp keep the cm_id in the CMA_CONNECT state until it is destroyed?

- Sean



More information about the general mailing list