Commit 7007c9fb authored by Eric Dumazet's avatar Eric Dumazet Committed by Zhang Changzhong
Browse files

tcp_metrics: do not create an entry from tcp_init_metrics()

stable inclusion
from stable-v4.19.299
commit febd9f4d7cb8b9d9adff87b105f3afd55902127e
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8MCB5
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=febd9f4d7cb8b9d9adff87b105f3afd55902127e



--------------------------------

[ 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: 51c5d0c4 ("tcp: Maintain dynamic metrics in local cache.")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
parent 6dc5a50f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment