From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0066.outbound.protection.outlook.com [104.47.37.66]) by dpdk.org (Postfix) with ESMTP id 915F31B301; Mon, 12 Feb 2018 14:51:05 +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=1jmlz/Hi+SO6aUM5K7eRnA4hnBvRDge461gXN2mmkwc=; b=VQlHtWSc6SRYd6rZrupfKaKZ3Zo7qsiLe0NWWcXTD9I6lpubtKFoIF84pZ0YwyTO1gP2N60+6Hg4CUC31TlCkCZqb1osi9HgGJpbKiZyTy3Cwvcr/o1Ae5gOv8jnzgSRow4CgmgF6Zh8ZJiT96coqBdy8PaXliSMJ8QUdgXvmZY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (115.113.156.3) by CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) 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 13:50:59 +0000 Date: Mon, 12 Feb 2018 19:20:47 +0530 From: Jerin Jacob To: Matan Azrad Cc: "dev@dpdk.org" , "ferruh.yigit@intel.com" , "stable@dpdk.org" , Thomas Monjalon , Konstantin Ananyev , Pavan Nikhilesh Message-ID: <20180212135046.GA16934@jerin> References: <20180212055439.6462-1-jerin.jacob@caviumnetworks.com> <20180212131343.13555-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: [115.113.156.3] X-ClientProxiedBy: BM1PR0101CA0052.INDPRD01.PROD.OUTLOOK.COM (10.174.220.142) To CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7da6730c-fc3f-4f05-2d1c-08d5721fa7a9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CO2PR07MB2520; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 3:d/rp5dHirYFiOnA3Dz15PW9h1HuOG47GKk0mMYALrlQMP3TP97WzyI5WvKagIgEV7gLvhN1Vtn/cPAh7qLfkJaXeSlAY3Bd3JUK4oMrCkvFnkXKqYWmqh3qIgiD9C5dzoPJEQw2XdeoLYEhPnN/ImjLtQQIuTbF2S0+hP2IhGoxMo62zHYaoUwxFEdQpoLhbOjOG6nq8jv2lOPl69LIRiter9ys95focteB6/yyPVdJsz0m77exfHNeu+y68FM2t; 25:h8grV+4j7idllxp1Mfd0tK5RGkV9UrHzKPHSl5hBMJThJuilrrLckXgXzjYCUTHBO6BfrCIzfjeU0mhTaFXEtPSgrmlaftjJ0qfs9v1iY3l0O/jiDWiBmI6TtX3pleCviPCSfIfHIOCUDtZnyRwrQcrhz4nRjzfrlNWSCWCa1eUY0nMIQFyLdvgC3enjg/4pR1LxhyycZDNW1V6frB8ti8IStGMe9YSmqmt2S+rzLS9oYUYFdokn0PLf7xLkTxL5vDUmhT1XPd5F8nd0kLHnnkZEe7/RwHsZVTPe4ELP+T1KnTxfOC5o3sDh39dC4x5qk9bAutegZ5zrN9ZQD5PBjQ==; 31:elnlgcp+EbP1OnxFWcbn3BSSH7VDkNx6ont9c+iPX2Hxf6wjHtZVBeKG3Y9N6ss1DBRIBCwNnykOmFR6Ide3Ctm8LiCGsXjbSPffrlNfqXryzW4wpt/sjaClHYF+qtYaDeFzYfpsEWXiCsp+Y+WFhlfSddOxqk85Sw+FlDDWN0WxClKQpgbz5+0PP3RQzpDTNdB7jP5fjpC3reks9IEf1OAhrCYpOIoIlO59i4MtPac= X-MS-TrafficTypeDiagnostic: CO2PR07MB2520: X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 20:Rqa2zx2lakAtimdPUUVGp1Z3NKmPR+75wWz1FkZajEWHt6o2uxEC9GxWrLUvffSxtDu8R1Q7xCjLvv8yHve9ukPbyokkxH5TcVJq89aeQwhQN9dUoTQV0xLByew0VSiX0a2oFleTnQgS/0TP5fTPaz/xfAyF6mLztaAAE1ePEgWfKAFi09/0s/xqjbIA0tSxr6gcOv/c/ve0Jy0NgiUvRbGg9yyZZaiWFzGqXf4t4NyXFeOhrXPa9yBdkdybVPTrP7HIqQF5s63u0iIy18GrOXTUCXub81vTtbEOyaI8/Bx2Os0PWEOaToGl4uWeSTUuaiY0H/PUlmw3aayymBJKFl77bqV8seZqHV8r9QjHusf2ys2IkC5AnyjF3mtBdvSiQNCQ0FEXTg3YPhydWukM6OifXvpEIVJ1OirJdOz0S3Dz0vVHrYB9YRTKW+EcWhPuBD9fZ+gdMrCkcvCqzqgqDzoRs/izTzRdVcExNWL2kW+SGg09kr2Nfri/acZas8y6kxsyBrTzwjBod8YnKhKf6SY7I1DUQ18FiXNotjSZzAxaMRNs3EAUXS9ioYVzSD4+KFwXFkAMqgs8l8ZXbHoqnimBkXySpG7m/RM91p//bME= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(60795455431006)(189930954265078)(131327999870524)(45079756050767)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(3231101)(2400082)(944501161)(10201501046)(3002001)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:CO2PR07MB2520; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2520; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 4:MkDHJjFomSXOIMHRz+lutkgIwKajoZ3Vvv6uY0x5At3Vx/t2Ng9tUqKSWDOLv40FVZWriJiv1iaxISSdjvlQJ7dCvarPfWalUPBF8WYPRrYx5YEwTVKMfaZQdqUky5WnU3bG8F8aEoHo8RjlxbdMkTZVCqRqlsgLUhZegiM6FxcCzx61I1JscVF7e9mj2vWBlOKBCM0YizhwbJFExKxr8gnuhwb4XZNO3B7nnrenoH3yi9Gp+Ycra/jKFENwoRHUOzitiK2RMOSC8nzqdi99R1yph35HtnsLku/GgrOTAhpRxQCi2WU0IO3hZ9aDp1l+Av7jHDzywW+gJ4UKqXqnv31sNqmdywZ2Q28V73SUZTPzaE4zvhH56oTfhItIpFJ+fZgSWEa27S+RJS/pvYKS0WVwMUg/GrmZsHMkaFKqeTrnm7tRjZYVcieXqnkpkPa1pw+agPCblga+9iaWjCy2GA== X-Forefront-PRVS: 0581B5AB35 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(396003)(39850400004)(346002)(39380400002)(189003)(13464003)(199004)(51444003)(966005)(9686003)(72206003)(33716001)(106356001)(478600001)(316002)(66066001)(45080400002)(229853002)(16586007)(53936002)(59450400001)(16526019)(386003)(6496006)(52116002)(6306002)(76176011)(33896004)(54906003)(186003)(55236004)(55016002)(105586002)(58126008)(33656002)(3846002)(23726003)(50466002)(97736004)(2950100002)(2906002)(6116002)(1076002)(26005)(6666003)(575784001)(4326008)(6246003)(6916009)(83506002)(81156014)(47776003)(81166006)(42882006)(5660300001)(8676002)(25786009)(8936002)(7736002)(68736007)(305945005)(107886003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2520; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; CO2PR07MB2520; 23:zAmOMTi2zeoSN/8GKHhgxD7ljdvp2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YIDB7Ny0kAtXoy9wmetZobMtwlxj8WQlix6me3mXOwXnmrPt9s=; 5:Z7aCwdW2anif7aODEY0xDmDipmZRE7kYjpbEXbhObvULyAZYjwLwEJYPr/sPeI57NkApXQ8Qlat+vcet5JOtygBzruFjEsn/gefzOTGnII7hj139HC/sp4CGAanIIB6gl6CbRuvQjFgRPY4NlEyU1IThol4ZGKrn77vM3kSa+/c=; 24:PX/ti6xDmAuDAm5SsT7CkiwZn9IEBjrkHY4nTdCgJYPr0QfZ4FGsf3HfBedqNkrprTE2FLzcYyzkfwrgmqVMFz07NycMT4Hfb2cAJG0frFY=; 7:MP7E9+s5JcEgG7lMwUaba8cEBZimcc9OHyprk8lOiFlt62ReoL9wL4xOHmtHUf+DFVJK1uFXpK8GICb4r1JE0scPa4JNMjBzquIHrXNxAUa2oalT2Jf0R66Ici1pKzh57J235NuiPa4Y00G/lkmZLHbiGhE4Vv4hKVo4H1f9oE3510yV0ZpyEzxrptP8grfuSehOu+P/lqwuj4qp5KVZuzAtrajfUyNa7gfmQyvojlCof6gZeNYgB4cn9NEH6Q4R SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2018 13:50:59.7415 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7da6730c-fc3f-4f05-2d1c-08d5721fa7a9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2520 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v3] ethdev: fix ethdev data alignment 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: Mon, 12 Feb 2018 13:51:06 -0000 -----Original Message----- > Date: Mon, 12 Feb 2018 13:44:54 +0000 > From: Matan Azrad > To: Jerin Jacob , "dev@dpdk.org" > > CC: "ferruh.yigit@intel.com" , "stable@dpdk.org" > , Thomas Monjalon , Konstantin > Ananyev , Pavan Nikhilesh > > Subject: RE: [dpdk-dev] [PATCH v3] ethdev: fix ethdev data alignment > > Hi Jerin > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > 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") > > I don't think you need the add the 5b7ba31148a8 fix line. > Maybe think about it in the next way: > Is your fix can stay as a same fix before the port ownership feature addition? > If yes, You are not fixing it. I don't think so. 5b7ba31148a8 breaking the first port alignment case(as mentioned in the commit log clearly). First port alignment was correct prior to 5b7ba31148a8 change set Do you agree? > > I think that the port ownership just exposed the issue, did not initiated it. > > > Cc: stable@dpdk.org > > > > Cc: Matan Azrad > > Cc: Thomas Monjalon > > Cc: Konstantin Ananyev > > > > Signed-off-by: Jerin Jacob > > Signed-off-by: Pavan Nikhilesh > > --- > > > > v3: > > - added more history/data in the git log > > - added stable@dpdk.org in Cc > > > > v2: > > - Change the git comments based on Matan's feedback > > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpd > > k.org%2Fdev%2Fpatchwork%2Fpatch%2F35104%2F&data=02%7C01%7Cmata > > n%40mellanox.com%7Cd491698ead5f48626c1408d5721a8331%7C8c5c71989d > > be4cf9a2099e499881116c%7C0%7C0%7C636540380570748030&sdata=if8cCrk3 > > U0XqWp8NE%2BEP1BjuPHX95HHN0f1yjk6krV0%3D&reserved=0 > > > > --- > > 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 >