[NET_SCHED]: Cleanup L2T macros and handle oversized packets

Change L2T (length to time) macros, in all rate based schedulers, to
call a common function qdisc_l2t() that does the rate table lookup.
This function handles if the packet size lookup is larger than the
rate table, which often occurs with TSO enabled.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jesper Dangaard Brouer
2007-09-12 16:35:24 +02:00
committed by David S. Miller
parent b6fa1a4d74
commit e9bef55d3d
5 changed files with 19 additions and 9 deletions

View File

@ -175,7 +175,7 @@ struct cbq_sched_data
};
#define L2T(cl,len) ((cl)->R_tab->data[(len)>>(cl)->R_tab->rate.cell_log])
#define L2T(cl,len) qdisc_l2t((cl)->R_tab,len)
static __inline__ unsigned cbq_hash(u32 h)