[openib-general] Re: [PATCH] mad: add GID/class checking for matching received to sent MADs

Michael S. Tsirkin mst at mellanox.co.il
Wed Mar 1 09:32:08 PST 2006


Quoting r. Sean Hefty <mshefty at ichips.intel.com>:
> Subject: Re: [PATCH] mad: add GID/class checking for matching received to sent MADs
> 
> Michael S. Tsirkin wrote:
> >>>>>+	if (!send_resp && rcv_resp)
> >>>>>+		/* is request/response. GID/LIDs are both local (same). */
> >>>>>+		return 1;
> >>>>>+
> >We are comparing the GIDs of the requestor, remember?
> >I initiated one of the MADs and remote side initiated the other one
> >so I know they cant match.
> 
> At this point, all we know is that the send and original request are from 
> the same port.  We still don't know what GID was used in the send.  Don't 
> we still need to check that?

I think we return 1 here since the TID check performed earlier is sufficient
in this case since its locally unique.
As I said, same_gid might not be the best name for this function, but the
logic overall looks right to me.

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies



More information about the general mailing list