diff options
author | Don Hiatt <don.hiatt@intel.com> | 2016-12-07 19:33:00 -0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-11 15:25:13 -0500 |
commit | e922ae06e90a37ab0b212f844e8aed9b6021cf21 (patch) | |
tree | 92eac529bee79a8c012645d91eb14bd734c9868b /drivers/infiniband/hw/hfi1/uc.c | |
parent | b7481944b06e99dc84f4c7da2681ac89528b2020 (diff) | |
download | lwn-e922ae06e90a37ab0b212f844e8aed9b6021cf21.tar.gz lwn-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/uc.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/uc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/uc.c b/drivers/infiniband/hw/hfi1/uc.c index 5e6d1bac4914..d062c3537f7c 100644 --- a/drivers/infiniband/hw/hfi1/uc.c +++ b/drivers/infiniband/hw/hfi1/uc.c @@ -259,7 +259,7 @@ int hfi1_make_uc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps) qp->s_hdrwords = hwords; ps->s_txreq->sde = priv->s_sde; qp->s_cur_sge = &qp->s_sge; - qp->s_cur_size = len; + ps->s_txreq->s_cur_size = len; hfi1_make_ruc_header(qp, ohdr, bth0 | (qp->s_state << 24), mask_psn(qp->s_psn++), middle, ps); /* pbc */ |