David S. Miller wrote:
From: Ben Greear <[EMAIL PROTECTED]>
Date: Tue, 07 Feb 2006 15:54:06 -0800
What do you think about having no ref counting, and upon removal of
a network device, we notify each logic unit that deals with skbs
or other things that link to the netdev and ask it to clean all
references to the NIC in question?
That's a lot of notifiers. Routes and neighbour cache entries are
relatively easy, and we do that today, but sockets and netfilter
can get really messy.
I ended up touching every part of the tree that grabbed or released
a netdevice when chasing down that arp-cache bug some months ago. It
is a bit of work, but it's not insurmountable. Allowing a notifier to
clean the references would probably be a similar amount of work, and
as you say, many modules already listen for the notifiers and clean up
their references accordingly.
At least some sockets (packet-sockets, for example)
don't keep actual netdev references, but just
use the ifindex. I'd personally prefer that they actually
hold a reference and listen to notifiers appropriately, but in this case,
it could make moving to a notifier scheme quicker.
I'm less sure about netfilter....
Thanks,
Ben
--
Ben Greear <[EMAIL PROTECTED]>
Candela Technologies Inc http://www.candelatech.com
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html