aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/net_namespace.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-05-27 16:46:33 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-03 03:07:43 -0400
commit5aad1de5ea2c260b4cd2f70b70e146d55dbbc528 (patch)
treedbf8d674fb49a125cf547dd73726c33677d2081c /include/net/net_namespace.h
parentf016229e303c294afac721de4cd4427e634950ea (diff)
ipv4: use separate genid for next hop exceptions
commit 13d82bf5 (ipv4: Fix flushing of cached routing informations) added the support to flush learned pmtu information. However, using rt_genid is quite heavy as it is bumped on route add/change and multicast events amongst other places. These can happen quite often, especially if using dynamic routing protocols. While this is ok with routes (as they are just recreated locally), the pmtu information is learned from remote systems and the icmp notification can come with long delays. It is worthy to have separate genid to avoid excessive pmtu resets. Cc: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r--include/net/net_namespace.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index b17697827482..495bc57f292c 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -118,6 +118,7 @@ struct net {
118 struct netns_ipvs *ipvs; 118 struct netns_ipvs *ipvs;
119 struct sock *diag_nlsk; 119 struct sock *diag_nlsk;
120 atomic_t rt_genid; 120 atomic_t rt_genid;
121 atomic_t fnhe_genid;
121}; 122};
122 123
123/* 124/*
@@ -340,4 +341,14 @@ static inline void rt_genid_bump(struct net *net)
340 atomic_inc(&net->rt_genid); 341 atomic_inc(&net->rt_genid);
341} 342}
342 343
344static inline int fnhe_genid(struct net *net)
345{
346 return atomic_read(&net->fnhe_genid);
347}
348
349static inline void fnhe_genid_bump(struct net *net)
350{
351 atomic_inc(&net->fnhe_genid);
352}
353
343#endif /* __NET_NET_NAMESPACE_H */ 354#endif /* __NET_NET_NAMESPACE_H */