[openib-general] [PATCH applied] sdp: endian-ness fix for src avail cancellation
Michael S. Tsirkin
mst at mellanox.co.il
Mon Aug 29 00:06:46 PDT 2005
The following was applied in rev 3218.
Longer term we clearly want to kill all occurrences of
sdp_msg_cpu_to_net_bsdh and deal with packets properly as they arrive - in
network order.
---
When SrcAvailCancel is sent, the sequence number must be stored
in the connection context for matching with SendSm responses.
This was currently taken from bsdh_hdr which has wrong (net)
endian-ness.
Fix by taking the number from the connection context.
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: linux-2.6.12.2/drivers/infiniband/ulp/sdp/sdp_send.c
===================================================================
--- linux-2.6.12.2.orig/drivers/infiniband/ulp/sdp/sdp_send.c
+++ linux-2.6.12.2/drivers/infiniband/ulp/sdp/sdp_send.c
@@ -161,7 +161,7 @@ static int sdp_send_buff_post(struct sdp
*/
if (conn->flags & SDP_CONN_F_SRC_CANCEL_L)
conn->src_cseq = ((buff->bsdh_hdr->mid == SDP_MID_SRC_CANCEL) ?
- buff->bsdh_hdr->seq_num : conn->src_cseq);
+ conn->send_seq : conn->src_cseq);
return 0;
done:
--
MST
More information about the general
mailing list