DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dustin Lundquist <dustin@null-ptr.net>
To: Remy Horton <remy.horton@intel.com>
Cc: dev@dpdk.org, Dustin Lundquist <dustin@null-ptr.net>
Subject: [dpdk-dev] [PATCH v2] example exception_path: cache align per CPU stats
Date: Tue, 13 Feb 2018 08:58:56 -0800	[thread overview]
Message-ID: <20180213165856.1729-1-dustin@null-ptr.net> (raw)

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

Fixes: af75078fece3 ("first public release")

Signed-off-by: Dustin Lundquist <dustin@null-ptr.net>
---
v2:
* Include fixes tag

Verified alignment of lcore_stats array elements using gdb.

 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

             reply	other threads:[~2018-02-13 16:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 16:58 Dustin Lundquist [this message]
2018-02-13 18:04 ` 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=20180213165856.1729-1-dustin@null-ptr.net \
    --to=dustin@null-ptr.net \
    --cc=dev@dpdk.org \
    --cc=remy.horton@intel.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).