[ovs-dev] [PATCH] packets: Use WORDS_BIGENDIAN for struct geneve_opt.

Ben Pfaff blp at nicira.com
Sat Nov 1 00:46:23 UTC 2014


On Fri, Oct 31, 2014 at 04:53:00PM -0700, Jesse Gross wrote:
> WORDS_BIGENDIAN is defined by configure so it is a more portable
> way to test for endianness.
> 
> Reported-by: Ben Pfaff <blp at nicira.com>
> Signed-off-by: Jesse Gross <jesse at nicira.com>

Based on what I see , LITTLE_ENDIAN isn't a test for alignment at all,
it's just a constant.  If you want a test for endianness, you have to
write something like "#if BYTE_ORDER == __LITTLE_ENDIAN".

Acked-by: Ben Pfaff <blp at nicira.com>



More information about the dev mailing list