diff --git a/cmake/QsfpService.cmake b/cmake/QsfpService.cmake index 2980344ab937f..faba4c9605d28 100644 --- a/cmake/QsfpService.cmake +++ b/cmake/QsfpService.cmake @@ -244,6 +244,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 @@ -286,6 +296,7 @@ target_link_libraries(qsfp_bsp_core wedge800bact_bsp wedge800cact_bsp ladakh800bcls_bsp + blackwolf800banw_bsp device_mdio fpga_device phy_management_base diff --git a/cmake/QsfpServicePlatformsWedge.cmake b/cmake/QsfpServicePlatformsWedge.cmake index da71465e434f5..e0e883457874a 100644 --- a/cmake/QsfpServicePlatformsWedge.cmake +++ b/cmake/QsfpServicePlatformsWedge.cmake @@ -57,6 +57,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 diff --git a/fboss/lib/bsp/BspGenericSystemContainer.cpp b/fboss/lib/bsp/BspGenericSystemContainer.cpp index 2ffe093f6cf87..4470aa1faf0a3 100644 --- a/fboss/lib/bsp/BspGenericSystemContainer.cpp +++ b/fboss/lib/bsp/BspGenericSystemContainer.cpp @@ -3,6 +3,7 @@ #include "fboss/lib/bsp/BspGenericSystemContainer.h" #include #include +#include "fboss/lib/bsp/blackwolf800banw/Blackwolf800banwBspPlatformMapping.h" #include "fboss/lib/bsp/icecube800banw/Icecube800banwBspPlatformMapping.h" #include "fboss/lib/bsp/icecube800bc/Icecube800bcBspPlatformMapping.h" #include "fboss/lib/bsp/icetea800bc/Icetea800bcBspPlatformMapping.h" @@ -205,6 +206,15 @@ Ladakh800bclsSystemContainer::getInstance() { return _Ladakh800bclsSystemContainer.try_get(); } +using Blackwolf800banwSystemContainer = + BspGenericSystemContainer; +folly::Singleton + _blackwolf800banwSystemContainer; +template <> +std::shared_ptr +Blackwolf800banwSystemContainer::getInstance() { + return _blackwolf800banwSystemContainer.try_get(); + using Icecube800banwSystemContainer = BspGenericSystemContainer; folly::Singleton _icecube800banwSystemContainer; diff --git a/fboss/oss/qsfp_test_configs/blackwolf800banw.materialized_JSON b/fboss/oss/qsfp_test_configs/blackwolf800banw.materialized_JSON new file mode 100644 index 0000000000000..85e311561ed49 --- /dev/null +++ b/fboss/oss/qsfp_test_configs/blackwolf800banw.materialized_JSON @@ -0,0 +1,12 @@ +{ + "defaultCommandLineArgs": { + "mode": "blackwolf800banw" + }, + "transceiverConfigOverrides": [ + + ], + "qsfpTestConfig": { + "cabledPortPairs": [ + ] + } +} diff --git a/fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp b/fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp index c229588a5d23a..0278476d88d86 100644 --- a/fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp +++ b/fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp @@ -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/icecube800banw/Icecube800banwBspPlatformMapping.h" #include "fboss/lib/bsp/icecube800bc/Icecube800bcBspPlatformMapping.h" #include "fboss/lib/bsp/icetea800bc/Icetea800bcBspPlatformMapping.h" @@ -133,6 +134,10 @@ std::unique_ptr createWedgeManager( MontblancBspPlatformMapping, PlatformType::PLATFORM_MONTBLANC>( platformMapping, qsfpServiceThreads); + case PlatformType::PLATFORM_BLACKWOLF800BANW: + return createBspWedgeManager< + Blackwolf800banwBspPlatformMapping, + PlatformType::PLATFORM_BLACKWOLF800BANW>( case PlatformType::PLATFORM_ICECUBE800BANW: return createBspWedgeManager< Icecube800banwBspPlatformMapping, diff --git a/fboss/util/BUCK b/fboss/util/BUCK index 2ff9d5af4dd4e..e749f6b3f28e1 100644 --- a/fboss/util/BUCK +++ b/fboss/util/BUCK @@ -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/icecube800banw:icecube800banw_bsp", "//fboss/lib/bsp/icecube800bc:icecube800bc_bsp", "//fboss/lib/bsp/icetea800bc:icetea800bc_bsp", diff --git a/fboss/util/wedge_qsfp_util.cpp b/fboss/util/wedge_qsfp_util.cpp index 5969b3ab58a1c..b7fd8c1c8bee3 100644 --- a/fboss/util/wedge_qsfp_util.cpp +++ b/fboss/util/wedge_qsfp_util.cpp @@ -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/icecube800banw/Icecube800banwBspPlatformMapping.h" #include "fboss/lib/bsp/icecube800bc/Icecube800bcBspPlatformMapping.h" #include "fboss/lib/bsp/icetea800bc/Icetea800bcBspPlatformMapping.h" @@ -4505,6 +4506,13 @@ std::pair, int> getTransceiverAPI() { .get(); auto ioBus = std::make_unique(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(systemContainer); + return std::make_pair(std::move(ioBus), 0); } else { return getTransceiverIOBusFromPlatform(FLAGS_platform); } @@ -4632,6 +4640,13 @@ std::pair, int> getTransceiverAPI() { .get(); auto ioBus = std::make_unique(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(systemContainer); + return std::make_pair(std::move(ioBus), 0); } return getTransceiverIOBusFromMode(mode); @@ -4694,6 +4709,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 @@ -4776,6 +4793,13 @@ getTransceiverPlatformAPI(TransceiverI2CApi* i2cBus) { .get(); return std::make_pair( std::make_unique(systemContainer), 0); + } else if (mode == PlatformType::PLATFORM_BLACKWOLF800BANW) { + auto systemContainer = + BspGenericSystemContainer< + Blackwolf800banwBspPlatformMapping>::getInstance() + .get(); + return std::make_pair( + std::make_unique(systemContainer), 0); } else if (mode == PlatformType::PLATFORM_WEDGE400C) { return std::make_pair(std::make_unique(), 0); } else if (mode == PlatformType::PLATFORM_WEDGE100) {