RDMA/cxgb4: Mind the sq_sig_all/sq_sig_type QP attributes
authorSteve Wise <swise@opengridcomputing.com>
Wed, 19 Mar 2014 12:14:43 +0000 (17:44 +0530)
committerRoland Dreier <roland@purestorage.com>
Thu, 20 Mar 2014 17:01:30 +0000 (10:01 -0700)
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/iw_cxgb4.h
drivers/infiniband/hw/cxgb4/qp.c

index 23eaeabab93b50d483e279de2adb7175c7c29dfc..b810d2a89d05333e1767b2aeb7e8751f7d9873dc 100644 (file)
@@ -441,6 +441,7 @@ struct c4iw_qp {
        atomic_t refcnt;
        wait_queue_head_t wait;
        struct timer_list timer;
+       int sq_sig_all;
 };
 
 static inline struct c4iw_qp *to_c4iw_qp(struct ib_qp *ibqp)
index 72ea152c5f4069a1b6c90079149e75812eac1484..723ad290bd9d0739d1256b3b9bc9d91a1fa9cf20 100644 (file)
@@ -675,7 +675,7 @@ int c4iw_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
                fw_flags = 0;
                if (wr->send_flags & IB_SEND_SOLICITED)
                        fw_flags |= FW_RI_SOLICITED_EVENT_FLAG;
-               if (wr->send_flags & IB_SEND_SIGNALED)
+               if (wr->send_flags & IB_SEND_SIGNALED || qhp->sq_sig_all)
                        fw_flags |= FW_RI_COMPLETION_FLAG;
                swsqe = &qhp->wq.sq.sw_sq[qhp->wq.sq.pidx];
                switch (wr->opcode) {
@@ -736,7 +736,8 @@ int c4iw_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
                }
                swsqe->idx = qhp->wq.sq.pidx;
                swsqe->complete = 0;
-               swsqe->signaled = (wr->send_flags & IB_SEND_SIGNALED);
+               swsqe->signaled = (wr->send_flags & IB_SEND_SIGNALED) ||
+                                 qhp->sq_sig_all;
                swsqe->flushed = 0;
                swsqe->wr_id = wr->wr_id;
 
@@ -1605,6 +1606,7 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs,
        qhp->attr.enable_bind = 1;
        qhp->attr.max_ord = 1;
        qhp->attr.max_ird = 1;
+       qhp->sq_sig_all = attrs->sq_sig_type == IB_SIGNAL_ALL_WR;
        spin_lock_init(&qhp->lock);
        mutex_init(&qhp->mutex);
        init_waitqueue_head(&qhp->wait);