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/ngbe/ngbe_ptypes.c | 2 +-
 drivers/net/ngbe/ngbe_rxtx.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ngbe/ngbe_ptypes.c b/drivers/net/ngbe/ngbe_ptypes.c
index d823982..d633dbc 100644
--- a/drivers/net/ngbe/ngbe_ptypes.c
+++ b/drivers/net/ngbe/ngbe_ptypes.c
@@ -36,7 +36,7 @@
 #define RTE_PTYPE_INNER_L3_NONE         0
 #define RTE_PTYPE_INNER_L4_NONE         0
 
-static u32 ngbe_ptype_lookup[NGBE_PTID_MAX] __rte_cache_aligned = {
+static alignas(RTE_CACHE_LINE_SIZE) u32 ngbe_ptype_lookup[NGBE_PTID_MAX] = {
        /* L2:0-3 L3:4-7 L4:8-11 TUN:12-15 EL2:16-19 EL3:20-23 EL2:24-27 */
        /* L2: ETH */
        TPTE(0x10, ETHER,          NONE, NONE, NONE, NONE, NONE, NONE),
diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c
index 8a873b8..4aea70b 100644
--- a/drivers/net/ngbe/ngbe_rxtx.c
+++ b/drivers/net/ngbe/ngbe_rxtx.c
@@ -872,7 +872,7 @@
 static inline uint64_t
 ngbe_rxd_pkt_info_to_pkt_flags(uint32_t pkt_info)
 {
-       static uint64_t ip_rss_types_map[16] __rte_cache_aligned = {
+       static alignas(RTE_CACHE_LINE_SIZE) uint64_t ip_rss_types_map[16] = {
                0, RTE_MBUF_F_RX_RSS_HASH, RTE_MBUF_F_RX_RSS_HASH, 
RTE_MBUF_F_RX_RSS_HASH,
                0, RTE_MBUF_F_RX_RSS_HASH, 0, RTE_MBUF_F_RX_RSS_HASH,
                RTE_MBUF_F_RX_RSS_HASH, 0, 0, 0,
-- 
1.8.3.1

Reply via email to