diff options
author | Eric Dumazet <edumazet@google.com> | 2013-06-06 11:43:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-11 05:51:03 -0400 |
commit | 45203a3b380cee28f570475c0d28c169f908c209 (patch) | |
tree | 9d9b00da9accbc0ea01c91c206cb86a2f9dd7609 /net/sched | |
parent | b41abb42bf62a85a32c41dab873220598a6ee266 (diff) |
net_sched: add 64bit rate estimators
struct gnet_stats_rate_est contains u32 fields, so the bytes per second
field can wrap at 34360Mbit.
Add a new gnet_stats_rate_est64 structure to get 64bit bps/pps fields,
and switch the kernel to use this structure natively.
This structure is dumped to user space as a new attribute :
TCA_STATS_RATE_EST64
Old tc command will now display the capped bps (to 34360Mbit), instead
of wrapped values, and updated tc command will display correct
information.
Old tc command output, after patch :
eric:~# tc -s -d qd sh dev lo
qdisc pfifo 8001: root refcnt 2 limit 1000p
Sent 80868245400 bytes 1978837 pkt (dropped 0, overlimits 0 requeues 0)
rate 34360Mbit 189696pps backlog 0b 0p requeues 0
This patch carefully reorganizes "struct Qdisc" layout to get optimal
performance on SMP.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-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 | ||||
-rw-r--r-- | net/sched/sch_qfq.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 1bc210ffcba2..71a568862557 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -130,7 +130,7 @@ struct cbq_class { | |||
130 | psched_time_t penalized; | 130 | psched_time_t penalized; |
131 | struct gnet_stats_basic_packed 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_est64 rate_est; |
134 | struct tc_cbq_xstats xstats; | 134 | struct tc_cbq_xstats xstats; |
135 | 135 | ||
136 | struct tcf_proto *filter_list; | 136 | struct tcf_proto *filter_list; |
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c index 759b308d1a8d..8302717ea303 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c | |||
@@ -25,7 +25,7 @@ struct drr_class { | |||
25 | 25 | ||
26 | struct gnet_stats_basic_packed bstats; | 26 | struct gnet_stats_basic_packed bstats; |
27 | struct gnet_stats_queue qstats; | 27 | struct gnet_stats_queue qstats; |
28 | struct gnet_stats_rate_est rate_est; | 28 | struct gnet_stats_rate_est64 rate_est; |
29 | struct list_head alist; | 29 | struct list_head alist; |
30 | struct Qdisc *qdisc; | 30 | struct Qdisc *qdisc; |
31 | 31 | ||
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 9facea03faeb..c4075610502c 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c | |||
@@ -114,7 +114,7 @@ struct hfsc_class { | |||
114 | 114 | ||
115 | struct gnet_stats_basic_packed bstats; | 115 | struct gnet_stats_basic_packed bstats; |
116 | struct gnet_stats_queue qstats; | 116 | struct gnet_stats_queue qstats; |
117 | struct gnet_stats_rate_est rate_est; | 117 | struct gnet_stats_rate_est64 rate_est; |
118 | unsigned int level; /* class level in hierarchy */ | 118 | unsigned int level; /* class level in hierarchy */ |
119 | struct tcf_proto *filter_list; /* filter list */ | 119 | struct tcf_proto *filter_list; /* filter list */ |
120 | unsigned int filter_cnt; /* filter count */ | 120 | unsigned int filter_cnt; /* filter count */ |
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index adaedd79389c..162fb800754c 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -78,7 +78,7 @@ struct htb_class { | |||
78 | /* general class parameters */ | 78 | /* general class parameters */ |
79 | struct gnet_stats_basic_packed bstats; | 79 | struct gnet_stats_basic_packed bstats; |
80 | struct gnet_stats_queue qstats; | 80 | struct gnet_stats_queue qstats; |
81 | struct gnet_stats_rate_est rate_est; | 81 | struct gnet_stats_rate_est64 rate_est; |
82 | struct tc_htb_xstats xstats; /* our special stats */ | 82 | struct tc_htb_xstats xstats; /* our special stats */ |
83 | int refcnt; /* usage count of this class */ | 83 | int refcnt; /* usage count of this class */ |
84 | 84 | ||
diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c index d51852bba01c..7c195d972bf0 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c | |||
@@ -138,7 +138,7 @@ struct qfq_class { | |||
138 | 138 | ||
139 | struct gnet_stats_basic_packed bstats; | 139 | struct gnet_stats_basic_packed bstats; |
140 | struct gnet_stats_queue qstats; | 140 | struct gnet_stats_queue qstats; |
141 | struct gnet_stats_rate_est rate_est; | 141 | struct gnet_stats_rate_est64 rate_est; |
142 | struct Qdisc *qdisc; | 142 | struct Qdisc *qdisc; |
143 | struct list_head alist; /* Link for active-classes list. */ | 143 | struct list_head alist; /* Link for active-classes list. */ |
144 | struct qfq_aggregate *agg; /* Parent aggregate. */ | 144 | struct qfq_aggregate *agg; /* Parent aggregate. */ |