aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip6_fib.h5
-rw-r--r--include/net/net_namespace.h10
-rw-r--r--include/net/netns/ipv4.h1
-rw-r--r--include/net/sock.h2
4 files changed, 13 insertions, 5 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index cd64cf35a49f..8a2a203eb15d 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -112,9 +112,8 @@ struct rt6_info {
112 struct inet6_dev *rt6i_idev; 112 struct inet6_dev *rt6i_idev;
113 unsigned long _rt6i_peer; 113 unsigned long _rt6i_peer;
114 114
115#ifdef CONFIG_XFRM 115 u32 rt6i_genid;
116 u32 rt6i_flow_cache_genid; 116
117#endif
118 /* more non-fragment space at head required */ 117 /* more non-fragment space at head required */
119 unsigned short rt6i_nfheader_len; 118 unsigned short rt6i_nfheader_len;
120 119
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index d61e2b36d9e3..4faf6612ecac 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -110,6 +110,7 @@ struct net {
110#endif 110#endif
111 struct netns_ipvs *ipvs; 111 struct netns_ipvs *ipvs;
112 struct sock *diag_nlsk; 112 struct sock *diag_nlsk;
113 atomic_t rt_genid;
113}; 114};
114 115
115/* 116/*
@@ -315,5 +316,14 @@ static inline void unregister_net_sysctl_table(struct ctl_table_header *header)
315} 316}
316#endif 317#endif
317 318
319static inline int rt_genid(struct net *net)
320{
321 return atomic_read(&net->rt_genid);
322}
323
324static inline void rt_genid_bump(struct net *net)
325{
326 atomic_inc(&net->rt_genid);
327}
318 328
319#endif /* __NET_NET_NAMESPACE_H */ 329#endif /* __NET_NET_NAMESPACE_H */
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 7d00583d53da..2ae2b8372cfd 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -64,7 +64,6 @@ struct netns_ipv4 {
64 kgid_t sysctl_ping_group_range[2]; 64 kgid_t sysctl_ping_group_range[2];
65 long sysctl_tcp_mem[3]; 65 long sysctl_tcp_mem[3];
66 66
67 atomic_t rt_genid;
68 atomic_t dev_addr_genid; 67 atomic_t dev_addr_genid;
69 68
70#ifdef CONFIG_IP_MROUTE 69#ifdef CONFIG_IP_MROUTE
diff --git a/include/net/sock.h b/include/net/sock.h
index bc476a19f28e..c9175562039f 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1339,7 +1339,7 @@ static inline bool sk_wmem_schedule(struct sock *sk, int size)
1339} 1339}
1340 1340
1341static inline bool 1341static inline bool
1342sk_rmem_schedule(struct sock *sk, struct sk_buff *skb, unsigned int size) 1342sk_rmem_schedule(struct sock *sk, struct sk_buff *skb, int size)
1343{ 1343{
1344 if (!sk_has_account(sk)) 1344 if (!sk_has_account(sk))
1345 return true; 1345 return true;