From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqktB-0006Ny-Ir for qemu-devel@nongnu.org; Mon, 16 Jul 2012 08:59:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqktA-0002nR-KT for qemu-devel@nongnu.org; Mon, 16 Jul 2012 08:59:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqktA-0002n4-CW for qemu-devel@nongnu.org; Mon, 16 Jul 2012 08:59:00 -0400 Date: Mon, 16 Jul 2012 18:28:53 +0530 From: Amit Shah Message-ID: <20120716125853.GC13733@amit.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 0/3] Introduce virtqueue_get_avail_bytes() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu list Cc: Anthony Liguori On (Fri) 06 Jul 2012 [16:07:06], Amit Shah wrote: > The current virtqueue_avail_bytes() is a weird API: it's oddly-named: > doesn't tell us what the API is going to do, and also suits just one > use-case (that in virtio-net.c). > > Introduce virtqueue_get_avail_bytes(), which returns the number of > bytes in the vq available for input as well as output. > virtqueue_avail_bytes() is made a wrapper around this new function for > now. It should be deprecated soon, though. > > Doing this will also help with the virtio-rng patch where a > VirtQueueElement is popped only to find out what its size is. With > this series applied, the popping (and the subsequent save/load of > state for migration) isn't necessary. > > The virtio-serial-bus code becomes better too, that's patch 3 here. Ping? Amit