[v2,67/83] compress/nitrox: move alignment attribute on types

Message ID 1713211485-9021-68-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Accepted
Delegated to: David Marchand
Series move alignment attribute on types |


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff April 15, 2024, 8:04 p.m. UTC
  Move location of __rte_aligned(a) to new conventional location. The new
placement between {struct,union} and the tag allows the desired
alignment to be imparted on the type regardless of the toolchain being
used for both C and C++. Additionally, it avoids confusion by Doxygen
when generating documentation.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
 drivers/compress/nitrox/nitrox_comp_reqmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/drivers/compress/nitrox/nitrox_comp_reqmgr.c b/drivers/compress/nitrox/nitrox_comp_reqmgr.c
index ca45c3e..89af855 100644
--- a/drivers/compress/nitrox/nitrox_comp_reqmgr.c
+++ b/drivers/compress/nitrox/nitrox_comp_reqmgr.c
@@ -304,7 +304,7 @@  struct nitrox_sgtable {
 struct nitrox_softreq {
 	struct nitrox_zip_instr instr;
-	struct nitrox_zip_result zip_res __rte_aligned(8);
+	alignas(8) struct nitrox_zip_result zip_res;
 	uint8_t decomp_threshold[NITROX_ZIP_MAX_ONFSIZE];
 	struct rte_comp_op *op;
 	struct nitrox_sgtable src;