Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rename virtio-def crate to virtio-spec #1201

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ shell = ["simple-shell"]

[dependencies]
hermit-macro = { path = "hermit-macro" }
virtio-def = { path = "virtio-def" }
virtio-spec = { path = "virtio-spec" }
ahash = { version = "0.8", default-features = false }
align-address = "0.3"
anstyle = { version = "1", default-features = false }
Expand Down Expand Up @@ -160,7 +160,7 @@ llvm-tools = "0.1"
[workspace]
members = [
"hermit-macro",
"virtio-def",
"virtio-spec",
"xtask",
]
exclude = [
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/fs/virtio_fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use alloc::string::{String, ToString};
use alloc::vec::Vec;

use pci_types::InterruptLine;
use virtio_def::features::VirtioFsF;
use virtio_spec::features::VirtioFsF;

use crate::config::VIRTIO_MAX_QUEUE_SIZE;
#[cfg(feature = "pci")]
Expand Down Expand Up @@ -161,7 +161,7 @@ impl FuseInterface for VirtioFsDriver {

/// Error module of virtios filesystem driver.
pub mod error {
use virtio_def::features::VirtioFsF;
use virtio_spec::features::VirtioFsF;

/// Network filesystem error enum.
#[derive(Debug, Copy, Clone)]
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/fs/virtio_pci.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use alloc::vec::Vec;

use virtio_def::features::VirtioFsF;
use virtio_spec::features::VirtioFsF;

use crate::arch::pci::PciConfigRegion;
use crate::drivers::fs::virtio_fs::{FsDevCfg, VirtioFsDriver};
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/virtio_mmio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use core::str::FromStr;
use core::sync::atomic::{fence, Ordering};

use smoltcp::phy::ChecksumCapabilities;
use virtio_def::features::VirtioNetF;
use virtio_spec::features::VirtioNetF;

use crate::drivers::net::virtio_net::constants::Status;
use crate::drivers::net::virtio_net::{CtrlQueue, NetDevCfg, RxQueues, TxQueues, VirtioNetDriver};
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/net/virtio_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use align_address::Align;
use pci_types::InterruptLine;
use smoltcp::phy::{Checksum, ChecksumCapabilities};
use smoltcp::wire::{EthernetFrame, Ipv4Packet, Ipv6Packet, ETHERNET_HEADER_LEN};
use virtio_def::features::VirtioNetF;
use virtio_spec::features::VirtioNetF;
use zerocopy::AsBytes;

use self::constants::{NetHdrFlag, NetHdrGSO, Status, MAX_NUM_VQ};
Expand Down Expand Up @@ -1162,7 +1162,7 @@ pub fn check_features(features: VirtioNetF) -> Result<(), VirtioNetError> {
/// Error module of virtios network driver. Containing the (VirtioNetError)[VirtioNetError]
/// enum.
pub mod error {
use virtio_def::features::VirtioNetF;
use virtio_spec::features::VirtioNetF;

/// Network drivers error enum.
#[derive(Debug, Copy, Clone)]
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/virtio_pci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use alloc::vec::Vec;
use core::str::FromStr;

use smoltcp::phy::ChecksumCapabilities;
use virtio_def::features::VirtioNetF;
use virtio_spec::features::VirtioNetF;

use crate::arch::pci::PciConfigRegion;
use crate::drivers::net::virtio_net::{CtrlQueue, NetDevCfg, RxQueues, TxQueues, VirtioNetDriver};
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/virtio/transport/mmio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use core::ptr;
use core::ptr::{read_volatile, write_volatile};
use core::sync::atomic::{fence, Ordering};

use virtio_def::features::VirtioF;
use virtio_def::DeviceStatus;
use virtio_spec::features::VirtioF;
use virtio_spec::DeviceStatus;

#[cfg(any(feature = "tcp", feature = "udp"))]
use crate::arch::kernel::interrupts::*;
Expand Down
6 changes: 3 additions & 3 deletions src/drivers/virtio/transport/pci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use core::ptr::NonNull;
use core::sync::atomic::{fence, Ordering};
use core::{mem, ptr};

use virtio_def::features::VirtioF;
use virtio_def::pci::{CommonCfg, CommonCfgVolatileFieldAccess};
use virtio_def::DeviceStatus;
use virtio_spec::features::VirtioF;
use virtio_spec::pci::{CommonCfg, CommonCfgVolatileFieldAccess};
use virtio_spec::DeviceStatus;
use volatile::VolatileRef;

#[cfg(all(not(feature = "rtl8139"), any(feature = "tcp", feature = "udp")))]
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/virtio/virtqueue/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use core::ptr;

use align_address::Align;
use async_channel::TryRecvError;
use virtio_def::features::VirtioF;
use virtio_spec::features::VirtioF;
use zerocopy::AsBytes;

use self::error::{BufferError, VirtqError};
Expand Down Expand Up @@ -2984,7 +2984,7 @@ impl From<DescrFlags> for u16 {
/// This module unifies errors provided to useres of a virtqueue, independent of the underlying
/// virtqueue implementation, realized via the different enum variants.
pub mod error {
use virtio_def::features::VirtioF;
use virtio_spec::features::VirtioF;

use crate::fd;

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/virtio/virtqueue/packed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use core::ptr;
use core::sync::atomic::{fence, Ordering};

use align_address::Align;
use virtio_def::features::VirtioF;
use virtio_spec::features::VirtioF;
use zerocopy::little_endian;

#[cfg(not(feature = "pci"))]
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/virtio/virtqueue/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use core::cell::{RefCell, UnsafeCell};
use core::mem::{size_of, MaybeUninit};
use core::ptr::{self, NonNull};

use virtio_def::features::VirtioF;
use virtio_def::num::{le16, le32, le64};
use virtio_spec::features::VirtioF;
use virtio_spec::num::{le16, le32, le64};
use volatile::access::ReadOnly;
use volatile::{map_field, VolatilePtr, VolatileRef};

Expand Down
2 changes: 1 addition & 1 deletion virtio-def/Cargo.toml → virtio-spec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "virtio-def"
name = "virtio-spec"
authors = ["Martin Kröning <mkroening@posteo.net>"]
edition = "2021"
description = "Definitions from the Virtual I/O Device (VIRTIO) specification."
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.