Skip to content

Commit

Permalink
pkt_sched: sch_htb: Remove L2T()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Dec 4, 2008
1 parent 244ef9b commit 23cb913
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions net/sched/sch_htb.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,6 @@ struct htb_class {
psched_time_t t_c; /* checkpoint time */
};

static inline long L2T(struct htb_class *cl, struct qdisc_rate_table *rate,
int size)
{
long result = qdisc_l2t(rate, size);
return result;
}

struct htb_sched {
struct Qdisc_class_hash clhash;
struct list_head drops[TC_HTB_NUMPRIO];/* active leaves (for drops) */
Expand Down Expand Up @@ -604,7 +597,7 @@ static void htb_charge_class(struct htb_sched *q, struct htb_class *cl,

#define HTB_ACCNT(T,B,R) toks = diff + cl->T; \
if (toks > cl->B) toks = cl->B; \
toks -= L2T(cl, cl->R, bytes); \
toks -= (long) qdisc_l2t(cl->R, bytes); \
if (toks <= -cl->mbuffer) toks = 1-cl->mbuffer; \
cl->T = toks

Expand Down

0 comments on commit 23cb913

Please sign in to comment.