]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/common/include/rte_common.h
eal: add packing and alignment macros
[dpdk.git] / lib / librte_eal / common / include / rte_common.h
index f8ca6f3ce3cf75d4c50e9364015c4bbb0b8a0ac6..b58a3841f4210efdfe0769d44c8e0f3ac2b11026 100644 (file)
@@ -69,6 +69,16 @@ typedef uint32_t unaligned_uint32_t;
 typedef uint16_t unaligned_uint16_t;
 #endif
 
+/**
+ * Force alignment
+ */
+#define __rte_aligned(a) __attribute__((__aligned__(a)))
+
+/**
+ * Force a structure to be packed
+ */
+#define __rte_packed __attribute__((__packed__))
+
 /******* Macro to mark functions and fields scheduled for removal *****/
 #define __rte_deprecated       __attribute__((__deprecated__))