Date: Tue, 29 Dec 1998 14:50:05 -0600 (CST) From: Mike Spengler <mks@networkcs.com> To: imp@village.org (Warner Losh) Cc: peter@netplex.com.au, hackers@FreeBSD.ORG Subject: Re: How do I ... Message-ID: <199812292050.OAA25360@us.networkcs.com> In-Reply-To: <199812290558.WAA23091@harmony.village.org> from Warner Losh at "Dec 28, 98 10:58:00 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh said: > In message <199812290553.NAA70876@spinner.netplex.com.au> Peter Wemm writes: > : The catch is that the driver in question has to support unloading. All the > : existing network interfaces are pseudo-modules and only have a load > : routine. Obviously this requires a fair amount of work to detach a network > : interface from the stack (including cleaning up routing tables, pcbs, > : queued data, etc) - nobody has done this yet as far as I'm aware. I > : suspect there is a fair amount of infrastructure required to implement > : this. > > I suspect that you are right. I've been looking at all of the > existing drivers (since I'm writing a new one), and have found they > all cheat and use the compatibility cruft. And even if they didn't > cheat, they would have a heck of a time untangling things. > > I suspect that you are right. I had hoped to get away from > understanding those internals. It may make sense to have a "if_dead" > that is similar to deadfs where all "orphaned" interfaces go when they > die. Hmmm, I'll have to look at this more closely.... > We originally developed the HARP ATM code under SunOS using LKMs and supported loading/unloading the atm drivers. We had to include a lot of the necessary infrastructure stuff into our code. When we ported the code to FreeBSD, the PCI LKM stuff wasn't working and we knew that KLDs were the way of the future, so that currently the ATM drivers are kernel compiled only. However, nearly all of the load/unload code is still there (some of it ifdef'd out), waiting for us to do the KLD port (see atm_nif_detach() in sys/netatm/atm_if.c for one example). Some (most?) of this code should be genericized for all network drivers to use - if_detach() anyone? -- Mike Spengler Network Computing Services, Inc. Email: mks@networkcs.com 1200 Washington Ave. So. Phone: +1 612 337 3557 Minneapolis MN 55415 FAX: +1 612 337 3400 (aka Minnesota Supercomputer Center) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812292050.OAA25360>