> > +// If the Version is not set, use umad compatability address format
> > +static void WmConvertGrh(ib_grh_t *pGrh, WM_IO_MAD *pIoMad)
> > +{
> > +   if (RtlUlongByteSwap(pIoMad->Address.VersionClassFlow) >> 28) {
> 
> Couldn't you just check the upper four bits of the lowest byte and avoid
> the byte swap here:

Only if you assume little endian.  The efficiency doesn't seem worth it versus 
the maintenance, especially since nothing in the tree will actually invoke this 
code.  We'll fail on the GrhValid test before calling this function.

Besides, if the compiler were smart enough, it would figure this out for us, 
since we're shifting 28 bits over.  :)

- Sean
_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to