[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
@@ -115,8 +115,8 @@ struct tbf_sched_data
|
||||
struct qdisc_watchdog watchdog; /* Watchdog timer */
|
||||
};
|
||||
|
||||
#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) qdisc_l2t((q)->R_tab,L)
|
||||
#define L2T_P(q,L) qdisc_l2t((q)->P_tab,L)
|
||||
|
||||
static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
|
||||
{
|
||||
|
Reference in New Issue
Block a user