@@ -2070,7 +2070,7 @@ static void cm_format_rep(struct cm_rep_msg *rep_msg,
CM_SET(REP_TARGET_ACK_DELAY, rep_msg,
cm_id_priv->av.port->cm_dev->ack_delay);
CM_SET(REP_FAILOVER_ACCEPTED, rep_msg, param->failover_accepted);
- cm_rep_set_rnr_retry_count(rep_msg, param->rnr_retry_count);
+ CM_SET(REP_RNR_RETRY_COUNT, rep_msg, param->rnr_retry_count);
rep_msg->local_ca_guid = cm_id_priv->id.device->node_guid;
if (cm_id_priv->qp_type != IB_QPT_XRC_TGT) {
@@ -2226,7 +2226,7 @@ static void cm_format_rep_event(struct cm_work *work, enum ib_qp_type qp_type)
param->target_ack_delay = CM_GET(REP_TARGET_ACK_DELAY, rep_msg);
param->failover_accepted = CM_GET(REP_FAILOVER_ACCEPTED, rep_msg);
param->flow_control = CM_GET(REP_END_TO_END_FLOW_CONTROL, rep_msg);
- param->rnr_retry_count = cm_rep_get_rnr_retry_count(rep_msg);
+ param->rnr_retry_count = CM_GET(REP_RNR_RETRY_COUNT, rep_msg);
param->srq = cm_rep_get_srq(rep_msg);
work->cm_event.private_data = &rep_msg->private_data;
work->cm_event.private_data_len = CM_REP_PRIVATE_DATA_SIZE;
@@ -2368,7 +2368,7 @@ static int cm_rep_handler(struct cm_work *work)
cm_id_priv->initiator_depth = rep_msg->resp_resources;
cm_id_priv->responder_resources = rep_msg->initiator_depth;
cm_id_priv->sq_psn = CM_GET(REP_STARTING_PSN, rep_msg);
- cm_id_priv->rnr_retry_count = cm_rep_get_rnr_retry_count(rep_msg);
+ cm_id_priv->rnr_retry_count = CM_GET(REP_RNR_RETRY_COUNT, rep_msg);
cm_id_priv->target_ack_delay = CM_GET(REP_TARGET_ACK_DELAY, rep_msg);
cm_id_priv->av.timeout =
cm_ack_timeout(cm_id_priv->target_ack_delay,
@@ -462,18 +462,6 @@ struct cm_rep_msg {
} __packed;
-static inline u8 cm_rep_get_rnr_retry_count(struct cm_rep_msg *rep_msg)
-{
- return (u8) (rep_msg->offset27 >> 5);
-}
-
-static inline void cm_rep_set_rnr_retry_count(struct cm_rep_msg *rep_msg,
- u8 rnr_retry_count)
-{
- rep_msg->offset27 = (u8) ((rep_msg->offset27 & 0x1F) |
- (rnr_retry_count << 5));
-}
-
static inline u8 cm_rep_get_srq(struct cm_rep_msg *rep_msg)
{
return (u8) ((rep_msg->offset27 >> 4) & 0x1);