diff options
author | Michael S. Tsirkin <mst@dev.mellanox.co.il> | 2007-05-21 16:04:59 +0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-05-22 00:35:40 +0400 |
commit | 518b1646f8a31904ca637b8df0c1e31c34a7a3c2 (patch) | |
tree | b72e7d9b6b3e5338d636746e77d326bd42aa4e29 /drivers/infiniband/ulp/ipoib/ipoib_verbs.c | |
parent | 24bd1e4e32e88cd3d0675482d15bea498a922ca8 (diff) | |
download | linux-518b1646f8a31904ca637b8df0c1e31c34a7a3c2.tar.xz |
IPoIB/cm: Fix SRQ WR leak
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>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_verbs.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c index 791252621b26..982eb88e27ec 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c @@ -173,7 +173,7 @@ int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca) size = ipoib_sendq_size + ipoib_recvq_size + 1; ret = ipoib_cm_dev_init(dev); if (!ret) - size += ipoib_recvq_size; + size += ipoib_recvq_size + 1 /* 1 extra for rx_drain_qp */; priv->cq = ib_create_cq(priv->ca, ipoib_ib_completion, NULL, dev, size, 0); if (IS_ERR(priv->cq)) { |