From 363125d1b4830808cbf73be4bee7bf3bcac10dd8 Mon Sep 17 00:00:00 2001 From: dzarista Date: Thu, 29 Jan 2026 22:50:11 +0000 Subject: [PATCH 1/2] BLACKWOLF800BANW: qsfp_service support --- cmake/QsfpService.cmake | 11 +++++++++ cmake/QsfpServicePlatformsWedge.cmake | 1 + .../blackwolf800banw.materialized_JSON | 12 ++++++++++ .../platforms/wedge/WedgeManagerInit.cpp | 6 +++++ fboss/util/BUCK | 1 + fboss/util/wedge_qsfp_util.cpp | 24 +++++++++++++++++++ 6 files changed, 55 insertions(+) create mode 100644 fboss/oss/qsfp_test_configs/blackwolf800banw.materialized_JSON diff --git a/cmake/QsfpService.cmake b/cmake/QsfpService.cmake index a9c0bd4a950ab..66dc61efae43d 100644 --- a/cmake/QsfpService.cmake +++ b/cmake/QsfpService.cmake @@ -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 @@ -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 diff --git a/cmake/QsfpServicePlatformsWedge.cmake b/cmake/QsfpServicePlatformsWedge.cmake index 2ab11de63c914..950dd59e85810 100644 --- a/cmake/QsfpServicePlatformsWedge.cmake +++ b/cmake/QsfpServicePlatformsWedge.cmake @@ -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 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 dd3d44f34e218..2743b32a2b3d0 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/icecube800bc/Icecube800bcBspPlatformMapping.h" #include "fboss/lib/bsp/icetea800bc/Icetea800bcBspPlatformMapping.h" #include "fboss/lib/bsp/janga800bic/Janga800bicBspPlatformMapping.h" @@ -131,6 +132,11 @@ std::unique_ptr 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, diff --git a/fboss/util/BUCK b/fboss/util/BUCK index 23bb1abaca533..ad29413b24f54 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/icecube800bc:icecube800bc_bsp", "//fboss/lib/bsp/icetea800bc:icetea800bc_bsp", "//fboss/lib/bsp/janga800bic:janga800bic_bsp", diff --git a/fboss/util/wedge_qsfp_util.cpp b/fboss/util/wedge_qsfp_util.cpp index 3eb784ed89e4d..36aeb4982a5db 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/icecube800bc/Icecube800bcBspPlatformMapping.h" #include "fboss/lib/bsp/icetea800bc/Icetea800bcBspPlatformMapping.h" #include "fboss/lib/bsp/janga800bic/Janga800bicBspPlatformMapping.h" @@ -4490,6 +4491,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); } @@ -4605,6 +4613,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); @@ -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 @@ -4741,6 +4758,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) { From 6429cc2c1b224e92edd06b4c1be9fa2ceba6d5bc Mon Sep 17 00:00:00 2001 From: dzarista Date: Fri, 30 Jan 2026 02:36:21 +0000 Subject: [PATCH 2/2] Add BspGenericSystemContainer.cpp singleton for BLACKWOLF800BANW --- fboss/lib/bsp/BspGenericSystemContainer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fboss/lib/bsp/BspGenericSystemContainer.cpp b/fboss/lib/bsp/BspGenericSystemContainer.cpp index f85783d993811..7f2f37304cf91 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/icecube800bc/Icecube800bcBspPlatformMapping.h" #include "fboss/lib/bsp/icetea800bc/Icetea800bcBspPlatformMapping.h" #include "fboss/lib/bsp/janga800bic/Janga800bicBspPlatformMapping.h" @@ -194,5 +195,15 @@ Ladakh800bclsSystemContainer::getInstance() { return _Ladakh800bclsSystemContainer.try_get(); } +using Blackwolf800banwSystemContainer = + BspGenericSystemContainer; +folly::Singleton + _blackwolf800banwSystemContainer; +template <> +std::shared_ptr +Blackwolf800banwSystemContainer::getInstance() { + return _blackwolf800banwSystemContainer.try_get(); +} + } // namespace fboss } // namespace facebook