From 15d5cc62ff590fb91c17a778a8a6df1caf72b5c6 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 16 Jul 2020 09:56:08 +0100 Subject: [PATCH] virtio-devices: vhost_user: net: Remove write_config implementation The spec specifies that all fields are read-only from the driver. Signed-off-by: Rob Bradford --- virtio-devices/src/vhost_user/net.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/virtio-devices/src/vhost_user/net.rs b/virtio-devices/src/vhost_user/net.rs index 50cb4af4d..7489b2c13 100644 --- a/virtio-devices/src/vhost_user/net.rs +++ b/virtio-devices/src/vhost_user/net.rs @@ -208,18 +208,6 @@ impl VirtioDevice for Net { } } - fn write_config(&mut self, offset: u64, data: &[u8]) { - let config_slice = self.config.as_mut_slice(); - let data_len = data.len() as u64; - let config_len = config_slice.len() as u64; - if offset + data_len > config_len { - error!("Failed to write config space"); - return; - } - let (_, right) = config_slice.split_at_mut(offset as usize); - right.copy_from_slice(&data[..]); - } - fn activate( &mut self, mem: GuestMemoryAtomic,