[37/83] raw/ntb: move alignment attribute on types

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


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff March 20, 2024, 3:37 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/raw/ntb/ntb.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


diff --git a/drivers/raw/ntb/ntb.h b/drivers/raw/ntb/ntb.h
index a30a6b6..563cedd 100644
--- a/drivers/raw/ntb/ntb.h
+++ b/drivers/raw/ntb/ntb.h
@@ -186,9 +186,9 @@  struct ntb_tx_queue {
 struct ntb_header {
-	uint16_t avail_cnt __rte_cache_aligned;
-	uint16_t used_cnt __rte_cache_aligned;
-	struct ntb_desc desc_ring[] __rte_cache_aligned;
+	alignas(RTE_CACHE_LINE_SIZE) uint16_t avail_cnt;
+	alignas(RTE_CACHE_LINE_SIZE) uint16_t used_cnt;
+	alignas(RTE_CACHE_LINE_SIZE) struct ntb_desc desc_ring[];
 /* ntb private data. */