* [PATCH] Force IPv6 FIB gc on device shutdown
@ 2004-04-09 15:39 Andi Kleen
2004-04-09 22:31 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2004-04-09 15:39 UTC (permalink / raw)
To: davem; +Cc: netdev
A few people reported problems with shutdown complaining about lost reference
counts in network devices. The problem was that the IPv6 FIB kept some
device references around and only dropped it on the next GC timer run, which
happens only every 10s.
This patch forces a garbage collection on device shutdown.
-Andi
diff -u linux/net/ipv6/ndisc.c-o linux/net/ipv6/ndisc.c
--- linux/net/ipv6/ndisc.c-o 2004-04-04 23:35:36.000000000 +0200
+++ linux/net/ipv6/ndisc.c 2004-04-05 15:11:07.000000000 +0200
@@ -1564,6 +1564,9 @@
neigh_changeaddr(&nd_tbl, dev);
fib6_run_gc(0);
break;
+ case NETDEV_UNREGISTER:
+ fib6_run_gc(0);
+ break;
default:
break;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Force IPv6 FIB gc on device shutdown
2004-04-09 15:39 [PATCH] Force IPv6 FIB gc on device shutdown Andi Kleen
@ 2004-04-09 22:31 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-04-09 22:31 UTC (permalink / raw)
To: Andi Kleen; +Cc: netdev, tspat, shemminger
Thanks Andi.
A week ago Thomas Spatzier posted a similar patch, and I had
asked Stephen Hemminger (in private email) for his take on
this.
So here is the final patch I applied, based upon your and
Thomas's patches, plus Stephen's commentary. (hint: NETDEV_DOWN
is sufficient, because unregister causes a NETDEV_DOWN event
if necessary).
Thanks everyone.
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/04/09 15:29:23-07:00 davem@nuts.davemloft.net
# [IPV6]: In ndisc_netdev_event, handle NETDEV_DOWN.
#
# Based upon patches and commentary from Thomas Spatzier,
# Stephen Hemminger, and Andi Kleen.
#
# net/ipv6/ndisc.c
# 2004/04/09 15:29:00-07:00 davem@nuts.davemloft.net +4 -0
# [IPV6]: In ndisc_netdev_event, handle NETDEV_DOWN.
#
# Based upon patches and commentary from Thomas Spatzier,
# Stephen Hemminger, and Andi Kleen.
#
diff -Nru a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
--- a/net/ipv6/ndisc.c Fri Apr 9 15:30:59 2004
+++ b/net/ipv6/ndisc.c Fri Apr 9 15:30:59 2004
@@ -1403,6 +1403,10 @@
neigh_changeaddr(&nd_tbl, dev);
fib6_run_gc(0);
break;
+ case NETDEV_DOWN:
+ neigh_ifdown(&nd_tbl, dev);
+ fib6_run_gc(0);
+ break;
default:
break;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-09 22:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-09 15:39 [PATCH] Force IPv6 FIB gc on device shutdown Andi Kleen
2004-04-09 22:31 ` David S. Miller
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).