From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLW99-0000Hz-1S for qemu-devel@nongnu.org; Tue, 19 Jan 2016 08:16:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLW94-0007YD-1Z for qemu-devel@nongnu.org; Tue, 19 Jan 2016 08:16:30 -0500 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLW93-0007Y3-Q9 for qemu-devel@nongnu.org; Tue, 19 Jan 2016 08:16:25 -0500 Received: by mail-wm0-x241.google.com with SMTP id u188so23176664wmu.0 for ; Tue, 19 Jan 2016 05:16:25 -0800 (PST) Sender: Paolo Bonzini References: <1452861718-25806-1-git-send-email-pbonzini@redhat.com> <1452861718-25806-3-git-send-email-pbonzini@redhat.com> <20160119132200.490933b0.cornelia.huck@de.ibm.com> From: Paolo Bonzini Message-ID: <569E3726.9090804@redhat.com> Date: Tue, 19 Jan 2016 14:16:22 +0100 MIME-Version: 1.0 In-Reply-To: <20160119132200.490933b0.cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 02/10] virtio: move allocation to virtqueue_pop/vring_pop List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: qemu-devel@nongnu.org, mst@redhat.com On 19/01/2016 13:22, Cornelia Huck wrote: > > The patch is pretty large, but changes to each device are testable > > more or less independently. Splitting it would mostly add churn. > > Would it help to add a no-frills virtqueue_pop() version that simply > allocates the base VirtQueueElement and use a _size() variant for those > callers that want an extended structure? Not too much, the churn mostly comes from the VQE* being returned from virtqueue_pop, rather than passed to it. > assert(sz >= sizeof(VirtQueueElement)); Good idea. Paolo