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] example exception_path: cache align per CPU stats
Date: Mon, 12 Feb 2018 19:43:17 -0800	[thread overview]
Message-ID: <20180213034317.28219-1-dustin@null-ptr.net> (raw)

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

Signed-off-by: Dustin Lundquist <dustin@null-ptr.net>
---
 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  3:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13  3:43 Dustin Lundquist [this message]
2018-02-13  8:40 ` Remy Horton

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=20180213034317.28219-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).