[ofw] [PATCH] [IBAL] compare TID based on user contolled area only

Sean Hefty sean.hefty at intel.com
Thu Dec 11 12:02:39 PST 2008


The current MAD processing code operates as follows when sending a request and
trying to match a received response:

1. It saves the user's transaction ID (TID) to client_tid.
2. It clears the upper 32-bits of the TID.
3. It sets the upper 32-bits of the TID to an internal index.
4. It clears the upper 32-bits of a received response.
5. It tries to match the received response against client_tid.

Responses are only matched successfully if the user has already cleared the
upper 32-bits of the TID before sending the MAD.  It would be better to only
match responses using the lower, user-controlled, 32-bits of the TID.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
Index: al_mad.c
===================================================================
--- al_mad.c	(revision 1722)
+++ al_mad.c	(working copy)
@@ -2129,7 +2129,8 @@
 
 		/* Match on the transaction ID, ignoring internally generated
sends. */
 		AL_EXIT( AL_DBG_MAD_SVC );
-		if( (p_recv_hdr->trans_id == h_send->mad_wr.client_tid) &&
+		if( al_get_user_tid(p_recv_hdr->trans_id) ==
+			al_get_user_tid(h_send->mad_wr.client_tid) &&
 			 !__is_internal_send( h_mad_svc->svc_type,
h_send->p_send_mad ) )
 		{
 			return h_send;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: al_mad_tid_compare.patch
Type: application/octet-stream
Size: 524 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20081211/4d4531ec/attachment.obj>


More information about the ofw mailing list