From 72cc176ba5cf9585eecb0178557523a7f7831295 Mon Sep 17 00:00:00 2001 From: Jeongik Cha Date: Fri, 28 Jul 2023 00:19:16 +0900 Subject: [PATCH] vsock: Increase NUM_QUEUES to 3 In virtio standard, vsock uses 3 vqs. crosvm expects 3 vqs from vhost-user-vsock impl, but this vhost-user-vsock device sets up only 2 vqs because event vq isn't handled. And it causes crash in crosvm. To avoid crash in crosvm, I increase NUM_QUEUES to 3 Signed-off-by: Jeongik Cha --- crates/vsock/src/vhu_vsock.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/vsock/src/vhu_vsock.rs b/crates/vsock/src/vhu_vsock.rs index 83d6baf9..c64f11fe 100644 --- a/crates/vsock/src/vhu_vsock.rs +++ b/crates/vsock/src/vhu_vsock.rs @@ -26,7 +26,7 @@ use crate::vhu_vsock_thread::*; pub(crate) type CidMap = HashMap>, EventFd)>; -const NUM_QUEUES: usize = 2; +const NUM_QUEUES: usize = 3; const QUEUE_SIZE: usize = 256; // New descriptors pending on the rx queue