From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932135AbeARARs (ORCPT ); Wed, 17 Jan 2018 19:17:48 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:42375 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754621AbeARARq (ORCPT ); Wed, 17 Jan 2018 19:17:46 -0500 X-Google-Smtp-Source: ACJfBotFEuIhOR49ECSNQD8xh8RzyM82EncKFVHj9Qs2Z6X51rE0AG+zdfOeP4eZAcwVTEPIlH03sA== Subject: Re: [PATCH net-next] net: core: Expose number of link up/down transitions To: Jiri Pirko , Florian Fainelli 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 , Florian Westphal , Xin Long , Matthias Schiffer , Jiri Benc , open list References: <20180117230704.21949-1-f.fainelli@gmail.com> <20180117235207.GC26967@nanopsycho> From: David Ahern Message-ID: Date: Wed, 17 Jan 2018 16:17:43 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180117235207.GC26967@nanopsycho> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/17/18 3:52 PM, Jiri Pirko wrote: > 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. given existing IFLA_LINK_* attributes how about IFLA_CARRIER_{UP,DOWN}_COUNT?