qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for bufferin


From: Jamie Lokier
Subject: Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests
Date: Mon, 11 Jan 2010 10:45:53 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

Amit Shah wrote:
> On (Fri) Jan 08 2010 [13:35:03], Jamie Lokier wrote:
> > Since VNC is clearly designed to work over TCP, and is written by
> > people who know this, I'm wondering why you think it needs to be
> > different for virtio-serial.
> 
> For vnc putting stuff from a guest clipboard into vnc client clipboard
> using the ServerCutText command, the entire buffer has to be provided
> after sending the command and the 'length' values.

Are you talking about a VNC protocol command between qemu's VNC server
and the user's VNC client, or a private protocol between the guest and
qemu's VNC server?

> In this case, if the data from guest arrives in multiple packets, we
> really don't want to call into the write function multiple times. A
> single clipboard entry has to be created in the client with the entire
> contents, so a single write operation has to be invoked.

Same question again: *Why do you think the VNC server (in qemu) needs to
see the entire clipboard in a aingle write from the guest?*

You have already told it the total length to expect.  There is no
ambiguity about where it ends.

There is no need to do any more, if the reciever (in qemu) is
implemented correctly with a sane protocol.  That's assuming the guest
sends to qemu's VNC server which then sends it to the user's VNC client.

> For this to happen, there has to be some indication from the guest as to
> how much data was written in one write() operation, which will let us
> make a single write operation to the vnc client.

When it is sent to the user's VNC client, it will be split into
multiple packets by TCP. You *can't* send a single large write over
TCP without getting it split at arbitrary places. It's *impossible*. TCP
doesn't support that. It will split and merge your writes arbitrarily.

So the only interesting part is how it's transmitted from the guest to
qemu's VNC server first. Do you get to design that protocol yourself?

-- Jamie




reply via email to

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