From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, Wisam Jaddo <wisamm@mellanox.com>,
Xiaoyu Min <jackmin@mellanox.com>
Subject: [dpdk-dev] [PATCH] app/flow-perf: use macro for cache alignment
Date: Mon, 29 Jun 2020 23:04:42 +0200 [thread overview]
Message-ID: <20200629210443.371664-1-thomas@monjalon.net> (raw)
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
next reply other threads:[~2020-06-29 21:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 21:04 Thomas Monjalon [this message]
2020-06-30 7:34 ` Wisam Monther
2020-06-30 9:58 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200629210443.371664-1-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jackmin@mellanox.com \
--cc=wisamm@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).