[v2,13/14] acl: 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/acl/acl_run.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -55,12 +55,12 @@ struct acl_flow_data {
* Structure to maintain running results for
* a single packet (up to 4 tries).
*/
-struct completion {
+struct __rte_aligned(XMM_SIZE) completion {
uint32_t *results; /* running results. */
int32_t priority[RTE_ACL_MAX_CATEGORIES]; /* running priorities. */
uint32_t count; /* num of remaining tries */
/* true for allocated struct */
-} __rte_aligned(XMM_SIZE);
+};
/*
* One parms structure for each slot in the search engine.