X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_common.h;h=332f2a439e657bf542d9a5a2750da2eb8a6055a9;hb=e9186770adb95eca8a0dc3380404d49daf493db2;hp=0ea1b499cb9248ba9e5b519630eb7568dbdb0f4f;hpb=6307b909b8e01af6737734cde4ff8b782b6efdf3;p=dpdk.git diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h index 0ea1b499cb..332f2a439e 100644 --- a/lib/librte_eal/common/include/rte_common.h +++ b/lib/librte_eal/common/include/rte_common.h @@ -38,7 +38,7 @@ * @file * * Generic, commonly-used macro and inline function definitions - * for Intel DPDK. + * for DPDK. */ #ifdef __cplusplus @@ -59,6 +59,29 @@ 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 + +/** + * 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__)) + /*********** Macros to eliminate unused variable warnings ********/ /**