From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0063.outbound.protection.outlook.com [65.55.169.63]) by dpdk.org (Postfix) with ESMTP id A56C25922 for ; Tue, 3 May 2016 14:11:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xJs99MQ+Vk2XqCvJ3uo1cbEugnRXM1a1cLtRMyXqtaY=; b=g/bqYfC0/CAg9FQmU/dhHs9GU7ArpRQacKaX2QtqHRjP76qZU4NgsOZCgTx0zUpwH2s+udMEo7F6JiUTWhxwSbqO+MPyyic5WFtn85/uII5GFqdbdtkdoNNxnJ4988wRjXRmaL87IQhRixBJeo9rB/B2p6AEIwD9R6rWJTPD+P0= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (111.93.218.67) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (TLS) id 15.1.485.9; Tue, 3 May 2016 12:11:17 +0000 Date: Tue, 3 May 2016 17:40:57 +0530 From: Jerin Jacob To: Bruce Richardson CC: , Message-ID: <20160503121056.GA17000@localhost.localdomain> References: <1462176465-21562-1-git-send-email-jerin.jacob@caviumnetworks.com> <20160503094052.GA21300@bricha3-MOBL3> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160503094052.GA21300@bricha3-MOBL3> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MAXPR01CA0035.INDPRD01.PROD.OUTLOOK.COM (10.164.147.42) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-Office365-Filtering-Correlation-Id: 2e20dc68-dddc-4fa0-2a91-08d3734c0876 X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XPqYs+Bk6pmZhlGGRGC+nOOI2fS0H2JCglwOduoIhRu3COfxi2O6XebvnguaaQcJHJ3crI5lwAz1jyUuxnVAlnq1mEZBZTRGZKw9OiNKKne87vcWopWOpf+4d7QPu3CPZtvl1T2wzxqA8wfgsxMHcO6dWcXb0Md7JFLL/GHb8QLlg5DXBaP/vLWa/ruDkeO7tUXKcl7ORDmobrpW5V7L5cItc0fGgY78S2kukK6H/2hAXuzekG42GTH+Hph3tBBj+3MH0SmWnTxa4f+lAslf+hVL/9TjyoZ0SV7KUm0b0RmTlNKFMWKsD9p+v2XHhkH3PTxoN3RuA2u33DfrI7tUTs7y1BNVLIbOslZiKxsEJyfk6YlofMzAcgGArj896GisNy3YNj2B8nSPVIV1uMtBM1mk0SVdfSQzaTJEjN0T9bmtOlX2K7Wj3MNyCXlf9ghhT5w/f8kAd+BUo4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(9101521096)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:B9LlxHr5aSek/044ZRnBdTEoShfJeBcMUsBMvfNmnCjE/O9klCqBfYZxBeCLxJZXSD/ScF/2bNToCCveB9dZbNkN3HAa5wDPrzfY+fT3HJZox01K/XbUyqZzO8yaGrq28qqV5zk2r+JM0xXf3Nwx4Gv9apUdG2IrNOD2g27h+tSu8ewQtelFFXW5Tc6SchnN8Wruu8APXBJCoJhlQlUQWm30EEDvka5ns3zRPTdRW6PvdPBz+D6ukKFrHKGZp2MycaQqc2R/Ui0whgyCDkC1krnXGYRMImPKSt+IxKnXaTCcDiPEl96hJhKbzdJKigqzxNJOiaHRR6t+ojDlQWgJH9N0Ie7ywzwOKDb+BFF8O6TyTVi6SXCWK1akt+tXZj7BDJIhVxNRjpHXAaEM6tBRaQ== X-Forefront-PRVS: 0931CB1479 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(24454002)(5890100001)(2950100001)(19580395003)(189998001)(50466002)(47776003)(19580405001)(46406003)(110136002)(54356999)(77096005)(76176999)(81166005)(42186005)(4001350100001)(92566002)(5009440100003)(83506001)(50986999)(33656002)(1076002)(5008740100001)(23726003)(4326007)(86362001)(61506002)(9686002)(97756001)(66066001)(5004730100002)(586003)(6116002)(3846002)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 23:BoNcMMCJlr+6VnhBdpICzRVfPAYEmQZbD2Qu3Ol?= =?us-ascii?Q?zRvnRV9GRL/2xWCxaiAiIZrQ6fE1Wvt522j4j1qLT1uCgI++IeWz4EXHmDIz?= =?us-ascii?Q?PrJzjd5BD74i77Iue9rsq3KZxRr27lNpGmRLTlW0hPFlNw79afK+1l334BLx?= =?us-ascii?Q?oZc5nqR/3Wy6d7e4EXUnjIxx+bWrx8IIs3EhGvBjknM6AyevzFX8q+ghDnlg?= =?us-ascii?Q?UyXctkwiaTHiIDA81nObP02WIGigsEbDqJjZWvuDhj4kRbGn8CquccAx7FPJ?= =?us-ascii?Q?CopDujbdFOAgLbFF/YjrkIEpXkN+gdb1B877dLmWpAygmH9jNhl7w14M1I8i?= =?us-ascii?Q?ELgfebMPMAKPQkOBr2OHyvNMAQJUJMnsb1o7I+ZuMrBywUHi64jxw4Kgq46g?= =?us-ascii?Q?AhUzvb/h4c8jUcYOczsJL13SSQQIrIyRba3wGUFHtGtiSxboE7W+dQOrmqGv?= =?us-ascii?Q?pjQBC3JRpUl/FSLKyIau7xFXs/qLsxLMdUaZl1QM8g6hIFq2uaCgqbx/UgEY?= =?us-ascii?Q?d34rvhoFuTMMDT+G+j0B4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wsbPX++IbX5Mrsov9dcHtorWx/0EPSbNos2ndWM6IKIg SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2016 12:11:17.2760 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: Re: [dpdk-dev] [PATCH] ethdev: make struct rte_eth_dev cache aligned 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: , X-List-Received-Date: Tue, 03 May 2016 12:11:21 -0000 On Tue, May 03, 2016 at 10:40:53AM +0100, Bruce Richardson wrote: > On Mon, May 02, 2016 at 01:37:45PM +0530, Jerin Jacob wrote: > > Elements of struct rte_eth_dev used in the fast path. > > Make struct rte_eth_dev cache aligned to avoid the cases where > > rte_eth_dev elements share the same cache line with other structures. > > > > Signed-off-by: Jerin Jacob > > --- > > lib/librte_ether/rte_ethdev.c | 2 +- > > lib/librte_ether/rte_ethdev.h | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c > > index a31018e..04f492d 100644 > > --- a/lib/librte_ether/rte_ethdev.c > > +++ b/lib/librte_ether/rte_ethdev.c > > @@ -70,7 +70,7 @@ > > #include "rte_ethdev.h" > > > > static const char *MZ_RTE_ETH_DEV_DATA = "rte_eth_dev_data"; > > -struct rte_eth_dev rte_eth_devices[RTE_MAX_ETHPORTS]; > > +struct rte_eth_dev rte_eth_devices[RTE_MAX_ETHPORTS] __rte_cache_aligned; > > static struct rte_eth_dev_data *rte_eth_dev_data; > > static uint8_t nb_ports; > > > > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h > > index 8519ff6..e359dda 100644 > > --- a/lib/librte_ether/rte_ethdev.h > > +++ b/lib/librte_ether/rte_ethdev.h > > @@ -1630,7 +1630,7 @@ struct rte_eth_dev { > > struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT]; > > uint8_t attached; /**< Flag indicating the port is attached */ > > enum rte_eth_dev_type dev_type; /**< Flag indicating the device type */ > > -}; > > +} __rte_cache_aligned; > > > > struct rte_eth_dev_sriov { > > uint8_t active; /**< SRIOV is active with 16, 32 or 64 pools */ > > -- > Adding cache aligned in two places is overkill, I think. If the structure is > marked as being cache aligned, there is no need to have the rte_eth_devices > marked that way too. I suggest therefore just keeping the structure alignment. OK. Will fix it in v2 > > Regards, > /Bruce