[PATCH v2 73/83] bus/fslmc: move alignment attribute on types

Tyler Retzlaff roretzla at linux.microsoft.com
Mon Apr 15 22:04:35 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/bus/fslmc/portal/dpaa2_hw_pvt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index bd949ad..169c791 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -151,7 +151,7 @@ typedef void (dpaa2_queue_cb_dqrr_t)(struct qbman_swp *swp,
 typedef void (dpaa2_queue_cb_eqresp_free_t)(uint16_t eqresp_ci,
 					struct dpaa2_queue *dpaa2_q);
 
-struct dpaa2_queue {
+struct __rte_cache_aligned dpaa2_queue {
 	struct rte_mempool *mb_pool; /**< mbuf pool to populate RX ring. */
 	union {
 		struct rte_eth_dev_data *eth_data;
@@ -179,7 +179,7 @@ struct dpaa2_queue {
 	uint16_t resv;
 	uint64_t offloads;
 	uint64_t lpbk_cntx;
-} __rte_cache_aligned;
+};
 
 struct swp_active_dqs {
 	struct qbman_result *global_active_dqs;
-- 
1.8.3.1



More information about the dev mailing list