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

Tyler Retzlaff roretzla at linux.microsoft.com
Mon Apr 15 22:04:10 CEST 2024


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 at linux.microsoft.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
 drivers/dma/ioat/ioat_internal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;
-- 
1.8.3.1



More information about the dev mailing list