From c94f8071a92eed4204b1424151a8154b0906f34d Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Tue, 20 Aug 2024 20:37:04 -0700 Subject: [PATCH] skip unsupported FEC counters on montblanc mgmt ports Summary: Some fboss hw tests are failing due to unsupported counters on montblanc, skip these counters for now, will follow-up with broadcom why they are not supported. Reviewed By: srikrishnagopu Differential Revision: D61562423 fbshipit-source-id: 8db320d063457ffc69668c9c193d84122e5b3d9a --- fboss/agent/hw/sai/switch/SaiPortManager.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index f7331a46cc204..c1315918b1890 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -1566,11 +1566,25 @@ SaiQueueHandle* SaiPortManager::getQueueHandle(PortID swId, uint8_t queueId) } bool SaiPortManager::fecStatsSupported(PortID portId) const { + if (platform_->getAsic()->getAsicType() == + cfg::AsicType::ASIC_TYPE_TOMAHAWK5 && + getPortType(portId) == cfg::PortType::MANAGEMENT_PORT) { + // TODO(daiweix): follow up why not supported on TH5 mgmt port, e.g. + // SAI_PORT_STAT_IF_IN_FEC_CORRECTABLE_FRAMES + return false; + } return platform_->getAsic()->isSupported(HwAsic::Feature::SAI_FEC_COUNTERS) && utility::isReedSolomonFec(getFECMode(portId)); } bool SaiPortManager::fecCorrectedBitsSupported(PortID portId) const { + if (platform_->getAsic()->getAsicType() == + cfg::AsicType::ASIC_TYPE_TOMAHAWK5 && + getPortType(portId) == cfg::PortType::MANAGEMENT_PORT) { + // TODO(daiweix): follow up why not supported on TH5 mgmt port, e.g. + // SAI_PORT_STAT_IF_IN_FEC_CORRECTED_BITS + return false; + } if (platform_->getAsic()->isSupported( HwAsic::Feature::SAI_FEC_CORRECTED_BITS) && utility::isReedSolomonFec(getFECMode(portId))) {