DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/flow-perf: use macro for cache alignment
@ 2020-06-29 21:04 Thomas Monjalon
  2020-06-30  7:34 ` Wisam Monther
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2020-06-29 21:04 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, Wisam Jaddo, Xiaoyu Min

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")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test-flow-perf/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index e155e49c37..1ae2856556 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -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];
 
-- 
2.26.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] app/flow-perf: use macro for cache alignment
  2020-06-29 21:04 [dpdk-dev] [PATCH] app/flow-perf: use macro for cache alignment Thomas Monjalon
@ 2020-06-30  7:34 ` Wisam Monther
  2020-06-30  9:58   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Wisam Monther @ 2020-06-30  7:34 UTC (permalink / raw)
  To: Thomas Monjalon, dev; +Cc: david.marchand, Jack Min

Hi,

>-----Original Message-----
>From: Thomas Monjalon <thomas@monjalon.net>
>Sent: Tuesday, June 30, 2020 12:05 AM
>To: dev@dpdk.org
>Cc: david.marchand@redhat.com; Wisam Monther
><wisamm@mellanox.com>; Jack Min <jackmin@mellanox.com>
>Subject: [PATCH] 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")
>
>Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Acked-by: Wisam Jaddo <wisamm@mellanox.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] app/flow-perf: use macro for cache alignment
  2020-06-30  7:34 ` Wisam Monther
@ 2020-06-30  9:58   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2020-06-30  9:58 UTC (permalink / raw)
  To: Wisam Monther; +Cc: dev, david.marchand, Jack Min

> >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")
> >
> >Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Acked-by: Wisam Jaddo <wisamm@mellanox.com>

Applied



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-30  9:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 21:04 [dpdk-dev] [PATCH] app/flow-perf: use macro for cache alignment Thomas Monjalon
2020-06-30  7:34 ` Wisam Monther
2020-06-30  9:58   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).