⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module dma_pool

Module dma_pool 

Source
Expand description

DMA Buffer Pool for Zero-Copy Networking

Provides pre-allocated DMA-capable buffers for network packet transmission and reception, enabling zero-copy operation with minimal allocation overhead.

Buffers are allocated from physical frames below 4GB for 32-bit DMA compatibility. Each buffer gets one 4KB frame; the usable portion is DMA_BUFFER_SIZE (2048 bytes) to accommodate network MTU + headers.

Structs§

DmaBuffer
DMA Buffer
DmaBufferPool
DMA Buffer Pool
DmaPoolStats
DMA Pool Statistics

Constants§

DMA_BUFFER_SIZE
Standard network buffer size (1500 MTU + headers + alignment)
MAX_BUFFERS
Maximum number of buffers in the pool

Functions§

init_network_pool
Initialize the global network DMA pool
with_network_pool
Execute a closure with the global network DMA pool (mutable access)