From: Olaf Hering <olaf@aepfle.de>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v4] tools: set migration constraints from cmdline
Date: Tue, 19 Feb 2013 15:12:19 +0100 [thread overview]
Message-ID: <20130219141219.GA31344@aepfle.de> (raw)
In-Reply-To: <1361274510.1051.99.camel@zakaz.uk.xensource.com>
On Tue, Feb 19, Ian Campbell wrote:
> > typedef struct {
> > int xlflags; /* LIBXL_SUSPEND_* */
>
> Why is this called "xlflags"? xl isn't the only user of this interface.
To make it clear that libxl is the consumer, not libxc. But I think the
comment above makes it clear that libxl flags are expected. I will
rename it to 'flags'.
> > int max_iters;
> > int max_factor;
> > } libxl_save_properties;
>
> s/save/suspend/ to match the function it is passed to? Perhaps
> libxl_domain_suspend_properties?
Will rename it to libxl_domain_suspend_properties.
> > int libxl_domain_suspend(libxl_ctx *ctx, uint32_t domid, int fd,
> > const libxl_save_properties *props,
> > const libxl_asyncop_how *ao_how)
> > LIBXL_EXTERNAL_CALLERS_ONLY;
> > #ifdef LIBXL_API_VERSION
> > #if LIBXL_API_VERSION == 0x040200
> > #define libxl_domain_suspend(__ctx, __domid, __fd, __flags, __ao_how) \
> > ({ \
> > libxl_save_properties __props = { .xlflags = (__flags) }; \
> > int __ret = libxl_domain_suspend((__ctx), (__domid), (__fd), &__props, (__ao_how)); \
> > __ret; \
> > })
> > #elif LIBXL_API_VERSION == 0x040300
> > static inline int libxl_domain_suspend_0x040300(libxl_ctx *ctx, uint32_t domid, int fd,
> > int flags, const libxl_asyncop_how *ao_how)
> > {
> > libxl_save_properties props = { .xlflags = flags };
> > return libxl_domain_suspend(ctx, domid, fd, &props, ao_how);
> > }
> > #define libxl_domain_suspend libxl_domain_suspend_0x040300
>
> I don't understand the need for this alternative, you are defining
> version 0x040300 in this patch and in the absence of LIBXL_API_VERSION
> this should therefore be the expected interface I think. We haven't
> released Xen 0x040300 yet.
Sorry, I was in a hurry and did not explain the stuff above properly
before sending the mail:
Both versions of a backwards compatible libxl_domain_suspend interface
work, they are here just for reference.
I like the static inline variant because its C and it does not depend on
the '({ ... })' syntax, which is a gcc feature AFAIK.
Olaf
next prev parent reply other threads:[~2013-02-19 14:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-28 17:32 [PATCH] tools: set migration constraints from cmdline Olaf Hering
2013-01-30 14:30 ` Ian Campbell
2013-01-30 16:43 ` Olaf Hering
2013-02-04 9:57 ` Olaf Hering
2013-02-04 12:54 ` Ian Campbell
2013-02-04 13:09 ` Olaf Hering
2013-02-04 13:14 ` Ian Campbell
2013-01-30 16:41 ` [PATCH v2] " Olaf Hering
2013-01-31 16:17 ` [PATCH v3] " Olaf Hering
2013-02-01 19:34 ` [PATCH v4] " Olaf Hering
2013-02-04 13:11 ` Ian Campbell
2013-02-04 13:41 ` Olaf Hering
2013-02-04 13:46 ` Ian Campbell
2013-02-04 13:55 ` Olaf Hering
2013-02-04 13:59 ` Ian Campbell
2013-02-04 18:43 ` Olaf Hering
2013-02-05 9:22 ` Ian Campbell
2013-02-05 10:16 ` Olaf Hering
2013-02-19 11:42 ` Olaf Hering
2013-02-19 11:48 ` Ian Campbell
2013-02-19 14:12 ` Olaf Hering [this message]
2013-02-05 10:03 ` [PATCH v5] " Olaf Hering
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=20130219141219.GA31344@aepfle.de \
--to=olaf@aepfle.de \
--cc=Ian.Campbell@citrix.com \
--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.