]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/common/include/rte_common.h
eal: add and use unaligned integer types
[dpdk.git] / lib / librte_eal / common / include / rte_common.h
index 0ea1b499cb9248ba9e5b519630eb7568dbdb0f4f..31213146541c333a5639881ca6bcce4866a4219d 100644 (file)
@@ -59,6 +59,16 @@ extern "C" {
 #define asm __asm__
 #endif
 
+#ifdef RTE_ARCH_STRICT_ALIGN
+typedef uint64_t unaligned_uint64_t __attribute__ ((aligned(1)));
+typedef uint32_t unaligned_uint32_t __attribute__ ((aligned(1)));
+typedef uint16_t unaligned_uint16_t __attribute__ ((aligned(1)));
+#else
+typedef uint64_t unaligned_uint64_t;
+typedef uint32_t unaligned_uint32_t;
+typedef uint16_t unaligned_uint16_t;
+#endif
+
 /*********** Macros to eliminate unused variable warnings ********/
 
 /**