summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hfi1/uc.c
diff options
context:
space:
mode:
authorMitko Haralanov2016-12-08 04:33:27 +0100
committerDoug Ledford2016-12-11 21:29:42 +0100
commitb777f154a0c21e1187c1806ababf9c5ba3e49eea (patch)
tree908c8eb00b5a369c9eac775c42ec8a91f3714459 /drivers/infiniband/hw/hfi1/uc.c
parentIB/rdmavt: Add trace of MR segs (diff)
downloadkernel-qcow2-linux-b777f154a0c21e1187c1806ababf9c5ba3e49eea.tar.gz
kernel-qcow2-linux-b777f154a0c21e1187c1806ababf9c5ba3e49eea.tar.xz
kernel-qcow2-linux-b777f154a0c21e1187c1806ababf9c5ba3e49eea.zip
IB/hfi1: Remove usage of qp->s_cur_sge
The s_cur_sge field in the qp structure holds a pointer to the SGE of the currently processed WQE. It assumes the protection of the RVT_S_BUSY flag to prevent the changing of this field while the send engine is using it. This scheme works as long as there is only one instance of the send engine running at a time. Scaling of the send engine to multiple cores would break this assumption as there could be multiple instances of the send engine running on different CPUs. This opens a window where the QP's RVT_S_BUSY flag is not set but the send engine is still running. To prevent accidental changing of the s_cur_sge pointer, the QP's dependence on it is removed. The SGE pointer is now stored in the verbs_txreq, which is a per-packet data structure. This ensures that each individual packet has it's own pointer, which is setup while the RVT_S_BUSY flag is set. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mitko Haralanov <mitko.haralanov@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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/uc.c b/drivers/infiniband/hw/hfi1/uc.c
index d062c3537f7c..b141a78ae38b 100644
--- a/drivers/infiniband/hw/hfi1/uc.c
+++ b/drivers/infiniband/hw/hfi1/uc.c
@@ -258,7 +258,7 @@ int hfi1_make_uc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps)
qp->s_len -= len;
qp->s_hdrwords = hwords;
ps->s_txreq->sde = priv->s_sde;
- qp->s_cur_sge = &qp->s_sge;
+ ps->s_txreq->ss = &qp->s_sge;
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);