diff options
author | Mike Marciniszyn | 2015-11-10 01:13:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-11-20 01:55:37 +0100 |
commit | d7b8ba5121e874fddd09e2e953f09646594a24a8 (patch) | |
tree | 010241d7d0d3abf58b46f2d30f7fb763c5046885 /drivers/staging/rdma/hfi1/ruc.c | |
parent | staging/rdma/hfi1: Use parallel workqueue for SDMA engines (diff) | |
download | kernel-qcow2-linux-d7b8ba5121e874fddd09e2e953f09646594a24a8.tar.gz kernel-qcow2-linux-d7b8ba5121e874fddd09e2e953f09646594a24a8.tar.xz kernel-qcow2-linux-d7b8ba5121e874fddd09e2e953f09646594a24a8.zip |
staging/rdma/hfi1: pre-compute sc and sde for RC/UC QPs
Now that we have a multi-threaded work queue we precomputed and store the SC
and SDE on RC and UC QPs for faster access.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/hfi1/ruc.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/ruc.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/staging/rdma/hfi1/ruc.c b/drivers/staging/rdma/hfi1/ruc.c index cf8ac617552f..863092bb0684 100644 --- a/drivers/staging/rdma/hfi1/ruc.c +++ b/drivers/staging/rdma/hfi1/ruc.c @@ -694,11 +694,8 @@ static inline void build_ahg(struct hfi1_qp *qp, u32 npsn) clear_ahg(qp); if (!(qp->s_flags & HFI1_S_AHG_VALID)) { /* first middle that needs copy */ - if (qp->s_ahgidx < 0) { - if (!qp->s_sde) - qp->s_sde = qp_to_sdma_engine(qp, qp->s_sc); + if (qp->s_ahgidx < 0) qp->s_ahgidx = sdma_ahg_alloc(qp->s_sde); - } if (qp->s_ahgidx >= 0) { qp->s_ahgpsn = npsn; qp->s_hdr->tx_flags |= SDMA_TXREQ_F_AHG_COPY; @@ -741,7 +738,6 @@ void hfi1_make_ruc_header(struct hfi1_qp *qp, struct hfi1_other_headers *ohdr, u16 lrh0; u32 nwords; u32 extra_bytes; - u8 sc5; u32 bth1; /* Construct the header. */ @@ -755,9 +751,7 @@ void hfi1_make_ruc_header(struct hfi1_qp *qp, struct hfi1_other_headers *ohdr, lrh0 = HFI1_LRH_GRH; middle = 0; } - sc5 = ibp->sl_to_sc[qp->remote_ah_attr.sl]; - lrh0 |= (sc5 & 0xf) << 12 | (qp->remote_ah_attr.sl & 0xf) << 4; - qp->s_sc = sc5; + lrh0 |= (qp->s_sc & 0xf) << 12 | (qp->remote_ah_attr.sl & 0xf) << 4; /* * reset s_hdr/AHG fields * |