From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dustin Lundquist Subject: [PATCH v2] example exception_path: cache align per CPU stats Date: Tue, 13 Feb 2018 08:58:56 -0800 Message-ID: <20180213165856.1729-1-dustin@null-ptr.net> Cc: dev@dpdk.org, Dustin Lundquist To: Remy Horton Return-path: Received: from mail-pl0-f65.google.com (mail-pl0-f65.google.com [209.85.160.65]) by dpdk.org (Postfix) with ESMTP id A76551B2F2 for ; Tue, 13 Feb 2018 17:59:19 +0100 (CET) Received: by mail-pl0-f65.google.com with SMTP id p5so6903887plo.12 for ; Tue, 13 Feb 2018 08:59:19 -0800 (PST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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