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

@ -8,7 +8,6 @@ edition = "2021"
[dependencies]
bitflags = "1.3"
spin = "0.9.4"
pod = { git = "https://github.com/asterinas/pod", rev = "d7dba56" }
ostd = { path = "../../../ostd" }
align_ext = { path = "../../../ostd/libs/align_ext" }
aster-util = { path = "../../libs/aster-util" }

View File

@ -5,7 +5,7 @@ use core::{
ops::{Add, Sub},
};
use pod::Pod;
use ostd::Pod;
use static_assertions::const_assert;
/// The block index used in the filesystem.

View File

@ -15,7 +15,6 @@ component = { path = "../../libs/comp-sys/component" }
int-to-c-enum = { path = "../../libs/int-to-c-enum" }
log = "0.4"
ostd = { path = "../../../ostd" }
pod = { git = "https://github.com/asterinas/pod", rev = "d7dba56" }
ringbuf = { version = "0.3.2", default-features = false, features = ["alloc"] }
smoltcp = { version = "0.9.1", default-features = false, features = ["alloc", "log", "medium-ethernet", "medium-ip", "proto-dhcpv4", "proto-ipv4", "proto-igmp", "socket-icmp", "socket-udp", "socket-tcp", "socket-raw", "socket-dhcpv4"] }
spin = "0.9.4"

View File

@ -8,8 +8,8 @@ use ostd::{
Daddr, DmaDirection, DmaStream, FrameAllocOptions, HasDaddr, VmReader, VmWriter, PAGE_SIZE,
},
sync::SpinLock,
Pod,
};
use pod::Pod;
use spin::Once;
use crate::dma_pool::{DmaPool, DmaSegment};

View File

@ -15,11 +15,10 @@ extern crate alloc;
use alloc::{collections::BTreeMap, string::String, sync::Arc, vec::Vec};
use core::{any::Any, fmt::Debug};
use aster_util::safe_ptr::Pod;
pub use buffer::{RxBuffer, TxBuffer, RX_BUFFER_POOL, TX_BUFFER_POOL};
use component::{init_component, ComponentInitError};
pub use dma_pool::DmaSegment;
use ostd::sync::SpinLock;
use ostd::{sync::SpinLock, Pod};
use smoltcp::phy;
use spin::Once;

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;