summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-05-05 10:47:16 +0300
committerDavid S. Miller <davem@davemloft.net>2019-05-05 10:47:16 +0300
commitf4b47a5945a93c3a6bae1af982e2735973cbd445 (patch)
tree4cdde0098637ed6a22c17ff1988f118fd8508e73 /include
parenta734d1f4c2fc962ef4daa179e216df84a8ec5f84 (diff)
parenta5995e7107eb3d9c44744d3cf47d49fabfef01f5 (diff)
downloadlinux-f4b47a5945a93c3a6bae1af982e2735973cbd445.tar.xz
Merge branch 'ipv4-Move-location-of-pcpu-route-cache-and-exceptions'
David Ahern says: ==================== ipv4: Move location of pcpu route cache and exceptions This series moves IPv4 pcpu cached routes from fib_nh to fib_nh_common to make the caches available for IPv6 nexthops (fib6_nh) with IPv4 routes. This allows a fib6_nh struct to be used with both IPv4 and and IPv6 routes. v4 - fixed memleak if encap_type is not set as noticed by Ido v3 - dropped ipv6 patches for now. Will resubmit those once the existing refcnt problem is fixed v2 - reverted patch 2 to use ifdef CONFIG_IP_ROUTE_CLASSID instead of IS_ENABLED(CONFIG_IP_ROUTE_CLASSID) to fix compile issues reported by kbuild test robot ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/ip_fib.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 772a9e61bd84..d0e28f4ab099 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -96,6 +96,11 @@ struct fib_nh_common {
int nhc_weight;
atomic_t nhc_upper_bound;
+
+ /* v4 specific, but allows fib6_nh with v4 routes */
+ struct rtable __rcu * __percpu *nhc_pcpu_rth_output;
+ struct rtable __rcu *nhc_rth_input;
+ struct fnhe_hash_bucket __rcu *nhc_exceptions;
};
struct fib_nh {
@@ -107,9 +112,6 @@ struct fib_nh {
#endif
__be32 nh_saddr;
int nh_saddr_genid;
- struct rtable __rcu * __percpu *nh_pcpu_rth_output;
- struct rtable __rcu *nh_rth_input;
- struct fnhe_hash_bucket __rcu *nh_exceptions;
#define fib_nh_family nh_common.nhc_family
#define fib_nh_dev nh_common.nhc_dev
#define fib_nh_oif nh_common.nhc_oif