pub struct NetPciHotplugResourceCarrier {
pub net_param: NetParameters,
pub msi_device_tube: Tube,
pub ioevent_vm_memory_client: VmMemoryClient,
pub pci_address: Option<PciAddress>,
pub intx_parameter: Option<IntxParameter>,
pub vm_control_tube: Tube,
}Expand description
A NetPciHotplugResourceCarrier is a ResourceCarrier specialization for virtio-net devices.
TODO(b/289155315): make members private.
Fields§
§net_param: NetParametersNetParameters for constructing tap device
msi_device_tube: Tubemsi_device_tube for VirtioPciDevice constructor
ioevent_vm_memory_client: VmMemoryClientioevent_vm_memory_client for VirtioPciDevice constructor
pci_address: Option<PciAddress>pci_address for the hotplugged device
intx_parameter: Option<IntxParameter>intx_parameter for assign_irq
vm_control_tube: Tubevm_control_tube for VirtioPciDevice constructor
Implementations§
Source§impl NetPciHotplugResourceCarrier
impl NetPciHotplugResourceCarrier
Sourcepub fn new(
net_param: NetParameters,
msi_device_tube: Tube,
ioevent_vm_memory_client: VmMemoryClient,
vm_control_tube: Tube,
) -> Self
pub fn new( net_param: NetParameters, msi_device_tube: Tube, ioevent_vm_memory_client: VmMemoryClient, vm_control_tube: Tube, ) -> Self
Constructs NetPciHotplugResourceCarrier.
pub fn debug_label(&self) -> String
pub fn keep_rds(&self) -> Vec<RawDescriptor> ⓘ
pub fn allocate_address( &mut self, preferred_address: PciAddress, resources: &mut SystemAllocator, ) -> Result<()>
pub fn assign_irq( &mut self, irq_evt: IrqLevelEvent, pin: PciInterruptPin, irq_num: u32, )
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NetPciHotplugResourceCarrier
impl<'de> Deserialize<'de> for NetPciHotplugResourceCarrier
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
Auto Trait Implementations§
impl Freeze for NetPciHotplugResourceCarrier
impl RefUnwindSafe for NetPciHotplugResourceCarrier
impl Send for NetPciHotplugResourceCarrier
impl Sync for NetPciHotplugResourceCarrier
impl Unpin for NetPciHotplugResourceCarrier
impl UnwindSafe for NetPciHotplugResourceCarrier
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