[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 4/4] Add support for net bridge

From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH v6 4/4] Add support for net bridge
Date: Thu, 22 Dec 2011 09:54:36 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15

On 12/20/2011 11:13 AM, Corey Bryant wrote:

On 12/19/2011 06:15 PM, Anthony Liguori wrote:
On 12/19/2011 04:55 PM, Corey Bryant wrote:

diff --git a/net.c b/net.c
index f7bebf8..9296224 100644
--- a/net.c
+++ b/net.c
@@ -952,6 +952,14 @@ static const struct {
.help = "script to shut down the interface",
}, {
+ .name = "br",
+ .type = QEMU_OPT_STRING,
+ .help = "bridge name",
+ }, {

I don't think passing br= makes a whole of sense for -net tap. I think
it would make more sense to make sure that helper could take a shell
string so you could do:

-netdev tap,helper="/usr/libexec/qemu-bridge-helper --br=br0"


Anthony Liguori

Ok but do you think the -net bridge options should remain as-is? It
seems like
execution of the helper should be consistent. Here are the current
options for
-net bridge:

-net bridge,helper=/usr/local/libexec/qemu-bridge-helper,br=br0

Yes. -net bridge is syntactic sugar for -net tap with specific knowledge
of the qemu-bridge-helper.

If someone wrote a 'qemu-openvswitch-helper' then you could imagine a
'-net openvswitch' option that passed a bunch of openvswitch specific


Anthony Liguori

It seems like the helper should accept the following arguments:

--vnet-hdr --br=<bridge name> --fd=<unix fd>

(It already accept these, but the --br= and --fd= syntax aren't required at the

Then QEMU would only allow the following to be specified for -netdev tap:

-netdev tap,helper="/usr/libexec/qemu-bridge-helper"
-netdev tap,helper="/usr/libexec/qemu-bridge-helper --br=bridge"

and would ignore or reject --vnet-hdr and --fd=. --vnet-hdr and --fd= would
always be specified internally when the helper is exec'd.

I don't know what you mean by "ignore or reject". Just take whatever the helper string is, concat " --vnet-hdr --fd=" as appropriate, and execute it via /bin/sh.


Anthony Liguori

reply via email to

[Prev in Thread] Current Thread [Next in Thread]