From 01817235b2f584af23316e0848d25b0cbbf2e597 Mon Sep 17 00:00:00 2001 From: Alexander Maslennikov Date: Tue, 29 Oct 2024 13:31:49 +0100 Subject: [PATCH] fix: use max values for MAX_ACC_OUT_READ as a workaround 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 --- pkg/host/configvalidation.go | 7 +++++-- pkg/host/configvalidation_test.go | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg/host/configvalidation.go b/pkg/host/configvalidation.go index b4de853..38d4164 100644 --- a/pkg/host/configvalidation.go +++ b/pkg/host/configvalidation.go @@ -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" } } diff --git a/pkg/host/configvalidation_test.go b/pkg/host/configvalidation_test.go index 14ea079..586130d 100644 --- a/pkg/host/configvalidation_test.go +++ b/pkg/host/configvalidation_test.go @@ -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() { @@ -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)