morpheus_network::driver::virtio::config

Struct VirtioConfig

Source
pub struct VirtioConfig {
    pub dma_cpu_base: *mut u8,
    pub dma_bus_base: u64,
    pub dma_size: usize,
    pub queue_size: u16,
    pub buffer_size: usize,
}
Expand description

VirtIO driver configuration.

Fields§

§dma_cpu_base: *mut u8

Pre-allocated DMA region CPU base.

§dma_bus_base: u64

Pre-allocated DMA region bus address.

§dma_size: usize

DMA region size.

§queue_size: u16

Queue size (number of descriptors).

§buffer_size: usize

Buffer size for each queue entry.

Implementations§

Source§

impl VirtioConfig

Source

pub const DEFAULT_QUEUE_SIZE: u16 = 32u16

Default queue size.

Source

pub const DEFAULT_BUFFER_SIZE: usize = 2_048usize

Default buffer size (2KB).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.