Skip to content

Commit

Permalink
add DARWIN48V platform references
Browse files Browse the repository at this point in the history
  • Loading branch information
aalamsi22 committed Nov 12, 2024
1 parent a49497d commit 4bb7539
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 6 deletions.
3 changes: 2 additions & 1 deletion fboss/agent/hw/bcm/tests/BcmSwitchEnsemble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ void BcmSwitchEnsemble::init(
PlatformType::PLATFORM_MINIPACK,
PlatformType::PLATFORM_YAMP,
PlatformType::PLATFORM_WEDGE400,
PlatformType::PLATFORM_DARWIN};
PlatformType::PLATFORM_DARWIN,
PlatformType::PLATFORM_DARWIN48V};
std::unordered_set<PlatformType> th4BcmPlatforms = {
PlatformType::PLATFORM_FUJI, PlatformType::PLATFORM_ELBERT};
bool th3Platform = false;
Expand Down
3 changes: 3 additions & 0 deletions fboss/agent/hw/sai/diag/DiagShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ std::unique_ptr<Repl> DiagShell::makeRepl() const {
case PlatformType::PLATFORM_FUJI:
case PlatformType::PLATFORM_ELBERT:
case PlatformType::PLATFORM_DARWIN:
case PlatformType::PLATFORM_DARWIN48V:
case PlatformType::PLATFORM_MERU400BIU:
case PlatformType::PLATFORM_MERU800BIA:
case PlatformType::PLATFORM_MERU800BIAB:
Expand Down Expand Up @@ -396,6 +397,7 @@ std::string DiagCmdServer::getDelimiterDiagCmd(const std::string& UUID) const {
case PlatformType::PLATFORM_FUJI:
case PlatformType::PLATFORM_ELBERT:
case PlatformType::PLATFORM_DARWIN:
case PlatformType::PLATFORM_DARWIN48V:
case PlatformType::PLATFORM_MERU400BIU:
case PlatformType::PLATFORM_MERU800BIA:
case PlatformType::PLATFORM_MERU800BIAB:
Expand Down Expand Up @@ -446,6 +448,7 @@ std::string& DiagCmdServer::cleanUpOutput(
case PlatformType::PLATFORM_FUJI:
case PlatformType::PLATFORM_ELBERT:
case PlatformType::PLATFORM_DARWIN:
case PlatformType::PLATFORM_DARWIN48V:
case PlatformType::PLATFORM_MERU400BIU:
case PlatformType::PLATFORM_MERU800BIA:
case PlatformType::PLATFORM_MERU800BIAB:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/hw/test/ProdConfigFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ uint16_t uplinksCountFromSwitch(PlatformType mode) {
case PM::PLATFORM_GALAXY_LC:
case PM::PLATFORM_GALAXY_FC:
case PM::PLATFORM_DARWIN:
case PM::PLATFORM_DARWIN48V:
case PM::PLATFORM_MONTBLANC:
return 4;
default:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/platforms/common/PlatformMappingUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ std::unique_ptr<PlatformMapping> initPlatformMapping(PlatformType type) {
? std::make_unique<CloudRipperPlatformMapping>()
: std::make_unique<CloudRipperPlatformMapping>(platformMappingStr);
case PlatformType::PLATFORM_DARWIN:
case PlatformType::PLATFORM_DARWIN48V:
return platformMappingStr.empty()
? std::make_unique<DarwinPlatformMapping>()
: std::make_unique<DarwinPlatformMapping>(platformMappingStr);
Expand Down
4 changes: 3 additions & 1 deletion fboss/agent/platforms/sai/SaiPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ void SaiPlatform::initPorts() {
platformMode == PlatformType::PLATFORM_WEDGE400 ||
platformMode == PlatformType::PLATFORM_WEDGE400_GRANDTETON) {
saiPort = std::make_unique<SaiBcmWedge400PlatformPort>(portId, this);
} else if (platformMode == PlatformType::PLATFORM_DARWIN) {
} else if (
platformMode == PlatformType::PLATFORM_DARWIN ||
platformMode == PlatformType::PLATFORM_DARWIN48V) {
saiPort = std::make_unique<SaiBcmDarwinPlatformPort>(portId, this);
} else if (platformMode == PlatformType::PLATFORM_MINIPACK) {
saiPort = std::make_unique<SaiBcmMinipackPlatformPort>(portId, this);
Expand Down
4 changes: 3 additions & 1 deletion fboss/agent/platforms/sai/SaiPlatformInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ std::unique_ptr<SaiPlatform> chooseSaiPlatform(
auto type = productInfo->getType();
return std::make_unique<SaiBcmWedge400Platform>(
std::move(productInfo), type, localMac, platformMappingStr);
} else if (productInfo->getType() == PlatformType::PLATFORM_DARWIN) {
} else if (
productInfo->getType() == PlatformType::PLATFORM_DARWIN ||
productInfo->getType() == PlatformType::PLATFORM_DARWIN48V) {
return std::make_unique<SaiBcmDarwinPlatform>(
std::move(productInfo), localMac, platformMappingStr);
} else if (productInfo->getType() == PlatformType::PLATFORM_MINIPACK) {
Expand Down
4 changes: 3 additions & 1 deletion fboss/agent/platforms/tests/utils/CreateTestPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ std::unique_ptr<Platform> createTestPlatform() {
return std::make_unique<BcmTestYampPlatform>(std::move(productInfo));
} else if (mode == PlatformType::PLATFORM_WEDGE400) {
return std::make_unique<BcmTestWedge400Platform>(std::move(productInfo));
} else if (mode == PlatformType::PLATFORM_DARWIN) {
} else if (
mode == PlatformType::PLATFORM_DARWIN ||
mode == PlatformType::PLATFORM_DARWIN48V) {
return std::make_unique<BcmTestDarwinPlatform>(std::move(productInfo));
} else if (mode == PlatformType::PLATFORM_FUJI) {
return std::make_unique<BcmTestFujiPlatform>(std::move(productInfo));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ TEST_F(AgentRouteOverflowTest, overflowRoutes) {
case PlatformType::PLATFORM_MINIPACK:
case PlatformType::PLATFORM_YAMP:
case PlatformType::PLATFORM_DARWIN:
case PlatformType::PLATFORM_DARWIN48V:
/*
* A route distribution 200,000 /128 does overflow the ASIC tables
* but it takes 15min to generate, program and clean up such a
Expand Down
2 changes: 1 addition & 1 deletion fboss/led_service/LedManagerInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ std::unique_ptr<LedManager> createLedManager() {
return nullptr;
}

} // namespace facebook::fboss
} // namespace facebook::fboss
2 changes: 1 addition & 1 deletion fboss/platform/configs/darwin48v/led_manager.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@
}
}
]
}
}

0 comments on commit 4bb7539

Please sign in to comment.