Struct nmstate::SrIovConfig
source · #[non_exhaustive]pub struct SrIovConfig {
pub drivers_autoprobe: Option<bool>,
pub total_vfs: Option<u32>,
pub vfs: Option<Vec<SrIovVfConfig>>,
}
Expand description
Single Root I/O Virtualization(SRIOV) configuration. The example yaml output of crate::NetworkState with SR-IOV enabled ethernet interface would be:
interfaces:
- name: ens1f1
type: ethernet
state: up
mac-address: 00:11:22:33:44:55
mtu: 1500
min-mtu: 68
max-mtu: 9702
ethernet:
sr-iov:
drivers-autoprobe: true
total-vfs: 2
vfs:
- id: 0
mac-address: 00:11:22:33:00:ff
spoof-check: true
trust: false
min-tx-rate: 0
max-tx-rate: 0
vlan-id: 0
qos: 0
- id: 1
mac-address: 00:11:22:33:00:ef
spoof-check: true
trust: false
min-tx-rate: 0
max-tx-rate: 0
vlan-id: 0
qos: 0
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.drivers_autoprobe: Option<bool>
Bind created VFs to their default kernel driver.
This relates to sriov_drivers_autoprobe.
More info here https://docs.kernel.org/PCI/pci-iov-howto.html#sr-iov-api
Deserialize and serialize from/to drivers-autoprobe
.
total_vfs: Option<u32>
The number of VFs enabled on PF.
Deserialize and serialize from/to total-vfs
.
vfs: Option<Vec<SrIovVfConfig>>
VF specific configurations.
- Setting to
Some(Vec::new())
will revert all VF configurations back to defaults. - If not empty, missing SrIovVfConfig will use current configuration.
Implementations§
source§impl SrIovConfig
impl SrIovConfig
Trait Implementations§
source§impl Clone for SrIovConfig
impl Clone for SrIovConfig
source§fn clone(&self) -> SrIovConfig
fn clone(&self) -> SrIovConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SrIovConfig
impl Debug for SrIovConfig
source§impl Default for SrIovConfig
impl Default for SrIovConfig
source§fn default() -> SrIovConfig
fn default() -> SrIovConfig
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for SrIovConfig
impl<'de> Deserialize<'de> for SrIovConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for SrIovConfig
impl PartialEq for SrIovConfig
source§impl Serialize for SrIovConfig
impl Serialize for SrIovConfig
impl Eq for SrIovConfig
impl StructuralPartialEq for SrIovConfig
Auto Trait Implementations§
impl Freeze for SrIovConfig
impl RefUnwindSafe for SrIovConfig
impl Send for SrIovConfig
impl Sync for SrIovConfig
impl Unpin for SrIovConfig
impl UnwindSafe for SrIovConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.