From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: cphealy@gmail.com, rmk+kernel@armlinux.org.uk, kuba@kernel.org,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: phy: Maintain MDIO device and bus statistics
Date: Sun, 12 Jan 2020 20:55:46 -0800 [thread overview]
Message-ID: <09dcf653-ea83-0978-7549-54574d38bfd7@gmail.com> (raw)
In-Reply-To: <20200113045325.13470-1-f.fainelli@gmail.com>
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@gmail.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
next prev parent reply other threads:[~2020-01-13 4:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 4:53 [PATCH net-next] net: phy: Maintain MDIO device and bus statistics Florian Fainelli
2020-01-13 4:55 ` Florian Fainelli [this message]
2020-01-13 13:21 ` Andrew Lunn
2020-01-13 18:00 ` Florian Fainelli
2020-01-13 18:29 ` Andrew Lunn
2020-01-14 4:44 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09dcf653-ea83-0978-7549-54574d38bfd7@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=cphealy@gmail.com \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox