From f7724bf8ec6c8c5a672792bacf623dec9ac68b33 Mon Sep 17 00:00:00 2001 From: Dorjoy Chowdhury Date: Wed, 10 Jul 2024 19:26:32 +0600 Subject: [PATCH] vhost-device-vsock: change default vring queue size to 1024 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 --- vhost-device-vsock/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vhost-device-vsock/src/main.rs b/vhost-device-vsock/src/main.rs index b69e253..897112e 100644 --- a/vhost-device-vsock/src/main.rs +++ b/vhost-device-vsock/src/main.rs @@ -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)]