[openib-general] umad_recv won't block after first read...

Hal Rosenstock halr at voltaire.com
Thu Aug 10 07:32:35 PDT 2006


Hi again Abhijit,

On Thu, 2006-08-10 at 09:46, Abhijit Gadgil wrote:
> Hi Hal, 
> 
> Please see below.
> 
> On Aug 10, 2006 07:01 PM, Hal Rosenstock <halr at voltaire.com> wrote:
> 
> > Hi Abhijit,
> > 
> > On Thu, 2006-08-10 at 07:21, Abhijit Gadgil wrote:
> > > Hi All, 
> > > 
> > > I am trying to write a simple program using libibumad to 'subscribe' for traps and then receive traps from the SA. Most of the things seem to work fine, however I am facing a small problem where, after first read for the trap, all subsequent reads are not blocking (and return some incorrect length). 
> > 
> > What do those calls return ? What version of management are you using ? 
> > 
> 
> I am running the management code from the SVN (svn release 8781, it may be slightly outdated!) 

A fix just went in to libibumad:umad_recv which may impact your results.
Can you update this and retry ?

What do the reads return other than incorrect length ? 

-- Hal

> > > Attached is the simple code, can someone tell, what exactly is wrong out here? 
> > 
> > I didn't build and run this so my comments are based on just looking at
> > the code. I don't think it would build as there are other changes needed
> > to support this (e.g. IB_SA_INFINFO_XXX in libibmad at a minimum).
> > 
> 
> Oh I am sorry, I didn't mention this before, I modified the libibmad sources (specifically src/fields.c and include/infiniband/mad.h) files to accomplish this. Once I get it right, I will submit a patch. (It's too hacky right now)
> 
> > Is the main loop based on some operational program ? If so, which one ?
> > 
> > A couple of specific comments:
> > 
> > init_sa_headers: InformInfo does not actually use RMPP so the
> > initialization here needs to change. Not sure what doing this would
> > cause without actually building and running this.
> > 
> 
> This was my first try of trying to use umad, hence for simplicity I copied from some reference code that was having RMPP enabled. I think I should get rid of this as well. 
> 
> 
> > Based on this, what is the result of the subscription ? Does it really
> > succeed ?
> 
> Well the subscriptions in-deed succeeded and I was able to receive IPoIB broadcast multicast group creation/deletion traps as well, but the problem mentioned below (ie. non-blocking reads) started appearing. 
> 
> > main: Rather than hard coding SM LID to 0x12, there are ways to get this
> > dynamically. There are examples of how to do this.
> 
> Sorry about this again. I realized it later that it is stupid to hard code it (eg. I could have got it from the ca[].port->sm_lid), will fix that eventually. 
> 
> Thanks.
> 
> -abhijit
> 
> > -- Hal
> > 
> > > Thanks
> > > 
> > > -abhijit
> > > 
> > > ______________________________________________________________________
> > > _______________________________________________
> > > openib-general mailing list
> > > openib-general at openib.org
> > > http://openib.org/mailman/listinfo/openib-general
> > > 
> > > To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> 





More information about the general mailing list