Expand description
Shared-memory network queue.
A NetQueue owns one NET_QUEUE_SIZE region allocated from the shared
ring allocator. The region is mapped into the networking strate with
SYS_NET_QUEUE_MAP, so both sides address the same descriptor rings and
frame pools. The kernel keeps a page table (vas/phys) because the
pages are not guaranteed to be physically contiguous.
The queue is the data plane primitive: once mapped, RX and TX are driven
by the descriptor rings and the kick/IRQ notifications, without a
syscall per packet.
Re-exportsยง
use alloc::sync::Arc;๐use alloc::vec::Vec;๐use core::sync::atomic::AtomicU64;๐use core::sync::atomic::AtomicU8;๐use core::sync::atomic::Ordering;๐use crate::ipc::shared_ring::RingId;๐use crate::sync::SpinLock;๐use crate::sync::WaitQueue;๐use strat9_abi::net::features;๐use strat9_abi::net::link_flags;๐use strat9_abi::net::NetFrameDesc;๐use strat9_abi::net::NetQueueHeader;๐use strat9_abi::net::NET_FRAME_SIZE;๐use strat9_abi::net::NET_QUEUE_SIZE;๐
Structsยง
- NetQueue
- One shared RX/TX queue pair for a network device.
- NetQueues
- A set of queues for one device.
- Queue
Event - Per-queue event counter and wait queue.
Staticsยง
- QUEUE_
LOCK - Global serialisation for queue creation/teardown.