--- linux-2.6.15.4-orig/include/linux/pkt_sched.h 2006-02-10 08:22:48.000000000 +0100 +++ linux-2.6.15.4/include/linux/pkt_sched.h 2006-03-01 20:12:01.000000000 +0100 @@ -78,7 +78,7 @@ struct tc_ratespec unsigned char cell_log; unsigned char __reserved; unsigned short feature; - short addend; + unsigned short overhead; unsigned short mpu; __u32 rate; }; --- linux-2.6.15.4-orig/net/sched/sch_htb.c 2006-02-10 08:22:48.000000000 +0100 +++ linux-2.6.15.4/net/sched/sch_htb.c 2006-03-01 20:12:01.000000000 +0100 @@ -206,7 +206,8 @@ struct htb_class static __inline__ long L2T(struct htb_class *cl,struct qdisc_rate_table *rate, int size) { - int slot = size >> rate->rate.cell_log; + int overhead = rate->rate.overhead; + int slot = (size-1+overhead) >> rate->rate.cell_log; if (slot > 255) { cl->xstats.giants++; slot = 255;