xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: John Nemeth <jnemeth@cue.bc.ca>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH] libxl/netbsd: check num_exec in hotplug function
Date: Mon, 4 Jul 2016 14:02:54 +0200	[thread overview]
Message-ID: <20160704120254.rnvg65ceouzxonsh@mac> (raw)
In-Reply-To: <201607041156.u64BuXr6023630@server.cornerstoneservice.ca>

On Mon, Jul 04, 2016 at 04:56:33AM -0700, John Nemeth wrote:
> On Jul 4, 12:23pm, Wei Liu wrote:
> } On Mon, Jul 04, 2016 at 12:09:30PM +0100, Wei Liu wrote:
> } > On Mon, Jul 04, 2016 at 01:11:04AM -0700, John Nemeth wrote:
> } > > On Jul 2, 12:35pm, Wei Liu wrote:
> } > > } +        /*
> } > > } +         * If domain has a stubdom we don't have to execute hotplug scripts
> } > > } +         * for emulated interfaces
> } > > } +         */
> } > > } +        if ((num_exec > 1) ||
> } > > 
> } > >      The function is called with num_exec set to 0 and 1, so this
> } > > should be:
> } > > 
> } > >            if ((num_exec != 0) ||
> } > 
> } > AIUI this is related to how network is setup because we would need to
> } > hotplug both the emulated nic in QEMU and the PV nic. Is this line
> } > causing problem for you?
> } > 
> } > Wei.
> 
>      Yes, when the script is called the second time, it fails when
> trying to add the interface to the bridge and returns an error.
> This results in xl aborting the domU creation process and tearing
> it down.  If the script is supposed to be called twice, then there
> needs to be some way to distinguish the calls and what is supposed
> to happen during each call so the script can be adjusted.  The
> change above allowed me to bring up a domU and work with it (including
> network).  However, I only tested a PV domU, not an HVM one, so
> QEMU wasn't involved.

I've already replied to the other thread with the reason why this needs to 
be num_exec != 0 instead of num_exec > 1, and to avoid further confusion I 
would recommend Wei to add a comment here when the patch is updated, since 
this is a NetBSD-specific behavior that's not shared with other Dom0s:

http://lists.xenproject.org/archives/html/xen-devel/2016-07/msg00178.html

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-07-04 12:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201607040811.u648B4MN011551@server.cornerstoneservice.ca>
2016-07-04 11:09 ` [PATCH] libxl/netbsd: check num_exec in hotplug function Wei Liu
2016-07-04 11:23   ` Wei Liu
2016-07-04 11:56     ` John Nemeth
2016-07-04 12:02       ` Roger Pau Monné [this message]
2016-07-04 12:13 Wei Liu
2016-07-06 17:27 ` Wei Liu

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=20160704120254.rnvg65ceouzxonsh@mac \
    --to=roger.pau@citrix.com \
    --cc=jnemeth@cue.bc.ca \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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).