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]
Date:	Mon, 17 Mar 2014 22:31:51 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	john.fastabend@...il.com, netdev@...r.kernel.org, tgraf@...g.ch
Subject: Re: [PATCH net-next] net: sched: use no more than one page in
 struct fw_head

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Sun, 16 Mar 2014 09:06:30 -0700

> From: Eric Dumazet <edumazet@...gle.com>
> 
> In commit b4e9b520ca5d ("[NET_SCHED]: Add mask support to fwmark
> classifier") Patrick added an u32 field in fw_head, making it slightly
> bigger than one page.
> 
> Change the layout of this structure and let compiler emit a reciprocal
> divide for fw_hash(), as this makes the core more readable and
> more efficient those days.
> 
> This brings back the memory usage to a single page, and permits John
> to add a rcu_head later without any worry.
> 
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>

Eric let's just use an HSIZE of 256 and be done with it.

Then all of this talk of divides and cost goes out the window, as we
can assume a power of two and use simple masking.

This is basically what other classifiers in similar situations do.
--
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