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

Message ID 1713211485-9021-83-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Accepted
Delegated to: David Marchand
Series move alignment attribute on types |


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff April 15, 2024, 8:04 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>
Acked-by: Morten Brørup <mb@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;