]> git.baikalelectronics.ru Git - kernel.git/commit
net: restore gnet_stats_basic to previous definition
authorEric Dumazet <eric.dumazet@gmail.com>
Sun, 16 Aug 2009 09:36:49 +0000 (09:36 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Aug 2009 04:33:49 +0000 (21:33 -0700)
commitf0a9871cf461ee54368d7f7e7ce4bfb933eeae80
tree0679f709f70d9a91850888636a28adb79940c402
parentf44cf7a5a326c1313fb35bc849fd912efc1dd1bd
net: restore gnet_stats_basic to previous definition

In 3064a54a773f5c0e56e7be230a4f74aa12bab832 "net: reorder struct Qdisc
for better SMP performance" the definition of struct gnet_stats_basic
changed incompatibly, as copies of this struct are shipped to
userland via netlink.

Restoring old behavior is not welcome, for performance reason.

Fix is to use a private structure for kernel, and
teach gnet_stats_copy_basic() to convert from kernel to user land,
using legacy structure (struct gnet_stats_basic)

Based on a report and initial patch from Michael Spang.

Reported-by: Michael Spang <mspang@csclub.uwaterloo.ca>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 files changed:
include/linux/gen_stats.h
include/net/act_api.h
include/net/gen_stats.h
include/net/netfilter/xt_rateest.h
include/net/sch_generic.h
net/core/gen_estimator.c
net/core/gen_stats.c
net/netfilter/xt_RATEEST.c
net/sched/sch_atm.c
net/sched/sch_cbq.c
net/sched/sch_drr.c
net/sched/sch_hfsc.c
net/sched/sch_htb.c