Thread (51 messages) 51 messages, 4 authors, 2020-07-21

Re: [PATCH RFC v8 02/11] vhost: use batched get_vq_desc version

From: Jason Wang <jasowang@redhat.com>
Date: 2020-06-23 02:52:32
Also in: kvm, lkml, netdev

On 2020/6/23 上午12:00, Michael S. Tsirkin wrote:
On Wed, Jun 17, 2020 at 11:19:26AM +0800, Jason Wang wrote:
quoted
On 2020/6/11 下午7:34, Michael S. Tsirkin wrote:
quoted
   static void vhost_vq_free_iovecs(struct vhost_virtqueue *vq)
   {
   	kfree(vq->descs);
@@ -394,6 +400,9 @@ static long vhost_dev_alloc_iovecs(struct vhost_dev *dev)
   	for (i = 0; i < dev->nvqs; ++i) {
   		vq = dev->vqs[i];
   		vq->max_descs = dev->iov_limit;
+		if (vhost_vq_num_batch_descs(vq) < 0) {
+			return -EINVAL;
+		}
This check breaks vdpa which set iov_limit to zero. Consider iov_limit is
meaningless to vDPA, I wonder we can skip the test when device doesn't use
worker.

Thanks
It doesn't need iovecs at all, right?

-- MST

Yes, so we may choose to bypass the iovecs as well.

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help