aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sch_generic.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 4ebd615bd013..a02ec9e5fea5 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -307,7 +307,9 @@ drop:
307 */ 307 */
308static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen) 308static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen)
309{ 309{
310 int slot = pktlen; 310 int slot = pktlen + rtab->rate.cell_align + rtab->rate.overhead;
311 if (slot < 0)
312 slot = 0;
311 slot >>= rtab->rate.cell_log; 313 slot >>= rtab->rate.cell_log;
312 if (slot > 255) 314 if (slot > 255)
313 return (rtab->data[255]*(slot >> 8) + rtab->data[slot & 0xFF]); 315 return (rtab->data[255]*(slot >> 8) + rtab->data[slot & 0xFF]);