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
..
2012-06-08 22:20:58 -07:00
2012-04-02 04:33:44 -04:00
2012-05-17 05:00:04 -04:00
2012-06-05 15:32:15 -04:00
2010-11-28 18:24:14 -08:00
2012-06-13 15:57:31 -07:00
2012-03-28 18:30:03 +01:00
2012-01-17 10:31:12 -05:00
2012-06-19 21:22:05 -07:00