diff --git a/README.md b/README.md index 8400be7..0a5441e 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,9 @@ If more than one template match a single device, none will be applied and the er for more information refer to [api-reference](docs/api-reference.md). +> [!IMPORTANT] +> `ResetToDefault` In NIC Configuration Operator template v0.1.14 BF2/BF3 DPUs (not SuperNics) FW reset flow isn't supported. + #### [Example NICConfigurationTemplate](docs/examples/example-nicconfigurationtemplate-connectx6.yaml): ```yaml @@ -89,11 +92,6 @@ spec: gpuDirectOptimized: enabled: true env: Baremetal - rawNvConfig: - - name: THIS_IS_A_SPECIAL_NVCONFIG_PARAM - value: "55" - - name: SOME_ADVANCED_NVCONFIG_PARAM - value: "true" ``` #### Configuration details @@ -127,11 +125,9 @@ spec: * `gpuDirectOptimized`: performs gpu direct optimizations. ATM only optimizations for Baremetal environment are supported. If enabled perform the following: * Set nvconfig `ATS_ENABLED=0` * Can only be enabled when `pciPerformanceOptimized` is enabled -* `rawNvConfig`: a `map[string]string` which contains NVConfig parameters to apply for a NIC on all of its PFs. * Both the numeric values and their string aliases, supported by NVConfig, are allowed (e.g. `REAL_TIME_CLOCK_ENABLE=False`, `REAL_TIME_CLOCK_ENABLE=0`). * For per port parameters (suffix `_P1`, `_P2`) parameters with `_P2` suffix are ignored if the device is single port. * If a configuration is not set in spec, its non-volatile configuration parameters (if any) should be set to device default. - * Parameters in rawNvConfig are regarded as having no default for this flow ### NicDevice @@ -158,9 +154,6 @@ spec: numVfs: 8 pciPerformanceOptimized: enabled: true - rawNvConfig: - - name: TLS_OPTIMIZE - value: "1" status: conditions: - reason: UpdateSuccessful diff --git a/api/v1alpha1/nicconfigurationtemplate_types.go b/api/v1alpha1/nicconfigurationtemplate_types.go index dd4251a..ee4ceb2 100644 --- a/api/v1alpha1/nicconfigurationtemplate_types.go +++ b/api/v1alpha1/nicconfigurationtemplate_types.go @@ -70,13 +70,6 @@ type GpuDirectOptimizedSpec struct { Env string `json:"env"` } -type NvConfigParam struct { - // Name of the arbitrary nvconfig parameter - Name string `json:"name"` - // Value of the arbitrary nvconfig parameter - Value string `json:"value"` -} - // ConfigurationTemplateSpec is a set of configurations for the NICs type ConfigurationTemplateSpec struct { // Number of VFs to be configured @@ -92,8 +85,6 @@ type ConfigurationTemplateSpec struct { RoceOptimized *RoceOptimizedSpec `json:"roceOptimized,omitempty"` // GPU Direct optimization settings GpuDirectOptimized *GpuDirectOptimizedSpec `json:"gpuDirectOptimized,omitempty"` - // List of arbitrary nv config parameters - RawNvConfig []NvConfigParam `json:"rawNvConfig,omitempty"` } // NicConfigurationTemplateSpec defines the desired state of NicConfigurationTemplate diff --git a/api/v1alpha1/nicdevice_types.go b/api/v1alpha1/nicdevice_types.go index 3b81f8d..00533aa 100644 --- a/api/v1alpha1/nicdevice_types.go +++ b/api/v1alpha1/nicdevice_types.go @@ -21,7 +21,8 @@ import ( // NicDeviceConfigurationSpec contains desired configuration of the NIC type NicDeviceConfigurationSpec struct { - // ResetToDefault specifies whether node agent needs to perform a reset flow + // ResetToDefault specifies whether node agent needs to perform a reset flow. + // In NIC Configuration Operator template v0.1.14 BF2/BF3 DPUs (not SuperNics) FW reset flow isn't supported. // The following operations will be performed: // * Nvconfig reset of all non-volatile configurations // - Mstconfig -d reset for each PF diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index d44ef81..99cca39 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -42,11 +42,6 @@ func (in *ConfigurationTemplateSpec) DeepCopyInto(out *ConfigurationTemplateSpec *out = new(GpuDirectOptimizedSpec) **out = **in } - if in.RawNvConfig != nil { - in, out := &in.RawNvConfig, &out.RawNvConfig - *out = make([]NvConfigParam, len(*in)) - copy(*out, *in) - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationTemplateSpec. @@ -351,21 +346,6 @@ func (in *NicSelectorSpec) DeepCopy() *NicSelectorSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NvConfigParam) DeepCopyInto(out *NvConfigParam) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NvConfigParam. -func (in *NvConfigParam) DeepCopy() *NvConfigParam { - if in == nil { - return nil - } - out := new(NvConfigParam) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PciPerformanceOptimizedSpec) DeepCopyInto(out *PciPerformanceOptimizedSpec) { *out = *in diff --git a/config/crd/bases/configuration.net.nvidia.com_nicconfigurationtemplates.yaml b/config/crd/bases/configuration.net.nvidia.com_nicconfigurationtemplates.yaml index 3b98de3..e604881 100644 --- a/config/crd/bases/configuration.net.nvidia.com_nicconfigurationtemplates.yaml +++ b/config/crd/bases/configuration.net.nvidia.com_nicconfigurationtemplates.yaml @@ -126,21 +126,6 @@ spec: required: - enabled type: object - rawNvConfig: - description: List of arbitrary nv config parameters - items: - properties: - name: - description: Name of the arbitrary nvconfig parameter - type: string - value: - description: Value of the arbitrary nvconfig parameter - type: string - required: - - name - - value - type: object - type: array roceOptimized: description: RoCE optimization settings properties: diff --git a/config/crd/bases/configuration.net.nvidia.com_nicdevices.yaml b/config/crd/bases/configuration.net.nvidia.com_nicdevices.yaml index 6bb6598..93c5227 100644 --- a/config/crd/bases/configuration.net.nvidia.com_nicdevices.yaml +++ b/config/crd/bases/configuration.net.nvidia.com_nicdevices.yaml @@ -45,7 +45,8 @@ spec: properties: resetToDefault: description: |- - ResetToDefault specifies whether node agent needs to perform a reset flow + ResetToDefault specifies whether node agent needs to perform a reset flow. + In NIC Configuration Operator template v0.1.14 BF2/BF3 DPUs (not SuperNics) FW reset flow isn't supported. The following operations will be performed: * Nvconfig reset of all non-volatile configurations - Mstconfig -d reset for each PF @@ -105,21 +106,6 @@ spec: required: - enabled type: object - rawNvConfig: - description: List of arbitrary nv config parameters - items: - properties: - name: - description: Name of the arbitrary nvconfig parameter - type: string - value: - description: Value of the arbitrary nvconfig parameter - type: string - required: - - name - - value - type: object - type: array roceOptimized: description: RoCE optimization settings properties: diff --git a/deployment/nic-configuration-operator-chart/crds/configuration.net.nvidia.com_nicconfigurationtemplates.yaml b/deployment/nic-configuration-operator-chart/crds/configuration.net.nvidia.com_nicconfigurationtemplates.yaml index 3b98de3..e604881 100644 --- a/deployment/nic-configuration-operator-chart/crds/configuration.net.nvidia.com_nicconfigurationtemplates.yaml +++ b/deployment/nic-configuration-operator-chart/crds/configuration.net.nvidia.com_nicconfigurationtemplates.yaml @@ -126,21 +126,6 @@ spec: required: - enabled type: object - rawNvConfig: - description: List of arbitrary nv config parameters - items: - properties: - name: - description: Name of the arbitrary nvconfig parameter - type: string - value: - description: Value of the arbitrary nvconfig parameter - type: string - required: - - name - - value - type: object - type: array roceOptimized: description: RoCE optimization settings properties: diff --git a/deployment/nic-configuration-operator-chart/crds/configuration.net.nvidia.com_nicdevices.yaml b/deployment/nic-configuration-operator-chart/crds/configuration.net.nvidia.com_nicdevices.yaml index 6bb6598..93c5227 100644 --- a/deployment/nic-configuration-operator-chart/crds/configuration.net.nvidia.com_nicdevices.yaml +++ b/deployment/nic-configuration-operator-chart/crds/configuration.net.nvidia.com_nicdevices.yaml @@ -45,7 +45,8 @@ spec: properties: resetToDefault: description: |- - ResetToDefault specifies whether node agent needs to perform a reset flow + ResetToDefault specifies whether node agent needs to perform a reset flow. + In NIC Configuration Operator template v0.1.14 BF2/BF3 DPUs (not SuperNics) FW reset flow isn't supported. The following operations will be performed: * Nvconfig reset of all non-volatile configurations - Mstconfig -d reset for each PF @@ -105,21 +106,6 @@ spec: required: - enabled type: object - rawNvConfig: - description: List of arbitrary nv config parameters - items: - properties: - name: - description: Name of the arbitrary nvconfig parameter - type: string - value: - description: Value of the arbitrary nvconfig parameter - type: string - required: - - name - - value - type: object - type: array roceOptimized: description: RoCE optimization settings properties: diff --git a/docs/api-reference.md b/docs/api-reference.md index 97f6166..e9caff4 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -52,11 +52,6 @@ ConfigurationTemplateSpec is a set of configurations for the NICs GpuDirectOptimizedSpec

GPU Direct optimization settings

- -rawNvConfig
-[]NvConfigParam -

List of arbitrary nv config parameters

- @@ -301,8 +296,9 @@ NicDeviceConfigurationSpec contains desired configuration of the NIC resetToDefault
bool -

ResetToDefault specifies whether node agent needs to perform a reset flow The following operations will be performed: * Nvconfig reset of all non-volatile configurations - Mstconfig -d reset -for each PF - Mstconfig -d set ADVANCED_PCI_SETTINGS=1 * Node reboot - Applies new NIC NV config - Will undo any runtime configuration previously performed for the device/driver

+

ResetToDefault specifies whether node agent needs to perform a reset flow. In NIC Configuration Operator template v0.1.14 BF2/BF3 DPUs (not SuperNics) FW reset flow isn’t supported. The +following operations will be performed: * Nvconfig reset of all non-volatile configurations - Mstconfig -d reset for each PF - Mstconfig -d set ADVANCED_PCI_SETTINGS=1 * Node reboot - Applies new NIC +NV config - Will undo any runtime configuration previously performed for the device/driver

template
@@ -471,35 +467,6 @@ NicSelectorSpec is a desired configuration for NICs -### NvConfigParam - -(*Appears on:*[ConfigurationTemplateSpec](#ConfigurationTemplateSpec)) - - ---- - - - - - - - - - - - - - - - - -
FieldDescription
name
-string

Name of the arbitrary nvconfig parameter

value
-string

Value of the arbitrary nvconfig parameter

- ### PciPerformanceOptimizedSpec (*Appears on:*[ConfigurationTemplateSpec](#ConfigurationTemplateSpec)) @@ -600,4 +567,4 @@ RoceOptimizedSpec specifies RoCE optimization settings -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -*Generated with `gen-crd-api-reference-docs` on git commit `a799e3a`.* +*Generated with `gen-crd-api-reference-docs` on git commit `40efd3e`.* diff --git a/docs/examples/example-nicconfigurationtemplate-connectx6.yaml b/docs/examples/example-nicconfigurationtemplate-connectx6.yaml index 7c31a43..be2cc47 100644 --- a/docs/examples/example-nicconfigurationtemplate-connectx6.yaml +++ b/docs/examples/example-nicconfigurationtemplate-connectx6.yaml @@ -33,8 +33,3 @@ spec: gpuDirectOptimized: enabled: true env: Baremetal - rawNvConfig: - - name: THIS_IS_A_SPECIAL_NVCONFIG_PARAM - value: "55" - - name: SOME_ADVANCED_NVCONFIG_PARAM - value: "true" diff --git a/internal/controller/nicdevice_controller_test.go b/internal/controller/nicdevice_controller_test.go index e222447..aa90347 100644 --- a/internal/controller/nicdevice_controller_test.go +++ b/internal/controller/nicdevice_controller_test.go @@ -231,10 +231,6 @@ var _ = Describe("NicDeviceReconciler", func() { Enabled: true, MaxAccOutRead: 9999, }, - RawNvConfig: []v1alpha1.NvConfigParam{{ - Name: "CUSTOM_PARAM", - Value: "true", - }}, }, }, }, diff --git a/pkg/host/configvalidation.go b/pkg/host/configvalidation.go index 3a7090a..caf0a3e 100644 --- a/pkg/host/configvalidation.go +++ b/pkg/host/configvalidation.go @@ -21,7 +21,6 @@ import ( "reflect" "slices" "strconv" - "strings" v1 "k8s.io/api/core/v1" "k8s.io/client-go/tools/record" @@ -199,15 +198,15 @@ func (v *configValidationImpl) ConstructNvParamMapFromTemplate( } else { applyDefaultNvConfigValueIfExists(consts.AtsEnabledParam, desiredParameters, query) } - - for _, rawParam := range template.RawNvConfig { - // Ignore second port params if device has a single port - if strings.HasSuffix(rawParam.Name, consts.SecondPortPrefix) && !secondPortPresent { - continue - } - - desiredParameters[rawParam.Name] = rawParam.Value - } + //TODO: Uncomment once we'll fix DPU mode reset procedure + //for _, rawParam := range template.RawNvConfig { + // // Ignore second port params if device has a single port + // if strings.HasSuffix(rawParam.Name, consts.SecondPortPrefix) && !secondPortPresent { + // continue + // } + // + // desiredParameters[rawParam.Name] = rawParam.Value + //} return desiredParameters, nil } diff --git a/pkg/host/configvalidation_test.go b/pkg/host/configvalidation_test.go index 3c7ed3c..fe2384a 100644 --- a/pkg/host/configvalidation_test.go +++ b/pkg/host/configvalidation_test.go @@ -313,16 +313,17 @@ var _ = Describe("ConfigValidationImpl", func() { Template: &v1alpha1.ConfigurationTemplateSpec{ NumVfs: 0, LinkType: consts.Ethernet, - RawNvConfig: []v1alpha1.NvConfigParam{ - { - Name: "TEST_P1", - Value: "test", - }, - { - Name: "TEST_P2", - Value: "test", - }, - }, + //TODO: Uncomment once we'll fix DPU mode reset procedure + //RawNvConfig: []v1alpha1.NvConfigParam{ + // { + // Name: "TEST_P1", + // Value: "test", + // }, + // { + // Name: "TEST_P2", + // Value: "test", + // }, + //}, }, }, }, @@ -335,10 +336,11 @@ var _ = Describe("ConfigValidationImpl", func() { query := types.NewNvConfigQuery() - nvParams, err := validator.ConstructNvParamMapFromTemplate(device, query) + _, err := validator.ConstructNvParamMapFromTemplate(device, query) Expect(err).NotTo(HaveOccurred()) - Expect(nvParams).To(HaveKeyWithValue("TEST_P1", "test")) - Expect(nvParams).NotTo(HaveKey("TEST_P2")) + // TODO: Uncomment once we'll fix DPU mode reset procedure + //Expect(nvParams).To(HaveKeyWithValue("TEST_P1", "test")) + //Expect(nvParams).NotTo(HaveKey("TEST_P2")) }) It("should apply raw config for the second port if device is dual port", func() { mockHostUtils.On("GetPCILinkSpeed", mock.Anything).Return(16, nil) @@ -349,16 +351,17 @@ var _ = Describe("ConfigValidationImpl", func() { Template: &v1alpha1.ConfigurationTemplateSpec{ NumVfs: 0, LinkType: consts.Ethernet, - RawNvConfig: []v1alpha1.NvConfigParam{ - { - Name: "TEST_P1", - Value: "test", - }, - { - Name: "TEST_P2", - Value: "test", - }, - }, + // TODO: Uncomment once we'll fix DPU mode reset procedure + //RawNvConfig: []v1alpha1.NvConfigParam{ + // { + // Name: "TEST_P1", + // Value: "test", + // }, + // { + // Name: "TEST_P2", + // Value: "test", + // }, + //}, }, }, }, @@ -372,10 +375,11 @@ var _ = Describe("ConfigValidationImpl", func() { query := types.NewNvConfigQuery() - nvParams, err := validator.ConstructNvParamMapFromTemplate(device, query) + _, err := validator.ConstructNvParamMapFromTemplate(device, query) Expect(err).NotTo(HaveOccurred()) - Expect(nvParams).To(HaveKeyWithValue("TEST_P1", "test")) - Expect(nvParams).To(HaveKeyWithValue("TEST_P2", "test")) + // TODO: Uncomment once we'll fix DPU mode reset procedure + //Expect(nvParams).To(HaveKeyWithValue("TEST_P1", "test")) + //Expect(nvParams).To(HaveKeyWithValue("TEST_P2", "test")) }) It("should report an error when LinkType cannot be changed and template differs from the actual status", func() { mockHostUtils.On("GetLinkType", mock.Anything).Return(consts.Ethernet)