IPoIB/cm: Fix SRQ WR leak
authorMichael S. Tsirkin <mst@dev.mellanox.co.il>
Mon, 21 May 2007 12:04:59 +0000 (15:04 +0300)
committerRoland Dreier <rolandd@cisco.com>
Mon, 21 May 2007 20:35:40 +0000 (13:35 -0700)
SRQ WR leakage has been observed with IPoIB/CM: e.g. flipping ports on
and off will, with time, leak out all WRs and then all connections
will start getting RNR NAKs.  Fix this in the way suggested by spec:
move the QP being destroyed to the error state, wait for "Last WQE
Reached" event and then post WR on a "drain QP" connected to the same
CQ.  Once we observe a completion on the drain QP, it's safe to call
ib_destroy_qp.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

No differences found