[dpdk-dev] [PATCH 2/4] eal: set byteorder in Windows to little endian

talshn at mellanox.com talshn at mellanox.com
Mon Jun 1 11:38:16 CEST 2020


From: Tal Shnaiderman <talshn at mellanox.com>

Set the endianness in Windows to RTE_LITTLE_ENDIAN as support
for Windows is limited to x86 architecture for now.

Signed-off-by: Tal Shnaiderman <talshn at mellanox.com>
---
 lib/librte_eal/include/generic/rte_byteorder.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/include/generic/rte_byteorder.h b/lib/librte_eal/include/generic/rte_byteorder.h
index 9ca960932f..6cfdf68731 100644
--- a/lib/librte_eal/include/generic/rte_byteorder.h
+++ b/lib/librte_eal/include/generic/rte_byteorder.h
@@ -17,8 +17,10 @@
 #include <stdint.h>
 #ifdef RTE_EXEC_ENV_FREEBSD
 #include <sys/endian.h>
-#else
+#elif defined RTE_EXEC_ENV_LINUX
 #include <endian.h>
+#elif defined RTE_EXEC_ENV_WINDOWS && !defined RTE_BYTE_ORDER
+#define RTE_BYTE_ORDER RTE_LITTLE_ENDIAN
 #endif
 
 #include <rte_common.h>
-- 
2.16.1.windows.4



More information about the dev mailing list