Documentation ¶
Index ¶
- Constants
- func AttachHostDevices(dom deviceAttacher, hostDevices []api.HostDevice) error
- func CreateHostDevices(vmi *v1.VirtualMachineInstance) ([]api.HostDevice, error)
- func CreateHostDevicesFromIfacesAndPool(ifaces []v1.Interface, pool hostdevice.AddressPooler) ([]api.HostDevice, error)
- func DifferenceHostDevicesByAlias(desiredHostDevices, actualHostDevices []api.HostDevice) []api.HostDevice
- func FilterHostDevices(domainSpec *api.DomainSpec) []api.HostDevice
- func GetHostDevicesToAttach(vmi *v1.VirtualMachineInstance, domainSpec *api.DomainSpec) ([]api.HostDevice, error)
- func SafelyDetachHostDevices(domainSpec *api.DomainSpec, eventDetach eventRegistrar, dom deviceDetacher, ...) error
- type PCIAddressPool
Constants ¶
View Source
const ( AliasPrefix = "sriov-" MaxConcurrentHotPlugDevicesEvents = 32 )
Variables ¶
This section is empty.
Functions ¶
func AttachHostDevices ¶
func AttachHostDevices(dom deviceAttacher, hostDevices []api.HostDevice) error
func CreateHostDevices ¶
func CreateHostDevices(vmi *v1.VirtualMachineInstance) ([]api.HostDevice, error)
func CreateHostDevicesFromIfacesAndPool ¶
func CreateHostDevicesFromIfacesAndPool(ifaces []v1.Interface, pool hostdevice.AddressPooler) ([]api.HostDevice, error)
func DifferenceHostDevicesByAlias ¶
func DifferenceHostDevicesByAlias(desiredHostDevices, actualHostDevices []api.HostDevice) []api.HostDevice
DifferenceHostDevicesByAlias given two slices of host-devices, according to Alias.Name, it returns a slice with host-devices that exists on the first slice and not exists on the second.
func FilterHostDevices ¶
func FilterHostDevices(domainSpec *api.DomainSpec) []api.HostDevice
func GetHostDevicesToAttach ¶
func GetHostDevicesToAttach(vmi *v1.VirtualMachineInstance, domainSpec *api.DomainSpec) ([]api.HostDevice, error)
func SafelyDetachHostDevices ¶
func SafelyDetachHostDevices(domainSpec *api.DomainSpec, eventDetach eventRegistrar, dom deviceDetacher, timeout time.Duration) error
Types ¶
type PCIAddressPool ¶
type PCIAddressPool struct {
// contains filtered or unexported fields
}
func NewPCIAddressPool ¶
func NewPCIAddressPool(ifaces []v1.Interface) *PCIAddressPool
NewPCIAddressPool creates a PCI address pool based on the provided list of interfaces and the environment variables that describe the SRIOV devices.
func (*PCIAddressPool) Pop ¶
func (p *PCIAddressPool) Pop(networkName string) (string, error)
Pop gets the next PCI address available to a particular SR-IOV network. The function makes sure that the allocated address is not allocated to next callers, whether they request an address for the same network or another network that is backed by the same resourceName.
Click to show internal directories.
Click to hide internal directories.