aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pkt_sched.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2012-01-04 09:18:38 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-05 14:01:21 -0500
commit18cb809850fb499ad9bf288696a95f4071f73931 (patch)
tree6f6c7c836176385baf0f185b6f5b4092e9ac1fdf /include/linux/pkt_sched.h
parent23021c21055f88a428b6deb6f803fa0d659e023f (diff)
net_sched: sfq: extend limits
SFQ as implemented in Linux is very limited, with at most 127 flows and limit of 127 packets. [ So if 127 flows are active, we have one packet per flow ] This patch brings to SFQ following features to cope with modern needs. - Ability to specify a smaller per flow limit of inflight packets. (default value being at 127 packets) - Ability to have up to 65408 active flows (instead of 127) - Ability to have head drops instead of tail drops (to drop old packets from a flow) Example of use : No more than 20 packets per flow, max 8000 flows, max 20000 packets in SFQ qdisc, hash table of 65536 slots. tc qdisc add ... sfq \ flows 8000 \ depth 20 \ headdrop \ limit 20000 \ divisor 65536 Ram usage : 2 bytes per hash table entry (instead of previous 1 byte/entry) 32 bytes per flow on 64bit arches, instead of 384 for QFQ, so much better cache hit ratio. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Dave Taht <dave.taht@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/pkt_sched.h')
-rw-r--r--include/linux/pkt_sched.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 8daced32a014..8f1b928f777c 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -162,19 +162,17 @@ struct tc_sfq_qopt {
162 unsigned flows; /* Maximal number of flows */ 162 unsigned flows; /* Maximal number of flows */
163}; 163};
164 164
165struct tc_sfq_qopt_v1 {
166 struct tc_sfq_qopt v0;
167 unsigned int depth; /* max number of packets per flow */
168 unsigned int headdrop;
169};
170
171
165struct tc_sfq_xstats { 172struct tc_sfq_xstats {
166 __s32 allot; 173 __s32 allot;
167}; 174};
168 175
169/*
170 * NOTE: limit, divisor and flows are hardwired to code at the moment.
171 *
172 * limit=flows=128, divisor=1024;
173 *
174 * The only reason for this is efficiency, it is possible
175 * to change these parameters in compile time.
176 */
177
178/* RED section */ 176/* RED section */
179 177
180enum { 178enum {