Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751679AbdH2TF0 (ORCPT ); Tue, 29 Aug 2017 15:05:26 -0400 Received: from mail-ve1eur01on0075.outbound.protection.outlook.com ([104.47.1.75]:55262 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751437AbdH2TFY (ORCPT ); Tue, 29 Aug 2017 15:05:24 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=arkadis@mellanox.com; Subject: Re: [PATCH net-next v2 00/10] net: dsa: add generic debugfs interface To: Andrew Lunn , Jiri Pirko References: <20170828191748.19492-1-vivien.didelot@savoirfairelinux.com> <20170828195332.GB1950@nanopsycho.orion> <20170828200834.GA1870@lunn.ch> <20170829062523.GA1977@nanopsycho.orion> <20170829125004.GB22093@lunn.ch> Cc: Vivien Didelot , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli , Egil Hjelmeland , John Crispin , Woojung Huh , Sean Wang , Nikita Yushchenko , Chris Healy , mlxsw@mellanox.com From: Arkadi Sharshevsky Message-ID: <8e6fa7ea-fb7b-3026-b9c0-417ef2efae27@mellanox.com> Date: Tue, 29 Aug 2017 22:05:11 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170829125004.GB22093@lunn.ch> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Originating-IP: [2a02:ed0:5f62:af00:629b:ea78:4824:1145] X-ClientProxiedBy: AM5PR0701CA0012.eurprd07.prod.outlook.com (2603:10a6:203:51::22) To VI1PR0501MB2463.eurprd05.prod.outlook.com (2603:10a6:800:68::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7692d301-9149-42eb-85e9-08d4ef10e397 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:VI1PR0501MB2463; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0501MB2463;3:aJASVHtLGZOVnnDl7wEdgqGWhpUodpHWaxFhah7YXw2/itJ2rGkHFwo2qe2rVfrKxuAKso3ayfOo1g6xv8SKM/D8+Gucl7SDiDt6lOBqRRI+EAllYvuagXgy4XlqUscbfPqgyMcKYlqHctOikV/IhISFDjQyForP9AAmXUtmZZpRQPUaplWjGdv8LVMLcLAc7v9k9gMmbSUT6DFiYYjQllA65QoyWwinFumMXjn2tQCaP+htSym5pmrlV8huTQeg;25:SXnbkKLVd1NCxSR2gjkp7L6hmujTh5zjQ4+D4b4zBvnHdjCyAolbwOekW7Y95lVqmRRdzgkOPzmHJFlkkAT6fFHBS39pxmQl7nTFNA9Ts9vcL3VuZiCCm6IVcuz1FmmsrNJf3XfedZj5ih5GYzVcB8ee2BMz4evLOej+tyLoGf+dCWmA9yS4poeddWmk6pmq5jMCSi5Pc2O1lkzHdOoUMivZAuluDuO3TuK3hUTbaT9ZQDg9D3U3vnXLA8wEoApcEFPW7aCD/uhEB/RmWlH/bSAqppu0MJcBttnUBTC85r/conu30AOnTExGdLYswf2LK5OoRwMEP3Tnf4jxA8v+uw==;31:Z+H6ukLj/nhRSfiU8z3au1ywLcRfLPU8Y98pB3DgAXrIMryyyCzl9nHLBVJYZeB6kxmRdsc0QvGO/BFxep6curVHgZTy2IqiENCrCKZJcSGKJ2y3cQ8rhxAJk1YCB76XasOvHBBDjGTdHWhCIOAwvBSy79eNUzeNRd/8pvidqqNLwwP20SxiP1RwmKxLzIk1Ylur83xkVUeJxuzcDu3emvXC2SymchkyeLLBnW2MJyQ= X-MS-TrafficTypeDiagnostic: VI1PR0501MB2463: X-Microsoft-Exchange-Diagnostics: 1;VI1PR0501MB2463;20:zCBulOW5/5+4zWgvDZzxjALqCf6qGHPTZbGNAzOoPPiaYyIw98NbemisHors18TEOd44iz5DYq5eg8TUjUzu/24P46tchx7yUSKCM3BmFaDhYBg+XqQCjIBsvjKntpEuki8Ijgui00fxe7BDtwKAFJEMGJhcQ/YzNPxTG+83CGuJPKDVulkxM5sX/oGL2k3emtWjIRSsNPiOY1x3Sws8fcRYDsvTf2k4B89a6Th0E0JH20HNlTkmllenld6dfhUrXa9Uw6+4Vo2V+B+AOYgn1/KaXje5DprPWBkuRGH8RQG3P6C4Lt/qQGXfxj/ONv9tKcOL8r3oyjskZBZkDDs54OboSwSqKHgu9PePaZmguZ8S+g9DXx/QBapg10BFfbKX3QI2yWigPXKxz9Reiq6ysaM6LxKh5npKML5bCpbaSypM94KsUp8BAKbCJ2wmmdWyGnjdNlth12v4uXCcbHVCSsABVohxDEXPHl+4hWkd/EKolixYTfMTvq6pdT+sw3fx;4:84QMw6s4lnATeGewLBOXG2I9tZHdWKe6QRo1R8BEQLF3VuQvmBJ+ILMUulEOqSJ6NcuXfiE4xQUfcqkauvHskFVCTjS4U9D1MX5AtOP0UaJyIJmpN2vqboJdH9LnPxRbUn56b4ysaasQ/BH1+K0aZ9N1HcujAhFnjyvFaikYsW+LXC4EqaO234qDwwKRuWEDCVjB6cHf4RuHS+9v2EhRKtwrLtZnBrioISPQAJgKnOtQLFx5zandlMCHi933STrtBRv9FzbT9tbZcxsWB+8LbjHmeuCs40w7/KEwy/SUqG//6OF6YCAaBPYejarBwY3KO+FL3xjNX2hCgl1zWC6h3w== X-Exchange-Antispam-Report-Test: UriScan:(189930954265078)(45079756050767); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:VI1PR0501MB2463;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:VI1PR0501MB2463; X-Forefront-PRVS: 0414DF926F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(7370300001)(4630300001)(6009001)(6069001)(39860400002)(24454002)(199003)(189002)(377454003)(305945005)(966005)(25786009)(189998001)(5660300001)(93886005)(65956001)(7736002)(23746002)(6506006)(7416002)(64126003)(6246003)(53546010)(86362001)(83506001)(31696002)(7350300001)(230700001)(4001350100001)(575784001)(107886003)(76176999)(54356999)(6116002)(50986999)(31686004)(65806001)(47776003)(42186005)(53936002)(229853002)(33646002)(105586002)(45080400002)(68736007)(6486002)(6306002)(54906002)(101416001)(6512007)(81156014)(81166006)(2906002)(8676002)(97736004)(6666003)(50466002)(65826007)(106356001)(36756003)(478600001)(4326008)(2950100002)(41533002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0501MB2463;H:localhost.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;VI1PR0501MB2463;23:yG0xAXC8p4nNtqA2sNcdkzV6AqiVwyKLiOa?= =?Windows-1252?Q?Bv0uduv+UwyQmibHcwvLfYc83eI6MVEGDYvJ9jel8RqO+GgAofhLfyxw?= =?Windows-1252?Q?fHeuNht/s+DHLpRmMymOYxQ6lp7EGsXZsYcUta4sayS5Vc/19J0WzGqx?= =?Windows-1252?Q?HpEQOOjdB6pVKmxj6iojOegNZd+7gDGFIrvhevyZyKlCtqMilCvbE05+?= =?Windows-1252?Q?YzNZyZSCMMJKSGfHDRNsuuc1yR+TS7hRuWm+wypUpJj+c+C56XJa2Xqj?= =?Windows-1252?Q?B9FLg/9Mg+3IvpKmK6Row51wHhZGu9QdR/RuWo33hsjPaAeM19oRcYJ6?= =?Windows-1252?Q?BIjNV54FbJ00sh1gg0RSPAHfB1lpxuLqp3UalGBi1Jbil/aWHiIvtxkA?= =?Windows-1252?Q?qAwbpMBS0tNJkANqJY3w7QrN1CnyK9U5XySzub8r3s2N8359S6pQTmZg?= =?Windows-1252?Q?aYhqqOyWkqCy754qpp301+McMzvzBpBQbqyhoSIGNjh8ID4M6z50cBV0?= =?Windows-1252?Q?KXNQZULMqMVzzzS6oyD85PlbjyK8Zc2U+UACe0fd/CvQ53lUYaHdn4jr?= =?Windows-1252?Q?b0W3R+zfSLU8JGt1LCRj5ACrZHVs7YpQFc6x8KqoBZdJ3AltfIUvdz2c?= =?Windows-1252?Q?D7RKcyaiCu2Brtvc3bAIgm6Iy2z5kEhjgrCgEd9FTOKgC58AUp+SLZcD?= =?Windows-1252?Q?AUWcAUhVVw+MGGcqBqR8LCNuHeFDKb1/BiNXsz/5rvNjVW13avY/KQhy?= =?Windows-1252?Q?8l7im0FatAvGORxJVMZ/Qm6Q4Vjg6Vs6c+lMIaYMw6O8ZvN7eUld+1Hm?= =?Windows-1252?Q?RI0Jgib9gN5SUsJ6cRp/z4MLJTQPiRLiA3hZod71HOAnVA8T9nt71QVG?= =?Windows-1252?Q?otJ9kE5pFKIDHhjXMqAjzm15+jDd2NJPKC+2HwvIJJAiST5gcQ7kyzLO?= =?Windows-1252?Q?ObzwZa6CdJr9OY7SulR5T4/2Or5F6YkIPyrjehqQN9mDZ8tDzhpN2jC1?= =?Windows-1252?Q?R22r1NOqDyMaU91ArFPX371f5iJ/1Ebh+wTnU8WgoySuKlUddxpLd59/?= =?Windows-1252?Q?I7+3zn9yNCRbNvuP9dcS225BXgxWc53jaiS46thTwJ0BbZmDbP6LlL2u?= =?Windows-1252?Q?aSEGanKI+u/iMUPEJXiQ7BSBxQoTo6YG6sUzRS6RKtHYLvz/eDLuZQjR?= =?Windows-1252?Q?GNkmGmR6z6Ft378vn5NMIoWKmJVojVF5DT1iVwSH/WPrG1GvmnFLy9lc?= =?Windows-1252?Q?qBGv/wF/7WGO032wYyHIgnxB+SeYLMYrClbexlFCxWVDUp62I1gJM9iG?= =?Windows-1252?Q?W+drZUio3IYTEtFlAKrekANXcl30D26WZ+eF4Oz59cYLKOZxCGkxLoza?= =?Windows-1252?Q?Flq84S9y3jZ1GSZkfwe9D6T4HlNrPyfTAgZPQuQNYmqHoSvUS4VBldty?= =?Windows-1252?Q?8sZyZuz/QpC54eGrrcJLiXHGTCr0AGbi4htph1joEHvmGjhb1p9VV7Gf?= =?Windows-1252?Q?vCnmsbqYAONBAhBuFD4Kw9ECz37WKgwVeXsfkI6zvVRmYlQfU5eoDLNI?= =?Windows-1252?Q?FY5PGguXYDd1X1TBPaQYIh5CWqnq1mcAt5VuyflyUf44NxGeALnIzoIF?= =?Windows-1252?Q?eI9YOpjw/ZL92BO7DqNqGS3Y=3D?= X-Microsoft-Exchange-Diagnostics: 1;VI1PR0501MB2463;6:IKpXU//yDIhx1JiuQ05+1opJRMFgUSfODxlkdEt7M75gij1Nhpu71AQfqUtlYG7azIUR1S/kqz+knSJBRxwr4fBH9MO+XleEuSeX7LYGo7FEUZDvFPbtBWhYCPmd9lzltUdmrmMVxvGQjWBBXW5qS74967r1OMN31KkFJUIA2ZWud4nTd3lLF9USnHrYP0HAqYpdp7biDAenDUSCwd4yNHR1wmprjleDywvv5m09T1NMdLcqhFGENlBp6+db2qwCDf/2PadihoRvLo4BF6m1NIMhZ0bkehAnT5eJ9dN+akaARCI8sdB5oxdspa0uFtexmNT9cxkWpyI/iU/fwS4u4g==;5:6CipYbVuJN+Acf19RZUBAI7/iP23rctnX2TdImlY2mrJikrcZhOqY66aU8itWNga2b/s3uuPaO905IUAX/9UuXZ7XE2BMWw13tyIPeqmIG2hXrb1VuyZo99fbxMs1bnH8EywBwnvSw0iH8TShcczUA==;24:jygSPEzaJkgB8WNHKlBOwh+X8o1xZhJsxP5JBPkiSTc29okROYNMp6A/szGykb/s8qnQWQiM/OMOZCC1Udhn8ViurMQeazCFCjzKwyFOy74=;7:4+lr+JnhO8841TNkOEOLpol3b7Rh8+EFAPWJahbkgFQP7HwBN/fpIrWQ1rsrdRWm6Oi+FkWN5KxiVMkt82CItc8m1qlZVQu2npJnwdDhgfF+YuHR9TNCUjcSu49Bh6KqzSdmczf2kvtt85EqFMXjBT9N5wWw5xps8RT7XUcSBKr5+1KiGXb6NBoLIdTpR/cUCEe5ymQKhWKAkLSkReJxV/RjfXqukz7QSKAd4iEOc9Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2017 19:05:16.2799 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2463 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2748 Lines: 61 On 08/29/2017 03:50 PM, Andrew Lunn wrote: > On Tue, Aug 29, 2017 at 08:25:23AM +0200, Jiri Pirko wrote: >> Mon, Aug 28, 2017 at 10:08:34PM CEST, andrew@lunn.ch wrote: >>>> I see this overlaps a lot with DPIPE. Why won't you use that to expose >>>> your hw state? >>> >>> We took a look at dpipe and i talked to you about using it for this >>> sort of thing at netconf/netdev. But dpipe has issues displaying the >>> sort of information we have. I never figured out how to do two >>> dimensional tables. The output of the dpipe command is pretty >>> unreadable. A lot of the information being dumped here is not about >>> the data pipe, etc. >> >> So improve it. No problem. Also, we extend it to support what you neede. > > Will i did try to do this back in March. And i failed. > > Lets start with stats. Vivien gives an example on the cover letter: > > # pr -mt switch0/port{5,6}/stats > in_good_octets : 0 in_good_octets : 13824 > in_bad_octets : 0 in_bad_octets : 0 > in_unicast : 0 in_unicast : 0 > in_broadcasts : 0 in_broadcasts : 216 > in_multicasts : 0 in_multicasts : 0 > in_pause : 0 in_pause : 0 > in_undersize : 0 in_undersize : 0 > > This is what i tried to implement using dpipe. It is a simple two > dimensional table. First column is a string, second a u64. In debugfs > we have such a table per port. That fits with the hierarchy that each > port is a directory in debugfs. But it could also be implemented as > one table with N+1 columns, for N switch ports. > Hi Andrew, This looks to me like basic L2 statistics that are obtained via ethtool, I remember you had this problem with the DSA and CPU port. Is this still the case? I remembered we wanted to use dpipe for the DSA routing table and IP priority table. I think both those processes really look like match/action table , thus they can be modeled successfully by dpipe. > How about you, or one of your team, implement that. It should be able > to use the dsa_loop driver, which is a simple dummy switch. But it > does have statistics counters for all ports. Florian or I can help you > get it running if needed. > > This branch contains some of the basic plumbing code from my previous > attempt: > > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flunn%2Flinux.git&data=02%7C01%7Carkadis%40mellanox.com%7Cb3cac139af204f79259c08d4eedc8410%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636396078291326351&sdata=K5D3TAb2spckuF5k88oOaVt0dmtHj0AwE8bEEGPPdGI%3D&reserved=0 v4.11-rc4-net-next-dpipe > > Andrew >