Skip to content

Commit

Permalink
Fix typo in sys port range calculation
Browse files Browse the repository at this point in the history
Summary:
This is to support Voq Scale tests to work on devices with more than one NPU (Janga).

Instead of creating dsfNodes/sys port range starting at the 2nd DSF node, compute those based on the current dsfNode struct (which will contain two nodes for Janga).

Fix the typo of using current dsfNode size instead of numCores.

Reviewed By: daiwei1983

Differential Revision: D64344443

fbshipit-source-id: df9e8e1723ee8b4181ca8c1706e95e0b35ae13bb
  • Loading branch information
Ron He authored and facebook-github-bot committed Oct 14, 2024
1 parent bb4a5d0 commit d3729fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fboss/agent/test/utils/DsfConfigUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ std::optional<std::map<int64_t, cfg::DsfNode>> addRemoteIntfNodeCfg(
: getDsfNodeCount(*asic);
int remoteNodeStart = dsfNodes.rbegin()->first + numCores;
int systemPortMin =
getPerNodeSysPorts(*asic, dsfNodes.begin()->first) * numCores;
getPerNodeSysPorts(*asic, dsfNodes.begin()->first) * curDsfNodes.size();
for (int remoteSwitchId = remoteNodeStart;
remoteSwitchId < totalNodes * numCores;
remoteSwitchId += numCores) {
Expand Down

0 comments on commit d3729fa

Please sign in to comment.