Replace qp->qp_timeout_jiffies by the shorter name qp->timeout_jiffies which is a little less redundant. Signed-off-by: Bob Pearson <rpearsonhpe@xxxxxxxxx> --- drivers/infiniband/sw/rxe/rxe_comp.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_qp.c | 8 ++++---- drivers/infiniband/sw/rxe/rxe_req.c | 5 +++-- drivers/infiniband/sw/rxe/rxe_verbs.h | 6 +++--- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c index 138b3e7d3a5f..badd423966dc 100644 --- a/drivers/infiniband/sw/rxe/rxe_comp.c +++ b/drivers/infiniband/sw/rxe/rxe_comp.c @@ -672,9 +672,9 @@ int rxe_completer(void *arg) if ((qp_type(qp) == IB_QPT_RC) && (qp->req.state == QP_STATE_READY) && (psn_compare(qp->req.psn, qp->comp.psn) > 0) && - qp->qp_timeout_jiffies) + qp->timeout_jiffies) mod_timer(&qp->retrans_timer, - jiffies + qp->qp_timeout_jiffies); + jiffies + qp->timeout_jiffies); ret = -EAGAIN; goto done; diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c index 62acf890af6c..fc22ff36fdea 100644 --- a/drivers/infiniband/sw/rxe/rxe_qp.c +++ b/drivers/infiniband/sw/rxe/rxe_qp.c @@ -253,7 +253,7 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, rxe_init_task(rxe, &qp->comp.task, qp, rxe_completer, "comp"); - qp->qp_timeout_jiffies = 0; /* Can't be set for UD/UC in modify_qp */ + qp->timeout_jiffies = 0; /* Can't be set for UD/UC in modify_qp */ if (init->qp_type == IB_QPT_RC) { timer_setup(&qp->rnr_nak_timer, rnr_nak_timer, 0); timer_setup(&qp->retrans_timer, retransmit_timer, 0); @@ -633,12 +633,12 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask, if (mask & IB_QP_TIMEOUT) { qp->attr.timeout = attr->timeout; if (attr->timeout == 0) { - qp->qp_timeout_jiffies = 0; + qp->timeout_jiffies = 0; } else { /* According to the spec, timeout = 4.096 * 2 ^ attr->timeout [us] */ int j = nsecs_to_jiffies(4096ULL << attr->timeout); - qp->qp_timeout_jiffies = j ? j : 1; + qp->timeout_jiffies = j ? j : 1; } } @@ -781,7 +781,7 @@ int rxe_qp_chk_destroy(struct rxe_qp *qp) void rxe_qp_destroy(struct rxe_qp *qp) { qp->valid = 0; - qp->qp_timeout_jiffies = 0; + qp->timeout_jiffies = 0; rxe_cleanup_task(&qp->resp.task); if (qp_type(qp) == IB_QPT_RC) { diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index ae5fbc79dd5c..1884e3a64310 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -157,6 +157,7 @@ static struct rxe_send_wqe *req_next_wqe(struct rxe_qp *qp) return NULL; wqe = queue_addr_from_index(q, index); + WARN_ON((long)wqe & (L1_CACHE_BYTES - 1)); if (unlikely((qp->req.state == QP_STATE_DRAIN || qp->req.state == QP_STATE_DRAINED) && @@ -538,9 +539,9 @@ static void update_state(struct rxe_qp *qp, struct rxe_send_wqe *wqe, qp->need_req_skb = 0; - if (qp->qp_timeout_jiffies && !timer_pending(&qp->retrans_timer)) + if (qp->timeout_jiffies && !timer_pending(&qp->retrans_timer)) mod_timer(&qp->retrans_timer, - jiffies + qp->qp_timeout_jiffies); + jiffies + qp->timeout_jiffies); } static int rxe_do_local_ops(struct rxe_qp *qp, struct rxe_send_wqe *wqe) diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.h b/drivers/infiniband/sw/rxe/rxe_verbs.h index e7eff1ca75e9..83b6f80440d8 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.h +++ b/drivers/infiniband/sw/rxe/rxe_verbs.h @@ -249,11 +249,11 @@ struct rxe_qp { * started. The responder resets it whenever an ack is * received. */ - struct timer_list retrans_timer; - u64 qp_timeout_jiffies; + struct timer_list retrans_timer; + u64 timeout_jiffies; /* Timer for handling RNR NAKS. */ - struct timer_list rnr_nak_timer; + struct timer_list rnr_nak_timer; spinlock_t state_lock; /* guard requester and completer */ -- 2.34.1