inet_diag: skip over empty buckets
authorEric Dumazet <edumazet@google.com>
Mon, 22 Jan 2024 11:26:03 +0000 (11:26 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 23 Jan 2024 14:13:55 +0000 (15:13 +0100)
commit622a08e8de9f9ad576fd56e3a2e97a84370a8100
tree9fda1455c3639361d11162d535305baba2f05adf
parentf44e64990beb41167bd7c313d90bcf7e290c3582
inet_diag: skip over empty buckets

After the removal of inet_diag_table_mutex, sock_diag_table_mutex
and sock_diag_mutex, I was able so see spinlock contention from
inet_diag_dump_icsk() when running 100 parallel invocations.

It is time to skip over empty buckets.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv4/inet_diag.c