WORDS_BIGENDIAN is defined by configure so it is a more portable
way to test for endianness.

Reported-by: Ben Pfaff <b...@nicira.com>
Signed-off-by: Jesse Gross <je...@nicira.com>
---
 lib/packets.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/packets.h b/lib/packets.h
index fc7e602..f45ddde 100644
--- a/lib/packets.h
+++ b/lib/packets.h
@@ -694,16 +694,16 @@ static inline bool dl_type_is_ip_any(ovs_be16 dl_type)
 struct geneve_opt {
     ovs_be16  opt_class;
     uint8_t   type;
-#ifdef LITTLE_ENDIAN
-    uint8_t   length:5;
-    uint8_t   r3:1;
-    uint8_t   r2:1;
-    uint8_t   r1:1;
-#else
+#ifdef WORDS_BIGENDIAN
     uint8_t   r1:1;
     uint8_t   r2:1;
     uint8_t   r3:1;
     uint8_t   length:5;
+#else
+    uint8_t   length:5;
+    uint8_t   r3:1;
+    uint8_t   r2:1;
+    uint8_t   r1:1;
 #endif
     uint8_t   opt_data[];
 };
-- 
1.9.1

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

Reply via email to