Skip to content

Commit 77f15b0

Browse files
committed
Revert "Revert "Merge branch 'main' into meru_configs""
This reverts commit 8da9f2c.
1 parent 6e5b3b9 commit 77f15b0

File tree

232 files changed

+9541
-3287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+9541
-3287
lines changed

buck2

+15-15
Original file line numberDiff line numberDiff line change
@@ -4,62 +4,62 @@
44
"name": "buck2",
55
"platforms": {
66
"macos-aarch64": {
7-
"size": 28848786,
7+
"size": 26705557,
88
"hash": "blake3",
9-
"digest": "d2bb7b47db0da61e0a0aa11d181c9d536acdee2c0c388f96052c5cef12870e18",
9+
"digest": "2a283b3c5caf211b4f8712bfd57f68711322f60bef6e2b3d5256c2e98d2ed420",
1010
"format": "zst",
1111
"path": "buck2-aarch64-apple-darwin",
1212
"providers": [
1313
{
14-
"url": "https://github.com/facebook/buck2/releases/download/2025-03-01/buck2-aarch64-apple-darwin.zst"
14+
"url": "https://github.com/facebook/buck2/releases/download/2025-03-15/buck2-aarch64-apple-darwin.zst"
1515
}
1616
]
1717
},
1818
"linux-aarch64": {
19-
"size": 30706057,
19+
"size": 31136063,
2020
"hash": "blake3",
21-
"digest": "4cbbf8d7dc636025cb5aaac8af781dd2f26677a2c9b6c7cc2542ce13e1e780b8",
21+
"digest": "5fd341c4d32078f06004f30c44a7a13ef3127fcc2cf3eab81748a55b4a4c1e93",
2222
"format": "zst",
2323
"path": "buck2-aarch64-unknown-linux-musl",
2424
"providers": [
2525
{
26-
"url": "https://github.com/facebook/buck2/releases/download/2025-03-01/buck2-aarch64-unknown-linux-musl.zst"
26+
"url": "https://github.com/facebook/buck2/releases/download/2025-03-15/buck2-aarch64-unknown-linux-musl.zst"
2727
}
2828
]
2929
},
3030
"macos-x86_64": {
31-
"size": 30784289,
31+
"size": 28728490,
3232
"hash": "blake3",
33-
"digest": "c81c167bd119bd6c9ab3d1341a7b2c88862c1c0018d99d501c26891f355a78a5",
33+
"digest": "15f489feb4770d748bf52278adf6e06ddfc27cd135a12e8714bcb39efc7bd27a",
3434
"format": "zst",
3535
"path": "buck2-x86_64-apple-darwin",
3636
"providers": [
3737
{
38-
"url": "https://github.com/facebook/buck2/releases/download/2025-03-01/buck2-x86_64-apple-darwin.zst"
38+
"url": "https://github.com/facebook/buck2/releases/download/2025-03-15/buck2-x86_64-apple-darwin.zst"
3939
}
4040
]
4141
},
4242
"windows-x86_64": {
43-
"size": 26208047,
43+
"size": 26568427,
4444
"hash": "blake3",
45-
"digest": "a2a5ba8093129645d87d2eefe7d2a34482909c2852bc5fa247c6909ed2d061f7",
45+
"digest": "75aff0aa83663e963aff33ec5305f30080f242257d8bc4da1ccc74e579c89e86",
4646
"format": "zst",
4747
"path": "buck2-x86_64-pc-windows-msvc.exe",
4848
"providers": [
4949
{
50-
"url": "https://github.com/facebook/buck2/releases/download/2025-03-01/buck2-x86_64-pc-windows-msvc.exe.zst"
50+
"url": "https://github.com/facebook/buck2/releases/download/2025-03-15/buck2-x86_64-pc-windows-msvc.exe.zst"
5151
}
5252
]
5353
},
5454
"linux-x86_64": {
55-
"size": 32164226,
55+
"size": 32643642,
5656
"hash": "blake3",
57-
"digest": "87c23d55ec930cab4fd8be5128d024a6b0ccfdf140c34a0982df6775da9bd717",
57+
"digest": "917c73bfa258b9f2dbe108622b96fbd343c34f03ee9f92016b68f92a16991155",
5858
"format": "zst",
5959
"path": "buck2-x86_64-unknown-linux-musl",
6060
"providers": [
6161
{
62-
"url": "https://github.com/facebook/buck2/releases/download/2025-03-01/buck2-x86_64-unknown-linux-musl.zst"
62+
"url": "https://github.com/facebook/buck2/releases/download/2025-03-15/buck2-x86_64-unknown-linux-musl.zst"
6363
}
6464
]
6565
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit e7afe09bbd3911c52f31619264f1da8eb3df58d0
1+
Subproject commit c8ca9bb262c525906926a57352095635770d279b
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 829b777d6ca4b873c433ab4c07e1ddc04f9d83f4
1+
Subproject commit 83d81b52b2e91be4357b5b2e0611a69ca5b652d8
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit a09f66976e4cdf58536fc4f96534a82d456d0c46
1+
Subproject commit 5aad7b326cf90d1b969de356e0a386ef6ab9fff1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 8fc64d4958f819a56076f6aaa78c9352e11d15eb
1+
Subproject commit 7eb622b5c2850dd05a951dd9955e04cc79742b04
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit fd46b36d4687f50bfd1712c93df418cea874de3d
1+
Subproject commit e0408177e4a3d2f18a39def0328d91deccc5f080

build/fbcode_builder/manifests/fast_float

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ subdir = fast_float-8.0.0
1313
FASTFLOAT_TEST = OFF
1414
FASTFLOAT_SANITIZE = OFF
1515

16-
[debs.not(all(distro=ubuntu,any(distro_vers="18.04",distro_vers="20.04",distro_vers="22.04")))]
16+
[debs.not(all(distro=ubuntu,any(distro_vers="18.04",distro_vers="20.04",distro_vers="22.04",distro_vers="24.04")))]
1717
libfast-float-dev
1818

1919
[rpms.distro=fedora]

cmake/AgentHwTest.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ set(hw_switch_test_srcs
220220
fboss/agent/hw/test/HwTeFlowTests.cpp
221221
fboss/agent/hw/test/HwUdfTests.cpp
222222
fboss/agent/hw/test/HwTestPfcUtils.cpp
223+
fboss/agent/hw/test/dataplane_tests/HwHashConsistencyTest.cpp
223224
fboss/agent/hw/test/dataplane_tests/HwAqmTests.cpp
224225
fboss/agent/hw/test/dataplane_tests/HwInPauseDiscardsTests.cpp
225226
fboss/agent/hw/test/dataplane_tests/HwMPLSTests.cpp

fboss/agent/AddressUtil.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ inline thrift::IPPrefix toIPPrefix(const folly::CIDRNetwork& network) {
7575

7676
inline folly::CIDRNetwork toCIDRNetwork(const thrift::IPPrefix& addr) {
7777
return folly::CIDRNetwork(
78-
toIPAddress(addr.get_prefixAddress()), addr.get_prefixLength());
78+
toIPAddress(addr.prefixAddress().value()),
79+
folly::copy(addr.prefixLength().value()));
7980
}
8081

8182
} // namespace facebook::network

fboss/agent/AgentFeatures.cpp

+20
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,21 @@ DEFINE_bool(
200200
false,
201201
"Enable Neighbor/MAC table hw update failure protection");
202202

203+
DEFINE_int32(
204+
max_l2_entries,
205+
4000,
206+
"Maximum L2 entries supported by Resource Accountant");
207+
208+
DEFINE_int32(
209+
max_ndp_entries,
210+
3500,
211+
"Maximum NDP entries supported by Resource Accountant");
212+
213+
DEFINE_int32(
214+
max_arp_entries,
215+
100,
216+
"Maximum ARP entries supported by Resource Accountant");
217+
203218
DEFINE_bool(
204219
fw_drained_unrecoverable_error,
205220
false,
@@ -252,3 +267,8 @@ DEFINE_string(
252267
sdk_reg_dump_path_prefix,
253268
"/var/facebook/logs/fboss/sdk/reg_dump",
254269
"File path prefix for SDK register dump");
270+
271+
DEFINE_bool(
272+
type_dctype1_janga,
273+
false,
274+
"Enable support for single NPU config on Janga for MTIA");

fboss/agent/AgentFeatures.h

+4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ DECLARE_bool(dual_stage_3q_2q_qos);
7575
bool isDualStage3Q2QMode();
7676
bool isDualStage3Q2QQos();
7777
DECLARE_bool(enable_hw_update_protection);
78+
DECLARE_int32(max_l2_entries);
79+
DECLARE_int32(max_ndp_entries);
80+
DECLARE_int32(max_arp_entries);
7881

7982
DECLARE_bool(fw_drained_unrecoverable_error);
8083
DECLARE_int32(neighbhor_resource_percentage);
@@ -91,3 +94,4 @@ DECLARE_bool(run_forever);
9194
DECLARE_bool(run_forever_on_failure);
9295

9396
DECLARE_string(sdk_reg_dump_path_prefix);
97+
DECLARE_bool(type_dctype1_janga);

fboss/agent/ApplyThriftConfig.cpp

+19-16
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ shared_ptr<SwitchState> ThriftConfigApplier::run() {
852852

853853
{
854854
LoadBalancerConfigApplier loadBalancerConfigApplier(
855-
orig_->getLoadBalancers(), cfg_->get_loadBalancers());
855+
orig_->getLoadBalancers(), cfg_->loadBalancers().value());
856856
auto newLoadBalancers = loadBalancerConfigApplier.updateLoadBalancers(
857857
generateDeterministicSeed(cfg::LoadBalancerID::ECMP),
858858
generateDeterministicSeed(cfg::LoadBalancerID::AGGREGATE_PORT));
@@ -1391,9 +1391,9 @@ void ThriftConfigApplier::validateUdfConfig(const UdfConfig& newUdfConfig) {
13911391
return;
13921392
}
13931393

1394-
for (const auto& loadBalancerConfig : cfg_->get_loadBalancers()) {
1395-
auto loadBalancerId = loadBalancerConfig.get_id();
1396-
auto udfGroups = loadBalancerConfig.get_fieldSelection().udfGroups();
1394+
for (const auto& loadBalancerConfig : cfg_->loadBalancers().value()) {
1395+
auto loadBalancerId = folly::copy(loadBalancerConfig.id().value());
1396+
auto udfGroups = loadBalancerConfig.fieldSelection().value().udfGroups();
13971397
for (auto& udfGroupName : *udfGroups) {
13981398
if (udfGroupMap->find(udfGroupName) == udfGroupMap->end()) {
13991399
throw FbossError(
@@ -5457,8 +5457,8 @@ std::shared_ptr<Mirror> ThriftConfigApplier::createMirror(
54575457
}
54585458
}
54595459

5460-
uint8_t dscpMark = mirrorConfig->get_dscp();
5461-
bool truncate = mirrorConfig->get_truncate();
5460+
uint8_t dscpMark = folly::copy(mirrorConfig->dscp().value());
5461+
bool truncate = folly::copy(mirrorConfig->truncate().value());
54625462

54635463
std::optional<PortDescriptor> egressPortDesc;
54645464
if (mirrorEgressPort.has_value()) {
@@ -5776,19 +5776,19 @@ ThriftConfigApplier::updateStaticMplsRoutes(
57765776
for (auto& staticMplsRouteEntry : staticMplsRoutesWithNhops) {
57775777
RouteNextHopSet resolvedNextHops{};
57785778
// resolve next hops if any next hop is unresolved.
5779-
for (auto nexthop : staticMplsRouteEntry.get_nexthops()) {
5779+
for (auto nexthop : staticMplsRouteEntry.nexthops().value()) {
57805780
auto nhop = util::fromThrift(nexthop);
57815781
if (!nhop.labelForwardingAction()) {
57825782
throw FbossError(
57835783
"static mpls route for label ",
5784-
staticMplsRouteEntry.get_ingressLabel(),
5784+
folly::copy(staticMplsRouteEntry.ingressLabel().value()),
57855785
" has next hop without label action");
57865786
}
57875787
folly::IPAddress nhopAddress(nhop.addr());
57885788
if (nhopAddress.isLinkLocal() && !nhop.isResolved()) {
57895789
throw FbossError(
57905790
"static mpls route for label ",
5791-
staticMplsRouteEntry.get_ingressLabel(),
5791+
folly::copy(staticMplsRouteEntry.ingressLabel().value()),
57925792
" has link local next hop without interface");
57935793
}
57945794
if (nhop.isResolved() ||
@@ -5804,7 +5804,7 @@ ThriftConfigApplier::updateStaticMplsRoutes(
58045804
if (!inftToReach) {
58055805
throw FbossError(
58065806
"static mpls route for label ",
5807-
staticMplsRouteEntry.get_ingressLabel(),
5807+
folly::copy(staticMplsRouteEntry.ingressLabel().value()),
58085808
" has nexthop ",
58095809
nhopAddress.str(),
58105810
" out of interface subnets");
@@ -5815,10 +5815,11 @@ ThriftConfigApplier::updateStaticMplsRoutes(
58155815
nhop.weight(),
58165816
nhop.labelForwardingAction()));
58175817
}
5818-
auto entry = labelFib->getNodeIf(staticMplsRouteEntry.get_ingressLabel());
5818+
auto entry = labelFib->getNodeIf(
5819+
folly::copy(staticMplsRouteEntry.ingressLabel().value()));
58195820
if (!entry) {
58205821
auto node = createLabelForwardingEntry(
5821-
staticMplsRouteEntry.get_ingressLabel(),
5822+
folly::copy(staticMplsRouteEntry.ingressLabel().value()),
58225823
LabelNextHopEntry::Action::NEXTHOPS,
58235824
resolvedNextHops);
58245825
MultiLabelForwardingInformationBase::resolve(node);
@@ -5835,10 +5836,11 @@ ThriftConfigApplier::updateStaticMplsRoutes(
58355836
}
58365837

58375838
for (auto& staticMplsRouteEntry : staticMplsRoutesToNull) {
5838-
auto entry = labelFib->getNodeIf(staticMplsRouteEntry.get_ingressLabel());
5839+
auto entry = labelFib->getNodeIf(
5840+
folly::copy(staticMplsRouteEntry.ingressLabel().value()));
58395841
if (!entry) {
58405842
auto node = createLabelForwardingEntry(
5841-
staticMplsRouteEntry.get_ingressLabel(),
5843+
folly::copy(staticMplsRouteEntry.ingressLabel().value()),
58425844
LabelNextHopEntry::Action::DROP,
58435845
LabelNextHopSet());
58445846
MultiLabelForwardingInformationBase::resolve(node);
@@ -5855,10 +5857,11 @@ ThriftConfigApplier::updateStaticMplsRoutes(
58555857
}
58565858

58575859
for (auto& staticMplsRouteEntry : staticMplsRoutesToCPU) {
5858-
auto entry = labelFib->getNodeIf(staticMplsRouteEntry.get_ingressLabel());
5860+
auto entry = labelFib->getNodeIf(
5861+
folly::copy(staticMplsRouteEntry.ingressLabel().value()));
58595862
if (!entry) {
58605863
auto node = createLabelForwardingEntry(
5861-
staticMplsRouteEntry.get_ingressLabel(),
5864+
folly::copy(staticMplsRouteEntry.ingressLabel().value()),
58625865
LabelNextHopEntry::Action::TO_CPU,
58635866
LabelNextHopSet());
58645867
MultiLabelForwardingInformationBase::resolve(node);

fboss/agent/BUCK

+1
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ cpp_library(
518518
"facebook/Utils.cpp",
519519
],
520520
exported_deps = [
521+
":agent_features",
521522
":asic_utils",
522523
":fboss-error",
523524
":fboss-types",

fboss/agent/FabricConnectivityManager.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ void FabricConnectivityManager::updateExpectedSwitchIdAndPortIdForPort(
147147

148148
auto baseSwitchId = *it->second.begin();
149149
if (switchIdToDsfNode_.find(baseSwitchId) == switchIdToDsfNode_.end()) {
150-
XLOG(WARN) << "no dsf node for switch id " << baseSwitchId;
150+
XLOG(WARN) << "No DSF node for switch ID " << baseSwitchId
151+
<< ". Unable to assign expected switch and port IDs for peer "
152+
<< expectedSwitchName << " on port " << expectedPortName << ".";
151153
return;
152154
}
153155
const auto platformMapping = getPlatformMappingForPlatformType(
@@ -193,7 +195,7 @@ void FabricConnectivityManager::updateExpectedSwitchIdAndPortIdForPort(
193195

194196
void FabricConnectivityManager::addOrUpdatePort(
195197
const std::shared_ptr<Port>& swPort) {
196-
// Non-Faric port connectivity is handled by LLDP
198+
// Non-Fabric port connectivity is handled by LLDP
197199
if (swPort->getPortType() != cfg::PortType::FABRIC_PORT) {
198200
return;
199201
}

fboss/agent/PhySnapshotManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void PhySnapshotManager::updatePhyInfoLocked(
1515
CHECK(!phyInfo.state()->get_name().empty());
1616
auto result = lockedSnapshotMap->try_emplace(
1717
portID,
18-
std::set<std::string>({phyInfo.state()->get_name()}),
18+
std::set<std::string>({phyInfo.state()->name().value()}),
1919
intervalSeconds_);
2020
auto iter = result.first;
2121
auto& value = iter->second;

fboss/agent/Platform.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ int Platform::getLaneCount(cfg::PortProfileID profile) const {
261261
case cfg::PortProfileID::PROFILE_400G_8_PAM4_RS544X2N_OPTICAL:
262262
case cfg::PortProfileID::PROFILE_400G_8_PAM4_RS544X2N_COPPER:
263263
case cfg::PortProfileID::PROFILE_800G_8_PAM4_RS544X2N_OPTICAL:
264+
case cfg::PortProfileID::PROFILE_800G_8_PAM4_RS544X2N_COPPER:
264265
return 8;
265266

266267
case cfg::PortProfileID::PROFILE_DEFAULT:

fboss/agent/PortDescriptorTemplate.h

+7-4
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,16 @@ class PortDescriptorTemplate {
141141
}
142142

143143
static PortDescriptorTemplate fromThrift(const cfg::PortDescriptor& portTh) {
144-
switch (portTh.get_portType()) {
144+
switch (folly::copy(portTh.portType().value())) {
145145
case cfg::PortDescriptorType::Physical:
146-
return PortDescriptorTemplate(PortIdType(portTh.get_portId()));
146+
return PortDescriptorTemplate(
147+
PortIdType(folly::copy(portTh.portId().value())));
147148
case cfg::PortDescriptorType::Aggregate:
148-
return PortDescriptorTemplate(TrunkIdType(portTh.get_portId()));
149+
return PortDescriptorTemplate(
150+
TrunkIdType(folly::copy(portTh.portId().value())));
149151
case cfg::PortDescriptorType::SystemPort:
150-
return PortDescriptorTemplate(SystemPortIdType(portTh.get_portId()));
152+
return PortDescriptorTemplate(
153+
SystemPortIdType(folly::copy(portTh.portId().value())));
151154
}
152155
XLOG(FATAL) << "Unknown port type";
153156
}

fboss/agent/ResourceAccountant.h

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#include <gtest/gtest.h>
1919

20-
DECLARE_int32(max_l2_entries);
2120
DECLARE_bool(intf_nbr_tables);
2221

2322
namespace facebook::fboss {

0 commit comments

Comments
 (0)