Thread (6 messages) 6 messages, 4 authors, 2017-09-07

Re: [PATCH] netfilter: xt_hashlimit: avoid 64-bit division

flat view

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2017-09-07 14:16:49
Also in: lkml, netfilter-devel

Hi Arnd,

On Wed, Sep 6, 2017 at 9:57 PM, Arnd Bergmann [off-list ref] wrote:
64-bit division is expensive on 32-bit architectures, and
requires a special function call to avoid a link error like:

net/netfilter/xt_hashlimit.o: In function `hashlimit_mt_common':
xt_hashlimit.c:(.text+0x1328): undefined reference to `__aeabi_uldivmod'

In the case of hashlimit_mt_common, we don't actually need a
64-bit operation, we can simply rewrite the function slightly
to make that clear to the compiler.

Fixes: bea74641e378 ("netfilter: xt_hashlimit: add rate match mode")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, this fixes a similar issue (__udivdi3 undefined) on m68k.

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help