DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] example exception_path: cache align per CPU stats
@ 2018-02-13 16:58 Dustin Lundquist
  2018-02-13 18:04 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Dustin Lundquist @ 2018-02-13 16:58 UTC (permalink / raw)
  To: Remy Horton; +Cc: dev, Dustin Lundquist

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

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

* Re: [dpdk-dev] [PATCH v2] example exception_path: cache align per CPU stats
  2018-02-13 16:58 [dpdk-dev] [PATCH v2] example exception_path: cache align per CPU stats Dustin Lundquist
@ 2018-02-13 18:04 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2018-02-13 18:04 UTC (permalink / raw)
  To: Dustin Lundquist; +Cc: dev, Remy Horton

13/02/2018 17:58, Dustin Lundquist:
> 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>

Acked-by: Remy Horton <remy.horton@intel.com>

Applied, thanks

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

end of thread, other threads:[~2018-02-13 18:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13 16:58 [dpdk-dev] [PATCH v2] example exception_path: cache align per CPU stats Dustin Lundquist
2018-02-13 18:04 ` 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).