[openib-general] more CM byte ordering.
Libor Michalek
libor at topspin.com
Wed Feb 2 16:47:16 PST 2005
Sean,
I found a couple more spots in the active connect case of incorrect
byte ordering, this time around starting psn. Here is a tested patch.
-Libor
Index: infiniband/core/cm.c
===================================================================
--- infiniband/core/cm.c (revision 1725)
+++ infiniband/core/cm.c (working copy)
@@ -711,7 +711,7 @@
param->remote_cm_response_timeout);
cm_req_set_qp_type(req_msg, param->qp->qp_type);
cm_req_set_flow_ctrl(req_msg, param->flow_control);
- cm_req_set_starting_psn(req_msg, cpu_to_be32(param->starting_psn));
+ cm_req_set_starting_psn(req_msg, param->starting_psn);
cm_req_set_local_resp_timeout(req_msg,
param->local_cm_response_timeout);
cm_req_set_retry_count(req_msg, param->retry_count);
Index: infiniband/core/cm_msgs.h
===================================================================
--- infiniband/core/cm_msgs.h (revision 1725)
+++ infiniband/core/cm_msgs.h (working copy)
@@ -529,7 +529,7 @@
static inline u32 cm_rep_get_starting_psn(struct cm_rep_msg *rep_msg)
{
- return cpu_to_be32(be32_to_cpu(rep_msg->offset20) >> 8);
+ return be32_to_cpu(rep_msg->offset20) >> 8;
}
static inline void cm_rep_set_starting_psn(struct cm_rep_msg *rep_msg,
More information about the general
mailing list