From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rdkyk-0001sn-0G for qemu-devel@nongnu.org; Thu, 22 Dec 2011 10:54:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rdkyg-0005px-QE for qemu-devel@nongnu.org; Thu, 22 Dec 2011 10:54:45 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:33880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rdkyg-0005pn-It for qemu-devel@nongnu.org; Thu, 22 Dec 2011 10:54:42 -0500 Received: by iagj37 with SMTP id j37so15533155iag.4 for ; Thu, 22 Dec 2011 07:54:41 -0800 (PST) Message-ID: <4EF352BC.4050109@codemonkey.ws> Date: Thu, 22 Dec 2011 09:54:36 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1324300318-3419-1-git-send-email-coreyb@linux.vnet.ibm.com> <1324300318-3419-5-git-send-email-coreyb@linux.vnet.ibm.com> <4EEF922B.4050802@us.ibm.com> <4EEFC0DB.3050904@linux.vnet.ibm.com> <4EEFC59C.3090609@codemonkey.ws> <4EF0C22A.6020306@linux.vnet.ibm.com> In-Reply-To: <4EF0C22A.6020306@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 4/4] Add support for net bridge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corey Bryant Cc: Anthony Liguori , rmarwah@linux.vnet.ibm.com, qemu-devel@nongnu.org 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 { >>>>> .type = QEMU_OPT_STRING, >>>>> .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" >>>> >>>> Regards, >>>> >>>> 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 >> arguments. >> >> Regards, >> >> Anthony Liguori >> >>> >> >> > > It seems like the helper should accept the following arguments: > > --vnet-hdr --br= --fd= > > (It already accept these, but the --br= and --fd= syntax aren't required at the > moment.) > > Then QEMU would only allow the following to be specified for -netdev tap: > > -netdev tap,helper="/usr/libexec/qemu-bridge-helper" > or > -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. Regards, Anthony Liguori >