[PATCH v2 82/83] app/graph: move alignment attribute on types

Tyler Retzlaff roretzla at linux.microsoft.com
Mon Apr 15 22:04:44 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>
---
 app/graph/ethdev_rx.h      | 4 ++--
 app/graph/ethdev_rx_priv.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/graph/ethdev_rx.h b/app/graph/ethdev_rx.h
index ec3c972..f8c8f1f 100644
--- a/app/graph/ethdev_rx.h
+++ b/app/graph/ethdev_rx.h
@@ -17,13 +17,13 @@ struct lcore_rx_queue {
 	char node_name[RTE_NODE_NAMESIZE];
 };
 
-struct lcore_conf {
+struct __rte_cache_aligned lcore_conf {
 	uint16_t n_rx_queue;
 	struct lcore_rx_queue rx_queue_list[ETHDEV_RX_QUEUE_PER_LCORE_MAX];
 	struct rte_graph *graph;
 	char name[RTE_GRAPH_NAMESIZE];
 	rte_graph_t graph_id;
-} __rte_cache_aligned;
+};
 
 uint8_t ethdev_rx_num_rx_queues_get(uint16_t port);
 
diff --git a/app/graph/ethdev_rx_priv.h b/app/graph/ethdev_rx_priv.h
index d714f83..a76ebac 100644
--- a/app/graph/ethdev_rx_priv.h
+++ b/app/graph/ethdev_rx_priv.h
@@ -14,10 +14,10 @@
 #define MAX_JUMBO_PKT_LEN  9600
 #define NB_SOCKETS 8
 
-struct lcore_params {
+struct __rte_cache_aligned lcore_params {
 	uint16_t port_id;
 	uint8_t queue_id;
 	uint8_t lcore_id;
-} __rte_cache_aligned;
+};
 
 #endif
-- 
1.8.3.1



More information about the dev mailing list