From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 322E6C5ACD5 for ; Fri, 18 Jan 2019 18:45:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DF7620850 for ; Fri, 18 Jan 2019 18:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728973AbfARSpZ (ORCPT ); Fri, 18 Jan 2019 13:45:25 -0500 Received: from charlotte.tuxdriver.com ([70.61.120.58]:43953 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728717AbfARSpY (ORCPT ); Fri, 18 Jan 2019 13:45:24 -0500 Received: from uucp by smtp.tuxdriver.com with local-rmail (Exim 4.63) (envelope-from ) id 1gkZ8j-0008T6-Ls; Fri, 18 Jan 2019 13:45:13 -0500 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.15.2/8.14.6) with ESMTP id x0IIeutE011181; Fri, 18 Jan 2019 13:40:56 -0500 Received: (from linville@localhost) by localhost.localdomain (8.15.2/8.15.2/Submit) id x0IIeseb011179; Fri, 18 Jan 2019 13:40:54 -0500 Date: Fri, 18 Jan 2019 13:40:54 -0500 From: "John W. Linville" To: Vivien Didelot Cc: netdev@vger.kernel.org, Chris Healy , f.fainelli@gmail.com, andrew@lunn.ch Subject: Re: [PATCH v2 0/7] ethtool: pretty dump mv88e6xxx registers Message-ID: <20190118184054.GE30266@tuxdriver.com> References: <20181218190641.31883-1-vivien.didelot@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181218190641.31883-1-vivien.didelot@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Dec 18, 2018 at 02:06:34PM -0500, Vivien Didelot wrote: > This patch series adds support to pretty dump the registers of user > ports created by the kernel "dsa" subsystem. > > The first patch adds the base support for "dsa" interfaces. > > The second patch adds the boilerplate for the "mv88e6xxx" DSA driver, > all using 32 registers of 16 bits, the switch ID being assigned > by the kernel driver into the regs version. Support for other DSA > drivers such as "b53" or "ksz" can be added similarly later. Because > the different switches supported by mv88e6xxx have slightly different > register layout, we keep it simple and stupid by providing one dump > function per switch. > > The remaining patches add support for the switch models currently > supported by the mv88e6xxx driver. Here's an example of dump of the > 32 registers of a 88E6352 port: > > # ethtool -d lan3 > 88E6352 Switch Port Registers > ------------------------------ > 00: Port Status 0x500f > Pause Enabled 0 > My Pause 1 > 802.3 PHY Detected 1 > Link Status Down > Duplex Half > Speed 10 Mbps > EEE Enabled 0 > Transmitter Paused 0 > Flow Control 0 > Config Mode 0xf > 01: Physical Control 0x0003 > RGMII Receive Timing Control Default > RGMII Transmit Timing Control Default > 200 BASE Mode 100 > Flow Control's Forced value 0 > Force Flow Control 0 > Link's Forced value Down > Force Link 0 > Duplex's Forced value Half > Force Duplex 0 > Force Speed Not forced > 02: Jamming Control 0x0000 > 03: Switch Identifier 0x3521 > 04: Port Control 0x0433 > Source Address Filtering controls Disabled > Egress Mode Unmodified > Ingress & Egress Header Mode 0 > IGMP and MLD Snooping 1 > Frame Mode Normal > VLAN Tunnel 0 > TagIfBoth 0 > Initial Priority assignment Tag & IP Priority > Egress Flooding mode No unknown DA > Port State Forwarding > 05: Port Control 1 0x0000 > Message Port 0 > Trunk Port 0 > Trunk ID 0 > FID[11:4] 0x000 > 06: Port Base VLAN Map (Header) 0x0060 > FID[3:0] 0x000 > VLANTable 5 6 > 07: Default VLAN ID & Priority 0x0000 > Default Priority 0x0 > Force to use Default VID 0 > Default VLAN Identifier 0 > 08: Port Control 2 0x2080 > Force good FCS in the frame 0 > Jumbo Mode 10240 > 802.1QMode Disabled > Discard Tagged Frames 0 > Discard Untagged Frames 0 > Map using DA hits 1 > ARP Mirror enable 0 > Egress Monitor Source Port 0 > Ingress Monitor Source Port 0 > Use Default Queue Priority 0 > Default Queue Priority 0x0 > 09: Egress Rate Control 0x0001 > 10: Egress Rate Control 2 0x0000 > 11: Port Association Vector 0x0001 > 12: Port ATU Control 0x0000 > 13: Override 0x0000 > 14: Policy Control 0x0000 > 15: Port Ether Type 0x9100 > 16: InDiscardsLo Frame Counter 0x0000 > 17: InDiscardsHi Frame Counter 0x0000 > 18: InFiltered/TcamCtr Frame Counter 0x0000 > 19: Rx Frame Counter 0x0000 > 20: Reserved 0x0000 > 21: Reserved 0x0000 > 22: LED Control 0x0022 > 23: Reserved 0x0000 > 24: Tag Remap 0-3 0x3210 > 25: Tag Remap 4-7 0x7654 > 26: Reserved 0x0000 > 27: Queue Counters 0x8000 > 28: Reserved 0x0000 > 29: Reserved 0x0000 > 30: Reserved 0x0000 > 31: Reserved 0x0000 > > > Changes in v2: > - read the switch model from regs->version instead of regs[3] > > > Vivien Didelot (7): > ethtool: dsa: add pretty dump > ethtool: dsa: mv88e6xxx: add pretty dump > ethtool: dsa: mv88e6xxx: add pretty dump for 88E6185 > ethtool: dsa: mv88e6xxx: add pretty dump for 88E6161 > ethtool: dsa: mv88e6xxx: add pretty dump for 88E6352 > ethtool: dsa: mv88e6xxx: add pretty dump for 88E6390 > ethtool: dsa: mv88e6xxx: add pretty dump for others > > Makefile.am | 2 +- > dsa.c | 685 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > ethtool.c | 1 + > internal.h | 3 + > 4 files changed, 690 insertions(+), 1 deletion(-) > create mode 100644 dsa.c Queued for next release. -- John W. Linville Someday the world will need a hero, and you linville@tuxdriver.com might be all we have. Be ready.