• Jiri Pirko's avatar
    tbf: improved accuracy at high rates · b757c933
    Jiri Pirko authored
    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 56b765b7
    ("htb: improved accuracy at high rates").
    Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
    Acked-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b757c933
sch_tbf.c 10.6 KB