Skip to content

Commit

Permalink
meru800biab: fboss agent support
Browse files Browse the repository at this point in the history
  • Loading branch information
aalamsi22 committed Oct 7, 2024
1 parent 13eeda2 commit 7c3dd84
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 7 deletions.
3 changes: 2 additions & 1 deletion fboss/agent/FabricConnectivityManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ getPlatformMappingForDsfNode(const PlatformType platformType) {
true /*multiNpuPlatformMapping*/};
return &meru800bfa;
}
case PlatformType::PLATFORM_MERU800BIA: {
case PlatformType::PLATFORM_MERU800BIA:
case PlatformType::PLATFORM_MERU800BIAB: {
static Meru800biaPlatformMapping meru800bia;
return &meru800bia;
}
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,7 @@ uint32_t getRemotePortOffset(const PlatformType platformType) {
case PlatformType::PLATFORM_MERU800BFA_P1:
return 0;
case PlatformType::PLATFORM_MERU800BIA:
case PlatformType::PLATFORM_MERU800BIAB:
case PlatformType::PLATFORM_JANGA800BIC:
return 1024;

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 @@ -163,6 +163,7 @@ std::unique_ptr<Repl> DiagShell::makeRepl() const {
case PlatformType::PLATFORM_DARWIN:
case PlatformType::PLATFORM_MERU400BIU:
case PlatformType::PLATFORM_MERU800BIA:
case PlatformType::PLATFORM_MERU800BIAB:
case PlatformType::PLATFORM_MERU800BFA:
case PlatformType::PLATFORM_MERU800BFA_P1:
case PlatformType::PLATFORM_MERU400BIA:
Expand Down Expand Up @@ -395,6 +396,7 @@ std::string DiagCmdServer::getDelimiterDiagCmd(const std::string& UUID) const {
case PlatformType::PLATFORM_DARWIN:
case PlatformType::PLATFORM_MERU400BIU:
case PlatformType::PLATFORM_MERU800BIA:
case PlatformType::PLATFORM_MERU800BIAB:
case PlatformType::PLATFORM_MERU800BFA:
case PlatformType::PLATFORM_MERU800BFA_P1:
case PlatformType::PLATFORM_MERU400BIA:
Expand Down Expand Up @@ -442,6 +444,7 @@ std::string& DiagCmdServer::cleanUpOutput(
case PlatformType::PLATFORM_DARWIN:
case PlatformType::PLATFORM_MERU400BIU:
case PlatformType::PLATFORM_MERU800BIA:
case PlatformType::PLATFORM_MERU800BIAB:
case PlatformType::PLATFORM_MERU800BFA:
case PlatformType::PLATFORM_MERU800BFA_P1:
case PlatformType::PLATFORM_MERU400BIA:
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 @@ -148,6 +148,7 @@ std::unique_ptr<PlatformMapping> initPlatformMapping(PlatformType type) {
? std::make_unique<Meru400biuPlatformMapping>()
: std::make_unique<Meru400biuPlatformMapping>(platformMappingStr);
case PlatformType::PLATFORM_MERU800BIA:
case PlatformType::PLATFORM_MERU800BIAB:
return platformMappingStr.empty()
? std::make_unique<Meru800biaPlatformMapping>()
: std::make_unique<Meru800biaPlatformMapping>(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 @@ -351,7 +351,9 @@ void SaiPlatform::initPorts() {
}
} else if (platformMode == PlatformType::PLATFORM_MERU400BIU) {
saiPort = std::make_unique<SaiMeru400biuPlatformPort>(portId, this);
} else if (platformMode == PlatformType::PLATFORM_MERU800BIA) {
} else if (
platformMode == PlatformType::PLATFORM_MERU800BIA ||
platformMode == PlatformType::PLATFORM_MERU800BIAB) {
saiPort = std::make_unique<SaiMeru800biaPlatformPort>(portId, this);
} else if (platformMode == PlatformType::PLATFORM_MERU400BIA) {
saiPort = std::make_unique<SaiMeru400biaPlatformPort>(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 @@ -74,7 +74,9 @@ std::unique_ptr<SaiPlatform> chooseSaiPlatform(
} else if (productInfo->getType() == PlatformType::PLATFORM_MERU400BIU) {
return std::make_unique<SaiMeru400biuPlatform>(
std::move(productInfo), localMac, platformMappingStr);
} else if (productInfo->getType() == PlatformType::PLATFORM_MERU800BIA) {
} else if (
productInfo->getType() == PlatformType::PLATFORM_MERU800BIA ||
productInfo->getType() == PlatformType::PLATFORM_MERU800BIAB) {
return std::make_unique<SaiMeru800biaPlatform>(
std::move(productInfo), localMac, platformMappingStr);
} else if (productInfo->getType() == PlatformType::PLATFORM_MERU800BFA) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ TEST_F(AgentRouteOverflowTest, overflowRoutes) {
break;
case PlatformType::PLATFORM_MERU400BIU:
case PlatformType::PLATFORM_MERU800BIA:
case PlatformType::PLATFORM_MERU800BIAB:
case PlatformType::PLATFORM_MERU800BFA:
case PlatformType::PLATFORM_MERU800BFA_P1:
// No overflow test for MERU400BIU yet
Expand Down
4 changes: 3 additions & 1 deletion fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ std::unique_ptr<WedgeManager> createWedgeManager() {
return createMeru400biaWedgeManager(platformMappingStr);
} else if (mode == PlatformType::PLATFORM_MERU400BIU) {
return createMeru400biuWedgeManager(platformMappingStr);
} else if (mode == PlatformType::PLATFORM_MERU800BIA) {
} else if (
mode == PlatformType::PLATFORM_MERU800BIA ||
mode == PlatformType::PLATFORM_MERU800BIAB) {
return createMeru800biaWedgeManager(platformMappingStr);
} else if (
mode == PlatformType::PLATFORM_MERU800BFA ||
Expand Down
1 change: 1 addition & 0 deletions fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ TEST_F(HwXphyFirmwareTest, CheckDefaultXphyFirmwareVersion) {
case PlatformType::PLATFORM_LASSEN_DEPRECATED:
case PlatformType::PLATFORM_MERU400BIU:
case PlatformType::PLATFORM_MERU800BIA:
case PlatformType::PLATFORM_MERU800BIAB:
case PlatformType::PLATFORM_MERU800BFA:
case PlatformType::PLATFORM_MERU800BFA_P1:
case PlatformType::PLATFORM_MERU400BIA:
Expand Down
13 changes: 10 additions & 3 deletions fboss/util/oss/wedge_qsfp_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ std::pair<std::unique_ptr<TransceiverI2CApi>, int> getTransceiverAPI() {
.get();
auto ioBus = std::make_unique<BspIOBus>(systemContainer);
return std::make_pair(std::move(ioBus), 0);
} else if (FLAGS_platform == "meru800bia") {
} else if (
FLAGS_platform == "meru800bia" || FLAGS_platform == "meru800biab") {
auto systemContainer =
BspGenericSystemContainer<Meru800biaBspPlatformMapping>::getInstance()
.get();
Expand Down Expand Up @@ -117,7 +118,9 @@ std::pair<std::unique_ptr<TransceiverI2CApi>, int> getTransceiverAPI() {
.get();
auto ioBus = std::make_unique<BspIOBus>(systemContainer);
return std::make_pair(std::move(ioBus), 0);
} else if (mode == PlatformType::PLATFORM_MERU800BIA) {
} else if (
mode == PlatformType::PLATFORM_MERU800BIA ||
mode == PlatformType::PLATFORM_MERU800BIAB) {
auto systemContainer =
BspGenericSystemContainer<Meru800biaBspPlatformMapping>::getInstance()
.get();
Expand Down Expand Up @@ -167,6 +170,8 @@ getTransceiverPlatformAPI(TransceiverI2CApi* i2cBus) {
mode = PlatformType::PLATFORM_MERU400BIU;
} else if (FLAGS_platform == "meru800bia") {
mode = PlatformType::PLATFORM_MERU800BIA;
} else if (FLAGS_platform == "meru800biab") {
mode = PlatformType::PLATFORM_MERU800BIAB;
} else if (FLAGS_platform == "meru800bfa") {
mode = PlatformType::PLATFORM_MERU800BFA;
} else if (FLAGS_platform == "meru800bfa_p1") {
Expand Down Expand Up @@ -208,7 +213,9 @@ getTransceiverPlatformAPI(TransceiverI2CApi* i2cBus) {
.get();
return std::make_pair(
std::make_unique<BspTransceiverApi>(systemContainer), 0);
} else if (mode == PlatformType::PLATFORM_MERU800BIA) {
} else if (
mode == PlatformType::PLATFORM_MERU800BIA ||
mode == PlatformType::PLATFORM_MERU800BIAB) {
auto systemContainer =
BspGenericSystemContainer<Meru800biaBspPlatformMapping>::getInstance()
.get();
Expand Down

0 comments on commit 7c3dd84

Please sign in to comment.