• Jiri Pirko's avatar
    act_police: improved accuracy at high rates · c6d14ff1
    Jiri Pirko authored
    Current act_police 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>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c6d14ff1
act_police.c 10.2 KB