[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1zm2q8sjm.fsf@ebiederm.dsl.xmission.com>
Date: Sat, 23 Jun 2007 11:55:09 -0600
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Stephen Hemminger <shemminger@...ux-foundation.org>
Cc: Ben Greear <greearb@...delatech.com>,
Patrick McHardy <kaber@...sh.net>, netdev@...r.kernel.org,
David Miller <davem@...emloft.net>, jamal <hadi@...erus.ca>,
Jeff Garzik <jeff@...zik.org>,
YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>,
Linux Containers <containers@...ts.osdl.org>
Subject: Re: [RFD] L2 Network namespace infrastructure
Stephen Hemminger <shemminger@...ux-foundation.org> writes:
> On Sat, 23 Jun 2007 08:20:40 -0700
> Ben Greear <greearb@...delatech.com> wrote:
>
>> Patrick McHardy wrote:
>> > Eric W. Biederman wrote:
>> >
>> >> -- The basic design
>> >>
>> >> There will be a network namespace structure that holds the global
>> >> variables for a network namespace, making those global variables
>> >> per network namespace.
>> >>
>> >> One of those per network namespace global variables will be the
>> >> loopback device. Which means the network namespace a packet resides
>> >> in can be found simply by examining the network device or the socket
>> >> the packet is traversing.
>> >>
>> >> Either a pointer to this global structure will be passed into
>> >> the functions that need to reference per network namespace variables
>> >> or a structure that is already passed in (such as the network device)
>> >> will be modified to contain a pointer to the network namespace
>> >> structure.
>> >>
>> >
>> >
>> > I believe OpenVZ stores the current namespace somewhere global,
>> > which avoids passing the namespace around. Couldn't you do this
>> > as well?
>
> Maybe the current namespace should be attached to something else
> like sysfs root? Having multiple namespace indirection possiblities
> leads to interesting cases where current namespace is not correctly
> associated with current sysfs tree or current proc tree, ...
Yes. There are some oddities there.
In my current tree there is code that makes proc and sysfs match the inspecting
process.
I haven't quite solved the inspection problem where we want to look at
the namespace of a different process. But as long as we have clean
code to do the basics that isn't a big leap when we come to it.
I'm not really seeing any problems along this line at this point.
The big problem at this point is code review and merging, and in
particular breaking this work up into small enough pieces that they
can be digested, successfully code reviewed and merged.
Eric
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists