Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751291AbdH1T6W (ORCPT ); Mon, 28 Aug 2017 15:58:22 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34746 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751190AbdH1T6U (ORCPT ); Mon, 28 Aug 2017 15:58:20 -0400 Subject: Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface To: Jiri Pirko , Vivien Didelot Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Andrew Lunn , Egil Hjelmeland , John Crispin , Woojung Huh , Sean Wang , Nikita Yushchenko , Chris Healy References: <20170828191748.19492-1-vivien.didelot@savoirfairelinux.com> <20170828191748.19492-2-vivien.didelot@savoirfairelinux.com> <20170828195039.GA1950@nanopsycho.orion> From: Florian Fainelli Message-ID: Date: Mon, 28 Aug 2017 12:58:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170828195039.GA1950@nanopsycho.orion> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1557 Lines: 43 On 08/28/2017 12:50 PM, Jiri Pirko wrote: > Mon, Aug 28, 2017 at 09:17:39PM CEST, vivien.didelot@savoirfairelinux.com wrote: >> This commit adds a DEBUG_FS dependent DSA core file creating a generic >> debug filesystem interface for the DSA switch devices. >> >> The interface can be mounted with: >> >> # mount -t debugfs none /sys/kernel/debug >> >> The dsa directory contains one directory per switch chip: >> >> # cd /sys/kernel/debug/dsa/ >> # ls >> switch0 switch1 switch2 >> >> Each chip directory contains one directory per port: >> >> # ls -l switch0/ >> drwxr-xr-x 2 root root 0 Jan 1 00:00 port0 >> drwxr-xr-x 2 root root 0 Jan 1 00:00 port1 >> drwxr-xr-x 2 root root 0 Jan 1 00:00 port2 >> drwxr-xr-x 2 root root 0 Jan 1 00:00 port5 >> drwxr-xr-x 2 root root 0 Jan 1 00:00 port6 >> >> Future patches will add entry files to these directories. >> >> Signed-off-by: Vivien Didelot > > Oh no, no debugfs please! > > What do you need to expose? I'm sure we can find out some generic, well > defined and reusable way. We have no CPU or DSA (cross switches) net_device reprensentors because those would be two ends of the same pipe so it would be both confusing and a duplication. For a CPU interface, one side goes to the switch, the other one is the master net_device (normal Ethernet MAC). For a DSA interface, one interface is on one switch, and the other is on the other switch. If you look at the patch series it's pretty obvious what is being exposed :) -- Florian