From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id C6DFE1B2C1; Tue, 13 Feb 2018 16:17:09 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1E1B020CB0; Tue, 13 Feb 2018 10:17:09 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 13 Feb 2018 10:17:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=+mSYNdckFVoywx2OZo4tRU/DBj DkMg1pgBrH8+JOqvg=; b=occN0Yf/xaQpWsOVfO4zKS+Z9Kvak95vS9mRnuad/W QkX70pPsrOTm4kFpj7OOMVztdfM2GyVnxu6cmAUxw5aiiSCaWKoBJQEj+s97PXBW lyzrH2lMmEulPHUIdZBEXSEe8POagqEjuTIN2xuxKGSEkKzw1OVviD6YpUsR8bgs o= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=+mSYNd ckFVoywx2OZo4tRU/DBjDkMg1pgBrH8+JOqvg=; b=I1roFEvW/JkcHtASiSWykh O7a+gCN4WGV8+cdhcN5Uty8rdvMRK3Wbg6jPLBLF8nm3DliJAq7V1YA/f8BU7WAn OCZflFgmAVuGhuXT5PkGIqpzZbeTcaQR4GfmzMQBz+ZEl6GQaxjtWx3O9Dxi3BYG MW3VQTUAjkRN2qibCOBt4Zj6I3wap9kN1gcUR7MSV9UlSnsYl5R5Az7xNJ6GVFlk kTSBENUXx3EMXssR4Vn0pCS9BRWTJOyQxRzXZKI0QhSe1jSUM2WVKKdybZL08emn CvJXUlv2dT1gwlkoJRafjMfzbUvmIIzLjFhhQhL/rbm2O3CG9AFi5IG2hY+A4QxA == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id C88D824547; Tue, 13 Feb 2018 10:17:08 -0500 (EST) From: Thomas Monjalon To: Jerin Jacob , Pavan Nikhilesh Cc: dev@dpdk.org, ferruh.yigit@intel.com, stable@dpdk.org, Matan Azrad , Konstantin Ananyev Date: Tue, 13 Feb 2018 16:16:59 +0100 Message-ID: <2314871.4g4HrYFpav@xps> In-Reply-To: <20180212131343.13555-1-jerin.jacob@caviumnetworks.com> References: <20180212055439.6462-1-jerin.jacob@caviumnetworks.com> <20180212131343.13555-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] ethdev: fix ethdev data alignment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Feb 2018 15:17:10 -0000 12/02/2018 14:13, Jerin Jacob: > The struct rte_eth_dev_data is used in ethdev fastpath routines > and it not aligned to cache line size. This patch fixes the ethdev > data alignment. > > The alignment was broken from the "first public release" changeset > where ethdev data address was aligned only to the first port. > Remaining ports alignment was defined by the size of the struct > (rte_eth_dev_data). This scheme is not guaranteed to be cache line > aligned all the time. > > "ethdev: add port ownership" change set introduced a > rte_eth_dev_shared_data container for port ownership change, > This resulted in rte_eth_dev->data memory for the first port also > as cache unaligned. > > Added a compiler alignment attribute to make sure > rte_eth_dev->data always cache aligned so that CPU/compiler > 1) Avoid sharing the element with another cache line > 2) Can load/store the elements in struct rte_eth_dev_data as > naturally aligned. > > Some platform like thunderX could see performance regression of 1% > at "ethdev: add port ownership" change set with > 1 port/1 queue l3fwd application and this patch fixes that regression. > > example command: > sudo ./examples/l3fwd/build/l3fwd -c 0xff00 -- -p 0x1 --config="(0,0,9)" > > Fixes: af75078fece3 ("first public release") > Fixes: 5b7ba31148a8 ("ethdev: add port ownership") > > Cc: stable@dpdk.org > > Cc: Matan Azrad > Cc: Thomas Monjalon > Cc: Konstantin Ananyev > > Signed-off-by: Jerin Jacob > Signed-off-by: Pavan Nikhilesh > --- Acked-by: Thomas Monjalon Applied, thanks