Skip to contentSkip to conversation

app/flow-perf: use macro for cache alignment

PATCH In review Thomas Monjalon 2 participants 3 messages Jun 29, 2020 – Jun 30, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/flow-perf: use macro for cache alignment

The macro __rte_cache_aligned is better suited for aligning a structure on a cache line (of any size).

Fixes 15c431864000 ("app/flow-perf: add packet forwarding support")
---
 app/test-flow-perf/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-flow-perf/main.c +1 -1
index e155e49c37..1ae2856556 100644
@@ -84,7 +84,7 @@ struct lcore_info {
 	uint64_t tx_drops;
 	uint64_t rx_pkts;
 	struct rte_mbuf *pkts[MAX_PKT_BURST];
-} __attribute__((__aligned__(64))); /* let it be cacheline aligned */
+} __rte_cache_aligned;
 
 static struct lcore_info lcore_infos[MAX_LCORES];
 
Signature · 1 line
2.26.2
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 8 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, June 30, 2020 12:05 AM
To: [email protected]
Cc: [email protected]; Wisam Monther <[email protected]>; Jack Min <[email protected]>
Subject: [PATCH] app/flow-perf: use macro for cache alignment

Quoted 6 lines

The macro __rte_cache_aligned is better suited for aligning a structure on a cache line (of any size).

Fixes 15c431864000 ("app/flow-perf: add packet forwarding support")