Skip to content
Draft
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
11 changes: 11 additions & 0 deletions cmake/QsfpService.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ target_link_libraries(montblanc_bsp
FBThrift::thriftcpp2
)

add_library(icecube800banw_bsp
fboss/lib/bsp/icecube800banw/Icecube800banwBspPlatformMapping.cpp
)

target_link_libraries(icecube800banw_bsp
bsp_platform_mapping
bsp_platform_mapping_cpp2
FBThrift::thriftcpp2
)

add_library(icecube800bc_bsp
fboss/lib/bsp/icecube800bc/Icecube800bcBspPlatformMapping.cpp
)
Expand Down Expand Up @@ -254,6 +264,7 @@ target_link_libraries(qsfp_bsp_core
meru800bia_bsp
meru800bfa_bsp
montblanc_bsp
icecube800banw_bsp
icecube800bc_bsp
icetea800bc_bsp
minipack3n_bsp
Expand Down
1 change: 1 addition & 0 deletions cmake/QsfpServicePlatformsWedge.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ target_link_libraries(qsfp_platforms_wedge
morgan_platform_mapping
janga800bic_platform_mapping
tahan800bc_platform_mapping
icecube800banw_platform_mapping
icecube800bc_platform_mapping
icetea800bc_platform_mapping
tahansb800bc_platform_mapping
Expand Down
10 changes: 10 additions & 0 deletions fboss/lib/bsp/BspGenericSystemContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "fboss/lib/bsp/BspGenericSystemContainer.h"
#include <folly/FileUtil.h>
#include <folly/Singleton.h>
#include "fboss/lib/bsp/icecube800banw/Icecube800banwBspPlatformMapping.h"
#include "fboss/lib/bsp/icecube800bc/Icecube800bcBspPlatformMapping.h"
#include "fboss/lib/bsp/icetea800bc/Icetea800bcBspPlatformMapping.h"
#include "fboss/lib/bsp/janga800bic/Janga800bicBspPlatformMapping.h"
Expand Down Expand Up @@ -194,5 +195,14 @@ Ladakh800bclsSystemContainer::getInstance() {
return _Ladakh800bclsSystemContainer.try_get();
}

using Icecube800banwSystemContainer =
BspGenericSystemContainer<Icecube800banwBspPlatformMapping>;
folly::Singleton<Icecube800banwSystemContainer> _icecube800banwSystemContainer;
template <>
std::shared_ptr<Icecube800banwSystemContainer>
Icecube800banwSystemContainer::getInstance() {
return _icecube800banwSystemContainer.try_get();
}

} // namespace fboss
} // namespace facebook
6 changes: 6 additions & 0 deletions fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include "fboss/agent/platforms/common/PlatformMappingUtils.h"
#include "fboss/lib/bsp/BspGenericSystemContainer.h"
#include "fboss/lib/bsp/icecube800banw/Icecube800banwBspPlatformMapping.h"
#include "fboss/lib/bsp/icecube800bc/Icecube800bcBspPlatformMapping.h"
#include "fboss/lib/bsp/icetea800bc/Icetea800bcBspPlatformMapping.h"
#include "fboss/lib/bsp/janga800bic/Janga800bicBspPlatformMapping.h"
Expand Down Expand Up @@ -131,6 +132,11 @@ std::unique_ptr<WedgeManager> createWedgeManager(
MontblancBspPlatformMapping,
PlatformType::PLATFORM_MONTBLANC>(
platformMapping, qsfpServiceThreads);
case PlatformType::PLATFORM_ICECUBE800BANW:
return createBspWedgeManager<
Icecube800banwBspPlatformMapping,
PlatformType::PLATFORM_ICECUBE800BANW>(
platformMapping, qsfpServiceThreads);
case PlatformType::PLATFORM_ICECUBE800BC:
return createBspWedgeManager<
Icecube800bcBspPlatformMapping,
Expand Down
1 change: 1 addition & 0 deletions fboss/util/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ cpp_library(
"//fboss/agent:enum_utils",
"//fboss/agent:fboss-types",
"//fboss/lib/bsp:bsp_core",
"//fboss/lib/bsp/icecube800banw:icecube800banw_bsp",
"//fboss/lib/bsp/icecube800bc:icecube800bc_bsp",
"//fboss/lib/bsp/icetea800bc:icetea800bc_bsp",
"//fboss/lib/bsp/janga800bic:janga800bic_bsp",
Expand Down
21 changes: 21 additions & 0 deletions fboss/util/wedge_qsfp_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "fboss/lib/bsp/BspGenericSystemContainer.h"
#include "fboss/lib/bsp/BspIOBus.h"
#include "fboss/lib/bsp/BspTransceiverApi.h"
#include "fboss/lib/bsp/icecube800banw/Icecube800banwBspPlatformMapping.h"
#include "fboss/lib/bsp/icecube800bc/Icecube800bcBspPlatformMapping.h"
#include "fboss/lib/bsp/icetea800bc/Icetea800bcBspPlatformMapping.h"
#include "fboss/lib/bsp/janga800bic/Janga800bicBspPlatformMapping.h"
Expand Down Expand Up @@ -4448,6 +4449,12 @@ 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 == "icecube800banw") {
auto systemContainer = BspGenericSystemContainer<
Icecube800banwBspPlatformMapping>::getInstance()
.get();
auto ioBus = std::make_unique<BspIOBus>(systemContainer);
return std::make_pair(std::move(ioBus), 0);
} else if (FLAGS_platform == "icecube800bc") {
auto systemContainer = BspGenericSystemContainer<
Icecube800bcBspPlatformMapping>::getInstance()
Expand Down Expand Up @@ -4551,6 +4558,12 @@ 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_ICECUBE800BANW) {
auto systemContainer =
BspGenericSystemContainer<Icecube800banwBspPlatformMapping>::getInstance()
.get();
auto ioBus = std::make_unique<BspIOBus>(systemContainer);
return std::make_pair(std::move(ioBus), 0);
} else if (mode == PlatformType::PLATFORM_ICECUBE800BC) {
auto systemContainer =
BspGenericSystemContainer<Icecube800bcBspPlatformMapping>::getInstance()
Expand Down Expand Up @@ -4657,6 +4670,8 @@ getTransceiverPlatformAPI(TransceiverI2CApi* i2cBus) {
mode = PlatformType::PLATFORM_JANGA800BIC;
} else if (FLAGS_platform == "tahan800bc") {
mode = PlatformType::PLATFORM_TAHAN800BC;
} else if (FLAGS_platform == "icecube800banw") {
mode = PlatformType::PLATFORM_ICECUBE800BANW;
} else if (FLAGS_platform == "icecube800bc") {
mode = PlatformType::PLATFORM_ICECUBE800BC;
} else if (FLAGS_platform == "icetea800bc") {
Expand Down Expand Up @@ -4717,6 +4732,12 @@ getTransceiverPlatformAPI(TransceiverI2CApi* i2cBus) {
.get();
return std::make_pair(
std::make_unique<BspTransceiverApi>(systemContainer), 0);
} else if (mode == PlatformType::PLATFORM_ICECUBE800BANW) {
auto systemContainer =
BspGenericSystemContainer<Icecube800banwBspPlatformMapping>::getInstance()
.get();
return std::make_pair(
std::make_unique<BspTransceiverApi>(systemContainer), 0);
} else if (mode == PlatformType::PLATFORM_ICECUBE800BC) {
auto systemContainer =
BspGenericSystemContainer<Icecube800bcBspPlatformMapping>::getInstance()
Expand Down
Loading