Re: [PATCH 5/9] network namespaces: async socket operations

2006-09-23 Thread Andrey Savochkin
On Fri, Sep 22, 2006 at 05:33:56PM +0200, Daniel Lezcano wrote: > Andrey Savochkin wrote: > > Non-trivial part of socket namespaces: asynchronous events > > should be run in proper context. > > > > Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> > &g

Re: [PATCH 4/9] network namespaces: socket hashes

2006-09-20 Thread Andrey Savochkin
Hi, On Mon, Sep 18, 2006 at 05:12:49PM +0200, Daniel Lezcano wrote: > Andrey Savochkin wrote: > > Socket hash lookups are made within namespace. > > Hash tables are common for all namespaces, with > > additional permutation of indexes. > > Hi Andrey, > > why

Re: [PATCH 3/9] network namespaces: playing and debugging

2006-08-16 Thread Andrey Savochkin
On Wed, Aug 16, 2006 at 11:22:28AM -0600, Eric W. Biederman wrote: > Stephen Hemminger <[EMAIL PROTECTED]> writes: > > > On Tue, 15 Aug 2006 18:48:43 +0400 > > Andrey Savochkin <[EMAIL PROTECTED]> wrote: > > > >> Temporary code to play with ne

[PATCH 8/9] network namespaces: device to pass packets between namespaces

2006-08-16 Thread Andrey Savochkin
A simple device to pass packets between a namespace and its child. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- Makefile |3 veth.c | 327 +++ 2 files changed, 330 insertions(+) --- ./drivers/net/Makefile.

[PATCH 9/9] network namespaces: playing with pass-through device

2006-08-16 Thread Andrey Savochkin
ace 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. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED

[PATCH 4/9] network namespaces: socket hashes

2006-08-16 Thread Andrey Savochkin
Socket hash lookups are made within namespace. Hash tables are common for all namespaces, with additional permutation of indexes. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- include/linux/ipv6.h |3 ++- include/net/inet6_hashtables.h |6 -- inclu

[PATCH 6/9] allow proc_dir_entries to have destructor

2006-08-16 Thread Andrey Savochkin
Destructor field added proc_dir_entries, standard destructor kfree'ing data introduced. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- fs/proc/generic.c | 10 -- fs/proc/root.c |1 + include/linux/proc_fs.h |4 3 files changed, 13 inser

[PATCH 2/9] network namespaces: IPv4 routing

2006-08-16 Thread Andrey Savochkin
Structures related to IPv4 rounting (FIB and routing cache) are made per-namespace. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- include/linux/net_ns.h | 10 +++ include/net/flow.h |3 + include/net/ip_fib.h | 46 net/core/dev.c

[PATCH 1/9] network namespaces: core and device list

2006-08-16 Thread Andrey Savochkin
CONFIG_NET_NS and net_namespace structure are introduced. List of network devices is made per-namespace. Each namespace gets its own loopback device. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- drivers/net/loopback.c| 69 - include/linux/init_task.h

[PATCH 3/9] network namespaces: playing and debugging

2006-08-16 Thread Andrey Savochkin
ping -n 1.2.3.4 Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- dev.c | 20 1 files changed, 20 insertions(+) --- ./net/core/dev.c.vensxdbg Tue Aug 15 13:46:44 2006 +++ ./net/core/dev.cTue Aug 15 13:46:44 2006 @@ -3597,6 +3597,8 @@ int net_ns_start(vo

[PATCH 7/9] net_device seq_file

2006-08-16 Thread Andrey Savochkin
Library function to create a seq_file in proc filesystem, showing some information for each netdevice. This code is present in the kernel in about 10 instances, and all of them can be converted to using introduced library function. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- i

[PATCH 5/9] network namespaces: async socket operations

2006-08-16 Thread Andrey Savochkin
Non-trivial part of socket namespaces: asynchronous events should be run in proper context. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- af_inet.c| 10 ++ inet_timewait_sock.c |8 tcp_timer.c |9 + 3 files changed, 27 inse

[RFC] network namespaces

2006-08-16 Thread Andrey Savochkin
Hi All, I'd like to resurrect our discussion about network namespaces. In our previous discussions it appeared that we have rather polar concepts which seemed hard to reconcile. Now I have an idea how to look at all discussed concepts to enable everyone's usage scenario. 1. The most straightforwa

Re: [patch 1/7] net_device list cleanup: core

2006-07-09 Thread Andrey Savochkin
On Sat, Jul 08, 2006 at 01:48:13AM +0900, YOSHIFUJI Hideaki / [EMAIL PROTECTED](B wrote: > In article <[EMAIL PROTECTED]> (at Fri, 7 Jul 2006 11:54:25 +0400), Andrey > Savochkin <[EMAIL PROTECTED]> says: > > > On Fri, Jul 07, 2006 at 01:34:34PM +0900, YOSHIFUJI Hide

Re: [patch 1/7] net_device list cleanup: core

2006-07-07 Thread Andrey Savochkin
On Fri, Jul 07, 2006 at 01:34:34PM +0900, YOSHIFUJI Hideaki / [EMAIL PROTECTED](B wrote: > In article <[EMAIL PROTECTED]> (at Mon, 3 Jul 2006 12:18:51 +0400), Andrey > Savochkin <[EMAIL PROTECTED]> says: > > > @@ -3271,22 +3277,22 @@ int unregister_netdevice(struct ne

Re: [patch 1/7] net_device list cleanup: core

2006-07-05 Thread Andrey Savochkin
On Tue, Jul 04, 2006 at 08:35:37PM +0400, A.N.Kuznetsov wrote: > > > Different modules want different kinds of lookup. > > So, I'm thinking about something like ilookup5. > > > The next question: would people agree to review a patch doing this for > > net_devices? :) > > One not original sug

Re: [patch 1/7] net_device list cleanup: core

2006-07-04 Thread Andrey Savochkin
On Tue, Jul 04, 2006 at 10:10:03AM +0100, Christoph Hellwig wrote: > On Tue, Jul 04, 2006 at 11:24:05AM +0400, Andrey Savochkin wrote: > > > Yes, it's a little more work as you need to audit all drivers to see what > > > they are doing and find suitable abstractions

Re: [patch 1/7] net_device list cleanup: core

2006-07-04 Thread Andrey Savochkin
Christoph, On Mon, Jul 03, 2006 at 06:46:50PM +0100, Christoph Hellwig wrote: > On Mon, Jul 03, 2006 at 12:18:51PM +0400, Andrey Savochkin wrote: > > Cleanup of net_device list use in net_dev core and IP. > > The cleanup consists of > > - converting the to list_head, to

[patch 3/7] net_device list cleanup: netlink_dump

2006-07-03 Thread Andrey Savochkin
list_for_each. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- core/rtnetlink.c | 18 ++ ipv4/devinet.c | 14 -- ipv6/addrconf.c | 20 +--- sched/sch_api.c |8 ++-- 4 files changed, 37 insertions(+), 23 deletions(-) --- ./ne

[patch 6/7] net_device list cleanup: dev_base removal

2006-07-03 Thread Andrey Savochkin
. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- include/linux/netdevice.h |2 -- net/core/dev.c| 21 - 2 files changed, 23 deletions(-) --- ./include/linux/netdevice.h.vedevbase-fin Mon Jul 3 16:16:28 2006 +++ ./include/linux/netdevice.h M

[patch 2/7] net_device list cleanup: proc seq_file output

2006-07-03 Thread Andrey Savochkin
(thus making remove operation O(1)), and list walks more readable; - introducing of for_each_netdev wrapper over list_for_each. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- Note: functions covered by this patch are good candidates for further restructuring by introduction of &q

[patch 7/7] net_device list cleanup: debugging

2006-07-03 Thread Andrey Savochkin
Optional code to catch cases when loop cursor is used after for_each_netdev loop: often it's a sign of a bug, since it isn't guaranteed to point to a device. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- If anyone wants to keep this under some debug config option, let m

[patch 4/7] net_device list cleanup: drivers and non-IP protocols

2006-07-03 Thread Andrey Savochkin
list_for_each. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- Requires "bridge: br_dump_ifinfo index fix" drivers/net/wireless/strip.c |4 +--- net/8021q/vlan.c |4 ++-- net/8021q/vlanproc.c | 10 +- net/bridge/br_if.c |4

[patch 5/7] net_device list cleanup: arch-dependent code and block devices

2006-07-03 Thread Andrey Savochkin
. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- arch/s390/appldata/appldata_net_sum.c |2 +- arch/sparc64/solaris/ioctl.c |2 +- drivers/block/aoe/aoecmd.c|8 ++-- drivers/parisc/led.c |2 +- 4 files changed, 9 insertions(+), 5 del

[patch 1/7] net_device list cleanup: core

2006-07-03 Thread Andrey Savochkin
Cleanup of net_device list use in net_dev core and IP. The cleanup consists of - converting the to list_head, to make the list double-linked (thus making remove operation O(1)), and list walks more readable; - introducing of for_each_netdev wrapper over list_for_each. Signed-off-by: Andrey

Re: strict isolation of net interfaces

2006-07-03 Thread Andrey Savochkin
Sam, Serge, Cedric, On Fri, Jun 30, 2006 at 02:49:05PM +1200, Sam Vilain wrote: > Serge E. Hallyn wrote: > > The last one in your diagram confuses me - why foo0:1? I would > > have thought it'd be > > > > host | guest 0 | guest 1 | guest2 > > --+-

[patch] bridge: br_dump_ifinfo index fix

2006-07-03 Thread Andrey Savochkin
Fix for inability of br_dump_ifinfo to handle non-zero start index: loop index never increases when entered with non-zero start. Spotted by Kirill Korotaev. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> Cc: Kirill Korotaev <[EMAIL PROTECTED]> --- Against 2.6.17-mm6 ---

Re: [patch 2/6] [Network namespace] Network device sharing by view

2006-06-30 Thread Andrey Savochkin
Jamal, On Fri, Jun 30, 2006 at 09:50:52AM -0400, jamal wrote: > > BTW - I was just looking at openvz, very impressive. To the other folks, Thanks! > I am not putting down any of your approaches - just havent > had time to study them. Andrey, this is the same thing you guys have > been working o

Re: [patch 2/6] [Network namespace] Network device sharing by view

2006-06-30 Thread Andrey Savochkin
Hi Jamal, On Thu, Jun 29, 2006 at 08:15:52PM -0400, jamal wrote: > On Fri, 2006-30-06 at 09:07 +1200, Sam Vilain wrote: [snip] > > We plan to have them separate - so for > > that to work, each network namespace could have an arbitrary "prefix" > > that determines what the interface name will look

Re: Network namespaces a path to mergable code.

2006-06-28 Thread Andrey Savochkin
On Wed, Jun 28, 2006 at 12:14:41PM -0600, Eric W. Biederman wrote: > Andrey Savochkin <[EMAIL PROTECTED]> writes: > > > On Wed, Jun 28, 2006 at 10:51:26AM -0600, Eric W. Biederman wrote: > >> Andrey Savochkin <[EMAIL PROTECTED]> writes: > >> > >>

Re: Network namespaces a path to mergable code.

2006-06-28 Thread Andrey Savochkin
Hi Eric, On Wed, Jun 28, 2006 at 10:51:26AM -0600, Eric W. Biederman wrote: > Andrey Savochkin <[EMAIL PROTECTED]> writes: > > > One possible option to resolve this question is to show 2 relatively short > > patches just introducing namespaces for sockets in 2 ways: wi

Re: [patch 2/6] [Network namespace] Network device sharing by view

2006-06-28 Thread Andrey Savochkin
On Wed, Jun 28, 2006 at 12:17:35PM -0400, jamal wrote: > > On Wed, 2006-28-06 at 18:19 +0400, Andrey Savochkin wrote: > > > > Seeing guestXX-eth0 interfaces by standard tools has certain attractive > > sides. But it creates a lot of undesired side effects. > > >

Re: [patch 3/4] Network namespaces: IPv4 FIB/routing in namespaces

2006-06-28 Thread Andrey Savochkin
Daniel, On Wed, Jun 28, 2006 at 03:51:32PM +0200, Daniel Lezcano wrote: > Daniel Lezcano wrote: > > Andrey Savochkin wrote: > > > >> Structures related to IPv4 rounting (FIB and routing cache) > >> are made per-namespace. > > Hi Andrey, > > if the

Re: [patch 2/6] [Network namespace] Network device sharing by view

2006-06-28 Thread Andrey Savochkin
Hi Jamal, On Wed, Jun 28, 2006 at 09:53:23AM -0400, jamal wrote: > > On Wed, 2006-28-06 at 15:36 +0200, Herbert Poetzl wrote: > > > note: personally I'm absolutely not against virtualizing > > the device names so that each guest can have a separate > > name space for devices, but there should be

Re: Network namespaces a path to mergable code.

2006-06-28 Thread Andrey Savochkin
Hi Eric, On Tue, Jun 27, 2006 at 10:20:32PM -0600, Eric W. Biederman wrote: > Andrey Savochkin <[EMAIL PROTECTED]> writes: [snip] > > My first patchset covers devices but not sockets. > > The only difference from what you're suggesting is ipv4 routing. > > For m

Re: Network namespaces a path to mergable code.

2006-06-27 Thread Andrey Savochkin
Eric, On Tue, Jun 27, 2006 at 11:20:40AM -0600, Eric W. Biederman wrote: > > Thinking about this I am going to suggest a slightly different direction > for get a patchset we can merge. > > First we concentrate on the fundamentals. > - How we mark a device as belonging to a specific network names

Re: [patch 2/6] [Network namespace] Network device sharing by view

2006-06-27 Thread Andrey Savochkin
Herbert, On Tue, Jun 27, 2006 at 05:48:19PM +0200, Herbert Poetzl wrote: > On Tue, Jun 27, 2006 at 01:09:11PM +0400, Andrey Savochkin wrote: > > > > On Mon, Jun 26, 2006 at 10:02:25PM +0200, Herbert Poetzl wrote: > > > > > > - traffic between guests > &

Re: [patch 2/6] [Network namespace] Network device sharing by view

2006-06-27 Thread Andrey Savochkin
Daniel, On Tue, Jun 27, 2006 at 01:21:02PM +0200, Daniel Lezcano wrote: > >>>My point is that if you make namespace tagging at routing time, and > >>>your packets are being routed only once, you lose the ability > >>>to have separate routing tables in each namespace. > >> > >>Right. What is the ad

Re: [patch 2/6] [Network namespace] Network device sharing by view

2006-06-27 Thread Andrey Savochkin
On Tue, Jun 27, 2006 at 11:34:36AM +0200, Daniel Lezcano wrote: > Andrey Savochkin wrote: > > Daniel, > > > > On Mon, Jun 26, 2006 at 05:49:41PM +0200, Daniel Lezcano wrote: > > > >>>Then you lose the ability for each namespace to have its own routing

Re: [patch 3/4] Network namespaces: IPv4 FIB/routing in namespaces

2006-06-27 Thread Andrey Savochkin
On Mon, Jun 26, 2006 at 10:05:14PM +0200, Herbert Poetzl wrote: > On Mon, Jun 26, 2006 at 04:56:46PM +0200, Daniel Lezcano wrote: > > Andrey Savochkin wrote: > > >Structures related to IPv4 rounting (FIB and routing cache) > > >are made per-namespace. > > &g

Re: [patch 2/6] [Network namespace] Network device sharing by view

2006-06-27 Thread Andrey Savochkin
Herbert, On Mon, Jun 26, 2006 at 10:02:25PM +0200, Herbert Poetzl wrote: > > keep in mind that you actually have three kinds > of network traffic on a typical host/guest system: > > - traffic between unit and outside >- host traffic should be quite minimal >- guest traffic will be quite

Re: [patch 2/6] [Network namespace] Network device sharing by view

2006-06-27 Thread Andrey Savochkin
Daniel, On Mon, Jun 26, 2006 at 05:49:41PM +0200, Daniel Lezcano wrote: > > > Then you lose the ability for each namespace to have its own routing > > entries. > > Which implies that you'll have difficulties with devices that should exist > > and be visible in one namespace only (like tunnels),

Re: [patch 1/4] Network namespaces: cleanup of dev_base list use

2006-06-26 Thread Andrey Savochkin
Eric, On Mon, Jun 26, 2006 at 10:26:23AM -0600, Eric W. Biederman wrote: > Andrey Savochkin <[EMAIL PROTECTED]> writes: > > > On Mon, Jun 26, 2006 at 09:13:52AM -0600, Eric W. Biederman wrote: > >> > >> There is another topic for discussion in this patch a

Re: [patch 3/4] Network namespaces: IPv4 FIB/routing in namespaces

2006-06-26 Thread Andrey Savochkin
On Mon, Jun 26, 2006 at 05:57:01PM +0200, Daniel Lezcano wrote: > Andrey Savochkin wrote: > > On Mon, Jun 26, 2006 at 04:56:46PM +0200, Daniel Lezcano wrote: > >> > >>How do you handle ICMP_REDIRECT ? > > > > > > Are you talking about routing cache

Re: [patch 4/4] Network namespaces: playing and debugging

2006-06-26 Thread Andrey Savochkin
On Mon, Jun 26, 2006 at 07:29:57PM +0200, Daniel Lezcano wrote: > >>>Do > >>> exec 7< /proc/net/net_ns > >>>in your bash shell and you'll get a brand new network namespace. > >>>There you can, for example, do > >>> ip link set lo up > >>> ip addr list > >>> ip addr add 1.2.3.4 dev lo > >>>

Re: [patch 3/4] Network namespaces: IPv4 FIB/routing in namespaces

2006-06-26 Thread Andrey Savochkin
On Mon, Jun 26, 2006 at 04:56:46PM +0200, Daniel Lezcano wrote: > Andrey Savochkin wrote: > > Structures related to IPv4 rounting (FIB and routing cache) > > are made per-namespace. > > How do you handle ICMP_REDIRECT ? Are you talking about routing cache entries created

Re: [patch 4/4] Network namespaces: playing and debugging

2006-06-26 Thread Andrey Savochkin
On Mon, Jun 26, 2006 at 05:04:29PM +0200, Daniel Lezcano wrote: > Andrey Savochkin wrote: > > Temporary code to play with network namespaces in the simplest way. > > Do > > exec 7< /proc/net/net_ns > > in your bash shell and you'll get a brand new networ

Re: [patch 1/4] Network namespaces: cleanup of dev_base list use

2006-06-26 Thread Andrey Savochkin
Hi Eric, On Mon, Jun 26, 2006 at 09:13:52AM -0600, Eric W. Biederman wrote: > Andrey Savochkin <[EMAIL PROTECTED]> writes: > > > Cleanup of dev_base list use, with the aim to make device list > > per-namespace. > > In almost every occasion, use of dev_base

Re: [patch 2/6] [Network namespace] Network device sharing by view

2006-06-26 Thread Andrey Savochkin
Daniel, On Mon, Jun 26, 2006 at 04:56:32PM +0200, Daniel Lezcano wrote: > Andrey Savochkin wrote: > > > > It's good that you kicked off network namespace discussion. > > Although I wish you'd Cc'ed someone at OpenVZ so I could notice it earlier > > :).

Re: [patch 2/6] [Network namespace] Network device sharing by view

2006-06-26 Thread Andrey Savochkin
Hi Herbert, On Mon, Jun 26, 2006 at 03:02:03PM +0200, Herbert Poetzl wrote: > On Mon, Jun 26, 2006 at 01:47:11PM +0400, Andrey Savochkin wrote: > > > I see a fundamental problem with this approach. When a device presents > > an skb to the protocol layer, it needs to know to wh

[patch 3/4] Network namespaces: IPv4 FIB/routing in namespaces

2006-06-26 Thread Andrey Savochkin
Structures related to IPv4 rounting (FIB and routing cache) are made per-namespace. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- include/linux/net_ns.h |9 +++ include/net/flow.h |3 + include/net/ip_fib.h | 62 - net/core

[patch 4/4] Network namespaces: playing and debugging

2006-06-26 Thread Andrey Savochkin
ping -n 1.2.3.4 Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- dev.c | 27 ++- 1 files changed, 26 insertions, 1 deletion --- ./net/core/dev.c.vensdbgFri Jun 23 11:50:16 2006 +++ ./net/core/dev.cFri Jun 23 11:50:40 2006 @@ -3444,6 +3444,8 @@ in

[patch 2/4] Network namespaces: cleanup of dev_base list use

2006-06-26 Thread Andrey Savochkin
ts in softirq. Signed-off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- drivers/net/loopback.c| 70 +++ include/linux/init_task.h |9 ++ include/linux/net_ns.h| 88 include/linux/netdevice.h | 20 - include/linux/nsproxy.h |

[patch 1/4] Network namespaces: cleanup of dev_base list use

2006-06-26 Thread Andrey Savochkin
off-by: Andrey Savochkin <[EMAIL PROTECTED]> --- arch/s390/appldata/appldata_net_sum.c |2 arch/sparc64/solaris/ioctl.c |2 drivers/block/aoe/aoecmd.c|8 ++- drivers/net/wireless/strip.c |4 - drivers/parisc/led.c |2 incl

Re: [patch 2/6] [Network namespace] Network device sharing by view

2006-06-26 Thread Andrey Savochkin
Hi Daniel, It's good that you kicked off network namespace discussion. Although I wish you'd Cc'ed someone at OpenVZ so I could notice it earlier :). Indeed, the first point to agree in this discussion is device list. In your patch, you essentially introduce a data structure parallel to the main