Skip to content

Commit

Permalink
fix AgentVoqSwitchTest.rxPacketToCpu on J3
Browse files Browse the repository at this point in the history
Summary: AgentVoqSwitchTest.rxPacketToCpu* is failing on J3 because     utility::addNetworkAIQosMaps() will clear the rx reason traps config added by addCpuTrafficPolicy(). This diff resolves this issue by assigned default cfg.cpuTrafficPolicy only when cpuTrafficPolicy is empty in cfg.

Reviewed By: zechengh09

Differential Revision:
D61627921

Privacy Context Container: L1125642

fbshipit-source-id: a2a81ed65e0df4a2cdb09dd02ef5c1910615885d
  • Loading branch information
daiwei1983 authored and facebook-github-bot committed Aug 21, 2024
1 parent 3621ef5 commit eba811b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fboss/agent/test/utils/OlympicTestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,9 @@ void addQosMapsHelper(
dataPlaneTrafficPolicy.defaultQosPolicy() = qosPolicyName;
cfg.dataPlaneTrafficPolicy() = dataPlaneTrafficPolicy;
cfg::CPUTrafficPolicyConfig cpuConfig;
if (cfg.cpuTrafficPolicy()) {
cpuConfig = *cfg.cpuTrafficPolicy();
}
cfg::TrafficPolicyConfig cpuTrafficPolicy;
cpuTrafficPolicy.defaultQosPolicy() = cpuQosPolicyName;
cpuConfig.trafficPolicy() = cpuTrafficPolicy;
Expand Down

0 comments on commit eba811b

Please sign in to comment.