qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Anthony Liguori <aliguori@linux.vnet.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: Planning for 0.13
Date: Thu, 7 Jan 2010 01:59:53 +0200	[thread overview]
Message-ID: <20100106235953.GB30515@redhat.com> (raw)
In-Reply-To: <20100106224954.GB24250@shareable.org>

On Wed, Jan 06, 2010 at 10:49:54PM +0000, Jamie Lokier wrote:
> Michael S. Tsirkin wrote:
> > On Wed, Jan 06, 2010 at 05:19:45PM +0000, Jamie Lokier wrote:
> > > Michael S. Tsirkin wrote:
> > > > On Wed, Jan 06, 2010 at 09:24:45AM -0600, Anthony Liguori wrote:
> > > > > A helper is semantics equivalent to passing an fd from a management  
> > > > > tool.  All of the problems you describe are equally applicable to that  
> > > > > model.
> > > > 
> > > > No, because management calls qemu and parses qemu help output.  Yes it
> > > > is not ideal but it works today.
> > > 
> > > I don't understand.  What do you think would not work with
> > > helper="..."  where ... is specified on the qemu command line by the
> > > management script, versus the management script doing the helper
> > > operations itself first and then calling qemu with fd=?
> > > 
> > > If you are thinking that management scripts will tailor the -net
> > > arguments according to qemu version, you're right for some
> > > configurations (but not well established simple ones).
> > > 
> > > Presumably management can do the same capability when specifying "..."
> > > - the difference being it would query the helper tool to get _it's_
> > > features in some cases, e.g. for arguments to a helper which uses SSH
> > > to provide an encrypted tunnel.
> > 
> > What won't work is that besides fd= management specifies many other
> > arguments to the -net flag.
> 
> I still don't understand.  What prevents management from specifying
> the other arguments with helper=, either in the helper argument (for
> arguments to the helper itself), or to qemu (for things qemu needs be told)?
> 
> > What you describe: helper= instead of fd= will work and I have no issue
> > with this. And we won't need any protocol between helper and qemu: just
> > the fd returned.
> 
> You may still need qemu to know whether to use send/recv (datagram
> socket) or read/write with framing (pipe or something), but if it
> comes to that, qemu can use fstat() to decide what it needs.  There is
> probably no need for options passed back, I agree :-)

Well, if we special-case some fd type, let's just put all handling in
qemu. There's no advantage in spreading it around. It only makes sense
to move stuff out to helper script if it can be done generically IMO.

> I think there is a lot to be said for letting the helper keep the
> initial unix socket open, so it can reliably detect when the parent
> qemu dies and then clean up.
> 
> > But of course this means that it can't be used to create new
> > backends such as vepa, which often need to setup the fd in complex
> > ways.
> 
> For vepa, I don't know if you mean the fd needs complex setup
> initially, or complex options with each packet.  (Web browser
> unavailable right now).
> 
> For complex initial setup, that's exactly what a helper would be good
> for.  Any options needed for that setup would be part of the
> helper="/path/to/helper opts..." string.  If there are options which
> depend on helper version, management can query the helper itself with
> /path/to/helper --help; that doesn't seem likely to be needed much.
> 
> If individual packet transmission requires "complex ways" then of
> course that would have to be inside qemu.  Is that the case with vepa
> and other things under discussion?

As I said, stuff like vhost needs physical addresses as part of its
setup, so that definitely needs to be in qemu too.


>  I got the impression there isn't much variation in the way packets
>  are tranmitted and received.
> 
> -- Jamie

No. E.g. for TX/RX, with packet socket (which is what you'll use for vepa)
you need to do it differently from e.g. TCP socket.

It is true that TCP sockets really do look very much like pipes,
so you can write code that handles these generically.

But other devices don't, and there's a lot of minor differences there,
which we *could* abstract away - but in the end we won't get any new
features users need, and code will be more complex and hard to debug.

-- 
MST

  reply	other threads:[~2010-01-07  0:03 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-05 12:43 [Qemu-devel] Planning for 0.13 Anthony Liguori
2010-01-05 12:44 ` [Qemu-devel] " Anthony Liguori
2010-01-05 20:50 ` [Qemu-devel] " Stefan Weil
2010-01-05 21:33 ` [Qemu-devel] " Michael S. Tsirkin
2010-01-06  0:32   ` Anthony Liguori
2010-01-06 10:49     ` Michael S. Tsirkin
2010-01-06 12:36       ` Anthony Liguori
2010-01-06 13:20         ` Michael S. Tsirkin
2010-01-06 13:34           ` Anthony Liguori
2010-01-06 13:55             ` Michael S. Tsirkin
2010-01-06 15:10               ` Anthony Liguori
2010-01-06 15:16                 ` Michael S. Tsirkin
2010-01-06 15:24                   ` Anthony Liguori
2010-01-06 15:41                     ` Michael S. Tsirkin
2010-01-06 17:19                       ` Jamie Lokier
2010-01-06 18:19                         ` Michael S. Tsirkin
2010-01-06 22:49                           ` Jamie Lokier
2010-01-06 23:59                             ` Michael S. Tsirkin [this message]
2010-01-06 19:48                 ` Paolo Bonzini
2010-01-06 19:54                   ` Michael S. Tsirkin
2010-01-06 19:59                     ` Paolo Bonzini
2010-01-06 20:07                       ` Michael S. Tsirkin
2010-01-06 23:00                     ` Jamie Lokier
2010-01-07  0:05                       ` Michael S. Tsirkin
2010-01-05 22:31 ` [Qemu-devel] " Aurelien Jarno
2010-01-06  2:46 ` Roy Tam
2010-01-06  9:37 ` Gerd Hoffmann
2010-01-06 15:34 ` Adam Litke
2010-01-12 13:43 ` Pasi Kärkkäinen
2010-01-12 15:07   ` Stefano Stabellini
2010-02-09 14:50   ` Artyom Tarasenko

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=20100106235953.GB30515@redhat.com \
    --to=mst@redhat.com \
    --cc=aliguori@linux.vnet.ibm.com \
    --cc=jamie@shareable.org \
    --cc=qemu-devel@nongnu.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).