diff --git a/fboss/agent/test/utils/BUCK b/fboss/agent/test/utils/BUCK index e7d48ceab5fce..34ee8321641a1 100644 --- a/fboss/agent/test/utils/BUCK +++ b/fboss/agent/test/utils/BUCK @@ -525,6 +525,9 @@ cpp_library( "//fboss/agent:fboss-types", "//fboss/agent:switch_config-cpp2-types", "//fboss/agent:switchid_scope_resolver", + "//fboss/agent:voq_utils", + "//fboss/agent/hw/switch_asics:switch_asics", + "//fboss/agent/platforms/common/meru800bia:meru800bia_platform_mapping", "//fboss/agent/state:state", "//fboss/agent/test:ecmp_helper", "//fboss/agent/test:test_ensemble_if", diff --git a/fboss/agent/test/utils/OlympicTestUtils.cpp b/fboss/agent/test/utils/OlympicTestUtils.cpp index e24460b44be08..4a731bb45d8fc 100644 --- a/fboss/agent/test/utils/OlympicTestUtils.cpp +++ b/fboss/agent/test/utils/OlympicTestUtils.cpp @@ -842,16 +842,12 @@ void addQosMapsHelper( if (hwAsic->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3) { // also apply cpu qos policy for recycle port - // TODO(daiweix): properly set qos policy for rcy/mgmt ports - // based on port type/scope - int kMaxRecyclePort = 6; - for (const auto& switchInfo : - *cfg.switchSettings()->switchIdToSwitchInfo()) { - int basePortId = *switchInfo.second.portIdRange()->minimum(); - for (int rcyPortId = basePortId + kRecyclePortIdOffset; - rcyPortId <= basePortId + kMaxRecyclePort; - rcyPortId++) { - overrideQosPolicy(&cfg, rcyPortId, cpuQosPolicyName); + for (const auto& port : *cfg.ports()) { + if (*port.portType() == cfg::PortType::RECYCLE_PORT || + *port.portType() == cfg::PortType::EVENTOR_PORT) { + XLOG(DBG2) << "override and use rcy qos policy for port " + << *port.logicalID(); + overrideQosPolicy(&cfg, *port.logicalID(), cpuQosPolicyName); } } }