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


Reply via email to