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] [thread-next>] [day] [month] [year] [list]
Message-ID: <52A1382A.6030504@huawei.com>
Date:	Fri, 6 Dec 2013 10:36:26 +0800
From:	Yang Yingliang <yangyingliang@...wei.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	<davem@...emloft.net>, <netdev@...r.kernel.org>,
	<brouer@...hat.com>, <jpirko@...hat.com>, <jbrouer@...hat.com>
Subject: Re: [PATCH net v5 2/2] net: sched: htb: fix calculation of quantum

On 2013/12/5 20:18, Eric Dumazet wrote:
> On Thu, 2013-12-05 at 15:10 +0800, Yang Yingliang wrote:
>>  	if (!cl->level) {
>> -		cl->quantum = hopt->rate.rate / q->rate2quantum;
>> +		u64 quantum = div64_u64(cl->rate.rate_bytes_ps,
>> +					q->rate2quantum);
> 
> 		q->rate2quantum being 32bit, prefer the following :
> 
> 		u64 quantum = cl->rate.rate_bytes_ps;
> 
> 		do_div(quantum, q->rate2quantum);
> 
> 		Since it maps to better assembly code on 32bit arches.

Change it in v6, thanks!

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