Skip to content

Commit

Permalink
fix: use max values for MAX_ACC_OUT_READ as a workaround
Browse files Browse the repository at this point in the history
According to the PRM for Gen5 we need to set to enable the auto managing mode.
However, we are observing that FW doesn't load after reboot in this case.
Using max values for generations until fix is available.

Signed-off-by: Alexander Maslennikov <[email protected]>
  • Loading branch information
almaslennikov committed Oct 31, 2024
1 parent de1a58e commit 0181723
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions pkg/host/configvalidation.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,13 @@ func (v *configValidationImpl) ConstructNvParamMapFromTemplate(
log.Log.Error(err, "failed to get PCI link speed", "pciAddr", pciAddr)
return desiredParameters, err
}
// According to the PRM for Gen5 we need to set to enable the auto managing mode.
// However, we are observing that FW doesn't load after reboot in this case.
// Using max values for generations until fix is available.
if pciLinkSpeed == 16 { // Gen4
desiredParameters[consts.MaxAccOutReadParam] = "44"
desiredParameters[consts.MaxAccOutReadParam] = "64"
} else if pciLinkSpeed > 16 { // Gen5
desiredParameters[consts.MaxAccOutReadParam] = "0"
desiredParameters[consts.MaxAccOutReadParam] = "128"
}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/host/configvalidation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ var _ = Describe("ConfigValidationImpl", func() {

nvParams, err := validator.ConstructNvParamMapFromTemplate(device, query)
Expect(err).NotTo(HaveOccurred())
Expect(nvParams).To(HaveKeyWithValue(consts.MaxAccOutReadParam, "44"))
Expect(nvParams).To(HaveKeyWithValue(consts.MaxAccOutReadParam, "64"))
})

It("should return the correct MaxAccOutRead param for PCIgen5", func() {
Expand Down Expand Up @@ -236,7 +236,7 @@ var _ = Describe("ConfigValidationImpl", func() {

nvParams, err := validator.ConstructNvParamMapFromTemplate(device, query)
Expect(err).NotTo(HaveOccurred())
Expect(nvParams).To(HaveKeyWithValue(consts.MaxAccOutReadParam, "0"))
Expect(nvParams).To(HaveKeyWithValue(consts.MaxAccOutReadParam, "128"))
})
It("should return an error when GpuOptimized is enabled without PciPerformanceOptimized", func() {
mockHostUtils.On("GetPCILinkSpeed", mock.Anything).Return(16, nil)
Expand Down

0 comments on commit 0181723

Please sign in to comment.