summaryrefslogtreecommitdiff
path: root/lib/graph
diff options
context:
space:
mode:
authorHuichao Cai <[email protected]>2024-11-15 09:55:58 +0800
committerThomas Monjalon <[email protected]>2024-11-19 11:29:43 +0100
commitba0a0e44f361cbc4667088a0c0e2d0b63f8dee20 (patch)
treedb11a37d4ed80becb3ca490cda87037ea958fc79 /lib/graph
parent2cd0c96f5b73e81317e97ac719862c9e9149e4ed (diff)
graph: improve node layout
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. Add corresponding comments. Signed-off-by: Huichao Cai <[email protected]> Acked-by: Jerin Jacob <[email protected]>
Diffstat (limited to 'lib/graph')
-rw-r--r--lib/graph/rte_graph_worker_common.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/graph/rte_graph_worker_common.h b/lib/graph/rte_graph_worker_common.h
index a518af2b2a..d3ec88519d 100644
--- a/lib/graph/rte_graph_worker_common.h
+++ b/lib/graph/rte_graph_worker_common.h
@@ -104,16 +104,20 @@ struct __rte_cache_aligned rte_node {
/** Original process function when pcap is enabled. */
rte_node_process_t original_process;
+ /** Fast schedule area for mcore dispatch model. */
union {
- /* Fast schedule area for mcore dispatch model */
- struct {
+ alignas(RTE_CACHE_LINE_MIN_SIZE) struct {
unsigned int lcore_id; /**< Node running lcore. */
uint64_t total_sched_objs; /**< Number of objects scheduled. */
uint64_t total_sched_fail; /**< Number of scheduled failure. */
} dispatch;
};
+
+ /** Fast path area cache line 1. */
+ alignas(RTE_CACHE_LINE_MIN_SIZE)
rte_graph_off_t xstat_off; /**< Offset to xstat counters. */
- /* Fast path area */
+
+ /** Fast path area cache line 2. */
__extension__ struct __rte_cache_aligned {
#define RTE_NODE_CTX_SZ 16
union {