pub struct ManaDevice<T: DeviceBacking> { /* private fields */ }
Expand description
A MANA device.
Implementations§
Source§impl<T: DeviceBacking> ManaDevice<T>
impl<T: DeviceBacking> ManaDevice<T>
Sourcepub async fn new(
driver: &impl SpawnDriver,
device: T,
num_vps: u32,
max_queues_per_vport: u16,
) -> Result<Self>
pub async fn new( driver: &impl SpawnDriver, device: T, num_vps: u32, max_queues_per_vport: u16, ) -> Result<Self>
Initializes the MANA driver on device
.
Sourcepub fn num_vports(&self) -> u32
pub fn num_vports(&self) -> u32
Returns the number of vports the device supports.
Sourcepub fn dev_config(&self) -> &ManaQueryDeviceCfgResp
pub fn dev_config(&self) -> &ManaQueryDeviceCfgResp
Returns the device configuration.
Sourcepub async fn start_notification_task(
&mut self,
driver_source: &VmTaskDriverSource,
)
pub async fn start_notification_task( &mut self, driver_source: &VmTaskDriverSource, )
Starts a hardware channel (HWC) task that listens to events on the HWC and calls the appropriate provided callsbacks/closure.
Sourcepub async fn new_vport(
&self,
index: u32,
vport_state: Option<VportState>,
dev_config: &ManaQueryDeviceCfgResp,
) -> Result<Vport<T>>
pub async fn new_vport( &self, index: u32, vport_state: Option<VportState>, dev_config: &ManaQueryDeviceCfgResp, ) -> Result<Vport<T>>
Initializes and returns the vport number index
.
Sourcepub async fn query_vport_config(
&self,
vport: u32,
) -> Result<ManaQueryVportCfgResp>
pub async fn query_vport_config( &self, vport: u32, ) -> Result<ManaQueryVportCfgResp>
Queries the configuration of a specific vport.
Trait Implementations§
Source§impl<T: DeviceBacking> Inspect for ManaDevice<T>
impl<T: DeviceBacking> Inspect for ManaDevice<T>
Auto Trait Implementations§
impl<T> Freeze for ManaDevice<T>
impl<T> !RefUnwindSafe for ManaDevice<T>
impl<T> Send for ManaDevice<T>
impl<T> Sync for ManaDevice<T>
impl<T> Unpin for ManaDevice<T>
impl<T> !UnwindSafe for ManaDevice<T>
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