linux-stable/net
Ben Hutchings 3cfde79c6c net: Get rid of rtnl_link_stats64 / net_device_stats union
In commit be1f3c2c02 "net: Enable 64-bit
net device statistics on 32-bit architectures" I redefined struct
net_device_stats so that it could be used in a union with struct
rtnl_link_stats64, avoiding the need for explicit copying or
conversion between the two.  However, this is unsafe because there is
no locking required and no lock consistently held around calls to
dev_get_stats() and use of the statistics structure it returns.

In commit 28172739f0 "net: fix 64 bit
counters on 32 bit arches" Eric Dumazet dealt with that problem by
requiring callers of dev_get_stats() to provide storage for the
result.  This means that the net_device::stats64 field and the padding
in struct net_device_stats are now redundant, so remove them.

Update the comment on net_device_ops::ndo_get_stats64 to reflect its
new usage.

Change dev_txq_stats_fold() to use struct rtnl_link_stats64, since
that is what all its callers are really using and it is no longer
going to be compatible with struct net_device_stats.

Eric Dumazet suggested the separate function for the structure
conversion.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-09 17:41:56 -07:00
..
9p
802
8021q net: Get rid of rtnl_link_stats64 / net_device_stats union 2010-07-09 17:41:56 -07:00
appletalk
atm atm/br2684: register notifier event for carrier signal changes. 2010-07-09 00:09:21 -07:00
ax25
bluetooth Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-07-07 15:59:38 -07:00
bridge Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-07-07 15:59:38 -07:00
caif caif: Kconfig and Makefile fixes 2010-06-29 00:06:38 -07:00
can
core net: Get rid of rtnl_link_stats64 / net_device_stats union 2010-07-09 17:41:56 -07:00
dcb
dccp snmp: add align parameter to snmp_mib_init() 2010-06-25 21:33:17 -07:00
decnet net-next: remove useless union keyword 2010-06-10 23:31:35 -07:00
dsa
econet econet: fix locking 2010-06-11 18:37:08 -07:00
ethernet net-next: remove useless union keyword 2010-06-10 23:31:35 -07:00
ieee802154
ipv4 gre: propagate ipv6 transport class 2010-07-08 21:35:58 -07:00
ipv6 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-07-07 15:59:38 -07:00
ipx
irda irttp: Print device parameters and statistics as unsigned 2010-06-12 18:18:33 -07:00
iucv net: use __packed annotation 2010-06-03 03:21:52 -07:00
key
l2tp net-next: remove useless union keyword 2010-06-10 23:31:35 -07:00
lapb
llc
mac80211 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2010-07-01 17:34:14 -07:00
netfilter Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6 2010-07-02 22:42:06 -07:00
netlabel
netlink af_netlink: Add needed scm_destroy after scm_send. 2010-06-16 14:55:56 -07:00
netrom
packet packet_mmap: expose hw packet timestamps to network packet capture utilities 2010-06-02 05:53:56 -07:00
phonet phonet: use call_rcu for phonet device free 2010-06-09 16:14:25 -07:00
rds
rfkill
rose
rxrpc net-next: remove useless union keyword 2010-06-10 23:31:35 -07:00
sched act_nat: use stack variable 2010-06-30 12:12:37 -07:00
sctp snmp: add align parameter to snmp_mib_init() 2010-06-25 21:33:17 -07:00
sunrpc
tipc
unix af_unix: Allow connecting to sockets in other network namespaces. 2010-06-16 14:58:17 -07:00
wanrouter
wimax
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2010-07-01 17:34:14 -07:00
x25
xfrm Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-07-07 15:59:38 -07:00
compat.c From abbffa2aa9bd6f8df16d0d0a102af677510d8b9a Mon Sep 17 00:00:00 2001 2010-06-03 20:03:40 -07:00
Kconfig
Makefile net/Makefile: conditionally descend to wireless and ieee802154 2010-06-29 15:32:43 -07:00
nonet.c
socket.c From abbffa2aa9bd6f8df16d0d0a102af677510d8b9a Mon Sep 17 00:00:00 2001 2010-06-03 20:03:40 -07:00
sysctl_net.c
TUNABLE