diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2023-12-19 09:18:25 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-12-22 22:15:34 +0000 |
commit | 5a22bba13d0162d278d6e31232259ddcce196b8e (patch) | |
tree | 862106a0d977770e96a49668bb4d7e6f65e7acac /include | |
parent | 06a8c04f89949576b715f11350f1896b62cecb0a (diff) |
tcp: Save address type in inet_bind2_bucket.
inet_bind2_bucket_addr_match() and inet_bind2_bucket_match_addr_any()
are called for each bhash2 bucket to check conflicts. Thus, we call
ipv6_addr_any() and ipv6_addr_v4mapped() over and over during bind().
Let's avoid calling them by saving the address type in inet_bind2_bucket.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/inet_hashtables.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 171cc235d045..260e673ede22 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h @@ -96,6 +96,7 @@ struct inet_bind2_bucket { int l3mdev; unsigned short port; #if IS_ENABLED(CONFIG_IPV6) + unsigned short addr_type; struct in6_addr v6_rcv_saddr; #define rcv_saddr v6_rcv_saddr.s6_addr32[3] #else |