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: <CANn89iLHHJeqRBnoe9Eck72sFFo2eX7XDh2w-Ux7HMMvk0=45Q@mail.gmail.com>
Date:   Thu, 12 May 2022 14:01:33 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     Martin KaFai Lau <kafai@...com>
Cc:     netdev <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        kernel-team <kernel-team@...com>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 0/4] net: inet: Retire port only listening_hash

On Wed, May 11, 2022 at 5:05 PM Martin KaFai Lau <kafai@...com> wrote:
>
> This series is to retire the port only listening_hash.
>
> The listen sk is currently stored in two hash tables,
> listening_hash (hashed by port) and lhash2 (hashed by port and address).
>
> After commit 0ee58dad5b06 ("net: tcp6: prefer listeners bound to an address")
> and commit d9fbc7f6431f ("net: tcp: prefer listeners bound to an address"),
> the TCP-SYN lookup fast path does not use listening_hash.
>
> The commit 05c0b35709c5 ("tcp: seq_file: Replace listening_hash with lhash2")
> also moved the seq_file (/proc/net/tcp) iteration usage from
> listening_hash to lhash2.
>
> There are still a few listening_hash usages left.
> One of them is inet_reuseport_add_sock() which uses the listening_hash
> to search a listen sk during the listen() system call.  This turns
> out to be very slow on use cases that listen on many different
> VIPs at a popular port (e.g. 443).  [ On top of the slowness in
> adding to the tail in the IPv6 case ]. A latter patch has a
> selftest to demonstrate this case.
>
> This series takes this chance to move all remaining listening_hash
> usages to lhash2 and then retire listening_hash.
>
> Martin KaFai Lau (4):
>   net: inet: Remove count from inet_listen_hashbucket
>   net: inet: Open code inet_hash2 and inet_unhash2
>   net: inet: Retire port only listening_hash
>   net: selftests: Stress reuseport listen
>

Nice patches, thanks Martin.

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ