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 <jeongik@google.com>
This commit is contained in:
Jeongik Cha 2023-07-28 00:19:16 +09:00 committed by Viresh Kumar
parent c2ba07dc06
commit 637969d0e7

View File

@ -26,7 +26,7 @@ use crate::vhu_vsock_thread::*;
pub(crate) type CidMap = HashMap<u64, (Arc<RwLock<RawPktsQ>>, EventFd)>;
const NUM_QUEUES: usize = 2;
const NUM_QUEUES: usize = 3;
const QUEUE_SIZE: usize = 256;
// New descriptors pending on the rx queue