]> bbs.cooldavid.org Git - net-next-2.6.git/commit - net/core/net-sysfs.c
net: fix 64 bit counters on 32 bit arches
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 7 Jul 2010 21:58:56 +0000 (14:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Jul 2010 21:58:56 +0000 (14:58 -0700)
commit28172739f0a276eb8d6ca917b3974c2edb036da3
treeb1dc00cfa20c209992e247c6f73601f609f9ca3b
parent217d32dc5f299c483ca0d3c8cc6811c72c0339c4
net: fix 64 bit counters on 32 bit arches

There is a small possibility that a reader gets incorrect values on 32
bit arches. SNMP applications could catch incorrect counters when a
32bit high part is changed by another stats consumer/provider.

One way to solve this is to add a rtnl_link_stats64 param to all
ndo_get_stats64() methods, and also add such a parameter to
dev_get_stats().

Rule is that we are not allowed to use dev->stats64 as a temporary
storage for 64bit stats, but a caller provided area (usually on stack)

Old drivers (only providing get_stats() method) need no changes.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 files changed:
arch/s390/appldata/appldata_net_sum.c
drivers/net/bonding/bond_main.c
drivers/net/ixgbe/ixgbe_ethtool.c
drivers/net/loopback.c
drivers/net/macvlan.c
drivers/net/sfc/efx.c
drivers/net/sfc/ethtool.c
drivers/parisc/led.c
drivers/scsi/fcoe/fcoe.c
drivers/staging/batman-adv/hard-interface.c
drivers/usb/gadget/rndis.c
include/linux/netdevice.h
net/8021q/vlan_dev.c
net/8021q/vlanproc.c
net/bridge/br_device.c
net/core/dev.c
net/core/net-sysfs.c
net/core/rtnetlink.c