aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pkt_sched.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-12-08 21:46:45 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-09 13:46:15 -0500
commita73ed26bbae7327370c5bd298f07de78df9e3466 (patch)
tree3c7a04e638261cdd16c324ecd07e303e72fac3b9 /include/linux/pkt_sched.h
parent0221cd51543972782af558c527e4ac58b32049fa (diff)
sch_red: generalize accurate MAX_P support to RED/GRED/CHOKE
Now RED uses a Q0.32 number to store max_p (max probability), allow RED/GRED/CHOKE to use/report full resolution at config/dump time. Old tc binaries are non aware of new attributes, and still set/get Plog. New tc binary set/get both Plog and max_p for backward compatibility, they display "probability value" if they get max_p from new kernels. # tc -d qdisc show dev ... ... qdisc red 10: parent 1:1 limit 360Kb min 30Kb max 90Kb ecn ewma 5 probability 0.09 Scell_log 15 Make sure we avoid potential divides by 0 in reciprocal_value(), if (max_th - min_th) is big. Signed-off-by: Eric Dumazet <eric.dumazet@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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index e41e0d4de24b..8786ea741f52 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -216,6 +216,7 @@ enum {
216 TCA_GRED_PARMS, 216 TCA_GRED_PARMS,
217 TCA_GRED_STAB, 217 TCA_GRED_STAB,
218 TCA_GRED_DPS, 218 TCA_GRED_DPS,
219 TCA_GRED_MAX_P,
219 __TCA_GRED_MAX, 220 __TCA_GRED_MAX,
220}; 221};
221 222
@@ -255,6 +256,7 @@ enum {
255 TCA_CHOKE_UNSPEC, 256 TCA_CHOKE_UNSPEC,
256 TCA_CHOKE_PARMS, 257 TCA_CHOKE_PARMS,
257 TCA_CHOKE_STAB, 258 TCA_CHOKE_STAB,
259 TCA_CHOKE_MAX_P,
258 __TCA_CHOKE_MAX, 260 __TCA_CHOKE_MAX,
259}; 261};
260 262