aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2011-02-02 10:21:10 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-02 23:52:42 -0500
commit45e144339ac59971eb44be32e1282760aaabe861 (patch)
treeb9d93acb2c1bb505d3b6facc426d307c59dc63a4 /include
parent119b3d386985fcd477b3131190c041516a73f83a (diff)
sched: CHOKe flow scheduler
CHOKe ("CHOose and Kill" or "CHOose and Keep") is an alternative packet scheduler based on the Random Exponential Drop (RED) algorithm. The core idea is: For every packet arrival: Calculate Qave if (Qave < minth) Queue the new packet else Select randomly a packet from the queue if (both packets from same flow) then Drop both the packets else if (Qave > maxth) Drop packet else Admit packet with proability p (same as RED) See also: Rong Pan, Balaji Prabhakar, Konstantinos Psounis, "CHOKe: a stateless active queue management scheme for approximating fair bandwidth allocation", Proceeding of INFOCOM'2000, March 2000. Help from: Eric Dumazet <eric.dumazet@gmail.com> Patrick McHardy <kaber@trash.net> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pkt_sched.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 776cd93d5f7b..d4bb6f58c90c 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -247,6 +247,35 @@ struct tc_gred_sopt {
247 __u16 pad1; 247 __u16 pad1;
248}; 248};
249 249
250/* CHOKe section */
251
252enum {
253 TCA_CHOKE_UNSPEC,
254 TCA_CHOKE_PARMS,
255 TCA_CHOKE_STAB,
256 __TCA_CHOKE_MAX,
257};
258
259#define TCA_CHOKE_MAX (__TCA_CHOKE_MAX - 1)
260
261struct tc_choke_qopt {
262 __u32 limit; /* Hard queue length (packets) */
263 __u32 qth_min; /* Min average threshold (packets) */
264 __u32 qth_max; /* Max average threshold (packets) */
265 unsigned char Wlog; /* log(W) */
266 unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */
267 unsigned char Scell_log; /* cell size for idle damping */
268 unsigned char flags; /* see RED flags */
269};
270
271struct tc_choke_xstats {
272 __u32 early; /* Early drops */
273 __u32 pdrop; /* Drops due to queue limits */
274 __u32 other; /* Drops due to drop() calls */
275 __u32 marked; /* Marked packets */
276 __u32 matched; /* Drops due to flow match */
277};
278
250/* HTB section */ 279/* HTB section */
251#define TC_HTB_NUMPRIO 8 280#define TC_HTB_NUMPRIO 8
252#define TC_HTB_MAXDEPTH 8 281#define TC_HTB_MAXDEPTH 8