RE: [PATCH net-next-2.6 2/2] be2net: use stats-sync to read/write 64-bit stats
From: <hidden>
Date: 2011-07-27 05:35:28
-----Original Message----- From: Stephen Hemminger [mailto:shemminger@vyatta.com] Sent: Tuesday, July 26, 2011 8:28 PM On Tue, 26 Jul 2011 10:40:15 +0530 Sathya Perla [off-list ref] wrote:quoted
64-bit stats in be2net are written/read as follows using the stats-sync interface for safe access in 32-bit archs: 64-bit sync writer reader stats ------------------------------------------------------------------------------quoted
tx_stats tx_stats->sync be_xmit be_get_stats64, ethtool tx-compl tx_stats->sync_compl tx-compl-processing ethtool rx-stats rx_stats->sync rx-compl-processing be_get_stats64, ethtool, eqd-update This patch is based on Stephen Hemminger's earlier patch on the sameissue...quoted
Signed-off-by: Sathya Perla <redacted>Is the tx complete stat even worth the effort? does it provide a useful metric? Since rx/tx bytes are already in regular stats, keeping them in ethtool stats is redundant. These are just minor nits, you can ignore this advice if you want.
Stephen, in the 1/2 patch (in this set) I did remove the aggregate rx/tx bytes & pkts from ethtool to avoid duplication. I've retained the *per-ring* stats in ethtool as they are not provided by be_get_stats64(). The per-ring tx-compl stat, has helped on occasion in field debugging.