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:	Mon, 05 Mar 2012 05:32:06 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Junchang Wang <junchangwang@...il.com>
Cc:	davem@...emloft.net, greearb@...delatech.com, adobriyan@...il.com,
	jasowang@...hat.com, joe@...ches.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] 8139too: Add 64bit statistics

Le lundi 05 mars 2012 à 19:33 +0800, Junchang Wang a écrit :
> Switch to use ndo_get_stats64 to get 64bit statistics.
> Two sync entries are used (one for Rx and one for Tx).
> 
> Signed-off-by: Junchang Wang <junchangwang@...il.com>
> ---

...

> +	stats->rx_errors	= dev->stats.rx_errors;
> +	stats->tx_errors	= dev->stats.tx_errors;
> +	stats->rx_dropped	= dev->stats.rx_dropped;
> +	stats->tx_dropped	= dev->stats.tx_dropped;
> +	stats->collisions	= dev->stats.collisions;
> +
> +	stats->rx_length_errors = dev->stats.rx_length_errors;
> +	stats->rx_crc_errors	= dev->stats.rx_crc_errors;
> +	stats->rx_frame_errors	= dev->stats.rx_frame_errors;
> +	stats->rx_fifo_errors	= dev->stats.rx_fifo_errors;
> +	stats->rx_missed_errors	= dev->stats.rx_missed_errors;
> +
> +	stats->tx_aborted_errors = dev->stats.tx_aborted_errors;
> +	stats->tx_carrier_errors = dev->stats.tx_carrier_errors;
> +	stats->tx_fifo_errors	= dev->stats.tx_fifo_errors;
> +	stats->tx_window_errors = dev->stats.tx_window_errors;
> +
> +	return stats;
>  }
>  

Maybe its time to export netdev_stats_to_stats64() after all, to avoid
all this duplicate code.

I'll submit a patch.

Could you repost this after netdev_stats_to_stats64() being available to
drivers ?

Thanks



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ