diff options
author | Jesper Dangaard Brouer <hawk@comx.dk> | 2007-09-12 18:35:24 +0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-11 03:49:20 +0400 |
commit | e9bef55d3d062ee7a78fde2913ec87ca9305a1e0 (patch) | |
tree | bb772650e7df49e94bd9c383b51f53bbb4e7bcab /net/sched/act_police.c | |
parent | b6fa1a4d746488a7de95ec16afcaf3247fedb003 (diff) | |
download | linux-e9bef55d3d062ee7a78fde2913ec87ca9305a1e0.tar.xz |
[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>
Diffstat (limited to 'net/sched/act_police.c')
-rw-r--r-- | net/sched/act_police.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 17f6f27e28a2..a73e3e6d87ea 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -21,8 +21,8 @@ #include <net/act_api.h> #include <net/netlink.h> -#define L2T(p,L) ((p)->tcfp_R_tab->data[(L)>>(p)->tcfp_R_tab->rate.cell_log]) -#define L2T_P(p,L) ((p)->tcfp_P_tab->data[(L)>>(p)->tcfp_P_tab->rate.cell_log]) +#define L2T(p,L) qdisc_l2t((p)->tcfp_R_tab, L) +#define L2T_P(p,L) qdisc_l2t((p)->tcfp_P_tab, L) #define POL_TAB_MASK 15 static struct tcf_common *tcf_police_ht[POL_TAB_MASK + 1]; |