On Thu, Mar 13, 2014 at 11:26:09AM -0700, Gurucharan Shetty wrote:
> >
> > The OVS byte order tests are a little different from the BSD ones.
> > Instead of:
> >         #if BYTE_ORDER == BIG_ENDIAN
> > the OVS test should be
> >         #ifdef WORDS_BIGENDIAN
> > although it looks like one might better #include "byte-order.h" and then
> > use CONSTANT_HTONx().
> 
> You mean, do something like this right?
> 
> Replace the following:
> 
> #if BYTE_ORDER == BIG_ENDIAN
> #define ND_NA_FLAG_ROUTER       0x80000000
> #define ND_NA_FLAG_SOLICITED        0x40000000
> #define ND_NA_FLAG_OVERRIDE     0x20000000
> #else
> #if BYTE_ORDER == LITTLE_ENDIAN
> #define ND_NA_FLAG_ROUTER       0x80
> #define ND_NA_FLAG_SOLICITED        0x40
> #define ND_NA_FLAG_OVERRIDE     0x20
> #endif
> #endif
> 
> By:
> 
> #include <byte-order.h>
> 
> #define ND_NA_FLAG_ROUTER       CONSTANT_HTONL(0x80000000)
> #define ND_NA_FLAG_SOLICITED    CONSTANT_HTONL(0x40000000)
> #define ND_NA_FLAG_OVERRIDE     CONSTANT_HTONL(0x20000000)

Yes, that's what I mean.  Or you could just adjust the #ifs, I'm not
really picky here.

Thanks,

Ben.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to