Documentation ¶
Index ¶
- Constants
- Variables
- func AsIntString(v bool) string
- func CreateManager(config *rest.Config, scheme *runtime.Scheme, namespace string, metricsPort int, ...) (manager.Manager, error)
- func CreateNoLinks(path string) (*os.File, error)
- func DownloadFile(path, url, checksum string, client *http.Client) error
- func GetSriovInventory(log *logrus.Logger) (*sriovv2.NodeInventory, error)
- func NewDevicePluginController(c client.Client, log *logrus.Logger, nnr types.NamespacedName) *devicePluginController
- func NewPfBBConfigController(log *logrus.Logger, sharedVfioToken string) *pfBBConfigController
- func NewSecureHttpsClient(cert *x509.Certificate) (*http.Client, error)
- func OpenFileNoLinks(path string, flag int, perm os.FileMode) (*os.File, error)
- func OpenNoLinks(path string) (*os.File, error)
- func ShowHelp()
- func StartPfBbConfigCli(nodeName string, ns string, directClient client.Client, cmd string, ...)
- func StartTelemetryDaemon(mgr manager.Manager, nodeName string, ns string, directClient client.Client, ...)
- func Untar(tarFile string, dstPath string, log *logrus.Logger) (string, error)
- func VrbGetSriovInventory(log *logrus.Logger) (*vrbv1.NodeInventory, error)
- func Vrbacc100BBDevConfigToIniStruct(in *vrbv1.ACC100BBDevConfig) interface{}
- func VrbfindOrCreateConfigurationStatusCondition(nc *vrbv1.SriovVrbNodeConfig) metav1.Condition
- func VrbgetMatchingConfiguration(pciAddress string, configurations []vrbv1.PhysicalFunctionConfigExt) *vrbv1.PhysicalFunctionConfigExt
- func VrbgetTelemetry(pciAddr string, vfs []vrbv1.VF, telemetryGatherer *telemetryGatherer, ...)
- func VrbisConfigurationOfNonExistingInventoryRequested(requestedConfiguration []vrbv1.PhysicalFunctionConfigExt, ...) bool
- func VrbisKnownDevice(device *pci.Device) bool
- func VrbparseCounters(fieldLine, valueLine string, vfs []vrbv1.VF, pfPciAddr string, ...)
- func VrbparseDeviceStatus(lines []string, pfPciAddr string, vfs []vrbv1.VF, ...)
- func VrbparseTelemetry(file []byte, vfs []vrbv1.VF, pciAddr string, ...)
- func VrbqueueGroupConfigToIniStruct(in vrbv1.QueueGroupConfig) queueGroupConfigIniWrapper
- func VrbremoveVFs(nc *NodeConfigurator, acc vrbv1.SriovAccelerator) error
- func VrbunbindVFs(nc *NodeConfigurator, acc vrbv1.SriovAccelerator) error
- type ConfigurationConditionReason
- type Configurer
- type DrainAndExecute
- type NodeConfigReconciler
- func (r *NodeConfigReconciler) CreateEmptyNodeConfigIfNeeded(c client.Client) error
- func (r *NodeConfigReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *NodeConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *NodeConfigReconciler) VrbCreateEmptyNodeConfigIfNeeded(c client.Client) error
- func (r *NodeConfigReconciler) VrbSetupWithManager(mgr ctrl.Manager) error
- func (r *NodeConfigReconciler) VrbconfigureNode(nodeConfig *vrbv1.SriovVrbNodeConfig) error
- func (r *NodeConfigReconciler) VrbisCardUpdateRequired(nc *vrbv1.SriovVrbNodeConfig, detectedInventory *vrbv1.NodeInventory) bool
- func (r *NodeConfigReconciler) VrbreadExistingInventory() (*vrbv1.NodeInventory, error)
- func (r *NodeConfigReconciler) VrbupdateStatus(nc *vrbv1.SriovVrbNodeConfig, status metav1.ConditionStatus, ...) error
- type NodeConfigurator
- func (n *NodeConfigurator) ApplySpec(nodeConfig sriovv2.SriovFecNodeConfigSpec) error
- func (n *NodeConfigurator) VrbApplySpec(nodeConfig vrbv1.SriovVrbNodeConfigSpec) error
- func (n *NodeConfigurator) VrbcleanAcceleratorConfig(acc vrbv1.SriovAccelerator) error
- func (n *NodeConfigurator) VrbconfigureAccelerator(acc vrbv1.SriovAccelerator, requestedConfig *vrbv1.PhysicalFunctionConfigExt) error
- type RestartDevicePluginFunction
- type VrbConfigurer
Constants ¶
View Source
const ( ConditionConfigured string = "Configured" ConfigurationInProgress ConfigurationConditionReason = "InProgress" ConfigurationFailed ConfigurationConditionReason = "Failed" ConfigurationNotRequested ConfigurationConditionReason = "NotRequested" ConfigurationSucceeded ConfigurationConditionReason = "Succeeded" )
Variables ¶
View Source
var ( VrbconfigPath = "/sriov_config/config/accelerators_vrb.json" VrbgetSriovInventory = VrbGetSriovInventory VrbsupportedAccelerators utils.AcceleratorDiscoveryConfig )
View Source
var ( RESET_MODE_CMD_ID = []byte{0x2, 0x0} AUTO_RESET_CMD_ID = []byte{0x3, 0x0} CLEAR_LOG_CMD_ID = []byte{0x4, 0x0} REG_DUMP_CMD_ID = []byte{0x6, 0x0} MM_READ_CMD_ID = []byte{0x8, 0x0} DEVICE_DATA_CMD_ID = []byte{0x9, 0x0} )
pf_bb_config_cli command IDs
View Source
var ( CLUSTER_RESET_MODE = []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} PF_FLR_MODE = []byte{0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0} AUTO_RESET_OFF = []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} AUTO_RESET_ON = []byte{0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0} MM_READ_REG_READ = []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} VOID_PRIVATE = []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} )
CLI command arguments
Functions ¶
func AsIntString ¶
func CreateManager ¶
func GetSriovInventory ¶
func GetSriovInventory(log *logrus.Logger) (*sriovv2.NodeInventory, error)
func NewPfBBConfigController ¶
func NewSecureHttpsClient ¶
func NewSecureHttpsClient(cert *x509.Certificate) (*http.Client, error)
func OpenFileNoLinks ¶
func StartPfBbConfigCli ¶
func StartTelemetryDaemon ¶
func VrbGetSriovInventory ¶
func VrbGetSriovInventory(log *logrus.Logger) (*vrbv1.NodeInventory, error)
func Vrbacc100BBDevConfigToIniStruct ¶
func Vrbacc100BBDevConfigToIniStruct(in *vrbv1.ACC100BBDevConfig) interface{}
func VrbfindOrCreateConfigurationStatusCondition ¶
func VrbfindOrCreateConfigurationStatusCondition(nc *vrbv1.SriovVrbNodeConfig) metav1.Condition
func VrbgetMatchingConfiguration ¶
func VrbgetMatchingConfiguration(pciAddress string, configurations []vrbv1.PhysicalFunctionConfigExt) *vrbv1.PhysicalFunctionConfigExt
func VrbgetTelemetry ¶
func VrbisConfigurationOfNonExistingInventoryRequested ¶
func VrbisConfigurationOfNonExistingInventoryRequested(requestedConfiguration []vrbv1.PhysicalFunctionConfigExt, existingInventory *vrbv1.NodeInventory) bool
func VrbisKnownDevice ¶
func VrbparseCounters ¶
func VrbparseDeviceStatus ¶
func VrbparseTelemetry ¶
func VrbqueueGroupConfigToIniStruct ¶
func VrbqueueGroupConfigToIniStruct(in vrbv1.QueueGroupConfig) queueGroupConfigIniWrapper
func VrbremoveVFs ¶
func VrbremoveVFs(nc *NodeConfigurator, acc vrbv1.SriovAccelerator) error
func VrbunbindVFs ¶
func VrbunbindVFs(nc *NodeConfigurator, acc vrbv1.SriovAccelerator) error
Types ¶
type ConfigurationConditionReason ¶
type ConfigurationConditionReason string
type Configurer ¶
type Configurer interface {
ApplySpec(nodeConfig fec.SriovFecNodeConfigSpec) error
}
type DrainAndExecute ¶
type NodeConfigReconciler ¶
func NewNodeConfigReconciler ¶
func NewNodeConfigReconciler(k8sClient client.Client, drainer DrainAndExecute, nodeNameRef types.NamespacedName, sriovfecconfigurer Configurer, vrbconfigurer VrbConfigurer, restartDevicePluginFunction RestartDevicePluginFunction) (r *NodeConfigReconciler, err error)
func (*NodeConfigReconciler) CreateEmptyNodeConfigIfNeeded ¶
func (r *NodeConfigReconciler) CreateEmptyNodeConfigIfNeeded(c client.Client) error
CreateEmptyNodeConfigIfNeeded creates empty CR to be Reconciled in near future and filled with Status. If invoked before manager's Start, it'll need a direct API client (Manager's/Controller's client is cached and cache is not initialized yet).
func (*NodeConfigReconciler) SetupWithManager ¶
func (r *NodeConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
func (*NodeConfigReconciler) VrbCreateEmptyNodeConfigIfNeeded ¶
func (r *NodeConfigReconciler) VrbCreateEmptyNodeConfigIfNeeded(c client.Client) error
func (*NodeConfigReconciler) VrbSetupWithManager ¶
func (r *NodeConfigReconciler) VrbSetupWithManager(mgr ctrl.Manager) error
func (*NodeConfigReconciler) VrbconfigureNode ¶
func (r *NodeConfigReconciler) VrbconfigureNode(nodeConfig *vrbv1.SriovVrbNodeConfig) error
func (*NodeConfigReconciler) VrbisCardUpdateRequired ¶
func (r *NodeConfigReconciler) VrbisCardUpdateRequired(nc *vrbv1.SriovVrbNodeConfig, detectedInventory *vrbv1.NodeInventory) bool
func (*NodeConfigReconciler) VrbreadExistingInventory ¶
func (r *NodeConfigReconciler) VrbreadExistingInventory() (*vrbv1.NodeInventory, error)
func (*NodeConfigReconciler) VrbupdateStatus ¶
func (r *NodeConfigReconciler) VrbupdateStatus(nc *vrbv1.SriovVrbNodeConfig, status metav1.ConditionStatus, reason ConfigurationConditionReason, msg string) error
type NodeConfigurator ¶
type NodeConfigurator struct { client.Client Log *logrus.Logger // contains filtered or unexported fields }
func NewNodeConfigurator ¶
func NewNodeConfigurator(logger *logrus.Logger, PfBBConfigController *pfBBConfigController, client client.Client, nodeNameRef types.NamespacedName) *NodeConfigurator
func (*NodeConfigurator) ApplySpec ¶
func (n *NodeConfigurator) ApplySpec(nodeConfig sriovv2.SriovFecNodeConfigSpec) error
func (*NodeConfigurator) VrbApplySpec ¶
func (n *NodeConfigurator) VrbApplySpec(nodeConfig vrbv1.SriovVrbNodeConfigSpec) error
func (*NodeConfigurator) VrbcleanAcceleratorConfig ¶
func (n *NodeConfigurator) VrbcleanAcceleratorConfig(acc vrbv1.SriovAccelerator) error
func (*NodeConfigurator) VrbconfigureAccelerator ¶
func (n *NodeConfigurator) VrbconfigureAccelerator(acc vrbv1.SriovAccelerator, requestedConfig *vrbv1.PhysicalFunctionConfigExt) error
type RestartDevicePluginFunction ¶
type RestartDevicePluginFunction func() error
type VrbConfigurer ¶
type VrbConfigurer interface {
VrbApplySpec(nodeConfig vrbv1.SriovVrbNodeConfigSpec) error
}
Click to show internal directories.
Click to hide internal directories.