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
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
3 changes: 2 additions & 1 deletion fboss/agent/switch_config.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,8 @@ enum AsicType {
ASIC_TYPE_TOMAHAWK6 = 18,
ASIC_TYPE_AGERA3 = 19,
ASIC_TYPE_G202X = 20,
ASIC_TYPE_FAKE_NO_WARMBOOT = 21,
ASIC_TYPE_Q4D = 21,
ASIC_TYPE_FAKE_NO_WARMBOOT = 22,
}
/**
* The configuration for an interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class AgentDiagShellStressTest : public AgentHwTest {
// No diag shell to test for these ASICs
break;
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
runBcmDnxCmds(switchId);
break;
case cfg::AsicType::ASIC_TYPE_EBRO:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/test/prod_agent_tests/ProdInvariantTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ void ProdInvariantTest::verifySafeDiagCommands() {
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_TOMAHAWK5:
Expand Down
2 changes: 2 additions & 0 deletions fboss/agent/test/utils/CoppTestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ uint16_t getCoppHighPriQueueId(const HwAsic* hwAsic) {
case cfg::AsicType::ASIC_TYPE_YUBA:
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
case cfg::AsicType::ASIC_TYPE_G202X:
return 7;
case cfg::AsicType::ASIC_TYPE_CHENAB:
Expand Down Expand Up @@ -164,6 +165,7 @@ cfg::ToCpuAction getCpuActionType(const HwAsic* hwAsic) {
return cfg::ToCpuAction::COPY;
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
case cfg::AsicType::ASIC_TYPE_CHENAB:
return cfg::ToCpuAction::TRAP;
case cfg::AsicType::ASIC_TYPE_ELBERT_8DD:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/test/utils/InvariantTestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ void verifySafeDiagCmds(TestEnsembleIf* ensemble) {
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_TOMAHAWK5:
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/test/utils/PfcTestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ PfcBufferParams PfcBufferParams::getPfcBufferParams(
switch (asicType) {
case cfg::AsicType::ASIC_TYPE_JERICHO2:
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
buffer.globalShared = kSmallGlobalSharedBytes;
break;
default:
Expand Down
2 changes: 2 additions & 0 deletions fboss/agent/test/utils/PortTestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ cfg::PortSpeed getDefaultInterfaceSpeed(const cfg::AsicType& asicType) {
case cfg::AsicType::ASIC_TYPE_JERICHO2:
return cfg::PortSpeed::HUNDREDG;
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
return cfg::PortSpeed::FOURHUNDREDG;
default:
throw FbossError(
Expand All @@ -196,6 +197,7 @@ cfg::PortSpeed getDefaultFabricSpeed(const cfg::AsicType& asicType) {
case cfg::AsicType::ASIC_TYPE_JERICHO2:
return cfg::PortSpeed::FIFTYTHREEPOINTONETWOFIVEG;
case cfg::AsicType::ASIC_TYPE_JERICHO3:
case cfg::AsicType::ASIC_TYPE_Q4D:
return cfg::PortSpeed::HUNDREDANDSIXPOINTTWOFIVEG;
default:
throw FbossError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ enum CoreType {
J3_EVT = 7, // J3 Eventor Port
CHENAB_NIF = 8,
TH6_NIF = 9, // TH6
Q4D_NIF = 10, // Q4D

// Transceivers
OSFP = 100,
Expand Down
Loading