diff options
author | Ira Weiny <ira.weiny@intel.com> | 2016-02-03 14:14:45 -0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-10 20:37:31 -0500 |
commit | 60c30f572595e46c819503b5a8c3a8e2f922de7a (patch) | |
tree | 8f30efa7fa7c47b8c67174a61c4c37d3d3abb30e /drivers/infiniband | |
parent | b8f881b913f34f712185b2ff7a41645dcad9a868 (diff) | |
download | blackbird-op-linux-60c30f572595e46c819503b5a8c3a8e2f922de7a.tar.gz blackbird-op-linux-60c30f572595e46c819503b5a8c3a8e2f922de7a.zip |
IB/rdmavt: Add hardware driver send work request check
Some hardware drivers requires additional checks on send WRs. Create an
optional call back to allow hardware drivers to reject a send WR.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/sw/rdmavt/qp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c index 4711e148f34d..e9e3138d1203 100644 --- a/drivers/infiniband/sw/rdmavt/qp.c +++ b/drivers/infiniband/sw/rdmavt/qp.c @@ -1394,6 +1394,10 @@ static int rvt_post_one_wr(struct rvt_qp *qp, struct ib_send_wr *wr) if (next == qp->s_last) return -ENOMEM; + if (rdi->driver_f.check_send_wr && + rdi->driver_f.check_send_wr(qp, wr)) + return -EINVAL; + rkt = &rdi->lkey_table; pd = ibpd_to_rvtpd(qp->ibqp.pd); wqe = rvt_get_swqe_ptr(qp, qp->s_head); |