aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-06-10 03:24:21 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-11 05:09:10 -0400
commitb48c80ece973e9eddb042f6685b482b261ff0d47 (patch)
tree30262edc9721ac70e423bcc8d51f558d2962b539 /include
parent46517008e1168dc926cf2c47d529efc07eca85c0 (diff)
inet: Add family scope inetpeer flushes.
This implementation can deal with having many inetpeer roots, which is a necessary prerequisite for per-FIB table rooted peer tables. Each family (AF_INET, AF_INET6) has a sequence number which we bump when we get a family invalidation request. Each peer lookup cheaply checks whether the flush sequence of the root we are using is out of date, and if so flushes it and updates the sequence number. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/inetpeer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index d432489e7109..e15c0862a686 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -68,6 +68,7 @@ struct inet_peer {
68struct inet_peer_base { 68struct inet_peer_base {
69 struct inet_peer __rcu *root; 69 struct inet_peer __rcu *root;
70 seqlock_t lock; 70 seqlock_t lock;
71 u32 flush_seq;
71 int total; 72 int total;
72}; 73};
73 74
@@ -168,6 +169,7 @@ extern void inet_putpeer(struct inet_peer *p);
168extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout); 169extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout);
169 170
170extern void inetpeer_invalidate_tree(struct inet_peer_base *); 171extern void inetpeer_invalidate_tree(struct inet_peer_base *);
172extern void inetpeer_invalidate_family(int family);
171 173
172/* 174/*
173 * temporary check to make sure we dont access rid, ip_id_count, tcp_ts, 175 * temporary check to make sure we dont access rid, ip_id_count, tcp_ts,