diff --git a/README.md b/README.md index 8400be7..527f2c4 100644 --- a/README.md +++ b/README.md @@ -89,11 +89,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 +122,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 +151,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/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..8569871 100644 --- a/config/crd/bases/configuration.net.nvidia.com_nicdevices.yaml +++ b/config/crd/bases/configuration.net.nvidia.com_nicdevices.yaml @@ -105,21 +105,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..8569871 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 @@ -105,21 +105,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..71a0149 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

- @@ -471,35 +466,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 +566,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 `ddf7f9d`.* 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..1060ac9 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" @@ -200,15 +199,6 @@ func (v *configValidationImpl) ConstructNvParamMapFromTemplate( 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 - } - return desiredParameters, nil } diff --git a/pkg/host/configvalidation_test.go b/pkg/host/configvalidation_test.go index 3c7ed3c..2f023a5 100644 --- a/pkg/host/configvalidation_test.go +++ b/pkg/host/configvalidation_test.go @@ -313,16 +313,6 @@ 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", - }, - }, }, }, }, @@ -349,16 +339,6 @@ 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", - }, - }, }, }, },