Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752678AbdHNWpt (ORCPT ); Mon, 14 Aug 2017 18:45:49 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:36368 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752533AbdHNWps (ORCPT ); Mon, 14 Aug 2017 18:45:48 -0400 Date: Tue, 15 Aug 2017 00:45:46 +0200 From: Andrew Lunn To: Vivien Didelot Cc: 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 , Volodymyr Bendiuga , Nikita Yushchenko , Maxime Hadjinlian , Chris Healy , Maxim Uvarov , Stefan Eichenberger , Jason Cobham , Juergen Borleis , Tobias Waldekranz Subject: Re: [PATCH net-next 05/11] net: dsa: debugfs: add port stats Message-ID: <20170814224546.GB16885@lunn.ch> References: <20170814222242.10643-1-vivien.didelot@savoirfairelinux.com> <20170814222242.10643-6-vivien.didelot@savoirfairelinux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170814222242.10643-6-vivien.didelot@savoirfairelinux.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2812 Lines: 51 On Mon, Aug 14, 2017 at 06:22:36PM -0400, Vivien Didelot wrote: > Add a debug filesystem "stats" entry to query a port's hardware > statistics through the DSA switch .get_sset_count, .get_strings and > .get_ethtool_stats operations. > > This allows one to get statistics about DSA links interconnecting > switches, which is very convenient because this kind of port is not > exposed to userspace. > > Here are the stats of a zii-rev-b DSA and CPU ports: > > # 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 > in_fragments : 0 in_fragments : 0 > in_oversize : 0 in_oversize : 0 > in_jabber : 0 in_jabber : 0 > in_rx_error : 0 in_rx_error : 0 > in_fcs_error : 0 in_fcs_error : 0 > out_octets : 9216 out_octets : 0 > out_unicast : 0 out_unicast : 0 > out_broadcasts : 144 out_broadcasts : 0 > out_multicasts : 0 out_multicasts : 0 > out_pause : 0 out_pause : 0 > excessive : 0 excessive : 0 > collisions : 0 collisions : 0 > deferred : 0 deferred : 0 > single : 0 single : 0 > multiple : 0 multiple : 0 > out_fcs_error : 0 out_fcs_error : 0 > late : 0 late : 0 > hist_64bytes : 0 hist_64bytes : 0 > hist_65_127bytes : 0 hist_65_127bytes : 0 > hist_128_255bytes : 0 hist_128_255bytes : 0 > hist_256_511bytes : 0 hist_256_511bytes : 0 > hist_512_1023bytes : 0 hist_512_1023bytes : 0 > hist_1024_max_bytes : 0 hist_1024_max_bytes : 0 > sw_in_discards : 0 sw_in_discards : 0 > sw_in_filtered : 0 sw_in_filtered : 0 > sw_out_filtered : 0 sw_out_filtered : 216 > > Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Andrew