Quoting Sean Hefty <[EMAIL PROTECTED]>: Subject: RE: [ofa-general] hotplug event handle question
> >I think the problem is that cma_remove_id_dev overrides the current state, > >losing state information in the process. Why do we need CMA_DEVICE_REMOVAL > >at all? Everything seems to work fine just by forwarding > >RDMA_CM_EVENT_DEVICE_REMOVAL > >to user, without touching state. > > I need to read back over the code. The problem is that device removal can > come > at anytime. The user could have called rdma_destroy_id, be about to call it, > or > be destroying the id by returning a non-zero value from a callback. We need > to > synchronize with all cases, and in the later case, we cannot perform the > callback to notify the user of the device removal. Similarly, if the user > destroys the id from a device removal event callback, then callbacks for > others > event should not be called. > > If we can do this by removing the device removal state, that would seem to be > the simplest approach, but I need to verify that we can cover all corner > cases. My point is that we shouldn't be losing state just because we got hotplug event - device is not yet going away until we return from the remove event callback. ... > At the very least we need to repeat the check: > > if (!cma_comp(id_priv, CMA_DESTROYING)) > return 0; > > here to avoid calling the user after they've tried to destroy their id from > another callback. See comment above. OK. Would that be enough? -- MST _______________________________________________ general mailing list general@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general