[dpdk-dev] [PATCH] example exception_path: cache align per CPU stats
Dustin Lundquist
dustin at null-ptr.net
Tue Feb 13 04:43:17 CET 2018
Align stats structure to cache line to prevent bouncing per CPU stats
structure between cache lines.
Signed-off-by: Dustin Lundquist <dustin at null-ptr.net>
---
examples/exception_path/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index 280a50451..3e5b1e718 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -108,7 +108,7 @@ struct stats {
uint64_t rx;
uint64_t tx;
uint64_t dropped;
-};
+} __rte_cache_aligned;
/* Array of lcore-specific stats */
static struct stats lcore_stats[RTE_MAX_LCORE];
--
2.11.0
More information about the dev
mailing list