Move network polling code to bottom half

This commit is contained in:
jiangjianfeng
2025-02-20 07:00:53 +00:00
committed by Tate, Hongliang Tian
parent 9804f053f2
commit 7d24e63216
16 changed files with 122 additions and 85 deletions

View File

@ -3,7 +3,7 @@
use alloc::{borrow::ToOwned, sync::Arc};
use aster_bigtcp::device::WithDevice;
use ostd::sync::LocalIrqDisabled;
use aster_softirq::BottomHalfDisabled;
use spin::Once;
use super::{poll::poll_ifaces, Iface};
@ -52,7 +52,7 @@ fn new_virtio() -> Option<Arc<Iface>> {
let ether_addr = virtio_net.lock().mac_addr().0;
struct Wrapper(Arc<SpinLock<dyn AnyNetworkDevice, LocalIrqDisabled>>);
struct Wrapper(Arc<SpinLock<dyn AnyNetworkDevice, BottomHalfDisabled>>);
impl WithDevice for Wrapper {
type Device = dyn AnyNetworkDevice;