From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [PATCH net-next] net: core: Expose number of link up/down transitions Date: Thu, 18 Jan 2018 00:52:07 +0100 Message-ID: <20180117235207.GC26967@nanopsycho> References: <20180117230704.21949-1-f.fainelli@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, edumazet@google.com, andrew@lunn.ch, cphealy@gmail.com, David Decotigny , "David S. Miller" , Jamal Hadi Salim , Cong Wang , Daniel Borkmann , Nikolay Aleksandrov , Alexei Starovoitov , Roopa Prabhu , Mahesh Bandewar , Vlad Yasevich , Jakub Kicinski , Jonas Bonn , stephen hemminger , Hans Liljestrand , "Reshetova, Elena" , Kirill Tkhai , Andrey Vagin To: Florian Fainelli Return-path: Content-Disposition: inline In-Reply-To: <20180117230704.21949-1-f.fainelli@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Thu, Jan 18, 2018 at 12:06:57AM CET, f.fainelli@gmail.com wrote: >From: David Decotigny > >Expose the number of times the link has been going UP or DOWN, and >update the "carrier_changes" counter to be the sum of these two events. >While at it, also update the sysfs-class-net documentation to cover: >carrier_changes (3.15), count_link_up (4.16) and count_link_down (4.16) > >Signed-off-by: David Decotigny [...] >@@ -161,6 +161,8 @@ enum { > IFLA_EVENT, > IFLA_NEW_NETNSID, > IFLA_IF_NETNSID, >+ IFLA_COUNT_LINK_UP, >+ IFLA_COUNT_LINK_DOWN, IFLA_LINK_UP_COUNT, IFLA_LINK_DOWN_COUNT, would sound a bit nicer to me. > __IFLA_MAX > };