[v2,08/14] hash: use C11 alignas
Checks
Commit Message
* Move __rte_aligned from the end of {struct,union} definitions to
be between {struct,union} and tag.
The placement between {struct,union} and the tag allows the desired
alignment to be imparted on the type regardless of the toolchain being
used for all of GCC, LLVM, MSVC compilers building both C and C++.
* Replace use of __rte_aligned(a) on variables/fields with alignas(a).
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/hash/rte_thash.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
@@ -99,14 +99,14 @@ struct rte_ipv6_tuple {
};
};
+#ifdef RTE_ARCH_X86
+union __rte_aligned(XMM_SIZE) rte_thash_tuple {
+#else
union rte_thash_tuple {
+#endif
struct rte_ipv4_tuple v4;
struct rte_ipv6_tuple v6;
-#ifdef RTE_ARCH_X86
-} __rte_aligned(XMM_SIZE);
-#else
};
-#endif
/**
* Prepare special converted key to use with rte_softrss_be()