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] [day] [month] [year] [list]
Message-ID: <20171026150333.7aa11cc3@cakuba.netronome.com>
Date:   Thu, 26 Oct 2017 15:03:33 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Felix Manlunas <felix.manlunas@...ium.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        raghu.vatsavayi@...ium.com, derek.chickles@...ium.com,
        satananda.burla@...ium.com, vijaya.guvva@...ium.com
Subject: Re: [PATCH net-next 3/3] liquidio: ethtool support for switchdev
 ports

On Wed, 25 Oct 2017 22:37:35 -0700, Felix Manlunas wrote:
> +static const char lio_vf_rep_stats_strings[][ETH_GSTRING_LEN] = {
> +	"rx_packets",
> +	"tx_packets",
> +	"rx_bytes",
> +	"tx_bytes",
> +	"rx_dropped",
> +	"tx_dropped",
> +};
> +
> [...]
> +
> +static void
> +lio_vf_rep_get_ethtool_stats(struct net_device *ndev,
> +			     struct ethtool_stats *stats,
> +			     u64 *data)
> +{
> +	struct rtnl_link_stats64 *stats_ptr, net_stats;
> +	int i = 0;
> +
> +	stats_ptr = dev_get_stats(ndev, &net_stats);
> +
> +	data[i++] = stats_ptr->rx_packets;
> +	data[i++] = stats_ptr->tx_packets;
> +	data[i++] = stats_ptr->rx_bytes;
> +	data[i++] = stats_ptr->tx_bytes;
> +	data[i++] = stats_ptr->rx_dropped;
> +	data[i++] = stats_ptr->tx_dropped;
> +}

Duplicating basic netdev stats in ethtool is discouraged these days.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ