From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0056.outbound.protection.outlook.com [104.47.38.56]) by dpdk.org (Postfix) with ESMTP id F40091B30B for ; Mon, 12 Feb 2018 06:34:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=p6DvMnFF3h8i4RTHAsFWptJgZulLJ3VLwhQx0Qs0t5E=; b=FgizfIE/gzKPAyxpyrHbD1+Z3AUriQwpf0LCMU81cSVnXWPy9r1+WjMj1sboQX8GogG/M7myp0GfPEFLa6ruHcTFQcwNRJB/LCOf0/Di1XdJtC7VamqY4KceB7lBiF1j77PDIt7M/uit6NAfTLI0/QCQV+khu8y0bvTDNcsrNlU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (122.178.220.11) by CY4SPR00MB12.namprd07.prod.outlook.com (10.174.54.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Mon, 12 Feb 2018 05:34:09 +0000 Date: Mon, 12 Feb 2018 11:03:49 +0530 From: Jerin Jacob To: Matan Azrad Cc: "dev@dpdk.org" , Thomas Monjalon , Konstantin Ananyev , Pavan Nikhilesh Message-ID: <20180212053348.GA3788@jerin> References: <20180210094220.16201-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [122.178.220.11] X-ClientProxiedBy: MA1PR0101CA0013.INDPRD01.PROD.OUTLOOK.COM (52.134.136.151) To CY4SPR00MB12.namprd07.prod.outlook.com (10.174.54.151) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 322279df-6398-428a-dd05-08d571da3ec5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CY4SPR00MB12; X-Microsoft-Exchange-Diagnostics: 1; CY4SPR00MB12; 3:38cxoYKJocDEVWXw9t/WG+4UsabdYHxIVEqPmO7LRBzNM++DylhtnLnAM3SQG0eCyw+zsO23tozkq0w+dXneElX/181h+B3gHl18N/iG2+RLKo78iSZN7mFXGgOU+h98BtdzVBvT4AEiKt3YYWNUZOAPUC2r1hjwSHWblqYBwH3m4SRtRcH1m8ufCLZ+0HIXMBH6oQZteiKUk7d/X7gGSYnm02JhZFs7TkMLZjiMOa/f7cJUmGsmCipXCDEmS/Aj; 25:T150iFOHmvmxnTiU+EpwA+s8r8VXTpqd7C5AgaCAVzfEBTD3o+pSxZOVbCoVRS1Teb3D/JFpRPmJfTG1VIeur7un6MnUPeTUrNtlXnsNDpJrXolILY8AWsffVqs0YfumGLUxuAy+SQBnj3qXxv66CZzx8hphNc7yOKYNqGJxGFrpr6g/ql0JCVQCxze5UysetQtgU3ixYgQRzIzSWYcc8xVELJfaSeTD0YAYO1FQxOHF+rFhve3Vwhefviz06z459bF+bYddwKOqcgWjhWwmaO5iu9uPy2kGvB7sJKLYXsZ+p2ahZ+EE22sTNOO+9xNJzaf780HusfNpHPS4tsp6fg==; 31:lGLifEPIz9KxNmHSKukGafDXngre3iSkqp9mYcJFBrBi4ioYkUOKkEfMKci025ZXFqx9vmgVER/rR9UuGE25Wcy8L+TAYYnJsp5WEoevlL1vHBcTBt5G3B34pbNrEdGOhy2a75/tDXeCx6x1qEBbm6iJE6Cqw5nHKAiNbfvSIWbj/2R7pkPygc39k1twyeKmB2+uijeWjVgVXC3h7QeaQ+Bi+jbUy08u66CfLpZ84tU= X-MS-TrafficTypeDiagnostic: CY4SPR00MB12: X-Microsoft-Exchange-Diagnostics: 1; CY4SPR00MB12; 20:6RK2NhrT0g++nUDiR7IGO0JLp72hVmvsKmpAl9PC8rzH+uvKbO7xYKghi5VV5WHKJ04L3r9HMK9AF8j8repfD8FIp8R3QFe/tjBk9zXiT9EeIQEA2ymeVo+xLF73N9bO3GjMKmqxaOOhGBtRC4TSI3bUKEGmnc1cd/OvuRmMyWdKFyIjFNfoHEedj9n2Fv1MjUkBw9qrpB4/HdLsXssq9HASsMsRRW97F2VEHhV1h7o/YYB0zT4E6r856B5Yci2jVOTAnSvC9NvvNhBRPBE0zZR1yKzSOaJnBxng6Mc6wCeC+/k628BVaIj3wunEV9At/7N3Qkv3InkYhtTV5/dzQri7WNvTkYZqjtFUZuw9y/2e1BMalhvD0hSAuKQwdH9cY+p//WpgyWDuMTw379XNLxDQ79efjpDKV3jDDzMSZ2nbpQN6rraRnLRgveJNJdHVstozfrDVy9x7qpSMVGIZrPoG1u1LwTuYAr+Yp7I2AXdFq8B4LsiiClhj+8a46IXJAMGvcOsqG7qlwlowRFw6VOO5Dbi+rjDA/QMRMe9vhJO1dMMoeLqdRHwcGHxSIQZPYwwB0mA1PuQze1mnNdTeiemUGUuqiMqacpROu9OyhUo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(60795455431006)(131327999870524)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3231101)(2400082)(944501161)(10201501046)(93006095)(3002001)(6041288)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:CY4SPR00MB12; BCL:0; PCL:0; RULEID:; SRVR:CY4SPR00MB12; X-Microsoft-Exchange-Diagnostics: 1; CY4SPR00MB12; 4:wU77O4Tv7MJkxW/IS7VCP9Wf/jlq51+jkyhhwsVX44h+FHtmvmXiA7+ntXZmB3dqHzpnEy2oNn3+h8HQz1gaemxIaq7K2LibfpX9yx0cEbSngmtVgpDMopi3+aaEal9vYAgLaKn1lKZH9WU98QvUPtcZw9c1VKSYyDZcxg0MGPnpTEXVBC/ROSzoFI+M7ZOFY2olNIBVHhoBLFjGZSUh15gIbwhOWxR5ntDNvgr5n+CtPNiMxFIu6ZgualskwACODOZpcUS+8LvbrkleCdEqzUJtDehAirlTOBeHQ8/llbF/l/vu+gGtlYA2i4XAx9fHgq8aRwPGv2CG+klvXVETaBFaOdXbLbQlLtmWQV6NFYU24/ferYR8nn+YteCDerZl X-Forefront-PRVS: 0581B5AB35 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(39850400004)(396003)(39380400002)(346002)(51444003)(13464003)(199004)(189003)(2906002)(26005)(8936002)(5660300001)(47776003)(72206003)(386003)(97736004)(59450400001)(16526019)(186003)(478600001)(229853002)(81166006)(8676002)(81156014)(33896004)(6246003)(9686003)(33716001)(76176011)(52116002)(68736007)(4326008)(1076002)(58126008)(33656002)(16586007)(106356001)(54906003)(23726003)(2950100002)(42882006)(7736002)(316002)(305945005)(6916009)(53936002)(6666003)(50466002)(6496006)(105586002)(66066001)(55016002)(25786009)(83506002)(6116002)(3846002)(107886003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4SPR00MB12; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4SPR00MB12; 23:duY32rm7f3TOPwJczILsONW+wbHMqU8BMebXbP0MiE?= =?us-ascii?Q?IiKLLMYRG3Po47sopHDLUCn4IPQJY62PahFAsYL7y6g1peJyZTZnnv3PHzqt?= =?us-ascii?Q?c4KCHR3cmRfmHlftOZ5cUQSD0CABQrAA4sFDgZSw2g6LW4rnm010CMQ5WzQY?= =?us-ascii?Q?mNN1gFWyokkrRxRYETbbjVwX139POD8uNAGmql/WVRQp/eqoTRPm0O0qpIpy?= =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XQB4aSZE7VrFhvhzd6lArWBa/TupfIl2A7Int7so3Ow47po/FtlYEUAn1XlVYXqpPtYtOAogVb3DWQCKoRQDg4tDY3brg17bwK4K9R54LMdU/k/9cezR/Mfr8QylSPBLKRTAa1qkyK+AbahbCgN0Qe410dgN2YeJvZjLiGs6zWFrERrJNVP4UbggiylMBLyMC8gjy+1438c4JQEfdTc1NfbCV/KaE8IYc18ITsxAhCmdrAi30H5M SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2018 05:34:09.1819 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 322279df-6398-428a-dd05-08d571da3ec5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4SPR00MB12 Subject: Re: [dpdk-dev] [PATCH] ethdev: fix a regression due to cache alignment issue 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: Mon, 12 Feb 2018 05:34:13 -0000 -----Original Message----- > Date: Sat, 10 Feb 2018 18:23:42 +0000 > From: Matan Azrad > To: Jerin Jacob , "dev@dpdk.org" > > CC: Thomas Monjalon , Konstantin Ananyev > , Pavan Nikhilesh > > Subject: RE: [dpdk-dev] [PATCH] ethdev: fix a regression due to cache > alignment issue > > Hi Jerin Hi Matan, > > From: Jerin Jacob,Sent: Saturday, February 10, 2018 11:42 AM > > Prior to "ethdev: add port ownership" change, the fast path structure struct > > rte_eth_dev->data was cache aligned due to the fact that eth_dev_data was > > allocated from rte_malloc with cache aligned attribute. > > "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 as cache unaligned. > > Added a compiler alignment attribute to make sure rte_eth_dev->data > > always cache aligned and hence compiler can load/store the elements in > > struct rte_eth_dev_data as naturally aligned. > > > > Some platform like thunderx + l3fwd showed 1% regression in the > > performance with the offending changeset. > > > > Fixes: 5b7ba31148a8 ("ethdev: add port ownership") > > > > Are you sure the previous port data allocation(before port ownership) was cache aligned for all the ports for every system (cache line size 16\32\64\128...) or maybe it was only aligned to the first port (port_id=0)? Yes, It was aligned to only for the first port. > > I think that if the answer is no, this fix fixes early patch, or just improvement. I will send v2 as fixes early patch/improvement. > > > Cc: Matan Azrad > > Cc: Thomas Monjalon > > Cc: Konstantin Ananyev > > > > Signed-off-by: Jerin Jacob > > Signed-off-by: Pavan Nikhilesh > > --- > > lib/librte_ether/rte_ethdev_core.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/librte_ether/rte_ethdev_core.h > > b/lib/librte_ether/rte_ethdev_core.h > > index 315b31723..e5681e466 100644 > > --- a/lib/librte_ether/rte_ethdev_core.h > > +++ b/lib/librte_ether/rte_ethdev_core.h > > @@ -601,7 +601,7 @@ struct rte_eth_dev_data { > > struct rte_vlan_filter_conf vlan_filter_conf; > > /**< VLAN filter configuration. */ > > struct rte_eth_dev_owner owner; /**< The port owner. */ -}; > > +} __rte_cache_aligned; > > > > /** > > * @internal > > -- > > 2.16.1 >