From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYswP-0004wk-41 for qemu-devel@nongnu.org; Tue, 30 Sep 2014 04:37:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYswI-0001q3-Hh for qemu-devel@nongnu.org; Tue, 30 Sep 2014 04:37:49 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:42694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYswH-0001cS-UK for qemu-devel@nongnu.org; Tue, 30 Sep 2014 04:37:42 -0400 Message-ID: <542A6B70.7090607@huawei.com> Date: Tue, 30 Sep 2014 16:36:00 +0800 From: "Zhangjie (HZ)" MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [QA-virtio]:Why vring size is limited to 1024? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Jason Wang , akong@redhat.com, liuyongan@huawei.com, qinchuanyu@huawei.com Hi, There exits packets loss when we do packet forwarding in VM, especially when we use dpdk to do the forwarding. By enlarging vring can alleviate the problem. But now vring size is limited to 1024 as follows: VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size, void (*handle_output)(VirtIODevice *, VirtQueue *)) { ... if (i == VIRTIO_PCI_QUEUE_MAX || queue_size > VIRTQUEUE_MAX_SIZE) abort(); } ps:#define VIRTQUEUE_MAX_SIZE 1024 I delete the judgement code, and set vring size to 2048, VM can be successfully started, and the network is ok too. So, Why vring size is limited to 1024 and what is the influence? Thanks! -- Best Wishes! Zhang Jie