aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_htb.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:25:16 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:20:08 -0500
commit10297b99315e5e08fe623ba56da35db1fee69ba9 (patch)
tree06cfd5434ad5d4cb9dd8e0715716da0abd52849c /net/sched/sch_htb.c
parent7612713fb69a17b79ca7d757df4446700f4afe6c (diff)
[NET] SCHED: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r--net/sched/sch_htb.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 15f23c5511a8..1f098d862f92 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -11,7 +11,7 @@
11 * Credits (in time order) for older HTB versions: 11 * Credits (in time order) for older HTB versions:
12 * Stef Coene <stef.coene@docum.org> 12 * Stef Coene <stef.coene@docum.org>
13 * HTB support at LARTC mailing list 13 * HTB support at LARTC mailing list
14 * Ondrej Kraus, <krauso@barr.cz> 14 * Ondrej Kraus, <krauso@barr.cz>
15 * found missing INIT_QDISC(htb) 15 * found missing INIT_QDISC(htb)
16 * Vladimir Smelhaus, Aamer Akhter, Bert Hubert 16 * Vladimir Smelhaus, Aamer Akhter, Bert Hubert
17 * helped a lot to locate nasty class stall bug 17 * helped a lot to locate nasty class stall bug
@@ -59,11 +59,11 @@
59 Author: devik@cdi.cz 59 Author: devik@cdi.cz
60 ======================================================================== 60 ========================================================================
61 HTB is like TBF with multiple classes. It is also similar to CBQ because 61 HTB is like TBF with multiple classes. It is also similar to CBQ because
62 it allows to assign priority to each class in hierarchy. 62 it allows to assign priority to each class in hierarchy.
63 In fact it is another implementation of Floyd's formal sharing. 63 In fact it is another implementation of Floyd's formal sharing.
64 64
65 Levels: 65 Levels:
66 Each class is assigned level. Leaf has ALWAYS level 0 and root 66 Each class is assigned level. Leaf has ALWAYS level 0 and root
67 classes have level TC_HTB_MAXDEPTH-1. Interior nodes has level 67 classes have level TC_HTB_MAXDEPTH-1. Interior nodes has level
68 one less than their parent. 68 one less than their parent.
69*/ 69*/
@@ -245,7 +245,7 @@ static inline struct htb_class *htb_find(u32 handle, struct Qdisc *sch)
245 * We allow direct class selection by classid in priority. The we examine 245 * We allow direct class selection by classid in priority. The we examine
246 * filters in qdisc and in inner nodes (if higher filter points to the inner 246 * filters in qdisc and in inner nodes (if higher filter points to the inner
247 * node). If we end up with classid MAJOR:0 we enqueue the skb into special 247 * node). If we end up with classid MAJOR:0 we enqueue the skb into special
248 * internal fifo (direct). These packets then go directly thru. If we still 248 * internal fifo (direct). These packets then go directly thru. If we still
249 * have no valid leaf we try to use MAJOR:default leaf. It still unsuccessfull 249 * have no valid leaf we try to use MAJOR:default leaf. It still unsuccessfull
250 * then finish and return direct queue. 250 * then finish and return direct queue.
251 */ 251 */
@@ -433,7 +433,7 @@ static inline void htb_remove_class_from_row(struct htb_sched *q,
433 * htb_activate_prios - creates active classe's feed chain 433 * htb_activate_prios - creates active classe's feed chain
434 * 434 *
435 * The class is connected to ancestors and/or appropriate rows 435 * The class is connected to ancestors and/or appropriate rows
436 * for priorities it is participating on. cl->cmode must be new 436 * for priorities it is participating on. cl->cmode must be new
437 * (activated) mode. It does nothing if cl->prio_activity == 0. 437 * (activated) mode. It does nothing if cl->prio_activity == 0.
438 */ 438 */
439static void htb_activate_prios(struct htb_sched *q, struct htb_class *cl) 439static void htb_activate_prios(struct htb_sched *q, struct htb_class *cl)
@@ -466,7 +466,7 @@ static void htb_activate_prios(struct htb_sched *q, struct htb_class *cl)
466/** 466/**
467 * htb_deactivate_prios - remove class from feed chain 467 * htb_deactivate_prios - remove class from feed chain
468 * 468 *
469 * cl->cmode must represent old mode (before deactivation). It does 469 * cl->cmode must represent old mode (before deactivation). It does
470 * nothing if cl->prio_activity == 0. Class is removed from all feed 470 * nothing if cl->prio_activity == 0. Class is removed from all feed
471 * chains and rows. 471 * chains and rows.
472 */ 472 */
@@ -524,9 +524,9 @@ static inline long htb_hiwater(const struct htb_class *cl)
524 * 524 *
525 * It computes cl's mode at time cl->t_c+diff and returns it. If mode 525 * It computes cl's mode at time cl->t_c+diff and returns it. If mode
526 * is not HTB_CAN_SEND then cl->pq_key is updated to time difference 526 * is not HTB_CAN_SEND then cl->pq_key is updated to time difference
527 * from now to time when cl will change its state. 527 * from now to time when cl will change its state.
528 * Also it is worth to note that class mode doesn't change simply 528 * Also it is worth to note that class mode doesn't change simply
529 * at cl->{c,}tokens == 0 but there can rather be hysteresis of 529 * at cl->{c,}tokens == 0 but there can rather be hysteresis of
530 * 0 .. -cl->{c,}buffer range. It is meant to limit number of 530 * 0 .. -cl->{c,}buffer range. It is meant to limit number of
531 * mode transitions per time unit. The speed gain is about 1/6. 531 * mode transitions per time unit. The speed gain is about 1/6.
532 */ 532 */
@@ -575,7 +575,7 @@ htb_change_class_mode(struct htb_sched *q, struct htb_class *cl, long *diff)
575} 575}
576 576
577/** 577/**
578 * htb_activate - inserts leaf cl into appropriate active feeds 578 * htb_activate - inserts leaf cl into appropriate active feeds
579 * 579 *
580 * Routine learns (new) priority of leaf and activates feed chain 580 * Routine learns (new) priority of leaf and activates feed chain
581 * for the prio. It can be called on already active leaf safely. 581 * for the prio. It can be called on already active leaf safely.
@@ -594,7 +594,7 @@ static inline void htb_activate(struct htb_sched *q, struct htb_class *cl)
594} 594}
595 595
596/** 596/**
597 * htb_deactivate - remove leaf cl from active feeds 597 * htb_deactivate - remove leaf cl from active feeds
598 * 598 *
599 * Make sure that leaf is active. In the other words it can't be called 599 * Make sure that leaf is active. In the other words it can't be called
600 * with non-active leaf. It also removes class from the drop list. 600 * with non-active leaf. It also removes class from the drop list.
@@ -854,7 +854,7 @@ static struct htb_class *htb_lookup_leaf(struct rb_root *tree, int prio,
854 854
855 for (i = 0; i < 65535; i++) { 855 for (i = 0; i < 65535; i++) {
856 if (!*sp->pptr && *sp->pid) { 856 if (!*sp->pptr && *sp->pid) {
857 /* ptr was invalidated but id is valid - try to recover 857 /* ptr was invalidated but id is valid - try to recover
858 the original or next ptr */ 858 the original or next ptr */
859 *sp->pptr = 859 *sp->pptr =
860 htb_id_find_next_upper(prio, sp->root, *sp->pid); 860 htb_id_find_next_upper(prio, sp->root, *sp->pid);
@@ -906,7 +906,7 @@ next:
906 906
907 /* class can be empty - it is unlikely but can be true if leaf 907 /* class can be empty - it is unlikely but can be true if leaf
908 qdisc drops packets in enqueue routine or if someone used 908 qdisc drops packets in enqueue routine or if someone used
909 graft operation on the leaf since last dequeue; 909 graft operation on the leaf since last dequeue;
910 simply deactivate and skip such class */ 910 simply deactivate and skip such class */
911 if (unlikely(cl->un.leaf.q->q.qlen == 0)) { 911 if (unlikely(cl->un.leaf.q->q.qlen == 0)) {
912 struct htb_class *next; 912 struct htb_class *next;
@@ -1229,7 +1229,7 @@ static int htb_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
1229 if (cl && !cl->level) { 1229 if (cl && !cl->level) {
1230 if (new == NULL && 1230 if (new == NULL &&
1231 (new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, 1231 (new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops,
1232 cl->classid)) 1232 cl->classid))
1233 == NULL) 1233 == NULL)
1234 return -ENOBUFS; 1234 return -ENOBUFS;
1235 sch_tree_lock(sch); 1235 sch_tree_lock(sch);
@@ -1347,7 +1347,7 @@ static void htb_destroy(struct Qdisc *sch)
1347 del_timer_sync(&q->rttim); 1347 del_timer_sync(&q->rttim);
1348#endif 1348#endif
1349 /* This line used to be after htb_destroy_class call below 1349 /* This line used to be after htb_destroy_class call below
1350 and surprisingly it worked in 2.4. But it must precede it 1350 and surprisingly it worked in 2.4. But it must precede it
1351 because filter need its target class alive to be able to call 1351 because filter need its target class alive to be able to call
1352 unbind_filter on it (without Oops). */ 1352 unbind_filter on it (without Oops). */
1353 htb_destroy_filters(&q->filter_list); 1353 htb_destroy_filters(&q->filter_list);