qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC v3] virtio/vsock: add two more queues for datagram types


From: Stefano Garzarella
Subject: Re: [RFC v3] virtio/vsock: add two more queues for datagram types
Date: Wed, 4 Aug 2021 08:41:03 +0200

On Tue, Aug 03, 2021 at 11:58:27AM -0700, Jiang Wang . wrote:
On Wed, Jul 7, 2021 at 10:27 AM Stefano Garzarella <sgarzare@redhat.com> wrote:
On Wed, Jul 07, 2021 at 09:52:46AM -0700, Jiang Wang . wrote:
>On Wed, Jul 7, 2021 at 1:33 AM Stefano Garzarella <sgarzare@redhat.com> wrote:
>> On Tue, Jul 06, 2021 at 10:26:07PM +0000, Jiang Wang wrote:

[...]

>> >+
>> >+    if (nvqs < 0)
>> >+        nvqs = MAX_VQS_WITHOUT_DGRAM;
>> >+
>> >+    if (nvqs == MAX_VQS_WITH_DGRAM) {
>> >+        vvc->dgram_recv_vq = virtio_add_queue(vdev, VHOST_VSOCK_QUEUE_SIZE,
>> >+                                              
vhost_vsock_common_handle_output);
>> >+        vvc->dgram_trans_vq = virtio_add_queue(vdev, 
VHOST_VSOCK_QUEUE_SIZE,
>> >+                                               
vhost_vsock_common_handle_output);
>> >+    }
>> >+
>> >     /* The event queue belongs to QEMU */
>> >     vvc->event_vq = virtio_add_queue(vdev, VHOST_VSOCK_QUEUE_SIZE,
>> >                                        vhost_vsock_common_handle_output);
>>
>> Did you do a test with a guest that doesn't support datagram with QEMU
>> and hosts that do?
>>
>Yes, and it works.
>
>> I repost my thoughts that I had on v2:
>>
>>      What happen if the guest doesn't support dgram?
>>
>>      I think we should dynamically use the 3rd queue or the 5th queue for
>>      the events at runtime after the guest acked the features.
>>
>>      Maybe better to switch to an array of VirtQueue.
>>
>I think in current V3, it  already dynamically use 3rd or 5th queue
>depending
>on the feature bit.

I'm not sure. IIUC when vhost_vsock_common_realize() is called, we don't
know the features acked by the guest, so how can it be dynamic?

Here we should know only if the host kernel supports it.

Maybe it works, because in QEMU we use the event queue only after a
migration to send a reset event, so you can try to migrate a guest to
check this path.

I tried VM migration and didn't see any problems. The migration looks fine
and vsock dgram still works after migration. Is there any more specific test
you want to run to check for this code path?


I meant a migration of a guest from QEMU without this patch to a QEMU with this patch. Of course in that case testing a socket stream.

btw, I will address the rest of the comments and send a new version soon.


Great!

Thanks,
Stefano




reply via email to

[Prev in Thread] Current Thread [Next in Thread]