aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/route.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-01-14 18:17:06 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-15 18:26:16 -0500
commit5055c371bfd53fd369b895051b541318c2bad495 (patch)
tree28748ee77408e82a64ae13dbb4bd65f1eff6aa26 /include/net/route.h
parent0799c2d6f42db2b275b6479035f5b7a30ef4ee39 (diff)
ipv4: per cpu uncached list
RAW sockets with hdrinc suffer from contention on rt_uncached_lock spinlock. One solution is to use percpu lists, since most routes are destroyed by the cpu that created them. It is unclear why we even have to put these routes in uncached_list, as all outgoing packets should be freed when a device is dismantled. Signed-off-by: Eric Dumazet <edumazet@google.com> Fixes: caacf05e5ad1 ("ipv4: Properly purge netdev references on uncached routes.") Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/route.h')
-rw-r--r--include/net/route.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/route.h b/include/net/route.h
index b17cf28f996e..fe22d03afb6a 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -46,6 +46,7 @@
46 46
47struct fib_nh; 47struct fib_nh;
48struct fib_info; 48struct fib_info;
49struct uncached_list;
49struct rtable { 50struct rtable {
50 struct dst_entry dst; 51 struct dst_entry dst;
51 52
@@ -64,6 +65,7 @@ struct rtable {
64 u32 rt_pmtu; 65 u32 rt_pmtu;
65 66
66 struct list_head rt_uncached; 67 struct list_head rt_uncached;
68 struct uncached_list *rt_uncached_list;
67}; 69};
68 70
69static inline bool rt_is_input_route(const struct rtable *rt) 71static inline bool rt_is_input_route(const struct rtable *rt)