[v2,04/14] ring: remove unnecessary explicit alignment

Message ID 1707884270-27189-5-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series use C11 alignas and normalize type alignment |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff Feb. 14, 2024, 4:17 a.m. UTC
  Remove explicit alignment with __rte_aligned(8) from
RTE_ATOMIC(uint64_t) raw fields in the absence of packing the fields
should be naturally aligned to 8.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/ring/rte_ring_core.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/lib/ring/rte_ring_core.h b/lib/ring/rte_ring_core.h
index b770873..619b69f 100644
--- a/lib/ring/rte_ring_core.h
+++ b/lib/ring/rte_ring_core.h
@@ -78,7 +78,7 @@  struct rte_ring_headtail {
 
 union __rte_ring_rts_poscnt {
 	/** raw 8B value to read/write *cnt* and *pos* as one atomic op */
-	RTE_ATOMIC(uint64_t) raw __rte_aligned(8);
+	RTE_ATOMIC(uint64_t) raw;
 	struct {
 		uint32_t cnt; /**< head/tail reference counter */
 		uint32_t pos; /**< head/tail position */
@@ -94,7 +94,7 @@  struct rte_ring_rts_headtail {
 
 union __rte_ring_hts_pos {
 	/** raw 8B value to read/write *head* and *tail* as one atomic op */
-	RTE_ATOMIC(uint64_t) raw __rte_aligned(8);
+	RTE_ATOMIC(uint64_t) raw;
 	struct {
 		RTE_ATOMIC(uint32_t) head; /**< head position */
 		RTE_ATOMIC(uint32_t) tail; /**< tail position */