diff --git a/src/dragonball/src/api/v1/mod.rs b/src/dragonball/src/api/v1/mod.rs index 2077c982e9..99e3075ebb 100644 --- a/src/dragonball/src/api/v1/mod.rs +++ b/src/dragonball/src/api/v1/mod.rs @@ -4,9 +4,7 @@ //! API Version 1 related data structures to configure the vmm. mod vmm_action; -pub use self::vmm_action::{ - VmmAction, VmmActionError, VmmData, VmmRequest, VmmResponse, VmmService, -}; +pub use self::vmm_action::*; /// Wrapper for configuring the microVM boot source. mod boot_source; diff --git a/src/dragonball/src/api/v1/vmm_action.rs b/src/dragonball/src/api/v1/vmm_action.rs index 6dedbfc28e..2962994b4b 100644 --- a/src/dragonball/src/api/v1/vmm_action.rs +++ b/src/dragonball/src/api/v1/vmm_action.rs @@ -17,20 +17,20 @@ use crate::vm::{CpuTopology, KernelConfigInfo, VmConfigInfo}; use crate::vmm::Vmm; #[cfg(feature = "virtio-blk")] -use crate::device_manager::blk_dev_mgr::{ +pub use crate::device_manager::blk_dev_mgr::{ BlockDeviceConfigInfo, BlockDeviceConfigUpdateInfo, BlockDeviceError, BlockDeviceMgr, }; #[cfg(feature = "virtio-fs")] -use crate::device_manager::fs_dev_mgr::{ +pub use crate::device_manager::fs_dev_mgr::{ FsDeviceConfigInfo, FsDeviceConfigUpdateInfo, FsDeviceError, FsDeviceMgr, FsMountConfigInfo, }; #[cfg(feature = "virtio-net")] -use crate::device_manager::virtio_net_dev_mgr::{ +pub use crate::device_manager::virtio_net_dev_mgr::{ VirtioNetDeviceConfigInfo, VirtioNetDeviceConfigUpdateInfo, VirtioNetDeviceError, VirtioNetDeviceMgr, }; #[cfg(feature = "virtio-vsock")] -use crate::device_manager::vsock_dev_mgr::{VsockDeviceConfigInfo, VsockDeviceError}; +pub use crate::device_manager::vsock_dev_mgr::{VsockDeviceConfigInfo, VsockDeviceError}; use super::*; diff --git a/src/dragonball/src/device_manager/vsock_dev_mgr.rs b/src/dragonball/src/device_manager/vsock_dev_mgr.rs index 5e49bbfb37..4f0f074134 100644 --- a/src/dragonball/src/device_manager/vsock_dev_mgr.rs +++ b/src/dragonball/src/device_manager/vsock_dev_mgr.rs @@ -88,6 +88,20 @@ pub struct VsockDeviceConfigInfo { pub use_generic_irq: Option, } +impl Default for VsockDeviceConfigInfo { + fn default() -> Self { + Self { + id: String::default(), + guest_cid: 0, + uds_path: None, + tcp_addr: None, + queue_size: Vec::from(QUEUE_SIZES), + use_shared_irq: None, + use_generic_irq: None, + } + } +} + impl VsockDeviceConfigInfo { /// Get number and size of queues supported. pub fn queue_sizes(&self) -> Vec {