Thread (2 messages) flat view 2 messages, 2 authors, 2012-08-04

Re: [PATCH net-next] ipv4: Introduce IN_DEV_NET_ROUTE_LOCALNET

From: David Miller <davem@davemloft.net>
Date: 2012-08-04 08:28:18

From: Eric Dumazet <redacted>
Date: Sat, 04 Aug 2012 09:27:25 +0200
From: Eric Dumazet <edumazet@google.com>

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>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help