* [RFC PATCH net-next] ipv6: remove rt6i_peer_genid from rt6_info and its handler
@ 2012-10-26 13:01 roy.qing.li
2012-10-27 10:49 ` RongQing Li
0 siblings, 1 reply; 2+ messages in thread
From: roy.qing.li @ 2012-10-26 13:01 UTC (permalink / raw)
To: netdev
From: Li RongQing <roy.qing.li@gmail.com>
6431cbc25f(Create a mechanism for upward inetpeer propagation into routes)
introduces these codes, but this mechanism is never enabled since
rt6i_peer_genid always is zero whether it is not assigned or assigned by
rt6_peer_genid(). After 5943634fc5 (ipv4: Maintain redirect and PMTU info
in struct rtable again), the ipv4 related codes of this mechanism have been
removed, I think we maybe able to remove them now.
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
include/net/ip6_fib.h | 1 -
net/ipv6/route.c | 16 ++--------------
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 20210d7..26210cf 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -117,7 +117,6 @@ struct rt6_info {
struct rt6key rt6i_src;
struct rt6key rt6i_prefsrc;
u32 rt6i_metric;
- u32 rt6i_peer_genid;
struct inet6_dev *rt6i_idev;
unsigned long _rt6i_peer;
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index c42650c..6ceee24 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -321,13 +321,6 @@ static void ip6_dst_destroy(struct dst_entry *dst)
}
}
-static atomic_t __rt6_peer_genid = ATOMIC_INIT(0);
-
-static u32 rt6_peer_genid(void)
-{
- return atomic_read(&__rt6_peer_genid);
-}
-
void rt6_bind_peer(struct rt6_info *rt, int create)
{
struct inet_peer_base *base;
@@ -341,8 +334,6 @@ void rt6_bind_peer(struct rt6_info *rt, int create)
if (peer) {
if (!rt6_set_peer(rt, peer))
inet_putpeer(peer);
- else
- rt->rt6i_peer_genid = rt6_peer_genid();
}
}
@@ -1100,11 +1091,8 @@ static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie)
return NULL;
if (rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie)) {
- if (rt->rt6i_peer_genid != rt6_peer_genid()) {
- if (!rt6_has_peer(rt))
- rt6_bind_peer(rt, 0);
- rt->rt6i_peer_genid = rt6_peer_genid();
- }
+ if (!rt6_has_peer(rt))
+ rt6_bind_peer(rt, 0);
return dst;
}
return NULL;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH net-next] ipv6: remove rt6i_peer_genid from rt6_info and its handler
2012-10-26 13:01 [RFC PATCH net-next] ipv6: remove rt6i_peer_genid from rt6_info and its handler roy.qing.li
@ 2012-10-27 10:49 ` RongQing Li
0 siblings, 0 replies; 2+ messages in thread
From: RongQing Li @ 2012-10-27 10:49 UTC (permalink / raw)
To: netdev
sorry for noise, please ignore it, and see version 2
-Roy
2012/10/26 <roy.qing.li@gmail.com>:
> From: Li RongQing <roy.qing.li@gmail.com>
>
> 6431cbc25f(Create a mechanism for upward inetpeer propagation into routes)
> introduces these codes, but this mechanism is never enabled since
> rt6i_peer_genid always is zero whether it is not assigned or assigned by
> rt6_peer_genid(). After 5943634fc5 (ipv4: Maintain redirect and PMTU info
> in struct rtable again), the ipv4 related codes of this mechanism have been
> removed, I think we maybe able to remove them now.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-27 10:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-26 13:01 [RFC PATCH net-next] ipv6: remove rt6i_peer_genid from rt6_info and its handler roy.qing.li
2012-10-27 10:49 ` RongQing Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).