[][src]Struct kernel::virtio::VirtIOData

#[repr(C)]#[repr(align(4096))]pub struct VirtIOData {
    pub desc: [VRingDesc; 8],
    pub avail: [u16; 1984],
    pub used: [UsedArea; 8],
    pub free: [bool; 8],
    pub used_idx: u16,
    pub info: [Option<InflightOp>; 8],
}

Fields

desc: [VRingDesc; 8]

VIRTIO MMIO descriptor register

avail: [u16; 1984]

VIRTIO MMIO descriptor avail register (padding to page size)

used: [UsedArea; 8]

VIRTIO MMIO descriptor used register

free: [bool; 8]

is descriptor free

used_idx: u16

used index of used array

info: [Option<InflightOp>; 8]

in-flight operations

Implementations

impl VirtIOData[src]

fn free_desc(&mut self, i: usize)[src]

Free one descriptor

fn alloc_desc(&mut self) -> Option<usize>[src]

Allocate one descriptor

fn alloc3_desc(&mut self) -> Option<[usize; 3]>[src]

Allocate three descriptors, return array of indices

fn free_chain(&mut self, i: usize)[src]

Free descriptor chain