[PATCH 47/83] dma/skeleton: move alignment attribute on types
Tyler Retzlaff
roretzla at linux.microsoft.com
Wed Mar 20 16:37:40 CET 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>
---
drivers/dma/skeleton/skeleton_dmadev.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/skeleton/skeleton_dmadev.h b/drivers/dma/skeleton/skeleton_dmadev.h
index c9bf315..cfd37d1 100644
--- a/drivers/dma/skeleton/skeleton_dmadev.h
+++ b/drivers/dma/skeleton/skeleton_dmadev.h
@@ -73,13 +73,13 @@ struct skeldma_hw {
struct rte_ring *desc_completed;
/* Cache delimiter for dataplane API's operation data */
- char cache1 __rte_cache_aligned;
+ alignas(RTE_CACHE_LINE_SIZE) char cache1;
uint16_t ridx; /* ring idx */
uint16_t last_ridx;
uint64_t submitted_count;
/* Cache delimiter for cpuwork thread's operation data */
- char cache2 __rte_cache_aligned;
+ alignas(RTE_CACHE_LINE_SIZE) char cache2;
volatile uint32_t zero_req_count;
uint64_t completed_count;
};
--
1.8.3.1
More information about the dev
mailing list