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
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
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)
>
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
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
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?
___
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
> > 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
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
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
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
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
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 +--
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
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
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
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
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
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|
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
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:
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
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
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
24 matches
Mail list logo