[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:

committed by
David S. Miller

parent
b6fa1a4d74
commit
e9bef55d3d
@@ -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];
|
||||
|
Reference in New Issue
Block a user