IB/srpt: Detect session shutdown reliably
authorBart Van Assche <bart.vanassche@sandisk.com>
Thu, 11 Feb 2016 19:08:53 +0000 (11:08 -0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 29 Feb 2016 22:12:36 +0000 (17:12 -0500)
commitaaf45bd83eba804adfa5c4ff5b17ca0c88884c6f
tree5bf8a5c34114da1c315d7ba59c422346d5879713
parent8628991fbe6a9086189f55f0b33dee7f25108ecc
IB/srpt: Detect session shutdown reliably

The Last WQE Reached event is only generated after one or more work
requests have been queued on the QP associated with a session. Since
session shutdown can start before any work requests have been queued,
use a zero-length RDMA write to wait until a QP has been drained.

Additionally, rework the code for closing and disconnecting a session.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Alex Estrin <alex.estrin@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/infiniband/ulp/srpt/ib_srpt.h