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:	Fri, 23 May 2014 11:29:15 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	David Laight <David.Laight@...lab.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Sujith Sankar <ssujith@...co.com>,
	Neel Patel <neepatel@...co.com>,
	Govindarajulu Varadarajan <_govind@....com>,
	"David S. Miller" <davem@...emloft.net>,
	Christian Benvenuti <benve@...co.com>
Subject: Re: [PATCH] enic: fix adaptive irq coalescing on 32-bit

On Friday 23 May 2014 08:29:52 David Laight wrote:
> From: Arnd Bergmann
> > 7c2ce6e60f703 "enic: Add support for adaptive interrupt coalescing"
> > introduced a 64-bit division that causes a link error on all 32-bit
> > machines:
> > 
> > drivers/built-in.o: In function `enic_poll_msix':
> > :(.text+0x54ff00): undefined reference to `__aeabi_uldivmod'
> > 
> > Since we are dividing another 32-bit value and are only interested
> > in the approximate range here, it should always be safe to limit
> > the delta to an u32 value.
> ...
> >  	traffic <<= 3;
> > -	traffic /= delta;
> > +	traffic /= min_t(u32, delta, UINT_MAX);
> 
> I suspect that doesn't have the desired effect.
> I think it is the same as:
> 	traffic /= (u32)delta;

Ah, you are right, sorry for that.

> If you was the correct value for large 'delta' then maybe:
> 	traffic = delta > UINT_MAX ? 0 : traffic / (u32)delta;

That looks better, yes.

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