diff -Naur -p linux-2.6.15.4-orig/include/linux/pkt_sched.h linux-2.6.15.4/include/linux/pkt_sched.h --- 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; }; diff -Naur -p linux-2.6.15.4-orig/net/sched/police.c linux-2.6.15.4/net/sched/police.c --- linux-2.6.15.4-orig/net/sched/police.c 2006-02-10 08:22:48.000000000 +0100 +++ linux-2.6.15.4/net/sched/police.c 2006-03-01 20:12:47.000000000 +0100 @@ -33,8 +33,8 @@ #include #include -#define L2T(p,L) ((p)->R_tab->data[(L)>>(p)->R_tab->rate.cell_log]) -#define L2T_P(p,L) ((p)->P_tab->data[(L)>>(p)->P_tab->rate.cell_log]) +#define L2T(p,L) ((p)->R_tab->data[((L)-1+(p)->R_tab->rate.overhead)>>(p)->R_tab->rate.cell_log]) +#define L2T_P(p,L) ((p)->P_tab->data[((L)-1+(p)->P_tab->rate.overhead)>>(p)->P_tab->rate.cell_log]) #define PRIV(a) ((struct tcf_police *) (a)->priv) /* use generic hash table */ diff -Naur -p linux-2.6.15.4-orig/net/sched/sch_cbq.c linux-2.6.15.4/net/sched/sch_cbq.c --- linux-2.6.15.4-orig/net/sched/sch_cbq.c 2006-02-10 08:22:48.000000000 +0100 +++ linux-2.6.15.4/net/sched/sch_cbq.c 2006-03-01 20:12:01.000000000 +0100 @@ -193,7 +193,7 @@ struct cbq_sched_data }; -#define L2T(cl,len) ((cl)->R_tab->data[(len)>>(cl)->R_tab->rate.cell_log]) +#define L2T(cl,len) ((cl)->R_tab->data[((len)-1+(cl)->R_tab->rate.overhead)>>(cl)->R_tab->rate.cell_log]) static __inline__ unsigned cbq_hash(u32 h) diff -Naur -p linux-2.6.15.4-orig/net/sched/sch_htb.c linux-2.6.15.4/net/sched/sch_htb.c --- 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; diff -Naur -p linux-2.6.15.4-orig/net/sched/sch_tbf.c linux-2.6.15.4/net/sched/sch_tbf.c --- linux-2.6.15.4-orig/net/sched/sch_tbf.c 2006-02-10 08:22:48.000000000 +0100 +++ linux-2.6.15.4/net/sched/sch_tbf.c 2006-03-01 20:12:01.000000000 +0100 @@ -132,8 +132,8 @@ struct tbf_sched_data struct Qdisc *qdisc; /* Inner qdisc, default - bfifo queue */ }; -#define L2T(q,L) ((q)->R_tab->data[(L)>>(q)->R_tab->rate.cell_log]) -#define L2T_P(q,L) ((q)->P_tab->data[(L)>>(q)->P_tab->rate.cell_log]) +#define L2T(q,L) ((q)->R_tab->data[((L)-1+(q)->R_tab->rate.overhead)>>(q)->R_tab->rate.cell_log]) +#define L2T_P(q,L) ((q)->P_tab->data[((L)-1+(q)->P_tab->rate.overhead)>>(q)->P_tab->rate.cell_log]) static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch) {