netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: ebiederm@xmission.com (Eric W. Biederman)
Cc: Pavel Emelyanov <xemul@openvz.org>,
	Linux Netdev List <netdev@vger.kernel.org>,
	Linux Containers <containers@lists.osdl.org>,
	devel@openvz.org, Daniel Lezcano <dlezcano@fr.ibm.com>
Subject: Re: [PATCH][NETNS] Use list_for_each_entry_continue_reverse in setup_net
Date: Fri, 14 Sep 2007 22:07:14 +0200	[thread overview]
Message-ID: <20070914220714.3a1e87f8@oldman> (raw)
In-Reply-To: <m1lkb92tto.fsf@ebiederm.dsl.xmission.com>

On Fri, 14 Sep 2007 08:41:07 -0600
ebiederm@xmission.com (Eric W. Biederman) wrote:

> Stephen Hemminger <shemminger@linux-foundation.org> writes:
> 
> > On Fri, 14 Sep 2007 11:39:32 +0400
> > Pavel Emelyanov <xemul@openvz.org> wrote:
> >
> >> I proposed introducing a list_for_each_entry_continue_reverse
> >> macro to be used in setup_net() when unrolling the failed
> >> ->init callback.
> >> 
> >> Here is the macro and some more cleanup in the setup_net() itself
> >> to remove one variable from the stack :) Minor, but the code
> >> looks nicer.
> >> 
> >> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
> >
> > Maybe it is time to just eliminate the init hook from the API.
> > It has very few users, and there is no reason the setup needed
> > could be done before or after registering in most cases.
> 
> I guess only have 5 out of the 29 users I have in my full patchset
> is few.  But that is to be expected because so far only the core
> has been converted.
> 
> I looked again at the initialization to see if you had a point about
> the initialization but in every instance I looked at the function
> was performing work that needed to happen during the creation of
> each network namespace.  So the work very much needs to be done there.
> 
> Ok looking some more I can see why this isn't obvious yet.  copy_net_ns
> hasn't been merged yet, and that is where we create new network namespaces.
> And call setup_net on each new network namespace.
> 
> I will take a look at that patch and see if I can come up with a
> safe version of it to merge to allow for a little more transparency.

Could we just make it so dev->init is not allowed to fail? Then it
can be a void function and the nasty unwind code can go?

  reply	other threads:[~2007-09-14 20:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-14  7:39 [PATCH][NETNS] Use list_for_each_entry_continue_reverse in setup_net Pavel Emelyanov
2007-09-14 12:49 ` Stephen Hemminger
2007-09-14 14:41   ` Eric W. Biederman
2007-09-14 20:07     ` Stephen Hemminger [this message]
2007-09-14 21:53       ` Eric W. Biederman
2007-09-16 23:49       ` David Miller
2007-09-17  0:06         ` Eric W. Biederman
2007-09-17  0:07           ` David Miller
     [not found] ` <46EA3AB4.7060904-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-09-14 17:33   ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2007-09-17 11:02 Pavel Emelyanov
2007-09-17 13:07 ` Eric W. Biederman
2007-09-17 13:54   ` Pavel Emelyanov
2007-09-18  1:58   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070914220714.3a1e87f8@oldman \
    --to=shemminger@linux-foundation.org \
    --cc=containers@lists.osdl.org \
    --cc=devel@openvz.org \
    --cc=dlezcano@fr.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).