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]
Date:   Thu, 5 Jul 2018 19:20:16 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Bryan Whitehead <Bryan.Whitehead@...rochip.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH v1 net-next 3/9] lan743x: Add support for ethtool
 statistics

Hi Bryan

> +static void lan743x_ethtool_get_ethtool_stats(struct net_device *netdev,
> +					      struct ethtool_stats *stats,
> +					      u64 *data)
> +{
> +	struct lan743x_adapter *adapter = netdev_priv(netdev);
> +	int data_index = 0;
> +	u32 buf;
> +	int i;
> +
> +	for (i = 0; i < (sizeof(lan743x_set0_hw_cnt_addr) / (sizeof(u32)));

ARRAY_SIZE(lan743x_set0_hw_cnt_addr) ?

> +	     i++) {
> +		buf = lan743x_csr_read(adapter, lan743x_set0_hw_cnt_addr[i]);
> +		data[data_index++] = (u64)buf;
> +	}
> +	for (i = 0; i < 4; i++)

ARRAY_SIZE(lan743x_set1_sw_cnt_strings) ??

> +		data[data_index++] = (u64)(adapter->rx[i].frame_count);
> +	for (i = 0; i < (sizeof(lan743x_set2_hw_cnt_addr) / (sizeof(u32)));

ARRAY_SIZE()

> +	     i++) {
> +		buf = lan743x_csr_read(adapter, lan743x_set2_hw_cnt_addr[i]);
> +		data[data_index++] = (u64)buf;
> +	}
> +}

  Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ