Skip to content

Commit 52f1870

Browse files
committed
feat(net): add RxBuffer type
This type will be used in the next commit where we will switch to use `readv` for RX path. Signed-off-by: Egor Lazarchuk <[email protected]>
1 parent 9786a05 commit 52f1870

File tree

3 files changed

+436
-0
lines changed

3 files changed

+436
-0
lines changed

src/vmm/src/devices/virtio/net/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ pub mod device;
2121
mod event_handler;
2222
pub mod metrics;
2323
pub mod persist;
24+
pub mod rx_buffer;
2425
mod tap;
2526
pub mod test_utils;
2627

2728
mod gen;
2829

2930
pub use tap::{Tap, TapError};
31+
use vm_memory::VolatileMemoryError;
3032

3133
pub use self::device::Net;
34+
use self::rx_buffer::RxBufferError;
3235

3336
/// Enum representing the Net device queue types
3437
#[derive(Debug)]
@@ -50,6 +53,10 @@ pub enum NetError {
5053
EventFd(io::Error),
5154
/// IO error: {0}
5255
IO(io::Error),
56+
/// Error writing in guest memory: {0}
57+
GuestMemoryError(#[from] VolatileMemoryError),
5358
/// The VNET header is missing from the frame
5459
VnetHeaderMissing,
60+
/// RxBuffer error: {0}
61+
RxBufferError(#[from] RxBufferError),
5562
}

0 commit comments

Comments
 (0)