[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <09dcf653-ea83-0978-7549-54574d38bfd7@gmail.com>
Date: Sun, 12 Jan 2020 20:55:46 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: netdev@...r.kernel.org
Cc: cphealy@...il.com, rmk+kernel@...linux.org.uk, kuba@...nel.org,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] net: phy: Maintain MDIO device and bus
statistics
On 1/12/2020 8:53 PM, Florian Fainelli wrote:
> Maintain per MDIO device and MDIO bus statistics comprised of the number
> of transfers/operations, reads and writes and errors. This is useful for
> tracking the per-device and global MDIO bus bandwidth and doing
> optimizations as necessary.
>
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> ---
[snip]
> +#define MDIO_BUS_STATS_SHOW_NAME(name, file, field, format_string) \
> +static ssize_t mdio_bus_stats_##name##_show(struct mdio_bus_stats *s, \
> + char *buf) \
> +{ \
> + unsigned int start; \
> + ssize_t len; \
> + u64 tmp; \
> + do { \
> + start = u64_stats_fetch_begin(&s->syncp); \
> + tmp = u64_stats_read(&s->field); \
> + } while (u64_stats_fetch_retry(&s->syncp, start)); \
> + len = sprintf(buf, format_string ## "\n", tmp); \
^ ===== that hunk right there does not build, I sent a non-fixed up
patch, I would still appreciate comments though.
--
Florian
Powered by blists - more mailing lists