]> bbs.cooldavid.org Git - net-next-2.6.git/commit
net: get rid of rtable->idev
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 11 Nov 2010 07:14:07 +0000 (07:14 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Nov 2010 18:29:40 +0000 (10:29 -0800)
commit72cdd1d971c0deb1619c5c339270570c43647a78
tree15e3c63cf135818ae1b5cbc9d85ef2c48c03804c
parent46b13fc5c0f239f36e84665c73087d5fa86bfd86
net: get rid of rtable->idev

It seems idev field in struct rtable has no special purpose, but adding
extra atomic ops.

We hold refcounts on the device itself (using percpu data, so pretty
cheap in current kernel).

infiniband case is solved using dst.dev instead of idev->dev

Removal of this field means routing without route cache is now using
shared data, percpu data, and only potential contention is a pair of
atomic ops on struct neighbour per forwarded packet.

About 5% speedup on routing test.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/core/addr.c
include/net/route.h
net/ipv4/route.c
net/ipv4/xfrm4_policy.c