[v2,72/83] common/cpt: move alignment attribute on types

Message ID 1713211485-9021-73-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/common/cpt/cpt_common.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


diff --git a/drivers/common/cpt/cpt_common.h b/drivers/common/cpt/cpt_common.h
index d70668a..6596cc0 100644
--- a/drivers/common/cpt/cpt_common.h
+++ b/drivers/common/cpt/cpt_common.h
@@ -41,7 +41,7 @@  struct pending_queue {
 	unsigned int head;
-struct cpt_request_info {
+struct __rte_aligned(8) cpt_request_info {
 	/** Data path fields */
 	uint64_t comp_baddr;
 	volatile uint64_t *completion_addr;
@@ -58,7 +58,7 @@  struct cpt_request_info {
 	/** Control path fields */
 	uint64_t time_out;
 	uint8_t extra_time;
-} __rte_aligned(8);
 static __rte_always_inline void
 pending_queue_push(struct pending_queue *q, void *rid, unsigned int off,