From patchwork Sun Jun 12 12:42:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jasvinder Singh X-Patchwork-Id: 13470 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 70B5537AF; Sun, 12 Jun 2016 14:35:33 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 6F02D2BBC for ; Sun, 12 Jun 2016 14:35:31 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 12 Jun 2016 05:35:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,462,1459839600"; d="scan'208";a="717820606" Received: from sie-lab-212-251.ir.intel.com (HELO silpixa00381635.ir.intel.com) ([10.237.212.251]) by FMSMGA003.fm.intel.com with ESMTP; 12 Jun 2016 05:35:29 -0700 From: Jasvinder Singh To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com Date: Sun, 12 Jun 2016 13:42:47 +0100 Message-Id: <1465735367-187704-1-git-send-email-jasvinder.singh@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1465658356-59012-1-git-send-email-jasvinder.singh@intel.com> References: <1465658356-59012-1-git-send-email-jasvinder.singh@intel.com> Subject: [dpdk-dev] [PATCH v2] ip_pipeline: fix false cacheline sharing among threads X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In ip_pipeline app, the structure app_thread_data needs to be aligned to the cache line boundary as threads on different cpu cores are accessing fields of the app->thread_data and having this structure not aligned on cacheline boundary leads to false cacheline sharing. Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax") Signed-off-by: Jasvinder Singh Acked-by: Cristian Dumitrescu --- v2 - fix checkpatch error examples/ip_pipeline/app.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ip_pipeline/app.h b/examples/ip_pipeline/app.h index 848244a..7611341 100644 --- a/examples/ip_pipeline/app.h +++ b/examples/ip_pipeline/app.h @@ -300,7 +300,7 @@ struct app_thread_data { uint64_t headroom_time; uint64_t headroom_cycles; double headroom_ratio; -}; +} __rte_cache_aligned; #ifndef APP_MAX_LINKS #define APP_MAX_LINKS 16