[openib-general] CM qpn byte order bug

Libor Michalek libor at topspin.com
Thu Jan 27 17:14:00 PST 2005


Sean,

  The local_qpn in the outgoing REP message is incorrect because of
a missing byte order swap.

-Libor


Signed-off-by: Libor Michalek <libor at topspin.com>

Index: infiniband/core/cm.c
===================================================================
--- infiniband/core/cm.c	(revision 1686)
+++ infiniband/core/cm.c	(working copy)
@@ -1102,7 +1102,7 @@
 
 	rep_msg->local_comm_id = cm_id_priv->id.local_id;
 	rep_msg->remote_comm_id = cm_id_priv->id.remote_id;
-	cm_rep_set_local_qpn(rep_msg, param->qp->qp_num);
+	cm_rep_set_local_qpn(rep_msg, cpu_to_be32(param->qp->qp_num));
 	cm_rep_set_starting_psn(rep_msg, param->starting_psn);
 	rep_msg->resp_resources = param->responder_resources;
 	rep_msg->initiator_depth = param->initiator_depth;



More information about the general mailing list