]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tcp_metrics: do not create an entry from tcp_init_metrics()
authorEric Dumazet <edumazet@google.com>
Fri, 22 Sep 2023 22:03:55 +0000 (22:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:08:15 +0000 (11:08 +0100)
commit2027e74150ee7074e4391ebdc9b1cb210fae1d27
tree10f48cfb64161c4621c304c595b8b9b42ee6ab62
parent3f7cb7c47ce0ae274f17a9e4ffa3533c9ca0ab73
tcp_metrics: do not create an entry from tcp_init_metrics()

[ Upstream commit a135798e6e200ecb2f864cecca6d257ba278370c ]

tcp_init_metrics() only wants to get metrics if they were
previously stored in the cache. Creating an entry is adding
useless costs, especially when tcp_no_metrics_save is set.

Fixes: 51c5d0c4b169 ("tcp: Maintain dynamic metrics in local cache.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/tcp_metrics.c