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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 2 Jul 2024 17:15:55 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Leone Fernando <leone4fernando@...il.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com, 
	dsahern@...nel.org, willemb@...gle.com, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 2/4] net: dst_cache: add input_dst_cache API

On Tue, Jul 2, 2024 at 4:26 PM Leone Fernando <leone4fernando@...il.com> wrote:
>
> The input_dst_cache allows fast lookup of frequently encountered dsts.
>
> In order to provide stable results, I implemented a simple linear
> hashtable with each bucket containing a constant amount of
> entries (DST_CACHE_INPUT_BUCKET_SIZE).
>
> Similarly to how the route hint is used, I defined the hashtable key to
> contain the daddr and the tos of the IP header.
>
> Lookup is performed in a straightforward manner: start at the bucket head
> corresponding the hashed key and search the following
> DST_CACHE_INPUT_BUCKET_SIZE entries of the array for a matching key.
>
> When inserting a new dst to the cache, if all the bucket entries are
> full, the oldest one is deleted to make room for the new dst.
>
> Signed-off-by: Leone Fernando <leone4fernando@...il.com>

Hmm...

This patch adds 10MB of memory per netns on host with 512 cpus,
and adds netns creation and dismantle costs (45% on a host with 256 cpus)

It targets IPv4 only, which some of us no longer use.

Also, what is the behavior (loss of performance) of this cache under
flood, when 16 slots need to be looked up for each packet ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ