Skip to content

Commit

Permalink
small fixes in documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Maslennikov <[email protected]>
  • Loading branch information
almaslennikov committed Oct 28, 2024
1 parent 80db27e commit c6e55ce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ spec:
#### Configuration details
* `numVFs`: if provided, configure SR-IOV VFs via nvconfig.
* This is a mandatory parameter.
* E.g: if `numVFs=2` then `SRIOV_EN=1` and `SRIOV_NUM_OF_VFS=2`.
* If `numVFs=0` then `SRIOV_EN=0` and `SRIOV_NUM_OF_VFS=0`.
* `linkType`: if provided configure `linkType` for the NIC for all NIC ports.
* This is a mandatory parameter.
* E.g `linkType = Infiniband` then set `LINK_TYPE_P1=IB` and `LINK_TYPE_P2=IB` if second PCI function is present
* `pciPerformanceOptimized`: performs PCI performance optimizations. If enabled then by default the following will happen:
* Set nvconfig `MAX_ACC_OUT_READ` nvconfig parameter.
Expand All @@ -121,6 +123,7 @@ spec:
* 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.

### NicDevice
Expand Down
2 changes: 1 addition & 1 deletion pkg/host/configvalidation.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (v *configValidationImpl) ConstructNvParamMapFromTemplate(
if port.NetworkInterface != "" && v.utils.GetLinkType(port.NetworkInterface) != desiredLinkType {
err := types.IncorrectSpecError(
fmt.Sprintf(
"device doesn't support link type change, wrong link type provided in the template, should be: %s",
"device does not support link type change, wrong link type provided in the template, should be: %s",
v.utils.GetLinkType(port.NetworkInterface)))
log.Log.Error(err, "incorrect spec", "device", device.Name)
return desiredParameters, err
Expand Down
2 changes: 1 addition & 1 deletion pkg/host/configvalidation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ var _ = Describe("ConfigValidationImpl", func() {
defaultValues := map[string]string{}

_, err := validator.ConstructNvParamMapFromTemplate(device, defaultValues)
Expect(err).To(MatchError("incorrect spec: device doesn't support link type change, wrong link type provided in the template, should be: Ethernet"))
Expect(err).To(MatchError("incorrect spec: device does not support link type change, wrong link type provided in the template, should be: Ethernet"))
})
It("should not report an error when LinkType can be changed and template differs from the actual status", func() {
mockHostUtils.On("GetLinkType", mock.Anything).Return(consts.Ethernet)
Expand Down

0 comments on commit c6e55ce

Please sign in to comment.