mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Thomas Scariah <thomasscariah@gmail.com>,
	nsekhar@ti.com, grygorii.strashko@ti.com, davem@davemloft.net,
	drivshin@allworx.com, mugunthanvnm@ti.com,
	ivan.khoronzhuk@linaro.org, thomas.scariah@harman.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] ethtool : added get_phy_stats,get_strings,get_sset_count
Date: Mon, 27 Mar 2017 19:26:57 +0200	[thread overview]
Message-ID: <20170327172657.GB17041@lunn.ch> (raw)
In-Reply-To: <5153db09-092f-55b1-a8fc-aa23433c52a0@gmail.com>

> >  static int cpsw_get_sset_count(struct net_device *ndev, int sset)
> >  {
> > +	struct cpsw_priv *priv = netdev_priv(ndev);
> > +	int slave_no = cpsw_slave_index(priv);
> > +	int count;
> > +
> >  	switch (sset) {
> >  	case ETH_SS_STATS:
> > -		return CPSW_STATS_LEN;
> > +		count = CPSW_STATS_LEN;
> > +		count += phy_ethtool_get_sset_count(priv->slaves[slave_no].phy,
> > +						    sset);
> > +		return count;
> >  	default:
> >  		return -EOPNOTSUPP;
> >  	}
> 
> We already have a way to obtain PHY specific statistics through the
> ETH_SS_PHY_STATS string set, cannot we use that here too? It certainly
> makes it easier to overlay cpsw statistics with PHY device statistics,
> but when Andrew added support for that, AFAIR this was made
> intentionally separate.

I don't particularly like this. It makes the cpsw driver different to
all other drivers, in that it returns both MAC and PHY statistics.

If you are going to do this, please do it a higher level so that it
applies to all Ethernet drivers, not just cpsw.

But personally, i don't see the point of this change. What is wrong
with ethtool --phy-statistics?

     Andrew

  reply	other threads:[~2017-03-27 17:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27 10:12 Thomas Scariah
2017-03-27 16:44 ` Florian Fainelli
2017-03-27 17:26   ` Andrew Lunn [this message]
2017-03-27 17:38   ` Andrew Lunn
2017-03-28  6:45     ` [EXTERNAL] Re: [PATCH 1/1] ethtool : added get_phy_stats, get_strings,get_sset_count Scariah, Thomas
     [not found]   ` <CA+1hMaGV-trVT+ZisgTtyRAVz=ZqopmwmpWyqHvWQMrkmv-96A@mail.gmail.com>
2017-03-28 12:10     ` [PATCH 1/1] ethtool : added get_phy_stats,get_strings,get_sset_count 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=20170327172657.GB17041@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=drivshin@allworx.com \
    --cc=f.fainelli@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=ivan.khoronzhuk@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=thomas.scariah@harman.com \
    --cc=thomasscariah@gmail.com \
    /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

all inboxes | Powered by JetHome®