Reuse Rxbuffer and update qemu_args.sh for vsock

This commit is contained in:
Anmin Liu
2024-06-08 18:06:22 +00:00
committed by Tate, Hongliang Tian
parent 878e8a88f4
commit 9f67fcdc58
11 changed files with 89 additions and 209 deletions

View File

@ -3,8 +3,6 @@
use aster_frame::mm::{DmaCoherent, DmaStream, DmaStreamSlice, HasDaddr};
use aster_network::{DmaSegment, RxBuffer, TxBuffer};
use crate::device;
/// A DMA-capable buffer.
///
/// Any type implements this trait should also implements `HasDaddr` trait,
@ -50,15 +48,3 @@ impl DmaBuf for RxBuffer {
self.buf_len()
}
}
impl DmaBuf for device::socket::buffer::TxBuffer {
fn len(&self) -> usize {
self.nbytes()
}
}
impl DmaBuf for device::socket::buffer::RxBuffer {
fn len(&self) -> usize {
self.buf_len()
}
}