On Mon, 2007-11-19 at 22:00 +0000, Sasha Khapyorsky wrote:
> On 13:53 Sat 17 Nov     , Jason Gunthorpe wrote:
> > On Tue, Nov 13, 2007 at 07:38:43AM -0800, Hal Rosenstock wrote:
> > > libibmad/dump.c: Support link speed and width vendor extensions
> > > 
> > > When decoding values, handle vendor extensions to link speed and width
> > > including accommodating a "documentation" change between IBA 1.2 and
> > > 1.2.1
> > 
> > Isn't this better done with a bitmap match?
> 
> Yes, it is better IMO.

I think this is applicable elsewhere as well. I'll see if I can cook up
a patch in my spare time.

-- Hal

> Sasha
> 
> > 
> > const unsigned int widths[] = {1,4,8,12};
> > 
> > char S[300];
> > int off = 0;
> > for (unsigned int I = 0; I != sizeof(width)/sizeof(width[0]) && off < 
> > sizeof(S); I++)
> >    if ((width >> I) & 1)
> >       off += snprintf(S,sizeof(S)-off,"%uX ",widths[I]);
> > 
> > Regards,
> > Jason
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to