From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGloT-0001hH-Cg for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:50:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGloN-0003YK-7K for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:50:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGloM-0003YF-VD for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:50:23 -0500 Message-ID: <53071348.8010808@redhat.com> Date: Fri, 21 Feb 2014 16:50:16 +0800 From: Jason Wang MIME-Version: 1.0 References: <1392958857-10965-1-git-send-email-jasowang@redhat.com> In-Reply-To: <1392958857-10965-1-git-send-email-jasowang@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] virtio-net: calculate proper msix vectors on init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@amazon.com, mst@redhat.com, qemu-devel@nongnu.org Cc: Paolo Bonzini , Jason Wang On 02/21/2014 01:00 PM, Jason Wang wrote: > Currently, the default msix vectors for virtio-net-pci is 3 which is > obvious not suitable for multiqueue guest, so we depends on the user > or management tools to pass a correct vectors parameter. In fact, we > can simplifying this by calculate the number of vectors on init. > > Consider we have N queues, the number of vectors needed is 2*N + 2 > (plus one config interrupt and control vq). We didn't check whether or > not host support control vq because it was added unconditionally by > qemu to avoid breaking legacy guests such as Minix. > > Cc: Paolo Bonzini > Cc: Michael S. Tsirkin > Signed-off-by: Jason Wang > --- Unnecessary debug line was found, will send V2.