summaryrefslogtreecommitdiff
path: root/net/bridge/br_forward.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2013-12-10 10:59:27 +0400
committerDavid S. Miller <davem@davemloft.net>2013-12-12 00:08:41 +0400
commitcc106e441a63bec3b1cb72948df82ea15945c449 (patch)
treebe4ee6109410b1613b0f465b94cca6dbb87a1561 /net/bridge/br_forward.c
parent4bd7b5127bd02c12c1cc837a7a0b6ce295eb2505 (diff)
downloadlinux-cc106e441a63bec3b1cb72948df82ea15945c449.tar.xz
net: sched: tbf: fix the calculation of max_size
Current max_size is caluated from rate table. Now, the rate table has been replaced and it's wrong to caculate max_size based on this rate table. It can lead wrong calculation of max_size. The burst in kernel may be lower than user asked, because burst may gets some loss when transform it to buffer(E.g. "burst 40kb rate 30mbit/s") and it seems we cannot avoid this loss. Burst's value(max_size) based on rate table may be equal user asked. If a packet's length is max_size, this packet will be stalled in tbf_dequeue() because its length is above the burst in kernel so that it cannot get enough tokens. The max_size guards against enqueuing packet sizes above q->buffer "time" in tbf_enqueue(). To make consistent with the calculation of tokens, this patch add a helper psched_ns_t2l() to calculate burst(max_size) directly to fix this problem. After this fix, we can support to using 64bit rates to calculate burst as well. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_forward.c')
0 files changed, 0 insertions, 0 deletions