lkml.org 
[lkml]   [2021]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net] openvswitch: meter: remove rate from the bucket size calculation
On Wed, Apr 28, 2021 at 01:22:12PM +0200, Ilya Maximets wrote:
>
> I didn't test it, but I looked at the implementation in
> net/sched/act_police.c and net/sched/sch_tbf.c, and they should work
> in a same way as this patch, i.e. it's a classic token bucket where
> burst is a burst and nothing else.

Actually, act_police.c and sch_tbf.c will behave completely
differently, even if they are both based on the token bucket
algorithm.
The reason is that sch_tbf.c is applied to a queue, and the
queue will smooth out traffic and avoid drops. The token bucket is
used to dequeue the queue, this is sometime called leaky bucket. I've
personally used sch_tbf.c with burst size barely bigger than the MTU,
and it works fine.
This is why I was suggesting to compare to act_police.c, which
does not have a queue to smooth out traffic and can only drop
packets.
I believe OVS meters are similar to policers, so that's why
they are suprising for people used to queues such as TBF and HTB.

Regards,

Jean

\
 
 \ /
  Last update: 2021-04-28 19:19    [W:0.078 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site