summaryrefslogtreecommitdiffstats
path: root/include/net/arp.h
diff options
context:
space:
mode:
authorYajun Deng <yajun.deng@linux.dev>2021-11-23 03:54:30 +0100
committerDavid S. Miller <davem@davemloft.net>2021-11-23 12:51:37 +0100
commit1e84dc6b7bbfc4d1dd846decece4611b7e035772 (patch)
tree08827418ecf758dd90a2f8cf6b0515e5bf0f07ec /include/net/arp.h
parentmctp: Add MCTP-over-serial transport binding (diff)
downloadlinux-1e84dc6b7bbfc4d1dd846decece4611b7e035772.tar.xz
linux-1e84dc6b7bbfc4d1dd846decece4611b7e035772.zip
neigh: introduce neigh_confirm() helper function
Add neigh_confirm() for the confirmed member in struct neighbour, it can be called as an independent unit by other functions. Signed-off-by: Yajun Deng <yajun.deng@linux.dev> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/arp.h')
-rw-r--r--include/net/arp.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/include/net/arp.h b/include/net/arp.h
index 4950191f6b2b..031374ac2f22 100644
--- a/include/net/arp.h
+++ b/include/net/arp.h
@@ -53,13 +53,7 @@ static inline void __ipv4_confirm_neigh(struct net_device *dev, u32 key)
rcu_read_lock_bh();
n = __ipv4_neigh_lookup_noref(dev, key);
- if (n) {
- unsigned long now = jiffies;
-
- /* avoid dirtying neighbour */
- if (READ_ONCE(n->confirmed) != now)
- WRITE_ONCE(n->confirmed, now);
- }
+ neigh_confirm(n);
rcu_read_unlock_bh();
}