]> git.ipfire.org Git - thirdparty/linux.git/commit
tcp: Move TCP-specific diag functions to tcp_diag.c.
authorKuniyuki Iwashima <kuniyu@google.com>
Fri, 22 Aug 2025 19:07:01 +0000 (19:07 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 26 Aug 2025 00:53:36 +0000 (17:53 -0700)
commit382a4d9cb6dc07643345e15c49738088a727d29b
tree623bacf1ea1fb25c7543224f981e93daf0fa9ea6
parentf1241200cd66b3e25fd2a44dd961d9720e965aa1
tcp: Move TCP-specific diag functions to tcp_diag.c.

tcp_diag_dump() / tcp_diag_dump_one() is just a wrapper of
inet_diag_dump_icsk() / inet_diag_dump_one_icsk(), respectively.

Let's inline them in tcp_diag.c and move static callees as well.

Note that inet_sk_attr_size() is merged into tcp_diag_get_aux_size(),
and we remove inet_diag_handler.idiag_get_aux_size() accordingly.

While at it, BUG_ON() is replaced with DEBUG_NET_WARN_ON_ONCE().

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250822190803.540788-7-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/inet_diag.h
net/ipv4/inet_diag.c
net/ipv4/tcp_diag.c