Skip to contentSkip to conversation

example exception_path: cache align per CPU stats

PATCH Superseded Dustin Lundquist 2 participants 2 messages Feb 13, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 example exception_path: cache align per CPU stats

Align stats structure to cache line to prevent bouncing per CPU stats structure between cache lines.

---
 examples/exception_path/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/exception_path/main.c +1 -1
index 280a50451..3e5b1e718 100644
@@ -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];
Signature · 1 line
2.11.0
Acked-by on v1 1/1
#1 lore raw

Patch ought to also have:

Fixes af75078fece3 ("first public release")

Otherwise looks good to me. I'm not the maintainer so have only done basic smoke tests.

On 13/02/2018 03:43, Dustin Lundquist wrote:
[..]

Quoted 4 lines
---
 examples/exception_path/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)