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>
Showing
- arch/s390/appldata/appldata_net_sum.c 2 additions, 1 deletionarch/s390/appldata/appldata_net_sum.c
- drivers/net/bonding/bond_main.c 31 additions, 33 deletionsdrivers/net/bonding/bond_main.c
- drivers/net/ixgbe/ixgbe_ethtool.c 5 additions, 3 deletionsdrivers/net/ixgbe/ixgbe_ethtool.c
- drivers/net/loopback.c 2 additions, 2 deletionsdrivers/net/loopback.c
- drivers/net/macvlan.c 3 additions, 3 deletionsdrivers/net/macvlan.c
- drivers/net/sfc/efx.c 1 addition, 2 deletionsdrivers/net/sfc/efx.c
- drivers/net/sfc/ethtool.c 2 additions, 1 deletiondrivers/net/sfc/ethtool.c
- drivers/parisc/led.c 2 additions, 1 deletiondrivers/parisc/led.c
- drivers/scsi/fcoe/fcoe.c 2 additions, 1 deletiondrivers/scsi/fcoe/fcoe.c
- drivers/staging/batman-adv/hard-interface.c 2 additions, 1 deletiondrivers/staging/batman-adv/hard-interface.c
- drivers/usb/gadget/rndis.c 2 additions, 1 deletiondrivers/usb/gadget/rndis.c
- include/linux/netdevice.h 8 additions, 4 deletionsinclude/linux/netdevice.h
- net/8021q/vlan_dev.c 2 additions, 4 deletionsnet/8021q/vlan_dev.c
- net/8021q/vlanproc.c 2 additions, 1 deletionnet/8021q/vlanproc.c
- net/bridge/br_device.c 2 additions, 2 deletionsnet/bridge/br_device.c
- net/core/dev.c 16 additions, 9 deletionsnet/core/dev.c
- net/core/net-sysfs.c 3 additions, 1 deletionnet/core/net-sysfs.c
- net/core/rtnetlink.c 2 additions, 1 deletionnet/core/rtnetlink.c
Loading
Please register or sign in to comment