lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190624120519.4ec22e19@cakuba.netronome.com>
Date:   Mon, 24 Jun 2019 12:05:19 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Xue Chaojing <xuechaojing@...wei.com>, <davem@...emloft.net>
Cc:     <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
        <luoshaokai@...wei.com>, <cloud.wangxiaoyun@...wei.com>,
        <chiqijun@...wei.com>, <wulike1@...wei.com>,
        Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH net-next v2] hinic: implement the statistical interface
 of ethtool

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ