mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
net: restore gnet_stats_basic to previous definition
In 5e140dfc1f "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 <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
c6ba973b8f
commit
c1a8f1f1c8
13 changed files with 33 additions and 23 deletions
|
|
@ -49,7 +49,7 @@ struct atm_flow_data {
|
|||
struct socket *sock; /* for closing */
|
||||
u32 classid; /* x:y type ID */
|
||||
int ref; /* reference count */
|
||||
struct gnet_stats_basic bstats;
|
||||
struct gnet_stats_basic_packed bstats;
|
||||
struct gnet_stats_queue qstats;
|
||||
struct atm_flow_data *next;
|
||||
struct atm_flow_data *excess; /* flow for excess traffic;
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ struct cbq_class
|
|||
long avgidle;
|
||||
long deficit; /* Saved deficit for WRR */
|
||||
psched_time_t penalized;
|
||||
struct gnet_stats_basic bstats;
|
||||
struct gnet_stats_basic_packed bstats;
|
||||
struct gnet_stats_queue qstats;
|
||||
struct gnet_stats_rate_est rate_est;
|
||||
struct tc_cbq_xstats xstats;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ struct drr_class {
|
|||
unsigned int refcnt;
|
||||
unsigned int filter_cnt;
|
||||
|
||||
struct gnet_stats_basic bstats;
|
||||
struct gnet_stats_basic_packed bstats;
|
||||
struct gnet_stats_queue qstats;
|
||||
struct gnet_stats_rate_est rate_est;
|
||||
struct list_head alist;
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ struct hfsc_class
|
|||
struct Qdisc_class_common cl_common;
|
||||
unsigned int refcnt; /* usage count */
|
||||
|
||||
struct gnet_stats_basic bstats;
|
||||
struct gnet_stats_basic_packed bstats;
|
||||
struct gnet_stats_queue qstats;
|
||||
struct gnet_stats_rate_est rate_est;
|
||||
unsigned int level; /* class level in hierarchy */
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ enum htb_cmode {
|
|||
struct htb_class {
|
||||
struct Qdisc_class_common common;
|
||||
/* general class parameters */
|
||||
struct gnet_stats_basic bstats;
|
||||
struct gnet_stats_basic_packed bstats;
|
||||
struct gnet_stats_queue qstats;
|
||||
struct gnet_stats_rate_est rate_est;
|
||||
struct tc_htb_xstats xstats; /* our special stats */
|
||||
|
|
|
|||
Loading…
Reference in a new issue