[Devel] Re: [PATCH 12/12 net-2.6.26] [ICMP6]: Consolidate fail path icmpv6_sk_init with icmpv6_sk_exit.

2008-02-29 Thread David Miller
From: "Denis V. Lunev" <[EMAIL PROTECTED]> Date: Sat, 01 Mar 2008 01:05:41 +0300 > Though, I have made a similar mistake in the IPv4 code. Pls consider > the patch attached. Applied and pushed out to net-2.6.26, thanks. ___ Containers mailing list [EMAI

[Devel] Re: [PATCH 12/12 net-2.6.26] [ICMP6]: Consolidate fail path icmpv6_sk_init with icmpv6_sk_exit.

2008-02-29 Thread Denis V. Lunev
On Fri, 2008-02-29 at 11:23 -0800, David Miller wrote: > From: "Denis V. Lunev" <[EMAIL PROTECTED]> > Date: Fri, 29 Feb 2008 16:40:58 +0300 > > > +static void __net_exit icmpv6_sk_exit(struct net *net) > > +{ > > Since you call this from __new_init code, won't this > create a section conflict whe

[Devel] Re: Purpose of __net_exit & friends

2008-02-29 Thread David Miller
From: Sam Ravnborg <[EMAIL PROTECTED]> Date: Fri, 29 Feb 2008 21:12:47 +0100 > On Fri, Feb 29, 2008 at 11:23:42AM -0800, David Miller wrote: > > From: "Denis V. Lunev" <[EMAIL PROTECTED]> > > Date: Fri, 29 Feb 2008 16:40:58 +0300 > > > > > +static void __net_exit icmpv6_sk_exit(struct net *net) >

[Devel] Purpose of __net_exit & friends [Was: [ICMP6]: Consolidate fail ...]

2008-02-29 Thread Sam Ravnborg
On Fri, Feb 29, 2008 at 11:23:42AM -0800, David Miller wrote: > From: "Denis V. Lunev" <[EMAIL PROTECTED]> > Date: Fri, 29 Feb 2008 16:40:58 +0300 > > > +static void __net_exit icmpv6_sk_exit(struct net *net) > > +{ > > Since you call this from __new_init code, won't this > create a section confl

[Devel] Re: [PATCH 9/12 net-2.6.26] [NETNS]: icmp(v6)_sk should not pin a namespace.

2008-02-29 Thread David Miller
From: "Denis V. Lunev" <[EMAIL PROTECTED]> Date: Fri, 29 Feb 2008 16:40:55 +0300 > So, change icmp(v6)_sk creation/disposal to the scheme used in the netlink > for rtnl, i.e. create a socket in the context of the init_net and > assign the namespace without getting a referrence later. > > Also use

[Devel] Re: [PATCH 12/12 net-2.6.26] [ICMP6]: Consolidate fail path icmpv6_sk_init with icmpv6_sk_exit.

2008-02-29 Thread David Miller
From: "Denis V. Lunev" <[EMAIL PROTECTED]> Date: Fri, 29 Feb 2008 16:40:58 +0300 > +static void __net_exit icmpv6_sk_exit(struct net *net) > +{ Since you call this from __new_init code, won't this create a section conflict when ipv6 is built statically into the kernel? ___

[Devel] Re: [PATCH 0/12 net-2.6.26] icmp_socket namespacing

2008-02-29 Thread David Miller
From: "Denis V. Lunev" <[EMAIL PROTECTED]> Date: Fri, 29 Feb 2008 16:39:20 +0300 > This set of patches is targeted to create separate icmp_socket inside > each namespace. Both IPv4 and IPv6 codepaths are affected. > > Though, in order to do this smoothly, a bit of optimisations are > performed. T

[Devel] Re: [RFC] [PATCH] Re: Prefixing cgroup generic control filenames with "cgroup."

2008-02-29 Thread Paul Jackson
> > 2) "[a-z]+\.[a-z]+(_[a-z]+)*" > > Why make it more complex? It's a trade-off, between how many names the pattern covers, and how complicated it is. I don't really have a preference between "[a-z].*", "[a-z]+\.[a-z_]+", or other variants. This sort of namespace partitioning is common in ot

[Devel] Re: [RFC] [PATCH] Re: Prefixing cgroup generic control filenames with "cgroup."

2008-02-29 Thread Paul Menage
On Fri, Feb 29, 2008 at 7:30 AM, Paul Jackson <[EMAIL PROTECTED]> wrote: > > The pattern might be stronger (more restrictive) than "[a-z].*" > > The pattern might be something like: > 1) the known set of existing names (a short, specific list), plus > 2) "[a-z]+\.[a-z]+(_[a-z]+)*" Why make i

[Devel] Re: [RFC] [PATCH] Re: Prefixing cgroup generic control filenames with "cgroup."

2008-02-29 Thread Paul Jackson
Paul M wrote: > Well, the additional components are called "groups" not "cgroups", but > basically yes. Ah yes - "groups" - right, sorry: /mnt/cgroup/groups/user_created_groupname1/groups/user_created_groupname2 > Yes, we could just say "the kernel reserves the right to use any names > that b

[Devel] [PATCH 8/12 net-2.6.26] Make netlink_kernel_release publically available as sk_release_kernel.

2008-02-29 Thread Denis V. Lunev
This staff will be needed for non-netlink kernel sockets, which should also not pin a namespace like tcp_socket and icmp_socket. Signed-off-by: Denis V. Lunev <[EMAIL PROTECTED]> Acked-by: Daniel Lezcano <[EMAIL PROTECTED]> --- include/net/sock.h | 13 + net/core/sock.c

[Devel] [PATCH 6/12 net-2.6.26] [ICMP]: Allocate data for __icmp(v6)_sk dynamically.

2008-02-29 Thread Denis V. Lunev
Own __icmp(v6)_sk should be present in each namespace. So, it should be allocated dynamically. Though, alloc_percpu does not fit the case as it implies additional dereferrence for no bonus. Allocate data for pointers just like __percpu_alloc_mask does and place pointers to struct sock into this ar

[Devel] [PATCH 4/12 net-2.6.26] [ICMP]: Store sock rather than socket for ICMP flow control.

2008-02-29 Thread Denis V. Lunev
Basically, there is no difference, what to store: socket or sock. Though, sock looks better as there will be 1 less dereferrence on the fast path. Signed-off-by: Denis V. Lunev <[EMAIL PROTECTED]> Acked-by: Daniel Lezcano <[EMAIL PROTECTED]> --- net/ipv4/icmp.c | 27 +--

[Devel] [PATCH 5/12 net-2.6.26] [ICMP]: Pass proper ICMP socket into icmp(v6)_xmit_(un)lock.

2008-02-29 Thread Denis V. Lunev
We have to get socket lock inside icmp(v6)_xmit_lock/unlock. The socket is get from global variable now. When this code became namespaces, one should pass a namespace and get socket from it. Though, above is useless. Socket is available in the caller, just pass it inside. This saves a bit of code

[Devel] [PATCH 3/12 net-2.6.26] [ICMP]: Optimize icmp_socket usage.

2008-02-29 Thread Denis V. Lunev
Use this macro only once in a function to save a bit of space. add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-98 (-98) function old new delta icmp_reply 562 561 -1 icmp_push_reply 305

[Devel] [PATCH 7/12 net-2.6.26] No need for a separate __netlink_release call.

2008-02-29 Thread Denis V. Lunev
Merge it to netlink_kernel_release. Signed-off-by: Denis V. Lunev <[EMAIL PROTECTED]> Acked-by: Daniel Lezcano <[EMAIL PROTECTED]> --- net/netlink/af_netlink.c | 30 -- 1 files changed, 12 insertions(+), 18 deletions(-) diff --git a/net/netlink/af_netlink.c b/net/ne

[Devel] [PATCH 2/12 net-2.6.26] [ICMP]: Add return code to icmp_init.

2008-02-29 Thread Denis V. Lunev
icmp_init could fail and this is normal for namespace other than initial. So, the panic should be triggered only on init_net initialization path. Additionally create rollback path for icmp_init as a separate function. It will also be used later during namespace destruction. Signed-off-by: Denis V

[Devel] [PATCH 11/12] [NETNS]: Make icmpv6_sk per namespace.

2008-02-29 Thread Denis V. Lunev
All preparations are done. Now just add a hook to perform an initialization on namespace startup and replace icmpv6_sk macro with proper inline call. Actual namespace the packet belongs too will be passed later along with the one for the routing. Signed-off-by: Denis V. Lunev <[EMAIL PROTECTED]> A

[Devel] [PATCH 1/12 net-2.6.26] [INET]: Remove struct net_proto_family* from _init calls.

2008-02-29 Thread Denis V. Lunev
struct net_proto_family* is not used in icmp[v6]_init, ndisc_init, igmp_init and tcp_v4_init. Remove it. Signed-off-by: Denis V. Lunev <[EMAIL PROTECTED]> Acked-by: Daniel Lezcano <[EMAIL PROTECTED]> --- include/linux/icmpv6.h |2 +- include/net/icmp.h |2 +- include/net/ndisc.h|

[Devel] [PATCH 10/12] [NETNS]: Make icmp_sk per namespace.

2008-02-29 Thread Denis V. Lunev
All preparations are done. Now just add a hook to perform an initialization on namespace startup and replace icmp_sk macro with proper inline call. Signed-off-by: Denis V. Lunev <[EMAIL PROTECTED]> Acked-by: Daniel Lezcano <[EMAIL PROTECTED]> --- include/net/netns/ipv4.h |2 + net/ipv4/icmp.c

[Devel] [PATCH 9/12 net-2.6.26] [NETNS]: icmp(v6)_sk should not pin a namespace.

2008-02-29 Thread Denis V. Lunev
So, change icmp(v6)_sk creation/disposal to the scheme used in the netlink for rtnl, i.e. create a socket in the context of the init_net and assign the namespace without getting a referrence later. Also use sk_release_kernel instead of sock_release to properly destroy such sockets. Signed-off-by:

[Devel] [PATCH 12/12 net-2.6.26] [ICMP6]: Consolidate fail path icmpv6_sk_init with icmpv6_sk_exit.

2008-02-29 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev <[EMAIL PROTECTED]> Acked-by: Daniel Lezcano <[EMAIL PROTECTED]> --- net/ipv6/icmp.c | 29 ++--- 1 files changed, 14 insertions(+), 15 deletions(-) diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 9f55a96..889769d 100644 --- a/net/ipv6/i

[Devel] [PATCH 0/12 net-2.6.26] icmp_socket namespacing

2008-02-29 Thread Denis V. Lunev
This set of patches is targeted to create separate icmp_socket inside each namespace. Both IPv4 and IPv6 codepaths are affected. Though, in order to do this smoothly, a bit of optimisations are performed. The kernel from now on will use sock rather than socket on the ICMP send path. Signed-off-by

[Devel] Re: [RFC] [PATCH] Re: Prefixing cgroup generic control filenames with "cgroup."

2008-02-29 Thread Paul Menage
On Thu, Feb 28, 2008 at 10:20 PM, Paul Jackson <[EMAIL PROTECTED]> wrote: > > For example, what would have been cgroup: > > /mnt/cgroup/user_created_groupname1/user_created_groupname2 > > now becomes: > > > /mnt/cgroup/cgroups/user_created_groupname1/cgroups/user_created_groupnam