diff options
author | Don Hiatt <don.hiatt@intel.com> | 2016-12-08 06:33:00 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-11 23:25:13 +0300 |
commit | e922ae06e90a37ab0b212f844e8aed9b6021cf21 (patch) | |
tree | 92eac529bee79a8c012645d91eb14bd734c9868b /drivers/infiniband/hw/hfi1/ruc.c | |
parent | b7481944b06e99dc84f4c7da2681ac89528b2020 (diff) | |
download | linux-e922ae06e90a37ab0b212f844e8aed9b6021cf21.tar.xz |
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.c | 4 |
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, |