[04/83] net/axgbe: move alignment attribute on types

Message ID 1710949096-5786-5-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded
Delegated to: David Marchand
Headers
Series move alignment attribute on types |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff March 20, 2024, 3:36 p.m. UTC
  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@linux.microsoft.com>
---
 drivers/net/axgbe/axgbe_rxtx.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Patch

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 */