xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2 3/4] xl: add vif.default.bridge
Date: Wed, 13 Mar 2013 17:40:18 +0100	[thread overview]
Message-ID: <5140ABF2.2020001@citrix.com> (raw)
In-Reply-To: <1363105516.32410.38.camel@zakaz.uk.xensource.com>

On 12/03/13 17:25, Ian Campbell wrote:
> On Wed, 2013-02-06 at 18:04 +0000, Roger Pau Monne wrote:
>> This is a replacement for defaultbridge xl.conf option. The now
>> deprecated defaultbridge is still supported.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>> Cc: George Dunlap <George.Dunlap@eu.citrix.com>
>> Cc: Ian Campbell <ian.campbell@citrix.com>
>> ---
>>  tools/examples/xl.conf |    3 +++
>>  tools/libxl/xl.c       |   13 +++++++++++--
> 
> No change to docs/man/xl.conf.pod.5? 

My bad, I'm going to add it now.

> 2 files changed, 14 insertions(+),
> 2 deletions(-)
>>
>> diff --git a/tools/examples/xl.conf b/tools/examples/xl.conf
>> index 9a03fff..4451176 100644
>> --- a/tools/examples/xl.conf
>> +++ b/tools/examples/xl.conf
>> @@ -23,3 +23,6 @@
>>  
>>  # default gateway device to use with vif-route hotplug script
>>  #vif.default.gatewaydev="eth0"
>> +
>> +# default bridge device to use with vif-bridge hotplug scripts
>> +#vif.default.bridge="bridge0"
> 
> Common names (at least in Linux-land) are "xenbr0" and "br0". Unless
> this conflicts massively with *BSD perhaps using one of those would be
> useful?

I use bridgeX on both Linux and BSD, but that's just my choice. br0 or
xenbr0 is probably more common, so I'm going to change it.

> 
> 
>> diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c
>> index f657216..100ab32 100644
>> --- a/tools/libxl/xl.c
>> +++ b/tools/libxl/xl.c
>> @@ -89,8 +89,17 @@ static void parse_global_config(const char *configfile,
>>      if (!xlu_cfg_get_string (config, "vifscript", &buf, 0))
>>          default_vifscript = strdup(buf);
>>  
>> -    if (!xlu_cfg_get_string (config, "defaultbridge", &buf, 0))
>> -	default_bridge = strdup(buf);
>> +    if (!xlu_cfg_get_string (config, "defaultbridge", &buf, 0)) {
>> +        fprintf(stderr, "the global config option defaultbridge is deprecated, "
>> +                        "please switch to vif.default.bridge\n");
>> +        free(default_bridge);
>> +        default_bridge = strdup(buf);
>> +    }
>> +
>> +    if (!xlu_cfg_get_string (config, "vif.default.bridge", &buf, 0)) {
>> +        free(default_bridge);
>> +        default_bridge = strdup(buf);
>> +    }
> 
> Put else if (!xlu.... ("defaultbridge")... ) here instead of above so we
> only warn if the user gave defaultbridge but not vif.default.bridge?

Since "defaultbridge" is now deprecated I think we should warn the user
about it, even if vif.default.bridge is also specified (which also
doesn't make much sense to use both)


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

  reply	other threads:[~2013-03-13 16:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 18:04 [PATCH v2 0/4] add vif-route support to libxl/xl Roger Pau Monne
2013-02-06 18:04 ` [PATCH v2 1/4] xl/libxl: add gatewaydev/netdev to vif specification Roger Pau Monne
2013-03-12 16:20   ` Ian Campbell
2013-02-06 18:04 ` [PATCH v2 2/4] xl: allow specifying a default gatewaydev in xl.conf Roger Pau Monne
2013-02-14 15:09   ` Ulf Kreutzberg
2013-02-14 15:17     ` Roger Pau Monné
2013-02-15 14:06       ` Ulf Kreutzberg
2013-02-18  7:38         ` Roger Pau Monné
2013-02-19 16:04           ` Ulf Kreutzberg
2013-03-04 11:02             ` Roger Pau Monné
2013-03-12 16:39               ` Ulf Kreutzberg
2013-03-12 16:22   ` Ian Campbell
2013-03-12 16:27     ` Ian Campbell
2013-03-13 16:29       ` Roger Pau Monné
2013-02-06 18:04 ` [PATCH v2 3/4] xl: add vif.default.bridge Roger Pau Monne
2013-03-12 16:25   ` Ian Campbell
2013-03-13 16:40     ` Roger Pau Monné [this message]
2013-02-06 18:04 ` [PATCH v2 4/4] xl: add vif.default.script Roger Pau Monne
2013-02-07 11:31   ` George Dunlap
2013-03-12 16:25   ` 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=5140ABF2.2020001@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --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 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).