netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Florian Fainelli <f.fainelli@gmail.com>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH 2/2] ethtool: Add PHY statistics support
Date: Sun, 13 Mar 2016 17:08:48 +0100	[thread overview]
Message-ID: <20160313160848.GG9674@lunn.ch> (raw)
In-Reply-To: <1457884216.3331.16.camel@decadent.org.uk>

> > +.B ethtool \-I|\-\-phy-statistics
> > +.I devname
> > +.HP
> 
> -I isn't a useful mnemonic, so I will drop the short option altogether.

It was the best i could come up with. -P would of been nice, since we
have -S for MAC statistics, but that is taken. PHY sounds a bit like
I, so why not. But i'm O.K. for -I to be dropped.
 
> > +	/* todo - pretty-print the strings per-driver */
> > +	fprintf(stdout, "PHY statistics:\n");
> > +	for (i = 0; i < n_stats; i++) {
> > +		fprintf(stdout, "     %.*s: %llu\n",
> > +			ETH_GSTRING_LEN,
> > +			&strings->data[i * ETH_GSTRING_LEN],
> > +			stats->data[i]);
> > +	}
> > +	free(strings);
> > +	free(stats);
> > +
> > +	return 0;
> > +}
> 
> This is basically a copy-paste of do_gstats() so they should be merged
> into one function.

O.K, i can do that.

     Andrew

  reply	other threads:[~2016-03-13 16:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23 11:58 [PATCH 0/2] ethtool(1) support for reading Phy stats Andrew Lunn
2015-12-23 11:58 ` [PATCH 1/2] ethtool-copy.h: sync with net Andrew Lunn
2015-12-23 11:58 ` [PATCH 2/2] ethtool: Add PHY statistics support Andrew Lunn
2016-03-13 15:50   ` Ben Hutchings
2016-03-13 16:08     ` Andrew Lunn [this message]
2016-03-13 16:01   ` [PATCH ethtool 1/2] Remove short option -I for PHY statistics Ben Hutchings
2016-03-13 16:09     ` Andrew Lunn
2016-03-13 16:01   ` [PATCH ethtool 2/2] Refactor do_gstats() and do_gphystats() to avoid code duplication Ben Hutchings
2016-03-13 16:12     ` Andrew Lunn

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=20160313160848.GG9674@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ben@decadent.org.uk \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).