> rdma_disconnect(cm_id); > rdma_destroy_qp(cm_id); > rdma_destroy_id(cm_id); > > We blow through all of those without waiting for anything specifically CM > related. We could wait for some send and receive work completions, sure, > but > we might not if the universe aligns just right and everything is idle when > we > tear things down. > > Is it safe to blow through those calls while the ib_cm thread might be > processing a callback for the given cm_id? Should we be serializing the > two > specifically? > > I think this code was initially written under the assumption that > rmda_disconnect() would only return once all CM callbacks completed. I'm > worried that rdma_disconnect() doesn't work that way.
rdma_destroy_id will block until all CM callbacks complete. rdma_disconnect does not. It merely issues or responds to a disconnect request. If it issues a disconnect request, then a disconnect callback will eventually follow, possibly before rdma_disconnect returns. - Sean -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html