net/sched/act_police.c.rej *************** *** 33,40 **** #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 PRIV(a) ((struct tcf_police *) (a)->priv) /* use generic hash table */ --- 33,40 ---- #include #include + #define L2T(p,L) qdisc_l2t((p)->R_tab,L) + #define L2T_P(p,L) qdisc_l2t((p)->P_tab,L) #define PRIV(a) ((struct tcf_police *) (a)->priv) /* use generic hash table */ net/sched/sch_htb.c.rej *************** *** 206,217 **** static __inline__ long L2T(struct htb_class *cl,struct qdisc_rate_table *rate, int size) { - int slot = size >> rate->rate.cell_log; - if (slot > 255) { cl->xstats.giants++; - slot = 255; - } - return rate->data[slot]; } struct htb_sched --- 206,215 ---- static __inline__ long L2T(struct htb_class *cl,struct qdisc_rate_table *rate, int size) { + long result = qdisc_l2t(rate, size); + if (result > rate->data[255]) cl->xstats.giants++; + return result; } struct htb_sched