diff options
author | Scott Feldman <sfeldma@gmail.com> | 2015-03-06 00:21:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-06 00:24:58 -0500 |
commit | 448b128a14501543748514a4f9adedd3c0da2e85 (patch) | |
tree | 91bd84298076b8b870bdca8ae4c85c4158f164e6 | |
parent | b5d6fbdeede861b52d67b9a4ea3fdfcc6e6865cd (diff) |
ipv4: add net bool fib_offload_disabled
If something goes wrong with IPv4 FIB offload, mark entire net offload
disabled. This is brute force policy to basically shut down IPv4 FIB offload
permanently if there is a problem offloading any route to an external device.
We can refine the policy in the future, to handle failures on a per-device or
per-route basis, but for now, this policy is per-net.
What we're trying to avoid is an inconsistent split between the kernel's FIB
and the offload device's FIB. We don't want the device to fwd a pkt
inconsitent with what the kernel would do. An example of a split is if device
has 10.0.0.0/16 and kernel has 10.0.0.0/16 and 10.0.0.0/24, the device wouldn't
see the longest prefix 10.0.0.0/24 and potentially forward pkts incorrectly.
Limited capacity or limited capability are two ways a route may fail to install
to the offload device. We'll not differentiate between failures at this time,
and treat any failure as fatal and mark the net as fib_offload_disabled.
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/netns/ipv4.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index db1db158a00e..1085e12f940f 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -47,6 +47,7 @@ struct netns_ipv4 { | |||
47 | int fib_num_tclassid_users; | 47 | int fib_num_tclassid_users; |
48 | #endif | 48 | #endif |
49 | struct hlist_head *fib_table_hash; | 49 | struct hlist_head *fib_table_hash; |
50 | bool fib_offload_disabled; | ||
50 | struct sock *fibnl; | 51 | struct sock *fibnl; |
51 | 52 | ||
52 | struct sock * __percpu *icmp_sk; | 53 | struct sock * __percpu *icmp_sk; |