[PATCH v2 04/83] net/axgbe: move alignment attribute on types
Tyler Retzlaff
roretzla at linux.microsoft.com
Mon Apr 15 22:03:26 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/axgbe/axgbe_rxtx.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_rxtx.h b/drivers/net/axgbe/axgbe_rxtx.h
index a218bf0..a326ba9 100644
--- a/drivers/net/axgbe/axgbe_rxtx.h
+++ b/drivers/net/axgbe/axgbe_rxtx.h
@@ -56,7 +56,7 @@
} write;
};
-struct axgbe_rx_queue {
+struct __rte_cache_aligned axgbe_rx_queue {
/* membuf pool for rx buffers */
struct rte_mempool *mb_pool;
/* H/w Rx buffer size configured in DMA */
@@ -101,7 +101,7 @@ struct axgbe_rx_queue {
/* Number of mbufs allocated from pool*/
uint64_t mbuf_alloc;
uint64_t offloads; /**< Rx offloads with RTE_ETH_RX_OFFLOAD_**/
-} __rte_cache_aligned;
+};
/*Tx descriptor format */
struct axgbe_tx_desc {
@@ -110,7 +110,7 @@ struct axgbe_tx_desc {
uint32_t desc3;
};
-struct axgbe_tx_queue {
+struct __rte_cache_aligned axgbe_tx_queue {
/* Port private data reference */
struct axgbe_port *pdata;
/* Number of Tx descriptors in queue*/
@@ -150,7 +150,7 @@ struct axgbe_tx_queue {
uint64_t bytes;
uint64_t errors;
uint64_t offloads; /**< Tx offload flags of RTE_ETH_TX_OFFLOAD_* */
-} __rte_cache_aligned;
+};
/*Queue related APIs */
--
1.8.3.1
More information about the dev
mailing list