netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Xue Chaojing <xuechaojing@huawei.com>
Cc: <davem@davemloft.net>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>, <luoshaokai@huawei.com>,
	<cloud.wangxiaoyun@huawei.com>, <chiqijun@huawei.com>,
	<wulike1@huawei.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH net-next v2] hinic: implement the statistical interface of ethtool
Date: Mon, 1 Jul 2019 19:12:25 -0700	[thread overview]
Message-ID: <20190701191225.68510307@cakuba.netronome.com> (raw)
In-Reply-To: <20190624120519.4ec22e19@cakuba.netronome.com>

On Mon, 24 Jun 2019 12:05:19 -0700, Jakub Kicinski wrote:
> On Mon, 24 Jun 2019 03:50:12 +0000, Xue Chaojing wrote:
> > diff --git a/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c b/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c
> > index be28a9a7f033..8d98f37c88a8 100644
> > --- a/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c
> > +++ b/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c
> > @@ -438,6 +438,344 @@ static u32 hinic_get_rxfh_indir_size(struct net_device *netdev)
> >  	return HINIC_RSS_INDIR_SIZE;
> >  }
> >  
> > +#define ARRAY_LEN(arr) ((int)((int)sizeof(arr) / (int)sizeof(arr[0])))
> > +
> > +#define HINIC_NETDEV_STAT(_stat_item) { \
> > +	.name = #_stat_item, \
> > +	.size = FIELD_SIZEOF(struct rtnl_link_stats64, _stat_item), \
> > +	.offset = offsetof(struct rtnl_link_stats64, _stat_item) \
> > +}
> > +
> > +static struct hinic_stats hinic_netdev_stats[] = {
> > +	HINIC_NETDEV_STAT(rx_packets),
> > +	HINIC_NETDEV_STAT(tx_packets),
> > +	HINIC_NETDEV_STAT(rx_bytes),
> > +	HINIC_NETDEV_STAT(tx_bytes),
> > +	HINIC_NETDEV_STAT(rx_errors),
> > +	HINIC_NETDEV_STAT(tx_errors),
> > +	HINIC_NETDEV_STAT(rx_dropped),
> > +	HINIC_NETDEV_STAT(tx_dropped),
> > +	HINIC_NETDEV_STAT(multicast),
> > +	HINIC_NETDEV_STAT(collisions),
> > +	HINIC_NETDEV_STAT(rx_length_errors),
> > +	HINIC_NETDEV_STAT(rx_over_errors),
> > +	HINIC_NETDEV_STAT(rx_crc_errors),
> > +	HINIC_NETDEV_STAT(rx_frame_errors),
> > +	HINIC_NETDEV_STAT(rx_fifo_errors),
> > +	HINIC_NETDEV_STAT(rx_missed_errors),
> > +	HINIC_NETDEV_STAT(tx_aborted_errors),
> > +	HINIC_NETDEV_STAT(tx_carrier_errors),
> > +	HINIC_NETDEV_STAT(tx_fifo_errors),
> > +	HINIC_NETDEV_STAT(tx_heartbeat_errors),
> > +};  
> 
> I think we wanted to stop duplicating standard netdev stats in ethtool
> -S.  Chaojing please post a patch to remove this part, the other stats
> are good.

Please address this comment or I will send a revert of the entire patch.

      reply	other threads:[~2019-07-02  2:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24  3:50 [PATCH net-next v2] hinic: implement the statistical interface of ethtool Xue Chaojing
2019-06-24 14:19 ` David Miller
2019-06-24 19:05 ` Jakub Kicinski
2019-07-02  2:12   ` Jakub Kicinski [this message]

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=20190701191225.68510307@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=chiqijun@huawei.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luoshaokai@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=wulike1@huawei.com \
    --cc=xuechaojing@huawei.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;
as well as URLs for NNTP newsgroup(s).