diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2008-12-04 00:16:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-04 00:16:58 -0500 |
commit | 23cb913d25b20ed88b36a26f337cfdb4605e63f4 (patch) | |
tree | f7dafffe6f915bf2b808781b0447cc5c331813b7 | |
parent | 244ef9b9176c7c7a095f4738d353a3a60b88097d (diff) |
pkt_sched: sch_htb: Remove L2T()
L2T() is currently used only in one place (and has one spurious
parameter, btw), so let's: 'get rid of L2T completely, and just
use "qdisc_l2t(rate, size)" directly.' - quote & feedback from
David S. Miller.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/sched/sch_htb.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 80cb94d9c299..fcd06e29e8b3 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -125,13 +125,6 @@ struct htb_class { | |||
125 | psched_time_t t_c; /* checkpoint time */ | 125 | psched_time_t t_c; /* checkpoint time */ |
126 | }; | 126 | }; |
127 | 127 | ||
128 | static inline long L2T(struct htb_class *cl, struct qdisc_rate_table *rate, | ||
129 | int size) | ||
130 | { | ||
131 | long result = qdisc_l2t(rate, size); | ||
132 | return result; | ||
133 | } | ||
134 | |||
135 | struct htb_sched { | 128 | struct htb_sched { |
136 | struct Qdisc_class_hash clhash; | 129 | struct Qdisc_class_hash clhash; |
137 | struct list_head drops[TC_HTB_NUMPRIO];/* active leaves (for drops) */ | 130 | struct list_head drops[TC_HTB_NUMPRIO];/* active leaves (for drops) */ |
@@ -604,7 +597,7 @@ static void htb_charge_class(struct htb_sched *q, struct htb_class *cl, | |||
604 | 597 | ||
605 | #define HTB_ACCNT(T,B,R) toks = diff + cl->T; \ | 598 | #define HTB_ACCNT(T,B,R) toks = diff + cl->T; \ |
606 | if (toks > cl->B) toks = cl->B; \ | 599 | if (toks > cl->B) toks = cl->B; \ |
607 | toks -= L2T(cl, cl->R, bytes); \ | 600 | toks -= (long) qdisc_l2t(cl->R, bytes); \ |
608 | if (toks <= -cl->mbuffer) toks = 1-cl->mbuffer; \ | 601 | if (toks <= -cl->mbuffer) toks = 1-cl->mbuffer; \ |
609 | cl->T = toks | 602 | cl->T = toks |
610 | 603 | ||