pub struct BuffConfig {
pub dma_mask: u64,
pub align: usize,
pub size: usize,
}Expand description
Configuration for DMA buffer allocation.
This structure specifies the requirements for DMA buffers used in block device operations. The configuration ensures that buffers meet the hardware’s alignment and addressing constraints.
Fields§
§dma_mask: u64DMA addressing mask for the device.
This mask defines the addressable memory range for DMA operations.
For example, a 32-bit device would use 0xFFFFFFFF.
align: usizeRequired alignment for buffer addresses.
Buffers must be aligned to this boundary (in bytes) for optimal performance and hardware compatibility. Common values are 512 or 4096.
size: usizeSize of each buffer in bytes.
This typically matches the device’s block size to ensure efficient data transfer and avoid partial block operations.
Auto Trait Implementations§
impl Freeze for BuffConfig
impl RefUnwindSafe for BuffConfig
impl Send for BuffConfig
impl Sync for BuffConfig
impl Unpin for BuffConfig
impl UnwindSafe for BuffConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more