[PATCH v2 23/83] net/mvpp2: move alignment attribute on types

Tyler Retzlaff roretzla at linux.microsoft.com
Mon Apr 15 22:03:45 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/net/mvpp2/mrvl_ethdev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.h b/drivers/net/mvpp2/mrvl_ethdev.h
index 3b69a6e..178b510 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.h
+++ b/drivers/net/mvpp2/mrvl_ethdev.h
@@ -147,10 +147,10 @@ struct mrvl_priv {
 	uint16_t bpool_init_size; /**< Configured BPool size  */
 
 	/** Mapping for DPDK rx queue->(TC, MRVL relative inq) */
-	struct {
+	alignas(RTE_CACHE_LINE_SIZE) struct {
 		uint8_t tc;  /**< Traffic Class */
 		uint8_t inq; /**< Relative in-queue number */
-	} rxq_map[MRVL_PP2_RXQ_MAX] __rte_cache_aligned;
+	} rxq_map[MRVL_PP2_RXQ_MAX];
 
 	/* Configuration data, used sporadically. */
 	uint8_t pp_id;
-- 
1.8.3.1



More information about the dev mailing list