Skip to content
Closed
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
1 change: 1 addition & 0 deletions cmake/Agent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ target_link_libraries(utils
meru800bia_platform_mapping
meru800bfa_platform_mapping
janga800bic_platform_mapping
blackwolf800banw_platform_mapping
icecube800bc_platform_mapping
icetea800bc_platform_mapping
tahansb800bc_platform_mapping
Expand Down
1 change: 1 addition & 0 deletions cmake/AgentPlatformsCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ target_link_libraries(platform_mapping_utils
tahansb800bc_platform_mapping
wedge800cact_platform_mapping
ladakh800bcls_platform_mapping
blackwolf800banw_platform_mapping
platform_mode
${RE2}
)
12 changes: 12 additions & 0 deletions cmake/AgentPlatformsCommonBlackwolf800banw.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# CMake to build libraries and binaries in fboss/agent/platforms/common/blackwolf800banw

# In general, libraries and binaries in fboss/foo/bar are built by
# cmake/FooBar.cmake

add_library(blackwolf800banw_platform_mapping
fboss/agent/platforms/common/blackwolf800banw/Blackwolf800banwPlatformMapping.cpp
)

target_link_libraries(blackwolf800banw_platform_mapping
platform_mapping
)
3 changes: 3 additions & 0 deletions cmake/AgentPlatformsSai.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ set(SAI_PLATFORM_SRC
fboss/agent/platforms/sai/SaiMinipack3NPlatform.cpp
fboss/agent/platforms/sai/SaiYangraPlatformPort.cpp
fboss/agent/platforms/sai/SaiMinipack3NPlatformPort.cpp
fboss/agent/platforms/sai/SaiBcmBlackwolf800banwPlatform.cpp
fboss/agent/platforms/sai/SaiBcmBlackwolf800banwPlatformPort.cpp
# platform oss srcs (== fake_srcs)
fboss/agent/platforms/sai/oss/SaiBcmMinipackPlatform.cpp
fboss/agent/platforms/sai/oss/SaiBcmPlatform.cpp
Expand Down Expand Up @@ -122,6 +124,7 @@ target_link_libraries(sai_platform
tahan800bc_platform_mapping
tahansb800bc_platform_mapping
ladakh800bcls_platform_mapping
blackwolf800banw_platform_mapping
icecube800bc_platform_mapping
icetea800bc_platform_mapping
led_structs_types_cpp2
Expand Down
3 changes: 3 additions & 0 deletions cmake/LedService.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ add_library(led_manager_lib
fboss/led_service/Wedge800BACTLedManager.cpp
fboss/led_service/Wedge800CACTLedManager.cpp
fboss/led_service/Ladakh800bclsLedManager.cpp
fboss/led_service/Blackwolf800banwLedManager.cpp
)

target_link_libraries(led_manager_lib
Expand All @@ -95,6 +96,7 @@ target_link_libraries(led_manager_lib
morgan800cc_bsp
tahansb800bc_bsp
ladakh800bcls_bsp
blackwolf800banw_bsp
darwin_platform_mapping
elbert_platform_mapping
fuji_platform_mapping
Expand All @@ -110,6 +112,7 @@ target_link_libraries(led_manager_lib
tahan800bc_platform_mapping
tahansb800bc_platform_mapping
ladakh800bcls_platform_mapping
blackwolf800banw_platform_mapping
wedge400_fpga
wedge400_platform_mapping
wedge800bact_platform_mapping
Expand Down
11 changes: 11 additions & 0 deletions cmake/QsfpService.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,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 @@ -263,6 +273,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
1 change: 1 addition & 0 deletions fboss/agent/ApplyThriftConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,7 @@ void ThriftConfigApplier::processUpdatedDsfNodes() {
asicCore = 1;
break;
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
if (isDualStage3Q2QMode()) {
asicCore = 447;
} else {
Expand Down
8 changes: 8 additions & 0 deletions fboss/agent/AsicUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "fboss/agent/AsicUtils.h"
#include "fboss/agent/hw/switch_asics/Jericho2Asic.h"
#include "fboss/agent/hw/switch_asics/Jericho3Asic.h"
#include "fboss/agent/hw/switch_asics/Q4DAsic.h"
#include "fboss/agent/hw/switch_asics/Ramon3Asic.h"
#include "fboss/agent/hw/switch_asics/RamonAsic.h"

Expand Down Expand Up @@ -39,6 +40,11 @@ const HwAsic& getHwAsicForAsicType(const cfg::AsicType& asicType) {
static Jericho3Asic jericho3Asic{switchId, switchInfo};
return jericho3Asic;
}
case cfg::AsicType::ASIC_TYPE_Q4D: {
switchInfo.switchType() = cfg::SwitchType::VOQ;
static Q4DAsic q4dAsic{switchId, switchInfo};
return q4dAsic;
}
case cfg::AsicType::ASIC_TYPE_RAMON: {
switchInfo.switchType() = cfg::SwitchType::FABRIC;
static RamonAsic ramonAsic{switchId, switchInfo};
Expand Down Expand Up @@ -81,6 +87,8 @@ uint32_t getFabricPortsPerVirtualDevice(const cfg::AsicType asicType) {
return 192;
case cfg::AsicType::ASIC_TYPE_JERICHO3:
return 160;
case cfg::AsicType::ASIC_TYPE_Q4D:
return 160;
case cfg::AsicType::ASIC_TYPE_RAMON3:
return 256;
case cfg::AsicType::ASIC_TYPE_FAKE:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/PortUpdateHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ void PortUpdateHandler::computeFabricOverdrainPct(const StateDelta& delta) {
case cfg::AsicType::ASIC_TYPE_JERICHO2:
return 1.12;
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
return 1.06;
case cfg::AsicType::ASIC_TYPE_MOCK:
case cfg::AsicType::ASIC_TYPE_FAKE:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/hw/bcm/BcmFieldProcessorUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ bool needsExtraFPQsetQualifiers(cfg::AsicType asicType) {
case cfg::AsicType::ASIC_TYPE_SANDIA_PHY:
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
case cfg::AsicType::ASIC_TYPE_RAMON:
case cfg::AsicType::ASIC_TYPE_RAMON3:
case cfg::AsicType::ASIC_TYPE_G202X:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/hw/bcm/BcmSwitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4219,6 +4219,7 @@ void BcmSwitch::disableHotSwap() const {
case cfg::AsicType::ASIC_TYPE_SANDIA_PHY:
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
case cfg::AsicType::ASIC_TYPE_RAMON:
case cfg::AsicType::ASIC_TYPE_RAMON3:
case cfg::AsicType::ASIC_TYPE_G202X:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/hw/bcm/tests/HwTestTamUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ void triggerParityError(HwSwitchEnsemble* ensemble) {
case cfg::AsicType::ASIC_TYPE_SANDIA_PHY:
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
case cfg::AsicType::ASIC_TYPE_RAMON:
case cfg::AsicType::ASIC_TYPE_RAMON3:
case cfg::AsicType::ASIC_TYPE_EBRO:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/hw/bcm/tests/HwTestTamUtilsThriftHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ void HwTestThriftHandler::triggerParityError() {
case cfg::AsicType::ASIC_TYPE_SANDIA_PHY:
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
case cfg::AsicType::ASIC_TYPE_RAMON:
case cfg::AsicType::ASIC_TYPE_RAMON3:
case cfg::AsicType::ASIC_TYPE_EBRO:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/hw/sai/hw_test/HwTestTamUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ void triggerParityError(HwSwitchEnsemble* ensemble) {
triggerBcmJericho2ParityError(ensemble);
break;
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
triggerBcmJericho3ParityError(ensemble);
break;
case cfg::AsicType::ASIC_TYPE_CHENAB:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/hw/sai/hw_test/HwTestTamUtilsThriftHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ void HwTestThriftHandler::triggerParityError() {
triggerBcmJericho2ParityError(hwSwitch_);
break;
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
triggerBcmJericho3ParityError(hwSwitch_);
break;
case cfg::AsicType::ASIC_TYPE_CHENAB:
Expand Down
2 changes: 2 additions & 0 deletions fboss/agent/hw/sai/switch/SaiBufferManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ void assertMaxBufferPoolSize(const SaiPlatform* platform) {
break;
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
case cfg::AsicType::ASIC_TYPE_TRIDENT2:
CHECK_EQ(maxEgressPoolSize, availableBuffer);
break;
Expand Down Expand Up @@ -193,6 +194,7 @@ uint64_t SaiBufferManager::getMaxEgressPoolBytes(const SaiPlatform* platform) {
}
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
/*
* XXX: TODO: Need to check if there is a way to compute the
* buffers available for use in Jericho2 without using the
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/hw/sai/switch/SaiPortManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ int getWorstCaseAssumedOpticsDelayNS(
case cfg::AsicType::ASIC_TYPE_G202X:
break;
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
if (portType == cfg::PortType::FABRIC_PORT) {
return 110;
} else {
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/hw/sai/switch/SaiVirtualRouterManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ SaiVirtualRouterManager::createMplsRouterInterface(VirtualRouterSaiId vrId) {
case cfg::AsicType::ASIC_TYPE_SANDIA_PHY:
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
case cfg::AsicType::ASIC_TYPE_RAMON:
case cfg::AsicType::ASIC_TYPE_RAMON3:
case cfg::AsicType::ASIC_TYPE_CHENAB:
Expand Down
3 changes: 3 additions & 0 deletions fboss/agent/hw/switch_asics/HwAsic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "fboss/agent/hw/switch_asics/Jericho2Asic.h"
#include "fboss/agent/hw/switch_asics/Jericho3Asic.h"
#include "fboss/agent/hw/switch_asics/MockAsic.h"
#include "fboss/agent/hw/switch_asics/Q4DAsic.h"
#include "fboss/agent/hw/switch_asics/Ramon3Asic.h"
#include "fboss/agent/hw/switch_asics/RamonAsic.h"
#include "fboss/agent/hw/switch_asics/Tomahawk3Asic.h"
Expand Down Expand Up @@ -116,6 +117,8 @@ std::unique_ptr<HwAsic> HwAsic::makeAsic(
return std::make_unique<Jericho2Asic>(switchId, switchInfo, sdkVersion);
case cfg::AsicType::ASIC_TYPE_JERICHO3:
return std::make_unique<Jericho3Asic>(switchId, switchInfo, sdkVersion);
case cfg::AsicType::ASIC_TYPE_Q4D:
return std::make_unique<Q4DAsic>(switchId, switchInfo, sdkVersion);
case cfg::AsicType::ASIC_TYPE_RAMON:
return std::make_unique<RamonAsic>(switchId, switchInfo, sdkVersion);
case cfg::AsicType::ASIC_TYPE_RAMON3:
Expand Down
27 changes: 27 additions & 0 deletions fboss/agent/hw/switch_asics/Q4DAsic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2004-present Facebook. All Rights Reserved.

#pragma once

#include <optional>
#include "fboss/agent/hw/switch_asics/Jericho3Asic.h"

namespace facebook::fboss {

class Q4DAsic : public Jericho3Asic {
public:
Q4DAsic(
std::optional<int64_t> switchId,
cfg::SwitchInfo switchInfo,
std::optional<cfg::SdkVersion> sdkVersion = std::nullopt)
: Jericho3Asic(switchId, switchInfo, sdkVersion) {}

cfg::AsicType getAsicType() const override {
return cfg::AsicType::ASIC_TYPE_Q4D;
}

cfg::PortSpeed getMaxPortSpeed() const override {
return cfg::PortSpeed::EIGHTHUNDREDG;
}
};

} // namespace facebook::fboss
2 changes: 2 additions & 0 deletions fboss/agent/hw/test/HwHashPolarizationTestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ std::unique_ptr<std::vector<utility::EthFrame>> getFullHashedPackets(
case cfg::AsicType::ASIC_TYPE_AGERA3:
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
case cfg::AsicType::ASIC_TYPE_RAMON:
case cfg::AsicType::ASIC_TYPE_RAMON3:
case cfg::AsicType::ASIC_TYPE_G202X:
Expand Down Expand Up @@ -86,6 +87,7 @@ std::unique_ptr<std::vector<utility::EthFrame>> getFullHashedPackets(
case cfg::AsicType::ASIC_TYPE_SANDIA_PHY:
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
case cfg::AsicType::ASIC_TYPE_RAMON:
case cfg::AsicType::ASIC_TYPE_RAMON3:
case cfg::AsicType::ASIC_TYPE_G202X:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ void HwProdInvariantHelper::verifySafeDiagCmds() {
case cfg::AsicType::ASIC_TYPE_SANDIA_PHY:
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
case cfg::AsicType::ASIC_TYPE_RAMON:
case cfg::AsicType::ASIC_TYPE_RAMON3:
case cfg::AsicType::ASIC_TYPE_TOMAHAWK5:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/platforms/common/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ cpp_library(
exported_deps = [
":platform_mapping",
"//fboss/agent:fboss-error",
"//fboss/agent/platforms/common/blackwolf800banw:blackwolf800banw_platform_mapping",
"//fboss/agent/platforms/common/darwin:darwin_platform_mapping",
"//fboss/agent/platforms/common/elbert:elbert_platform_mapping",
"//fboss/agent/platforms/common/fake_test:fake_test_platform_mapping",
Expand Down
6 changes: 6 additions & 0 deletions fboss/agent/platforms/common/PlatformMappingUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "fboss/agent/FbossError.h"
#include "fboss/agent/platforms/common/PlatformMapping.h"
#include "fboss/agent/platforms/common/PlatformMappingUtils.h"
#include "fboss/agent/platforms/common/blackwolf800banw/Blackwolf800banwPlatformMapping.h"
#include "fboss/agent/platforms/common/darwin/DarwinPlatformMapping.h"
#include "fboss/agent/platforms/common/elbert/ElbertPlatformMapping.h"
#include "fboss/agent/platforms/common/fake_test/FakeTestPlatformMapping.h"
Expand Down Expand Up @@ -209,6 +210,11 @@ std::unique_ptr<PlatformMapping> initPlatformMapping(PlatformType type) {
return platformMappingStr.empty()
? std::make_unique<Ladakh800bclsPlatformMapping>()
: std::make_unique<Ladakh800bclsPlatformMapping>(platformMappingStr);
case PlatformType::PLATFORM_BLACKWOLF800BANW:
return platformMappingStr.empty()
? std::make_unique<Blackwolf800banwPlatformMapping>()
: std::make_unique<Blackwolf800banwPlatformMapping>(
platformMappingStr);
case PlatformType::PLATFORM_FAKE_SAI: {
std::vector<int> controllingPorts = getFakeSaiControllingPortIDs();
return std::make_unique<FakeTestPlatformMapping>(controllingPorts);
Expand Down
16 changes: 16 additions & 0 deletions fboss/agent/platforms/common/blackwolf800banw/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")

oncall("fboss_agent_push")

cpp_library(
name = "blackwolf800banw_platform_mapping",
srcs = [
"Blackwolf800banwPlatformMapping.cpp",
],
headers = [
"Blackwolf800banwPlatformMapping.h",
],
exported_deps = [
"//fboss/agent/platforms/common:platform_mapping",
],
)
Loading
Loading