From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Thu, 18 Dec 2008 10:03:15 -0800 From: "Russ Cox" To: "Devon H. O'Dell" Subject: Re: Help with device and clone? Cc: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> In-Reply-To: <9ab217670812180917j7230c2bbt76c426c314fa19df@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <9ab217670812172149j3f949775u747fbf0725da46cb@mail.gmail.com> <9ab217670812180917j7230c2bbt76c426c314fa19df@mail.gmail.com> Topicbox-Message-UUID: 68909aee-ead4-11e9-9d60-3106f5b1d025 > So the problem turned out to be that somehow, when ethermediumlink() > is called, its view of the namespace doesn't include /net as a > separate mount. So I figured the devroot reset routine was getting > called somehow after all the ip stuff attached. I reordered stuff to > attempt to guarantee this wasn't the case, but didn't have much luck > with that either. However, manually changing all the chandial lines to > use #l/ether0 (instead of argv[2], which was /net/ether0) causes stuff > to `just work'. > > Clearly my idea of what's happening in what order is kind of screwy. > I've plopped things in various orders, but the only way things are > running is if I use that hack. I see that '#l' is bound to /net in > /lib/namespace, so it's happening before rio starts (and even if > that's not where that happened; I put a bind -a '#l' /net in > /usr/glenda/lib/profile prior to rio starting and that didn't help). > Regarding the order of things: > > I'm calling links() after initseg() as it is in Plan 9's main.c; > inside links(), I call ethervelink() (my virtual ethernet driver), > ethermediumlink(), netdevmediumlink() and loopbackmediumlink(). > > Any ideas now that the issue is a bit less arcane? The link routines happen very early, before any user code has run. /lib/namespace is processed by user code. So when the links are running, I think it is simply that there is nothing bound to /net. Russ