Skip to content

Commit

Permalink
vhost-device-vsock: change default vring queue size to 1024
Browse files Browse the repository at this point in the history
Although increasing queue size from 256 to 1024 increases the memory
usage of vhost-device-vsock, 1024 is a reasonable default which should
make vhost-device-vsock work by default (i.e., without using the
queue-size option) with devices that use vring queue size up to 1024
such as QEMU's vhost-user-vsock-device.

If Users require greater or smaller queue size, they can use the
'queue-size' option to configure the queue size.

Signed-off-by: Dorjoy Chowdhury <dorjoychy111@gmail.com>
  • Loading branch information
dorjoy03 authored and epilys committed Jul 10, 2024
1 parent 9d34131 commit f7724bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vhost-device-vsock/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use vm_memory::{GuestMemoryAtomic, GuestMemoryMmap};

const DEFAULT_GUEST_CID: u64 = 3;
const DEFAULT_TX_BUFFER_SIZE: u32 = 64 * 1024;
const DEFAULT_QUEUE_SIZE: usize = 256;
const DEFAULT_QUEUE_SIZE: usize = 1024;
const DEFAULT_GROUP_NAME: &str = "default";

#[derive(Debug, ThisError)]
Expand Down

0 comments on commit f7724bf

Please sign in to comment.