diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-10 10:26:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-11 01:40:18 -0400 |
commit | f185071ddf799e194ba015d040d3d49cdbfa7e48 (patch) | |
tree | f8d4221951e6da429f7d252bc167e8d64a83d1f1 /include/net/route.h | |
parent | 312487313d4f7177cb751830e3d9c218e42ed59e (diff) |
ipv4: Remove inetpeer from routes.
No longer used.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/route.h')
-rw-r--r-- | include/net/route.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/include/net/route.h b/include/net/route.h index c27449466d18..52362368af09 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -40,7 +40,6 @@ | |||
40 | #define RT_CONN_FLAGS(sk) (RT_TOS(inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE)) | 40 | #define RT_CONN_FLAGS(sk) (RT_TOS(inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE)) |
41 | 41 | ||
42 | struct fib_nh; | 42 | struct fib_nh; |
43 | struct inet_peer; | ||
44 | struct fib_info; | 43 | struct fib_info; |
45 | struct rtable { | 44 | struct rtable { |
46 | struct dst_entry dst; | 45 | struct dst_entry dst; |
@@ -66,44 +65,9 @@ struct rtable { | |||
66 | 65 | ||
67 | /* Miscellaneous cached information */ | 66 | /* Miscellaneous cached information */ |
68 | u32 rt_pmtu; | 67 | u32 rt_pmtu; |
69 | unsigned long _peer; /* long-living peer info */ | ||
70 | struct fib_info *fi; /* for client ref to shared metrics */ | 68 | struct fib_info *fi; /* for client ref to shared metrics */ |
71 | }; | 69 | }; |
72 | 70 | ||
73 | static inline struct inet_peer *rt_peer_ptr(struct rtable *rt) | ||
74 | { | ||
75 | return inetpeer_ptr(rt->_peer); | ||
76 | } | ||
77 | |||
78 | static inline bool rt_has_peer(struct rtable *rt) | ||
79 | { | ||
80 | return inetpeer_ptr_is_peer(rt->_peer); | ||
81 | } | ||
82 | |||
83 | static inline void __rt_set_peer(struct rtable *rt, struct inet_peer *peer) | ||
84 | { | ||
85 | __inetpeer_ptr_set_peer(&rt->_peer, peer); | ||
86 | } | ||
87 | |||
88 | static inline bool rt_set_peer(struct rtable *rt, struct inet_peer *peer) | ||
89 | { | ||
90 | return inetpeer_ptr_set_peer(&rt->_peer, peer); | ||
91 | } | ||
92 | |||
93 | static inline void rt_init_peer(struct rtable *rt, struct inet_peer_base *base) | ||
94 | { | ||
95 | inetpeer_init_ptr(&rt->_peer, base); | ||
96 | } | ||
97 | |||
98 | static inline void rt_transfer_peer(struct rtable *rt, struct rtable *ort) | ||
99 | { | ||
100 | rt->_peer = ort->_peer; | ||
101 | if (rt_has_peer(ort)) { | ||
102 | struct inet_peer *peer = rt_peer_ptr(ort); | ||
103 | atomic_inc(&peer->refcnt); | ||
104 | } | ||
105 | } | ||
106 | |||
107 | static inline bool rt_is_input_route(const struct rtable *rt) | 71 | static inline bool rt_is_input_route(const struct rtable *rt) |
108 | { | 72 | { |
109 | return rt->rt_route_iif != 0; | 73 | return rt->rt_route_iif != 0; |
@@ -326,27 +290,6 @@ static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable | |||
326 | return rt; | 290 | return rt; |
327 | } | 291 | } |
328 | 292 | ||
329 | extern void rt_bind_peer(struct rtable *rt, __be32 daddr, int create); | ||
330 | |||
331 | static inline struct inet_peer *__rt_get_peer(struct rtable *rt, __be32 daddr, int create) | ||
332 | { | ||
333 | if (rt_has_peer(rt)) | ||
334 | return rt_peer_ptr(rt); | ||
335 | |||
336 | rt_bind_peer(rt, daddr, create); | ||
337 | return (rt_has_peer(rt) ? rt_peer_ptr(rt) : NULL); | ||
338 | } | ||
339 | |||
340 | static inline struct inet_peer *rt_get_peer(struct rtable *rt, __be32 daddr) | ||
341 | { | ||
342 | return __rt_get_peer(rt, daddr, 0); | ||
343 | } | ||
344 | |||
345 | static inline struct inet_peer *rt_get_peer_create(struct rtable *rt, __be32 daddr) | ||
346 | { | ||
347 | return __rt_get_peer(rt, daddr, 1); | ||
348 | } | ||
349 | |||
350 | static inline int inet_iif(const struct sk_buff *skb) | 293 | static inline int inet_iif(const struct sk_buff *skb) |
351 | { | 294 | { |
352 | return skb_rtable(skb)->rt_iif; | 295 | return skb_rtable(skb)->rt_iif; |