mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-22 16:01:15 +00:00
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 <robert.bradford@intel.com>
This commit is contained in:
parent
f1e940df8d
commit
15d5cc62ff
@ -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(
|
fn activate(
|
||||||
&mut self,
|
&mut self,
|
||||||
mem: GuestMemoryAtomic<GuestMemoryMmap>,
|
mem: GuestMemoryAtomic<GuestMemoryMmap>,
|
||||||
|
Loading…
Reference in New Issue
Block a user