dragonball: update vsock dependency

1. fix vsock device init failed
2. fix VsockDeviceConfigInfo not found

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
This commit is contained in:
wllenyj 2022-05-26 17:29:50 +08:00 committed by Chao Wu
parent dd003ebe0e
commit d88b1bf01c
3 changed files with 19 additions and 7 deletions

View File

@ -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;

View File

@ -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::*;

View File

@ -88,6 +88,20 @@ pub struct VsockDeviceConfigInfo {
pub use_generic_irq: Option<bool>,
}
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<u16> {