All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org
Subject: Re: [PATCH] Skip down interfaces (v2)
Date: Thu, 01 Apr 2010 00:45:37 -0400	[thread overview]
Message-ID: <4BB424F1.90500@cs.columbia.edu> (raw)
In-Reply-To: <1270052634-8170-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>


Acked and pulled for v21-rc2, thanks.

Dan Smith wrote:
> This makes the netns checkpoint code skip interfaces that are not up.
> Later, we want to make it possible to checkpoint down interfaces with
> a flag, but for now this helps prevent people from getting stuck on
> stock kernels with various unsupported and persistent virtual interfaces,
> such as tunnel devices.
> 
> Changes in v2:
>  - Fix logic to only skip down interfaces if they're not supported
> 
> Signed-off-by: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> Acked-by: Serge Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> ---
>  net/checkpoint_dev.c |   11 ++++++++++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/net/checkpoint_dev.c b/net/checkpoint_dev.c
> index bc0415d..e8d574c 100644
> --- a/net/checkpoint_dev.c
> +++ b/net/checkpoint_dev.c
> @@ -268,7 +268,16 @@ int checkpoint_netns(struct ckpt_ctx *ctx, void *ptr)
>  		goto out;
>  
>  	for_each_netdev(net, dev) {
> -		ret = checkpoint_obj(ctx, dev, CKPT_OBJ_NETDEV);
> +		if (dev->netdev_ops->ndo_checkpoint)
> +			ret = checkpoint_obj(ctx, dev, CKPT_OBJ_NETDEV);
> +		else if (dev->flags & IFF_UP)
> +			ret = -ENOSYS;
> +		else
> +			/* TODO: There should be a flag to attempt a
> +			 * checkpoint of downed interfaces, regardless
> +			 * of whether they support checkpoint or not.
> +			 */
> +			ret = 0;
>  		if (ret < 0)
>  			break;
>  	}

  parent reply	other threads:[~2010-04-01  4:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31 16:23 [PATCH] Skip down interfaces (v2) Dan Smith
     [not found] ` <1270052634-8170-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-31 16:50   ` Serge E. Hallyn
2010-04-01  4:43   ` Oren Laadan
2010-04-01  4:45   ` Oren Laadan [this message]
2010-04-01 15:22   ` Brian Haley
     [not found]     ` <4BB4BA26.1050707-VXdhtT5mjnY@public.gmane.org>
2010-04-01 15:37       ` Serge E. Hallyn
2010-04-01 15:49       ` Dan Smith

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=4BB424F1.90500@cs.columbia.edu \
    --to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.