summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/hfi1/qp.h
diff options
context:
space:
mode:
authorDennis Dalessandro2016-01-19 23:42:00 +0100
committerDoug Ledford2016-03-11 02:37:36 +0100
commit4c6829c5c7d6186b76cf0817f9aa8e63831a6a27 (patch)
treea039d2373dc4c5dd3ac624dd930c9c352c752a37 /drivers/staging/rdma/hfi1/qp.h
parentstaging/rdma/hfi1: Remove MR data structures from hfi1 (diff)
downloadkernel-qcow2-linux-4c6829c5c7d6186b76cf0817f9aa8e63831a6a27.tar.gz
kernel-qcow2-linux-4c6829c5c7d6186b76cf0817f9aa8e63831a6a27.tar.xz
kernel-qcow2-linux-4c6829c5c7d6186b76cf0817f9aa8e63831a6a27.zip
staging/rdma/hfi1: Remove driver specific members from hfi1 qp type
In preparation for moving the queue pair data structure to rdmavt the members of the driver specific queue pairs which are not common need to be pushed off to a private driver structure. This structure will be available in the queue pair once moved to rdmavt as a void pointer. This patch while not adding a lot of value in and of itself is a prerequisite to move the queue pair out of the drivers and into rdmavt. The driver specific, private queue pair data structure should condense as more of the send side code moves to rdmavt. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma/hfi1/qp.h')
-rw-r--r--drivers/staging/rdma/hfi1/qp.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/staging/rdma/hfi1/qp.h b/drivers/staging/rdma/hfi1/qp.h
index 19b16a9a99ea..474c838e3b50 100644
--- a/drivers/staging/rdma/hfi1/qp.h
+++ b/drivers/staging/rdma/hfi1/qp.h
@@ -123,10 +123,12 @@ static inline struct hfi1_qp *hfi1_lookup_qpn(struct hfi1_ibport *ibp,
*/
static inline void clear_ahg(struct hfi1_qp *qp)
{
- qp->s_hdr->ahgcount = 0;
+ struct hfi1_qp_priv *priv = qp->priv;
+
+ priv->s_hdr->ahgcount = 0;
qp->s_flags &= ~(HFI1_S_AHG_VALID | HFI1_S_AHG_CLEAR);
- if (qp->s_sde && qp->s_ahgidx >= 0)
- sdma_ahg_free(qp->s_sde, qp->s_ahgidx);
+ if (priv->s_sde && qp->s_ahgidx >= 0)
+ sdma_ahg_free(priv->s_sde, qp->s_ahgidx);
qp->s_ahgidx = -1;
}
@@ -257,14 +259,15 @@ void qp_comm_est(struct hfi1_qp *qp);
*/
static inline void _hfi1_schedule_send(struct hfi1_qp *qp)
{
+ struct hfi1_qp_priv *priv = qp->priv;
struct hfi1_ibport *ibp =
to_iport(qp->ibqp.device, qp->port_num);
struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
struct hfi1_devdata *dd = dd_from_ibdev(qp->ibqp.device);
- iowait_schedule(&qp->s_iowait, ppd->hfi1_wq,
- qp->s_sde ?
- qp->s_sde->cpu :
+ iowait_schedule(&priv->s_iowait, ppd->hfi1_wq,
+ priv->s_sde ?
+ priv->s_sde->cpu :
cpumask_first(cpumask_of_node(dd->assigned_node_id)));
}