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

add_library(blackwolf800banw_bsp
fboss/lib/bsp/blackwolf800banw/Blackwolf800banwBspPlatformMapping.cpp
)

target_link_libraries(blackwolf800banw_bsp
bsp_platform_mapping
bsp_platform_mapping_cpp2
FBThrift::thriftcpp2
)

add_library(qsfp_bsp_core
fboss/lib/bsp/BspGenericSystemContainer.cpp
fboss/lib/bsp/BspIOBus.cpp
Expand Down Expand Up @@ -264,6 +274,7 @@ target_link_libraries(qsfp_bsp_core
wedge800bact_bsp
wedge800cact_bsp
ladakh800bcls_bsp
blackwolf800banw_bsp
device_mdio
fpga_device
phy_management_base
Expand Down
1 change: 1 addition & 0 deletions cmake/QsfpServicePlatformsWedge.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ target_link_libraries(qsfp_platforms_wedge
wedge800bact_platform_mapping
wedge800cact_platform_mapping
ladakh800bcls_platform_mapping
blackwolf800banw_platform_mapping
platform_base
qsfp_config
wedge400_i2c
Expand Down
11 changes: 11 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/blackwolf800banw/Blackwolf800banwBspPlatformMapping.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,15 @@ Ladakh800bclsSystemContainer::getInstance() {
return _Ladakh800bclsSystemContainer.try_get();
}

using Blackwolf800banwSystemContainer =
BspGenericSystemContainer<Blackwolf800banwBspPlatformMapping>;
folly::Singleton<Blackwolf800banwSystemContainer>
_blackwolf800banwSystemContainer;
template <>
std::shared_ptr<Blackwolf800banwSystemContainer>
Blackwolf800banwSystemContainer::getInstance() {
return _blackwolf800banwSystemContainer.try_get();
}

} // namespace fboss
} // namespace facebook
12 changes: 12 additions & 0 deletions fboss/oss/qsfp_test_configs/blackwolf800banw.materialized_JSON
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"defaultCommandLineArgs": {
"mode": "blackwolf800banw"
},
"transceiverConfigOverrides": [

],
"qsfpTestConfig": {
"cabledPortPairs": [
]
}
}
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/blackwolf800banw/Blackwolf800banwBspPlatformMapping.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_BLACKWOLF800BANW:
return createBspWedgeManager<
Blackwolf800banwBspPlatformMapping,
PlatformType::PLATFORM_BLACKWOLF800BANW>(
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/blackwolf800banw:blackwolf800banw_bsp",
"//fboss/lib/bsp/icecube800bc:icecube800bc_bsp",
"//fboss/lib/bsp/icetea800bc:icetea800bc_bsp",
"//fboss/lib/bsp/janga800bic:janga800bic_bsp",
Expand Down
24 changes: 24 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/blackwolf800banw/Blackwolf800banwBspPlatformMapping.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 @@ -4490,6 +4491,13 @@ 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 == "blackwolf800banw") {
auto systemContainer =
BspGenericSystemContainer<
Blackwolf800banwBspPlatformMapping>::getInstance()
.get();
auto ioBus = std::make_unique<BspIOBus>(systemContainer);
return std::make_pair(std::move(ioBus), 0);
} else {
return getTransceiverIOBusFromPlatform(FLAGS_platform);
}
Expand Down Expand Up @@ -4605,6 +4613,13 @@ 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_BLACKWOLF800BANW) {
auto systemContainer =
BspGenericSystemContainer<
Blackwolf800banwBspPlatformMapping>::getInstance()
.get();
auto ioBus = std::make_unique<BspIOBus>(systemContainer);
return std::make_pair(std::move(ioBus), 0);
}

return getTransceiverIOBusFromMode(mode);
Expand Down Expand Up @@ -4665,6 +4680,8 @@ getTransceiverPlatformAPI(TransceiverI2CApi* i2cBus) {
mode = PlatformType::PLATFORM_TAHANSB800BC;
} else if (FLAGS_platform == "ladakh800bcls") {
mode = PlatformType::PLATFORM_LADAKH800BCLS;
} else if (FLAGS_platform == "blackwolf800banw") {
mode = PlatformType::PLATFORM_BLACKWOLF800BANW;
}
} else {
// If the platform is not provided by the user then use current hardware's
Expand Down Expand Up @@ -4741,6 +4758,13 @@ getTransceiverPlatformAPI(TransceiverI2CApi* i2cBus) {
.get();
return std::make_pair(
std::make_unique<BspTransceiverApi>(systemContainer), 0);
} else if (mode == PlatformType::PLATFORM_BLACKWOLF800BANW) {
auto systemContainer =
BspGenericSystemContainer<
Blackwolf800banwBspPlatformMapping>::getInstance()
.get();
return std::make_pair(
std::make_unique<BspTransceiverApi>(systemContainer), 0);
} else if (mode == PlatformType::PLATFORM_WEDGE400C) {
return std::make_pair(std::make_unique<Wedge400TransceiverApi>(), 0);
} else if (mode == PlatformType::PLATFORM_WEDGE100) {
Expand Down
Loading