tcp: seq_file: Refactor net and family matching
authorMartin KaFai Lau <kafai@fb.com>
Thu, 1 Jul 2021 20:05:48 +0000 (13:05 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 23 Jul 2021 23:44:37 +0000 (16:44 -0700)
commitad2d61376a0517f19f49fc23de9e12d2b06484fc
treea59d70c8b4628d64eb2a7ae81e6dd6e3d6c3db88
parent525e2f9fd0229eb10cb460a9e6d978257f24804e
tcp: seq_file: Refactor net and family matching

This patch refactors the net and family matching into
two new helpers, seq_sk_match() and seq_file_family().

seq_file_family() is in the later part of the file to prepare
the change of a following patch.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210701200548.1034629-1-kafai@fb.com
net/ipv4/tcp_ipv4.c