Notify virtqueue in a batch manner

This commit is contained in:
jiangjianfeng
2024-12-17 02:24:07 +00:00
committed by Tate, Hongliang Tian
parent acc10376e6
commit 9a540d0fb6
5 changed files with 109 additions and 17 deletions

View File

@ -2,7 +2,10 @@
use alloc::vec;
use aster_bigtcp::{device, time::Instant};
use aster_bigtcp::{
device::{self, NotifyDevice},
time::Instant,
};
use ostd::mm::VmWriter;
use crate::{buffer::RxBuffer, AnyNetworkDevice};
@ -32,6 +35,13 @@ impl device::Device for dyn AnyNetworkDevice {
self.capabilities()
}
}
impl NotifyDevice for dyn AnyNetworkDevice {
fn notify_poll_end(&mut self) {
self.notify_poll_end();
}
}
pub struct RxToken(RxBuffer);
impl device::RxToken for RxToken {