diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2017-02-14 10:56:36 -0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-02-19 09:51:55 -0500 |
commit | 9294000d6d895ad609f3cc4aff98c9c6175b466f (patch) | |
tree | 0ffc9f78e77a74c1ce03b69090e5a78cc0765064 /lib/lru_cache.c | |
parent | f039f44fc331a7c6f828dfed97d5df0588602fd8 (diff) |
IB/srp: Drain the send queue before destroying a QP
A quote from the IB spec:
However, if the Consumer does not wait for the Affiliated Asynchronous
Last WQE Reached Event, then WQE and Data Segment leakage may occur.
Therefore, it is good programming practice to tear down a QP that is
associated with an SRQ by using the following process:
* Put the QP in the Error State;
* wait for the Affiliated Asynchronous Last WQE Reached Event;
* either:
* drain the CQ by invoking the Poll CQ verb and either wait for CQ
to be empty or the number of Poll CQ operations has exceeded CQ
capacity size; or
* post another WR that completes on the same CQ and wait for this WR to return as a WC;
* and then invoke a Destroy QP or Reset QP.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Israel Rukshin <israelr@mellanox.com>
Cc: Max Gurtovoy <maxg@mellanox.com>
Cc: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'lib/lru_cache.c')
0 files changed, 0 insertions, 0 deletions