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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 3 Dec 2013 08:59:32 +0800
From:	Yang Yingliang <yangyingliang@...wei.com>
To:	David Miller <davem@...emloft.net>
CC:	<eric.dumazet@...il.com>, <netdev@...r.kernel.org>,
	<brouer@...hat.com>, <jpirko@...hat.com>, <jbrouer@...hat.com>
Subject: Re: [PATCH] net: sched: tbf: fix calculation of max_size

On 2013/12/3 0:45, David Miller wrote:
> From: Yang Yingliang <yangyingliang@...wei.com>
> Date: Mon, 25 Nov 2013 20:04:23 +0800
> 
>> From: Yang Yingliang <yangyingliang@...wei.com>
>>
>> Current max_size is caluated from rate table. Now, the rate table
>> has been replaced and it's wrong to caculate max_size based on this
>> rate table. It can lead wrong calculation of max_size.
>>
>> The burst in kernel may be lower than user asked, because burst may gets
>> some loss when transform it to buffer(E.g. "burst 40kb rate 30mbit/s")
>> and it seems we cannot avoid this loss. And burst's value(max_size) based
>> on rate table may be equal user asked. If a packet's length is max_size,
>> this packet will be stalled in tbf_dequeue() because its length is above
>> the burst in kernel so that it cannot get enough tokens. The max_size guards
>> against enqueuing packet sizes above q->buffer "time" in tbf_enqueue().
>>
>> This patch fixes the calculation of max_size by using psched_l2t_ns() and
>> q->buffer to recalculate burst(max_size).
>>
>> Also, add support to get burst from userland directly. We can avoid loss
>> in byte-to-time transform by using burst directly. Iproute2 will need a
>> patch to send burst to kernel.
>>
>> Suggested-by: Jesper Dangaard Brouer <jbrouer@...hat.com>
>> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> 
> I don't see why you need to add the userland explicit burst capability
> to fix the calculation of max_size.
> 
> These two things are separate, the new netlink attributes are a new
> feature.
> 
> Therefore, please submit these two things separately.  First, submit
> the pure max_size bug fix for 'net'.  Then when I open 'net-next' back
> up you can submit the support for the new netlink attributes.
> 
> Thanks.
> 

OK, I'll send a v4.

Regards,
Yang

> 
> .
> 


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ