[ofw] [ofw'[Patch][umad] Avoid dangling reference

Alex Naslednikov xalex at mellanox.co.il
Wed Apr 20 00:18:43 PDT 2011


Hello Sean,
Would you like to commit this patch or try other solutions ?
I have no clear way of repro for this problem, but it happened consistently during long regression runs.

XaleX

-----Original Message-----
From: Hefty, Sean [mailto:sean.hefty at intel.com] 
Sent: Wednesday, April 20, 2011 8:58 AM
To: Alex Naslednikov; ofw at lists.openfabrics.org
Subject: RE: [ofw'[Patch][umad] Avoid dangling reference

> --- umad.cpp      (revision 7570)
> 
> +++ umad.cpp   (revision 7571)
> 
> @@ -613,11 +613,11 @@
> 
> 
> 
>                 umad_convert_addr(&mad->addr, &((WM_MAD *) mad)->Address);
> 
>                 hr = ports[portid].prov->Send((WM_MAD *) mad, NULL);
> 
> -              umad_convert_av(&((WM_MAD *) mad)->Address, &mad->addr);
> 
>                 if (FAILED(hr)) {
> 
>                                 _set_errno(EIO);
> 
>                                 return GetLastError();
> 
>                 }
> 
> +             umad_convert_av(&((WM_MAD *) mad)->Address, &mad->addr);

I should have a fix for this within the next couple of days that won't impact performance greatly.  The winmad library will need to support both address formats: the WV_MAD_AV that it defined, plus a umad compatibility format.  It can distinguish between the two by checking the 'Version' bits in the address.  This should ensure backwards compatability.

However, this likely won't matter in practice, since there's no need to do anything unless grh_present flag is set, and I don't see anything in the stack which does this, or think of any reason why it should ever be needed.  But just in case some app out there is trying to use it, I'll update libibumad and winmad.dll accordingly.

- Sean



More information about the ofw mailing list