diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-08-16 05:36:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-18 00:33:49 -0400 |
commit | c1a8f1f1c8e01eab5862c8db39b49ace814e6c66 (patch) | |
tree | 0679f709f70d9a91850888636a28adb79940c402 /net/sched | |
parent | c6ba973b8fa97422aab4204f7d79f1d413cde925 (diff) |
net: restore gnet_stats_basic to previous definition
In 5e140dfc1fe87eae27846f193086724806b33c7d "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>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_atm.c | 2 | ||||
-rw-r--r-- | net/sched/sch_cbq.c | 2 | ||||
-rw-r--r-- | net/sched/sch_drr.c | 2 | ||||
-rw-r--r-- | net/sched/sch_hfsc.c | 2 | ||||
-rw-r--r-- | net/sched/sch_htb.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 2a8b83af7c47..ab82f145f689 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c | |||
@@ -49,7 +49,7 @@ struct atm_flow_data { | |||
49 | struct socket *sock; /* for closing */ | 49 | struct socket *sock; /* for closing */ |
50 | u32 classid; /* x:y type ID */ | 50 | u32 classid; /* x:y type ID */ |
51 | int ref; /* reference count */ | 51 | int ref; /* reference count */ |
52 | struct gnet_stats_basic bstats; | 52 | struct gnet_stats_basic_packed bstats; |
53 | struct gnet_stats_queue qstats; | 53 | struct gnet_stats_queue qstats; |
54 | struct atm_flow_data *next; | 54 | struct atm_flow_data *next; |
55 | struct atm_flow_data *excess; /* flow for excess traffic; | 55 | struct atm_flow_data *excess; /* flow for excess traffic; |
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 23a167670fd5..d5798e17a832 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -128,7 +128,7 @@ struct cbq_class | |||
128 | long avgidle; | 128 | long avgidle; |
129 | long deficit; /* Saved deficit for WRR */ | 129 | long deficit; /* Saved deficit for WRR */ |
130 | psched_time_t penalized; | 130 | psched_time_t penalized; |
131 | struct gnet_stats_basic bstats; | 131 | struct gnet_stats_basic_packed bstats; |
132 | struct gnet_stats_queue qstats; | 132 | struct gnet_stats_queue qstats; |
133 | struct gnet_stats_rate_est rate_est; | 133 | struct gnet_stats_rate_est rate_est; |
134 | struct tc_cbq_xstats xstats; | 134 | struct tc_cbq_xstats xstats; |
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c index 7597fe146866..12b2fb04b29b 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c | |||
@@ -22,7 +22,7 @@ struct drr_class { | |||
22 | unsigned int refcnt; | 22 | unsigned int refcnt; |
23 | unsigned int filter_cnt; | 23 | unsigned int filter_cnt; |
24 | 24 | ||
25 | struct gnet_stats_basic bstats; | 25 | struct gnet_stats_basic_packed bstats; |
26 | struct gnet_stats_queue qstats; | 26 | struct gnet_stats_queue qstats; |
27 | struct gnet_stats_rate_est rate_est; | 27 | struct gnet_stats_rate_est rate_est; |
28 | struct list_head alist; | 28 | struct list_head alist; |
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 362c2811b2df..dad0144423da 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c | |||
@@ -116,7 +116,7 @@ struct hfsc_class | |||
116 | struct Qdisc_class_common cl_common; | 116 | struct Qdisc_class_common cl_common; |
117 | unsigned int refcnt; /* usage count */ | 117 | unsigned int refcnt; /* usage count */ |
118 | 118 | ||
119 | struct gnet_stats_basic bstats; | 119 | struct gnet_stats_basic_packed bstats; |
120 | struct gnet_stats_queue qstats; | 120 | struct gnet_stats_queue qstats; |
121 | struct gnet_stats_rate_est rate_est; | 121 | struct gnet_stats_rate_est rate_est; |
122 | unsigned int level; /* class level in hierarchy */ | 122 | unsigned int level; /* class level in hierarchy */ |
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 88cd02626621..ec4d46399d59 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -74,7 +74,7 @@ enum htb_cmode { | |||
74 | struct htb_class { | 74 | struct htb_class { |
75 | struct Qdisc_class_common common; | 75 | struct Qdisc_class_common common; |
76 | /* general class parameters */ | 76 | /* general class parameters */ |
77 | struct gnet_stats_basic bstats; | 77 | struct gnet_stats_basic_packed bstats; |
78 | struct gnet_stats_queue qstats; | 78 | struct gnet_stats_queue qstats; |
79 | struct gnet_stats_rate_est rate_est; | 79 | struct gnet_stats_rate_est rate_est; |
80 | struct tc_htb_xstats xstats; /* our special stats */ | 80 | struct tc_htb_xstats xstats; /* our special stats */ |