[48/83] dma/ioat: move alignment attribute on types

Message ID 1710949096-5786-49-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: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/dma/ioat/ioat_internal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/dma/ioat/ioat_internal.h b/drivers/dma/ioat/ioat_internal.h
index 4fa19eb..f4285c5 100644
--- a/drivers/dma/ioat/ioat_internal.h
+++ b/drivers/dma/ioat/ioat_internal.h
@@ -12,7 +12,7 @@  struct ioat_dmadev {
 	struct rte_dma_vchan_conf qcfg;
 	struct rte_dma_stats stats;
 
-	volatile uint16_t *doorbell __rte_cache_aligned;
+	volatile alignas(RTE_CACHE_LINE_SIZE) uint16_t *doorbell;
 	phys_addr_t status_addr;
 	phys_addr_t ring_addr;
 
@@ -25,7 +25,7 @@  struct ioat_dmadev {
 	unsigned int failure; /* Used to store chanerr for error handling. */
 
 	/* To report completions, the device will write status back here. */
-	volatile uint64_t status __rte_cache_aligned;
+	volatile alignas(RTE_CACHE_LINE_SIZE) uint64_t status;
 
 	/* Pointer to the register bar. */
 	volatile struct ioat_registers *regs;