diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pkt_sched.h | 4 | ||||
-rw-r--r-- | include/net/sch_generic.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index 268c51599eb8..919af93b7059 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -77,8 +77,8 @@ struct tc_ratespec | |||
77 | { | 77 | { |
78 | unsigned char cell_log; | 78 | unsigned char cell_log; |
79 | unsigned char __reserved; | 79 | unsigned char __reserved; |
80 | unsigned short feature; | 80 | unsigned short overhead; |
81 | short addend; | 81 | short cell_align; |
82 | unsigned short mpu; | 82 | unsigned short mpu; |
83 | __u32 rate; | 83 | __u32 rate; |
84 | }; | 84 | }; |
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 | */ |
308 | static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen) | 308 | static 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]); |