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

Leonid Keller leonid at mellanox.co.il
Wed Dec 17 02:10:51 PST 2008


Applied in 1794, thank you. 

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Sean Hefty
> Sent: Thursday, December 11, 2008 10:03 PM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH] [IBAL] compare TID based on user 
> contolled area only
> 
> 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;
> 
> 



More information about the ofw mailing list