neigh: Protect neigh->ha[] with a seqlock
commit0ed8ddf4045fcfcac36bad753dc4046118c603ec
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 7 Oct 2010 10:44:07 +0000 (7 10:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Oct 2010 19:54:04 +0000 (11 12:54 -0700)
treecf1d9eb14668c4d2257b3519ed7deec8c5cb396d
parentd122179a3c0fdc71b88cb9e3605f372b1651a9ff
neigh: Protect neigh->ha[] with a seqlock

Add a seqlock in struct neighbour to protect neigh->ha[], and avoid
dirtying neighbour in stress situation (many different flows / dsts)

Dirtying takes place because of read_lock(&n->lock) and n->used writes.

Switching to a seqlock, and writing n->used only on jiffies changes
permits less dirtying.

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
net/ipv4/arp.c
net/sched/sch_teql.c