[openib-general] Completion callback /teardown race
Eric Barton
eeb at bartonsoftware.com
Wed Sep 20 03:25:00 PDT 2006
Or,
> Eric Barton wrote:
> > I create 1 CQ just for receive completions on each of my QPs. When I
tear down
> > the QP, I rdma_disconnect(), change the QP state to IB_QPS_ERR and then
wait
> > for all currently posted receives to complete.
>
> I understand your driver is a CMA consumer whose QP state transitions
> are carried out by the CMA. So you need ***not*** modify the QP state to
> error, as the CMA does it for you in rdma_disconnect() before sending
> the DREQ or DREP.
Yes - understood. It's not actually harmful at this point I think. Please
correct me if I'm wrong.
> Please note that you need to call rdma_disconnect() in both sides, the
> one that initiates the disconnection but also on the side that gets the
> DREQ, that is suddenly gets RDMA_CM_EVENT_DISCONNECTED event...
I ensure I always call rdma_disconnect() once, no matter whether I am the
initiator or not.
Cheers,
Eric
More information about the general
mailing list