]> git.baikalelectronics.ru Git - kernel.git/commit
neigh: RCU conversion of struct neighbour
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 7 Oct 2010 00:49:21 +0000 (17:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Oct 2010 01:01:33 +0000 (18:01 -0700)
commitc0a79fe256f6e12331dee30b5b5121e2e321d872
treecda6089e75f98fc3c9812993cf790fccac98b67a
parentc439640f42602e57730640da356b3392c972ef4f
neigh: RCU conversion of struct neighbour

This is the second step for neighbour RCU conversion.

(first was commit 0c59e14d : RCU conversion of neigh hash table)

neigh_lookup() becomes lockless, but still take a reference on found
neighbour. (no more read_lock()/read_unlock() on tbl->lock)

struct neighbour gets an additional rcu_head field and is freed after an
RCU grace period.

Future work would need to eventually not take a reference on neighbour
for temporary dst (DST_NOCACHE), but this would need dst->_neighbour to
use a noref bit like we did for skb->_dst.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/neighbour.h
net/core/neighbour.c