From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] qemu vnc updates Date: Tue, 26 Feb 2008 10:15:51 -0600 Message-ID: <47C43B37.1010209@codemonkey.ws> References: <47C3F6FA.6080506@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <47C3F6FA.6080506@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Stefano Stabellini wrote: > Hi all, > reading qemu code I realized that the qemu vnc server sometimes sends > framebuffer updates even if the client didn't request any. > This is not consistent with the RFB protocol spec and can break some > clients. It's actually consistent with the RFB spec. Have you seen any clients break? The RFB spec states pretty clearly that a single FramebufferUpdateRequest may generate 0 or more FramebufferUpdate events. Once a client has sent a single FramebufferUpdate request, it should expect to continue to receive more FramebufferUpdates for an indefinite period of time according to the specification. Regards, Anthony Liguori > The patch I am attaching strictly enforces compliance with the RFB > protocol making sure framebuffer updates are sent only if the client > requested one. > Doing so is more difficult than it seems because some framebuffer > pseudo-encoding updates cannot be discarded but must be sent anyway: for > example desktop resize and pixel format change messages. To solve the > problem I wrote a queue that stores those messages and sends them as > soon as the client asks for an update. > Since 90% of the times the queue is used to store only few elements, the > queue allocates 10 elements at the beginning and every time it runs out > of elements allocates other 10 elements. This is should drastically > limit the number of malloc and free needed to maintain the queue. > I did some stress tests in the last couple of days and seems to work well. > Best Regards, > > Stefano Stabellini > > > Signed-off-by: Stefano Stabellini > > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel