Date: Thu, 13 Jun 1996 06:37:33 -0700 From: Andrew McRae <amcrae@cisco.com> To: "Nate Williams" <nate@sneezy.sri.com> Cc: hackers@freebsd.org Subject: Re: gated & pccard don't get along Message-ID: <199606131337.GAA21556@doberman.cisco.com>
next in thread | raw e-mail | index | archive | help
nate@trout.sri.MT.net (Nate Williams): > [ Emailed to posted as well ] > In article <nq8W1m3@quack.kfu.com>, Nick Sayer <nsayer@quack.kfu.com> wrote: >>Perhaps it is too much to expect gated to deal with an interface >>suddenly appearing where it previously didn't exist. But if I >>boot my laptop without the Ethernet card in and then insert it, >>gated dumps core. Is there a fix for this? It's one of only two >>tiny problems left keeping this implementation from being perfect >>(the other being mss0's tendency to squeal when used). >> > > You could *hack* around the problem by making sure the card is always > attached at boot-time even if it's not found, so gatewd wouldn't hae a > new interface to deal with. The philosophy of pccard is that *any* card can be inserted at any time; it would be hard to ensure all the resources of all the possible cards are pre-allocated just in case. > > Or, you could work-qaround the problem and only startup gated when you > insert the pc-card. To be honest, I'm planning on doing more work on > getting better hooks setup for running/stopping things when the ethernet > cards are inserted/removed (setting up default routers, IPFW stuff, etc..). Having thought long and hard about this, I have come to the conclusion that having hot-swappable resources and interfaces is a great idea in theory, but the kernel (and parts of the user-land and daemons) generally assumes that devices are not going to appear and disappear at random intervals. It is pretty scary to think of the changes required to really make the system understand this concept fully. The net code is a good example; whilst the insert/remove scripts can already do some of these things (like add default routes etc.), we are really working with a bit of glue around the edges, and not tackling some of the core problems. One issue is the way various bits get informed about changes [e.g a card being pulled]. The need is for programs to be started or stopped, signals sent, kernel tables to be modified, daemons to be informed [e.g gated] etc. Berny Goodheart and I were talking about this, and his suggestion is to implement a registry scheme, I imagine with a graph of dependancies and some IPC etc. Tandem (Berny's employer) uses such a scheme to implement hot swap in their high availability architecture. Having worked on such a scheme myself, I appreciate the complexity. Unfortunately, you can't implement just a *little* bit of the scheme. If you do *any* form of hot swap, you have to go the whole hog. Cisco also support hot-swap, and even when it's designed in from day one, it is still a significant effort to make it work. So I guess I am saying that the little bit of glue around the edges is a pretty good scheme for FreeBSD, unless some serious effort is undertaken. Thus I would consider pccard to not really offer hot swap, but more of a `user friendly hardware bus'. Having said that, I think the glue holds together as much as can be expected :-) I am tempted to say, "It's not pccard's fault, but all the rest of the system for not handling hot swap". That is a comforting, but specious argument. I *am* glad to see it is being put to good use. > Nate Cheers, Andrew McRae (amcrae@cisco.com)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606131337.GAA21556>