Skip to content

Commit

Permalink
properly set rcy port qos policy for J3 agent hw tests
Browse files Browse the repository at this point in the history
Summary: as titled

Reviewed By: zechengh09

Differential Revision:
D66970297

Privacy Context Container: L1125642

fbshipit-source-id: cb88309ed4b4dbd5d9fd40d6e4a740ddcffa2dfe
  • Loading branch information
daiwei1983 authored and facebook-github-bot committed Dec 10, 2024
1 parent d7b9374 commit 133efbf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
3 changes: 3 additions & 0 deletions fboss/agent/test/utils/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 6 additions & 10 deletions fboss/agent/test/utils/OlympicTestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 133efbf

Please sign in to comment.