diff --git a/vhost-device-sound/src/device.rs b/vhost-device-sound/src/device.rs index 788bd6d..72619f6 100644 --- a/vhost-device-sound/src/device.rs +++ b/vhost-device-sound/src/device.rs @@ -615,11 +615,7 @@ impl VhostUserBackend for VhostUserSoundBackend { } fn max_queue_size(&self) -> usize { - // The linux kernel driver does no checks for queue length and fails silently if - // a queue is filled up. In this case, adding an element to the queue - // returns ENOSPC and the element is not queued for a later attempt and - // is lost. `64` is a "good enough" value from our observations. - 64 + 256 } fn features(&self) -> u64 { diff --git a/vhost-device-sound/src/lib.rs b/vhost-device-sound/src/lib.rs index a2d8b5a..14f5c59 100644 --- a/vhost-device-sound/src/lib.rs +++ b/vhost-device-sound/src/lib.rs @@ -328,13 +328,15 @@ pub fn start_backend_server(listener: &mut Listener, config: SoundConfig) { backend.send_exit_event(); - if !matches!( - result, + match result { + Ok(()) => {} Err(vhost_user_backend::Error::HandleRequest( - vhost::vhost_user::Error::Disconnected | vhost::vhost_user::Error::PartialMessage - )) - ) { - result.unwrap(); + vhost::vhost_user::Error::Disconnected | vhost::vhost_user::Error::PartialMessage, + )) => {} + Err(e) => { + log::error!("Daemon exited with error: {e}"); + std::process::exit(1); + } } }