sch_htb.c (3eb66e91a25497065c5322b1268cbc3953642227) sch_htb.c (f6bab199315b70fd83fe3ee0947bc84c7a35f3d4)
1/*
2 * net/sched/sch_htb.c Hierarchical token bucket, feed tree version
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 567 unchanged lines hidden (view full) ---

576 htb_deactivate_prios(q, cl);
577 cl->prio_activity = 0;
578}
579
580static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch,
581 struct sk_buff **to_free)
582{
583 int uninitialized_var(ret);
1/*
2 * net/sched/sch_htb.c Hierarchical token bucket, feed tree version
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 567 unchanged lines hidden (view full) ---

576 htb_deactivate_prios(q, cl);
577 cl->prio_activity = 0;
578}
579
580static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch,
581 struct sk_buff **to_free)
582{
583 int uninitialized_var(ret);
584 unsigned int len = qdisc_pkt_len(skb);
584 struct htb_sched *q = qdisc_priv(sch);
585 struct htb_class *cl = htb_classify(skb, sch, &ret);
586
587 if (cl == HTB_DIRECT) {
588 /* enqueue to helper queue */
589 if (q->direct_queue.qlen < q->direct_qlen) {
590 __qdisc_enqueue_tail(skb, &q->direct_queue);
591 q->direct_pkts++;

--- 13 unchanged lines hidden (view full) ---

605 qdisc_qstats_drop(sch);
606 cl->drops++;
607 }
608 return ret;
609 } else {
610 htb_activate(q, cl);
611 }
612
585 struct htb_sched *q = qdisc_priv(sch);
586 struct htb_class *cl = htb_classify(skb, sch, &ret);
587
588 if (cl == HTB_DIRECT) {
589 /* enqueue to helper queue */
590 if (q->direct_queue.qlen < q->direct_qlen) {
591 __qdisc_enqueue_tail(skb, &q->direct_queue);
592 q->direct_pkts++;

--- 13 unchanged lines hidden (view full) ---

606 qdisc_qstats_drop(sch);
607 cl->drops++;
608 }
609 return ret;
610 } else {
611 htb_activate(q, cl);
612 }
613
613 qdisc_qstats_backlog_inc(sch, skb);
614 sch->qstats.backlog += len;
614 sch->q.qlen++;
615 return NET_XMIT_SUCCESS;
616}
617
618static inline void htb_accnt_tokens(struct htb_class *cl, int bytes, s64 diff)
619{
620 s64 toks = diff + cl->tokens;
621

--- 984 unchanged lines hidden ---
615 sch->q.qlen++;
616 return NET_XMIT_SUCCESS;
617}
618
619static inline void htb_accnt_tokens(struct htb_class *cl, int bytes, s64 diff)
620{
621 s64 toks = diff + cl->tokens;
622

--- 984 unchanged lines hidden ---