summaryrefslogtreecommitdiffstats
path: root/include/net/snmp.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-08-03 21:27:25 +0000
committerDavid S. Miller <davem@davemloft.net>2012-08-04 01:27:57 -0700
commit9eb43e765368f835d92c93844ebce30da7efeb84 (patch)
treec8ae2176f95886fafd8e70e7c32f2aa6257ca73d /include/net/snmp.h
parent40384999d142552b81aeb596c2ae663dd3ff60ce (diff)
downloadop-kernel-dev-9eb43e765368f835d92c93844ebce30da7efeb84.zip
op-kernel-dev-9eb43e765368f835d92c93844ebce30da7efeb84.tar.gz
ipv4: Introduce IN_DEV_NET_ROUTE_LOCALNET
performance profiles show a high cost in the IN_DEV_ROUTE_LOCALNET() call done in ip_route_input_slow(), because of multiple dereferences, even if cache lines are clean and available in cpu caches. Since we already have the 'net' pointer, introduce IN_DEV_NET_ROUTE_LOCALNET() macro avoiding two dereferences (dev_net(in_dev->dev)) Also change the tests to use IN_DEV_NET_ROUTE_LOCALNET() only if saddr or/and daddr are loopback addresse. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/snmp.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud