Skip to content

Commit

Permalink
Populate voq configs for non interface ports when applicable
Browse files Browse the repository at this point in the history
Summary:
For 2-stage setups we can't rely on default VOQ configs
(which map to NIF port configs) for other port types

Reviewed By: zechengh09

Differential Revision: D66043600

fbshipit-source-id: 3ca96d6298d9ef4e9dcc217b2b004de5382d3b90
  • Loading branch information
Jasmeet Bagga authored and facebook-github-bot committed Nov 16, 2024
1 parent 998c05a commit 4f46f82
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fboss/agent/test/utils/ConfigUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,15 @@ cfg::SwitchConfig genPortVlanCfg(
portCfg->state() = cfg::PortState::ENABLED;
portCfg->ingressVlan() = port2vlan.find(portID)->second;
portCfg->maxFrameSize() = kPortMTU;
if (switchType == cfg::SwitchType::VOQ &&
*portCfg->portType() != cfg::PortType::INTERFACE_PORT) {
auto nameAndVoqConfig = getNameAndDefaultVoqCfg(*portCfg->portType());
if (nameAndVoqConfig.has_value()) {
config.portQueueConfigs()[nameAndVoqConfig->name] =
nameAndVoqConfig->queueConfig;
portCfg->portVoqConfigName() = nameAndVoqConfig->name;
}
}
}
portCfg->routable() = true;
portCfg->parserType() = cfg::ParserType::L3;
Expand Down

0 comments on commit 4f46f82

Please sign in to comment.