summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-03-15 10:37:34 +0300
committerJakub Kicinski <kuba@kernel.org>2023-03-15 10:37:34 +0300
commit575942a2e2d311c7f5abe17f9958abab45604cbd (patch)
tree0611835d7b618d97f31bdc1a592542c5352b636f /include
parent68a84a127bb07d2a47e95c808520f742c54781c7 (diff)
parentc486640aa710ddd06c13a7f7162126e1552e8842 (diff)
downloadlinux-575942a2e2d311c7f5abe17f9958abab45604cbd.tar.xz
Merge branch 'ipv6-optimize-rt6_score_route'
Eric Dumazet says: ==================== ipv6: optimize rt6_score_route() This patch series remove an expensive rwlock acquisition in rt6_check_neigh()/rt6_score_route(). First patch adds missing annotations, and second patch implements the optimization. ==================== Link: https://lore.kernel.org/r/20230313201732.887488-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/neighbour.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 234799ca527e..c8d39bba2a0d 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -464,7 +464,7 @@ static __always_inline int neigh_event_send_probe(struct neighbour *neigh,
if (READ_ONCE(neigh->used) != now)
WRITE_ONCE(neigh->used, now);
- if (!(neigh->nud_state & (NUD_CONNECTED | NUD_DELAY | NUD_PROBE)))
+ if (!(READ_ONCE(neigh->nud_state) & (NUD_CONNECTED | NUD_DELAY | NUD_PROBE)))
return __neigh_event_send(neigh, skb, immediate_ok);
return 0;
}