diff options
author | Eric Dumazet <edumazet@google.com> | 2024-05-07 15:27:17 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-05-09 03:50:11 +0200 |
commit | e2d09e5a1e8fb17a807dc4dce8dbc39d9fea3788 (patch) | |
tree | 3bdcffc85e18df96748c5a80da609a0d19400317 /net/core | |
parent | net: dst_cache: annotate data-races around dst_cache->reset_ts (diff) | |
download | linux-e2d09e5a1e8fb17a807dc4dce8dbc39d9fea3788.tar.xz linux-e2d09e5a1e8fb17a807dc4dce8dbc39d9fea3788.zip |
net: dst_cache: minor optimization in dst_cache_set_ip6()
There is no need to use this_cpu_ptr(dst_cache->cache) twice.
Compiler is unable to optimize the second call, because of
per-cpu constraints.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Link: https://lore.kernel.org/r/20240507132717.627518-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dst_cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dst_cache.c b/net/core/dst_cache.c index f9df84a6c4b2..6a0482e676d3 100644 --- a/net/core/dst_cache.c +++ b/net/core/dst_cache.c @@ -112,7 +112,7 @@ void dst_cache_set_ip6(struct dst_cache *dst_cache, struct dst_entry *dst, return; idst = this_cpu_ptr(dst_cache->cache); - dst_cache_per_cpu_dst_set(this_cpu_ptr(dst_cache->cache), dst, + dst_cache_per_cpu_dst_set(idst, dst, rt6_get_cookie(dst_rt6_info(dst))); idst->in6_saddr = *saddr; } |