All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: Wei Liu <wei.liu2@citrix.com>, xen-devel@lists.xen.org
Subject: Re: libxl_device handling for nic and vtmp
Date: Thu, 18 Feb 2016 17:25:56 +0000	[thread overview]
Message-ID: <20160218172556.GL3723@citrix.com> (raw)
In-Reply-To: <20160218171907.GA9285@aepfle.de>

On Thu, Feb 18, 2016 at 06:19:07PM +0100, Olaf Hering wrote:
> On Thu, Feb 18, Wei Liu wrote:
> 
> > Sorry I don't follow. What do you mean by 1:1 copy? Why does it make the
> > update unnecessary?
> 
> The current code does:
> 
>   libxl_device_nic_init(&nic_saved);
>   libxl_device_nic_copy(CTX, &nic_saved, nic);
>   nic->devid = libxl__device_nextid(gc, domid, "vif");
>   libxl__update_config_nic(gc, &nic_saved, nic);
> 
> Which is equivalent to the more obvious version:
> 
>   libxl_device_nic_init(&nic_saved);
>   nic->devid = libxl__device_nextid(gc, domid, "vif");
>   libxl_device_nic_copy(CTX, &nic_saved, nic);
> 
> The input gets modified either way. Is it expected that future versions
> of libxl_device_nic/vtmp_copy will not duplicate the mac/uuid parts?
> 

You missed libxl__device_nic_setdefault -- it changes fields in the
structure.

Wei.

> 
> Olaf

      reply	other threads:[~2016-02-18 17:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 15:13 libxl_device handling for nic and vtmp Olaf Hering
2016-02-18 15:52 ` Wei Liu
2016-02-18 16:54   ` Olaf Hering
2016-02-18 17:02     ` Wei Liu
2016-02-18 17:19       ` Olaf Hering
2016-02-18 17:25         ` Wei Liu [this message]

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=20160218172556.GL3723@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=olaf@aepfle.de \
    --cc=xen-devel@lists.xen.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.