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

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

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff March 20, 2024, 3:38 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>
---
 drivers/compress/nitrox/nitrox_comp_reqmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

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;