From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751172AbdIOFvM (ORCPT ); Fri, 15 Sep 2017 01:51:12 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35622 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750830AbdIOFvK (ORCPT ); Fri, 15 Sep 2017 01:51:10 -0400 X-Google-Smtp-Source: ADKCNb54u30cr0fI1fOer1vkvvXWxXsBLAX3JvsxOW3inC7yL5kKvgNihshMT8jRsZyLJthjm5xXWA== Date: Fri, 15 Sep 2017 07:51:07 +0200 From: Jiri Pirko To: Andrew Lunn Cc: Alexander Duyck , Maxim Uvarov , Vivien Didelot , Greg KH , netdev , "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 Subject: Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface Message-ID: <20170915055107.GA1927@nanopsycho.orion> References: <20170828191748.19492-1-vivien.didelot@savoirfairelinux.com> <20170828191748.19492-2-vivien.didelot@savoirfairelinux.com> <20170907193434.GA11006@kroah.com> <87h8wdb8bj.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> <20170914210132.GC3084@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170914210132.GC3084@lunn.ch> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thu, Sep 14, 2017 at 11:01:32PM CEST, andrew@lunn.ch wrote: >> Can you clarify what type of registers it is you are wanting to read? >> We already have ethtool which is meant to allow reading the device >> registers for a given netdev. As long as the port has a netdev >> associated it then there is no need to be getting into debugfs since >> we should probably just be using ethtool. > >Not all ports of a DSA switch have a netdev. This is by design. The >presentation we gave to Netdev 2.1 gives some of the background. > >Plus a switch has a lot of registers not associated to port. Often a >switch has more global registers than port registers. > >> Also as Jiri pointed out there is already devlink which would probably >> be a better way to get the associated information for those pieces >> that don't have a netdev associated with them. > >We have looked at the devlink a few times. The current dpipe code is >not generic enough. It makes assumptions about the architecture of the >switch, that it is all match/action based. The niche of top of rack >switches might be like that, but average switches are not. > >If dpipe was to support simple generic two dimensional tables, we >probably would use it. > >David suggested making a class device for DSA. It is not ideal, but we >are probably going to go that way. I believe that is also big mistake. Could you put together your requirements so we can work it out to extend devlink to support them? Thanks.