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 <roret...@linux.microsoft.com> --- drivers/net/i40e/i40e_ethdev.h | 4 ++-- drivers/net/i40e/i40e_rxtx.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h index b9628ca..31fc926 100644 --- a/drivers/net/i40e/i40e_ethdev.h +++ b/drivers/net/i40e/i40e_ethdev.h @@ -1261,9 +1261,9 @@ struct i40e_adapter { struct rte_timecounter tx_tstamp_tc; /* ptype mapping table */ - uint32_t ptype_tbl[I40E_MAX_PKT_TYPE] __rte_cache_min_aligned; + alignas(RTE_CACHE_LINE_MIN_SIZE) uint32_t ptype_tbl[I40E_MAX_PKT_TYPE]; /* flow type to pctype mapping table */ - uint64_t pctypes_tbl[I40E_FLOW_TYPE_MAX] __rte_cache_min_aligned; + alignas(RTE_CACHE_LINE_MIN_SIZE) uint64_t pctypes_tbl[I40E_FLOW_TYPE_MAX]; uint64_t flow_types_mask; uint64_t pctypes_mask; diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h index 70320cf..2f2f890 100644 --- a/drivers/net/i40e/i40e_rxtx.h +++ b/drivers/net/i40e/i40e_rxtx.h @@ -279,7 +279,7 @@ uint16_t i40e_xmit_pkts_vec_avx512(void *tx_queue, static inline uint32_t i40e_get_default_pkt_type(uint8_t ptype) { - static const uint32_t type_table[UINT8_MAX + 1] __rte_cache_aligned = { + static const alignas(RTE_CACHE_LINE_SIZE) uint32_t type_table[UINT8_MAX + 1] = { /* L2 types */ /* [0] reserved */ [1] = RTE_PTYPE_L2_ETHER, -- 1.8.3.1