Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurationManager ¶
type ConfigurationManager interface {
// ValidateDeviceNvSpec will validate device's non-volatile spec against already applied configuration on the host
// returns bool - nv config update required
// returns bool - reboot required
// returns error - there are errors in device's spec
ValidateDeviceNvSpec(ctx context.Context, device *v1alpha1.NicDevice) (bool, bool, error)
// ApplyDeviceNvSpec calculates device's missing nv spec configuration and applies it to the device on the host
// returns bool - reboot required
// returns error - there were errors while applying nv configuration
ApplyDeviceNvSpec(ctx context.Context, device *v1alpha1.NicDevice) (bool, error)
// ApplyDeviceRuntimeSpec calculates device's missing runtime spec configuration and applies it to the device on the host
// returns error - there were errors while applying nv configuration
ApplyDeviceRuntimeSpec(device *v1alpha1.NicDevice) error
// ResetNicFirmware resets NIC's firmware
// Operation can be long, required context to be able to terminate by timeout
// IB devices need to communicate with other nodes for confirmation
// return err - there were errors while resetting NIC firmware
ResetNicFirmware(ctx context.Context, device *v1alpha1.NicDevice) error
}
ConfigurationManager contains logic for configuring NIC devices on the host
func NewConfigurationManager ¶
func NewConfigurationManager(eventRecorder record.EventRecorder, dmsManager dms.DMSManager, nvConfigUtils nvconfig.NVConfigUtils, spectrumXConfigManager spectrumx.SpectrumXManager) ConfigurationManager
type ConfigurationUtils ¶
type ConfigurationUtils interface {
// GetLinkType return the link type of the net device (Ethernet / Infiniband)
GetLinkType(name string) string
// GetPCILinkSpeed return PCI bus speed in GT/s
GetPCILinkSpeed(pciAddr string) (int, error)
// GetMaxReadRequestSize returns MaxReadRequest size for PCI device
GetMaxReadRequestSize(pciAddr string) (int, error)
// GetQoSSettings returns trust and pfc settings for network interface
GetQoSSettings(device *v1alpha1.NicDevice, interfaceName string) (*v1alpha1.QosSpec, error)
// SetMaxReadRequestSize sets max read request size for PCI device
SetMaxReadRequestSize(pciAddr string, maxReadRequestSize int) error
// SetQoSSettings sets trust and PFC settings for a network interface
SetQoSSettings(device *v1alpha1.NicDevice, spec *v1alpha1.QosSpec) error
// ResetNicFirmware resets NIC's firmware
// Operation can be long, required context to be able to terminate by timeout
// IB devices need to communicate with other nodes for confirmation
ResetNicFirmware(ctx context.Context, pciAddr string) error
}
ConfigurationUtils is an interface that contains util functions related to NIC Configuration
Click to show internal directories.
Click to hide internal directories.