The members "dispatch" and "xstat_off" of the structure "rte_node" can be min cache aligned to make room for future expansion and to make sure have better performance.
Due to the modification of the alignment of some members of the "rte_node" structure, update file release_24_11.rst. Signed-off-by: Huichao Cai <chcch...@163.com> --- doc/guides/rel_notes/release_24_11.rst | 3 +++ lib/graph/rte_graph_worker_common.h | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst index 592116b979..6903b1d0f0 100644 --- a/doc/guides/rel_notes/release_24_11.rst +++ b/doc/guides/rel_notes/release_24_11.rst @@ -425,6 +425,9 @@ ABI Changes * graph: added ``graph`` field to the ``dispatch`` structure in the ``rte_node`` structure. +* graph: The members ``dispatch`` and ``xstat_off`` of the structure ``rte_node`` have been + marked as RTE_CACHE_LINE_MIN_SIZE bytes aligned. + Known Issues ------------ diff --git a/lib/graph/rte_graph_worker_common.h b/lib/graph/rte_graph_worker_common.h index 4c2432b47f..9e99278a0a 100644 --- a/lib/graph/rte_graph_worker_common.h +++ b/lib/graph/rte_graph_worker_common.h @@ -104,6 +104,7 @@ struct __rte_cache_aligned rte_node { /** Original process function when pcap is enabled. */ rte_node_process_t original_process; + alignas(RTE_CACHE_LINE_MIN_SIZE) union { /* Fast schedule area for mcore dispatch model */ struct { @@ -113,8 +114,10 @@ struct __rte_cache_aligned rte_node { struct rte_graph *graph; /**< Graph corresponding to lcore_id. */ } dispatch; }; - rte_graph_off_t xstat_off; /**< Offset to xstat counters. */ + /* Fast path area */ + alignas(RTE_CACHE_LINE_MIN_SIZE) + rte_graph_off_t xstat_off; /**< Offset to xstat counters. */ __extension__ struct __rte_cache_aligned { #define RTE_NODE_CTX_SZ 16 union { -- 2.27.0