David S. Miller 7a9bc9b81a ipv4: Elide fib_validate_source() completely when possible.
If rpfilter is off (or the SKB has an IPSEC path) and there are not
tclassid users, we don't have to do anything at all when
fib_validate_source() is invoked besides setting the itag to zero.

We monitor tclassid uses with a counter (modified only under RTNL and
marked __read_mostly) and we protect the fib_validate_source() real
work with a test against this counter and whether rpfilter is to be
done.

Having a way to know whether we need no tclassid processing or not
also opens the door for future optimized rpfilter algorithms that do
not perform full FIB lookups.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-29 01:36:36 -07:00
..
2011-03-31 11:26:23 -03:00
2012-05-19 01:08:16 -04:00
2012-06-08 14:27:23 -07:00
2012-06-06 15:18:17 -04:00
2012-04-15 12:44:40 -04:00
2012-04-15 12:44:40 -04:00
2012-04-15 12:44:40 -04:00
2011-03-31 11:26:23 -03:00
2012-04-15 12:44:40 -04:00
2012-05-08 19:40:33 +02:00
2012-04-14 14:47:05 -04:00
2012-05-19 01:08:16 -04:00
2011-03-31 11:26:23 -03:00
2012-05-17 18:45:20 -04:00
2011-07-26 16:49:47 -07:00
2011-05-17 14:16:58 -04:00
2012-05-19 01:08:16 -04:00
2012-06-25 16:09:18 -07:00
2012-04-15 12:44:40 -04:00
2012-05-16 15:17:08 -04:00
2012-04-15 12:44:40 -04:00