pub struct SriovCapability {
pub offset: u16,
pub total_vfs: u16,
pub num_vfs: u16,
pub vf_offset: u16,
pub vf_stride: u16,
pub vf_device_id: u16,
pub capabilities: u32,
pub migration_capable: bool,
pub ari_capable: bool,
}Expand description
Parsed SR-IOV capability from PCI config space
Fields§
§offset: u16Offset of the SR-IOV capability in PCI config space
total_vfs: u16Total number of VFs supported by hardware
num_vfs: u16Currently enabled number of VFs
vf_offset: u16First VF offset (RID offset from PF)
vf_stride: u16VF stride (RID stride between consecutive VFs)
vf_device_id: u16VF device ID
capabilities: u32SR-IOV capability flags
migration_capable: boolWhether VF migration is supported
ari_capable: boolWhether ARI (Alternative Routing-ID Interpretation) is capable
Implementations§
Source§impl SriovCapability
impl SriovCapability
Sourcepub fn parse(data: &[u8], offset: u16) -> Result<Self, VmError>
pub fn parse(data: &[u8], offset: u16) -> Result<Self, VmError>
Parse SR-IOV capability from a config space data buffer
data should contain the SR-IOV capability structure starting at index
0.
Sourcepub fn vf_address(&self, pf: &PciAddress, vf_index: u16) -> Option<PciAddress>
pub fn vf_address(&self, pf: &PciAddress, vf_index: u16) -> Option<PciAddress>
Calculate the PCI address of a specific VF
Trait Implementations§
Source§impl Clone for SriovCapability
impl Clone for SriovCapability
Source§fn clone(&self) -> SriovCapability
fn clone(&self) -> SriovCapability
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SriovCapability
impl Debug for SriovCapability
impl Copy for SriovCapability
Auto Trait Implementations§
impl Freeze for SriovCapability
impl RefUnwindSafe for SriovCapability
impl Send for SriovCapability
impl Sync for SriovCapability
impl Unpin for SriovCapability
impl UnwindSafe for SriovCapability
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)