qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Corey Bryant <coreyb@linux.vnet.ibm.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	rmarwah@linux.vnet.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v6 4/4] Add support for net bridge
Date: Thu, 22 Dec 2011 09:54:36 -0600	[thread overview]
Message-ID: <4EF352BC.4050109@codemonkey.ws> (raw)
In-Reply-To: <4EF0C22A.6020306@linux.vnet.ibm.com>

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=<bridge name> --fd=<unix 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

>

  reply	other threads:[~2011-12-22 15:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 13:11 [Qemu-devel] [PATCH v6 0/4] -net bridge: rootless bridge support for qemu Corey Bryant
2011-12-19 13:11 ` [Qemu-devel] [PATCH v6 1/4] Add basic version of bridge helper Corey Bryant
2011-12-19 13:11 ` [Qemu-devel] [PATCH v6 2/4] Add access control support to qemu " Corey Bryant
2011-12-19 13:11 ` [Qemu-devel] [PATCH v6 3/4] Add cap reduction support to enable use as SUID Corey Bryant
2011-12-19 13:11 ` [Qemu-devel] [PATCH v6 4/4] Add support for net bridge Corey Bryant
2011-12-19 19:36   ` Anthony Liguori
2011-12-19 22:55     ` Corey Bryant
2011-12-19 23:15       ` Anthony Liguori
2011-12-20 17:13         ` Corey Bryant
2011-12-22 15:54           ` Anthony Liguori [this message]
2011-12-20 10:02   ` Hui Kai Ran
2011-12-20 10:58     ` Hui Kai Ran

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=4EF352BC.4050109@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=aliguori@us.ibm.com \
    --cc=coreyb@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rmarwah@linux.vnet.ibm.com \
    /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).