[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200116234807.GJ19046@lunn.ch>
Date: Fri, 17 Jan 2020 00:48:07 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: netdev@...r.kernel.org, cphealy@...il.com,
rmk+kernel@...linux.org.uk, Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v3] net: phy: Maintain MDIO device and bus
statistics
On Wed, Jan 15, 2020 at 08:48:50PM -0800, Florian Fainelli wrote:
> We maintain global statistics for an entire MDIO bus, as well as broken
> down, per MDIO bus address statistics. Given that it is possible for
> MDIO devices such as switches to access MDIO bus addresses for which
> there is not a mdio_device instance created (therefore not a a
> corresponding device directory in sysfs either), we also maintain
> per-address statistics under the statistics folder. The layout looks
> like this:
>
> /sys/class/mdio_bus/../statistics/
> transfers
> errrors
> writes
> reads
> transfers_<addr>
> errors_<addr>
> writes_<addr>
> reads_<addr>
>
> When a mdio_device instance is registered, a statistics/ folder is
> created with the tranfers, errors, writes and reads attributes which
> point to the appropriate MDIO bus statistics structure.
>
> Statistics are 64-bit unsigned quantities and maintained through the
> u64_stats_sync.h helper functions.
>
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
Tested-by: Andrew Lunn <andrew@...n.ch>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists