[PATCH v2 17/83] net/igc: move alignment attribute on types
Tyler Retzlaff
roretzla at linux.microsoft.com
Mon Apr 15 22:03:39 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/igc/igc_txrx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c
index 5c60e3e..d0cee1b 100644
--- a/drivers/net/igc/igc_txrx.c
+++ b/drivers/net/igc/igc_txrx.c
@@ -148,8 +148,8 @@
static inline uint32_t
rx_desc_pkt_info_to_pkt_type(uint32_t pkt_info)
{
- static const uint32_t
- ptype_table[IGC_PACKET_TYPE_MAX] __rte_cache_aligned = {
+ static const alignas(RTE_CACHE_LINE_SIZE) uint32_t
+ ptype_table[IGC_PACKET_TYPE_MAX] = {
[IGC_PACKET_TYPE_IPV4] = RTE_PTYPE_L2_ETHER |
RTE_PTYPE_L3_IPV4,
[IGC_PACKET_TYPE_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
--
1.8.3.1
More information about the dev
mailing list