From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0064.outbound.protection.outlook.com [104.47.2.64]) by dpdk.org (Postfix) with ESMTP id CE6681B208 for ; Mon, 12 Feb 2018 10:49:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=uavFku0nG86fE2wbF3ZavBw3WC4JH2b8mRtKd1sjyuw=; b=mN1xZQfNgjt26JPPRBmyqxPL5vSesz2nwDqmgQQNs40hSpkIsWbd7KjY4oDG8WtIIPSbdOWQIHQmaSVfPqaYSFJINrOBQdRpYuFy9b4mClErSAoW3sdRdqvC4nlXeE8MdytmCVFiQEHnO9F6tnNRjN6ELw7hKBsBWxF9pAyUfvg= Received: from AM4PR0501MB2657.eurprd05.prod.outlook.com (10.172.215.19) by AM4PR0501MB2321.eurprd05.prod.outlook.com (10.165.82.150) 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 09:49:55 +0000 Received: from AM4PR0501MB2657.eurprd05.prod.outlook.com ([fe80::80c6:df5:b1b0:ff05]) by AM4PR0501MB2657.eurprd05.prod.outlook.com ([fe80::80c6:df5:b1b0:ff05%17]) with mapi id 15.20.0485.013; Mon, 12 Feb 2018 09:49:55 +0000 From: Matan Azrad To: Jerin Jacob CC: "dev@dpdk.org" , "ferruh.yigit@intel.com" , Thomas Monjalon , "Konstantin Ananyev" , Pavan Nikhilesh Thread-Topic: [dpdk-dev] [PATCH v2] ethdev: make ethdev data cache aligned Thread-Index: AQHTo8YSOfZN9JQRQ0q03fPDgObqg6OgdnKAgAAI7YCAAAGAoA== Date: Mon, 12 Feb 2018 09:49:55 +0000 Message-ID: References: <20180210094220.16201-1-jerin.jacob@caviumnetworks.com> <20180212055439.6462-1-jerin.jacob@caviumnetworks.com> <20180212092544.GA24831@jerin> In-Reply-To: <20180212092544.GA24831@jerin> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR0501MB2321; 7:DAyzPE/45T9k2tn4B+DfmbS0JB/419thQkrMSefChDDZ5jHGib+D0Ih3nHGnd8KdNOcxj2oKKH0oPdJ4l1Aqo00BuWIJk3fjVRakplMyDWRlobZNjTyyquawlfacjJVBeH6QVaRc8ASkgQnsLON5Som8gfBvAuFouYNJn3HF0iofU3GL6xZFxUWCiFLKdlkM88yhRfW6MqZhcsrkE1B0XBTJOaBWTKPE0gbZx4jQynUBVgkEyQg1jVCWOt/Wjro2 x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: d6d8514a-dd63-4471-4341-08d571fdf8d0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:AM4PR0501MB2321; x-ms-traffictypediagnostic: AM4PR0501MB2321: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(60795455431006)(189930954265078)(45079756050767)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231101)(944501161)(6055026)(6041288)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:AM4PR0501MB2321; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0501MB2321; x-forefront-prvs: 0581B5AB35 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(346002)(39380400002)(376002)(396003)(199004)(51444003)(13464003)(189003)(97736004)(53936002)(6436002)(26005)(45080400002)(6506007)(478600001)(3846002)(55016002)(54906003)(6306002)(14454004)(2950100002)(102836004)(229853002)(6116002)(2900100001)(5660300001)(316002)(93886005)(9686003)(6916009)(99286004)(3280700002)(7736002)(6246003)(2906002)(33656002)(5250100002)(74316002)(305945005)(3660700001)(105586002)(25786009)(68736007)(966005)(7696005)(59450400001)(66066001)(86362001)(186003)(106356001)(4326008)(8936002)(575784001)(8676002)(81156014)(81166006)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0501MB2321; H:AM4PR0501MB2657.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: l/Ywj9DUGsZkzdw9v8d/tpAbgyBG0HZIGQ5lTXf8uFGuWx+DdVLXUefJZjk0DrgaMw/P8DA/pb5yuYFHTrh9Mw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6d8514a-dd63-4471-4341-08d571fdf8d0 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Feb 2018 09:49:55.6449 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0501MB2321 Subject: Re: [dpdk-dev] [PATCH v2] ethdev: make ethdev data cache aligned 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 09:49:57 -0000 Hi Jerin From: Jerin Jacob, Sent: Monday, February 12, 2018 11:26 AM > -----Original Message----- > > Date: Mon, 12 Feb 2018 09:04:07 +0000 > > From: Matan Azrad > > To: Jerin Jacob , "dev@dpdk.org" > > > > CC: "ferruh.yigit@intel.com" , Thomas Monjalon > > , Konstantin Ananyev > > , Pavan Nikhilesh > > > > Subject: RE: [dpdk-dev] [PATCH v2] ethdev: make ethdev data cache > > aligned > > > > Hi Jerin > > > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > > Since struct rte_eth_dev_data used in the fast path, making it as > > > cache aligned. > > > > > > Fixes: af75078fece3 ("first public release") > > > Fixes: 5b7ba31148a8 ("ethdev: add port ownership") > > > > Looks like it is just improvement. > > No need the above "fixes" lines (also fix title is not needed as you di= d). >=20 > I think, It varies the way we look at it. I don't think, either way it ma= tters in > the commit log. I think this commit improves " af75078fece3 ("first public release")" sinc= e there was no intention to aligned rte_eth_dev_data in the first commit cr= eated it, The relevant fields in the first port probably was aligned without any inte= ntion(if no , what's about the other ports?). My suggestion is to just explain why the rte_eth_dev_data structure should = be aligned and to align it as improvement, even to backport it to stable br= anch to improve the early LTS versions for all the ports.=20 > See below, >=20 > > > > I think that performance improvement results should be added to the > commit log. >=20 > I added following under comment section. Do you this want to move git > commit message ? If so, I can send the v3. >=20 > - Some platform like thunderx + l3fwd showed 1% regression in the > performance with 5b7ba31148a8 ("ethdev: add port ownership") in one port > setup. I think it should report the improvement of the new commit you want to add = now(not the degradation of the previous commits). Also to details more (number of ports, number of queues per port, the forwa= rd mode, etc). > > > > Moreover, Did you investigate which fields in rte_eth_dev_data structur= es > are important for performance and should not be in a different cache line= s? >=20 > No. That can be separate patch. I think it will be nice(not must :)), even in this commit, to explain the r= oot cause of the performance improvement you saw by the alignment.=20 > > Maybe alternative order of the fields in the structure may improve the > performance more... >=20 > Maybe. >=20 > > > > > Cc: Matan Azrad > > > Cc: Thomas Monjalon > > > Cc: Konstantin Ananyev > > > > > > Signed-off-by: Jerin Jacob > > > Signed-off-by: Pavan Nikhilesh > > > --- > > > v2: > > > - Change the git comments based on Matan's feedback > > > > https://emea01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fd > > > p > dk.org%2Fdev%2Fpatchwork%2Fpatch%2F35104%2F&data=3D02%7C01%7Cmat > > > > an%40mellanox.com%7C5c2537b12e6d4e51f12a08d571dd33a2%7Ca652971c7 > > > > d2e4d9ba6a4d149256f461b%7C0%7C0%7C636540117238324576&sdata=3D8OOg > > > Zb0KzDbBce9xPVywV8ynmiKP9B%2BbYsQxgE5VlX0%3D&reserved=3D0 > > > > > > - Some platform like thunderx + l3fwd showed 1% regression in the > > > performance with 5b7ba31148a8 ("ethdev: add port ownership") in one > > > port setup. > > > > > > - If there are no objection for this change then request to take it > > > for v18.02 release. > > > --- > > > 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 > >