aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hfi1/ruc.c
diff options
context:
space:
mode:
authorDon Hiatt <don.hiatt@intel.com>2016-12-07 19:33:00 -0800
committerDoug Ledford <dledford@redhat.com>2016-12-11 15:25:13 -0500
commite922ae06e90a37ab0b212f844e8aed9b6021cf21 (patch)
tree92eac529bee79a8c012645d91eb14bd734c9868b /drivers/infiniband/hw/hfi1/ruc.c
parentIB/hfi1: Show statistics counters under IB stats interface (diff)
downloadlinux-dev-e922ae06e90a37ab0b212f844e8aed9b6021cf21.tar.xz
linux-dev-e922ae06e90a37ab0b212f844e8aed9b6021cf21.zip
IB/hfi1: Remove dependence on qp->s_cur_size
The qp->s_cur_size field assumes that the S_BUSY bit protects the field from modification after the slock is dropped. Scaling the send engine to multiple cores would break that assumption. Correct the issue by carrying the payload size in the txreq structure. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Don Hiatt <don.hiatt@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/ruc.c')
-rw-r--r--drivers/infiniband/hw/hfi1/ruc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hfi1/ruc.c b/drivers/infiniband/hw/hfi1/ruc.c
index 5a70e91b5191..2ec3e908691b 100644
--- a/drivers/infiniband/hw/hfi1/ruc.c
+++ b/drivers/infiniband/hw/hfi1/ruc.c
@@ -767,8 +767,8 @@ void hfi1_make_ruc_header(struct rvt_qp *qp, struct ib_other_headers *ohdr,
u32 bth1;
/* Construct the header. */
- extra_bytes = -qp->s_cur_size & 3;
- nwords = (qp->s_cur_size + extra_bytes) >> 2;
+ extra_bytes = -ps->s_txreq->s_cur_size & 3;
+ nwords = (ps->s_txreq->s_cur_size + extra_bytes) >> 2;
lrh0 = HFI1_LRH_BTH;
if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) {
qp->s_hdrwords += hfi1_make_grh(ibp,