lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Apr 2021 20:59:06 +0200
From:   Ilya Maximets <i.maximets@....org>
To:     jean.tourrilhes@....com, Ilya Maximets <i.maximets@....org>
Cc:     Tonghao Zhang <xiangxia.m.yue@...il.com>,
        Pravin B Shelar <pshelar@....org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, Andy Zhou <azhou@....org>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        ovs dev <dev@...nvswitch.org>, William Tu <u9012063@...il.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Davide Caratti <dcaratti@...hat.com>
Subject: Re: [PATCH net] openvswitch: meter: remove rate from the bucket size
 calculation

On 4/28/21 6:31 PM, Jean Tourrilhes wrote:
> 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.

Makes sense.  Thanks for the clarification!

> 	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 see.  Unfortunately, due to the fact that act_police.c uses time
instead of bytes as a measure for tokens, we will still see a difference
in behavior.  Probably, not so big, but it will be there and it will
depend on a line rate.

> 	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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ