From: Alex Williamson Subject: Re: [Qemu-devel] Re: [PATCH v2 4/8] qemu:virtio-net: Add a virtqueue for control commands from the guest Date: Wed, 04 Feb 2009 16:34:06 -0700 Message-ID: <1233790446.7026.1239.camel@lappy> References: <20090203192932.19598.50925.stgit@kvm.aw> <20090203192953.19598.41310.stgit@kvm.aw> <4988AF7C.50103@codemonkey.ws> <1233788398.7026.1237.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: markmc@redhat.com, kvm@vger.kernel.org To: qemu-devel@nongnu.org, av1474@comtv.ru Return-path: Received: from g5t0008.atlanta.hp.com ([15.192.0.45]:46221 "EHLO g5t0008.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751368AbZBDXd3 (ORCPT ); Wed, 4 Feb 2009 18:33:29 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 2009-02-05 at 02:09 +0300, malc wrote: > On Wed, 4 Feb 2009, Alex Williamson wrote: > > [..snip..] > > > > > +static void virtio_net_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq) > > +{ > > + struct virtio_net_ctrl_hdr ctrl; > > + virtio_net_ctrl_ack status = VIRTIO_NET_ERR; > > + VirtQueueElement elem; > > + > > + while (virtqueue_pop(vq, &elem)) { > > + if ((elem.in_num < 1) | (elem.out_num < 1)) { > ^ intended ? No, good catch. Thank you. -- Alex Williamson HP Open Source & Linux Org.