diff options
author | David S. Miller <davem@davemloft.net> | 2012-06-29 10:32:45 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-29 10:36:36 +0200 |
commit | 7a9bc9b81a5bc6e44ebc80ef781332e4385083f2 (patch) | |
tree | 1342c672823d47bfb112fee63951af9f6a3eb590 /drivers/net/wireless/rtlwifi/pci.c | |
parent | net: l2tp_eth: provide tx_dropped counter (diff) | |
download | linux-7a9bc9b81a5bc6e44ebc80ef781332e4385083f2.tar.xz linux-7a9bc9b81a5bc6e44ebc80ef781332e4385083f2.zip |
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>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/pci.c')
0 files changed, 0 insertions, 0 deletions