fn make_virtio_net_devices(
        &mut self,
    ) -> DeviceManagerResult<Vec<(VirtioDeviceArc, bool, String)>> {
        let mut devices = Vec::new();
        let mut net_devices = self.config.lock().unwrap().net.clone();
        if let Some(net_list_cfg) = &mut net_devices {
            for net_cfg in net_list_cfg.iter_mut() {
                devices.push(self.make_virtio_net_device(net_cfg)?);
            }
        }
        self.config.lock().unwrap().net = net_devices;

        Ok(devices)
    }
/// Add virto-net and vhost-user-net devices
Add virto-net and vhost-user-net devices
Add virto - net and vhost - user - net devices
fn make_virtio_net_devices(
        &mut self,
    ) -> DeviceManagerResult<Vec<(VirtioDeviceArc, bool, String)>> {
        let mut devices = Vec::new();
        let mut net_devices = self.config.lock().unwrap().net.clone();
        if let Some(net_list_cfg) = &mut net_devices {
            for net_cfg in net_list_cfg.iter_mut() {
                devices.push(self.make_virtio_net_device(net_cfg)?);
            }
        }
        self.config.lock().unwrap().net = net_devices;
        Ok(devices)
    }
fn make_virtio_net_devices ( & mut self , ) -> DeviceManagerResult < Vec < ( VirtioDeviceArc , bool , String ) > > { let mut devices = Vec :: new ( ) ; let mut net_devices = self . config . lock ( ) . unwrap ( ) . net . clone ( ) ; if let Some ( net_list_cfg ) = & mut net_devices { for net_cfg in net_list_cfg . iter_mut ( ) { devices . push ( self . make_virtio_net_device ( net_cfg ) ? ) ; } } self . config . lock ( ) . unwrap ( ) . net = net_devices ; Ok ( devices ) }
Add virto-net and vhost-user-net devices
Add virto - net and vhost - user - net devices
&mut self
&mut self