OpenVZ Forum


Home » Mailing lists » Devel » Re: [PATCH 10/12] L2 network namespace: playing with pass-through device
Re: [PATCH 10/12] L2 network namespace: playing with pass-through device [message #8983 is a reply to message #8980] Tue, 12 December 2006 14:10 Go to previous messageGo to previous message
Daniel Lezcano is currently offline  Daniel Lezcano
Messages: 417
Registered: June 2006
Senior Member
Dmitry Mishin wrote:
> On Tuesday 12 December 2006 16:59, Daniel Lezcano wrote:
>> Dmitry Mishin wrote:
>>> Temporary code to debug and play with pass-through device.
>>> Create device pair by
>>> modprobe veth
>>> echo 'add veth1 0:1:2:3:4:1 eth0 0:1:2:3:4:2' >/proc/net/veth_ctl
>>> and your shell will appear into a new namespace with `eth0' device.
>>> Configure device in this namespace
>>> ip l s eth0 up
>>> ip a a 1.2.3.4/24 dev eth0
>>> and in the root namespace
>>> ip l s veth1 up
>>> ip a a 1.2.3.1/24 dev veth1
>>> to establish a communication channel between root namespace and the newly
>>> created one.
>>>
>>> Code is done by Andrey Savochkin and ported by me over Cedric'c patchset
>>>
>>> Signed-off-by: Dmitry Mishin <dim@openvz.org>
>>>
>> [ ... ]
>>
>>> --- linux-2.6.19-rc6-mm2.orig/include/linux/net_namespace.h
>>> +++ linux-2.6.19-rc6-mm2/include/linux/net_namespace.h
>>> @@ -24,6 +24,9 @@ struct net_namespace {
>>> int fib4_trie_last_dflt;
>>> #endif
>>> unsigned int hash;
>>> + struct net_namespace *parent;
>>> + struct list_head child_list, sibling_list;
>>> + unsigned int id;
>>> };
>> Why do yo need to have a child list and sibling list ?
> Because of the level2<->level3 hierarchy, for example.

This hierarchy doesn't exist with ns->parent ? Do you have an example
when the hierarchy should be used ? I mean when we need to browse from
l2 -> l3 ?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: [PATCH 03/25] reintroduce list of vfsmounts over superblock
Next Topic: Re: Re: [patch -mm 08/17] nsproxy: add hashtable
Goto Forum:
  


Current Time: Thu Jul 24 11:39:44 GMT 2025

Total time taken to generate the page: 0.26823 seconds