From: Ian Campbell <Ian.Campbell@citrix.com>
To: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 2 of 4 RFC] xl/remus: Network buffering cmdline switch, setup/teardown
Date: Mon, 29 Jul 2013 16:49:17 +0100 [thread overview]
Message-ID: <1375112957.12741.48.camel@kazak.uk.xensource.com> (raw)
In-Reply-To: <3cd67f6ff63a50808a74.1374736168@athos.nss.cs.ubc.ca>
On Thu, 2013-07-25 at 00:09 -0700, Shriram Rajagopalan wrote:
> Add appropriate code to xl_cmdline.c to setup network buffers for
> each vif belonging to the guest. Also provide a command line switch
> to explicitly "enable" network buffering.
>
> Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
>
> diff -r 3ae38cbe535c -r 3cd67f6ff63a tools/libxl/libxl_types.idl
> --- a/tools/libxl/libxl_types.idl Wed Jul 24 22:55:00 2013 -0700
> +++ b/tools/libxl/libxl_types.idl Thu Jul 25 00:02:19 2013 -0700
> @@ -521,6 +521,7 @@ libxl_domain_remus_info = Struct("domain
> ("interval", integer),
> ("blackhole", bool),
> ("compression", bool),
> + ("netbuf_iflist", libxl_string_list),
> ])
>
> libxl_event_type = Enumeration("event_type", [
> diff -r 3ae38cbe535c -r 3cd67f6ff63a tools/libxl/xl_cmdimpl.c
> --- a/tools/libxl/xl_cmdimpl.c Wed Jul 24 22:55:00 2013 -0700
> +++ b/tools/libxl/xl_cmdimpl.c Thu Jul 25 00:02:19 2013 -0700
> @@ -7039,10 +7039,109 @@ done:
> return ret;
> }
>
> +static char **get_guest_vifnames(uint32_t domid, int *num_vifs)
> +{
> + char **viflist;
> + libxl_device_nic *nics;
> + libxl_nicinfo nicinfo;
> + int nb, i;
> +
> + nics = libxl_device_nic_list(ctx, domid, &nb);
> + if (!nics) { *num_vifs = 0; return NULL;}
> +
> + viflist = calloc((nb + 1), sizeof(char *));
> + if (!viflist) {
> + perror("failed to allocate memory to hold vif names!");
> + exit(-1);
> + }
> +
> + for (i = 0; i < nb; ++i) {
> + if (!libxl_device_nic_getinfo(ctx, domid, &nics[i], &nicinfo)) {
> + if (asprintf(&viflist[i], "vif%u.%d", domid, nicinfo.devid) < 0) {
This doesn't account for the ifname field of the vif.
Also, I'm not sure how this is supposed to work when driver domains are
in use either, if this were done via libxl then it would naturally get
incorporated into Roger's work to make hotplug scripts etc work properly
with stub domains.
Most of the other comments I had would become invalid/irrelevant when
this was moved to libxl, since you'd naturally end up doing things
differently anyway.
Ian.
next prev parent reply other threads:[~2013-07-29 15:49 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-25 7:09 [PATCH 0 of 4 RFC] xl - Remus network buffering support Shriram Rajagopalan
2013-07-25 7:09 ` [PATCH 1 of 4 RFC] xl/remus : Network buffering setup helper functions Shriram Rajagopalan
2013-07-29 15:42 ` Ian Campbell
2013-07-29 18:00 ` Shriram Rajagopalan
2013-07-30 10:44 ` Ian Campbell
2013-07-25 7:09 ` [PATCH 2 of 4 RFC] xl/remus: Network buffering cmdline switch, setup/teardown Shriram Rajagopalan
2013-07-29 15:49 ` Ian Campbell [this message]
2013-07-29 19:00 ` Shriram Rajagopalan
2013-07-30 10:50 ` Ian Campbell
2013-07-30 15:25 ` Shriram Rajagopalan
2013-07-30 15:39 ` Ian Campbell
2013-07-25 7:09 ` [PATCH 3 of 4 RFC] xl/remus: Control network buffering in remus callbacks Shriram Rajagopalan
2013-07-29 16:06 ` Ian Campbell
2013-08-07 15:41 ` Ian Jackson
2013-08-07 15:38 ` Ian Jackson
2013-08-07 21:51 ` Shriram Rajagopalan
2013-08-08 11:07 ` Ian Jackson
2013-07-25 7:09 ` [PATCH 4 of 4 RFC] xl/remus: Add libnl3 dependency to autoconf scripts and libxl/Makefile Shriram Rajagopalan
2013-07-26 9:44 ` Wen Congyang
2013-07-26 13:51 ` Shriram Rajagopalan
2013-07-26 9:56 ` David Vrabel
2013-07-26 13:56 ` Shriram Rajagopalan
2013-07-29 5:58 ` Wen Congyang
2013-07-29 13:07 ` Shriram Rajagopalan
2013-07-29 15:41 ` David Vrabel
2013-07-30 16:11 ` [PATCH 0 of 4 RFC] xl - Remus network buffering support Roger Pau Monné
2013-07-31 8:33 ` Ian Campbell
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=1375112957.12741.48.camel@kazak.uk.xensource.com \
--to=ian.campbell@citrix.com \
--cc=rshriram@cs.ubc.ca \
--cc=stefano.stabellini@eu.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.