Make essential changes for publishing OSTD

This commit is contained in:
Jianfeng Jiang
2024-07-01 08:00:09 +00:00
committed by Tate, Hongliang Tian
parent 77b823edc0
commit f86583dbce
64 changed files with 341 additions and 218 deletions

View File

@ -19,7 +19,6 @@ aster-rights = { path = "../../libs/aster-rights" }
id-alloc = { path = "../../../ostd/libs/id-alloc" }
typeflags-util = { path = "../../libs/typeflags-util" }
ostd = { path = "../../../ostd" }
pod = { git = "https://github.com/asterinas/pod", rev = "d7dba56" }
component = { path = "../../libs/comp-sys/component" }
log = "0.4"
bit_field = "0.10.1"

View File

@ -15,8 +15,8 @@ use ostd::{
mm::{DmaDirection, DmaStream, DmaStreamSlice, FrameAllocOptions, VmIo},
sync::SpinLock,
trap::TrapFrame,
Pod,
};
use pod::Pod;
use super::{BlockFeatures, VirtioBlockConfig};
use crate::{

View File

@ -5,8 +5,7 @@ pub mod device;
use aster_util::safe_ptr::SafePtr;
use bitflags::bitflags;
use int_to_c_enum::TryFromInt;
use ostd::io_mem::IoMem;
use pod::Pod;
use ostd::{io_mem::IoMem, Pod};
use crate::transport::VirtioTransport;

View File

@ -1,8 +1,7 @@
// SPDX-License-Identifier: MPL-2.0
use aster_util::safe_ptr::SafePtr;
use ostd::io_mem::IoMem;
use pod::Pod;
use ostd::{io_mem::IoMem, Pod};
use crate::transport::VirtioTransport;

View File

@ -28,8 +28,7 @@
pub mod device;
use aster_util::safe_ptr::SafePtr;
use ostd::io_mem::IoMem;
use pod::Pod;
use ostd::{io_mem::IoMem, Pod};
use crate::transport::VirtioTransport;

View File

@ -3,8 +3,7 @@
use aster_network::EthernetAddr;
use aster_util::safe_ptr::SafePtr;
use bitflags::bitflags;
use ostd::io_mem::IoMem;
use pod::Pod;
use ostd::{io_mem::IoMem, Pod};
use crate::transport::VirtioTransport;

View File

@ -2,7 +2,7 @@
use bitflags::bitflags;
use int_to_c_enum::TryFromInt;
use pod::Pod;
use ostd::Pod;
pub const VIRTIO_NET_HDR_LEN: usize = core::mem::size_of::<VirtioNetHdr>();

View File

@ -2,8 +2,7 @@
use aster_util::safe_ptr::SafePtr;
use bitflags::bitflags;
use ostd::io_mem::IoMem;
use pod::Pod;
use ostd::{io_mem::IoMem, Pod};
use crate::transport::VirtioTransport;

View File

@ -6,8 +6,7 @@ use core::{fmt::Debug, hint::spin_loop, mem::size_of};
use aster_network::{RxBuffer, TxBuffer};
use aster_util::{field_ptr, slot_vec::SlotVec};
use log::debug;
use ostd::{mm::VmWriter, offset_of, sync::SpinLock, trap::TrapFrame};
use pod::Pod;
use ostd::{mm::VmWriter, offset_of, sync::SpinLock, trap::TrapFrame, Pod};
use super::{
config::{VirtioVsockConfig, VsockFeatures},

View File

@ -27,7 +27,7 @@
//
use bitflags::bitflags;
use int_to_c_enum::TryFromInt;
use pod::Pod;
use ostd::Pod;
use super::error::{self, SocketError};

View File

@ -15,9 +15,8 @@ use log::debug;
use ostd::{
io_mem::IoMem,
mm::{DmaCoherent, FrameAllocOptions},
offset_of,
offset_of, Pod,
};
use pod::Pod;
use crate::{dma_buf::DmaBuf, transport::VirtioTransport};

View File

@ -2,7 +2,7 @@
use core::fmt::Debug;
use pod::Pod;
use ostd::Pod;
#[derive(Clone, Copy, Pod)]
#[repr(C)]

View File

@ -1,8 +1,7 @@
// SPDX-License-Identifier: MPL-2.0
use aster_util::safe_ptr::SafePtr;
use ostd::io_mem::IoMem;
use pod::Pod;
use ostd::{io_mem::IoMem, Pod};
use super::capability::VirtioPciCapabilityData;
use crate::transport::pci::capability::VirtioPciCpabilityType;