summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb4/qp.c
diff options
context:
space:
mode:
authorSteve Wise2016-02-17 17:15:41 +0100
committerDoug Ledford2016-02-29 23:10:27 +0100
commit765d67748bcf802c4642a49cd0139787d0d80783 (patch)
treee31df1485f9eef18d5b6276dd6562c2cdd62e505 /drivers/infiniband/hw/cxgb4/qp.c
parentLinux 4.5-rc6 (diff)
downloadkernel-qcow2-linux-765d67748bcf802c4642a49cd0139787d0d80783.tar.gz
kernel-qcow2-linux-765d67748bcf802c4642a49cd0139787d0d80783.tar.xz
kernel-qcow2-linux-765d67748bcf802c4642a49cd0139787d0d80783.zip
IB: new common API for draining queues
Add provider-specific drain_sq/drain_rq functions for providers needing special drain logic. Add static functions __ib_drain_sq() and __ib_drain_rq() which post noop WRs to the SQ or RQ and block until their completions are processed. This ensures the applications completions for work requests posted prior to the drain work request have all been processed. Add API functions ib_drain_sq(), ib_drain_rq(), and ib_drain_qp(). For the drain logic to work, the caller must: ensure there is room in the CQ(s) and QP for the drain work request and completion. allocate the CQ using ib_alloc_cq() and the CQ poll context cannot be IB_POLL_DIRECT. ensure that there are no other contexts that are posting WRs concurrently. Otherwise the drain is not guaranteed. Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/qp.c')
0 files changed, 0 insertions, 0 deletions