Skip to content

Commit

Permalink
vsock: Increase NUM_QUEUES to 3
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ikicha committed Jul 27, 2023
1 parent 5224d30 commit ffb3669
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/vsock/src/vhu_vsock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ffb3669

Please sign in to comment.