From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH v1 04/11] xen-xsplice: Tool to manipulate xsplice payloads.
Date: Wed, 4 Nov 2015 16:27:41 -0500 [thread overview]
Message-ID: <20151104212741.GE16253@char.us.oracle.com> (raw)
In-Reply-To: <1446574568-9644-4-git-send-email-ross.lagerwall@citrix.com>
..snip..
Probably need this:
/* This value was choosen adhoc. It could be 42 too. */
> +#define MAX_LEN 11
> +static int list_func(int argc, char *argv[])
> +{
..snip..
> +
May be worth having an comment:
/* These MUST match to the 'action_options[]' array.
> +enum {
> + ACTION_APPLY = 0,
> + ACTION_REVERT = 1,
> + ACTION_UNLOAD = 2,
> + ACTION_CHECK = 3
And:
ACTION_REPLACE = 4,
> +};
> +
> +struct {
> + int allow; /* State it must be in to call function. */
> + int expected; /* The state to be in after the function. */
> + const char *name;
> + int (*function)(xc_interface *xch, char *id);
> + unsigned int executed; /* Has the function been called?. */
> +} action_options[] = {
> + { .allow = XSPLICE_STATE_CHECKED,
> + .expected = XSPLICE_STATE_APPLIED,
> + .name = "apply",
> + .function = xc_xsplice_apply,
> + },
> + { .allow = XSPLICE_STATE_APPLIED,
> + .expected = XSPLICE_STATE_CHECKED,
> + .name = "revert",
> + .function = xc_xsplice_revert,
> + },
> + { .allow = XSPLICE_STATE_CHECKED | XSPLICE_STATE_LOADED,
> + .expected = -ENOENT,
> + .name = "unload",
> + .function = xc_xsplice_unload,
> + },
> + { .allow = XSPLICE_STATE_CHECKED | XSPLICE_STATE_LOADED,
> + .expected = XSPLICE_STATE_CHECKED,
> + .name = "check",
> + .function = xc_xsplice_check
> + },
> + { .allow = XSPLICE_STATE_CHECKED,
> + .expected = XSPLICE_STATE_APPLIED,
> + .name = "replace",
> + .function = xc_xsplice_replace,
> + },
> +};
> +
May want to have a comment saying what the delay is in human
values. Minutes? Seconds? Days?
> +#define RETRIES 300
> +#define DELAY 100000
> +
We may want to add a comment:
/* There are functions in action_options that are called in case
* none of these match. */
> +struct {
> + const char *name;
> + int (*function)(int argc, char *argv[]);
> +} main_options[] = {
> + { "help", help_func },
> + { "list", list_func },
> + { "upload", upload_func },
> + { "all", all_func },
next prev parent reply other threads:[~2015-11-04 21:27 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 18:15 [PATCH v1 01/11] xsplice: Design document (v2) Ross Lagerwall
2015-11-03 18:15 ` [PATCH v1 02/11] xen/xsplice: Hypervisor implementation of XEN_XSPLICE_op Ross Lagerwall
2015-11-04 21:17 ` Konrad Rzeszutek Wilk
2015-11-12 16:28 ` Jan Beulich
2015-11-13 14:13 ` Konrad Rzeszutek Wilk
2015-11-13 23:50 ` Daniel De Graaf
2015-11-03 18:16 ` [PATCH v1 03/11] libxc: Implementation of XEN_XSPLICE_op in libxc Ross Lagerwall
2015-11-03 18:16 ` [PATCH v1 04/11] xen-xsplice: Tool to manipulate xsplice payloads Ross Lagerwall
2015-11-04 21:27 ` Konrad Rzeszutek Wilk [this message]
2015-11-03 18:16 ` [PATCH v1 05/11] elf: Add relocation types to elfstructs.h Ross Lagerwall
2015-11-05 10:38 ` Jan Beulich
2015-11-05 11:52 ` Ross Lagerwall
2015-11-03 18:16 ` [PATCH v1 06/11] xsplice: Add helper elf routines Ross Lagerwall
2015-11-04 21:49 ` Konrad Rzeszutek Wilk
2015-11-03 18:16 ` [PATCH v1 07/11] xsplice: Implement payload loading Ross Lagerwall
2015-11-04 22:21 ` Konrad Rzeszutek Wilk
2015-11-05 10:35 ` Jan Beulich
2015-11-05 11:51 ` Ross Lagerwall
2015-11-05 12:13 ` Jan Beulich
2015-11-05 11:15 ` Ross Lagerwall
2015-11-05 20:12 ` Konrad Rzeszutek Wilk
2015-11-03 18:16 ` [PATCH v1 08/11] xsplice: Implement support for applying patches Ross Lagerwall
2015-11-05 3:17 ` Konrad Rzeszutek Wilk
2015-11-05 11:45 ` Ross Lagerwall
2015-11-05 20:08 ` Konrad Rzeszutek Wilk
2015-11-05 3:19 ` Konrad Rzeszutek Wilk
2015-11-27 13:51 ` Martin Pohlack
2015-11-03 18:16 ` [PATCH v1 09/11] xsplice: Add support for bug frames Ross Lagerwall
2015-11-05 19:43 ` Konrad Rzeszutek Wilk
2015-11-03 18:16 ` [PATCH v1 10/11] xsplice: Add support for exception tables Ross Lagerwall
2015-11-05 19:47 ` Konrad Rzeszutek Wilk
2015-11-27 16:28 ` Martin Pohlack
2015-11-27 17:05 ` Ross Lagerwall
2015-11-03 18:16 ` [PATCH v1 11/11] xsplice: Add support for alternatives Ross Lagerwall
2015-11-05 19:48 ` Konrad Rzeszutek Wilk
2015-11-04 21:10 ` [PATCH v1 01/11] xsplice: Design document (v2) Konrad Rzeszutek Wilk
2015-11-05 10:49 ` Ross Lagerwall
2015-11-05 19:56 ` Konrad Rzeszutek Wilk
2015-11-10 9:55 ` Ross Lagerwall
2015-11-27 12:48 ` Martin Pohlack
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=20151104212741.GE16253@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=ross.lagerwall@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@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.