main, vmm: Remove deprecated --vhost-user-net

This has been superseded by using --net with vhost_user=true and
socket=<socket>

Fixes: #678

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-02-21 16:00:25 +00:00
committed by Samuel Ortiz
parent ffd816ebfa
commit 374ac77c63
4 changed files with 0 additions and 240 deletions

View File

@@ -856,9 +856,6 @@ impl DeviceManager {
// Add virtio-pmem if required
devices.append(&mut self.make_virtio_pmem_devices()?);
// Add virtio-vhost-user-net if required
devices.append(&mut self.make_virtio_vhost_user_net_devices()?);
// Add virtio-vsock if required
devices.append(&mut self.make_virtio_vsock_devices()?);
@@ -1265,36 +1262,6 @@ impl DeviceManager {
Ok(devices)
}
fn make_virtio_vhost_user_net_devices(
&mut self,
) -> DeviceManagerResult<Vec<(VirtioDeviceArc, bool)>> {
let mut devices = Vec::new();
// Add vhost-user-net if required
if let Some(vhost_user_net_list_cfg) = &self.config.lock().unwrap().vhost_user_net {
for vhost_user_net_cfg in vhost_user_net_list_cfg.iter() {
let vu_cfg = VhostUserConfig {
sock: vhost_user_net_cfg.sock.clone(),
num_queues: vhost_user_net_cfg.num_queues,
queue_size: vhost_user_net_cfg.queue_size,
};
let vhost_user_net_device = Arc::new(Mutex::new(
vm_virtio::vhost_user::Net::new(vhost_user_net_cfg.mac, vu_cfg)
.map_err(DeviceManagerError::CreateVhostUserNet)?,
));
devices.push((
Arc::clone(&vhost_user_net_device) as Arc<Mutex<dyn vm_virtio::VirtioDevice>>,
false,
));
self.migratable_devices
.push(Arc::clone(&vhost_user_net_device) as Arc<Mutex<dyn Migratable>>);
}
}
Ok(devices)
}
fn make_virtio_vsock_devices(&mut self) -> DeviceManagerResult<Vec<(VirtioDeviceArc, bool)>> {
let mut devices = Vec::new();
// Add vsock if required