Skip to content

Commit

Permalink
feat: modify can send, delete can_recv
Browse files Browse the repository at this point in the history
  • Loading branch information
hky1999 committed Nov 14, 2023
1 parent 8b38f24 commit b1fdc11
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/device/net/dev_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,7 @@ impl<H: Hal, T: Transport, const QUEUE_SIZE: usize> VirtIONetRaw<H, T, QUEUE_SIZ

/// Whether can send packet.
pub fn can_send(&self) -> bool {
self.send_queue.available_desc() >= 1
}

/// Whether can receive packet.
pub fn can_recv(&self) -> bool {
self.recv_queue.can_pop()
self.send_queue.available_desc() >= 2
}

/// Whether the length of the receive buffer is valid.
Expand Down

0 comments on commit b1fdc11

Please sign in to comment.