]> git.baikalelectronics.ru Git - kernel.git/commit
tbf: improved accuracy at high rates
authorJiri Pirko <jiri@resnulli.us>
Tue, 12 Feb 2013 00:12:05 +0000 (00:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Feb 2013 23:59:45 +0000 (18:59 -0500)
commit5c59796e680e576f1426ff2ba07f02083be9a4a4
treec269cb8abddd6d563e466436c8abf6684a3da5e7
parent72e44df21863982afe08c9beefb5abb7f940fa89
tbf: improved accuracy at high rates

Current TBF uses rate table computed by the "tc" userspace program,
which has the following issue:

The rate table has 256 entries to map packet lengths to
token (time units).  With TSO sized packets, the 256 entry granularity
leads to loss/gain of rate, making the token bucket inaccurate.

Thus, instead of relying on rate table, this patch explicitly computes
the time and accounts for packet transmission times with nanosecond
granularity.

This is a followup to 4894d8b5dfbe38253c31b77cec6e39e5232ca6f4
("htb: improved accuracy at high rates").

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_tbf.c