From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id AFC141B2FF for ; Thu, 15 Feb 2018 13:03:25 +0100 (CET) Received: by mail-wr0-f195.google.com with SMTP id o76so3089769wrb.7 for ; Thu, 15 Feb 2018 04:03:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4fOk+zKNh5K7WeTMUKlNe3p3Dmzlnbpu/ZY57TCa/r0=; b=pW02elXp0dNbOmkWBaUxUudkZBgbj6/rAM2DiChzCEMW7/490NO6F/NDfcGpWCBQFi B1lz/LmDLki5aSjxo/hhGChNe8ky7tjm4rjwkCjzOAu2sFbJP40VIdhlLsSV+Bl9wgpl s+W1cv3eaoMkRJSmEENqhLleXiXpzXdGWcoGY3Ke7Kd9V/GWhUVfnm/5R0KG0utd+CQi /nVETR5kiBKpgxfe9k15hwnvIWxQQ0W4ZXEuTWKdJ9NMMiRJbq2YSkGo0p0MOuynI5Zf R7Z7J211G7EsnOu6Gh1hqpKiIlDuPlrWk/8u7WtCuFb64RminbExjxxNEWhScVC1/LLs ApEQ== X-Gm-Message-State: APf1xPAZkXK2e/UWk4ZCUHVguS7iT4ugVVxtEuyOxP6LHA/uwV6gTnzf OV+4dY7rnjTkh26nL+GR8HdQtVyt X-Google-Smtp-Source: AH8x224W67Wrn2mEArxXkFlegi3UUa4TCDyWYpGzj4X+l3Q7jzg7zZ8scsHvpZFdc/gkcJofbgdsdQ== X-Received: by 10.223.128.203 with SMTP id 69mr2194807wrl.104.1518696205310; Thu, 15 Feb 2018 04:03:25 -0800 (PST) Received: from localhost ([213.251.34.146]) by smtp.gmail.com with ESMTPSA id r70sm16836830wmg.30.2018.02.15.04.03.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2018 04:03:24 -0800 (PST) From: Luca Boccassi To: Jerin Jacob Cc: Pavan Nikhilesh , Thomas Monjalon , dpdk stable Date: Thu, 15 Feb 2018 12:03:03 +0000 Message-Id: <20180215120309.28937-1-bluca@debian.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180211124911.14557-2-bluca@debian.org> References: <20180211124911.14557-2-bluca@debian.org> Subject: [dpdk-stable] patch 'ethdev: fix data alignment' has been queued to LTS release 16.11.5 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Feb 2018 12:03:25 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/17/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 648370d23204f13c3ec35baf68ed4f9e539a5bfd Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Mon, 12 Feb 2018 18:43:43 +0530 Subject: [PATCH] ethdev: fix data alignment [ upstream commit 740cecb24f52a945c0d40d6073ff0b2acc5c0616 ] 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") Signed-off-by: Jerin Jacob Signed-off-by: Pavan Nikhilesh Acked-by: Thomas Monjalon --- lib/librte_ether/rte_ethdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 13a7c8a86..dc6d0cc91 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1694,7 +1694,7 @@ struct rte_eth_dev_data { enum rte_kernel_driver kdrv; /**< Kernel driver passthrough */ int numa_node; /**< NUMA node connection */ const char *drv_name; /**< Driver name */ -}; +} __rte_cache_aligned; /** Device supports hotplug detach */ #define RTE_ETH_DEV_DETACHABLE 0x0001 -- 2.14.2