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 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 DevicePluginController
- type DrainAndExecute
- type FecNodeConfigReconciler
- 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
- type VrbNodeConfigReconciler
Constants ¶
const ( ConditionConfigured string = "Configured" ConfigurationInProgress ConfigurationConditionReason = "InProgress" ConfigurationFailed ConfigurationConditionReason = "Failed" ConfigurationNotRequested ConfigurationConditionReason = "NotRequested" ConfigurationSucceeded ConfigurationConditionReason = "Succeeded" )
Variables ¶
var ( VrbConfigPath = "/sriov_config/config/accelerators_vrb.json" VrbgetSriovInventory = VrbGetSriovInventory VrbsupportedAccelerators utils.AcceleratorDiscoveryConfig )
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
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
var (
FecConfigPath = "/sriov_config/config/accelerators.json"
)
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
****************************************************************************
- Function: VrbfindOrCreateConfigurationStatusCondition
- Description: * ***************************************************************************
func VrbgetMatchingConfiguration ¶
func VrbgetMatchingConfiguration(pciAddress string, configurations []vrbv1.PhysicalFunctionConfigExt) *vrbv1.PhysicalFunctionConfigExt
func VrbgetTelemetry ¶
func VrbisConfigurationOfNonExistingInventoryRequested ¶
func VrbisConfigurationOfNonExistingInventoryRequested( requestedConfiguration []vrbv1.PhysicalFunctionConfigExt, existingInventory *vrbv1.NodeInventory) bool
****************************************************************************
- Function: VrbisConfigurationOfNonExistingInventoryRequested
- Description: * ***************************************************************************
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 DevicePluginController ¶
func NewDevicePluginController ¶
func NewDevicePluginController(c client.Client, log *logrus.Logger, nnr types.NamespacedName) *DevicePluginController
func (*DevicePluginController) RestartDevicePlugin ¶
func (d *DevicePluginController) RestartDevicePlugin() error
type DrainAndExecute ¶
type FecNodeConfigReconciler ¶
func FecNewNodeConfigReconciler ¶
func FecNewNodeConfigReconciler(k8sClient client.Client, drainer DrainAndExecute, nodeNameRef types.NamespacedName, sriovfecconfigurer Configurer, restartDevicePluginFunction RestartDevicePluginFunction) (r *FecNodeConfigReconciler, err error)
****************************************************************************
- Function: FecNewNodeConfigReconciler
- Description: * ***************************************************************************
func (*FecNodeConfigReconciler) CreateEmptyNodeConfigIfNeeded ¶
func (r *FecNodeConfigReconciler) CreateEmptyNodeConfigIfNeeded(c client.Client) error
****************************************************************************
- Method: FecNodeConfigReconciler::
- Description:
- 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 (*FecNodeConfigReconciler) Reconcile ¶
func (r *FecNodeConfigReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error)
****************************************************************************
- Method: FecNodeConfigReconciler::Reconcile
- Description: * ***************************************************************************
func (*FecNodeConfigReconciler) SetupWithManager ¶
func (r *FecNodeConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
****************************************************************************
- Method: FecNodeConfigReconciler::
- Description: * ***************************************************************************
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
}
type VrbNodeConfigReconciler ¶
func VrbNewNodeConfigReconciler ¶
func VrbNewNodeConfigReconciler(k8sClient client.Client, drainer DrainAndExecute, nodeNameRef types.NamespacedName, vrbconfigurer VrbConfigurer, restartDevicePluginFunction RestartDevicePluginFunction) (r *VrbNodeConfigReconciler, err error)
****************************************************************************
- Function: VrbNewNodeConfigReconciler
- Description: * ***************************************************************************
func (*VrbNodeConfigReconciler) CreateEmptyNodeConfigIfNeeded ¶
func (r *VrbNodeConfigReconciler) CreateEmptyNodeConfigIfNeeded(c client.Client) error
****************************************************************************
- Method: VrbNodeConfigReconciler::CreateEmptyNodeConfigIfNeeded
- Description: * ***************************************************************************
func (*VrbNodeConfigReconciler) Reconcile ¶
func (r *VrbNodeConfigReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error)
****************************************************************************
- Method: VrbNodeConfigReconciler::Reconcile
- Description: * ***************************************************************************
func (*VrbNodeConfigReconciler) SetupWithManager ¶
func (r *VrbNodeConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
****************************************************************************
- Method: VrbNodeConfigReconciler::SetupWithManager
- Description: * ***************************************************************************