Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent: add DARWIN48V platform references #258

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -345,7 +345,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
Loading