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

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

Patch

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,