Skip to content

Commit

Permalink
Update virtio-drivers, modify two APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
hky1999 committed Sep 27, 2023
1 parent 51a42ea commit 501619f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion crates/driver_pci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ repository = "https://github.com/rcore-os/arceos/tree/main/crates/driver_pci"
documentation = "https://rcore-os.github.io/arceos/driver_pci/index.html"

[dependencies]
virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers.git", rev = "409ee72" }
# virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers.git", rev = "409ee72" }
virtio-drivers = { git = "https://github.com/hky1999/virtio-drivers.git", rev = "80d1652" }
3 changes: 2 additions & 1 deletion crates/driver_virtio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ driver_common = { path = "../driver_common" }
driver_block = { path = "../driver_block", optional = true }
driver_net = { path = "../driver_net", optional = true }
driver_display = { path = "../driver_display", optional = true}
virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers.git", rev = "409ee72" }
# virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers.git", rev = "409ee72" }
virtio-drivers = { git = "https://github.com/hky1999/virtio-drivers.git", rev = "80d1652" }
4 changes: 2 additions & 2 deletions crates/driver_virtio/src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ impl<H: Hal, T: Transport, const QS: usize> NetDriverOps for VirtIoNetDev<H, T,

#[inline]
fn can_transmit(&self) -> bool {
!self.free_tx_bufs.is_empty() && self.inner.can_transmit()
!self.free_tx_bufs.is_empty() && self.inner.can_send()
}

#[inline]
fn can_receive(&self) -> bool {
self.inner.can_receive()
self.inner.can_recv()
}

#[inline]
Expand Down

0 comments on commit 501619f

Please sign in to comment.