[ofw] Patch: swap the src and dst gids to allow mad replies to return

Tzachi Dar tzachid at mellanox.co.il
Thu Mar 25 09:55:53 PDT 2010


I don't think that the lids are being treated in a similar way, but there is a very similar code on the function spl_qp_alias_recv_cb (al_smi.c line 3325)

	if( p_mad_request->grh_valid )
	{
		cl_memcpy( &av_attr.grh, p_mad_request->p_grh1, sizeof( ib_grh_t ) );
		av_attr.grh.src_gid	 = p_mad_request->p_grh1->dest_gid;
		av_attr.grh.dest_gid = p_mad_request->p_grh1->src_gid;
		av_attr.grh_valid = TRUE;
	}

Thanks
Tzachi 

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Sean Hefty
> Sent: Thursday, March 25, 2010 6:20 PM
> To: Tzachi Dar; ofw at lists.openfabrics.org
> Subject: Re: [ofw] Patch: swap the src and dst gids to allow 
> mad replies to return
> 
> >The following patch is needed in order to allow mads with 
> grh to return 
> >correctly.
> 
> Is this what we want when reporting a received MAD?  Are the 
> LIDs treated in a similar fashion?
> 
> >+ if (p_mad_element->grh_valid) {
> >+  // swap the src and dst gids to allow replys to return  ib_gid_t 
> >+ tmp_gid;  tmp_gid = p_mad_element->p_grh1->src_gid;  
> >+ p_mad_element->p_grh1->src_gid = p_mad_element->p_grh1->dest_gid;  
> >+ p_mad_element->p_grh1->dest_gid = tmp_gid; }
> 
> 
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
> 


More information about the ofw mailing list