From: Anthony Liguori <aliguori@us.ibm.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Richa Marwaha <rmarwah@linux.vnet.ibm.com>,
coreyb@linux.vnet.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/4] Add basic version of bridge helper
Date: Thu, 06 Oct 2011 13:04:21 -0500 [thread overview]
Message-ID: <4E8DEDA5.3050209@us.ibm.com> (raw)
In-Reply-To: <20111006164148.GF2450@redhat.com>
On 10/06/2011 11:41 AM, Daniel P. Berrange wrote:
> On Thu, Oct 06, 2011 at 11:38:25AM -0400, Richa Marwaha wrote:
>> This patch adds a helper that can be used to create a tap device attached to
>> a bridge device. Since this helper is minimal in what it does, it can be
>> given CAP_NET_ADMIN which allows qemu to avoid running as root while still
>> satisfying the majority of what users tend to want to do with tap devices.
>>
>> The way this all works is that qemu launches this helper passing a bridge
>> name and the name of an inherited file descriptor. The descriptor is one
>> end of a socketpair() of domain sockets. This domain socket is used to
>> transmit a file descriptor of the opened tap device from the helper to qemu.
>>
>> The helper can then exit and let qemu use the tap device.
>
> When QEMU is run by libvirt, we generally like to use capng to
> remove the ability for QEMU to run setuid programs at all. So
> obviously it will struggle to run the qemu-bridge-helper binary
> in such a scenario.
>
> With the way you transmit the TAP device FD back to the caller,
> it looks like libvirt itself could execute the qemu-bridge-helper
> receiving the FD, and then pass the FD onto QEMU using the
> traditional tap,fd=XX syntax.
Exactly. This would allow tap-based networking using libvirt session:// URIs.
>
> The TAP device FD is only one FD we normally pass to QEMU. How about
> support for vhost net ? Is it reasonable to ask the qemu-bridge-helper
> to send back a vhost net FD also.
Absolutely.
> Or indeed multiple vhost net FDs
> when we get multiqueue NICs. Should we expect the bridge helper to
> be strictly limited to just connecting a TAP dev to a bridge, or is
> the expectation that it will grow more& more functionality over
> time ?
I would not expect it to do more than create virtual network interfaces, and add
them to bridges. Multiqueue virtual nics, vhost, etc. would all be in scope as
they are part of creating a virtual network interface.
Creating the bridges and managing the bridges should be done statically by an
administrator and would be out of scope.
Regards,
Anthony Liguori
>
> Daniel
next prev parent reply other threads:[~2011-10-06 18:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-06 15:38 [Qemu-devel] [PATCH 0/4] -net tap: rootless bridge support for qemu Richa Marwaha
2011-10-06 15:38 ` [Qemu-devel] [PATCH 1/4] Add basic version of bridge helper Richa Marwaha
2011-10-06 16:41 ` Daniel P. Berrange
2011-10-06 18:04 ` Anthony Liguori [this message]
2011-10-06 18:38 ` Corey Bryant
2011-10-07 9:04 ` Daniel P. Berrange
2011-10-07 14:40 ` Corey Bryant
2011-10-07 14:45 ` Daniel P. Berrange
2011-10-07 14:51 ` Corey Bryant
2011-10-07 14:52 ` Corey Bryant
2011-10-06 17:44 ` Anthony Liguori
2011-10-06 18:10 ` Corey Bryant
2011-10-06 15:38 ` [Qemu-devel] [PATCH 2/4] Add access control support to qemu-bridge-helper Richa Marwaha
2011-10-06 15:38 ` [Qemu-devel] [PATCH 3/4] Add cap reduction support to enable use as SUID Richa Marwaha
2011-10-06 16:34 ` Daniel P. Berrange
2011-10-06 17:42 ` Anthony Liguori
2011-10-06 18:05 ` Corey Bryant
2011-10-06 18:08 ` Corey Bryant
2011-10-06 15:38 ` [Qemu-devel] [PATCH 4/4] Add support for bridge Richa Marwaha
2011-10-06 17:49 ` Anthony Liguori
2011-10-06 18:15 ` Corey Bryant
2011-10-06 18:19 ` Anthony Liguori
2011-10-06 18:24 ` Corey Bryant
-- strict thread matches above, loose matches on Subject: below --
2009-11-04 0:28 [Qemu-devel] [PATCH 0/4] net-bridge: rootless bridge support for qemu Anthony Liguori
2009-11-04 0:28 ` [Qemu-devel] [PATCH 1/4] Add basic version of bridge helper Anthony Liguori
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=4E8DEDA5.3050209@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=berrange@redhat.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).