From d30c05e9b74cc833f79e1fded619980c67d2cdc7 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 8 Oct 2024 00:25:28 -0700 Subject: [PATCH 001/479] Start adding llfc flow control thresholds Summary: As titled Reviewed By: shri-khare, srikrishnagopu Differential Revision: D64010121 fbshipit-source-id: d89bbd39310e891d60a1ea8505b340aa4ab9b4e9 --- fboss/agent/hw/sai/api/SwitchApi.h | 7 +++++++ fboss/agent/hw/sai/api/bcm/SwitchApi.cpp | 8 ++++++++ fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp | 6 ++++++ fboss/agent/hw/sai/api/fake/saifakeextensions.h | 1 + fboss/agent/hw/sai/api/oss/SwitchApi.cpp | 5 +++++ fboss/agent/hw/sai/api/tajo/SwitchApi.cpp | 4 ++++ 6 files changed, 31 insertions(+) diff --git a/fboss/agent/hw/sai/api/SwitchApi.h b/fboss/agent/hw/sai/api/SwitchApi.h index 8765be8415012..c0371cd60e4a1 100644 --- a/fboss/agent/hw/sai/api/SwitchApi.h +++ b/fboss/agent/hw/sai/api/SwitchApi.h @@ -552,6 +552,13 @@ struct SaiSwitchTraits { std::vector, AttributeReachabilityGroupList, SaiU32ListDefault>; + struct AttributeFabricLinkLayerFlowControlThreshold { + std::optional operator()(); + }; + using FabricLinkLayerFlowControlThreshold = SaiExtensionAttribute< + std::vector, + AttributeFabricLinkLayerFlowControlThreshold, + SaiU32ListDefault>; }; using AdapterKey = SwitchSaiId; using AdapterHostKey = std::monostate; diff --git a/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp b/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp index 733ca496e7f40..681f65a34a6d3 100644 --- a/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp @@ -295,4 +295,12 @@ SaiSwitchTraits::Attributes::AttributeReachabilityGroupList::operator()() { #endif return std::nullopt; } + +std::optional SaiSwitchTraits::Attributes:: + AttributeFabricLinkLayerFlowControlThreshold::operator()() { +#if defined(BRCM_SAI_SDK_DNX) && defined(BRCM_SAI_SDK_GTE_12_0) + return SAI_SWITCH_ATTR_FABRIC_LLFC_THRESHOLD; +#endif + return std::nullopt; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp index d1f0e12a87518..2c4d0e466b921 100644 --- a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp +++ b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp @@ -256,4 +256,10 @@ std::optional SaiSwitchTraits::Attributes::AttributeReachabilityGroupList::operator()() { return SAI_SWITCH_ATTR_REACHABILITY_GROUP_LIST; } + +std::optional SaiSwitchTraits::Attributes:: + AttributeFabricLinkLayerFlowControlThreshold::operator()() { + return SAI_SWITCH_ATTR_FABRIC_LLFC_THRESHOLD; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/fake/saifakeextensions.h b/fboss/agent/hw/sai/api/fake/saifakeextensions.h index 8123c80561e06..fb9499a7ce19e 100644 --- a/fboss/agent/hw/sai/api/fake/saifakeextensions.h +++ b/fboss/agent/hw/sai/api/fake/saifakeextensions.h @@ -50,6 +50,7 @@ typedef enum _sai_switch_extensions_attr_t { SAI_SWITCH_ATTR_VOQ_LATENCY_MIN_LEVEL_2, SAI_SWITCH_ATTR_VOQ_LATENCY_MAX_LEVEL_2, SAI_SWITCH_ATTR_REACHABILITY_GROUP_LIST, + SAI_SWITCH_ATTR_FABRIC_LLFC_THRESHOLD, } sai_switch_extensions_attr_t; typedef enum _sai_tam_event_extensions_attr_t { diff --git a/fboss/agent/hw/sai/api/oss/SwitchApi.cpp b/fboss/agent/hw/sai/api/oss/SwitchApi.cpp index b63773b352d0b..a19f6c84fca7e 100644 --- a/fboss/agent/hw/sai/api/oss/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/oss/SwitchApi.cpp @@ -157,4 +157,9 @@ std::optional SaiSwitchTraits::Attributes::AttributeReachabilityGroupList::operator()() { return std::nullopt; } + +std::optional SaiSwitchTraits::Attributes:: + AttributeFabricLinkLayerFlowControlThreshold::operator()() { + return std::nullopt; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp b/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp index 2865254e1189e..2bab60388a7a7 100644 --- a/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp @@ -179,4 +179,8 @@ std::optional SaiSwitchTraits::Attributes::AttributeReachabilityGroupList::operator()() { return std::nullopt; } +std::optional SaiSwitchTraits::Attributes:: + AttributeFabricLinkLayerFlowControlThreshold::operator()() { + return std::nullopt; +} } // namespace facebook::fboss From eff4e9ceeea0d3063c1ed7ae0ab76f257f06ba78 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 8 Oct 2024 00:25:28 -0700 Subject: [PATCH 002/479] Add fabric llfc as a switch extension create attribute Summary: As titled Reviewed By: shri-khare Differential Revision: D64014923 fbshipit-source-id: fa028a5381106e5754953c522b4c3512cb02a0af --- fboss/agent/hw/sai/api/SwitchApi.h | 4 +++- fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp | 1 + fboss/agent/platforms/sai/SaiPlatform.cpp | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/api/SwitchApi.h b/fboss/agent/hw/sai/api/SwitchApi.h index c0371cd60e4a1..ca79d6232683d 100644 --- a/fboss/agent/hw/sai/api/SwitchApi.h +++ b/fboss/agent/hw/sai/api/SwitchApi.h @@ -626,7 +626,8 @@ struct SaiSwitchTraits { std::optional, #endif std::optional, - std::optional>; + std::optional, + std::optional>; #if SAI_API_VERSION >= SAI_VERSION(1, 12, 0) static constexpr std::array CounterIdsToRead = { @@ -758,6 +759,7 @@ SAI_ATTRIBUTE_NAME(Switch, VoqLatencyMaxLevel2Ns); SAI_ATTRIBUTE_NAME(Switch, ArsProfile) #endif SAI_ATTRIBUTE_NAME(Switch, ReachabilityGroupList); +SAI_ATTRIBUTE_NAME(Switch, FabricLinkLayerFlowControlThreshold); template <> struct SaiObjectHasStats : public std::true_type {}; diff --git a/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp b/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp index d7479bf81610e..a2dd00c35aae2 100644 --- a/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp @@ -123,6 +123,7 @@ void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(Switch, VoqLatencyMaxLevel2Ns); SAI_EXT_ATTR_MAP(Switch, ReachabilityGroupList); SAI_EXT_ATTR_MAP(Switch, DelayDropCongThreshold); + SAI_EXT_ATTR_MAP(Switch, FabricLinkLayerFlowControlThreshold); } } // namespace diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index 6ecf3866e06af..3fe6789fcc2a0 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -587,6 +587,9 @@ SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes( delayDropCongThreshold = 1; } #endif + std::optional< + SaiSwitchTraits::Attributes::FabricLinkLayerFlowControlThreshold> + fabricLLFC; return { initSwitch, @@ -651,6 +654,7 @@ SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes( #endif std::nullopt, // ReachabilityGroupList delayDropCongThreshold, // Delay Drop Cong Threshold + fabricLLFC, }; } From 67ee26193d05a1aa5989f6ba3b7383a36d28c769 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Tue, 8 Oct 2024 09:31:01 -0700 Subject: [PATCH 003/479] Updating submodules Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/81f4bf22d3ce6d2b4cf8e6a4f90dc580468105a5 https://github.com/facebook/fb303/commit/591b7e0edd792794c9521e1d77c8e550e70bd200 https://github.com/facebook/fbthrift/commit/7f6edca32fd8ab6361f5ecf9be42d4e64b783098 https://github.com/facebook/folly/commit/c9acd68bad493f6829870e5cc84c117a0e0dd65d https://github.com/facebook/mvfst/commit/c53ebf1b1306037b4ea35af7f427a04647df8235 https://github.com/facebook/proxygen/commit/295872b12238a4f81c3a56b18b9798b1fd92990c https://github.com/facebook/wangle/commit/c7553866812b345e42d7a8282074ac09f84afe02 https://github.com/facebookexperimental/edencommon/commit/191b0dfe8456865cf2c5818e9317d3605dc47af3 https://github.com/facebookexperimental/rust-shed/commit/5d0cfd52e8d178794da27269767823fba8303a40 https://github.com/facebookincubator/fizz/commit/2d4c7d0f21b2111635fec92aca1f4d5476bdc502 Reviewed By: ckwalsh fbshipit-source-id: b0307438583bb26a209312d74dc9362ffab8dc58 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index cdaa3542700fe..863bdc3d4d107 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit c1f74beb3889d54a5c60ae7c033947e338e249ed +Subproject commit 591b7e0edd792794c9521e1d77c8e550e70bd200 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index de336bbb69c8a..af7cd250e8691 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit b6f6f91a4294b03100d2c4dd512eb269fa385b2d +Subproject commit 7f6edca32fd8ab6361f5ecf9be42d4e64b783098 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index ea01f90bfab8c..29fdd1b876a8f 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 45ffb40f2beebb08b37df9b81b39193a6e2057a4 +Subproject commit c9acd68bad493f6829870e5cc84c117a0e0dd65d diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 94078754bf60b..8c6e94bf7fa04 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit ae6297f4994fe0ba78f265589ac7e3c96d2215f8 +Subproject commit c7553866812b345e42d7a8282074ac09f84afe02 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index d400a680a7432..c1e3a0bafe875 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit c7976216bd64502f11b1b504da7a2e26d820ea8a +Subproject commit 2d4c7d0f21b2111635fec92aca1f4d5476bdc502 From 8ceca8e43529915a03059f0b05ea87ecc8aff6b7 Mon Sep 17 00:00:00 2001 From: Protick Bhowmick Date: Tue, 8 Oct 2024 10:00:27 -0700 Subject: [PATCH 004/479] Fail the test if there are no upgradeable transceivers on the chassis Summary: - Added a CHECK before the return in transceiversToTest function to ensure tcvrsToTest vector is not empty - Eliminated unnecessary size checks on tcvrsToTest in two locations, as the test will automatically fail if tcvrsToTest is empty. Reviewed By: xanabani Differential Revision: D63966613 fbshipit-source-id: 1e6f87d73188598e24078ec16bfc319ac2bdb320 --- .../test/hw_test/OpticsFwUpgradeTest.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp b/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp index a848107cc0557..f7a1dc393ff60 100644 --- a/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp +++ b/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp @@ -76,6 +76,9 @@ class OpticsFwUpgradeTest : public HwTest { tcvrsToTest.push_back(tcvrID); } } + + CHECK(!tcvrsToTest.empty()) << "No upgradeable transceivers found"; + return tcvrsToTest; } @@ -267,12 +270,9 @@ TEST_F(OpticsFwUpgradeTest, upgradeOnLinkDown) { portsForFwUpgrade = getHwQsfpEnsemble() ->getWedgeManager() ->getPortsRequiringOpticsFwUpgrade(); - // TODO: T193884846 to make sure all machines have upgradeable transceivers - // and remove this check. - if (!tcvrsToTest.empty()) { - EXPECT_FALSE(portsForFwUpgrade.empty()) - << "No modules requiring firmware upgrade"; - } + + EXPECT_FALSE(portsForFwUpgrade.empty()) + << "No modules requiring firmware upgrade"; }; // Verify function is called for both cold boot and warm boot iterations of @@ -345,12 +345,6 @@ TEST_F(OpticsFwUpgradeTestNoIPhySetup, noUpgradeOnWarmboot) { */ auto tcvrsToTest = transceiversToTest(); - // TODO: T193884846 to make sure all machines have upgradeable transceivers - // and remove this check. - if (tcvrsToTest.empty()) { - XLOG(INFO) << "Chassis has no upgradeable transceivers"; - return; - } // Lambda to refresh state machine and return true if all transceivers are in // TRANSCEIVER_PROGRAMMED state From f87e0489cc78082a25f2cf17f6638684c4d743ab Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Tue, 8 Oct 2024 10:18:52 -0700 Subject: [PATCH 005/479] Add option to mark CONNECTED only on initial sync Summary: In Dsf we use SubscriptionState::CONNECTED to determine that we actually have all the state we need. Previously, fsdb would serve heartbeats after serving initial sync so first chunk revieved would always be initial sync and we'd go into CONNECTED. But now heartbeats are served on a dedicated thread to avoid starvation, so we need to make sure the client doesnt prematurely mark CONNECTED. Ideally we can always follow this behavior but actually switch agent relies on the reverse (CONNECTED to mean any chunk came through). For now introducing a flag to allow both behaviors, perhaps we can introduce a new state SYNCED to differentiate Differential Revision: D63554533 fbshipit-source-id: d260d48b1d7dea4b02a7c5caed6fd77d11222456 --- fboss/fsdb/client/FsdbDeltaSubscriber.cpp | 8 ++++++-- fboss/fsdb/client/FsdbPatchSubscriber.cpp | 8 ++++++-- fboss/fsdb/client/FsdbStateSubscriber.cpp | 8 ++++++-- fboss/fsdb/client/FsdbSubscriber.h | 12 ++++++++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/fboss/fsdb/client/FsdbDeltaSubscriber.cpp b/fboss/fsdb/client/FsdbDeltaSubscriber.cpp index 97ad2967e8dc3..455203970a683 100644 --- a/fboss/fsdb/client/FsdbDeltaSubscriber.cpp +++ b/fboss/fsdb/client/FsdbDeltaSubscriber.cpp @@ -44,13 +44,17 @@ FsdbDeltaSubscriberImpl::serveStream(StreamT&& stream) { XLOG(DBG2) << " Detected cancellation: " << this->clientId(); break; } - // even empty change/heartbeat indicates subscription is connected - if (this->getSubscriptionState() != SubscriptionState::CONNECTED) { + if (!this->subscriptionOptions().requireInitialSyncToMarkConnect_ && + this->getSubscriptionState() != SubscriptionState::CONNECTED) { BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); } if (!delta->changes()->size()) { continue; } + if (this->subscriptionOptions().requireInitialSyncToMarkConnect_ && + this->getSubscriptionState() != SubscriptionState::CONNECTED) { + BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); + } SubUnitT tmp(*delta); this->operSubUnitUpdate_(std::move(tmp)); } diff --git a/fboss/fsdb/client/FsdbPatchSubscriber.cpp b/fboss/fsdb/client/FsdbPatchSubscriber.cpp index 590f8648d74d1..ca0e4416a6f46 100644 --- a/fboss/fsdb/client/FsdbPatchSubscriber.cpp +++ b/fboss/fsdb/client/FsdbPatchSubscriber.cpp @@ -47,12 +47,16 @@ FsdbPatchSubscriberImpl::serveStream( XLOG(DBG2) << " Detected cancellation: " << this->clientId(); break; } - // even empty change/heartbeat indicates subscription is connected - if (this->getSubscriptionState() != SubscriptionState::CONNECTED) { + if (!this->subscriptionOptions().requireInitialSyncToMarkConnect_ && + this->getSubscriptionState() != SubscriptionState::CONNECTED) { BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); } switch (message->getType()) { case SubscriberMessage::Type::chunk: + if (this->subscriptionOptions().requireInitialSyncToMarkConnect_ && + this->getSubscriptionState() != SubscriptionState::CONNECTED) { + BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); + } this->operSubUnitUpdate_(message->move_chunk()); break; case SubscriberMessage::Type::heartbeat: diff --git a/fboss/fsdb/client/FsdbStateSubscriber.cpp b/fboss/fsdb/client/FsdbStateSubscriber.cpp index b257a0c6b2e74..88c647fbbc657 100644 --- a/fboss/fsdb/client/FsdbStateSubscriber.cpp +++ b/fboss/fsdb/client/FsdbStateSubscriber.cpp @@ -45,8 +45,8 @@ FsdbStateSubscriberImpl::serveStream(StreamT&& stream) { XLOG(DBG2) << " Detected cancellation: " << this->clientId(); break; } - // even empty change/heartbeat indicates subscription is connected - if (this->getSubscriptionState() != SubscriptionState::CONNECTED) { + if (!this->subscriptionOptions().requireInitialSyncToMarkConnect_ && + this->getSubscriptionState() != SubscriptionState::CONNECTED) { BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); } if constexpr (std::is_same_v) { @@ -58,6 +58,10 @@ FsdbStateSubscriberImpl::serveStream(StreamT&& stream) { continue; } } + if (this->subscriptionOptions().requireInitialSyncToMarkConnect_ && + this->getSubscriptionState() != SubscriptionState::CONNECTED) { + BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); + } SubUnitT tmp(*state); this->operSubUnitUpdate_(std::move(tmp)); } diff --git a/fboss/fsdb/client/FsdbSubscriber.h b/fboss/fsdb/client/FsdbSubscriber.h index 0aec33b1bacc0..0cae6a61b84c5 100644 --- a/fboss/fsdb/client/FsdbSubscriber.h +++ b/fboss/fsdb/client/FsdbSubscriber.h @@ -83,14 +83,18 @@ struct SubscriptionOptions { explicit SubscriptionOptions( const std::string& clientId, bool subscribeStats = false, - uint32_t grHoldTimeSec = 0) + uint32_t grHoldTimeSec = 0, + // only mark subscription as CONNECTED on initial sync + bool requireInitialSyncToMarkConnect = false) : clientId_(clientId), subscribeStats_(subscribeStats), - grHoldTimeSec_(grHoldTimeSec) {} + grHoldTimeSec_(grHoldTimeSec), + requireInitialSyncToMarkConnect_(requireInitialSyncToMarkConnect) {} const std::string clientId_; bool subscribeStats_{false}; uint32_t grHoldTimeSec_{0}; + bool requireInitialSyncToMarkConnect_{false}; }; struct SubscriptionInfo { @@ -283,6 +287,10 @@ class FsdbSubscriber : public FsdbSubscriberBase { return subscribePaths_; } + const SubscriptionOptions& subscriptionOptions() const { + return subscriptionOptions_; + } + FsdbSubUnitUpdateCb operSubUnitUpdate_; private: From d9b2695fa963bb787cc583ff8cb297972a754d90 Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Tue, 8 Oct 2024 11:43:58 -0700 Subject: [PATCH 006/479] add int to struct map for hybrid test Summary: adding this field for testing accessing more complicated value type in hybrid visitation Reviewed By: Linerd Differential Revision: D64051955 Privacy Context Container: L1210319 fbshipit-source-id: 2bd704bd764ba8819d0054bc993cf4f1749095e8 --- fboss/thrift_cow/nodes/tests/test.thrift | 1 + fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fboss/thrift_cow/nodes/tests/test.thrift b/fboss/thrift_cow/nodes/tests/test.thrift index 539729ae1b1da..8bafc48e719e9 100644 --- a/fboss/thrift_cow/nodes/tests/test.thrift +++ b/fboss/thrift_cow/nodes/tests/test.thrift @@ -67,6 +67,7 @@ struct TestStruct { 29: set hybridSet; // (allow_skip_thrift_cow = true); 30: TestUnion hybridUnion; // (allow_skip_thrift_cow = true); 31: ChildStruct hybridStruct; // (allow_skip_thrift_cow = true); + 32: map hybridMapOfI32ToStruct; // (allow_skip_thrift_cow = true) } // (allow_skip_thrift_cow = true) struct ParentTestStruct { diff --git a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp index 1a11c95843952..0c5dc24fc370a 100644 --- a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp @@ -39,7 +39,8 @@ folly::dynamic createTestDynamic() { "mapB", dynamic::object())("cowMap", dynamic::object())( "hybridMap", dynamic::object())("hybridList", dynamic::array())( "hybridSet", dynamic::array())("hybridUnion", dynamic::object())( - "hybridStruct", dynamic::object("childMap", dynamic::object())); + "hybridStruct", dynamic::object("childMap", dynamic::object()))( + "hybridMapOfI32ToStruct", dynamic::object()); } TestStruct createTestStruct(folly::dynamic testDyn) { @@ -67,6 +68,7 @@ TEST(RecurseVisitorTests, TestFullRecurse) { {{}, testDyn}, {{"cowMap"}, dynamic::object()}, {{"hybridMap"}, dynamic::object()}, + {{"hybridMapOfI32ToStruct"}, dynamic::object()}, {{"hybridList"}, dynamic::array()}, {{"hybridSet"}, dynamic::array()}, {{"hybridUnion"}, dynamic::object()}, From 584af40db4cfd923417dedb35fc6c21713c3d7ec Mon Sep 17 00:00:00 2001 From: Nicholas Ormrod Date: Tue, 8 Oct 2024 14:05:15 -0700 Subject: [PATCH 007/479] Deshim coro in fbcode/fboss Summary: The following rules were deshimmed: ``` //folly/experimental/coro:accumulate -> //folly/coro:accumulate //folly/experimental/coro:async_generator -> //folly/coro:async_generator //folly/experimental/coro:async_pipe -> //folly/coro:async_pipe //folly/experimental/coro:async_scope -> //folly/coro:async_scope //folly/experimental/coro:async_stack -> //folly/coro:async_stack //folly/experimental/coro:baton -> //folly/coro:baton //folly/experimental/coro:blocking_wait -> //folly/coro:blocking_wait //folly/experimental/coro:collect -> //folly/coro:collect //folly/experimental/coro:concat -> //folly/coro:concat //folly/experimental/coro:coroutine -> //folly/coro:coroutine //folly/experimental/coro:current_executor -> //folly/coro:current_executor //folly/experimental/coro:detach_on_cancel -> //folly/coro:detach_on_cancel //folly/experimental/coro:detail_barrier -> //folly/coro:detail_barrier //folly/experimental/coro:detail_barrier_task -> //folly/coro:detail_barrier_task //folly/experimental/coro:detail_current_async_frame -> //folly/coro:detail_current_async_frame //folly/experimental/coro:detail_helpers -> //folly/coro:detail_helpers //folly/experimental/coro:detail_malloc -> //folly/coro:detail_malloc //folly/experimental/coro:detail_manual_lifetime -> //folly/coro:detail_manual_lifetime //folly/experimental/coro:detail_traits -> //folly/coro:detail_traits //folly/experimental/coro:filter -> //folly/coro:filter //folly/experimental/coro:future_util -> //folly/coro:future_util //folly/experimental/coro:generator -> //folly/coro:generator //folly/experimental/coro:gmock_helpers -> //folly/coro:gmock_helpers //folly/experimental/coro:gtest_helpers -> //folly/coro:gtest_helpers //folly/experimental/coro:inline_task -> //folly/coro:inline_task //folly/experimental/coro:invoke -> //folly/coro:invoke //folly/experimental/coro:merge -> //folly/coro:merge //folly/experimental/coro:mutex -> //folly/coro:mutex //folly/experimental/coro:promise -> //folly/coro:promise //folly/experimental/coro:result -> //folly/coro:result //folly/experimental/coro:retry -> //folly/coro:retry //folly/experimental/coro:rust_adaptors -> //folly/coro:rust_adaptors //folly/experimental/coro:scope_exit -> //folly/coro:scope_exit //folly/experimental/coro:shared_lock -> //folly/coro:shared_lock //folly/experimental/coro:shared_mutex -> //folly/coro:shared_mutex //folly/experimental/coro:sleep -> //folly/coro:sleep //folly/experimental/coro:small_unbounded_queue -> //folly/coro:small_unbounded_queue //folly/experimental/coro:task -> //folly/coro:task //folly/experimental/coro:timed_wait -> //folly/coro:timed_wait //folly/experimental/coro:timeout -> //folly/coro:timeout //folly/experimental/coro:traits -> //folly/coro:traits //folly/experimental/coro:transform -> //folly/coro:transform //folly/experimental/coro:unbounded_queue -> //folly/coro:unbounded_queue //folly/experimental/coro:via_if_async -> //folly/coro:via_if_async //folly/experimental/coro:with_async_stack -> //folly/coro:with_async_stack //folly/experimental/coro:with_cancellation -> //folly/coro:with_cancellation //folly/experimental/coro:bounded_queue -> //folly/coro:bounded_queue //folly/experimental/coro:shared_promise -> //folly/coro:shared_promise //folly/experimental/coro:cleanup -> //folly/coro:cleanup //folly/experimental/coro:auto_cleanup_fwd -> //folly/coro:auto_cleanup_fwd //folly/experimental/coro:auto_cleanup -> //folly/coro:auto_cleanup ``` The following headers were deshimmed: ``` folly/experimental/coro/Accumulate.h -> folly/coro/Accumulate.h folly/experimental/coro/Accumulate-inl.h -> folly/coro/Accumulate-inl.h folly/experimental/coro/AsyncGenerator.h -> folly/coro/AsyncGenerator.h folly/experimental/coro/AsyncPipe.h -> folly/coro/AsyncPipe.h folly/experimental/coro/AsyncScope.h -> folly/coro/AsyncScope.h folly/experimental/coro/AsyncStack.h -> folly/coro/AsyncStack.h folly/experimental/coro/Baton.h -> folly/coro/Baton.h folly/experimental/coro/BlockingWait.h -> folly/coro/BlockingWait.h folly/experimental/coro/Collect.h -> folly/coro/Collect.h folly/experimental/coro/Collect-inl.h -> folly/coro/Collect-inl.h folly/experimental/coro/Concat.h -> folly/coro/Concat.h folly/experimental/coro/Concat-inl.h -> folly/coro/Concat-inl.h folly/experimental/coro/Coroutine.h -> folly/coro/Coroutine.h folly/experimental/coro/CurrentExecutor.h -> folly/coro/CurrentExecutor.h folly/experimental/coro/DetachOnCancel.h -> folly/coro/DetachOnCancel.h folly/experimental/coro/detail/Barrier.h -> folly/coro/detail/Barrier.h folly/experimental/coro/detail/BarrierTask.h -> folly/coro/detail/BarrierTask.h folly/experimental/coro/detail/CurrentAsyncFrame.h -> folly/coro/detail/CurrentAsyncFrame.h folly/experimental/coro/detail/Helpers.h -> folly/coro/detail/Helpers.h folly/experimental/coro/detail/Malloc.h -> folly/coro/detail/Malloc.h folly/experimental/coro/detail/ManualLifetime.h -> folly/coro/detail/ManualLifetime.h folly/experimental/coro/detail/Traits.h -> folly/coro/detail/Traits.h folly/experimental/coro/Filter.h -> folly/coro/Filter.h folly/experimental/coro/Filter-inl.h -> folly/coro/Filter-inl.h folly/experimental/coro/FutureUtil.h -> folly/coro/FutureUtil.h folly/experimental/coro/Generator.h -> folly/coro/Generator.h folly/experimental/coro/GmockHelpers.h -> folly/coro/GmockHelpers.h folly/experimental/coro/GtestHelpers.h -> folly/coro/GtestHelpers.h folly/experimental/coro/detail/InlineTask.h -> folly/coro/detail/InlineTask.h folly/experimental/coro/Invoke.h -> folly/coro/Invoke.h folly/experimental/coro/Merge.h -> folly/coro/Merge.h folly/experimental/coro/Merge-inl.h -> folly/coro/Merge-inl.h folly/experimental/coro/Mutex.h -> folly/coro/Mutex.h folly/experimental/coro/Promise.h -> folly/coro/Promise.h folly/experimental/coro/Result.h -> folly/coro/Result.h folly/experimental/coro/Retry.h -> folly/coro/Retry.h folly/experimental/coro/RustAdaptors.h -> folly/coro/RustAdaptors.h folly/experimental/coro/ScopeExit.h -> folly/coro/ScopeExit.h folly/experimental/coro/SharedLock.h -> folly/coro/SharedLock.h folly/experimental/coro/SharedMutex.h -> folly/coro/SharedMutex.h folly/experimental/coro/Sleep.h -> folly/coro/Sleep.h folly/experimental/coro/Sleep-inl.h -> folly/coro/Sleep-inl.h folly/experimental/coro/SmallUnboundedQueue.h -> folly/coro/SmallUnboundedQueue.h folly/experimental/coro/Task.h -> folly/coro/Task.h folly/experimental/coro/TimedWait.h -> folly/coro/TimedWait.h folly/experimental/coro/Timeout.h -> folly/coro/Timeout.h folly/experimental/coro/Timeout-inl.h -> folly/coro/Timeout-inl.h folly/experimental/coro/Traits.h -> folly/coro/Traits.h folly/experimental/coro/Transform.h -> folly/coro/Transform.h folly/experimental/coro/Transform-inl.h -> folly/coro/Transform-inl.h folly/experimental/coro/UnboundedQueue.h -> folly/coro/UnboundedQueue.h folly/experimental/coro/ViaIfAsync.h -> folly/coro/ViaIfAsync.h folly/experimental/coro/WithAsyncStack.h -> folly/coro/WithAsyncStack.h folly/experimental/coro/WithCancellation.h -> folly/coro/WithCancellation.h folly/experimental/coro/BoundedQueue.h -> folly/coro/BoundedQueue.h folly/experimental/coro/SharedPromise.h -> folly/coro/SharedPromise.h folly/experimental/coro/Cleanup.h -> folly/coro/Cleanup.h folly/experimental/coro/AutoCleanup-fwd.h -> folly/coro/AutoCleanup-fwd.h folly/experimental/coro/AutoCleanup.h -> folly/coro/AutoCleanup.h ``` This is a codemod. It was automatically generated and will be landed once it is approved and tests are passing in sandcastle. You have been added as a reviewer by Sentinel or Butterfly. Autodiff project: dcoro Autodiff partition: fbcode.fboss Autodiff bookmark: ad.dcoro.fbcode.fboss Reviewed By: dtolnay Differential Revision: D64007370 fbshipit-source-id: 0477386781d11ae1613050dadeb4bc52c3ba8ee6 --- fboss/agent/BUCK | 2 +- fboss/agent/SwSwitch.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fboss/agent/BUCK b/fboss/agent/BUCK index 85111ef232ed1..2c621adf17bae 100644 --- a/fboss/agent/BUCK +++ b/fboss/agent/BUCK @@ -826,9 +826,9 @@ cpp_library( "//folly:utility", "//folly/concurrency:concurrent_hash_map", "//folly/container:f14_hash", + "//folly/coro:bounded_queue", "//folly/executors:io_thread_pool_executor", "//folly/executors/thread_factory:named_thread_factory", - "//folly/experimental/coro:bounded_queue", "//folly/futures:core", "//folly/gen:base", "//folly/io:iobuf", diff --git a/fboss/agent/SwSwitch.h b/fboss/agent/SwSwitch.h index b3ef1f298009b..ebe0a7adbce4a 100644 --- a/fboss/agent/SwSwitch.h +++ b/fboss/agent/SwSwitch.h @@ -42,7 +42,7 @@ #include #if FOLLY_HAS_COROUTINES -#include +#include #endif #include From 181f482028fd07667552da65a412f2fd7db60411 Mon Sep 17 00:00:00 2001 From: Konstantin Tsoy Date: Tue, 8 Oct 2024 14:40:13 -0700 Subject: [PATCH 008/479] Fix OSS build Summary: X-link: https://github.com/facebookincubator/zstrong/pull/1007 X-link: https://github.com/facebook/proxygen/pull/518 https://github.com/facebook/proxygen/issues/510 git patches on Windows OSS proxygen builds been failing for a while because of new lines Windows vs Unix. I re-generated the patches on Windows and that seems to fix it, and it also works for linux builds so seems fine. Reviewed By: afrind, bigfootjon Differential Revision: D63148510 fbshipit-source-id: 0ee605896820784335c1acd2a3e22b3bdf8394f1 --- .../boost_comparator_operator_fix.patch | 2 +- .../zlib_dont_build_more_than_needed.patch | 67 ++++++++++--------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/build/fbcode_builder/patches/boost_comparator_operator_fix.patch b/build/fbcode_builder/patches/boost_comparator_operator_fix.patch index 3771f2fff340f..45ee266b0c39c 100644 --- a/build/fbcode_builder/patches/boost_comparator_operator_fix.patch +++ b/build/fbcode_builder/patches/boost_comparator_operator_fix.patch @@ -8,4 +8,4 @@ diff --git a/boost/serialization/strong_typedef.hpp b/boost/serialization/strong + bool operator==(const T& lhs) const {return t == lhs;} \ bool operator<(const D& rhs) const {return t < rhs.t;} \ }; - + diff --git a/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch b/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch index 2ef115714919b..fee6755261fe5 100644 --- a/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch +++ b/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch @@ -1,33 +1,34 @@ -diff -Naur ../zlib-1.3.1/CMakeLists.txt ./CMakeLists.txt ---- ../zlib-1.3.1/CMakeLists.txt 2024-01-22 10:32:37.000000000 -0800 -+++ ./CMakeLists.txt 2024-01-23 13:14:09.870289968 -0800 -@@ -149,10 +149,8 @@ - set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) - endif(MINGW) - --add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) -+add_library(zlib ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) - target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) --add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) --target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) - set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) - set_target_properties(zlib PROPERTIES SOVERSION 1) - -@@ -169,7 +167,7 @@ - - if(UNIX) - # On unix-like platforms the library is almost always called libz -- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) -+ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) - if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) - set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") - endif() -@@ -179,7 +177,7 @@ - endif() - - if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) -- install(TARGETS zlib zlibstatic -+ install(TARGETS zlib - RUNTIME DESTINATION "${INSTALL_BIN_DIR}" - ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" - LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) +diff -Naur ../zlib-1.3.1/CMakeLists.txt ./CMakeLists.txt +--- ../zlib-1.3.1/CMakeLists.txt 2024-01-22 10:32:37.000000000 -0800 ++++ ./CMakeLists.txt 2024-01-23 13:14:09.870289968 -0800 +@@ -149,10 +149,8 @@ + set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) + endif(MINGW) + +-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) ++add_library(zlib ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +-target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) + set_target_properties(zlib PROPERTIES SOVERSION 1) + +@@ -169,7 +167,7 @@ + + if(UNIX) + # On unix-like platforms the library is almost always called libz +- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) ++ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) + if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() +@@ -179,7 +177,7 @@ + endif() + + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) +- install(TARGETS zlib zlibstatic ++ install(TARGETS zlib + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) + \ No newline at end of file From 4975761de2ec55a45d5ece13cfe8b25af1d2467b Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Tue, 8 Oct 2024 14:54:59 -0700 Subject: [PATCH 009/479] Reduce GitHub actions runs Summary: Reduce runner time in order to reduce costs https://www.internalfb.com/intern/opensource/github/repo/452790511534758/budget/. With this change, we're going from 24 runs per day to 5. This shouldn't really be a problem since we don't regularly see changes pushed to the github repository after 6pm, and there are minimal changes that land there before 8am. We will still allow runs for PRs and ad-hoc runs that can be manually scheduled. Reviewed By: srikrishnagopu Differential Revision: D64065748 fbshipit-source-id: 9ff113f923ace3de7fc3193b4756dd771af489bd --- .github/workflows/platform-services.yml | 9 +++++++-- .github/workflows/qsfp-build.yml | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/platform-services.yml b/.github/workflows/platform-services.yml index 8a84ef7d1eddb..ed2f1c145eee3 100644 --- a/.github/workflows/platform-services.yml +++ b/.github/workflows/platform-services.yml @@ -5,10 +5,15 @@ on: pull_request: # Allow manually triggering the workflow workflow_dispatch: - # Also schedule the workflow to run hourly automatically + # Also schedule the workflow to run every 3 hours during day only # ShipIt job will sync hourly around HH:21, so schedule the run with 15 minute offset schedule: - - cron: '36 * * * *' + # Run daily at 1:36AM UTC = 6:36PM PDT + # Run daily at 1:36PM UTC = 6:36AM PDT + # Run daily at 4:36PM UTC = 9:36AM PDT + # Run daily at 7:36PM UTC = 12:36PM PDT + # Run daily at 10:36PM UTC = 3:36PM PDT + - cron: '36 1,13,16,19,22 * * *' jobs: Platform-Services-Build: runs-on: 32-core-ubuntu diff --git a/.github/workflows/qsfp-build.yml b/.github/workflows/qsfp-build.yml index 16a5208abc35c..b1509447211f8 100644 --- a/.github/workflows/qsfp-build.yml +++ b/.github/workflows/qsfp-build.yml @@ -4,10 +4,15 @@ on: pull_request: # Allow manually triggering the workflow workflow_dispatch: - # Also schedule the workflow to run hourly automatically + # Also schedule the workflow to run every 3 hours during day only # ShipIt job will sync hourly around HH:21, so schedule the run with 15 minute offset schedule: - - cron: '36 * * * *' + # Run daily at 1:36AM UTC = 6:36PM PDT + # Run daily at 1:36PM UTC = 6:36AM PDT + # Run daily at 4:36PM UTC = 9:36AM PDT + # Run daily at 7:36PM UTC = 12:36PM PDT + # Run daily at 10:36PM UTC = 3:36PM PDT + - cron: '36 1,13,16,19,22 * * *' jobs: Qsfp-Service-Build-Hourly: runs-on: 32-core-ubuntu From 00716e92f35f63dfd95b7e2e03591fb4d5301e63 Mon Sep 17 00:00:00 2001 From: Harshit Gulati Date: Tue, 8 Oct 2024 18:07:09 -0700 Subject: [PATCH 010/479] Return more info from getPortsRequiringOpticsFwUpgrade Summary: This api will be used to display information about what part numbers require firmware upgrade by some of the tooling like fboss-build-info. Reviewed By: birdsoup Differential Revision: D63602164 Privacy Context Container: L1125642 fbshipit-source-id: cd2911a81518067def2b8998f18529dae9b7108f --- fboss/qsfp_service/QsfpServiceHandler.cpp | 2 +- fboss/qsfp_service/QsfpServiceHandler.h | 2 +- fboss/qsfp_service/TransceiverManager.cpp | 50 +++++++++++-------- fboss/qsfp_service/TransceiverManager.h | 6 ++- fboss/qsfp_service/if/qsfp.thrift | 7 +-- fboss/qsfp_service/if/transceiver.thrift | 6 +++ .../module/tests/QsfpModuleTest.cpp | 12 ++--- .../test/hw_test/OpticsFwUpgradeTest.cpp | 6 ++- 8 files changed, 56 insertions(+), 35 deletions(-) diff --git a/fboss/qsfp_service/QsfpServiceHandler.cpp b/fboss/qsfp_service/QsfpServiceHandler.cpp index 128ca6b8db403..ddc17cf6087c9 100644 --- a/fboss/qsfp_service/QsfpServiceHandler.cpp +++ b/fboss/qsfp_service/QsfpServiceHandler.cpp @@ -82,7 +82,7 @@ void QsfpServiceHandler::getTransceiverInfo( } void QsfpServiceHandler::getPortsRequiringOpticsFwUpgrade( - std::vector& ports) { + std::map& ports) { auto log = LOG_THRIFT_CALL(INFO); ports = manager_->getPortsRequiringOpticsFwUpgrade(); } diff --git a/fboss/qsfp_service/QsfpServiceHandler.h b/fboss/qsfp_service/QsfpServiceHandler.h index e5e30ab64d890..85cb2ad8aff31 100644 --- a/fboss/qsfp_service/QsfpServiceHandler.h +++ b/fboss/qsfp_service/QsfpServiceHandler.h @@ -185,7 +185,7 @@ class QsfpServiceHandler void dumpTransceiverI2cLog(std::unique_ptr portName) override; void getPortsRequiringOpticsFwUpgrade( - std::vector& ports) override; + std::map& ports) override; /* * Get the list of supported PRBS polynomials for the given port and * prbs component diff --git a/fboss/qsfp_service/TransceiverManager.cpp b/fboss/qsfp_service/TransceiverManager.cpp index 51f6d037ccf75..03ae7fb7a2bb7 100644 --- a/fboss/qsfp_service/TransceiverManager.cpp +++ b/fboss/qsfp_service/TransceiverManager.cpp @@ -408,16 +408,17 @@ const std::string TransceiverManager::getPortName(TransceiverID tcvrId) const { return portNames.empty() ? "" : *portNames.begin(); } -std::vector TransceiverManager::getPortsRequiringOpticsFwUpgrade() - const { - std::vector ports; +std::map +TransceiverManager::getPortsRequiringOpticsFwUpgrade() const { + std::map ports; if (!isFullyInitialized()) { throw FbossError("Service is still initializing..."); } auto lockedTransceivers = transceivers_.rlock(); for (const auto& tcvrIt : *lockedTransceivers) { - if (requiresFirmwareUpgrade(*tcvrIt.second)) { - ports.push_back(getPortName(tcvrIt.first)); + auto firmwareUpgradeData = getFirmwareUpgradeData(*tcvrIt.second); + if (firmwareUpgradeData.has_value()) { + ports[getPortName(tcvrIt.first)] = firmwareUpgradeData.value(); } } return ports; @@ -436,7 +437,7 @@ bool TransceiverManager::firmwareUpgradeRequired(TransceiverID id) { bool iOevbBusy = false; bool present = tcvr.isPresent(); std::string partNumber = tcvr.getPartNumber(); - bool requiresUpgrade = present && requiresFirmwareUpgrade(tcvr); + bool requiresUpgrade = present && getFirmwareUpgradeData(tcvr).has_value(); if (forceFirmwareUpgradeForTesting_ || requiresUpgrade) { // If we are here, it means that this transceiver is present and has the // firmware version mismatch and hence requires upgrade @@ -502,9 +503,10 @@ std::optional TransceiverManager::getFirmwareFromCfg( return fwVersionInCfgIt->second; } -bool TransceiverManager::requiresFirmwareUpgrade(Transceiver& tcvr) const { - // Returns true if the current firmware revision is different than the one in - // qsfp config +std::optional TransceiverManager::getFirmwareUpgradeData( + Transceiver& tcvr) const { + // Returns a FirmwareUpgrade if the current firmware revision is different + // than the one in qsfp config else std::nullopt auto cachedTcvrInfo = tcvr.getTransceiverInfo(); auto moduleStatus = cachedTcvrInfo.tcvrState()->status(); int tcvrID = tcvr.getID(); @@ -513,24 +515,26 @@ bool TransceiverManager::requiresFirmwareUpgrade(Transceiver& tcvr) const { if (!moduleStatus.has_value()) { FW_LOG(DBG4, tcvrID) << " Part Number " << partNumber - << " moduleStatus not set. Returning false from requiresFirmwareUpgrade"; - return false; + << " moduleStatus not set. Returning nullopt from getFirmwareUpgradeData"; + return std::nullopt; } auto fwStatus = moduleStatus->fwStatus(); if (!fwStatus.has_value()) { FW_LOG(DBG4, tcvrID) << " Part Number " << partNumber - << " fwStatus not set. Returning false from requiresFirmwareUpgrade"; - return false; + << " fwStatus not set. Returning nullopt from getFirmwareUpgradeData"; + return std::nullopt; } + FirmwareUpgradeData fwUpgradeData; + fwUpgradeData.partNumber() = partNumber; auto fwFromConfig = getFirmwareFromCfg(tcvr); if (!fwFromConfig.has_value()) { FW_LOG(DBG4, tcvrID) << " Part Number " << partNumber - << " Fw not available in config. Returning false from requiresFirmwareUpgrade"; - return false; + << " Fw not available in config. Returning nullopt from getFirmwareUpgradeData"; + return std::nullopt; } auto& versions = *fwFromConfig->versions(); @@ -542,9 +546,11 @@ bool TransceiverManager::requiresFirmwareUpgrade(Transceiver& tcvr) const { << " Part Number " << partNumber << " Application Version in cfg=" << fwIt.get_version() << " current operational version= " << *fwStatus->version() - << ". Returning true from requiresFirmwareUpgrade for tcvr=" + << ". Returning valid getFirmwareUpgradeData for tcvr=" << tcvr.getID(); - return true; + fwUpgradeData.currentFirmwareVersion() = *fwStatus->version(); + fwUpgradeData.desiredFirmwareVersion() = fwIt.get_version(); + return fwUpgradeData; } if (fwType == cfg::FirmwareType::DSP && fwStatus->dspFwVer() && fwIt.get_version() != *fwStatus->dspFwVer()) { @@ -552,9 +558,11 @@ bool TransceiverManager::requiresFirmwareUpgrade(Transceiver& tcvr) const { << " Part Number " << partNumber << " DSP Version in cfg=" << fwIt.get_version() << " current operational version= " << *fwStatus->dspFwVer() - << ". Returning true from requiresFirmwareUpgrade for tcvr=" + << ". Returning valid getFirmwareUpgradeData for tcvr=" << tcvr.getID(); - return true; + fwUpgradeData.currentFirmwareVersion() = *fwStatus->dspFwVer(); + fwUpgradeData.desiredFirmwareVersion() = fwIt.get_version(); + return fwUpgradeData; } FW_LOG(DBG, tcvrID) << " Part Number " << partNumber << " FW Type Cfg " << apache::thrift::util::enumNameSafe(fwType) @@ -566,10 +574,10 @@ bool TransceiverManager::requiresFirmwareUpgrade(Transceiver& tcvr) const { FW_LOG(INFO, tcvrID) << " Part Number " << partNumber << " num versions found: " << versions.size() - << " Version match in requiresFirmwareUpgrade. Not Upgrading"; + << " Version match in getFirmwareUpgradeData. Not Upgrading"; // Versions match. No need to upgrade firmware - return false; + return std::nullopt; } bool TransceiverManager::upgradeFirmware(Transceiver& tcvr) { diff --git a/fboss/qsfp_service/TransceiverManager.h b/fboss/qsfp_service/TransceiverManager.h index a80edba12c09f..07a435a768afc 100644 --- a/fboss/qsfp_service/TransceiverManager.h +++ b/fboss/qsfp_service/TransceiverManager.h @@ -602,9 +602,11 @@ class TransceiverManager { // Determine if transceiver FW requires upgrade. // Transceiver has to be present, and the version in the QsfpConfig // has to be different from whats already running in HW. - bool requiresFirmwareUpgrade(Transceiver& tcvr) const; + std::optional getFirmwareUpgradeData( + Transceiver& tcvr) const; - std::vector getPortsRequiringOpticsFwUpgrade() const; + std::map getPortsRequiringOpticsFwUpgrade() + const; protected: /* diff --git a/fboss/qsfp_service/if/qsfp.thrift b/fboss/qsfp_service/if/qsfp.thrift index 6be90ec713bb3..e2926d259b9e7 100644 --- a/fboss/qsfp_service/if/qsfp.thrift +++ b/fboss/qsfp_service/if/qsfp.thrift @@ -295,7 +295,8 @@ service QsfpService extends phy.FbossCommonPhyCtrl { 1: fboss.FbossBaseError error, ); - list getPortsRequiringOpticsFwUpgrade() throws ( - 1: fboss.FbossBaseError error, - ); + map< + string, + transceiver.FirmwareUpgradeData + > getPortsRequiringOpticsFwUpgrade() throws (1: fboss.FbossBaseError error); } diff --git a/fboss/qsfp_service/if/transceiver.thrift b/fboss/qsfp_service/if/transceiver.thrift index 0b8d538464a9a..07ae0748b2e09 100644 --- a/fboss/qsfp_service/if/transceiver.thrift +++ b/fboss/qsfp_service/if/transceiver.thrift @@ -730,3 +730,9 @@ struct QsfpToBmcSyncData { 3: SwitchDeploymentInfo switchDeploymentInfo; 4: map transceiverThermalData; } + +struct FirmwareUpgradeData { + 1: string partNumber; + 2: string currentFirmwareVersion; + 3: string desiredFirmwareVersion; +} diff --git a/fboss/qsfp_service/module/tests/QsfpModuleTest.cpp b/fboss/qsfp_service/module/tests/QsfpModuleTest.cpp index 6cc53e4e85554..73696f6f04985 100644 --- a/fboss/qsfp_service/module/tests/QsfpModuleTest.cpp +++ b/fboss/qsfp_service/module/tests/QsfpModuleTest.cpp @@ -488,38 +488,38 @@ TEST_F(QsfpModuleTest, verifyLaneToPortMapping) { verify(expectedMap); } -TEST_F(QsfpModuleTest, requiresFirmwareUpgrade) { +TEST_F(QsfpModuleTest, getFirmwareUpgradeData) { qsfp_->overrideVendorPN(getFakePartNumber()); const QsfpConfig* qsfp_config = transceiverManager_->getQsfpConfig(); // Test empty fw status transceiverManager_->refreshStateMachines(); qsfp_->useActualGetTransceiverInfo(); - EXPECT_FALSE(transceiverManager_->requiresFirmwareUpgrade(*qsfp_)); + EXPECT_FALSE(transceiverManager_->getFirmwareUpgradeData(*qsfp_).has_value()); // Test app fw status mismatch qsfp_->setAppFwVersion(getFakeAppFwVersion()); transceiverManager_->refreshStateMachines(); qsfp_->useActualGetTransceiverInfo(); - EXPECT_FALSE(transceiverManager_->requiresFirmwareUpgrade(*qsfp_)); + EXPECT_FALSE(transceiverManager_->getFirmwareUpgradeData(*qsfp_).has_value()); // Test app fw status mismatch qsfp_->setAppFwVersion("foo"); transceiverManager_->refreshStateMachines(); qsfp_->useActualGetTransceiverInfo(); - EXPECT_TRUE(transceiverManager_->requiresFirmwareUpgrade(*qsfp_)); + EXPECT_TRUE(transceiverManager_->getFirmwareUpgradeData(*qsfp_).has_value()); // Test dsp fw status match qsfp_->setDspFwVersion(getFakeDspFwVersion()); transceiverManager_->refreshStateMachines(); qsfp_->useActualGetTransceiverInfo(); - EXPECT_FALSE(transceiverManager_->requiresFirmwareUpgrade(*qsfp_)); + EXPECT_FALSE(transceiverManager_->getFirmwareUpgradeData(*qsfp_).has_value()); // Test dsp fw status mismatch qsfp_->setDspFwVersion("bar"); transceiverManager_->refreshStateMachines(); qsfp_->useActualGetTransceiverInfo(); - EXPECT_TRUE(transceiverManager_->requiresFirmwareUpgrade(*qsfp_)); + EXPECT_TRUE(transceiverManager_->getFirmwareUpgradeData(*qsfp_).has_value()); } } // namespace facebook::fboss diff --git a/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp b/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp index f7a1dc393ff60..54e24bb4c1b04 100644 --- a/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp +++ b/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp @@ -244,9 +244,13 @@ TEST_F(OpticsFwUpgradeTest, upgradeOnLinkDown) { auto portsForFwUpgrade = getHwQsfpEnsemble() ->getWedgeManager() ->getPortsRequiringOpticsFwUpgrade(); + std::vector fwUpgradePorts; + for (auto& [portName, _] : portsForFwUpgrade) { + fwUpgradePorts.push_back(portName); + } EXPECT_TRUE(portsForFwUpgrade.empty()) << "Some modules still require firmware upgrade: " + - folly::join(",", portsForFwUpgrade); + folly::join(",", fwUpgradePorts); // During cold boot setup, update the firmware versions in the config auto qsfpCfg = From 5ebaf9eb7b1346ee753a6f609884d68651c9634c Mon Sep 17 00:00:00 2001 From: Harshit Gulati Date: Tue, 8 Oct 2024 18:07:09 -0700 Subject: [PATCH 011/479] gflags to enable firmware upgrade support on coldboot/link down Summary: We are now changing the implementation to trigger firmware upgrade via a thrift call. Until that support is completely in place, guarding the existing support with gflag so that we don't lose it. This gflag will be disabled by default and enabled only in hw tests. Reviewed By: birdsoup Differential Revision: D63620366 Privacy Context Container: L1125642 fbshipit-source-id: 3b8bf2170f1a88d8faa4256161e39f7e84586b2f --- fboss/qsfp_service/TransceiverManager.cpp | 30 +++++++++++++++---- .../test/hw_test/OpticsFwUpgradeTest.cpp | 6 ++++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/fboss/qsfp_service/TransceiverManager.cpp b/fboss/qsfp_service/TransceiverManager.cpp index 03ae7fb7a2bb7..63ceb689a0dcb 100644 --- a/fboss/qsfp_service/TransceiverManager.cpp +++ b/fboss/qsfp_service/TransceiverManager.cpp @@ -59,6 +59,21 @@ DEFINE_bool( false, "Enable transceiver validation feature in qsfp_service"); +DEFINE_bool( + firmware_upgrade_on_coldboot, + false, + "Set to true to automatically upgrade firmware on coldboot"); + +DEFINE_bool( + firmware_upgrade_on_link_down, + false, + "Set to true to automatically upgrade firmware when link goes down"); + +DEFINE_bool( + firmware_upgrade_on_tcvr_insert, + false, + "Set to true to automatically upgrade firmware when a transceiver is inserted"); + namespace { constexpr auto kForceColdBootFileName = "cold_boot_once_qsfp_service"; constexpr auto kWarmBootFlag = "can_warm_boot"; @@ -1547,7 +1562,9 @@ void TransceiverManager::updateTransceiverPortStatus() noexcept { << " transceivers need to update port status. Total execute time(ms):" << duration_cast(steady_clock::now() - begin).count(); - triggerFirmwareUpgradeEvents(tcvrsForFwUpgrade); + if (FLAGS_firmware_upgrade_on_link_down) { + triggerFirmwareUpgradeEvents(tcvrsForFwUpgrade); + } } void TransceiverManager::triggerFirmwareUpgradeEvents( @@ -1841,18 +1858,20 @@ void TransceiverManager::refreshStateMachines() { const auto& presentXcvrIds = refreshTransceivers(); bool firstRefreshAfterColdboot = !canWarmBoot_ && !isFullyInitialized(); - // Find transceivers that were just discovered or that are still inactive std::unordered_set potentialTcvrsForFwUpgrade; for (auto tcvrID : presentXcvrIds) { auto curState = getCurrentState(tcvrID); - if (curState == TransceiverStateMachineState::INACTIVE) { + if (curState == TransceiverStateMachineState::INACTIVE && + FLAGS_firmware_upgrade_on_link_down) { // Anytime a module is in inactive state (link down), it's a candidate for // fw upgrade XLOG(INFO) << "Transceiver " << static_cast(tcvrID) << " is in INACTIVE state, adding it to list of potentialTcvrsForFwUpgrade"; potentialTcvrsForFwUpgrade.insert(tcvrID); - } else if (curState == TransceiverStateMachineState::DISCOVERED) { + } else if ( + curState == TransceiverStateMachineState::DISCOVERED && + FLAGS_firmware_upgrade_on_coldboot) { if (firstRefreshAfterColdboot) { // First refresh after cold boot and module is still in // discovered state @@ -1860,7 +1879,7 @@ void TransceiverManager::refreshStateMachines() { << "Transceiver " << static_cast(tcvrID) << " just did a cold boot and is still in discovered state, adding it to list of potentialTcvrsForFwUpgrade"; potentialTcvrsForFwUpgrade.insert(tcvrID); - } else { + } else if (FLAGS_firmware_upgrade_on_tcvr_insert) { auto stateMachine = stateMachines_.find(tcvrID); if (stateMachine != stateMachines_.end() && stateMachine->second->getStateMachine().rlock()->get_attribute( @@ -1875,7 +1894,6 @@ void TransceiverManager::refreshStateMachines() { } } } - if (!potentialTcvrsForFwUpgrade.empty()) { triggerFirmwareUpgradeEvents(potentialTcvrsForFwUpgrade); } diff --git a/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp b/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp index 54e24bb4c1b04..bca31cf6167eb 100644 --- a/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp +++ b/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp @@ -30,6 +30,12 @@ class OpticsFwUpgradeTest : public HwTest { // starts later gflags::SetCommandLineOptionWithMode( "max_concurrent_evb_fw_upgrade", "8", gflags::SET_FLAGS_DEFAULT); + gflags::SetCommandLineOptionWithMode( + "firmware_upgrade_on_coldboot", "1", gflags::SET_FLAGS_DEFAULT); + gflags::SetCommandLineOptionWithMode( + "firmware_upgrade_on_link_down", "1", gflags::SET_FLAGS_DEFAULT); + gflags::SetCommandLineOptionWithMode( + "firmware_upgrade_on_tcvr_insert", "1", gflags::SET_FLAGS_DEFAULT); HwTest::SetUp(); // Revert the max_concurrent_evb_fw_upgrade back to 1 which is the default gflags::SetCommandLineOptionWithMode( From 0fe368667a14e542cf635cae87b049bf8ac194c6 Mon Sep 17 00:00:00 2001 From: Harshit Gulati Date: Tue, 8 Oct 2024 18:07:09 -0700 Subject: [PATCH 012/479] Add transitions from more states to UPGRADING Summary: In the next diff, i'll add a thrift API to trigger firmware upgrades. When that happens, we could be asked to upgrade firmware while transceivers are in different states. Thus adding the transitions from various states to upgrading in this diff Reviewed By: birdsoup Differential Revision: D63659479 Privacy Context Container: L1125642 fbshipit-source-id: 44658a5ee9f0d6e896875cf60e1d75fa134c1da8 --- fboss/qsfp_service/TransceiverStateMachine.h | 5 +++++ fboss/qsfp_service/test/TransceiverStateMachineTest.cpp | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/fboss/qsfp_service/TransceiverStateMachine.h b/fboss/qsfp_service/TransceiverStateMachine.h index 3eb25f365321c..0a80c4b4e6f8b 100644 --- a/fboss/qsfp_service/TransceiverStateMachine.h +++ b/fboss/qsfp_service/TransceiverStateMachine.h @@ -500,7 +500,12 @@ BOOST_MSM_EUML_TRANSITION_TABLE(( // May need to remediate transciever if some ports are down ACTIVE + REMEDIATE_TRANSCEIVER [tryRemediateTransceiver] / logStateChanged == XPHY_PORTS_PROGRAMMED, INACTIVE + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, + ACTIVE + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, DISCOVERED + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, + IPHY_PORTS_PROGRAMMED + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, + XPHY_PORTS_PROGRAMMED + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, + TRANSCEIVER_READY + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, + TRANSCEIVER_PROGRAMMED + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, UPGRADING + RESET_TO_DISCOVERED / logStateChanged == DISCOVERED // +------------------------------------------------------------------------------------------------------------+ ), TransceiverTransitionTable) diff --git a/fboss/qsfp_service/test/TransceiverStateMachineTest.cpp b/fboss/qsfp_service/test/TransceiverStateMachineTest.cpp index 02b34f65273fd..c0ce0c0c23d09 100644 --- a/fboss/qsfp_service/test/TransceiverStateMachineTest.cpp +++ b/fboss/qsfp_service/test/TransceiverStateMachineTest.cpp @@ -2243,7 +2243,12 @@ TEST_F(TransceiverStateMachineTest, upgradeFirmware) { auto allStates = getAllStates(); verifyStateMachine( {TransceiverStateMachineState::UPGRADING, - TransceiverStateMachineState::INACTIVE}, + TransceiverStateMachineState::INACTIVE, + TransceiverStateMachineState::IPHY_PORTS_PROGRAMMED, + TransceiverStateMachineState::XPHY_PORTS_PROGRAMMED, + TransceiverStateMachineState::TRANSCEIVER_READY, + TransceiverStateMachineState::TRANSCEIVER_PROGRAMMED, + TransceiverStateMachineState::ACTIVE}, TransceiverStateMachineState::DISCOVERED /* expected state */, allStates, []() {} /* preUpdate */, From cf05d43bc7c27c866c0123b39a8c0bb8f501ebfd Mon Sep 17 00:00:00 2001 From: Harshit Gulati Date: Tue, 8 Oct 2024 18:07:09 -0700 Subject: [PATCH 013/479] Thrift API to trigger FW upgrade Summary: Based on the discussions in https://docs.google.com/document/d/1w-slejpV4G-NyWZLLtc0XC6I3sxUCD9z_tDOMU0I2AY/edit#heading=h.hf6wklot6g6h, we are adding a thrift API to trigger optics firmware upgrade instead of automatically upgrading on cold boot or port down. Reviewed By: birdsoup Differential Revision: D63661244 Privacy Context Container: L1125642 fbshipit-source-id: cbd54323719631333c7271d8956e8334cfdde17a --- fboss/qsfp_service/QsfpServiceHandler.cpp | 6 +++++ fboss/qsfp_service/QsfpServiceHandler.h | 4 ++++ fboss/qsfp_service/TransceiverManager.cpp | 27 ++++++++++++++++++++++- fboss/qsfp_service/TransceiverManager.h | 7 +++++- fboss/qsfp_service/if/qsfp.thrift | 5 +++++ 5 files changed, 47 insertions(+), 2 deletions(-) diff --git a/fboss/qsfp_service/QsfpServiceHandler.cpp b/fboss/qsfp_service/QsfpServiceHandler.cpp index ddc17cf6087c9..b7c639a1eebde 100644 --- a/fboss/qsfp_service/QsfpServiceHandler.cpp +++ b/fboss/qsfp_service/QsfpServiceHandler.cpp @@ -87,6 +87,12 @@ void QsfpServiceHandler::getPortsRequiringOpticsFwUpgrade( ports = manager_->getPortsRequiringOpticsFwUpgrade(); } +void QsfpServiceHandler::triggerAllOpticsFwUpgrade( + std::map& ports) { + auto log = LOG_THRIFT_CALL(INFO); + ports = manager_->triggerAllOpticsFwUpgrade(); +} + void QsfpServiceHandler::getTransceiverConfigValidationInfo( std::map& info, std::unique_ptr> ids, diff --git a/fboss/qsfp_service/QsfpServiceHandler.h b/fboss/qsfp_service/QsfpServiceHandler.h index 85cb2ad8aff31..1dbe6777ff7ff 100644 --- a/fboss/qsfp_service/QsfpServiceHandler.h +++ b/fboss/qsfp_service/QsfpServiceHandler.h @@ -186,6 +186,10 @@ class QsfpServiceHandler void getPortsRequiringOpticsFwUpgrade( std::map& ports) override; + + void triggerAllOpticsFwUpgrade( + std::map& ports) override; + /* * Get the list of supported PRBS polynomials for the given port and * prbs component diff --git a/fboss/qsfp_service/TransceiverManager.cpp b/fboss/qsfp_service/TransceiverManager.cpp index 63ceb689a0dcb..969e0c8e94aee 100644 --- a/fboss/qsfp_service/TransceiverManager.cpp +++ b/fboss/qsfp_service/TransceiverManager.cpp @@ -439,6 +439,25 @@ TransceiverManager::getPortsRequiringOpticsFwUpgrade() const { return ports; } +std::map +TransceiverManager::triggerAllOpticsFwUpgrade() { + std::map ports; + if (!isFullyInitialized()) { + throw FbossError("Service is still initializing..."); + } + auto portsForFwUpgrade = getPortsRequiringOpticsFwUpgrade(); + auto tcvrsToUpgradeWLock = tcvrsForFwUpgrade.wlock(); + + for (const auto& [portName, _] : portsForFwUpgrade) { + if (portNameToModule_.find(portName) != portNameToModule_.end()) { + auto tcvrID = TransceiverID(portNameToModule_[portName]); + FW_LOG(INFO, tcvrID) << "Selected for FW upgrade"; + tcvrsToUpgradeWLock->insert(TransceiverID(portNameToModule_[portName])); + } + } + return portsForFwUpgrade; +} + bool TransceiverManager::firmwareUpgradeRequired(TransceiverID id) { auto lockedTransceivers = transceivers_.rlock(); auto tcvrIt = lockedTransceivers->find(id); @@ -1568,7 +1587,7 @@ void TransceiverManager::updateTransceiverPortStatus() noexcept { } void TransceiverManager::triggerFirmwareUpgradeEvents( - std::unordered_set& tcvrs) { + const std::unordered_set& tcvrs) { if (!FLAGS_firmware_upgrade_supported || tcvrs.empty()) { return; } @@ -1894,6 +1913,12 @@ void TransceiverManager::refreshStateMachines() { } } } + { + auto tcvrsToUpgradeWLock = tcvrsForFwUpgrade.wlock(); + triggerFirmwareUpgradeEvents(*tcvrsToUpgradeWLock); + tcvrsToUpgradeWLock->clear(); + } + if (!potentialTcvrsForFwUpgrade.empty()) { triggerFirmwareUpgradeEvents(potentialTcvrsForFwUpgrade); } diff --git a/fboss/qsfp_service/TransceiverManager.h b/fboss/qsfp_service/TransceiverManager.h index 07a435a768afc..cbf090edf576a 100644 --- a/fboss/qsfp_service/TransceiverManager.h +++ b/fboss/qsfp_service/TransceiverManager.h @@ -608,6 +608,8 @@ class TransceiverManager { std::map getPortsRequiringOpticsFwUpgrade() const; + std::map triggerAllOpticsFwUpgrade(); + protected: /* * Check to see if we can attempt a warm boot. @@ -803,7 +805,8 @@ class TransceiverManager { void triggerAgentConfigChangeEvent(); - void triggerFirmwareUpgradeEvents(std::unordered_set& tcvrs); + void triggerFirmwareUpgradeEvents( + const std::unordered_set& tcvrs); // Update the cached PortStatus of TransceiverToPortInfo using wedge_agent // getPortStatus() results @@ -978,6 +981,8 @@ class TransceiverManager { std::atomic exceededTimeLimitFwUpgradeCount_{0}; std::atomic maxTimeTakenForFwUpgrade_{0}; + folly::Synchronized> tcvrsForFwUpgrade; + friend class TransceiverStateMachineTest; }; } // namespace facebook::fboss diff --git a/fboss/qsfp_service/if/qsfp.thrift b/fboss/qsfp_service/if/qsfp.thrift index e2926d259b9e7..3a1519ecbe6d2 100644 --- a/fboss/qsfp_service/if/qsfp.thrift +++ b/fboss/qsfp_service/if/qsfp.thrift @@ -299,4 +299,9 @@ service QsfpService extends phy.FbossCommonPhyCtrl { string, transceiver.FirmwareUpgradeData > getPortsRequiringOpticsFwUpgrade() throws (1: fboss.FbossBaseError error); + + map< + string, + transceiver.FirmwareUpgradeData + > triggerAllOpticsFwUpgrade() throws (1: fboss.FbossBaseError error); } From 4b27f092a0c30913a64cb7f29cda762d133f9d56 Mon Sep 17 00:00:00 2001 From: Harshit Gulati Date: Tue, 8 Oct 2024 18:07:09 -0700 Subject: [PATCH 014/479] Add a new qsfp service run state to report an in progress upgrade Summary: Clients can rely on this status to check when upgrade is done Reviewed By: birdsoup Differential Revision: D63661243 Privacy Context Container: L1125642 fbshipit-source-id: c30d347ce99baf64986b71b73f082eb59c38a4e9 --- fboss/qsfp_service/TransceiverManager.cpp | 9 +++++++++ fboss/qsfp_service/TransceiverManager.h | 8 ++++++++ fboss/qsfp_service/if/transceiver.thrift | 1 + 3 files changed, 18 insertions(+) diff --git a/fboss/qsfp_service/TransceiverManager.cpp b/fboss/qsfp_service/TransceiverManager.cpp index 969e0c8e94aee..f71f68c768e6e 100644 --- a/fboss/qsfp_service/TransceiverManager.cpp +++ b/fboss/qsfp_service/TransceiverManager.cpp @@ -236,6 +236,9 @@ QsfpServiceRunState TransceiverManager::getRunState() const { if (isExiting()) { return QsfpServiceRunState::EXITING; } + if (isUpgradingFirmware()) { + return QsfpServiceRunState::UPGRADING_FIRMWARE; + } if (isFullyInitialized()) { return QsfpServiceRunState::ACTIVE; } @@ -445,6 +448,9 @@ TransceiverManager::triggerAllOpticsFwUpgrade() { if (!isFullyInitialized()) { throw FbossError("Service is still initializing..."); } + if (isUpgradingFirmware()) { + throw FbossError("Service is already upgrading firmware..."); + } auto portsForFwUpgrade = getPortsRequiringOpticsFwUpgrade(); auto tcvrsToUpgradeWLock = tcvrsForFwUpgrade.wlock(); @@ -1604,6 +1610,7 @@ void TransceiverManager::triggerFirmwareUpgradeEvents( } } if (!results.empty()) { + isUpgradingFirmware_ = true; executeStateUpdates(); heartbeatWatchdog_->pauseMonitoringHeartbeat(updateThreadHeartbeat_); waitForAllBlockingStateUpdateDone(results); @@ -1960,6 +1967,8 @@ void TransceiverManager::refreshStateMachines() { // Update the warmboot state if there is a change. setWarmBootState(); + isUpgradingFirmware_ = false; + XLOG(INFO) << "refreshStateMachines ended"; } diff --git a/fboss/qsfp_service/TransceiverManager.h b/fboss/qsfp_service/TransceiverManager.h index cbf090edf576a..a752676f75596 100644 --- a/fboss/qsfp_service/TransceiverManager.h +++ b/fboss/qsfp_service/TransceiverManager.h @@ -571,6 +571,10 @@ class TransceiverManager { return isExiting_; } + bool isUpgradingFirmware() const { + return isUpgradingFirmware_; + } + bool isFullyInitialized() const { return isFullyInitialized_; } @@ -879,6 +883,10 @@ class TransceiverManager { // If it is, we should not accept any state update std::atomic isExiting_{false}; + // A global flag to indicate whether the any optics firmware upgrade is in + // progress + std::atomic isUpgradingFirmware_{false}; + /* * Flag that indicates whether the service has been fully initialized. * Fully initialized = system, pim and phys initialized and atleast one diff --git a/fboss/qsfp_service/if/transceiver.thrift b/fboss/qsfp_service/if/transceiver.thrift index 07ae0748b2e09..228fa68e30724 100644 --- a/fboss/qsfp_service/if/transceiver.thrift +++ b/fboss/qsfp_service/if/transceiver.thrift @@ -20,6 +20,7 @@ enum QsfpServiceRunState { INITIALIZED = 1, ACTIVE = 2, EXITING = 3, + UPGRADING_FIRMWARE = 4, } struct Vendor { From f685c750dacba866f1f2c88248e1a05b77d0f0ae Mon Sep 17 00:00:00 2001 From: Ron He Date: Tue, 8 Oct 2024 19:11:45 -0700 Subject: [PATCH 015/479] Fix asic used in dsfNodeConfig Summary: Regression introduced in D63652918 - initially wanted to reuse `getHwAsicForAsicType`, but that's built to now have sys port range and other information. Reverting back to original behavior Reviewed By: shri-khare, nivinl Differential Revision: D64082089 fbshipit-source-id: fda6f5391cbb8090a4dc870a5305fca787082635 --- fboss/agent/test/utils/DsfConfigUtils.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/fboss/agent/test/utils/DsfConfigUtils.cpp b/fboss/agent/test/utils/DsfConfigUtils.cpp index aec3b451d2f21..ced65c5ac98f3 100644 --- a/fboss/agent/test/utils/DsfConfigUtils.cpp +++ b/fboss/agent/test/utils/DsfConfigUtils.cpp @@ -46,27 +46,33 @@ std::optional> addRemoteIntfNodeCfg( const auto& firstDsfNode = dsfNodes.begin()->second; CHECK(firstDsfNode.systemPortRange().has_value()); CHECK(firstDsfNode.nodeMac().has_value()); - const auto& asic = - getHwAsicForAsicType(*dsfNodes.cbegin()->second.asicType()); - int numCores = asic.getNumCores(); + auto asic = HwAsic::makeAsic( + *firstDsfNode.asicType(), + cfg::SwitchType::VOQ, + *firstDsfNode.switchId(), + 0, + *firstDsfNode.systemPortRange(), + folly::MacAddress(*firstDsfNode.nodeMac()), + std::nullopt); + int numCores = asic->getNumCores(); CHECK( !numRemoteNodes.has_value() || - numRemoteNodes.value() < getDsfNodeCount(asic)); + numRemoteNodes.value() < getDsfNodeCount(*asic)); int totalNodes = numRemoteNodes.has_value() ? numRemoteNodes.value() + curDsfNodes.size() - : getDsfNodeCount(asic); + : getDsfNodeCount(*asic); int remoteNodeStart = dsfNodes.rbegin()->first + numCores; int systemPortMin = - getPerNodeSysPorts(asic, dsfNodes.begin()->first) * numCores; + getPerNodeSysPorts(*asic, dsfNodes.begin()->first) * numCores; for (int remoteSwitchId = remoteNodeStart; remoteSwitchId < totalNodes * numCores; remoteSwitchId += numCores) { cfg::Range64 systemPortRange; systemPortRange.minimum() = systemPortMin; systemPortRange.maximum() = - systemPortMin + getPerNodeSysPorts(asic, remoteSwitchId) - 1; + systemPortMin + getPerNodeSysPorts(*asic, remoteSwitchId) - 1; auto remoteDsfNodeCfg = dsfNodeConfig( - asic, + *asic, SwitchID(remoteSwitchId), systemPortMin, *systemPortRange.maximum(), From c28d0fc976b9ed23a2ef92b5b24d56437f1c20c4 Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Tue, 8 Oct 2024 20:26:25 -0700 Subject: [PATCH 016/479] Allow local builds (#256) Summary: Pull Request resolved: https://github.com/facebook/fboss/pull/256 Adds a flag for the capability to rebuild OSS binaries with local uncommitted changes. Reviewed By: srikrishnagopu Differential Revision: D63999873 fbshipit-source-id: 833f768879c4072c4a47e4c2e43cf93dee302934 --- fboss/oss/docker/Dockerfile | 3 +- fboss/oss/scripts/docker-build.py | 28 +++++++++++++++++-- .../scripts/github_actions/docker-unittest.py | 12 +++++++- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/fboss/oss/docker/Dockerfile b/fboss/oss/docker/Dockerfile index 5eaa57d9c3d1c..28adddbe8b716 100644 --- a/fboss/oss/docker/Dockerfile +++ b/fboss/oss/docker/Dockerfile @@ -5,7 +5,8 @@ RUN dnf install git sudo lsof -y # Use /var/FBOSS as the set location to clone the git repository and store the outputs of the build. WORKDIR /var/FBOSS/ -RUN git clone https://github.com/facebook/fboss.git +RUN mkdir -p /var/FBOSS/fboss +COPY . fboss WORKDIR fboss RUN rm -rf build/deps/github_hashes/ diff --git a/fboss/oss/scripts/docker-build.py b/fboss/oss/scripts/docker-build.py index d18267d735ed1..dc7a98adb74d0 100755 --- a/fboss/oss/scripts/docker-build.py +++ b/fboss/oss/scripts/docker-build.py @@ -17,13 +17,14 @@ OPT_ARG_NO_DOCKER_OUTPUT = "--no-docker-output" OPT_ARG_NO_SYSTEM_DEPS = "--no-system-deps" OPT_ARG_ADD_BUILD_ENV_VAR = "--env-var" +OPT_ARG_LOCAL = "--local" FBOSS_IMAGE_NAME = "fboss_image" FBOSS_CONTAINER_NAME = "FBOSS_BUILD_CONTAINER" CONTAINER_SCRATCH_PATH = "/var/FBOSS/tmp_bld_dir" -def get_linux_type() -> tuple[str | None, str | None, str | None]: +def get_linux_type() -> tuple[Optional[str], Optional[str], Optional[str]]: try: with open("/etc/os-release") as f: data = f.read() @@ -138,6 +139,13 @@ def parse_args(): "This is particularly useful as some CMake targets are hidden behind flags, e.g. BUILD_SAI_FAKE=1" ), ) + parser.add_argument( + OPT_ARG_LOCAL, + required=False, + help="Compiles using the local clone of the FBOSS git repository. By default, a separate clone of the repository with the head commit is used.", + default=False, + action="store_true", + ) return parser.parse_args() @@ -162,8 +170,18 @@ def build_docker_image(docker_dir_path: str): f"Attempting to build docker image from {docker_dir_path}/Dockerfile. You can run `sudo tail -f {log_path}` in order to follow along." ) with os.fdopen(fd, "w") as output: + dockerfile_path = os.path.join(docker_dir_path, "Dockerfile") cp = subprocess.run( - ["sudo", "docker", "build", docker_dir_path, "-t", FBOSS_IMAGE_NAME], + [ + "sudo", + "docker", + "build", + ".", + "-t", + FBOSS_IMAGE_NAME, + "-f", + dockerfile_path, + ], stdout=output, stderr=subprocess.STDOUT, ) @@ -175,10 +193,11 @@ def build_docker_image(docker_dir_path: str): def run_fboss_build( scratch_path: str, - target: str | None, + target: Optional[str], docker_output: bool, use_system_deps: bool, env_vars: list[str], + use_local: bool, ): cmd_args = ["sudo", "docker", "run"] # Add build environment variables, if any. @@ -216,6 +235,8 @@ def run_fboss_build( if target is not None: build_cmd.append("--cmake-target") build_cmd.append(target) + if use_local: + build_cmd.extend(["--src-dir", "."]) build_cmd.append("fboss") cmd_args.extend(build_cmd) build_cp = subprocess.run(cmd_args) @@ -267,6 +288,7 @@ def main(): args.docker_output, args.use_system_deps, args.env_vars, + args.local, ) cleanup_fboss_build_container() diff --git a/fboss/oss/scripts/github_actions/docker-unittest.py b/fboss/oss/scripts/github_actions/docker-unittest.py index 7a7d201c7a06c..0e3ce4f733723 100755 --- a/fboss/oss/scripts/github_actions/docker-unittest.py +++ b/fboss/oss/scripts/github_actions/docker-unittest.py @@ -35,8 +35,18 @@ def build_docker_image(docker_dir_path: str): f"Attempting to build docker image from {docker_dir_path}/Dockerfile. You can run `sudo tail -f {log_path}` in order to follow along." ) with os.fdopen(fd, "w") as output: + dockerfile_path = os.path.join(docker_dir_path, "Dockerfile") cp = subprocess.run( - ["sudo", "docker", "build", docker_dir_path, "-t", FBOSS_IMAGE_NAME], + [ + "sudo", + "docker", + "build", + ".", + "-t", + FBOSS_IMAGE_NAME, + "-f", + dockerfile_path, + ], stdout=output, stderr=subprocess.STDOUT, ) From b53b0bc02b4acfd61fafc3b599f1e2ec70c56485 Mon Sep 17 00:00:00 2001 From: Ron He Date: Tue, 8 Oct 2024 20:51:23 -0700 Subject: [PATCH 017/479] FbossEventBase to accept event base name Summary: As titled. Also log before actually scheduling the work to event base. Reviewed By: jasmeetbagga Differential Revision: D64027025 fbshipit-source-id: 35e09723817784a8c35ce48fb6543868c61b2bf2 --- fboss/agent/FbossEventBase.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/fboss/agent/FbossEventBase.h b/fboss/agent/FbossEventBase.h index 877624ed08862..9d392de68bf36 100644 --- a/fboss/agent/FbossEventBase.h +++ b/fboss/agent/FbossEventBase.h @@ -11,16 +11,18 @@ #include #include +#include namespace facebook::fboss { class FbossEventBase : public folly::EventBase { public: void runInFbossEventBaseThread(Func fn) noexcept { - runInEventBaseThread(std::move(fn)); if (!isRunning()) { - XLOG(ERR) << "Cannot enqueue callback to non-running FbossEventBase."; + XLOG(ERR) << "runInFbossEventBaseThread to non-running " << eventBaseName_ + << " FbossEventBase."; } + runInEventBaseThread(std::move(fn)); } template @@ -29,18 +31,24 @@ class FbossEventBase : public folly::EventBase { } void runInFbossEventBaseThreadAndWait(Func fn) noexcept { - runInEventBaseThreadAndWait(std::move(fn)); if (!isRunning()) { - XLOG(ERR) << "Cannot enqueue callback to non-running FbossEventBase."; + XLOG(ERR) << "runInFbossEventBaseThreadAndWait for non-running " + << eventBaseName_ << " FbossEventBase."; } + runInEventBaseThreadAndWait(std::move(fn)); } void runImmediatelyOrRunInFbossEventBaseThreadAndWait(Func fn) noexcept { - runImmediatelyOrRunInEventBaseThreadAndWait(std::move(fn)); if (!isRunning()) { - XLOG(ERR) << "Cannot enqueue callback to non-running FbossEventBase."; + XLOG(ERR) + << "runImmediatelyOrRunInFbossEventBaseThreadAndWait for non-running " + << eventBaseName_ << " FbossEventBase."; } + runImmediatelyOrRunInEventBaseThreadAndWait(std::move(fn)); } + + private: + std::string eventBaseName_; }; } // namespace facebook::fboss From c18f32148f6d0a4227f694cbdd0c60cae5838f16 Mon Sep 17 00:00:00 2001 From: Ron He Date: Tue, 8 Oct 2024 20:51:23 -0700 Subject: [PATCH 018/479] Initialize FbossEventBase with name Summary: As titled. Mandatory name assignment when creating FbossEventBase. This would help us to debug 1) Enqueueing into non-running event base, and 2) Race condition when we tear down switch and event base. Reviewed By: jasmeetbagga Differential Revision: D64053469 Privacy Context Container: L1125642 fbshipit-source-id: e74d8c7ce25c71f21f9479b48127188637ce31bd --- fboss/agent/FbossEventBase.h | 2 ++ fboss/agent/HwSwitchHandler.h | 2 +- fboss/agent/PlatformPort.cpp | 2 -- fboss/agent/SwAgentInitializer.cpp | 2 +- fboss/agent/SwSwitch.h | 13 +++++++------ fboss/agent/hw/bcm/BcmSwitch.h | 2 +- fboss/agent/hw/bcm/tests/BUCK | 16 ++++++++-------- fboss/agent/hw/sai/diag/DiagShellClient.cpp | 4 ++-- fboss/agent/hw/sai/hw_test/SaiSwitchEnsemble.cpp | 3 ++- fboss/agent/hw/sai/switch/SaiSwitch.h | 13 ++++++++----- fboss/agent/hw/test/BUCK | 2 -- .../agent/hw/test/HwTestLearningUpdateObserver.h | 2 +- fboss/agent/rib/RoutingInformationBase.h | 2 +- fboss/agent/test/LacpTest.cpp | 4 ++-- 14 files changed, 36 insertions(+), 33 deletions(-) diff --git a/fboss/agent/FbossEventBase.h b/fboss/agent/FbossEventBase.h index 9d392de68bf36..8f8059259c56d 100644 --- a/fboss/agent/FbossEventBase.h +++ b/fboss/agent/FbossEventBase.h @@ -17,6 +17,8 @@ namespace facebook::fboss { class FbossEventBase : public folly::EventBase { public: + explicit FbossEventBase(const std::string& name) : eventBaseName_(name) {} + void runInFbossEventBaseThread(Func fn) noexcept { if (!isRunning()) { XLOG(ERR) << "runInFbossEventBaseThread to non-running " << eventBaseName_ diff --git a/fboss/agent/HwSwitchHandler.h b/fboss/agent/HwSwitchHandler.h index acb0b1be7a18c..af33f9babc947 100644 --- a/fboss/agent/HwSwitchHandler.h +++ b/fboss/agent/HwSwitchHandler.h @@ -131,7 +131,7 @@ class HwSwitchHandler { const SwitchID switchId_; const cfg::SwitchInfo info_; - FbossEventBase hwSwitchManagerEvb_; + FbossEventBase hwSwitchManagerEvb_{"HwSwitchManagerEvb"}; std::unique_ptr hwSwitchManagerThread_; const OperDeltaFilter operDeltaFilter_; }; diff --git a/fboss/agent/PlatformPort.cpp b/fboss/agent/PlatformPort.cpp index 1f2d48c974b80..e435ea68cfaf3 100644 --- a/fboss/agent/PlatformPort.cpp +++ b/fboss/agent/PlatformPort.cpp @@ -115,7 +115,6 @@ PlatformPort::getTransceiverPinConfigs(cfg::PortProfileID profileID) const { phy::PortPinConfig PlatformPort::getPortXphyPinConfig( cfg::PortProfileID profileID) const { if (platform_->needTransceiverInfo()) { - FbossEventBase evb; auto transceiverSpec = getTransceiverInfo(); if (transceiverSpec) { return platform_->getPlatformMapping()->getPortXphyPinConfig( @@ -249,7 +248,6 @@ const phy::PortProfileConfig PlatformPort::getPortProfileConfig( const std::optional PlatformPort::getPortProfileConfigIf(cfg::PortProfileID profileID) const { if (platform_->needTransceiverInfo()) { - FbossEventBase evb; auto transceiverSpec = getTransceiverInfo(); if (transceiverSpec) { return platform_->getPortProfileConfig(PlatformPortProfileConfigMatcher( diff --git a/fboss/agent/SwAgentInitializer.cpp b/fboss/agent/SwAgentInitializer.cpp index ed57e2a4ae957..fc0819affbe20 100644 --- a/fboss/agent/SwAgentInitializer.cpp +++ b/fboss/agent/SwAgentInitializer.cpp @@ -229,7 +229,7 @@ int SwAgentInitializer::initAgent( swHandler->setIdleTimeout(FLAGS_thrift_idle_timeout); auto handlers = getThrifthandlers(); handlers.push_back(swHandler); - eventBase_ = new FbossEventBase(); + eventBase_ = new FbossEventBase("SwAgentInitializerInitAgentEventBase"); std::vector ports = {FLAGS_port, FLAGS_migrated_port}; // serve on hw agent port in mono so that clients can access // hw agent apis on mono as well diff --git a/fboss/agent/SwSwitch.h b/fboss/agent/SwSwitch.h index ebe0a7adbce4a..10a656822b1a9 100644 --- a/fboss/agent/SwSwitch.h +++ b/fboss/agent/SwSwitch.h @@ -1189,7 +1189,7 @@ class SwSwitch : public HwSwitchCallback { * A thread for performing various background tasks. */ std::unique_ptr backgroundThread_; - FbossEventBase backgroundEventBase_; + FbossEventBase backgroundEventBase_{"SwSwitchBackgroundEventBase"}; std::shared_ptr bgThreadHeartbeat_; /* @@ -1198,34 +1198,35 @@ class SwSwitch : public HwSwitchCallback { * ASIC front panel ports */ std::unique_ptr packetTxThread_; - FbossEventBase packetTxEventBase_; + FbossEventBase packetTxEventBase_{"SwSwitchPacketTxEventBase"}; std::shared_ptr packetTxThreadHeartbeat_; /* * A thread for sending packets to the distribution process */ std::shared_ptr pcapDistributionThread_; - FbossEventBase pcapDistributionEventBase_; + FbossEventBase pcapDistributionEventBase_{ + "SwSwitchPcapDistributionEventBase"}; /* * A thread for processing SwitchState updates. */ std::unique_ptr updateThread_; - FbossEventBase updateEventBase_; + FbossEventBase updateEventBase_{"SwSwitchUpdateEventBase"}; std::shared_ptr updThreadHeartbeat_; /* * A thread dedicated to LACP processing. */ std::unique_ptr lacpThread_; - FbossEventBase lacpEventBase_; + FbossEventBase lacpEventBase_{"SwSwitchLacpEventBase"}; std::shared_ptr lacpThreadHeartbeat_; /* * A thread dedicated to Arp and Ndp cache entry processing. */ std::unique_ptr neighborCacheThread_; - FbossEventBase neighborCacheEventBase_; + FbossEventBase neighborCacheEventBase_{"SwSwitchNeighborCacheEventBase"}; std::shared_ptr neighborCacheThreadHeartbeat_; /* diff --git a/fboss/agent/hw/bcm/BcmSwitch.h b/fboss/agent/hw/bcm/BcmSwitch.h index 0213a0e75c354..fb1a8b64e9ac3 100644 --- a/fboss/agent/hw/bcm/BcmSwitch.h +++ b/fboss/agent/hw/bcm/BcmSwitch.h @@ -1184,7 +1184,7 @@ class BcmSwitch : public BcmSwitchIf { std::unique_ptr bstStatsMgr_; std::unique_ptr linkScanBottomHalfThread_; - FbossEventBase linkScanBottomHalfEventBase_; + FbossEventBase linkScanBottomHalfEventBase_{"BcmLinkScanBottomHalfEventBase"}; std::unique_ptr switchSettings_; diff --git a/fboss/agent/hw/bcm/tests/BUCK b/fboss/agent/hw/bcm/tests/BUCK index 651141fe098d2..ce255237e2b47 100644 --- a/fboss/agent/hw/bcm/tests/BUCK +++ b/fboss/agent/hw/bcm/tests/BUCK @@ -617,13 +617,13 @@ cpp_library( headers = [ ], exported_deps = [ - "fbcode//fboss/agent:hw_switch", - "fbcode//fboss/agent/hw/bcm:bcm", - "fbcode//fboss/agent/hw/bcm:bcmaddress_fb_convertors", - "fbcode//fboss/agent/hw/bcm/tests:bcm_ecmp_utils", - "fbcode//fboss/agent/hw/switch_asics:switch_asics", - "fbcode//fboss/agent/hw/test:hw_test_ecmp_utils", - "fbcode//fboss/agent/hw/test:hw_test_thrift_handler_h", - "fbcode//fboss/agent/test/utils:acl_test_utils", + "//fboss/agent:hw_switch", + "//fboss/agent/hw/bcm:bcm", + "//fboss/agent/hw/bcm:bcmaddress_fb_convertors", + "//fboss/agent/hw/bcm/tests:bcm_ecmp_utils", # @manual + "//fboss/agent/hw/switch_asics:switch_asics", + "//fboss/agent/hw/test:hw_test_ecmp_utils", + "//fboss/agent/hw/test:hw_test_thrift_handler_h", + "//fboss/agent/test/utils:acl_test_utils", ], ) diff --git a/fboss/agent/hw/sai/diag/DiagShellClient.cpp b/fboss/agent/hw/sai/diag/DiagShellClient.cpp index 4d2fe67a91441..ff4443e972b89 100644 --- a/fboss/agent/hw/sai/diag/DiagShellClient.cpp +++ b/fboss/agent/hw/sai/diag/DiagShellClient.cpp @@ -177,8 +177,8 @@ class SignalHandler : public AsyncSignalHandler { int main(int argc, char* argv[]) { folly::init(&argc, &argv); - facebook::fboss::FbossEventBase streamEvb; - facebook::fboss::FbossEventBase stdinEvb; + facebook::fboss::FbossEventBase streamEvb{"DiagShellClientStreamEventBase"}; + facebook::fboss::FbossEventBase stdinEvb{"DiagShellClientStdinEventBase"}; bool stopThread = false; // Converts the host to IP address if a hostname is given diff --git a/fboss/agent/hw/sai/hw_test/SaiSwitchEnsemble.cpp b/fboss/agent/hw/sai/hw_test/SaiSwitchEnsemble.cpp index 22aaa707c9e36..192e01a539469 100644 --- a/fboss/agent/hw/sai/hw_test/SaiSwitchEnsemble.cpp +++ b/fboss/agent/hw/sai/hw_test/SaiSwitchEnsemble.cpp @@ -78,7 +78,8 @@ SaiSwitchEnsemble::SaiSwitchEnsemble( std::unique_ptr SaiSwitchEnsemble::createThriftThread( const SaiSwitch* hwSwitch) { return std::make_unique([hwSwitch] { - FbossEventBase* eventBase = new FbossEventBase(); + FbossEventBase* eventBase = + new FbossEventBase("SaiSwitchEnsembleSignalHandler"); auto handler = std::make_shared(hwSwitch); auto server = setupThriftServer( *eventBase, handler, {FLAGS_thrift_port}, true /* setupSSL*/); diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.h b/fboss/agent/hw/sai/switch/SaiSwitch.h index 28b40bbb22c6c..9b522dc976f2d 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.h +++ b/fboss/agent/hw/sai/switch/SaiSwitch.h @@ -589,15 +589,18 @@ class SaiSwitch : public HwSwitch { SwitchSaiId saiSwitchId_; std::unique_ptr linkStateBottomHalfThread_; - FbossEventBase linkStateBottomHalfEventBase_; + FbossEventBase linkStateBottomHalfEventBase_{"LinkStateBottomHalfEventBase"}; std::unique_ptr fdbEventBottomHalfThread_; - FbossEventBase fdbEventBottomHalfEventBase_; + FbossEventBase fdbEventBottomHalfEventBase_{"FdbEventBottomHalfEventBase"}; std::unique_ptr txReadyStatusChangeBottomHalfThread_; - FbossEventBase txReadyStatusChangeBottomHalfEventBase_; + FbossEventBase txReadyStatusChangeBottomHalfEventBase_{ + "TxReadyStatusChangeBottomHalfEventBase"}; std::unique_ptr linkConnectivityChangeBottomHalfThread_; - FbossEventBase linkConnectivityChangeBottomHalfEventBase_; + FbossEventBase linkConnectivityChangeBottomHalfEventBase_{ + "LinkConnectivityChangeBottomHalfEventBase"}; std::unique_ptr switchReachabilityChangeBottomHalfThread_; - FbossEventBase switchReachabilityChangeBottomHalfEventBase_; + FbossEventBase switchReachabilityChangeBottomHalfEventBase_{ + "SwitchReachabilityChangeBottomHalfEventBase"}; HwResourceStats hwResourceStats_; std::atomic runState_{SwitchRunState::UNINITIALIZED}; diff --git a/fboss/agent/hw/test/BUCK b/fboss/agent/hw/test/BUCK index 7d33b26be1659..731305b167aed 100644 --- a/fboss/agent/hw/test/BUCK +++ b/fboss/agent/hw/test/BUCK @@ -467,7 +467,6 @@ cpp_library( "//fboss/agent/test/utils:port_stats_test_utils", "//fboss/agent/test/utils:queue_per_host_test_utils", "//fboss/agent/test/utils:stats_test_utils", - "//fboss/agent/test/utils:traffic_policy_utils", "//fboss/agent/test/utils:trap_packet_utils", "//fboss/lib:common_utils", "//fboss/lib/phy:phy_utils", @@ -550,7 +549,6 @@ cpp_library( "//fboss/agent/test/utils:port_stats_test_utils", "//fboss/agent/test/utils:queue_per_host_test_utils", "//fboss/agent/test/utils:stats_test_utils", - "//fboss/agent/test/utils:traffic_policy_utils", "//fboss/lib:common_utils", "//fboss/lib/phy:phy_utils", "//folly:file_util", diff --git a/fboss/agent/hw/test/HwTestLearningUpdateObserver.h b/fboss/agent/hw/test/HwTestLearningUpdateObserver.h index 938536349bd6e..5444e8fd29096 100644 --- a/fboss/agent/hw/test/HwTestLearningUpdateObserver.h +++ b/fboss/agent/hw/test/HwTestLearningUpdateObserver.h @@ -54,7 +54,7 @@ class HwTestLearningUpdateObserver std::vector> data_; std::unique_ptr applyStateUpdateThread_; - FbossEventBase applyStateUpdateEventBase_; + FbossEventBase applyStateUpdateEventBase_{"ApplyStateUpdateEventBase"}; }; class HwTestLearningUpdateAutoObserver : public HwTestLearningUpdateObserver { diff --git a/fboss/agent/rib/RoutingInformationBase.h b/fboss/agent/rib/RoutingInformationBase.h index 95e6db17a6a88..4e8c6e4cf7f29 100644 --- a/fboss/agent/rib/RoutingInformationBase.h +++ b/fboss/agent/rib/RoutingInformationBase.h @@ -381,7 +381,7 @@ class RoutingInformationBase { void* cookie); std::unique_ptr ribUpdateThread_; - FbossEventBase ribUpdateEventBase_; + FbossEventBase ribUpdateEventBase_{"RibUpdateEventBase"}; RibRouteTables ribTables_; }; diff --git a/fboss/agent/test/LacpTest.cpp b/fboss/agent/test/LacpTest.cpp index a74cf489adb7b..77361fadeb451 100644 --- a/fboss/agent/test/LacpTest.cpp +++ b/fboss/agent/test/LacpTest.cpp @@ -43,7 +43,7 @@ namespace { class LacpTest : public ::testing::Test { protected: - LacpTest() : lacpEvb_() {} + LacpTest() : lacpEvb_("LacpEventBase") {} void SetUp() override { lacpThread_.reset(new std::thread([this] { @@ -65,7 +65,7 @@ class LacpTest : public ::testing::Test { } private: - FbossEventBase lacpEvb_; + FbossEventBase lacpEvb_{"LacpEventBase"}; std::unique_ptr lacpThread_{nullptr}; }; From f4871862d5f98c56d45ab6de0780f123ca5f8675 Mon Sep 17 00:00:00 2001 From: genkzgnluxbjeyb Date: Wed, 9 Oct 2024 01:43:11 -0700 Subject: [PATCH 019/479] fboss_qsfp_unsupported_tests_sync Differential Revision: D64092695 fbshipit-source-id: 5694b1776c74c52844cd3d9809d1aef81dd868ea --- .../fboss_qsfp_unsupported_tests.materialized_JSON | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fboss/oss/qsfp_unsupported_tests/fboss_qsfp_unsupported_tests.materialized_JSON b/fboss/oss/qsfp_unsupported_tests/fboss_qsfp_unsupported_tests.materialized_JSON index 8f8b4ffd9e4c0..81d7cfe2026dd 100644 --- a/fboss/oss/qsfp_unsupported_tests/fboss_qsfp_unsupported_tests.materialized_JSON +++ b/fboss/oss/qsfp_unsupported_tests/fboss_qsfp_unsupported_tests.materialized_JSON @@ -4895,9 +4895,6 @@ { "test_name_regex": "HwTest_PROFILE_100G_4_NRZ_RS528_COPPER.TestProfile$" }, - { - "test_name_regex": "HwTest_PROFILE_100G_4_NRZ_RS528_OPTICAL.TestProfile$" - }, { "test_name_regex": "HwTest_PROFILE_200G_4_PAM4_RS544X2N_COPPER.TestProfile$" }, @@ -5068,9 +5065,6 @@ { "test_name_regex": "HwTest_PROFILE_100G_4_NRZ_RS528_COPPER.TestProfile$" }, - { - "test_name_regex": "HwTest_PROFILE_100G_4_NRZ_RS528_OPTICAL.TestProfile$" - }, { "test_name_regex": "HwTest_PROFILE_200G_4_PAM4_RS544X2N_COPPER.TestProfile$" }, From 67ee9da12ef7be08b3930826d4664b6e231cc235 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 9 Oct 2024 09:19:18 -0700 Subject: [PATCH 020/479] Start programming LLFC values provided by vendor on FE13 switches Summary: As titled Reviewed By: zechengh09 Differential Revision: D64015445 fbshipit-source-id: 7de80c41f2dd6b6f0bc035e95a7b0cdc51965282 --- fboss/agent/platforms/sai/SaiPlatform.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index 3fe6789fcc2a0..22ffa618e938b 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -590,6 +590,16 @@ SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes( std::optional< SaiSwitchTraits::Attributes::FabricLinkLayerFlowControlThreshold> fabricLLFC; +#if defined(BRCM_SAI_SDK_DNX) && defined(BRCM_SAI_SDK_GTE_12_0) + if (getAsic()->getSwitchType() == cfg::SwitchType::FABRIC && + getAsic()->getFabricNodeRole() == HwAsic::FabricNodeRole::DUAL_STAGE_L1) { + CHECK(getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_RAMON3) + << " LLFC threshold values for no R3 chips in DUAL_STAGE_L1 role needs to figured out"; + // Vendor suggested valie + constexpr uint32_t kRamon3LlfcThreshold{800}; + fabricLLFC = std::vector({kRamon3LlfcThreshold}); + } +#endif return { initSwitch, From 50d4ec8a31fa95c3e47a26dd833d428990b2a521 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 9 Oct 2024 09:19:18 -0700 Subject: [PATCH 021/479] Add isSdsw API to AgentNetWhoAmI Summary: As titled Reviewed By: shri-khare Differential Revision: D64092061 fbshipit-source-id: af5d862793aa169c57a91cb75a1209769b39ff7f --- fboss/agent/AgentNetWhoAmI.h | 1 + fboss/agent/oss/AgentNetWhoAmI.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/fboss/agent/AgentNetWhoAmI.h b/fboss/agent/AgentNetWhoAmI.h index f913c6f39c6b8..9abf3920a2e65 100644 --- a/fboss/agent/AgentNetWhoAmI.h +++ b/fboss/agent/AgentNetWhoAmI.h @@ -18,6 +18,7 @@ class AgentNetWhoAmI { virtual bool isBcmVoqPlatform() const; virtual bool isCiscoMorgan800ccPlatform() const; virtual bool isFdsw() const; + virtual bool isSdsw() const; virtual bool isNotDrainable() const; virtual bool hasRoutingProtocol() const; virtual bool hasBgpRoutingProtocol() const; diff --git a/fboss/agent/oss/AgentNetWhoAmI.cpp b/fboss/agent/oss/AgentNetWhoAmI.cpp index 599573c04328a..266c388727d96 100644 --- a/fboss/agent/oss/AgentNetWhoAmI.cpp +++ b/fboss/agent/oss/AgentNetWhoAmI.cpp @@ -32,6 +32,10 @@ bool AgentNetWhoAmI::isFdsw() const { return false; } +bool AgentNetWhoAmI::isSdsw() const { + return false; +} + bool AgentNetWhoAmI::hasRoutingProtocol() const { return false; } From be644e68d247c1e1886ddaec4caca4dc5001c962 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Wed, 9 Oct 2024 09:31:11 -0700 Subject: [PATCH 022/479] Updating submodules Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/2601d52c2afb9b72194585f007f8d270390a0ce6 https://github.com/facebook/fb303/commit/3f9d44501374fcd39600f4fc641fc041a561b579 https://github.com/facebook/fbthrift/commit/6edd883bee237a2e726e047f8ce88c8f69775807 https://github.com/facebook/folly/commit/02547bfd861ab21a87cd5b6a2da4ceb2ac7012d7 https://github.com/facebook/mvfst/commit/28748bfad2bce7a5280bd404d1e6fc17e012347d https://github.com/facebook/proxygen/commit/88cb8afcf0bcaaa7998b4874ed72f1c1ddae2d6a https://github.com/facebook/wangle/commit/8628da085e376891df611eec0e61b795b9676056 https://github.com/facebookexperimental/edencommon/commit/523a187b11816d0c954e19be9ffd42fe69193ad8 https://github.com/facebookexperimental/rust-shed/commit/8c2f0368e73afe67eaca5ce80611da760800da25 https://github.com/facebookincubator/fizz/commit/ba36ee510c7afe3d290bb2dfa2de1e1c165d1dea Reviewed By: ckwalsh fbshipit-source-id: 78d506d96034573bac955b61e1b1e735363ea98b --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 863bdc3d4d107..e26386f06e7e9 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 591b7e0edd792794c9521e1d77c8e550e70bd200 +Subproject commit 3f9d44501374fcd39600f4fc641fc041a561b579 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index af7cd250e8691..c50c71adbf07d 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 7f6edca32fd8ab6361f5ecf9be42d4e64b783098 +Subproject commit 6edd883bee237a2e726e047f8ce88c8f69775807 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 29fdd1b876a8f..e70edc477b00c 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit c9acd68bad493f6829870e5cc84c117a0e0dd65d +Subproject commit 02547bfd861ab21a87cd5b6a2da4ceb2ac7012d7 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 8c6e94bf7fa04..7112cefa075f6 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit c7553866812b345e42d7a8282074ac09f84afe02 +Subproject commit 8628da085e376891df611eec0e61b795b9676056 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index c1e3a0bafe875..ffd86e041b600 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 2d4c7d0f21b2111635fec92aca1f4d5476bdc502 +Subproject commit ba36ee510c7afe3d290bb2dfa2de1e1c165d1dea From 69af45b9763beff5ba4e0b7a628a489376f0ab11 Mon Sep 17 00:00:00 2001 From: Harshit Gulati Date: Wed, 9 Oct 2024 09:34:34 -0700 Subject: [PATCH 023/479] Sync Tahan platform mapping from cfgr Summary: Syncs the serdes settings changes from D64085726 Reviewed By: srikrishnagopu Differential Revision: D64090566 fbshipit-source-id: 89525c9a63d1562383dd25407e5a57f444c97dfa --- .../tahan800bc/Tahan800bcPlatformMapping.cpp | 2115 +++++++++-------- 1 file changed, 1122 insertions(+), 993 deletions(-) diff --git a/fboss/agent/platforms/common/tahan800bc/Tahan800bcPlatformMapping.cpp b/fboss/agent/platforms/common/tahan800bc/Tahan800bcPlatformMapping.cpp index 3f5a89079d025..88fb034b3ce2a 100644 --- a/fboss/agent/platforms/common/tahan800bc/Tahan800bcPlatformMapping.cpp +++ b/fboss/agent/platforms/common/tahan800bc/Tahan800bcPlatformMapping.cpp @@ -117,7 +117,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -448,7 +449,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -648,7 +650,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -979,7 +982,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -1179,7 +1183,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -1510,7 +1515,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -1710,7 +1716,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -2041,7 +2048,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -2241,7 +2249,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -2572,7 +2581,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -2772,7 +2782,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -3103,7 +3114,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -3303,7 +3315,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -3634,7 +3647,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -3834,7 +3848,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -4165,7 +4180,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -4365,7 +4381,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -4696,7 +4713,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -4896,7 +4914,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -5227,7 +5246,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -5427,7 +5447,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -5758,7 +5779,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -5958,7 +5980,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -6289,7 +6312,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -6489,7 +6513,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -6503,7 +6528,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6518,7 +6543,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6533,7 +6558,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6548,7 +6573,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6598,7 +6623,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6613,7 +6638,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6628,7 +6653,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6643,7 +6668,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6658,7 +6683,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6673,7 +6698,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6688,7 +6713,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6703,7 +6728,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6820,7 +6845,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -6834,7 +6860,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6849,7 +6875,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6864,7 +6890,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6879,7 +6905,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7020,7 +7046,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -7034,7 +7061,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7049,7 +7076,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7064,7 +7091,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7079,7 +7106,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7129,7 +7156,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7144,7 +7171,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7159,7 +7186,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7174,7 +7201,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7189,7 +7216,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7204,7 +7231,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7219,7 +7246,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7234,7 +7261,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7351,7 +7378,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -7365,7 +7393,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7380,7 +7408,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7395,7 +7423,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7410,7 +7438,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7551,7 +7579,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -7565,7 +7594,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7580,7 +7609,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7595,7 +7624,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7610,7 +7639,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7660,7 +7689,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7675,7 +7704,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7690,7 +7719,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7705,7 +7734,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7720,7 +7749,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7735,7 +7764,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7750,7 +7779,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7765,7 +7794,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7882,7 +7911,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -7896,7 +7926,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7911,7 +7941,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7926,7 +7956,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7941,7 +7971,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8082,7 +8112,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -8096,7 +8127,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8111,7 +8142,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8126,7 +8157,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8141,7 +8172,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8191,7 +8222,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8206,7 +8237,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8221,7 +8252,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8236,7 +8267,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8251,7 +8282,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8266,7 +8297,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8281,7 +8312,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8296,7 +8327,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8413,7 +8444,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -8427,7 +8459,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8442,7 +8474,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8457,7 +8489,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8472,7 +8504,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8613,7 +8645,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -8627,7 +8660,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8642,7 +8675,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8657,7 +8690,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8672,7 +8705,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8722,7 +8755,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8737,7 +8770,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8752,7 +8785,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8767,7 +8800,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8782,7 +8815,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8797,7 +8830,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8812,7 +8845,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8827,7 +8860,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8944,7 +8977,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -8958,7 +8992,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8973,7 +9007,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8988,7 +9022,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9003,7 +9037,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9144,7 +9178,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -9158,7 +9193,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9173,7 +9208,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9188,7 +9223,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9203,7 +9238,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9253,7 +9288,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9268,7 +9303,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9283,7 +9318,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9298,7 +9333,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9313,7 +9348,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9328,7 +9363,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9343,7 +9378,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9358,7 +9393,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9475,7 +9510,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -9489,7 +9525,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9504,7 +9540,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9519,7 +9555,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9534,7 +9570,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9675,7 +9711,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -9689,7 +9726,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9704,7 +9741,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9719,7 +9756,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9734,7 +9771,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9784,7 +9821,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9799,7 +9836,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9814,7 +9851,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9829,7 +9866,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9844,7 +9881,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9859,7 +9896,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9874,7 +9911,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9889,7 +9926,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10006,7 +10043,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -10020,7 +10058,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10035,7 +10073,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10050,7 +10088,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10065,7 +10103,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10206,7 +10244,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -10220,7 +10259,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10235,7 +10274,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10250,7 +10289,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10265,7 +10304,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10315,7 +10354,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10330,7 +10369,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10345,7 +10384,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10360,7 +10399,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10375,7 +10414,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10390,7 +10429,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10405,7 +10444,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10420,7 +10459,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10537,7 +10576,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -10551,7 +10591,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10566,7 +10606,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10581,7 +10621,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10596,7 +10636,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10737,7 +10777,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -11068,7 +11109,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -11268,7 +11310,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -11599,7 +11642,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -11799,7 +11843,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -12130,7 +12175,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -12330,7 +12376,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -12661,7 +12708,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -12861,7 +12909,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -13192,7 +13241,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -13392,7 +13442,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -13723,7 +13774,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -13923,7 +13975,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -14254,7 +14307,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -14454,7 +14508,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -14785,7 +14840,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -14985,7 +15041,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -15316,7 +15373,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -15516,7 +15574,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -15847,7 +15906,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -16047,7 +16107,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -16378,7 +16439,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -16578,7 +16640,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -16909,7 +16972,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -17061,7 +17125,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 4 + "portType": 4, + "scope": 0 }, "supportedProfiles": { "23": { @@ -17071,24 +17136,56 @@ constexpr auto kJsonPlatformMappingStr = R"( "id": { "chip": "NPU-TH5_NIF-slot1/chip1/core64", "lane": 0 + }, + "tx": { + "pre": 5, + "pre2": 0, + "main": 31, + "post": 0, + "post2": 0, + "post3": 0 } }, { "id": { "chip": "NPU-TH5_NIF-slot1/chip1/core64", "lane": 1 + }, + "tx": { + "pre": 5, + "pre2": 0, + "main": 31, + "post": 0, + "post2": 0, + "post3": 0 } }, { "id": { "chip": "NPU-TH5_NIF-slot1/chip1/core64", "lane": 2 + }, + "tx": { + "pre": 5, + "pre2": 0, + "main": 31, + "post": 0, + "post2": 0, + "post3": 0 } }, { "id": { "chip": "NPU-TH5_NIF-slot1/chip1/core64", "lane": 3 + }, + "tx": { + "pre": 5, + "pre2": 0, + "main": 31, + "post": 0, + "post2": 0, + "post3": 0 } } ], @@ -17225,7 +17322,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -17237,9 +17335,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17252,9 +17350,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17267,9 +17365,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17282,9 +17380,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17297,9 +17395,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17312,9 +17410,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17327,9 +17425,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17342,9 +17440,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17509,7 +17607,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -17521,9 +17620,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17536,9 +17635,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17551,9 +17650,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17566,9 +17665,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17581,9 +17680,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17596,9 +17695,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17611,9 +17710,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17626,9 +17725,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17793,7 +17892,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -17805,9 +17905,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17820,9 +17920,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17835,9 +17935,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17850,9 +17950,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17865,9 +17965,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17880,9 +17980,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17895,9 +17995,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17910,9 +18010,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18077,7 +18177,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -18089,9 +18190,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18104,9 +18205,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18119,9 +18220,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18134,9 +18235,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18149,9 +18250,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18164,9 +18265,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18179,9 +18280,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18194,9 +18295,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18361,7 +18462,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -18373,9 +18475,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18388,9 +18490,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18403,9 +18505,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18418,9 +18520,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18433,9 +18535,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18448,9 +18550,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18463,9 +18565,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18478,9 +18580,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18645,7 +18747,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -18657,9 +18760,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18672,9 +18775,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18687,9 +18790,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18702,9 +18805,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18717,9 +18820,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18732,9 +18835,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18747,9 +18850,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18762,9 +18865,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18929,7 +19032,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -18941,9 +19045,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18956,9 +19060,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18971,9 +19075,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18986,9 +19090,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19001,9 +19105,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19016,9 +19120,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19031,9 +19135,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19046,9 +19150,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19213,7 +19317,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -19225,9 +19330,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19240,9 +19345,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19255,9 +19360,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19270,9 +19375,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19285,9 +19390,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19300,9 +19405,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19315,9 +19420,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19330,9 +19435,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19497,7 +19602,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -19509,9 +19615,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19524,9 +19630,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19539,9 +19645,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19554,9 +19660,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19569,9 +19675,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19584,9 +19690,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19599,9 +19705,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19614,9 +19720,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19781,7 +19887,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -19793,9 +19900,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19808,9 +19915,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19823,9 +19930,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19838,9 +19945,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19853,9 +19960,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19868,9 +19975,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19883,9 +19990,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19898,9 +20005,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20065,7 +20172,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -20077,9 +20185,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20092,9 +20200,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20107,9 +20215,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20122,9 +20230,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20137,9 +20245,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20152,9 +20260,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20167,9 +20275,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20182,9 +20290,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20349,7 +20457,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -20361,9 +20470,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20376,9 +20485,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20391,9 +20500,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20406,9 +20515,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20421,9 +20530,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20436,9 +20545,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20451,9 +20560,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20466,9 +20575,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20633,7 +20742,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -20645,9 +20755,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20660,9 +20770,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20675,9 +20785,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20690,9 +20800,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20705,9 +20815,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20720,9 +20830,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20735,9 +20845,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20750,9 +20860,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20917,7 +21027,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -20929,9 +21040,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20944,9 +21055,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20959,9 +21070,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20974,9 +21085,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20989,9 +21100,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21004,9 +21115,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21019,9 +21130,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21034,9 +21145,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21201,7 +21312,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -21213,9 +21325,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21228,9 +21340,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21243,9 +21355,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21258,9 +21370,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21273,9 +21385,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21288,9 +21400,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21303,9 +21415,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21318,9 +21430,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21485,7 +21597,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -21497,9 +21610,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21512,9 +21625,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21527,9 +21640,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21542,9 +21655,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21557,9 +21670,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21572,9 +21685,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21587,9 +21700,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21602,9 +21715,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21769,7 +21882,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -21781,9 +21895,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21796,9 +21910,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21811,9 +21925,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21826,9 +21940,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21841,9 +21955,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21856,9 +21970,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21871,9 +21985,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21886,9 +22000,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22053,7 +22167,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -22065,9 +22180,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22080,9 +22195,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22095,9 +22210,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22110,9 +22225,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22125,9 +22240,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22140,9 +22255,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22155,9 +22270,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22170,9 +22285,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22337,7 +22452,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -22349,9 +22465,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22364,9 +22480,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22379,9 +22495,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22394,9 +22510,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22409,9 +22525,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22424,9 +22540,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22439,9 +22555,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22454,9 +22570,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22621,7 +22737,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -22633,9 +22750,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22648,9 +22765,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22663,9 +22780,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22678,9 +22795,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22693,9 +22810,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22708,9 +22825,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22723,9 +22840,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22738,9 +22855,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22905,7 +23022,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -22917,9 +23035,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22932,9 +23050,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22947,9 +23065,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22962,9 +23080,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22977,9 +23095,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22992,9 +23110,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23007,9 +23125,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23022,9 +23140,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23189,7 +23307,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -23201,9 +23320,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23216,9 +23335,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23231,9 +23350,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23246,9 +23365,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23261,9 +23380,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23276,9 +23395,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23291,9 +23410,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23306,9 +23425,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23473,7 +23592,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -23485,9 +23605,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23500,9 +23620,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23515,9 +23635,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23530,9 +23650,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23545,9 +23665,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23560,9 +23680,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23575,9 +23695,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23590,9 +23710,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23757,7 +23877,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -23769,9 +23890,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23784,9 +23905,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23799,9 +23920,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23814,9 +23935,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23829,9 +23950,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23844,9 +23965,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23859,9 +23980,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23874,9 +23995,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24041,7 +24162,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -24053,9 +24175,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24068,9 +24190,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24083,9 +24205,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24098,9 +24220,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24113,9 +24235,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24128,9 +24250,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24143,9 +24265,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24158,9 +24280,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24325,7 +24447,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -24337,9 +24460,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24352,9 +24475,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24367,9 +24490,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24382,9 +24505,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24397,9 +24520,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24412,9 +24535,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24427,9 +24550,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24442,9 +24565,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24609,7 +24732,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -24621,9 +24745,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24636,9 +24760,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24651,9 +24775,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24666,9 +24790,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24681,9 +24805,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24696,9 +24820,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24711,9 +24835,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24726,9 +24850,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24893,7 +25017,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -24905,9 +25030,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24920,9 +25045,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24935,9 +25060,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24950,9 +25075,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24965,9 +25090,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24980,9 +25105,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24995,9 +25120,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25010,9 +25135,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25177,7 +25302,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -25189,9 +25315,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25204,9 +25330,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25219,9 +25345,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25234,9 +25360,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25249,9 +25375,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25264,9 +25390,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25279,9 +25405,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25294,9 +25420,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25461,7 +25587,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -25473,9 +25600,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25488,9 +25615,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25503,9 +25630,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25518,9 +25645,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25533,9 +25660,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25548,9 +25675,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25563,9 +25690,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25578,9 +25705,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25745,7 +25872,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -25757,9 +25885,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25772,9 +25900,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25787,9 +25915,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25802,9 +25930,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25817,9 +25945,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25832,9 +25960,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25847,9 +25975,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25862,9 +25990,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26029,7 +26157,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -26041,9 +26170,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26056,9 +26185,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26071,9 +26200,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26086,9 +26215,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26101,9 +26230,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26116,9 +26245,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26131,9 +26260,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26146,9 +26275,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, From e3d9c12f560d7a776fa357dd92e2ea81359a7b36 Mon Sep 17 00:00:00 2001 From: Scott Smith Date: Wed, 9 Oct 2024 10:36:27 -0700 Subject: [PATCH 024/479] Gpio Presence Summary: Added gpio presence detection support to data_corral_service. * I would have like to reuse the thrift config from platform_manager, but it includes PM specific stuff like "devicePath", so had to roll a new one here * No unit tests for the Gpio presence yet because I can't mock that out until the GpioChip wrapper is built. Will add that once that's complete * Adjusted all configs to new format Reviewed By: kimdo8736 Differential Revision: D63727814 fbshipit-source-id: 09af2040b24bf7e24f7a06125c5ece62108faf14 --- cmake/PlatformDataCorralService.cmake | 1 + .../platform/configs/darwin/led_manager.json | 42 ++++++- .../configs/meru800bfa/led_manager.json | 114 ++++++++++++++--- .../configs/meru800bia/led_manager.json | 44 +++++-- .../configs/montblanc/led_manager.json | 77 ++++++++++-- .../configs/morgan800cc/led_manager.json | 56 +++++++-- fboss/platform/data_corral_service/BUCK | 4 + .../data_corral_service/ConfigValidator.cpp | 46 ++++++- .../data_corral_service/ConfigValidator.h | 1 + .../FruPresenceExplorer.cpp | 35 +++++- .../data_corral_service/FruPresenceExplorer.h | 3 + .../if/led_manager_config.thrift | 32 ++++- fboss/platform/data_corral_service/tests/BUCK | 1 + .../tests/ConfigValidatorTest.cpp | 47 ++++++- .../tests/FruPresenceExplorerTests.cpp | 119 +++++++++++++++--- 15 files changed, 544 insertions(+), 78 deletions(-) diff --git a/cmake/PlatformDataCorralService.cmake b/cmake/PlatformDataCorralService.cmake index 75d263c2ec3c9..fb9a22fe8757a 100644 --- a/cmake/PlatformDataCorralService.cmake +++ b/cmake/PlatformDataCorralService.cmake @@ -43,6 +43,7 @@ target_link_libraries(data_corral_service_lib Folly::folly fb303::fb303 FBThrift::thriftcpp2 + platform_manager_utils ) add_executable(data_corral_service diff --git a/fboss/platform/configs/darwin/led_manager.json b/fboss/platform/configs/darwin/led_manager.json index 55f47817a227d..e7090b64eefd9 100644 --- a/fboss/platform/configs/darwin/led_manager.json +++ b/fboss/platform/configs/darwin/led_manager.json @@ -23,32 +23,62 @@ { "fruName": "FAN1", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan1_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN2", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan2_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN3", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan3_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN4", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan4_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN5", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan5_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan5_present", + "desiredValue": 1 + } + } }, { "fruName": "PEM1", "fruType": "PEM", - "presenceSysfsPath": "/run/devmap/fpgas/SCD_FPGA/pem_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/SCD_FPGA/pem_present", + "desiredValue": 1 + } + } } ] } diff --git a/fboss/platform/configs/meru800bfa/led_manager.json b/fboss/platform/configs/meru800bfa/led_manager.json index 06aaedc3b5319..003a552b0e9c5 100644 --- a/fboss/platform/configs/meru800bfa/led_manager.json +++ b/fboss/platform/configs/meru800bfa/led_manager.json @@ -23,82 +23,162 @@ { "fruName": "FAN1", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD0/fan1_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN2", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD0/fan2_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN3", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan3_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD0/fan3_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN4", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan4_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD0/fan4_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN5", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD1/fan1_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN6", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD1/fan2_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN7", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan3_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD1/fan3_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN8", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan4_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD1/fan4_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN9", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD2/fan1_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN10", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD2/fan2_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN11", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan3_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD2/fan3_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN12", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan4_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD2/fan4_present", + "desiredValue": 1 + } + } }, { "fruName": "PSU1", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu1_prsnt" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu1_prsnt", + "desiredValue": 1 + } + } }, { "fruName": "PSU2", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu2_prsnt" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu2_prsnt", + "desiredValue": 1 + } + } }, { "fruName": "PSU3", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu3_prsnt" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu3_prsnt", + "desiredValue": 1 + } + } }, { "fruName": "PSU4", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu4_prsnt" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu4_prsnt", + "desiredValue": 1 + } + } } ] -} \ No newline at end of file +} diff --git a/fboss/platform/configs/meru800bia/led_manager.json b/fboss/platform/configs/meru800bia/led_manager.json index d48510147511f..cb6cfa2e3960a 100644 --- a/fboss/platform/configs/meru800bia/led_manager.json +++ b/fboss/platform/configs/meru800bia/led_manager.json @@ -23,32 +23,62 @@ { "fruName": "FAN1", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan1_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN2", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan2_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN3", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan3_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN4", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan4_present", + "desiredValue": 1 + } + } }, { "fruName": "PSU1", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu1_present", + "desiredValue": 1 + } + } }, { "fruName": "PSU2", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu2_present", + "desiredValue": 1 + } + } } ] -} \ No newline at end of file +} diff --git a/fboss/platform/configs/montblanc/led_manager.json b/fboss/platform/configs/montblanc/led_manager.json index 9cfe474ac4058..645e23dc3bc49 100644 --- a/fboss/platform/configs/montblanc/led_manager.json +++ b/fboss/platform/configs/montblanc/led_manager.json @@ -29,57 +29,112 @@ { "fruName": "FAN1", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan1_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN2", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan2_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN3", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan3_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan3_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN4", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan4_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan4_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN5", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan5_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan5_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN6", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan6_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan6_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN7", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan7_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan7_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN8", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan8_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan8_present", + "desiredValue": 1 + } + } }, { "fruName": "PSU_L", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/cplds/MCB_CPLD/psu_l_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/cplds/MCB_CPLD/psu_l_present", + "desiredValue": 1 + } + } }, { "fruName": "PSU_R", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/cplds/MCB_CPLD/psu_r_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/cplds/MCB_CPLD/psu_r_present", + "desiredValue": 1 + } + } }, { "fruName": "SMB", "fruType": "SMB", - "presenceSysfsPath": "/run/devmap/cplds/MCB_CPLD/smb_pwrok" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/cplds/MCB_CPLD/smb_pwrok", + "desiredValue": 1 + } + } } ] } diff --git a/fboss/platform/configs/morgan800cc/led_manager.json b/fboss/platform/configs/morgan800cc/led_manager.json index 516dcd3807c28..33e6951796bb2 100644 --- a/fboss/platform/configs/morgan800cc/led_manager.json +++ b/fboss/platform/configs/morgan800cc/led_manager.json @@ -17,42 +17,82 @@ { "fruName": "FAN1", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan1_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan1_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN2", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan2_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan2_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN3", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan3_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan3_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN4", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan4_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan4_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN5", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan5_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan5_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN6", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan6_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan6_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN7", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan7_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan7_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN8", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan8_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan8_presence", + "desiredValue": 1 + } + } } ] } diff --git a/fboss/platform/data_corral_service/BUCK b/fboss/platform/data_corral_service/BUCK index d112d4df56b1c..62c68f36a7d2e 100644 --- a/fboss/platform/data_corral_service/BUCK +++ b/fboss/platform/data_corral_service/BUCK @@ -31,9 +31,13 @@ cpp_library( "//fb303:service_data", "//fboss/lib:common_file_utils", "//fboss/platform/data_corral_service/if:led_manager-cpp2-types", + "//fboss/platform/platform_manager:utils", "//folly:string", "//folly/logging:logging", ], + exported_external_deps = [ + ("libgpiod", None, "gpiod"), + ], ) cpp_library( diff --git a/fboss/platform/data_corral_service/ConfigValidator.cpp b/fboss/platform/data_corral_service/ConfigValidator.cpp index a1ff889cae4f5..1a69364ee2474 100644 --- a/fboss/platform/data_corral_service/ConfigValidator.cpp +++ b/fboss/platform/data_corral_service/ConfigValidator.cpp @@ -50,8 +50,8 @@ bool ConfigValidator::isValidFruConfig( XLOG(ERR) << "FruName cannot be empty"; return false; } - if (fruConfig.presenceSysfsPath()->empty()) { - XLOG(ERR) << "PresenceSysfsPath cannot be empty"; + if (!isValidPresenceConfig(*fruConfig.presenceDetection())) { + XLOG(ERR) << "PresenceDetection is invalid"; return false; } return true; @@ -80,4 +80,46 @@ bool ConfigValidator::isValidFruConfigs( return true; } +bool ConfigValidator::isValidPresenceConfig(const PresenceDetection& config) { + // Both cannot be present + if (config.sysfsFileHandle() && config.gpioLineHandle()) { + XLOG(ERR) + << "Only one of GpioLineHandle or SysfsFileHandle must be set for PresenceDetection"; + return false; + } + if (!config.sysfsFileHandle() && !config.gpioLineHandle()) { + XLOG(ERR) + << "GpioLineHandle or SysfsFileHandle must be set for PresenceDetection"; + return false; + } + + if (config.sysfsFileHandle()) { + if (config.sysfsFileHandle()->presenceFilePath()->empty()) { + XLOG(ERR) << "Sysfs path cannot be empty"; + return false; + } + if (config.sysfsFileHandle()->desiredValue() < 0) { + XLOG(ERR) + << "desiredValue for SysfsFileHandle cannot be < 0. Typically 0 or 1"; + return false; + } + } + if (config.gpioLineHandle()) { + if (config.gpioLineHandle()->charDevPath()->empty()) { + XLOG(ERR) << "charDevPath for GpioLineHandle cannot be empty"; + return false; + } + if (config.gpioLineHandle()->desiredValue() < 0) { + XLOG(ERR) + << "desiredValue for GpioLineHandle cannot be < 0. Typically 0 or 1"; + return false; + } + if (config.gpioLineHandle()->lineIndex() < 0) { + XLOG(ERR) << "lineIndex for GpioLineHandle cannot be < 0."; + return false; + } + } + return true; +} + } // namespace facebook::fboss::platform::data_corral_service diff --git a/fboss/platform/data_corral_service/ConfigValidator.h b/fboss/platform/data_corral_service/ConfigValidator.h index be343738d8fbe..3026c60d61569 100644 --- a/fboss/platform/data_corral_service/ConfigValidator.h +++ b/fboss/platform/data_corral_service/ConfigValidator.h @@ -18,5 +18,6 @@ class ConfigValidator { bool isValidFruConfigs( const std::vector& fruConfigs, const std::map& fruTypeLedConfigs); + bool isValidPresenceConfig(const PresenceDetection& presenceConfig); }; } // namespace facebook::fboss::platform::data_corral_service diff --git a/fboss/platform/data_corral_service/FruPresenceExplorer.cpp b/fboss/platform/data_corral_service/FruPresenceExplorer.cpp index 1678472abd017..20813a619b9dd 100644 --- a/fboss/platform/data_corral_service/FruPresenceExplorer.cpp +++ b/fboss/platform/data_corral_service/FruPresenceExplorer.cpp @@ -8,7 +8,9 @@ #include #include "fboss/lib/CommonFileUtils.h" +#include "fboss/platform/platform_manager/Utils.h" +using namespace facebook::fboss::platform; namespace { auto constexpr kFruPresence = "fru_presence_explorer.{}.presence"; auto constexpr kSystem = "SYSTEM"; @@ -25,13 +27,21 @@ void FruPresenceExplorer::detectFruPresence() { XLOG(INFO) << "Detecting presence of FRUs"; fruTypePresence_.clear(); for (const auto& fruConfig : fruConfigs_) { + bool present = false; auto fruType = *fruConfig.fruType(); try { - auto value = std::stoi( - readSysfs(*fruConfig.presenceSysfsPath()).c_str(), - nullptr, - 0 /*determine base by format*/); - auto present = value > 0 ? true : false; + // ConfigValidator guarantees one of these must be present + if (fruConfig.presenceDetection()->sysfsFileHandle()) { + XLOG(INFO) << "Detecting presence of " << *fruConfig.fruName() + << " (via sysfs)"; + present = detectFruSysfsPresence( + *fruConfig.presenceDetection()->sysfsFileHandle()); + } else if (fruConfig.presenceDetection()->gpioLineHandle()) { + XLOG(INFO) << "Detecting presence of " << *fruConfig.fruName() + << " (via gpio)"; + present = detectFruGpioPresence( + *fruConfig.presenceDetection()->gpioLineHandle()); + } if (fruTypePresence_.find(fruType) == fruTypePresence_.end()) { fruTypePresence_[fruType] = present; } else { @@ -62,6 +72,21 @@ void FruPresenceExplorer::detectFruPresence() { ledManager_->programSystemLed(allFrusPresent); } +bool FruPresenceExplorer::detectFruSysfsPresence( + const SysfsFileHandle& handle) { + auto value = std::stoi( + readSysfs(*handle.presenceFilePath()).c_str(), + nullptr, + 0 /*determine base by format*/); + return value == *handle.desiredValue(); +} + +bool FruPresenceExplorer::detectFruGpioPresence(const GpioLineHandle& handle) { + auto value = platform_manager::Utils().getGpioLineValue( + handle.charDevPath()->c_str(), *handle.lineIndex()); + return value == *handle.desiredValue(); +} + bool FruPresenceExplorer::isPresent(const std::string& fruType) const { if (fruTypePresence_.find(fruType) == fruTypePresence_.end()) { return false; diff --git a/fboss/platform/data_corral_service/FruPresenceExplorer.h b/fboss/platform/data_corral_service/FruPresenceExplorer.h index a1ba131ff976f..f0909abcc202b 100644 --- a/fboss/platform/data_corral_service/FruPresenceExplorer.h +++ b/fboss/platform/data_corral_service/FruPresenceExplorer.h @@ -27,6 +27,9 @@ class FruPresenceExplorer { bool isAllPresent() const; private: + bool detectFruSysfsPresence(const SysfsFileHandle& handle); + bool detectFruGpioPresence(const GpioLineHandle& handle); + const std::vector fruConfigs_; const std::shared_ptr ledManager_; std::unordered_map fruTypePresence_; diff --git a/fboss/platform/data_corral_service/if/led_manager_config.thrift b/fboss/platform/data_corral_service/if/led_manager_config.thrift index 2c8de18de0e62..3e1d3d0e1bb33 100644 --- a/fboss/platform/data_corral_service/if/led_manager_config.thrift +++ b/fboss/platform/data_corral_service/if/led_manager_config.thrift @@ -30,11 +30,39 @@ struct LedConfig { // // `fruType`: Type of FRU. E.g FAN, PEM, PSU // -// `presenceSysfsPath`: Sysfs path to detect presence of this FRU. +// `presenceDetection`: Sysfs path or Gpio line to detect presence of this FRU. struct FruConfig { 1: string fruName; 2: string fruType; - 3: string presenceSysfsPath; + 3: PresenceDetection presenceDetection; +} + +// `presenceFileName`: The path of the file which will contain the presence +// information. +// +// `desiredValue`: The value which will indicate that the device is present. +struct SysfsFileHandle { + 1: string presenceFilePath; + 2: i16 desiredValue; +} + +// `charDevPath`: Filepath of the gpiochip +// +// `lineIndex`: The gpio line number which will indicate the presence of the +// device. +// +// `desiredValue`: The value which will indicate that the device is present. +struct GpioLineHandle { + 1: string charDevPath; + 2: i32 lineIndex; + 3: i16 desiredValue; +} + +// The presence detection can be based on GPIO registers or sysfs paths. Only +// one of them should be populated +struct PresenceDetection { + 1: optional GpioLineHandle gpioLineHandle; + 2: optional SysfsFileHandle sysfsFileHandle; } // Main struct to support generic LED programming for presence. diff --git a/fboss/platform/data_corral_service/tests/BUCK b/fboss/platform/data_corral_service/tests/BUCK index ab4b6b794e70a..b91adb0ab438a 100644 --- a/fboss/platform/data_corral_service/tests/BUCK +++ b/fboss/platform/data_corral_service/tests/BUCK @@ -25,6 +25,7 @@ cpp_unittest( deps = [ "//fboss/platform/config_lib:config_lib", "//fboss/platform/data_corral_service:config_validator", + "//folly/logging:logging", "//thrift/lib/cpp2/protocol:protocol", ], ) diff --git a/fboss/platform/data_corral_service/tests/ConfigValidatorTest.cpp b/fboss/platform/data_corral_service/tests/ConfigValidatorTest.cpp index c3cf8b3a3de02..ec0e26734dc9b 100644 --- a/fboss/platform/data_corral_service/tests/ConfigValidatorTest.cpp +++ b/fboss/platform/data_corral_service/tests/ConfigValidatorTest.cpp @@ -1,3 +1,4 @@ +#include #include #include @@ -28,11 +29,28 @@ LedConfig getValidLedConfig() { return ledConfig; } +PresenceDetection getValidSysfsPresenceDetection() { + auto presenceDetection = PresenceDetection(); + presenceDetection.sysfsFileHandle() = SysfsFileHandle(); + presenceDetection.sysfsFileHandle()->presenceFilePath() = + "/sys/class/present/0"; + return presenceDetection; +} + +PresenceDetection getValidGpioPresenceDetection() { + auto presenceDetection = PresenceDetection(); + presenceDetection.gpioLineHandle() = GpioLineHandle(); + presenceDetection.gpioLineHandle()->charDevPath() = "/dev/gpiochip0"; + presenceDetection.gpioLineHandle()->lineIndex() = 0; + presenceDetection.gpioLineHandle()->desiredValue() = 1; + return presenceDetection; +} + FruConfig getValidFruConfig() { auto fruConfig = FruConfig(); fruConfig.fruName() = "fru1"; fruConfig.fruType() = "type1"; - fruConfig.presenceSysfsPath() = "/sys/class/present"; + fruConfig.presenceDetection() = getValidSysfsPresenceDetection(); return fruConfig; } @@ -70,7 +88,13 @@ TEST(ConfigValidatorTest, InvalidFruConfig) { EXPECT_FALSE(ConfigValidator().isValid(config)); config = getValidLedManagerConfig(); - config.fruConfigs()->at(0).presenceSysfsPath() = ""; + config.fruConfigs()->at(0).presenceDetection() = + getValidGpioPresenceDetection(); + config.fruConfigs() + ->at(0) + .presenceDetection() + ->gpioLineHandle() + ->lineIndex() = -1; EXPECT_FALSE(ConfigValidator().isValid(config)); config = getValidLedManagerConfig(); @@ -85,6 +109,24 @@ TEST(ConfigValidatorTest, InvalidFruTypeLedConfig) { EXPECT_FALSE(ConfigValidator().isValid(config)); } +TEST(ConfigValidatorTest, InvalidPresenceDetection) { + auto config = getValidSysfsPresenceDetection(); + config.sysfsFileHandle()->presenceFilePath() = ""; + EXPECT_FALSE(ConfigValidator().isValidPresenceConfig(config)); + + config = getValidGpioPresenceDetection(); + config.gpioLineHandle()->charDevPath() = ""; + EXPECT_FALSE(ConfigValidator().isValidPresenceConfig(config)); + + config = getValidGpioPresenceDetection(); + config.gpioLineHandle()->desiredValue() = -1; + EXPECT_FALSE(ConfigValidator().isValidPresenceConfig(config)); + + config = getValidGpioPresenceDetection(); + config.gpioLineHandle()->lineIndex() = -1; + EXPECT_FALSE(ConfigValidator().isValidPresenceConfig(config)); +} + TEST(ConfigValidatorTest, RealConfigsValid) { for (const auto& platform : {kDarwin, @@ -94,6 +136,7 @@ TEST(ConfigValidatorTest, RealConfigsValid) { kMontblanc, kMorgan800cc, kTahan800bc}) { + XLOG(INFO) << "Validating config for " << platform; LedManagerConfig config; auto configJson = facebook::fboss::platform::ConfigLib().getLedManagerConfig(platform); diff --git a/fboss/platform/data_corral_service/tests/FruPresenceExplorerTests.cpp b/fboss/platform/data_corral_service/tests/FruPresenceExplorerTests.cpp index f544eaa776194..0ae6744f28137 100644 --- a/fboss/platform/data_corral_service/tests/FruPresenceExplorerTests.cpp +++ b/fboss/platform/data_corral_service/tests/FruPresenceExplorerTests.cpp @@ -29,17 +29,29 @@ class FruPresenceExplorerTests : public Test { auto fan1 = FruConfig(); fan1.fruName() = "FAN1"; fan1.fruType() = "FAN"; - fan1.presenceSysfsPath() = TemporaryFile().path().string(); + fan1.presenceDetection() = PresenceDetection(); + fan1.presenceDetection()->sysfsFileHandle() = SysfsFileHandle(); + fan1.presenceDetection()->sysfsFileHandle()->presenceFilePath() = + TemporaryFile().path().string(); + fan1.presenceDetection()->sysfsFileHandle()->desiredValue() = 1; auto fan2 = FruConfig(); fan2.fruName() = "FAN2"; fan2.fruType() = "FAN"; - fan2.presenceSysfsPath() = TemporaryFile().path().string(); + fan2.presenceDetection() = PresenceDetection(); + fan2.presenceDetection()->sysfsFileHandle() = SysfsFileHandle(); + fan2.presenceDetection()->sysfsFileHandle()->presenceFilePath() = + TemporaryFile().path().string(); + fan2.presenceDetection()->sysfsFileHandle()->desiredValue() = 1; auto pem1 = FruConfig(); pem1.fruName() = "PEM1"; pem1.fruType() = "PEM"; - pem1.presenceSysfsPath() = TemporaryFile().path().string(); + pem1.presenceDetection() = PresenceDetection(); + pem1.presenceDetection()->sysfsFileHandle() = SysfsFileHandle(); + pem1.presenceDetection()->sysfsFileHandle()->presenceFilePath() = + TemporaryFile().path().string(); + pem1.presenceDetection()->sysfsFileHandle()->desiredValue() = 1; fruConfigs_ = std::vector{fan1, fan2, pem1}; } @@ -53,9 +65,24 @@ class FruPresenceExplorerTests : public Test { }; TEST_F(FruPresenceExplorerTests, FrusAllPresent) { - EXPECT_TRUE(writeSysfs(*fruConfigs_[0].presenceSysfsPath(), "1")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[1].presenceSysfsPath(), "1")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[2].presenceSysfsPath(), "1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[0] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[1] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[2] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); EXPECT_CALL(*mockLedManager_, programFruLed("FAN", true)) .WillOnce(Return(true)); @@ -69,9 +96,24 @@ TEST_F(FruPresenceExplorerTests, FrusAllPresent) { } TEST_F(FruPresenceExplorerTests, FrusNotAllPresent) { - EXPECT_TRUE(writeSysfs(*fruConfigs_[0].presenceSysfsPath(), "0")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[1].presenceSysfsPath(), "1")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[2].presenceSysfsPath(), "1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[0] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[1] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[2] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); EXPECT_CALL(*mockLedManager_, programFruLed("FAN", false)) .WillOnce(Return(true)); @@ -85,9 +127,20 @@ TEST_F(FruPresenceExplorerTests, FrusNotAllPresent) { } TEST_F(FruPresenceExplorerTests, PresenceDetectionFail) { - EXPECT_TRUE(writeSysfs(*fruConfigs_[0].presenceSysfsPath(), "1")); - fruConfigs_[1].presenceSysfsPath() = "INVALID_PATH"; - EXPECT_TRUE(writeSysfs(*fruConfigs_[2].presenceSysfsPath(), "1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[0] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); + fruConfigs_[1].presenceDetection()->sysfsFileHandle()->presenceFilePath() = + "INVALID_PATH"; + EXPECT_TRUE(writeSysfs( + *fruConfigs_[2] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); EXPECT_CALL(*mockLedManager_, programFruLed("FAN", false)) .WillOnce(Return(true)); @@ -101,9 +154,24 @@ TEST_F(FruPresenceExplorerTests, PresenceDetectionFail) { } TEST_F(FruPresenceExplorerTests, PresenceDetectionHexadecimal) { - EXPECT_TRUE(writeSysfs(*fruConfigs_[0].presenceSysfsPath(), "0x1")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[1].presenceSysfsPath(), "0x01")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[2].presenceSysfsPath(), "0x001")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[0] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0x1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[1] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0x01")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[2] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0x001")); EXPECT_CALL(*mockLedManager_, programFruLed("FAN", true)) .WillOnce(Return(true)); @@ -117,9 +185,24 @@ TEST_F(FruPresenceExplorerTests, PresenceDetectionHexadecimal) { } TEST_F(FruPresenceExplorerTests, AbsenceDetectionHexadecimal) { - EXPECT_TRUE(writeSysfs(*fruConfigs_[0].presenceSysfsPath(), "0x0")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[1].presenceSysfsPath(), "0x00")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[2].presenceSysfsPath(), "0x000")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[0] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0x0")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[1] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0x00")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[2] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0x000")); EXPECT_CALL(*mockLedManager_, programFruLed("FAN", false)) .WillOnce(Return(true)); From 8ec8b9d1b64e6e9d76d846a1d63a52931a7d7325 Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Wed, 9 Oct 2024 11:15:47 -0700 Subject: [PATCH 025/479] TransceiverManagerTest changes to pass in OSS binary run Summary: This is a pre-req change to add QSFP service unit tests to github actions. Running the test binary and testing via `buck test` are slightly different because a raw run of the test binary will keep some state between tests, which doesn't appear to happen when using `buck test`, so we need to ensure that this flag is not forced to zero from the prior test (since that will prevent the service from warm booting). Reviewed By: harshitgulati18 Differential Revision: D64063951 fbshipit-source-id: 47507bcfa49f7daa4b0e7e4bf7f7354cd8021cb2 --- fboss/qsfp_service/test/TransceiverManagerTest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fboss/qsfp_service/test/TransceiverManagerTest.cpp b/fboss/qsfp_service/test/TransceiverManagerTest.cpp index 1a618bd1ede23..a24f64d9db2eb 100644 --- a/fboss/qsfp_service/test/TransceiverManagerTest.cpp +++ b/fboss/qsfp_service/test/TransceiverManagerTest.cpp @@ -71,6 +71,8 @@ TEST_F(TransceiverManagerTest, coldBootTest) { TEST_F(TransceiverManagerTest, warmBootTest) { // Trigger a graceful exit transceiverManager_->gracefulExit(); + gflags::SetCommandLineOptionWithMode( + "can_qsfp_service_warm_boot", "1", gflags::SET_FLAGS_DEFAULT); // Check warm boot flag file is created EXPECT_TRUE(checkFileExists(warmBootFlagFile)); From 287e4011a1caef56aedde207159c2bef6c42f0f1 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Wed, 9 Oct 2024 12:45:45 -0700 Subject: [PATCH 026/479] Fix --skip_stop_pfc_test_traffic not working Summary: AgentTrafficPfcTest was missing setTTLZeroCpuConfig so loopback traffic stops too early. Reviewed By: nivinl Differential Revision: D64080482 fbshipit-source-id: 00c9cb6686b7bf8823520af339a12cb0ed45b6c6 --- fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp b/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp index fab0a883b70f6..a96667aa748e1 100644 --- a/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp @@ -8,6 +8,7 @@ #include "fboss/agent/test/EcmpSetupHelper.h" #include "fboss/agent/test/utils/AsicUtils.h" #include "fboss/agent/test/utils/ConfigUtils.h" +#include "fboss/agent/test/utils/CoppTestUtils.h" #include "fboss/agent/test/utils/PfcTestUtils.h" #include "fboss/agent/test/utils/QosTestUtils.h" #include "fboss/lib/CommonUtils.h" @@ -188,6 +189,7 @@ class AgentTrafficPfcTest : public AgentHwTest { ensemble.getSw(), ensemble.masterLogicalPortIds(), true /*interfaceHasSubnet*/); + utility::setTTLZeroCpuConfig(ensemble.getL3Asics(), config); return config; } @@ -367,7 +369,7 @@ class AgentTrafficPfcTest : public AgentHwTest { // Apply PFC config to all ports portIdsToConfigure = masterLogicalInterfacePortIds(); } - setupPfcBuffers( + utility::setupPfcBuffers( cfg, portIdsToConfigure, kLosslessPgIds, @@ -504,7 +506,8 @@ class AgentTrafficPfcWatchdogTest : public AgentTrafficPfcTest { protected: void setupConfigAndEcmpTraffic(const std::vector& portIds) { cfg::SwitchConfig cfg = getAgentEnsemble()->getCurrentConfig(); - setupPfcBuffers(cfg, portIds, kLosslessPgIds, {}, PfcBufferParams{}); + utility::setupPfcBuffers( + cfg, portIds, kLosslessPgIds, {}, PfcBufferParams{}); applyNewConfig(cfg); setupEcmpTraffic(portIds); } From 1323a5309f9ffbca23f8525d658976f09416e3ae Mon Sep 17 00:00:00 2001 From: Max Ng Date: Wed, 9 Oct 2024 12:57:33 -0700 Subject: [PATCH 027/479] Remove obsolete ifdefs from bcm TamApi Summary: Remove obsolete ifdefs from bcm TamApi Reviewed By: zechengh09 Differential Revision: D64091866 fbshipit-source-id: e38ba8c7f8a6339421a25b7debc601d975370ed4 --- fboss/agent/hw/sai/api/bcm/TamApi.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/fboss/agent/hw/sai/api/bcm/TamApi.cpp b/fboss/agent/hw/sai/api/bcm/TamApi.cpp index 2fca285c2f203..c7d70df74bc1a 100644 --- a/fboss/agent/hw/sai/api/bcm/TamApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/TamApi.cpp @@ -2,7 +2,6 @@ #include "fboss/agent/hw/sai/api/TamApi.h" -#if !defined(BRCM_SAI_SDK_XGS_AND_DNX) extern "C" { #ifndef IS_OSS_BRCM_SAI #include @@ -10,26 +9,17 @@ extern "C" { #include #endif } -#endif namespace facebook::fboss { std::optional SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { -#if !defined(BRCM_SAI_SDK_XGS_AND_DNX) - return SAI_TAM_EVENT_ATTR_SWITCH_EVENT_TYPE; -#else return std::nullopt; -#endif } std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { -#if !defined(BRCM_SAI_SDK_XGS_AND_DNX) - return SAI_TAM_EVENT_ATTR_EVENT_ID; -#else return std::nullopt; -#endif } } // namespace facebook::fboss From aa6459cd49dab88e4f0e3e64649194635219a599 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 9 Oct 2024 13:10:51 -0700 Subject: [PATCH 028/479] Skip wait for peer drain check on SDSW roles Summary: As titled. There is no point waiting on peers to drain themselves before cold booting a SDSW. The protocol here is in HW, so waiting will not achieve anything. Reviewed By: shri-khare Differential Revision: D64092149 fbshipit-source-id: bdfbebcaf1796121dc330eeac5bd1965b3927f95 --- fboss/agent/test/MockAgentNetWhoAmI.h | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/agent/test/MockAgentNetWhoAmI.h b/fboss/agent/test/MockAgentNetWhoAmI.h index 44d2b6f7b9df2..bc498edaa9e64 100644 --- a/fboss/agent/test/MockAgentNetWhoAmI.h +++ b/fboss/agent/test/MockAgentNetWhoAmI.h @@ -18,6 +18,7 @@ class MockAgentNetWhoAmI : public AgentNetWhoAmI { MOCK_CONST_METHOD0(isCiscoMorgan800ccPlatform, bool()); MOCK_CONST_METHOD0(isBcmVoqPlatform, bool()); MOCK_CONST_METHOD0(isFdsw, bool()); + MOCK_CONST_METHOD0(isSdsw, bool()); MOCK_CONST_METHOD0(isNotDrainable, bool()); MOCK_CONST_METHOD0(hasRoutingProtocol, bool()); MOCK_CONST_METHOD0(hasBgpRoutingProtocol, bool()); From f19ed0536bc182c9afcdd5774fb98e18c9531249 Mon Sep 17 00:00:00 2001 From: Ron He Date: Wed, 9 Oct 2024 15:06:17 -0700 Subject: [PATCH 029/479] Fix ensemble config apply on warmboot Summary: As titled. If agent is coldbooting, we can either 1. Use link state toggler to apply initial config with port DOWN, and then apply initial config to have proper loopback mode. Or 2. Without link state toggler, directly apply initial config. Currently we're reapplying the same config during warmboot, which is not needed and cause longer warmboot time. Reviewed By: jasmeetbagga Differential Revision: D64086812 Privacy Context Container: L1125642 fbshipit-source-id: a31c8f1c6a847599c8bef58314ca9dbaa3af19c6 --- fboss/agent/test/AgentEnsemble.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/fboss/agent/test/AgentEnsemble.cpp b/fboss/agent/test/AgentEnsemble.cpp index 1cfe2f03fa5a9..b53be34935d16 100644 --- a/fboss/agent/test/AgentEnsemble.cpp +++ b/fboss/agent/test/AgentEnsemble.cpp @@ -141,16 +141,17 @@ void AgentEnsemble::startAgent(bool failHwCallsOnWarmboot) { initializer->initAgent(this, hwWriteBehavior); })); initializer->initializer()->waitForInitDone(); - // if cold booting, invoke link toggler - if (getSw()->getBootType() != BootType::WARM_BOOT && - linkToggler_ != nullptr) { - linkToggler_->applyInitialConfig(initialConfig_); + + if (getSw()->getBootType() == BootType::COLD_BOOT) { + if (linkToggler_ != nullptr) { + linkToggler_->applyInitialConfig(initialConfig_); + } + // With link state toggler, initial config is applied with ports down to + // later bring up the ports. This causes the config to be written as + // loopback mode = None. Write the init config again to have the proper + // config. + applyNewConfig(initialConfig_); } - // With link state toggler, initial config is applied with ports down to - // later bring up the ports. This causes the config to be written as - // loopback mode = None. Write the init config again to have the proper - // config. - applyNewConfig(initialConfig_); } void AgentEnsemble::writeConfig(const cfg::SwitchConfig& config) { From 7ff762bd5e09d4d0bbbae9bda0c5f511a8de2106 Mon Sep 17 00:00:00 2001 From: TJ Yin Date: Wed, 9 Oct 2024 15:31:12 -0700 Subject: [PATCH 030/479] Migrate Thrift Legacy Reflection in Enum Summary: Thrift Legacy Reflection is deprecated. This diff replaces fatal::enum_traits::to_string(value) with apache::thrift::util::enumName(value) drop-conflicts #publish_when_ready Differential Revision: D64131104 fbshipit-source-id: 2c7e81cba64dc055c9e032048a7a2459a96d71f6 --- fboss/thrift_cow/visitors/ExtendedPathVisitor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fboss/thrift_cow/visitors/ExtendedPathVisitor.h b/fboss/thrift_cow/visitors/ExtendedPathVisitor.h index be0e49961c6e8..64c07bc9427e8 100644 --- a/fboss/thrift_cow/visitors/ExtendedPathVisitor.h +++ b/fboss/thrift_cow/visitors/ExtendedPathVisitor.h @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -87,7 +88,7 @@ std::optional matchingEnumToken( const Enum& e, const fsdb::OperPathElem& elem) { // TODO: should we allow regex/raw matching by int value? - auto enumName = fatal::enum_traits::to_string(e); + auto enumName = apache::thrift::util::enumName(e); if (matchesStrToken(enumName, elem)) { return enumName; } From cbffc40e39d824ea428a7e62ced532b149e5675c Mon Sep 17 00:00:00 2001 From: "Shrikrishna (Shri) Khare" Date: Wed, 9 Oct 2024 16:47:43 -0700 Subject: [PATCH 031/479] FabricConnectivityManager: handle right switch but wrong port case correctly Summary: As titled. Reviewed By: jasmeetbagga Differential Revision: D64130230 Privacy Context Container: L1125642 fbshipit-source-id: 3822758962df8c1af373a770a848985d60636562 --- fboss/agent/FabricConnectivityManager.cpp | 84 ++++++++++++++--------- fboss/agent/FabricConnectivityManager.h | 2 + 2 files changed, 52 insertions(+), 34 deletions(-) diff --git a/fboss/agent/FabricConnectivityManager.cpp b/fboss/agent/FabricConnectivityManager.cpp index 70e41bb8390ff..5e64d986ae383 100644 --- a/fboss/agent/FabricConnectivityManager.cpp +++ b/fboss/agent/FabricConnectivityManager.cpp @@ -361,6 +361,35 @@ std::optional FabricConnectivityManager::getActualPortIdForSwitch( getRemotePortOffset(switchIdToDsfNode_[baseSwitchId]->getPlatformType())); } +std::pair, std::optional> +FabricConnectivityManager::getActualSwitchNameAndPortName( + uint64_t switchId, + int32_t portId) { + std::optional switchName{std::nullopt}, portName{std::nullopt}; + + auto switchIdIter = switchIdToBaseSwitchIdAndSwitchName_.find(switchId); + if (switchIdIter == switchIdToBaseSwitchIdAndSwitchName_.end()) { + XLOG(ERR) << "Unknown Peer SwitchID: " << static_cast(switchId); + } else { + SwitchID baseSwitchId; + + std::tie(baseSwitchId, switchName) = switchIdIter->second; + + auto actualPortId = getActualPortIdForSwitch( + PortID(portId), SwitchID(switchId), baseSwitchId, switchName.value()); + if (actualPortId.has_value()) { + const auto platformMapping = getPlatformMappingForDsfNode( + switchIdToDsfNode_[baseSwitchId]->getPlatformType()); + if (!platformMapping) { + throw FbossError("Unable to find platform mapping for port: ", portId); + } + portName = platformMapping->getPortNameByPortId(actualPortId.value()); + } + } + + return std::make_pair(switchName, portName); +} + std::optional FabricConnectivityManager::processConnectivityInfoForPort( const PortID& portId, @@ -384,42 +413,29 @@ FabricConnectivityManager::processConnectivityInfoForPort( if (iter->second.expectedSwitchId().has_value() && iter->second.expectedSwitchId().value() == iter->second.switchId() && - iter->second.expectedSwitchName().has_value()) { + iter->second.expectedSwitchName().has_value() && + iter->second.expectedPortId().has_value() && + iter->second.expectedPortId().value() == iter->second.portId() && + iter->second.expectedPortName().has_value()) { + // actual{switchID, portID} == expected{switchID, portID} iter->second.switchName() = iter->second.expectedSwitchName().value(); - - if (iter->second.expectedPortId().has_value() && - iter->second.expectedPortId().value() == iter->second.portId() && - iter->second.expectedPortName().has_value()) { - iter->second.portName() = iter->second.expectedPortName().value(); - } + iter->second.portName() = iter->second.expectedPortName().value(); } else { - auto switchIdIter = - switchIdToBaseSwitchIdAndSwitchName_.find(*iter->second.switchId()); - if (switchIdIter == switchIdToBaseSwitchIdAndSwitchName_.end()) { - XLOG(ERR) << "Unknown Peer SwitchID: " - << static_cast(*iter->second.switchId()); - } else { - auto& [baseSwitchId, switchName] = switchIdIter->second; - iter->second.switchName() = switchName; - - auto actualPortId = getActualPortIdForSwitch( - *iter->second.portId(), - SwitchID(*iter->second.switchId()), - baseSwitchId, - switchName); - if (actualPortId.has_value()) { - const auto platformMapping = getPlatformMappingForDsfNode( - switchIdToDsfNode_[baseSwitchId]->getPlatformType()); - if (!platformMapping) { - throw FbossError( - "Unable to find platform mapping for port: ", portId); - } - auto portName = - platformMapping->getPortNameByPortId(actualPortId.value()); - if (portName.has_value()) { - iter->second.portName() = portName.value(); - } - } + // Miscabling: + // - Connected to expected Switch but on wrong port + // - Connected to non-expected Switch + // Expected switchName/portName are not set + // + // For any of these scenarios, derive SwitchName, PortName + // from actual{switchID, portID}. + auto [switchName, portName] = getActualSwitchNameAndPortName( + *iter->second.switchId(), *iter->second.portId()); + + if (switchName.has_value()) { + iter->second.switchName() = switchName.value(); + } + if (portName.has_value()) { + iter->second.portName() = portName.value(); } } } else { diff --git a/fboss/agent/FabricConnectivityManager.h b/fboss/agent/FabricConnectivityManager.h index 3de7f7ce9db0f..62a49db3e6e1c 100644 --- a/fboss/agent/FabricConnectivityManager.h +++ b/fboss/agent/FabricConnectivityManager.h @@ -66,6 +66,8 @@ class FabricConnectivityManager { uint64_t switchId, uint64_t baseSwitchId, const auto& switchName); + std::pair, std::optional> + getActualSwitchNameAndPortName(uint64_t switchId, int32_t portId); private: void updateExpectedSwitchIdAndPortIdForPort(PortID portID); From 216cb291704a8550fd71864f8beae17eb29c9d19 Mon Sep 17 00:00:00 2001 From: "Shrikrishna (Shri) Khare" Date: Wed, 9 Oct 2024 16:47:43 -0700 Subject: [PATCH 032/479] CmdShowFabric: explicit column to identify mismatch Summary: Today we highlight this via color: Green on Match and Red on Mismatch. But, this is not grep friendly. Colors are suppressed (by design) on grep. The number of fabric ports is large, further making it harder to use visual cue. Thus, print an explicit column for match/mismatch that can be grep'ed. Reviewed By: harshitgulati18 Differential Revision: D64131406 fbshipit-source-id: 6a27b404bb2508b74d186757c4465e6216eb6931 --- fboss/cli/fboss2/commands/show/fabric/CmdShowFabric.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fboss/cli/fboss2/commands/show/fabric/CmdShowFabric.h b/fboss/cli/fboss2/commands/show/fabric/CmdShowFabric.h index 91eba5f7d56b4..94b876e20c777 100644 --- a/fboss/cli/fboss2/commands/show/fabric/CmdShowFabric.h +++ b/fboss/cli/fboss2/commands/show/fabric/CmdShowFabric.h @@ -71,6 +71,7 @@ class CmdShowFabric : public CmdHandler { "Exp Peer Switch (Id)", "Peer Port (Id)", "Exp Peer Port (Id)", + "Match", }); for (auto const& entry : model.get_fabricEntries()) { @@ -90,6 +91,10 @@ class CmdShowFabric : public CmdHandler { udpateNametoIdString( expectedRemotePortNameId, *entry.expectedRemotePortId()); + bool match = + (remoteSwitchNameId == expectedRemoteSwitchNameId && + remotePortNameId == expectedRemotePortNameId); + table.addRow({ *entry.localPort(), Table::StyledCell( @@ -101,6 +106,7 @@ class CmdShowFabric : public CmdHandler { remotePortNameId, get_NeighborStyle(remotePortNameId, expectedRemotePortNameId)), expectedRemotePortNameId, + match ? "Yes" : "No", }); } From f55d78d7f0a0f4ee924291e0460546ac6d8bc0a1 Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Wed, 9 Oct 2024 17:41:19 -0700 Subject: [PATCH 033/479] Import vendor reported patch for OSS fix Summary: Vendor reported fix from Satish Reviewed By: srikrishnagopu Differential Revision: D64145549 fbshipit-source-id: 8dbd85862be7a42e0b52a3f6671556dc5c986a70 --- cmake/AgentHwSaiSwitch.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/AgentHwSaiSwitch.cmake b/cmake/AgentHwSaiSwitch.cmake index 6dd84edd0bd5d..56701582b1505 100644 --- a/cmake/AgentHwSaiSwitch.cmake +++ b/cmake/AgentHwSaiSwitch.cmake @@ -64,7 +64,7 @@ elseif (SAI_BRCM_IMPL) fboss/agent/hw/sai/switch/npu/bcm/SaiTamManager.cpp fboss/agent/hw/sai/switch/npu/bcm/SaiPortManager.cpp fboss/agent/hw/sai/switch/npu/bcm/SaiQueueManager.cpp - fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp + fboss/agent/hw/sai/switch/npu/bcm/SaiSwitchManager.cpp fboss/agent/hw/sai/switch/oss/SaiAclTableManager.cpp ) else() From 36df6f56279cddd26bfad7183edc995ea17e2543 Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Wed, 9 Oct 2024 17:52:32 -0700 Subject: [PATCH 034/479] adopt patch api between FSDB <-> SA gated by gflag Summary: as title, adopt the new patch api, and gated with gflag to roll out Reviewed By: Linerd Differential Revision: D63923107 Privacy Context Container: L1210319 fbshipit-source-id: afec5551d3f8c2a727bbbce770415064624b6e8f --- fboss/fsdb/client/FsdbPubSubManager.cpp | 83 ++++++++++++++++++++++++- fboss/fsdb/client/FsdbPubSubManager.h | 21 +++++++ fboss/fsdb/common/PathHelpers.cpp | 16 +++++ fboss/fsdb/common/PathHelpers.h | 2 + 4 files changed, 119 insertions(+), 3 deletions(-) diff --git a/fboss/fsdb/client/FsdbPubSubManager.cpp b/fboss/fsdb/client/FsdbPubSubManager.cpp index 95cc934b9dfee..992b1038a7e74 100644 --- a/fboss/fsdb/client/FsdbPubSubManager.cpp +++ b/fboss/fsdb/client/FsdbPubSubManager.cpp @@ -49,6 +49,21 @@ std::string toSubscriptionStr( ":/", PathHelpers::toString(paths)); } + +std::string toSubscriptionStr( + const std::string& fsdbHost, + const std::map& path, + SubscriptionType subscribeType, + bool subscribeStats) { + return folly::to( + fsdbHost, + ":/", + subscriptionTypeToStr[subscribeType], + ":/", + (subscribeStats ? kStats : kState), + ":/", + PathHelpers::toString(path)); +} } // namespace namespace facebook::fboss::fsdb { @@ -119,7 +134,7 @@ std::unique_ptr FsdbPubSubManager::createPublisherImpl( int32_t fsdbPort) const { auto publisherExists = publishStats ? (statDeltaPublisher_ || statPathPublisher_) - : (stateDeltaPublisher_ || statePathPublisher_); + : (stateDeltaPublisher_ || statePathPublisher_ || statePatchPublisher_); if (publisherExists) { throw std::runtime_error( @@ -361,6 +376,19 @@ void FsdbPubSubManager::addStateDeltaSubscription( std::move(serverOptions)); } +void FsdbPubSubManager::addStatePatchSubscription( + const PatchPath& subscribePath, + SubscriptionStateChangeCb stateChangeCb, + FsdbPatchSubscriber::FsdbOperPatchUpdateCb patchCb, + FsdbStreamClient::ServerOptions&& serverOptions) { + addSubscriptionImpl( + subscribePath, + stateChangeCb, + patchCb, + false /*subscribeStat*/, + std::move(serverOptions)); +} + void FsdbPubSubManager::addStatePathSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, @@ -409,8 +437,6 @@ void FsdbPubSubManager::addStatePathSubscription( SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions) { - XLOG(INFO) << "addStatePathSubscription: " - << typeid(FsdbExtStateSubscriber).name(); addSubscriptionImpl( std::move(subscriptionOptions), PathHelpers::toExtendedOperPath(subscribePaths), @@ -471,6 +497,48 @@ void FsdbPubSubManager::addStatExtDeltaSubscription( std::move(serverOptions)); } +template +void FsdbPubSubManager::addSubscriptionImpl( + const std::map& subscribePath, + SubscriptionStateChangeCb stateChangeCb, + typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, + bool subscribeStats, + FsdbStreamClient::ServerOptions&& serverOptions, + const std::optional& clientIdSuffix) { + auto subscribeType = SubscriberT::subscriptionType(); + XCHECK(subscribeType != SubscriptionType::UNKNOWN) << "Unknown data type"; + auto subsStr = toSubscriptionStr( + serverOptions.dstAddr.getAddressStr(), + subscribePath, + subscribeType, + subscribeStats); + auto& path2Subscriber = + subscribeStats ? statPath2Subscriber_ : statePath2Subscriber_; + auto path2SubscriberW = path2Subscriber.wlock(); + + auto clientStr = folly::to(clientId_); + if (clientIdSuffix.has_value()) { + clientStr.append(folly::to("_", clientIdSuffix.value())); + } + + auto [itr, inserted] = path2SubscriberW->emplace(std::make_pair( + subsStr, + std::make_unique( + clientStr, + subscribePath, + subscriberEvb_, + reconnectEvb_, + subUnitAvailableCb, + subscribeStats, + stateChangeCb))); + if (!inserted) { + throw std::runtime_error( + "Subscription at : " + subsStr + " already exists"); + } + XLOG(DBG2) << "Added subscription for: " << subsStr; + itr->second->setServerOptions(std::move(serverOptions)); +} + template void FsdbPubSubManager::addSubscriptionImpl( const std::vector& subscribePath, @@ -577,6 +645,15 @@ void FsdbPubSubManager::removeStateDeltaSubscription( SubscriptionType::DELTA, false /*subscribeStats*/); } +void FsdbPubSubManager::removeStatePatchSubscription( + const Path& subscribePath, + const std::string& fsdbHost) { + removeSubscriptionImpl( + subscribePath, + fsdbHost, + SubscriptionType::PATCH, + false /*subscribeStats*/); +} void FsdbPubSubManager::removeStatePathSubscription( const Path& subscribePath, const std::string& fsdbHost) { diff --git a/fboss/fsdb/client/FsdbPubSubManager.h b/fboss/fsdb/client/FsdbPubSubManager.h index f398fa8f91d68..e0fd61e12a816 100644 --- a/fboss/fsdb/client/FsdbPubSubManager.h +++ b/fboss/fsdb/client/FsdbPubSubManager.h @@ -30,6 +30,7 @@ class FsdbPubSubManager { ~FsdbPubSubManager(); using Path = std::vector; + using PatchPath = std::map; using MultiPath = std::vector; /* Publisher create APIs */ @@ -127,6 +128,11 @@ class FsdbPubSubManager { FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, FsdbStreamClient::ServerOptions&& serverOptions = kDefaultServerOptions()); + void addStatePatchSubscription( + const PatchPath& subscribePath, + SubscriptionStateChangeCb stateChangeCb, + FsdbPatchSubscriber::FsdbOperPatchUpdateCb patchCb, + FsdbStreamClient::ServerOptions&& serverOptions); void addStatePathSubscription( SubscriptionOptions&& subscriptionOptions, const Path& subscribePath, @@ -164,6 +170,9 @@ class FsdbPubSubManager { void removeStateDeltaSubscription( const Path& subscribePath, const std::string& fsdbHost = "::1"); + void removeStatePatchSubscription( + const Path& subscribePath, + const std::string& fsdbHost); void removeStatePathSubscription( const Path& subscribePath, const std::string& fsdbHost = "::1"); @@ -177,6 +186,9 @@ class FsdbPubSubManager { void removeStateDeltaSubscription( const MultiPath& subscribePath, const std::string& fsdbHost = "::1"); + void removeStatePatchSubscription( + const MultiPath& subscribePath, + const std::string& fsdbHost = "::1"); void removeStatePathSubscription( const MultiPath& subscribePath, const std::string& fsdbHost = "::1"); @@ -250,6 +262,7 @@ class FsdbPubSubManager { const std::string& fsdbHost, SubscriptionType subscribeType, bool subscribeStats); + template void addSubscriptionImpl( const std::vector& subscribePath, @@ -259,6 +272,14 @@ class FsdbPubSubManager { FsdbStreamClient::ServerOptions&& serverOptions, const std::optional& clientIdSuffix = std::nullopt); template + void addSubscriptionImpl( + const std::map& subscribePath, + SubscriptionStateChangeCb stateChangeCb, + typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, + bool subscribeStats, + FsdbStreamClient::ServerOptions&& serverOptions, + const std::optional& clientIdSuffix = std::nullopt); + template void addSubscriptionImpl( SubscriptionOptions&& subscriptionOptions, const std::vector& subscribePath, diff --git a/fboss/fsdb/common/PathHelpers.cpp b/fboss/fsdb/common/PathHelpers.cpp index 76753e76c045c..5992019ecafe6 100644 --- a/fboss/fsdb/common/PathHelpers.cpp +++ b/fboss/fsdb/common/PathHelpers.cpp @@ -84,5 +84,21 @@ std::vector PathHelpers::toExtendedOperPath( } return extPaths; } +std::map toMappedExtendedOperPath( + const std::vector>& paths) { + std::map result; + for (size_t i = 0; i < paths.size(); i++) { + auto path = paths[i]; + ExtendedOperPath extPath; + extPath.path()->reserve(path.size()); + for (const auto& pathElm : path) { + OperPathElem operPathElm; + operPathElm.raw_ref() = pathElm; + extPath.path()->push_back(std::move(operPathElm)); + } + result[i] = std::move(extPath); + } + return result; +} } // namespace facebook::fboss::fsdb diff --git a/fboss/fsdb/common/PathHelpers.h b/fboss/fsdb/common/PathHelpers.h index fdbe7dfd0630c..1e9d00369a065 100644 --- a/fboss/fsdb/common/PathHelpers.h +++ b/fboss/fsdb/common/PathHelpers.h @@ -27,6 +27,8 @@ class PathHelpers { static std::vector toExtendedOperPath( const std::vector>& paths); + static std::map toMappedExtendedOperPath( + const std::vector>& paths); }; } // namespace facebook::fboss::fsdb From 6be78d8c15ea9969b53f7217d0d1566feeb21f0e Mon Sep 17 00:00:00 2001 From: Mohammed Al-Sanabani Date: Wed, 9 Oct 2024 18:06:45 -0700 Subject: [PATCH 035/479] Fix LED Tests for multi-port platforms Summary: For platforms with multiple ports on the same transceiver, we will have multiple LEDs per transceiver. This fixes the test. Should work for single LED/port chassis too. Reviewed By: birdsoup Differential Revision: D64092477 fbshipit-source-id: 4489b82f8b1d83a390721a280bc6942f2fbc4158 --- fboss/led_service/hw_test/LedServiceTest.cpp | 55 +++++++++++++------- fboss/led_service/hw_test/LedServiceTest.h | 2 +- 2 files changed, 37 insertions(+), 20 deletions(-) diff --git a/fboss/led_service/hw_test/LedServiceTest.cpp b/fboss/led_service/hw_test/LedServiceTest.cpp index c7c2d6753b4d9..a9769bd4bb1cb 100644 --- a/fboss/led_service/hw_test/LedServiceTest.cpp +++ b/fboss/led_service/hw_test/LedServiceTest.cpp @@ -131,17 +131,21 @@ TEST_F(LedServiceTest, checkForceLed) { } } -void LedServiceTest::checkLedColor(PortID port, enum led::LedColor color) { +void LedServiceTest::checkLedColor( + PortID port, + enum led::LedColor color, + int testNum) { auto portName = platformMap_->getPortNameByPortId(port); CHECK(portName.has_value()); auto currentColor = ledManager_->getCurrentLedColor(port); auto ledState = ledManager_->getPortLedState(portName.value()); EXPECT_EQ(currentColor, color) << "LED color should be " << enumToName(color) - << " for port " << portName.value(); + << " for port " << portName.value() << " but current color is " + << enumToName(currentColor) << " for test " << testNum; EXPECT_EQ(ledState.currentLedState()->ledColor().value(), color) << "LED state should be " << enumToName(color) - << " for port " << portName.value(); + << " for port " << portName.value() << " for test " << testNum; // If the flags is specified, add a delay to enable seeing the LED change sleep(FLAGS_visual_delay_sec); } @@ -151,11 +155,15 @@ TEST_F(LedServiceTest, checkLedColorChange) { std::sort(transceivers.begin(), transceivers.end()); for (auto tcvr : transceivers) { + XLOG(INFO) << "Testing transceiver " << tcvr; auto swPorts = platformMap_->getSwPortListFromTransceiverId(tcvr); for (auto& swPort : swPorts) { // Do the first update from FSDB to LedService. LED set to inactive. auto maxSpeed = platformMap_->getPortMaxSpeed(swPort); auto profile = platformMap_->getProfileIDBySpeed(swPort, maxSpeed); + XLOG(INFO) << "Testing SW Port " << swPort << " with speed " + << enumToName(maxSpeed) << " and profile " + << enumToName(profile); LedManager::LedSwitchStateUpdate ledUpdate = { static_cast(swPort), "", @@ -170,52 +178,52 @@ TEST_F(LedServiceTest, checkLedColorChange) { auto swPortName = platformMap_->getPortNameByPortId(swPort); CHECK(swPortName.has_value()); + int testNum = 0; // 1- Verify Default creation with operational state = false that the // LED color is off. - checkLedColor(swPort, led::LedColor::OFF); + checkLedColor(swPort, led::LedColor::OFF, ++testNum); // 2- Set the operational state to true, verify that the LED color // is not off anymore. Platform determines its own on color. updateMap[swPort].operState = true; ledManager_->updateLedStatus(updateMap); auto colorBefore = ledManager_->getCurrentLedColor(swPort); - auto ledState = ledManager_->getPortLedState(swPortName.value()); EXPECT_NE(colorBefore, led::LedColor::OFF); - EXPECT_EQ(ledState.currentLedState()->ledColor().value(), colorBefore); + checkLedColor(swPort, colorBefore, ++testNum); // If the flags is specified, add a delay before forcing LED off - // to enable seeing the LED change + // to enable visual test for the LED change sleep(FLAGS_visual_delay_sec); // 3- Force LED to be off. The LED color should be off. ledManager_->setExternalLedState( swPort, PortLedExternalState::EXTERNAL_FORCE_OFF); - checkLedColor(swPort, led::LedColor::OFF); + checkLedColor(swPort, led::LedColor::OFF, ++testNum); // 4- Unforce LED Off. LED should go back to the previous color. ledManager_->setExternalLedState(swPort, PortLedExternalState::NONE); - checkLedColor(swPort, colorBefore); + checkLedColor(swPort, colorBefore, ++testNum); // 5- Force LED to be on. The LED color should not be off. // Each platform determines its own on color. ledManager_->setExternalLedState( swPort, PortLedExternalState::EXTERNAL_FORCE_ON); auto onLedColorExpected = ledManager_->forcedOnColor(); - checkLedColor(swPort, onLedColorExpected); + checkLedColor(swPort, onLedColorExpected, ++testNum); // 6- Unforce LED On. LED should go back to the previous color. ledManager_->setExternalLedState(swPort, PortLedExternalState::NONE); - checkLedColor(swPort, colorBefore); + checkLedColor(swPort, colorBefore, ++testNum); // 7- Set the cabling error, expect yellow LED. updateMap[swPort].ledExternalState = PortLedExternalState::CABLING_ERROR; ledManager_->updateLedStatus(updateMap); - checkLedColor(swPort, led::LedColor::YELLOW); + checkLedColor(swPort, led::LedColor::YELLOW, ++testNum); // 8- Remove the cabling error, check the LED color goes back updateMap[swPort].ledExternalState = PortLedExternalState::NONE; ledManager_->updateLedStatus(updateMap); - checkLedColor(swPort, colorBefore); + checkLedColor(swPort, colorBefore, ++testNum); // 9- Set the cabling error, force LED ON, check the LED color is on, and // not yellow. @@ -223,30 +231,39 @@ TEST_F(LedServiceTest, checkLedColorChange) { ledManager_->updateLedStatus(updateMap); ledManager_->setExternalLedState( swPort, PortLedExternalState::EXTERNAL_FORCE_ON); - checkLedColor(swPort, onLedColorExpected); + checkLedColor(swPort, onLedColorExpected, ++testNum); // 10 - Remove force on, LED should go back to cabling error. ledManager_->setExternalLedState(swPort, PortLedExternalState::NONE); - checkLedColor(swPort, led::LedColor::YELLOW); + checkLedColor(swPort, led::LedColor::YELLOW, ++testNum); // 11- Force LED Off. ledManager_->setExternalLedState( swPort, PortLedExternalState::EXTERNAL_FORCE_OFF); - checkLedColor(swPort, led::LedColor::OFF); + checkLedColor(swPort, led::LedColor::OFF, ++testNum); // 12 - Remove force off, LED should go back to cabling error. ledManager_->setExternalLedState(swPort, PortLedExternalState::NONE); - checkLedColor(swPort, led::LedColor::YELLOW); + checkLedColor(swPort, led::LedColor::YELLOW, ++testNum); // 13 - Remove Cabling Error, LED should go back to original color. updateMap[swPort].ledExternalState = PortLedExternalState::NONE; ledManager_->updateLedStatus(updateMap); - checkLedColor(swPort, colorBefore); + checkLedColor(swPort, colorBefore, ++testNum); // 14 - Force LED Off. ledManager_->setExternalLedState( swPort, PortLedExternalState::EXTERNAL_FORCE_OFF); - checkLedColor(swPort, led::LedColor::OFF); + checkLedColor(swPort, led::LedColor::OFF, ++testNum); + + // 15 - Remove Force Off. LED should be in original color. + ledManager_->setExternalLedState(swPort, PortLedExternalState::NONE); + checkLedColor(swPort, colorBefore, ++testNum); + + // 16 - set Operational state off. Expect LED to be off. + updateMap[swPort].operState = false; + ledManager_->updateLedStatus(updateMap); + checkLedColor(swPort, led::LedColor::OFF, ++testNum); } } } diff --git a/fboss/led_service/hw_test/LedServiceTest.h b/fboss/led_service/hw_test/LedServiceTest.h index 1c1ca130c0a72..3c6fcd1a2803d 100644 --- a/fboss/led_service/hw_test/LedServiceTest.h +++ b/fboss/led_service/hw_test/LedServiceTest.h @@ -32,7 +32,7 @@ class LedServiceTest : public ::testing::Test { void SetUp() override; void TearDown() override; // Check the LED color. - void checkLedColor(PortID port, led::LedColor color); + void checkLedColor(PortID port, led::LedColor color, int testNum); facebook::fboss::LedManager* ledManager_ = nullptr; const facebook::fboss::PlatformMapping* platformMap_ = nullptr; From a47df147e7dd6c4fc6861ed1f16fd2107b57b979 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 9 Oct 2024 21:55:08 -0700 Subject: [PATCH 036/479] Add a test for sending pkts to unresolved remote neighbor Summary: Add a test for sending pkts to unresolved remote neighbor. Assert that these pkts get counted as pipeline discards and null route discards. Reviewed By: nivinl Differential Revision: D64140588 fbshipit-source-id: bc3c3a0bae3fac7254ed9df946b60a78df70c222 --- .../agent_hw_tests/AgentVoqSwitchTests.cpp | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp index ed7e36c339369..2486715f11e46 100644 --- a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp @@ -1907,6 +1907,73 @@ TEST_F(AgentVoqSwitchWithMultipleDsfNodesTest, voqTailDropCounter) { verifyAcrossWarmBoots(setup, verify); }; +TEST_F( + AgentVoqSwitchWithMultipleDsfNodesTest, + sendPktsToRemoteUnresolvedNeighbor) { + auto constexpr kRemotePortId = 401; + const SystemPortID kRemoteSysPortId(kRemotePortId); + auto setup = [=, this]() { + // in addRemoteIntfNodeCfg, we use numCores to calculate the remoteSwitchId + // keeping remote switch id passed below in sync with it + int numCores = + utility::checkSameAndGetAsic(getAgentEnsemble()->getL3Asics()) + ->getNumCores(); + applyNewState([&](const std::shared_ptr& in) { + return utility::addRemoteSysPort( + in, + scopeResolver(), + kRemoteSysPortId, + static_cast( + numCores * getAgentEnsemble()->getNumL3Asics())); + }); + const InterfaceID kIntfId(kRemotePortId); + applyNewState([&](const std::shared_ptr& in) { + return utility::addRemoteInterface( + in, + scopeResolver(), + kIntfId, + { + {folly::IPAddress("100::1"), 64}, + {folly::IPAddress("100.0.0.1"), 24}, + }); + }); + }; + + auto verify = [=, this]() { + PortID portId = masterLogicalInterfacePortIds()[0]; + folly::IPAddressV6 kNeighborIp("100::2"); + auto portStatsBefore = getLatestPortStats(portId); + auto switchDropStatsBefore = getAggregatedSwitchDropStats(); + sendPacket(kNeighborIp, portId); + WITH_RETRIES({ + auto portStatsAfter = getLatestPortStats(portId); + auto switchDropStatsAfter = getAggregatedSwitchDropStats(); + EXPECT_EVENTUALLY_EQ( + 1, + *portStatsAfter.inDiscardsRaw_() - *portStatsBefore.inDiscardsRaw_()); + EXPECT_EVENTUALLY_EQ( + 1, + *portStatsAfter.inDstNullDiscards_() - + *portStatsBefore.inDstNullDiscards_()); + EXPECT_EVENTUALLY_EQ( + *portStatsAfter.inDiscardsRaw_(), + *portStatsAfter.inDstNullDiscards_()); + EXPECT_EVENTUALLY_EQ( + *switchDropStatsAfter.ingressPacketPipelineRejectDrops() - + *switchDropStatsBefore.ingressPacketPipelineRejectDrops(), + 1); + // Pipeline reject drop, not a queue resolution drop, + // which happens say when a pkt comes in with a non router + // MAC + EXPECT_EQ( + *switchDropStatsAfter.queueResolutionDrops() - + *switchDropStatsBefore.queueResolutionDrops(), + 0); + }); + }; + verifyAcrossWarmBoots(setup, verify); +}; + TEST_F(AgentVoqSwitchWithMultipleDsfNodesTest, verifyDscpToVoqMapping) { folly::IPAddressV6 kNeighborIp("100::2"); auto constexpr remotePortId = 401; From 64a7c53c909da41f22645836fd3b3edc67402633 Mon Sep 17 00:00:00 2001 From: Ron He Date: Thu, 10 Oct 2024 00:23:28 -0700 Subject: [PATCH 037/479] Define gflag for hw agent connection timeout Summary: As titled. Add flag for sw agent to not wait forever on hw agent to connect. This would help agent hw tests to fail early if hw agent crashes on init. Reviewed By: jasmeetbagga Differential Revision: D64087159 fbshipit-source-id: da2cc101b5013cfad141bcd3c0a2d4e98f20bbd7 --- fboss/agent/AgentFeatures.cpp | 6 ++++++ fboss/agent/AgentFeatures.h | 1 + fboss/agent/HwSwitchConnectionStatusTable.cpp | 19 +++++++++++++++---- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/fboss/agent/AgentFeatures.cpp b/fboss/agent/AgentFeatures.cpp index 63e4ec6e47726..d5b5dc2d63064 100644 --- a/fboss/agent/AgentFeatures.cpp +++ b/fboss/agent/AgentFeatures.cpp @@ -134,3 +134,9 @@ DEFINE_bool( enable_balanced_intput_mode, true, "Enable balanced input mode on fabric devices"); + +DEFINE_int32( + hw_agent_connection_timeout_ms, + 0, + "Time to wait for HwSwitch to connect before SwSwitch exits. " + "By default, SwSwitch waits forever and hence default value is 0."); diff --git a/fboss/agent/AgentFeatures.h b/fboss/agent/AgentFeatures.h index 3117718c676b0..78c840e14ec6b 100644 --- a/fboss/agent/AgentFeatures.h +++ b/fboss/agent/AgentFeatures.h @@ -59,3 +59,4 @@ DECLARE_bool(detect_wrong_fabric_connections); DECLARE_bool(dsf_edsw_platform_mapping); DECLARE_bool(exit_for_any_hw_disconnect); DECLARE_bool(enable_balanced_intput_mode); +DECLARE_int32(hw_agent_connection_timeout_ms); diff --git a/fboss/agent/HwSwitchConnectionStatusTable.cpp b/fboss/agent/HwSwitchConnectionStatusTable.cpp index f4f865f95d778..e694ac5accb77 100644 --- a/fboss/agent/HwSwitchConnectionStatusTable.cpp +++ b/fboss/agent/HwSwitchConnectionStatusTable.cpp @@ -64,10 +64,21 @@ bool HwSwitchConnectionStatusTable::waitUntilHwSwitchConnected() { if (!connectedSwitches_.empty()) { return true; } - hwSwitchConnectedCV_.wait(lk, [this] { - return !connectedSwitches_.empty() || connectionWaitCancelled_; - }); - return !connectionWaitCancelled_; + if (FLAGS_hw_agent_connection_timeout_ms != 0) { + hwSwitchConnectedCV_.wait_for( + lk, + std::chrono::milliseconds(FLAGS_hw_agent_connection_timeout_ms), + [this] { + return !connectedSwitches_.empty() || connectionWaitCancelled_; + }); + return !connectedSwitches_.empty() && !connectionWaitCancelled_; + } else { + // Wait forever for HwSwitch to connect + hwSwitchConnectedCV_.wait(lk, [this] { + return !connectedSwitches_.empty() || connectionWaitCancelled_; + }); + return !connectionWaitCancelled_; + } } void HwSwitchConnectionStatusTable::cancelWait() { From 3802d331fe7cb0067d3db330ba56274b9095457b Mon Sep 17 00:00:00 2001 From: Ron He Date: Thu, 10 Oct 2024 00:23:28 -0700 Subject: [PATCH 038/479] Wait for 120s for hw agents to connect to sw switch Summary: As titled. Wait for 120s for hw agents to connect to sw switch. Reviewed By: jasmeetbagga Differential Revision: D64123733 fbshipit-source-id: 1214ec1c8ac3530b409a06c18f472278e6295580 --- cmake/AgentTest.cmake | 1 + fboss/agent/test/AgentEnsembleTest.cpp | 3 +++ fboss/agent/test/AgentHwTest.cpp | 2 ++ fboss/agent/test/BUCK | 1 + 4 files changed, 7 insertions(+) diff --git a/cmake/AgentTest.cmake b/cmake/AgentTest.cmake index 76d6140d3e332..cba8a64aa2633 100644 --- a/cmake/AgentTest.cmake +++ b/cmake/AgentTest.cmake @@ -110,6 +110,7 @@ target_link_libraries(agent_ensemble_test_lib qsfp_service_client fboss_config_utils agent_ensemble + agent_features qos_test_utils ${GTEST} ${LIBGMOCK_LIBRARIES} diff --git a/fboss/agent/test/AgentEnsembleTest.cpp b/fboss/agent/test/AgentEnsembleTest.cpp index de453a701d047..c1f1468205729 100644 --- a/fboss/agent/test/AgentEnsembleTest.cpp +++ b/fboss/agent/test/AgentEnsembleTest.cpp @@ -4,6 +4,7 @@ #include #include #include "fboss/agent/AgentConfig.h" +#include "fboss/agent/AgentFeatures.h" #include "fboss/agent/CommonInit.h" #include "fboss/agent/HwAsicTable.h" #include "fboss/agent/Main.h" @@ -57,6 +58,8 @@ void AgentEnsembleTest::setupAgentEnsemble() { void AgentEnsembleTest::setCmdLineFlagOverrides() const { // Looped ports are the common case in tests FLAGS_disable_looped_fabric_ports = false; + // Set HW agent connection timeout to 120 seconds + FLAGS_hw_agent_connection_timeout_ms = 120000; } void AgentEnsembleTest::TearDown() { diff --git a/fboss/agent/test/AgentHwTest.cpp b/fboss/agent/test/AgentHwTest.cpp index 60cf09f36cecd..607b1badba0d3 100644 --- a/fboss/agent/test/AgentHwTest.cpp +++ b/fboss/agent/test/AgentHwTest.cpp @@ -90,6 +90,8 @@ void AgentHwTest::setCmdLineFlagOverrides() const { FLAGS_detect_wrong_fabric_connections = false; // Disable DSF subscription on single-box test FLAGS_dsf_subscribe = false; + // Set HW agent connection timeout to 120 seconds + FLAGS_hw_agent_connection_timeout_ms = 120000; } void AgentHwTest::TearDown() { diff --git a/fboss/agent/test/BUCK b/fboss/agent/test/BUCK index faae147d14c1b..bf780ebe3a72c 100644 --- a/fboss/agent/test/BUCK +++ b/fboss/agent/test/BUCK @@ -462,6 +462,7 @@ cpp_library( exported_deps = [ "fbsource//third-party/googletest:gtest", ":agent_ensemble", + "//fboss/agent:agent_features", "//fboss/agent:fboss_common_init", "//fboss/agent:hw_asic_table", "//fboss/agent:hw_switch", From 4dbfc6e3fd2937ae28795d451f936e3cc06d23ba Mon Sep 17 00:00:00 2001 From: Mohammed Al-Sanabani Date: Thu, 10 Oct 2024 02:25:35 -0700 Subject: [PATCH 039/479] Sync newly added SERDES fields to fbcode Summary: title Adopted from D62925288 (Vasant) Reviewed By: harshitgulati18 Differential Revision: D63621992 fbshipit-source-id: c3b22c0323e41eda8d2282fb9ad7abad9cbd891e --- fboss/fsdb/if/oss/fsdb_model_thriftpath.h | 31 ++++++++++++++++++++--- fboss/lib/phy/phy.thrift | 5 ++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h index 8f1a00965779f..4f847e1c75815 100755 --- a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h +++ b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h @@ -5300,7 +5300,12 @@ std::pair>, std::pair>, std::pair>, -std::pair>>; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, @@ -5335,7 +5340,12 @@ std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -5371,7 +5381,12 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -5412,6 +5427,11 @@ std::pair auto operator()(const std::integral_constant&) { @@ -5450,6 +5470,11 @@ std::pair diff --git a/fboss/lib/phy/phy.thrift b/fboss/lib/phy/phy.thrift index 924374c3f5067..97d42f588b9ca 100644 --- a/fboss/lib/phy/phy.thrift +++ b/fboss/lib/phy/phy.thrift @@ -191,6 +191,11 @@ struct RxSettings { 33: optional i32 cdrTdetFineStepOvVal; 34: optional i32 ldoBypass; 35: optional i32 ffeLengthBitmap; + 36: optional i32 instgEnableScan; + 37: optional i32 dcwEn; + 38: optional i32 dcwStepCoarseOvVal; + 39: optional i32 dcwStepFineOvVal; + 40: optional i32 dcwOvEn; } struct LaneMap { From 8e730eacaaccdc96df7f0624f6ca5bce5ba22bac Mon Sep 17 00:00:00 2001 From: Mohammed Al-Sanabani Date: Thu, 10 Oct 2024 02:25:35 -0700 Subject: [PATCH 040/479] SAI attribut extensions for SERDES Summary: Adding the SAI attributes for kodiak3 serdes RX/TX paramters Reviewed By: srikrishnagopu Differential Revision: D63622004 fbshipit-source-id: ac852b8a36632dd754646b8da162fda4931726e4 --- fboss/agent/hw/sai/api/PortApi.h | 215 +++++++- fboss/agent/hw/sai/api/bcm/PortApi.cpp | 125 +++++ .../hw/sai/api/fake/FakeSaiExtensions.cpp | 125 +++++ .../agent/hw/sai/api/fake/saifakeextensions.h | 29 +- fboss/agent/hw/sai/api/oss/PortApi.cpp | 125 +++++ fboss/agent/hw/sai/api/tajo/PortApi.cpp | 134 +++++ fboss/agent/hw/sai/api/tests/PortApiTest.cpp | 29 +- fboss/agent/hw/sai/fake/FakeSaiPort.cpp | 471 ++++++++++++++++++ fboss/agent/hw/sai/fake/FakeSaiPort.h | 26 + fboss/agent/hw/sai/tracer/PortApiTracer.cpp | 26 + 10 files changed, 1300 insertions(+), 5 deletions(-) diff --git a/fboss/agent/hw/sai/api/PortApi.h b/fboss/agent/hw/sai/api/PortApi.h index 38ef69766056c..e1c46fff1b485 100644 --- a/fboss/agent/hw/sai/api/PortApi.h +++ b/fboss/agent/hw/sai/api/PortApi.h @@ -771,6 +771,167 @@ struct SaiPortSerdesTraits { using RxAfeAdaptiveEnable = SaiExtensionAttribute< std::vector, AttributeRxAfeAdaptiveEnableWrapper>; + // Tx Attributes + struct AttributeTxDiffEncoderEnWrapper { + std::optional operator()(); + }; + struct AttributeTxDigGainWrapper { + std::optional operator()(); + }; + struct AttributeTxFfeCoeff0Wrapper { + std::optional operator()(); + }; + struct AttributeTxFfeCoeff1Wrapper { + std::optional operator()(); + }; + struct AttributeTxFfeCoeff2Wrapper { + std::optional operator()(); + }; + struct AttributeTxFfeCoeff3Wrapper { + std::optional operator()(); + }; + struct AttributeTxFfeCoeff4Wrapper { + std::optional operator()(); + }; + struct AttributeTxDriverSwingWrapper { + std::optional operator()(); + }; + + // Rx Attributes + struct AttributeRxInstgBoost1StartWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgBoost1StepWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgBoost1StopWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgBoost2OrHrStartWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgBoost2OrHrStepWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgBoost2OrHrStopWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgC1Start1p7Wrapper { + std::optional operator()(); + }; + struct AttributeRxInstgC1Step1p7Wrapper { + std::optional operator()(); + }; + struct AttributeRxInstgC1Stop1p7Wrapper { + std::optional operator()(); + }; + struct AttributeRxInstgDfeStart1p7Wrapper { + std::optional operator()(); + }; + struct AttributeRxInstgDfeStep1p7Wrapper { + std::optional operator()(); + }; + struct AttributeRxInstgDfeStop1p7Wrapper { + std::optional operator()(); + }; + struct AttributeRxEnableScanSelectionWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgScanUseSrSettingsWrapper { + std::optional operator()(); + }; + struct AttributeRxCdrCfgOvEnWrapper { + std::optional operator()(); + }; + struct AttributeRxCdrTdet1stOrdStepOvValWrapper { + std::optional operator()(); + }; + struct AttributeRxCdrTdet2ndOrdStepOvValWrapper { + std::optional operator()(); + }; + struct AttributeRxCdrTdetFineStepOvValWrapper { + std::optional operator()(); + }; + + using TxDiffEncoderEn = SaiExtensionAttribute< + std::vector, + AttributeTxDiffEncoderEnWrapper>; + using TxDigGain = SaiExtensionAttribute< + std::vector, + AttributeTxDigGainWrapper>; + using TxFfeCoeff0 = SaiExtensionAttribute< + std::vector, + AttributeTxFfeCoeff0Wrapper>; + using TxFfeCoeff1 = SaiExtensionAttribute< + std::vector, + AttributeTxFfeCoeff1Wrapper>; + using TxFfeCoeff2 = SaiExtensionAttribute< + std::vector, + AttributeTxFfeCoeff2Wrapper>; + using TxFfeCoeff3 = SaiExtensionAttribute< + std::vector, + AttributeTxFfeCoeff3Wrapper>; + using TxFfeCoeff4 = SaiExtensionAttribute< + std::vector, + AttributeTxFfeCoeff4Wrapper>; + using TxDriverSwing = SaiExtensionAttribute< + std::vector, + AttributeTxDriverSwingWrapper>; + + using RxInstgBoost1Start = SaiExtensionAttribute< + std::vector, + AttributeRxInstgBoost1StartWrapper>; + using RxInstgBoost1Step = SaiExtensionAttribute< + std::vector, + AttributeRxInstgBoost1StepWrapper>; + using RxInstgBoost1Stop = SaiExtensionAttribute< + std::vector, + AttributeRxInstgBoost1StopWrapper>; + using RxInstgBoost2OrHrStart = SaiExtensionAttribute< + std::vector, + AttributeRxInstgBoost2OrHrStartWrapper>; + using RxInstgBoost2OrHrStep = SaiExtensionAttribute< + std::vector, + AttributeRxInstgBoost2OrHrStepWrapper>; + using RxInstgBoost2OrHrStop = SaiExtensionAttribute< + std::vector, + AttributeRxInstgBoost2OrHrStopWrapper>; + using RxInstgC1Start1p7 = SaiExtensionAttribute< + std::vector, + AttributeRxInstgC1Start1p7Wrapper>; + using RxInstgC1Step1p7 = SaiExtensionAttribute< + std::vector, + AttributeRxInstgC1Step1p7Wrapper>; + using RxInstgC1Stop1p7 = SaiExtensionAttribute< + std::vector, + AttributeRxInstgC1Stop1p7Wrapper>; + using RxInstgDfeStart1p7 = SaiExtensionAttribute< + std::vector, + AttributeRxInstgDfeStart1p7Wrapper>; + using RxInstgDfeStep1p7 = SaiExtensionAttribute< + std::vector, + AttributeRxInstgDfeStep1p7Wrapper>; + using RxInstgDfeStop1p7 = SaiExtensionAttribute< + std::vector, + AttributeRxInstgDfeStop1p7Wrapper>; + using RxEnableScanSelection = SaiExtensionAttribute< + std::vector, + AttributeRxEnableScanSelectionWrapper>; + using RxInstgScanUseSrSettings = SaiExtensionAttribute< + std::vector, + AttributeRxInstgScanUseSrSettingsWrapper>; + using RxCdrCfgOvEn = SaiExtensionAttribute< + std::vector, + AttributeRxCdrCfgOvEnWrapper>; + using RxCdrTdet1stOrdStepOvVal = SaiExtensionAttribute< + std::vector, + AttributeRxCdrTdet1stOrdStepOvValWrapper>; + using RxCdrTdet2ndOrdStepOvVal = SaiExtensionAttribute< + std::vector, + AttributeRxCdrTdet2ndOrdStepOvValWrapper>; + using RxCdrTdetFineStepOvVal = SaiExtensionAttribute< + std::vector, + AttributeRxCdrTdetFineStepOvValWrapper>; }; using AdapterKey = PortSerdesSaiId; using AdapterHostKey = Attributes::PortId; @@ -791,7 +952,33 @@ struct SaiPortSerdesTraits { std::optional, std::optional, std::optional, - std::optional>; + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional>; }; SAI_ATTRIBUTE_NAME(PortSerdes, PortId); @@ -810,6 +997,32 @@ SAI_ATTRIBUTE_NAME(PortSerdes, RxDspMode); SAI_ATTRIBUTE_NAME(PortSerdes, RxAfeTrim); SAI_ATTRIBUTE_NAME(PortSerdes, RxAcCouplingByPass); SAI_ATTRIBUTE_NAME(PortSerdes, RxAfeAdaptiveEnable); +SAI_ATTRIBUTE_NAME(PortSerdes, TxDiffEncoderEn); +SAI_ATTRIBUTE_NAME(PortSerdes, TxDigGain); +SAI_ATTRIBUTE_NAME(PortSerdes, TxFfeCoeff0); +SAI_ATTRIBUTE_NAME(PortSerdes, TxFfeCoeff1); +SAI_ATTRIBUTE_NAME(PortSerdes, TxFfeCoeff2); +SAI_ATTRIBUTE_NAME(PortSerdes, TxFfeCoeff3); +SAI_ATTRIBUTE_NAME(PortSerdes, TxFfeCoeff4); +SAI_ATTRIBUTE_NAME(PortSerdes, TxDriverSwing); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgBoost1Start); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgBoost1Step); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgBoost1Stop); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgBoost2OrHrStart); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgBoost2OrHrStep); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgBoost2OrHrStop); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgC1Start1p7); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgC1Step1p7); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgC1Stop1p7); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgDfeStart1p7); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgDfeStep1p7); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgDfeStop1p7); +SAI_ATTRIBUTE_NAME(PortSerdes, RxEnableScanSelection); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgScanUseSrSettings); +SAI_ATTRIBUTE_NAME(PortSerdes, RxCdrCfgOvEn); +SAI_ATTRIBUTE_NAME(PortSerdes, RxCdrTdet1stOrdStepOvVal); +SAI_ATTRIBUTE_NAME(PortSerdes, RxCdrTdet2ndOrdStepOvVal); +SAI_ATTRIBUTE_NAME(PortSerdes, RxCdrTdetFineStepOvVal); struct SaiPortConnectorTraits { static constexpr sai_object_type_t ObjectType = diff --git a/fboss/agent/hw/sai/api/bcm/PortApi.cpp b/fboss/agent/hw/sai/api/bcm/PortApi.cpp index d7d5908c7a8f0..788e62a1af233 100644 --- a/fboss/agent/hw/sai/api/bcm/PortApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/PortApi.cpp @@ -112,4 +112,129 @@ SaiPortTraits::Attributes::AttributeReachabilityGroup::operator()() { return std::nullopt; #endif } + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDiffEncoderEnWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDigGainWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff0Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff1Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff2Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff3Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff4Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDriverSwingWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StartWrapper::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StepWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StopWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStartWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStepWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStopWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Start1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Step1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Stop1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStart1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStep1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStop1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxEnableScanSelectionWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgScanUseSrSettingsWrapper ::operator()() { + return std::nullopt; +} +std::optional +SaiPortSerdesTraits::Attributes::AttributeRxCdrCfgOvEnWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet1stOrdStepOvValWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet2ndOrdStepOvValWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdetFineStepOvValWrapper ::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp index 2c4d0e466b921..0abc4c6390e26 100644 --- a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp +++ b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp @@ -262,4 +262,129 @@ std::optional SaiSwitchTraits::Attributes:: return SAI_SWITCH_ATTR_FABRIC_LLFC_THRESHOLD; } +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDiffEncoderEnWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_DIFF_ENCODER_EN; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDigGainWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_DIG_GAIN; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff0Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_0; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff1Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_1; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff2Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_2; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff3Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_3; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff4Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_4; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDriverSwingWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_DRIVER_SWING; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StartWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STRT; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StepWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STEP; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StopWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STOP; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStartWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STRT; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStepWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STEP; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStopWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STOP; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Start1p7Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_START_1P7; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Step1p7Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STEP_1P7; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Stop1p7Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STOP_1P7; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStart1p7Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_START_1P7; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStep1p7Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STEP_1P7; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStop1p7Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STOP_1P7; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxEnableScanSelectionWrapper ::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_ENABLE_SCAN; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgScanUseSrSettingsWrapper ::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_SCAN_USE_SR_SETTINGS; +} +std::optional +SaiPortSerdesTraits::Attributes::AttributeRxCdrCfgOvEnWrapper ::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_CDR_CFG_OV_EN; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet1stOrdStepOvValWrapper ::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_1ST_ORD_STEP_OV_VAL; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet2ndOrdStepOvValWrapper ::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_2ND_ORD_STEP_OV_VAL; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdetFineStepOvValWrapper ::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_FINE_STEP_OV_VAL; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/fake/saifakeextensions.h b/fboss/agent/hw/sai/api/fake/saifakeextensions.h index fb9499a7ce19e..5be04dede7339 100644 --- a/fboss/agent/hw/sai/api/fake/saifakeextensions.h +++ b/fboss/agent/hw/sai/api/fake/saifakeextensions.h @@ -20,6 +20,31 @@ typedef enum _sai_port_serdes_extensions_attr_t { SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_TABLE_START_ROW, SAI_PORT_SERDES_ATTR_EXT_RX_PARITY_ENCODER_EN, SAI_PORT_SERDES_ATTR_EXT_RX_THP_EN, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STRT, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STEP, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STOP, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STRT, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STEP, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STOP, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_START_1P7, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STEP_1P7, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STOP_1P7, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_START_1P7, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STEP_1P7, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STOP_1P7, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_ENABLE_SCAN, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_SCAN_USE_SR_SETTINGS, + SAI_PORT_SERDES_ATTR_EXT_RX_CDR_CFG_OV_EN, + SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_1ST_ORD_STEP_OV_VAL, + SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_2ND_ORD_STEP_OV_VAL, + SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_FINE_STEP_OV_VAL, + SAI_PORT_SERDES_ATTR_EXT_RX_DCW_EN, + SAI_PORT_SERDES_ATTR_EXT_RX_DCW_STEP_COARSE_OV_VAL, + SAI_PORT_SERDES_ATTR_EXT_RX_DCW_STEP_FINE_OV_VAL, + SAI_PORT_SERDES_ATTR_EXT_RX_DCW_OV_EN, + SAI_PORT_SERDES_ATTR_EXT_TX_PARITY_ENCODER_EN, + SAI_PORT_SERDES_ATTR_EXT_TX_THP_EN, + SAI_PORT_SERDES_ATTR_EXT_TX_LUT_MODE, SAI_PORT_SERDES_ATTR_EXT_TX_DIFF_ENCODER_EN, SAI_PORT_SERDES_ATTR_EXT_TX_DIG_GAIN, SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_0, @@ -27,9 +52,7 @@ typedef enum _sai_port_serdes_extensions_attr_t { SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_2, SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_3, SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_4, - SAI_PORT_SERDES_ATTR_EXT_TX_PARITY_ENCODER_EN, - SAI_PORT_SERDES_ATTR_EXT_TX_THP_EN, - SAI_PORT_SERDES_ATTR_EXT_TX_LUT_MODE, + SAI_PORT_SERDES_ATTR_EXT_TX_DRIVER_SWING } sai_port_serdes_extensions_attr_t; typedef enum _sai_switch_extensions_attr_t { diff --git a/fboss/agent/hw/sai/api/oss/PortApi.cpp b/fboss/agent/hw/sai/api/oss/PortApi.cpp index cb942624d1db9..d4e256957740e 100644 --- a/fboss/agent/hw/sai/api/oss/PortApi.cpp +++ b/fboss/agent/hw/sai/api/oss/PortApi.cpp @@ -68,4 +68,129 @@ std::optional SaiPortTraits::Attributes::AttributeReachabilityGroup::operator()() { return std::nullopt; } + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDiffEncoderEnWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDigGainWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff0Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff1Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff2Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff3Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff4Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDriverSwingWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StartWrapper::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StepWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StopWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStartWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStepWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStopWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Start1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Step1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Stop1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStart1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStep1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStop1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxEnableScanSelectionWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgScanUseSrSettingsWrapper ::operator()() { + return std::nullopt; +} +std::optional +SaiPortSerdesTraits::Attributes::AttributeRxCdrCfgOvEnWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet1stOrdStepOvValWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet2ndOrdStepOvValWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdetFineStepOvValWrapper ::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tajo/PortApi.cpp b/fboss/agent/hw/sai/api/tajo/PortApi.cpp index e9a62eada3fef..7520e1579b5aa 100644 --- a/fboss/agent/hw/sai/api/tajo/PortApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/PortApi.cpp @@ -8,6 +8,12 @@ extern "C" { #include } +#if defined(TAJO_SDK_GTE_24_4_90) +#define RETURN_SUPPORTED_ATTR(attr) return (attr); +#else +#define RETURN_SUPPORTED_ATTR(attr) return std::nullopt; +#endif + namespace facebook::fboss { std::optional SaiPortSerdesTraits::Attributes::AttributeTxLutModeIdWrapper::operator()() { @@ -72,4 +78,132 @@ std::optional SaiPortTraits::Attributes::AttributeReachabilityGroup::operator()() { return std::nullopt; } + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDiffEncoderEnWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_DIFF_ENCODER_EN); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDigGainWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_DIG_GAIN); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff0Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_0); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff1Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_1); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff2Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_2); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff3Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_3); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff4Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_4); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDriverSwingWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_DRIVER_SWING); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StartWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STRT); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StepWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STEP); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StopWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STOP); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStartWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STRT); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStepWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STEP); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStopWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STOP); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Start1p7Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_START_1P7); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Step1p7Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STEP_1P7); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Stop1p7Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STOP_1P7); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStart1p7Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_START_1P7); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStep1p7Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STEP_1P7); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStop1p7Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STOP_1P7); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxEnableScanSelectionWrapper ::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_ENABLE_SCAN); +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgScanUseSrSettingsWrapper ::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_SCAN_USE_SR_SETTINGS); +} +std::optional +SaiPortSerdesTraits::Attributes::AttributeRxCdrCfgOvEnWrapper ::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_CDR_CFG_OV_EN); +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet1stOrdStepOvValWrapper ::operator()() { + RETURN_SUPPORTED_ATTR( + SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_1ST_ORD_STEP_OV_VAL); +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet2ndOrdStepOvValWrapper ::operator()() { + RETURN_SUPPORTED_ATTR( + SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_2ND_ORD_STEP_OV_VAL); +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdetFineStepOvValWrapper ::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_FINE_STEP_OV_VAL); +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tests/PortApiTest.cpp b/fboss/agent/hw/sai/api/tests/PortApiTest.cpp index 79435c38ce5f5..f4ccfb909ee9a 100644 --- a/fboss/agent/hw/sai/api/tests/PortApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/PortApiTest.cpp @@ -110,7 +110,34 @@ class PortApiTest : public ::testing::Test { rxDspMode, rxAfeTrim, rxAcCouplingByPass, - rxAfeAdaptiveEnable}; + rxAfeAdaptiveEnable, + std::nullopt, // txDiffEncoderEn + std::nullopt, // txDigGain + std::nullopt, // txFfeCoeff0 + std::nullopt, // txFfeCoeff1 + std::nullopt, // txFfeCoeff2 + std::nullopt, // txFfeCoeff3 + std::nullopt, // txFfeCoeff4 + std::nullopt, // txDriverSwing + std::nullopt, // rxInstgBoost1Start + std::nullopt, // rxInstgBoost1Step + std::nullopt, // rxInstgBoost1Stop + std::nullopt, // rxInstgBoost2OrHrStart + std::nullopt, // rxInstgBoost2OrHrStep + std::nullopt, // rxInstgBoost2OrHrStop + std::nullopt, // rxInstgC1Start1p7 + std::nullopt, // rxInstgC1Step1p7 + std::nullopt, // rxInstgC1Stop1p7 + std::nullopt, // rxInstgDfeStart1p7 + std::nullopt, // rxInstgDfeStep1p7 + std::nullopt, // rxInstgDfeStop1p7 + std::nullopt, // rxEnableScanSelection + std::nullopt, // rxInstgScanUseSrSettings + std::nullopt, // rxCdrCfgOvEn + std::nullopt, // rxCdrTdet1stOrdStepOvVal + std::nullopt, // rxCdrTdet2ndOrdStepOvVal + std::nullopt, // rxCdrTdetFineStepOvVal + }; return portApi->create(a, 0 /*switch id*/); } diff --git a/fboss/agent/hw/sai/fake/FakeSaiPort.cpp b/fboss/agent/hw/sai/fake/FakeSaiPort.cpp index 85f2577479bf7..f3f00dce9482d 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiPort.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiPort.cpp @@ -1332,6 +1332,240 @@ sai_status_t set_port_serdes_attribute_fn( return SAI_STATUS_INVALID_ATTRIBUTE_0; } break; + case SAI_PORT_SERDES_ATTR_EXT_TX_DIFF_ENCODER_EN: + fillVec( + portSerdes.txDiffEncoderEn, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txDiffEncoderEn)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_DIG_GAIN: + fillVec( + portSerdes.txDigGain, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txDigGain)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_0: + fillVec( + portSerdes.txFfeCoeff0, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txFfeCoeff0)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_1: + fillVec( + portSerdes.txFfeCoeff1, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txFfeCoeff1)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_2: + fillVec( + portSerdes.txFfeCoeff2, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txFfeCoeff2)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_3: + fillVec( + portSerdes.txFfeCoeff3, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txFfeCoeff3)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_4: + fillVec( + portSerdes.txFfeCoeff4, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txFfeCoeff4)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_DRIVER_SWING: + fillVec( + portSerdes.txDriverSwing, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txDriverSwing)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STRT: + fillVec( + portSerdes.rxInstgBoost1Start, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgBoost1Start)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STEP: + fillVec( + portSerdes.rxInstgBoost1Step, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgBoost1Step)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STOP: + fillVec( + portSerdes.rxInstgBoost1Stop, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgBoost1Stop)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STRT: + fillVec( + portSerdes.rxInstgBoost2OrHrStart, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgBoost2OrHrStart)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STEP: + fillVec( + portSerdes.rxInstgBoost2OrHrStep, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgBoost2OrHrStep)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STOP: + fillVec( + portSerdes.rxInstgBoost2OrHrStop, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgBoost2OrHrStop)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_START_1P7: + fillVec( + portSerdes.rxInstgC1Start1p7, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgC1Start1p7)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STEP_1P7: + fillVec( + portSerdes.rxInstgC1Step1p7, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgC1Step1p7)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STOP_1P7: + fillVec( + portSerdes.rxInstgC1Stop1p7, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgC1Stop1p7)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_START_1P7: + fillVec( + portSerdes.rxInstgDfeStart1p7, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgDfeStart1p7)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STEP_1P7: + fillVec( + portSerdes.rxInstgDfeStep1p7, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgDfeStep1p7)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STOP_1P7: + fillVec( + portSerdes.rxInstgDfeStop1p7, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgDfeStop1p7)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_ENABLE_SCAN: + fillVec( + portSerdes.rxEnableScanSelection, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxEnableScanSelection)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_SCAN_USE_SR_SETTINGS: + fillVec( + portSerdes.rxInstgScanUseSrSettings, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgScanUseSrSettings)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_CFG_OV_EN: + fillVec( + portSerdes.rxCdrCfgOvEn, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxCdrCfgOvEn)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_1ST_ORD_STEP_OV_VAL: + fillVec( + portSerdes.rxCdrTdet1stOrdStepOvVal, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxCdrTdet1stOrdStepOvVal)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_2ND_ORD_STEP_OV_VAL: + fillVec( + portSerdes.rxCdrTdet2ndOrdStepOvVal, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxCdrTdet2ndOrdStepOvVal)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_FINE_STEP_OV_VAL: + fillVec( + portSerdes.rxCdrTdetFineStepOvVal, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxCdrTdetFineStepOvVal)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; default: return SAI_STATUS_NOT_SUPPORTED; } @@ -1472,6 +1706,243 @@ sai_status_t get_port_serdes_attribute_fn( copyVecToList( portSerdes.rxAfeTrimAdaptiveEnable, attr_list[i].value.s32list); break; + case SAI_PORT_SERDES_ATTR_EXT_TX_DIFF_ENCODER_EN: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txDiffEncoderEn)) { + attr_list[i].value.s32list.count = portSerdes.txDiffEncoderEn.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txDiffEncoderEn, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_DIG_GAIN: + if (!checkListSize(attr_list[i].value.s32list, portSerdes.txDigGain)) { + attr_list[i].value.s32list.count = portSerdes.txDigGain.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txDigGain, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_0: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txFfeCoeff0)) { + attr_list[i].value.s32list.count = portSerdes.txFfeCoeff0.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txFfeCoeff0, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_1: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txFfeCoeff1)) { + attr_list[i].value.s32list.count = portSerdes.txFfeCoeff1.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txFfeCoeff1, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_2: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txFfeCoeff2)) { + attr_list[i].value.s32list.count = portSerdes.txFfeCoeff2.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txFfeCoeff2, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_3: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txFfeCoeff3)) { + attr_list[i].value.s32list.count = portSerdes.txFfeCoeff3.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txFfeCoeff3, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_4: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txFfeCoeff4)) { + attr_list[i].value.s32list.count = portSerdes.txFfeCoeff4.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txFfeCoeff4, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_DRIVER_SWING: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txDriverSwing)) { + attr_list[i].value.s32list.count = portSerdes.txDriverSwing.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txDriverSwing, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STRT: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgBoost1Start)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgBoost1Start.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxInstgBoost1Start, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STEP: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgBoost1Step)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgBoost1Step.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgBoost1Step, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STOP: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgBoost1Stop)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgBoost1Stop.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgBoost1Stop, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STRT: + if (!checkListSize( + attr_list[i].value.s32list, + portSerdes.rxInstgBoost2OrHrStart)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgBoost2OrHrStart.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxInstgBoost2OrHrStart, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STEP: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgBoost2OrHrStep)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgBoost2OrHrStep.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxInstgBoost2OrHrStep, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STOP: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgBoost2OrHrStop)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgBoost2OrHrStop.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxInstgBoost2OrHrStop, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_START_1P7: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgC1Start1p7)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgC1Start1p7.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgC1Start1p7, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STEP_1P7: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgC1Step1p7)) { + attr_list[i].value.s32list.count = portSerdes.rxInstgC1Step1p7.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgC1Step1p7, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STOP_1P7: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgC1Stop1p7)) { + attr_list[i].value.s32list.count = portSerdes.rxInstgC1Stop1p7.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgC1Stop1p7, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_START_1P7: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgDfeStart1p7)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgDfeStart1p7.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxInstgDfeStart1p7, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STEP_1P7: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgDfeStep1p7)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgDfeStep1p7.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgDfeStep1p7, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STOP_1P7: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgDfeStop1p7)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgDfeStop1p7.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgDfeStop1p7, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_ENABLE_SCAN: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxEnableScanSelection)) { + attr_list[i].value.s32list.count = + portSerdes.rxEnableScanSelection.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxEnableScanSelection, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_SCAN_USE_SR_SETTINGS: + if (!checkListSize( + attr_list[i].value.s32list, + portSerdes.rxInstgScanUseSrSettings)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgScanUseSrSettings.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxInstgScanUseSrSettings, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_CFG_OV_EN: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxCdrCfgOvEn)) { + attr_list[i].value.s32list.count = portSerdes.rxCdrCfgOvEn.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxCdrCfgOvEn, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_1ST_ORD_STEP_OV_VAL: + if (!checkListSize( + attr_list[i].value.s32list, + portSerdes.rxCdrTdet1stOrdStepOvVal)) { + attr_list[i].value.s32list.count = + portSerdes.rxCdrTdet1stOrdStepOvVal.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxCdrTdet1stOrdStepOvVal, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_2ND_ORD_STEP_OV_VAL: + if (!checkListSize( + attr_list[i].value.s32list, + portSerdes.rxCdrTdet2ndOrdStepOvVal)) { + attr_list[i].value.s32list.count = + portSerdes.rxCdrTdet2ndOrdStepOvVal.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxCdrTdet2ndOrdStepOvVal, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_FINE_STEP_OV_VAL: + if (!checkListSize( + attr_list[i].value.s32list, + portSerdes.rxCdrTdetFineStepOvVal)) { + attr_list[i].value.s32list.count = + portSerdes.rxCdrTdetFineStepOvVal.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxCdrTdetFineStepOvVal, attr_list[i].value.s32list); + break; default: return SAI_STATUS_NOT_IMPLEMENTED; } diff --git a/fboss/agent/hw/sai/fake/FakeSaiPort.h b/fboss/agent/hw/sai/fake/FakeSaiPort.h index c872f32116b0f..dbf3e47f17dff 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiPort.h +++ b/fboss/agent/hw/sai/fake/FakeSaiPort.h @@ -123,6 +123,32 @@ struct FakePortSerdes { std::vector rxAfeTrim; std::vector rxCouplingByPass; std::vector rxAfeTrimAdaptiveEnable; + std::vector txDiffEncoderEn; + std::vector txDigGain; + std::vector txFfeCoeff0; + std::vector txFfeCoeff1; + std::vector txFfeCoeff2; + std::vector txFfeCoeff3; + std::vector txFfeCoeff4; + std::vector txDriverSwing; + std::vector rxInstgBoost1Start; + std::vector rxInstgBoost1Step; + std::vector rxInstgBoost1Stop; + std::vector rxInstgBoost2OrHrStart; + std::vector rxInstgBoost2OrHrStep; + std::vector rxInstgBoost2OrHrStop; + std::vector rxInstgC1Start1p7; + std::vector rxInstgC1Step1p7; + std::vector rxInstgC1Stop1p7; + std::vector rxInstgDfeStart1p7; + std::vector rxInstgDfeStep1p7; + std::vector rxInstgDfeStop1p7; + std::vector rxEnableScanSelection; + std::vector rxInstgScanUseSrSettings; + std::vector rxCdrCfgOvEn; + std::vector rxCdrTdet1stOrdStepOvVal; + std::vector rxCdrTdet2ndOrdStepOvVal; + std::vector rxCdrTdetFineStepOvVal; }; struct FakePortConnector { diff --git a/fboss/agent/hw/sai/tracer/PortApiTracer.cpp b/fboss/agent/hw/sai/tracer/PortApiTracer.cpp index 8eb6d69be7f84..ba5e0728b60dc 100644 --- a/fboss/agent/hw/sai/tracer/PortApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/PortApiTracer.cpp @@ -145,6 +145,32 @@ void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(Port, CablePropogationDelayNS) SAI_EXT_ATTR_MAP(Port, FabricDataCellsFilterStatus) SAI_EXT_ATTR_MAP(Port, ReachabilityGroup) + SAI_EXT_ATTR_MAP(PortSerdes, TxDiffEncoderEn) + SAI_EXT_ATTR_MAP(PortSerdes, TxDigGain) + SAI_EXT_ATTR_MAP(PortSerdes, TxFfeCoeff0) + SAI_EXT_ATTR_MAP(PortSerdes, TxFfeCoeff1) + SAI_EXT_ATTR_MAP(PortSerdes, TxFfeCoeff2) + SAI_EXT_ATTR_MAP(PortSerdes, TxFfeCoeff3) + SAI_EXT_ATTR_MAP(PortSerdes, TxFfeCoeff4) + SAI_EXT_ATTR_MAP(PortSerdes, TxDriverSwing) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgBoost1Start) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgBoost1Step) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgBoost1Stop) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgBoost2OrHrStart) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgBoost2OrHrStep) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgBoost2OrHrStop) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgC1Start1p7) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgC1Step1p7) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgC1Stop1p7) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgDfeStart1p7) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgDfeStep1p7) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgDfeStop1p7) + SAI_EXT_ATTR_MAP(PortSerdes, RxEnableScanSelection) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgScanUseSrSettings) + SAI_EXT_ATTR_MAP(PortSerdes, RxCdrCfgOvEn) + SAI_EXT_ATTR_MAP(PortSerdes, RxCdrTdet1stOrdStepOvVal) + SAI_EXT_ATTR_MAP(PortSerdes, RxCdrTdet2ndOrdStepOvVal) + SAI_EXT_ATTR_MAP(PortSerdes, RxCdrTdetFineStepOvVal) } } // namespace From 843e39d9f141287e9e19a46710c4e53da5dacc49 Mon Sep 17 00:00:00 2001 From: Mohammed Al-Sanabani Date: Thu, 10 Oct 2024 02:25:35 -0700 Subject: [PATCH 041/479] Configure Port SERDES Settings Summary: Title Reviewed By: srikrishnagopu Differential Revision: D63622021 fbshipit-source-id: 4d442829daa0ad528c9217d7bb763c7ab2d942a4 --- .../hw/sai/switch/npu/SaiPortManager.cpp | 212 ++++++++++++++++++ 1 file changed, 212 insertions(+) diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index 68ffd944071bb..8749667c4634b 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -981,6 +981,49 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( SaiPortSerdesTraits::Attributes::RxAfeTrim::ValueType rxAfeTrim; SaiPortSerdesTraits::Attributes::RxAcCouplingByPass::ValueType rxAcCouplingByPass; + // TX Params + SaiPortSerdesTraits::Attributes::TxDiffEncoderEn::ValueType txDiffEncoderEn; + SaiPortSerdesTraits::Attributes::TxDigGain::ValueType txDigGain; + SaiPortSerdesTraits::Attributes::TxFfeCoeff0::ValueType txFfeCoeff0; + SaiPortSerdesTraits::Attributes::TxFfeCoeff1::ValueType txFfeCoeff1; + SaiPortSerdesTraits::Attributes::TxFfeCoeff2::ValueType txFfeCoeff2; + SaiPortSerdesTraits::Attributes::TxFfeCoeff3::ValueType txFfeCoeff3; + SaiPortSerdesTraits::Attributes::TxFfeCoeff4::ValueType txFfeCoeff4; + SaiPortSerdesTraits::Attributes::TxDriverSwing::ValueType txDriverSwing; + // RX Params + SaiPortSerdesTraits::Attributes::RxInstgBoost1Start::ValueType + rxInstgBoost1Start; + SaiPortSerdesTraits::Attributes::RxInstgBoost1Step::ValueType + rxInstgBoost1Step; + SaiPortSerdesTraits::Attributes::RxInstgBoost1Stop::ValueType + rxInstgBoost1Stop; + SaiPortSerdesTraits::Attributes::RxInstgBoost2OrHrStart::ValueType + rxInstgBoost2OrHrStart; + SaiPortSerdesTraits::Attributes::RxInstgBoost2OrHrStep::ValueType + rxInstgBoost2OrHrStep; + SaiPortSerdesTraits::Attributes::RxInstgBoost2OrHrStop::ValueType + rxInstgBoost2OrHrStop; + SaiPortSerdesTraits::Attributes::RxInstgC1Start1p7::ValueType + rxInstgC1Start1p7; + SaiPortSerdesTraits::Attributes::RxInstgC1Step1p7::ValueType rxInstgC1Step1p7; + SaiPortSerdesTraits::Attributes::RxInstgC1Stop1p7::ValueType rxInstgC1Stop1p7; + SaiPortSerdesTraits::Attributes::RxInstgDfeStart1p7::ValueType + rxInstgDfeStart1p7; + SaiPortSerdesTraits::Attributes::RxInstgDfeStep1p7::ValueType + rxInstgDfeStep1p7; + SaiPortSerdesTraits::Attributes::RxInstgDfeStop1p7::ValueType + rxInstgDfeStop1p7; + SaiPortSerdesTraits::Attributes::RxEnableScanSelection::ValueType + rxEnableScanSelection; + SaiPortSerdesTraits::Attributes::RxInstgScanUseSrSettings::ValueType + rxInstgScanUseSrSettings; + SaiPortSerdesTraits::Attributes::RxCdrCfgOvEn::ValueType rxCdrCfgOvEn; + SaiPortSerdesTraits::Attributes::RxCdrTdet1stOrdStepOvVal::ValueType + rxCdrTdet1stOrdStepOvVal; + SaiPortSerdesTraits::Attributes::RxCdrTdet2ndOrdStepOvVal::ValueType + rxCdrTdet2ndOrdStepOvVal; + SaiPortSerdesTraits::Attributes::RxCdrTdetFineStepOvVal::ValueType + rxCdrTdetFineStepOvVal; // Now use pinConfigs from SW port as the source of truth auto numExpectedTxLanes = 0; @@ -1005,6 +1048,30 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( if (auto firPost1 = tx->firPost1()) { txPost1.push_back(*firPost1); } + if (auto diffEncoderEn = tx->diffEncoderEn()) { + txDiffEncoderEn.push_back(diffEncoderEn.value()); + } + if (auto digGain = tx->digGain()) { + txDigGain.push_back(digGain.value()); + } + if (auto ffeCoeff0 = tx->ffeCoeff0()) { + txFfeCoeff0.push_back(ffeCoeff0.value()); + } + if (auto ffeCoeff1 = tx->ffeCoeff1()) { + txFfeCoeff1.push_back(ffeCoeff1.value()); + } + if (auto ffeCoeff2 = tx->ffeCoeff2()) { + txFfeCoeff2.push_back(ffeCoeff2.value()); + } + if (auto ffeCoeff3 = tx->ffeCoeff3()) { + txFfeCoeff3.push_back(ffeCoeff3.value()); + } + if (auto ffeCoeff4 = tx->ffeCoeff4()) { + txFfeCoeff4.push_back(ffeCoeff4.value()); + } + if (auto driverSwing = tx->driverSwing()) { + txDriverSwing.push_back(driverSwing.value()); + } } else { txPre1.push_back(*tx->pre()); txMain.push_back(*tx->main()); @@ -1045,6 +1112,61 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( if (auto acCouplingByPass = rx->acCouplingBypass()) { rxAcCouplingByPass.push_back(*acCouplingByPass); } + // RX Params + if (auto instgBoost1Start = rx->instgBoost1Start()) { + rxInstgBoost1Start.push_back(instgBoost1Start.value()); + } + if (auto instgBoost1Step = rx->instgBoost1Step()) { + rxInstgBoost1Step.push_back(instgBoost1Step.value()); + } + if (auto instgBoost1Stop = rx->instgBoost1Stop()) { + rxInstgBoost1Stop.push_back(instgBoost1Stop.value()); + } + if (auto instgBoost2OrHrStart = rx->instgBoost2OrHrStart()) { + rxInstgBoost2OrHrStart.push_back(instgBoost2OrHrStart.value()); + } + if (auto instgBoost2OrHrStep = rx->instgBoost2OrHrStep()) { + rxInstgBoost2OrHrStep.push_back(instgBoost2OrHrStep.value()); + } + if (auto instgBoost2OrHrStop = rx->instgBoost2OrHrStop()) { + rxInstgBoost2OrHrStop.push_back(instgBoost2OrHrStop.value()); + } + if (auto instgC1Start1p7 = rx->instgC1Start1p7()) { + rxInstgC1Start1p7.push_back(instgC1Start1p7.value()); + } + if (auto instgC1Step1p7 = rx->instgC1Step1p7()) { + rxInstgC1Step1p7.push_back(instgC1Step1p7.value()); + } + if (auto instgC1Stop1p7 = rx->instgC1Stop1p7()) { + rxInstgC1Stop1p7.push_back(instgC1Stop1p7.value()); + } + if (auto instgDfeStart1p7 = rx->instgDfeStart1p7()) { + rxInstgDfeStart1p7.push_back(instgDfeStart1p7.value()); + } + if (auto instgDfeStep1p7 = rx->instgDfeStep1p7()) { + rxInstgDfeStep1p7.push_back(instgDfeStep1p7.value()); + } + if (auto instgDfeStop1p7 = rx->instgDfeStop1p7()) { + rxInstgDfeStop1p7.push_back(instgDfeStop1p7.value()); + } + if (auto enableScanSelection = rx->enableScanSelection()) { + rxEnableScanSelection.push_back(enableScanSelection.value()); + } + if (auto instgScanUseSrSettings = rx->instgScanUseSrSettings()) { + rxInstgScanUseSrSettings.push_back(instgScanUseSrSettings.value()); + } + if (auto cdrCfgOvEn = rx->cdrCfgOvEn()) { + rxCdrCfgOvEn.push_back(cdrCfgOvEn.value()); + } + if (auto cdrTdet1stOrdStepOvVal = rx->cdrTdet1stOrdStepOvVal()) { + rxCdrTdet1stOrdStepOvVal.push_back(cdrTdet1stOrdStepOvVal.value()); + } + if (auto cdrTdet2ndOrdStepOvVal = rx->cdrTdet2ndOrdStepOvVal()) { + rxCdrTdet2ndOrdStepOvVal.push_back(cdrTdet2ndOrdStepOvVal.value()); + } + if (auto cdrTdetFineStepOvVal = rx->cdrTdetFineStepOvVal()) { + rxCdrTdetFineStepOvVal.push_back(cdrTdetFineStepOvVal.value()); + } } } @@ -1072,6 +1194,96 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { setTxRxAttr( attrs, SaiPortSerdesTraits::Attributes::TxLutMode{}, txLutMode); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::TxDiffEncoderEn{}, + txDiffEncoderEn); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::TxDigGain{}, txDigGain); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::TxFfeCoeff0{}, txFfeCoeff0); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::TxFfeCoeff1{}, txFfeCoeff1); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::TxFfeCoeff2{}, txFfeCoeff2); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::TxFfeCoeff3{}, txFfeCoeff3); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::TxFfeCoeff4{}, txFfeCoeff4); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::TxDriverSwing{}, + txDriverSwing); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgBoost1Start{}, + rxInstgBoost1Start); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgBoost1Step{}, + rxInstgBoost1Step); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgBoost1Stop{}, + rxInstgBoost1Stop); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgBoost2OrHrStart{}, + rxInstgBoost2OrHrStart); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgBoost2OrHrStep{}, + rxInstgBoost2OrHrStep); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgBoost2OrHrStop{}, + rxInstgBoost2OrHrStop); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgC1Start1p7{}, + rxInstgC1Start1p7); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgC1Step1p7{}, + rxInstgC1Step1p7); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgC1Stop1p7{}, + rxInstgC1Stop1p7); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgDfeStart1p7{}, + rxInstgDfeStart1p7); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgDfeStep1p7{}, + rxInstgDfeStep1p7); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgDfeStop1p7{}, + rxInstgDfeStop1p7); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxEnableScanSelection{}, + rxEnableScanSelection); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgScanUseSrSettings{}, + rxInstgScanUseSrSettings); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::RxCdrCfgOvEn{}, rxCdrCfgOvEn); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxCdrTdet1stOrdStepOvVal{}, + rxCdrTdet1stOrdStepOvVal); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxCdrTdet2ndOrdStepOvVal{}, + rxCdrTdet2ndOrdStepOvVal); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxCdrTdetFineStepOvVal{}, + rxCdrTdetFineStepOvVal); } } From feb1c28c8e1d3339a2a366c7367a31123d6035dc Mon Sep 17 00:00:00 2001 From: Mohammed Al-Sanabani Date: Thu, 10 Oct 2024 02:25:35 -0700 Subject: [PATCH 042/479] Enable Serdes Programming Summary: Adopted from D62783532 (Vasant Patil) Reviewed By: harshitgulati18 Differential Revision: D64155997 fbshipit-source-id: fdc2274e69c791b371fc47211325ae06c5a371fb --- fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h b/fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h index 76080f72cdec1..d0dc2bbd50d95 100644 --- a/fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h +++ b/fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h @@ -25,7 +25,7 @@ class SaiMorgan800ccPlatform : public SaiTajoPlatform { std::string getHwConfig() override; HwAsic* getAsic() const override; bool isSerdesApiSupported() const override { - return false; + return true; } private: From 8bc069cf9ce8b5909e2c805e51bfa350da89a268 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Thu, 10 Oct 2024 08:46:13 -0700 Subject: [PATCH 043/479] Implement initial config validator Summary: Checks on SlotPath and duplication Checks on Sensor Name and duplication Checks on Sensor sysfs path. Validation on new PM based thrift structs only. Will iterate on this. Reviewed By: rationalis Differential Revision: D63985952 fbshipit-source-id: a1df700e9d7620bb69feada2639e2b22d77cc80a --- fboss/platform/sensor_service/BUCK | 15 ++++ .../sensor_service/ConfigValidator.cpp | 80 +++++++++++++++++++ .../platform/sensor_service/ConfigValidator.h | 20 +++++ fboss/platform/sensor_service/test/BUCK | 10 +++ .../test/ConfigValidatorTest.cpp | 71 ++++++++++++++++ 5 files changed, 196 insertions(+) create mode 100644 fboss/platform/sensor_service/ConfigValidator.cpp create mode 100644 fboss/platform/sensor_service/ConfigValidator.h create mode 100644 fboss/platform/sensor_service/test/ConfigValidatorTest.cpp diff --git a/fboss/platform/sensor_service/BUCK b/fboss/platform/sensor_service/BUCK index 5ebe19e2a810b..7d3082793d5c5 100644 --- a/fboss/platform/sensor_service/BUCK +++ b/fboss/platform/sensor_service/BUCK @@ -93,6 +93,21 @@ cpp_library( ], ) +cpp_library( + name = "config_validator", + srcs = [ + "ConfigValidator.cpp", + ], + exported_deps = [ + "fbsource//third-party/fmt:fmt", + "//fboss/platform/sensor_service/if:sensor_config-cpp2-types", + "//folly/logging:logging", + ], + exported_external_deps = [ + "re2", + ], +) + cpp_binary( name = "sensor_service", srcs = [ diff --git a/fboss/platform/sensor_service/ConfigValidator.cpp b/fboss/platform/sensor_service/ConfigValidator.cpp new file mode 100644 index 0000000000000..aa5d5cd561ebe --- /dev/null +++ b/fboss/platform/sensor_service/ConfigValidator.cpp @@ -0,0 +1,80 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/platform/sensor_service/ConfigValidator.h" + +#include +#include +#include + +namespace facebook::fboss::platform::sensor_service { +using namespace sensor_config; +namespace { +// For more info, see below +// https://github.com/facebook/fboss/blob/main/fboss/platform/platform_manager/platform_manager_config.thrift#L73 +const re2::RE2 kSlotPathRe = + "/(([A-Z]+(_[A-Z]+)*_SLOT@\\d+/)*[A-Z]+(_[A-Z]+)*_SLOT@\\d+$)*"; +} // namespace + +bool ConfigValidator::isValid(const SensorConfig& sensorConfig) { + for (std::unordered_set usedSlotPaths; + const auto& pmUnitSensors : *sensorConfig.pmUnitSensorsList()) { + if (!isValidPmUnitSensors(pmUnitSensors, usedSlotPaths)) { + return false; + } + } + return true; +} + +bool ConfigValidator::isValidPmUnitSensors( + const PmUnitSensors& pmUnitSensors, + std::unordered_set& usedSlotPaths) { + if (pmUnitSensors.slotPath()->empty()) { + XLOG(ERR) << "SlotPath in PmUnitSensor must be non-empty"; + return false; + } + if (!isValidSlotPath(*pmUnitSensors.slotPath())) { + return false; + } + if (usedSlotPaths.contains(*pmUnitSensors.slotPath())) { + XLOG(ERR) << fmt::format( + "SlotPath {} is a duplicate", *pmUnitSensors.slotPath()); + return false; + } + usedSlotPaths.emplace(*pmUnitSensors.slotPath()); + for (std::unordered_set usedSensorNames; + const auto& pmSensor : *pmUnitSensors.sensors()) { + if (!isValidPmSensor(pmSensor, usedSensorNames)) { + return false; + } + } + return true; +} + +bool ConfigValidator::isValidPmSensor( + const PmSensor& pmSensor, + std::unordered_set& usedSensorNames) { + if (pmSensor.name()->empty()) { + XLOG(ERR) << "PmSensor name must be non-empty"; + return false; + } + if (usedSensorNames.contains(*pmSensor.name())) { + XLOG(ERR) << fmt::format("SensorName {} is a duplicate", *pmSensor.name()); + return false; + } + usedSensorNames.emplace(*pmSensor.name()); + if (!pmSensor.sysfsPath()->starts_with("/run/devmap/sensors/")) { + XLOG(ERR) << "PmSensor sysfsPath must start with /run/devmap/sensors/"; + return false; + } + return true; +} + +bool ConfigValidator::isValidSlotPath(const std::string& slotPath) { + if (!re2::RE2::FullMatch(slotPath, kSlotPathRe)) { + XLOG(ERR) << fmt::format("SlotPath {} is invalid", slotPath); + return false; + } + return true; +} + +} // namespace facebook::fboss::platform::sensor_service diff --git a/fboss/platform/sensor_service/ConfigValidator.h b/fboss/platform/sensor_service/ConfigValidator.h new file mode 100644 index 0000000000000..63469ca83ba2b --- /dev/null +++ b/fboss/platform/sensor_service/ConfigValidator.h @@ -0,0 +1,20 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#pragma once + +#include "fboss/platform/sensor_service/if/gen-cpp2/sensor_config_types.h" + +namespace facebook::fboss::platform::sensor_service { +class ConfigValidator { + public: + bool isValid(const sensor_config::SensorConfig& sensorConfig); + bool isValidPmUnitSensors( + const sensor_config::PmUnitSensors& PmUnitSensors, + std::unordered_set& usedSlotPaths); + bool isValidPmSensor( + const sensor_config::PmSensor& pmSensor, + std::unordered_set& usedSensorNames); + bool isValidSlotPath(const std::string& slotPath); +}; + +} // namespace facebook::fboss::platform::sensor_service diff --git a/fboss/platform/sensor_service/test/BUCK b/fboss/platform/sensor_service/test/BUCK index 1a41bce023ea8..a4b6376405458 100644 --- a/fboss/platform/sensor_service/test/BUCK +++ b/fboss/platform/sensor_service/test/BUCK @@ -45,3 +45,13 @@ cpp_unittest( "//fboss/platform/sensor_service:utils", ], ) + +cpp_unittest( + name = "config_validator_test", + srcs = [ + "ConfigValidatorTest.cpp", + ], + deps = [ + "//fboss/platform/sensor_service:config_validator", + ], +) diff --git a/fboss/platform/sensor_service/test/ConfigValidatorTest.cpp b/fboss/platform/sensor_service/test/ConfigValidatorTest.cpp new file mode 100644 index 0000000000000..c0798bcad32e7 --- /dev/null +++ b/fboss/platform/sensor_service/test/ConfigValidatorTest.cpp @@ -0,0 +1,71 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include + +#include "fboss/platform/sensor_service/ConfigValidator.h" + +using namespace ::testing; +using namespace facebook::fboss::platform::sensor_service; +using namespace facebook::fboss::platform::sensor_config; +namespace { +PmSensor createPmSensor(const std::string& name, const std::string& sysfsPath) { + PmSensor pmSensor; + pmSensor.name() = name; + pmSensor.sysfsPath() = sysfsPath; + return pmSensor; +} +} // namespace + +TEST(ConfigValidatorTest, ValidConfig) { + auto config = SensorConfig(); + PmUnitSensors pmUnitSensors1, pmUnitSensors2; + pmUnitSensors1.slotPath() = "/"; + pmUnitSensors1.sensors() = { + createPmSensor("sensor1", "/run/devmap/sensors/CPU_CORE_TEMP")}; + pmUnitSensors2.slotPath() = "/BCB_SLOT@0"; + pmUnitSensors1.sensors() = { + createPmSensor("sensor2", "/run/devmap/sensors/BCB_FAN_CPLD")}; + config.pmUnitSensorsList() = {pmUnitSensors1, pmUnitSensors2}; + EXPECT_TRUE(ConfigValidator().isValid(config)); +} + +TEST(ConfigValidatorTest, SlotPaths) { + // Valid + EXPECT_TRUE(ConfigValidator().isValidSlotPath("/")); + EXPECT_TRUE(ConfigValidator().isValidSlotPath("/FAN_SLOT@0")); + EXPECT_TRUE(ConfigValidator().isValidSlotPath("/FAN_SLOT@110")); + EXPECT_TRUE(ConfigValidator().isValidSlotPath("/BCB_SLOT@0/FAN_SLOT@1")); + // Invalid + EXPECT_FALSE(ConfigValidator().isValidSlotPath("/ ")); + EXPECT_FALSE(ConfigValidator().isValidSlotPath("/INVALID")); + EXPECT_FALSE(ConfigValidator().isValidSlotPath("/SLOT@0")); + EXPECT_FALSE(ConfigValidator().isValidSlotPath("/BCB_SLOT@0FAN_SLOT@1")); + // Can't have a trailing / + EXPECT_FALSE(ConfigValidator().isValidSlotPath("/BCB_SLOT@0/")); + // Duplicate + SensorConfig config; + PmUnitSensors pmUnitSensors1, pmUnitSensors2; + pmUnitSensors1.slotPath() = "/BCB_SLOT@0"; + pmUnitSensors2.slotPath() = "/BCB_SLOT@0"; + config.pmUnitSensorsList() = {pmUnitSensors1, pmUnitSensors2}; + EXPECT_FALSE(ConfigValidator().isValid(config)); +} + +TEST(ConfigValidatorTest, InvalidPmSensors) { + auto config = SensorConfig(); + PmUnitSensors pmUnitSensors; + pmUnitSensors.slotPath() = "/BCB_SLOT@0"; + pmUnitSensors.sensors() = { + createPmSensor("", "/run/devmap/sensors/CPU_CORE_TEMP")}; + config.pmUnitSensorsList() = {pmUnitSensors}; + EXPECT_FALSE(ConfigValidator().isValid(config)); + pmUnitSensors.sensors() = { + createPmSensor("sensor1", "/run/devmap/eeproms/BCB_EEPROMS")}; + config.pmUnitSensorsList() = {pmUnitSensors}; + EXPECT_FALSE(ConfigValidator().isValid(config)); + pmUnitSensors.sensors() = { + createPmSensor("sensor1", "/run/devmap/sensors/CPU_CORE_TEMP"), + createPmSensor("sensor1", "/run/devmap/sensors/CPU_CORE_TEMP2")}; + config.pmUnitSensorsList() = {pmUnitSensors}; + EXPECT_FALSE(ConfigValidator().isValid(config)); +} From c65e1acfe5ab1de80bf1a22cc2fe5db4a0e497b5 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Thu, 10 Oct 2024 08:46:13 -0700 Subject: [PATCH 044/479] Make Darwin sensor config valid Summary: Darwin isn't on PM. Modified so that Fan devices are under the same slotPath. Added placeholder slotPaths. Reviewed By: rationalis Differential Revision: D64051060 fbshipit-source-id: 5f84be47f76097b95328b568f94d4c7c5f026bc2 --- .../configs/darwin/sensor_service.json | 66 +++++-------------- 1 file changed, 18 insertions(+), 48 deletions(-) diff --git a/fboss/platform/configs/darwin/sensor_service.json b/fboss/platform/configs/darwin/sensor_service.json index 1c22e1cd15796..983a207fc5e2d 100644 --- a/fboss/platform/configs/darwin/sensor_service.json +++ b/fboss/platform/configs/darwin/sensor_service.json @@ -1,7 +1,7 @@ { "pmUnitSensorsList": [ { - "slotPath": "", + "slotPath": "/", "pmUnitName": "CPU_CARD", "sensors": [ { @@ -311,8 +311,8 @@ ] }, { - "slotPath": "", - "pmUnitName": "FAN1", + "slotPath": "/FAN_SLOT@0", + "pmUnitName": "FAN", "sensors": [ { "name": "FAN1_RPM", @@ -322,13 +322,7 @@ "upperCriticalVal": 25500, "lowerCriticalVal": 2600 } - } - ] - }, - { - "slotPath": "", - "pmUnitName": "FAN2", - "sensors": [ + }, { "name": "FAN2_RPM", "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_input", @@ -337,13 +331,7 @@ "upperCriticalVal": 25500, "lowerCriticalVal": 2600 } - } - ] - }, - { - "slotPath": "", - "pmUnitName": "FAN3", - "sensors": [ + }, { "name": "FAN3_RPM", "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_input", @@ -352,13 +340,7 @@ "upperCriticalVal": 25500, "lowerCriticalVal": 2600 } - } - ] - }, - { - "slotPath": "", - "pmUnitName": "FAN4", - "sensors": [ + }, { "name": "FAN4_RPM", "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_input", @@ -367,13 +349,7 @@ "upperCriticalVal": 25500, "lowerCriticalVal": 2600 } - } - ] - }, - { - "slotPath": "", - "pmUnitName": "FAN5", - "sensors": [ + }, { "name": "FAN5_RPM", "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan5_input", @@ -382,11 +358,20 @@ "upperCriticalVal": 25500, "lowerCriticalVal": 2600 } + }, + { + "name": "FS_FAN_RPM", + "sysfsPath": "/run/devmap/sensors/FS_FAN_SLG4F4527/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 29500, + "lowerCriticalVal": 2600 + } } ] }, { - "slotPath": "", + "slotPath": "/SCM_SLOT@0", "pmUnitName": "SWITCH_CARD", "sensors": [ { @@ -446,7 +431,7 @@ ] }, { - "slotPath": "", + "slotPath": "/PSU_SLOT@0", "pmUnitName": "PEM", "sensors": [ { @@ -535,21 +520,6 @@ "compute": "@/1000.0" } ] - }, - { - "slotPath": "", - "pmUnitName": "FanSpiner", - "sensors": [ - { - "name": "FS_FAN_RPM", - "sysfsPath": "/run/devmap/sensors/FS_FAN_SLG4F4527/fan1_input", - "type": 4, - "thresholds": { - "upperCriticalVal": 29500, - "lowerCriticalVal": 2600 - } - } - ] } ] } From b8c9e40eaac790b09153d769c6ab5861f6a0aee1 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Thu, 10 Oct 2024 09:33:35 -0700 Subject: [PATCH 045/479] Updating submodules Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/bf285aef801001f637f180971d6f3d39c12ed5c1 https://github.com/facebook/fb303/commit/b1748a9eb2e559e3ea96f08c2edbc40ae3a580ba https://github.com/facebook/fbthrift/commit/d4ac595596038eba65a939434c2bc56c5a7e092c https://github.com/facebook/folly/commit/475d3e45a2f64d02df57054bfa81e894fb93e095 https://github.com/facebook/mvfst/commit/b7169e3cf7f708d226e38a0e618acfb4e4f123ef https://github.com/facebook/proxygen/commit/b27bc6df051010629d736cd7fe12083aaa90a098 https://github.com/facebook/wangle/commit/359b3990bafa4c8274a14866fe91aed98df56ab6 https://github.com/facebookexperimental/edencommon/commit/7c8cd15702feac852d2001b3c7112d63c3e6f987 https://github.com/facebookexperimental/rust-shed/commit/66064b2c7832e3d00447643f6f31b5451490959e https://github.com/facebookincubator/fizz/commit/e031936fd1c92c8516ec9f7817158c49134b3ded Reviewed By: ckwalsh fbshipit-source-id: bfba771dfb156514ef21c106c43059106e9dfcb8 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index e26386f06e7e9..c8a16d59801a1 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 3f9d44501374fcd39600f4fc641fc041a561b579 +Subproject commit b1748a9eb2e559e3ea96f08c2edbc40ae3a580ba diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index c50c71adbf07d..b038a158b4293 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 6edd883bee237a2e726e047f8ce88c8f69775807 +Subproject commit d4ac595596038eba65a939434c2bc56c5a7e092c diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index e70edc477b00c..a78f32e05925d 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 02547bfd861ab21a87cd5b6a2da4ceb2ac7012d7 +Subproject commit 475d3e45a2f64d02df57054bfa81e894fb93e095 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 7112cefa075f6..3ca1b3f83d70b 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 8628da085e376891df611eec0e61b795b9676056 +Subproject commit 359b3990bafa4c8274a14866fe91aed98df56ab6 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index ffd86e041b600..cce2558548bcc 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit ba36ee510c7afe3d290bb2dfa2de1e1c165d1dea +Subproject commit e031936fd1c92c8516ec9f7817158c49134b3ded From a647fd43f38aab877d9643a77b417d493396a702 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 10 Oct 2024 11:32:53 -0700 Subject: [PATCH 046/479] Allow for both v4 and v6 pkts in VOQ tests Summary: As titled Reviewed By: zechengh09 Differential Revision: D64157037 fbshipit-source-id: 944881f3eb968d3b832256e68a066bb07e5af9cf --- fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp index 2486715f11e46..fb6209ee78b34 100644 --- a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp @@ -214,12 +214,12 @@ class AgentVoqSwitchTest : public AgentHwTest { } int sendPacket( - const folly::IPAddressV6& dstIp, + const folly::IPAddress& dstIp, std::optional frontPanelPort, std::optional> payload = std::optional>(), int dscp = 0x24) { - folly::IPAddressV6 kSrcIp("1::1"); + folly::IPAddress kSrcIp(dstIp.isV6() ? "1::1" : "1.0.0.1"); const auto srcMac = utility::kLocalCpuMac(); const auto dstMac = utility::kLocalCpuMac(); From 130970306a8a5a68069e79a727fbd5c4c6c5da32 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Thu, 10 Oct 2024 12:58:23 -0700 Subject: [PATCH 047/479] fbcode//fboss/agent/test/utils/TARGETS Reviewed By: peygar Differential Revision: D64168486 fbshipit-source-id: 8e4a4f3163cd84535d5040534c8d2b985b2c4aad --- fboss/agent/test/utils/BUCK | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/agent/test/utils/BUCK b/fboss/agent/test/utils/BUCK index 2e02cb0a2a5e9..5f557a663c448 100644 --- a/fboss/agent/test/utils/BUCK +++ b/fboss/agent/test/utils/BUCK @@ -454,6 +454,7 @@ cpp_library( "//fboss/agent:fboss-types", "//fboss/agent:switch_config-cpp2-types", "//fboss/agent:utils", + "//fboss/agent/hw:hardware_stats-cpp2-types", ], ) From 61f46183a8f1ce0918c6080c822ec0e8f2464def Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Thu, 10 Oct 2024 13:55:31 -0700 Subject: [PATCH 048/479] fbcode//fboss/platform/data_corral_service/TARGETS Reviewed By: somasun Differential Revision: D64169040 fbshipit-source-id: 527f02f84d18a64fcc3fb1fca34385d1205888fb --- fboss/platform/data_corral_service/BUCK | 3 --- 1 file changed, 3 deletions(-) diff --git a/fboss/platform/data_corral_service/BUCK b/fboss/platform/data_corral_service/BUCK index 62c68f36a7d2e..1bfd2aea11f57 100644 --- a/fboss/platform/data_corral_service/BUCK +++ b/fboss/platform/data_corral_service/BUCK @@ -35,9 +35,6 @@ cpp_library( "//folly:string", "//folly/logging:logging", ], - exported_external_deps = [ - ("libgpiod", None, "gpiod"), - ], ) cpp_library( From 984d0e4d9e29cf57fd87a159b1e2aead2a3072e6 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Thu, 10 Oct 2024 14:59:19 -0700 Subject: [PATCH 049/479] Move Viper sensor service to pm base thrift structs Reviewed By: alandau Differential Revision: D64114882 fbshipit-source-id: c679db3bfde7577d59fcae9bbc45539a7c8fd74c --- .../configs/meru800bia/sensor_service.json | 1433 +++++++++-------- 1 file changed, 760 insertions(+), 673 deletions(-) diff --git a/fboss/platform/configs/meru800bia/sensor_service.json b/fboss/platform/configs/meru800bia/sensor_service.json index 5d12ee3beee53..1d243224c56c1 100644 --- a/fboss/platform/configs/meru800bia/sensor_service.json +++ b/fboss/platform/configs/meru800bia/sensor_service.json @@ -1,679 +1,766 @@ { - "sensorMapList": { - "SCM": { - "CPU_PACKAGE_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE0_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE1_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE2_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE3_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE4_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE5_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE6_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE7_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_ECB_VIN": { - "path": "/run/devmap/sensors/CPU_MPS_PMBUS/in1_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/32000.0", - "type": 1 - }, - "SCM_ECB_VOUT": { - "path": "/run/devmap/sensors/CPU_MPS_PMBUS/in2_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/32000.0", - "type": 1 - }, - "SCM_ECB_IOUT": { - "path": "/run/devmap/sensors/CPU_MPS_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "SCM_VRM1_VIN": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM1_VOUT_VCCIN": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/in3_input", - "thresholds": { - "upperCriticalVal": 2.16, - "lowerCriticalVal": 1.44 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM1_VOUT_1V8_CPU": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/in4_input", - "thresholds": { - "upperCriticalVal": 2.16, - "lowerCriticalVal": 1.44 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM1_TEMP1": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/temp1_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM1_TEMP2": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/temp2_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM2_VIN": { - "path": "/run/devmap/sensors/CPU_PXE1211/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_VOUT_1V2_VDDQ": { - "path": "/run/devmap/sensors/CPU_PXE1211/in4_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_VOUT_VNN_NAC": { - "path": "/run/devmap/sensors/CPU_PXE1211/in5_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.48 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_VOUT_1V0_CPU": { - "path": "/run/devmap/sensors/CPU_PXE1211/in6_input", - "thresholds": { - "upperCriticalVal": 1.2, - "lowerCriticalVal": 0.8 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_TEMP1": { - "path": "/run/devmap/sensors/CPU_PXE1211/temp1_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM2_TEMP2": { - "path": "/run/devmap/sensors/CPU_PXE1211/temp2_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM3_VIN": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM3_VOUT_1V05_CPU": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/in3_input", - "thresholds": { - "upperCriticalVal": 1.272, - "lowerCriticalVal": 0.848 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM3_VOUT_VNN_PCH": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/in4_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.48 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM3_TEMP1": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/temp1_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM3_TEMP2": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/temp2_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - } + "pmUnitSensorsList": [ + { + "slotPath": "/", + "pmUnitName": "SCM", + "sensors": [ + { + "name": "CPU_PACKAGE_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE0_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE1_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE2_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE3_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE4_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE5_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE6_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE7_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_ECB_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/32000.0" + }, + { + "name": "SCM_ECB_VOUT", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/in2_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/32000.0" + }, + { + "name": "SCM_ECB_IOUT", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_VOUT_VCCIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_VOUT_1V8_CPU", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_TEMP1", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_TEMP2", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VOUT_1V2_VDDQ", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VOUT_VNN_NAC", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.48 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VOUT_1V0_CPU", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in6_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.2, + "lowerCriticalVal": 0.8 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_TEMP1", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_TEMP2", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_VOUT_1V05_CPU", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.272, + "lowerCriticalVal": 0.848 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_VOUT_VNN_PCH", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.48 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_TEMP1", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_TEMP2", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + } + ] }, - "SMB": { - "SMB_BOARD_FRONT_TEMP": { - "path": "/run/devmap/sensors/SMB_TMP75_FRONT/temp1_input", - "thresholds": { - "upperCriticalVal": 85.0, - "maxAlarmVal": 80.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_BOARD_REAR_TEMP": { - "path": "/run/devmap/sensors/SMB_TMP75_REAR/temp1_input", - "thresholds": { - "upperCriticalVal": 85.0, - "maxAlarmVal": 80.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_BOARD_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp1_input", - "thresholds": { - "upperCriticalVal": 90.0, - "maxAlarmVal": 85.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_CORE_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp2_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_FAB0_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp3_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_FAB1_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp4_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_NIF0_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp5_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_NIF1_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp6_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_HBM0_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp7_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_HBM1_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp8_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "FAN_BOARD_TEMP": { - "path": "/run/devmap/sensors/FAN_TMP75/temp1_input", - "thresholds": { - "upperCriticalVal": 85.0, - "maxAlarmVal": 80.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM1_VIN": { - "path": "/run/devmap/sensors/SMB_RAA228926_J3/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM1_VOUT_J3_0V85_CORE": { - "path": "/run/devmap/sensors/SMB_RAA228926_J3/in3_input", - "thresholds": { - "upperCriticalVal": 0.93, - "lowerCriticalVal": 0.62 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM1_TEMP": { - "path": "/run/devmap/sensors/SMB_RAA228926_J3/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM2_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM2_VOUT_J3_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/in3_input", - "thresholds": { - "upperCriticalVal": 1.08, - "lowerCriticalVal": 0.72 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM2_VOUT_J3_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/in4_input", - "thresholds": { - "upperCriticalVal": 0.9, - "lowerCriticalVal": 0.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM2_VOUT_J3_1V2": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/in5_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM2_TEMP1": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM2_TEMP2": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/temp2_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM2_TEMP3": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM3_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_OPTICS/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM3_VOUT_OPTICS_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OPTICS/in3_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM3_TEMP": { - "path": "/run/devmap/sensors/SMB_ISL68226_OPTICS/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_MGMT_INLET_TEMP": { - "path": "/run/devmap/sensors/SMB_MGMT_TMP75/temp1_input", - "thresholds": { - "upperCriticalVal": 75.0, - "maxAlarmVal": 70.0 - }, - "compute": "@/1000.0", - "type": 3 - } + { + "slotPath": "/SMB_SLOT@0", + "pmUnitName": "SMB", + "sensors": [ + { + "name": "SMB_BOARD_FRONT_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_TMP75_FRONT/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 85.0, + "maxAlarmVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_BOARD_REAR_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_TMP75_REAR/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 85.0, + "maxAlarmVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_BOARD_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 90.0, + "maxAlarmVal": 85.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_FAB0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_FAB1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp4_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_NIF0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_NIF1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_HBM0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_HBM1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN_BOARD_TEMP", + "sysfsPath": "/run/devmap/sensors/FAN_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 85.0, + "maxAlarmVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM1_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_J3/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM1_VOUT_J3_0V85_CORE", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_J3/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.93, + "lowerCriticalVal": 0.62 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_J3/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VOUT_J3_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.08, + "lowerCriticalVal": 0.72 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VOUT_J3_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.9, + "lowerCriticalVal": 0.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VOUT_J3_1V2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_TEMP1", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_TEMP2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_TEMP3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM3_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OPTICS/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM3_VOUT_OPTICS_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OPTICS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM3_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OPTICS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_MGMT_INLET_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MGMT_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 75.0, + "maxAlarmVal": 70.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN3_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN4_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + } + ] }, - "FAN1": { - "FAN1_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD/fan1_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@0", + "pmUnitName": "PSU", + "sensors": [ + { + "name": "PSU1_VIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU1_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU1_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU1_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_IIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU1_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU1_PIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU1_POUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] }, - "FAN2": { - "FAN2_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD/fan2_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN3": { - "FAN3_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD/fan3_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN4": { - "FAN4_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD/fan4_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "PSU1": { - "PSU1_VIN": { - "path": "/run/devmap/sensors/PSU1_PMBUS/in1_input", - "compute": "@/1000.0", - "type": 1 - }, - "PSU1_VOUT": { - "path": "/run/devmap/sensors/PSU1_PMBUS/in3_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "PSU1_FAN1_RPM": { - "path": "/run/devmap/sensors/PSU1_PMBUS/fan1_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU1_FAN2_RPM": { - "path": "/run/devmap/sensors/PSU1_PMBUS/fan2_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU1_TEMP1": { - "path": "/run/devmap/sensors/PSU1_PMBUS/temp1_input", - "thresholds": { - "upperCriticalVal": 70.0, - "maxAlarmVal": 65.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU1_TEMP2": { - "path": "/run/devmap/sensors/PSU1_PMBUS/temp2_input", - "thresholds": { - "upperCriticalVal": 130.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU1_TEMP3": { - "path": "/run/devmap/sensors/PSU1_PMBUS/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 112.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU1_IIN": { - "path": "/run/devmap/sensors/PSU1_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU1_IOUT": { - "path": "/run/devmap/sensors/PSU1_PMBUS/curr2_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU1_PIN": { - "path": "/run/devmap/sensors/PSU1_PMBUS/power1_input", - "compute": "@/1000000.0", - "type": 0 - }, - "PSU1_POUT": { - "path": "/run/devmap/sensors/PSU1_PMBUS/power2_input", - "compute": "@/1000000.0", - "type": 0 - } - }, - "PSU2": { - "PSU2_VIN": { - "path": "/run/devmap/sensors/PSU2_PMBUS/in1_input", - "compute": "@/1000.0", - "type": 1 - }, - "PSU2_VOUT": { - "path": "/run/devmap/sensors/PSU2_PMBUS/in3_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "PSU2_FAN1_RPM": { - "path": "/run/devmap/sensors/PSU2_PMBUS/fan1_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU2_FAN2_RPM": { - "path": "/run/devmap/sensors/PSU2_PMBUS/fan2_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU2_TEMP1": { - "path": "/run/devmap/sensors/PSU2_PMBUS/temp1_input", - "thresholds": { - "upperCriticalVal": 70.0, - "maxAlarmVal": 65.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU2_TEMP2": { - "path": "/run/devmap/sensors/PSU2_PMBUS/temp2_input", - "thresholds": { - "upperCriticalVal": 130.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU2_TEMP3": { - "path": "/run/devmap/sensors/PSU2_PMBUS/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 112.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU2_IIN": { - "path": "/run/devmap/sensors/PSU2_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU2_IOUT": { - "path": "/run/devmap/sensors/PSU2_PMBUS/curr2_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU2_PIN": { - "path": "/run/devmap/sensors/PSU2_PMBUS/power1_input", - "compute": "@/1000000.0", - "type": 0 - }, - "PSU2_POUT": { - "path": "/run/devmap/sensors/PSU2_PMBUS/power2_input", - "compute": "@/1000000.0", - "type": 0 - } + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@1", + "pmUnitName": "PSU", + "sensors": [ + { + "name": "PSU2_VIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU2_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU2_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU2_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_IIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU2_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU2_PIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU2_POUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] } - } + ] } From 8d528f4a8e2351e7db434f9263be15924f2752b2 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Thu, 10 Oct 2024 14:59:19 -0700 Subject: [PATCH 050/479] Move Whistler sensor service to pm base thrift structs Reviewed By: alandau Differential Revision: D64116160 fbshipit-source-id: 0a0f55979e27690b6c2ffdebb91f8fdcb7c6d70a --- .../configs/meru800bfa/sensor_service.json | 2649 +++++++++-------- 1 file changed, 1398 insertions(+), 1251 deletions(-) diff --git a/fboss/platform/configs/meru800bfa/sensor_service.json b/fboss/platform/configs/meru800bfa/sensor_service.json index a6047f75e5b90..59366363b3d22 100644 --- a/fboss/platform/configs/meru800bfa/sensor_service.json +++ b/fboss/platform/configs/meru800bfa/sensor_service.json @@ -1,1259 +1,1406 @@ { - "sensorMapList": { - "SCM": { - "CPU_PACKAGE_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE0_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE1_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE2_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE3_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE4_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE5_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE6_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE7_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_ECB_VIN": { - "path": "/run/devmap/sensors/CPU_MPS_PMBUS/in1_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/32000.0", - "type": 1 - }, - "SCM_ECB_VOUT": { - "path": "/run/devmap/sensors/CPU_MPS_PMBUS/in2_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/32000.0", - "type": 1 - }, - "SCM_ECB_IOUT": { - "path": "/run/devmap/sensors/CPU_MPS_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "SCM_VRM1_VIN": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM1_VOUT_VCCIN": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/in3_input", - "thresholds": { - "upperCriticalVal": 2.16, - "lowerCriticalVal": 1.44 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM1_VOUT_1V8_CPU": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/in4_input", - "thresholds": { - "upperCriticalVal": 2.16, - "lowerCriticalVal": 1.44 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM1_TEMP1": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/temp1_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM1_TEMP2": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/temp2_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM2_VIN": { - "path": "/run/devmap/sensors/CPU_PXE1211/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_VOUT_1V2_VDDQ": { - "path": "/run/devmap/sensors/CPU_PXE1211/in4_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_VOUT_VNN_NAC": { - "path": "/run/devmap/sensors/CPU_PXE1211/in5_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.48 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_VOUT_1V0_CPU": { - "path": "/run/devmap/sensors/CPU_PXE1211/in6_input", - "thresholds": { - "upperCriticalVal": 1.2, - "lowerCriticalVal": 0.8 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_TEMP1": { - "path": "/run/devmap/sensors/CPU_PXE1211/temp1_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM2_TEMP2": { - "path": "/run/devmap/sensors/CPU_PXE1211/temp2_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM3_VIN": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM3_VOUT_1V05_CPU": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/in3_input", - "thresholds": { - "upperCriticalVal": 1.272, - "lowerCriticalVal": 0.848 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM3_VOUT_VNN_PCH": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/in4_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.48 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM3_TEMP1": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/temp1_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM3_TEMP2": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/temp2_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - } + "pmUnitSensorsList": [ + { + "slotPath": "/", + "pmUnitName": "SCM", + "sensors": [ + { + "name": "CPU_PACKAGE_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE0_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE1_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE2_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE3_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE4_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE5_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE6_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE7_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_ECB_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/32000.0" + }, + { + "name": "SCM_ECB_VOUT", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/in2_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/32000.0" + }, + { + "name": "SCM_ECB_IOUT", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_VOUT_VCCIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_VOUT_1V8_CPU", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_TEMP1", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_TEMP2", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VOUT_1V2_VDDQ", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VOUT_VNN_NAC", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.48 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VOUT_1V0_CPU", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in6_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.2, + "lowerCriticalVal": 0.8 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_TEMP1", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_TEMP2", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_VOUT_1V05_CPU", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.272, + "lowerCriticalVal": 0.848 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_VOUT_VNN_PCH", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.48 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_TEMP1", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_TEMP2", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + } + ] }, - "SMB": { - "SMB_BOARD_TOP_CENTER_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp1_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "R3_0_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp2_input", - "thresholds": { - "upperCriticalVal": 125.0, - "maxAlarmVal": 110.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "R3_1_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp3_input", - "thresholds": { - "upperCriticalVal": 125.0, - "maxAlarmVal": 110.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_BOARD_REAR_RIGHT_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp5_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_BOARD_FRONT_RIGHT_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp6_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_BOARD_REAR_LEFT_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp7_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_BOARD_FRONT_LEFT_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp8_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_INLET_TEMP": { - "path": "/run/devmap/sensors/SMB_TMP75/temp1_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 85.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_CORE_VIN": { - "path": "/run/devmap/sensors/SMB_RAA228926_R3R0_CORE/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_CORE_VOUT_0V75": { - "path": "/run/devmap/sensors/SMB_RAA228926_R3R0_CORE/in3_input", - "thresholds": { - "upperCriticalVal": 1.008, - "lowerCriticalVal": 0.504 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_CORE_TEMP": { - "path": "/run/devmap/sensors/SMB_RAA228926_R3R0_CORE/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_ANLG0_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG0_VOUT_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in3_input", - "thresholds": { - "upperCriticalVal": 1.08, - "lowerCriticalVal": 0.72 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG0_VOUT_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in4_input", - "thresholds": { - "upperCriticalVal": 0.9, - "lowerCriticalVal": 0.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG0_VOUT_1V2": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in5_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG0_TEMP_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_ANLG0_TEMP_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/temp2_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_ANLG0_TEMP_1V2": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_ANLG1_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG1_VOUT_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in3_input", - "thresholds": { - "upperCriticalVal": 1.08, - "lowerCriticalVal": 0.72 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG1_VOUT_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in4_input", - "thresholds": { - "upperCriticalVal": 0.9, - "lowerCriticalVal": 0.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG1_VOUT_1V8": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in5_input", - "thresholds": { - "upperCriticalVal": 2.16, - "lowerCriticalVal": 1.44 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG1_TEMP_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_ANLG1_TEMP_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/temp2_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_ANLG1_TEMP_1V8": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_CORE_VIN": { - "path": "/run/devmap/sensors/SMB_RAA228926_R3R1_CORE/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_CORE_VOUT_0V75": { - "path": "/run/devmap/sensors/SMB_RAA228926_R3R1_CORE/in3_input", - "thresholds": { - "upperCriticalVal": 1.008, - "lowerCriticalVal": 0.504 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_CORE_TEMP": { - "path": "/run/devmap/sensors/SMB_RAA228926_R3R1_CORE/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_ANLG0_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG0_VOUT_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in3_input", - "thresholds": { - "upperCriticalVal": 1.08, - "lowerCriticalVal": 0.72 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG0_VOUT_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in4_input", - "thresholds": { - "upperCriticalVal": 0.9, - "lowerCriticalVal": 0.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG0_VOUT_1V2": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in5_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG0_TEMP_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_ANLG0_TEMP_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/temp2_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_ANLG0_TEMP_1V2": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_ANLG1_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG1_VOUT_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in3_input", - "thresholds": { - "upperCriticalVal": 1.08, - "lowerCriticalVal": 0.72 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG1_VOUT_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in4_input", - "thresholds": { - "upperCriticalVal": 0.9, - "lowerCriticalVal": 0.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG1_VOUT_1V8": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in5_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG1_TEMP_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_ANLG1_TEMP_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/temp2_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_ANLG1_TEMP_1V8": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_OSFP_TL_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_TL/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_TL_VOUT_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_TL/in3_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_TL_TEMP_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_TL/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_OSFP_TR_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_TR/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_TR_VOUT_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_TR/in3_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_TR_TEMP_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_TR/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_OSFP_BL_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_BL/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_BL_VOUT_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_BL/in3_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_BL_TEMP_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_BL/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_OSFP_BR_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_BR/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_BR_VOUT_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_BR/in3_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_BR_TEMP_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_BR/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_DPM_12V": { - "path": "/run/devmap/sensors/SMB_UCD90320/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_DPM_3V3_DKR": { - "path": "/run/devmap/sensors/SMB_UCD90320/in2_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_DPM_1V9_DKR": { - "path": "/run/devmap/sensors/SMB_UCD90320/in3_input", - "thresholds": { - "upperCriticalVal": 2.16, - "lowerCriticalVal": 1.44 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_DPM_1V2_DKR": { - "path": "/run/devmap/sensors/SMB_UCD90320/in4_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_DPM_3V3": { - "path": "/run/devmap/sensors/SMB_UCD90320/in7_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_DPM_5V0": { - "path": "/run/devmap/sensors/SMB_UCD90320/in8_input", - "thresholds": { - "upperCriticalVal": 6.0, - "lowerCriticalVal": 4.0 - }, - "compute": "@/1000.0", - "type": 1 - }, - "FAN_BOARD0_TEMP": { - "path": "/run/devmap/sensors/FAN0_TMP75/temp1_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 85.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "FAN_BOARD1_TEMP": { - "path": "/run/devmap/sensors/FAN1_TMP75/temp1_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 85.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "FAN_BOARD2_TEMP": { - "path": "/run/devmap/sensors/FAN2_TMP75/temp1_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 85.0 - }, - "compute": "@/1000.0", - "type": 3 - } + { + "slotPath": "/SMB_SLOT@0", + "pmUnitName": "SMB", + "sensors": [ + { + "name": "SMB_BOARD_TOP_CENTER_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "R3_0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 125.0, + "maxAlarmVal": 110.0 + }, + "compute": "@/1000.0" + }, + { + "name": "R3_1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 125.0, + "maxAlarmVal": 110.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_BOARD_REAR_RIGHT_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_BOARD_FRONT_RIGHT_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_BOARD_REAR_LEFT_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_BOARD_FRONT_LEFT_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_INLET_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 85.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_R3R0_CORE/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_CORE_VOUT_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_R3R0_CORE/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.008, + "lowerCriticalVal": 0.504 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_R3R0_CORE/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_VOUT_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.08, + "lowerCriticalVal": 0.72 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_VOUT_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.9, + "lowerCriticalVal": 0.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_VOUT_1V2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_TEMP_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_TEMP_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_TEMP_1V2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_VOUT_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.08, + "lowerCriticalVal": 0.72 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_VOUT_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.9, + "lowerCriticalVal": 0.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_VOUT_1V8", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_TEMP_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_TEMP_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_TEMP_1V8", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_R3R1_CORE/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_CORE_VOUT_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_R3R1_CORE/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.008, + "lowerCriticalVal": 0.504 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_R3R1_CORE/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_VOUT_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.08, + "lowerCriticalVal": 0.72 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_VOUT_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.9, + "lowerCriticalVal": 0.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_VOUT_1V2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_TEMP_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_TEMP_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_TEMP_1V2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_VOUT_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.08, + "lowerCriticalVal": 0.72 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_VOUT_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.9, + "lowerCriticalVal": 0.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_VOUT_1V8", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_TEMP_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_TEMP_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_TEMP_1V8", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_TL_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_TL/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_TL_VOUT_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_TL/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_TL_TEMP_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_TL/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_TR_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_TR/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_TR_VOUT_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_TR/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_TR_TEMP_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_TR/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_BL_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_BL/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_BL_VOUT_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_BL/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_BL_TEMP_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_BL/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_BR_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_BR/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_BR_VOUT_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_BR/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_BR_TEMP_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_BR/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_DPM_12V", + "sysfsPath": "/run/devmap/sensors/SMB_UCD90320/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_DPM_3V3_DKR", + "sysfsPath": "/run/devmap/sensors/SMB_UCD90320/in2_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_DPM_1V9_DKR", + "sysfsPath": "/run/devmap/sensors/SMB_UCD90320/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_DPM_1V2_DKR", + "sysfsPath": "/run/devmap/sensors/SMB_UCD90320/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_DPM_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_UCD90320/in7_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_DPM_5V0", + "sysfsPath": "/run/devmap/sensors/SMB_UCD90320/in8_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 6.0, + "lowerCriticalVal": 4.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN_BOARD0_TEMP", + "sysfsPath": "/run/devmap/sensors/FAN0_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 85.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN_BOARD1_TEMP", + "sysfsPath": "/run/devmap/sensors/FAN1_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 85.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN_BOARD2_TEMP", + "sysfsPath": "/run/devmap/sensors/FAN2_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 85.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN3_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan3_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN4_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan4_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN5_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN6_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN7_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan3_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN8_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan4_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN9_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN10_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN11_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan3_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN12_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan4_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + } + ] }, - "FAN1": { - "FAN1_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD0/fan1_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@0", + "pmUnitName": "PSU", + "sensors": [ + { + "name": "PSU1_VIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU1_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU1_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU1_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_IIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU1_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU1_PIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU1_POUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] }, - "FAN2": { - "FAN2_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD0/fan2_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@1", + "pmUnitName": "PSU", + "sensors": [ + { + "name": "PSU2_VIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU2_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU2_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU2_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_IIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU2_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU2_PIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU2_POUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] }, - "FAN3": { - "FAN3_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD0/fan3_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@2", + "pmUnitName": "PSU", + "sensors": [ + { + "name": "PSU3_VIN", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU3_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU3_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU3_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU3_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU3_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU3_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU3_IIN", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU3_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU3_PIN", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU3_POUT", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] }, - "FAN4": { - "FAN4_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD0/fan4_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN5": { - "FAN5_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD1/fan1_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN6": { - "FAN6_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD1/fan2_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN7": { - "FAN7_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD1/fan3_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN8": { - "FAN8_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD1/fan4_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN9": { - "FAN9_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD2/fan1_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN10": { - "FAN10_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD2/fan2_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN11": { - "FAN11_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD2/fan3_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN12": { - "FAN12_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD2/fan4_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "PSU1": { - "PSU1_VIN": { - "path": "/run/devmap/sensors/PSU1_PMBUS/in1_input", - "compute": "@/1000.0", - "type": 1 - }, - "PSU1_VOUT": { - "path": "/run/devmap/sensors/PSU1_PMBUS/in3_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "PSU1_FAN1_RPM": { - "path": "/run/devmap/sensors/PSU1_PMBUS/fan1_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU1_FAN2_RPM": { - "path": "/run/devmap/sensors/PSU1_PMBUS/fan2_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU1_TEMP1": { - "path": "/run/devmap/sensors/PSU1_PMBUS/temp1_input", - "thresholds": { - "upperCriticalVal": 70.0, - "maxAlarmVal": 65.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU1_TEMP2": { - "path": "/run/devmap/sensors/PSU1_PMBUS/temp2_input", - "thresholds": { - "upperCriticalVal": 130.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU1_TEMP3": { - "path": "/run/devmap/sensors/PSU1_PMBUS/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 112.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU1_IIN": { - "path": "/run/devmap/sensors/PSU1_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU1_IOUT": { - "path": "/run/devmap/sensors/PSU1_PMBUS/curr2_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU1_PIN": { - "path": "/run/devmap/sensors/PSU1_PMBUS/power1_input", - "compute": "@/1000000.0", - "type": 0 - }, - "PSU1_POUT": { - "path": "/run/devmap/sensors/PSU1_PMBUS/power2_input", - "compute": "@/1000000.0", - "type": 0 - } - }, - "PSU2": { - "PSU2_VIN": { - "path": "/run/devmap/sensors/PSU2_PMBUS/in1_input", - "compute": "@/1000.0", - "type": 1 - }, - "PSU2_VOUT": { - "path": "/run/devmap/sensors/PSU2_PMBUS/in3_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "PSU2_FAN1_RPM": { - "path": "/run/devmap/sensors/PSU2_PMBUS/fan1_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU2_FAN2_RPM": { - "path": "/run/devmap/sensors/PSU2_PMBUS/fan2_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU2_TEMP1": { - "path": "/run/devmap/sensors/PSU2_PMBUS/temp1_input", - "thresholds": { - "upperCriticalVal": 70.0, - "maxAlarmVal": 65.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU2_TEMP2": { - "path": "/run/devmap/sensors/PSU2_PMBUS/temp2_input", - "thresholds": { - "upperCriticalVal": 130.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU2_TEMP3": { - "path": "/run/devmap/sensors/PSU2_PMBUS/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 112.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU2_IIN": { - "path": "/run/devmap/sensors/PSU2_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU2_IOUT": { - "path": "/run/devmap/sensors/PSU2_PMBUS/curr2_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU2_PIN": { - "path": "/run/devmap/sensors/PSU2_PMBUS/power1_input", - "compute": "@/1000000.0", - "type": 0 - }, - "PSU2_POUT": { - "path": "/run/devmap/sensors/PSU2_PMBUS/power2_input", - "compute": "@/1000000.0", - "type": 0 - } - }, - "PSU3": { - "PSU3_VIN": { - "path": "/run/devmap/sensors/PSU3_PMBUS/in1_input", - "compute": "@/1000.0", - "type": 1 - }, - "PSU3_VOUT": { - "path": "/run/devmap/sensors/PSU3_PMBUS/in3_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "PSU3_FAN1_RPM": { - "path": "/run/devmap/sensors/PSU3_PMBUS/fan1_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU3_FAN2_RPM": { - "path": "/run/devmap/sensors/PSU3_PMBUS/fan2_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU3_TEMP1": { - "path": "/run/devmap/sensors/PSU3_PMBUS/temp1_input", - "thresholds": { - "upperCriticalVal": 70.0, - "maxAlarmVal": 65.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU3_TEMP2": { - "path": "/run/devmap/sensors/PSU3_PMBUS/temp2_input", - "thresholds": { - "upperCriticalVal": 130.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU3_TEMP3": { - "path": "/run/devmap/sensors/PSU3_PMBUS/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 112.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU3_IIN": { - "path": "/run/devmap/sensors/PSU3_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU3_IOUT": { - "path": "/run/devmap/sensors/PSU3_PMBUS/curr2_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU3_PIN": { - "path": "/run/devmap/sensors/PSU3_PMBUS/power1_input", - "compute": "@/1000000.0", - "type": 0 - }, - "PSU3_POUT": { - "path": "/run/devmap/sensors/PSU3_PMBUS/power2_input", - "compute": "@/1000000.0", - "type": 0 - } - }, - "PSU4": { - "PSU4_VIN": { - "path": "/run/devmap/sensors/PSU4_PMBUS/in1_input", - "compute": "@/1000.0", - "type": 1 - }, - "PSU4_VOUT": { - "path": "/run/devmap/sensors/PSU4_PMBUS/in3_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "PSU4_FAN1_RPM": { - "path": "/run/devmap/sensors/PSU4_PMBUS/fan1_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU4_FAN2_RPM": { - "path": "/run/devmap/sensors/PSU4_PMBUS/fan2_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU4_TEMP1": { - "path": "/run/devmap/sensors/PSU4_PMBUS/temp1_input", - "thresholds": { - "upperCriticalVal": 70.0, - "maxAlarmVal": 65.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU4_TEMP2": { - "path": "/run/devmap/sensors/PSU4_PMBUS/temp2_input", - "thresholds": { - "upperCriticalVal": 130.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU4_TEMP3": { - "path": "/run/devmap/sensors/PSU4_PMBUS/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 112.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU4_IIN": { - "path": "/run/devmap/sensors/PSU4_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU4_IOUT": { - "path": "/run/devmap/sensors/PSU4_PMBUS/curr2_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU4_PIN": { - "path": "/run/devmap/sensors/PSU4_PMBUS/power1_input", - "compute": "@/1000000.0", - "type": 0 - }, - "PSU4_POUT": { - "path": "/run/devmap/sensors/PSU4_PMBUS/power2_input", - "compute": "@/1000000.0", - "type": 0 - } + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@3", + "pmUnitName": "PSU", + "sensors": [ + { + "name": "PSU4_VIN", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU4_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU4_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU4_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU4_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU4_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU4_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU4_IIN", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU4_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU4_PIN", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU4_POUT", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] } - } + ] } From f5280e79c17d0d9e430d9083ab19ca439ddbeeab Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Thu, 10 Oct 2024 14:59:19 -0700 Subject: [PATCH 051/479] Remove sensorMapList usage in SensorServiceHwTest Reviewed By: alandau Differential Revision: D64116649 fbshipit-source-id: 6d2d10efe8add65064b87267978b11d48ca30a6c --- .../hw_test/SensorServiceHwTest.cpp | 42 ++++--------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp b/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp index 74e2ace2bd85f..dcbe9c2e066a0 100644 --- a/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp +++ b/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp @@ -52,17 +52,9 @@ bool sensorReadOk(const std::string& sensorName) { TEST_F(SensorServiceHwTest, GetAllSensors) { auto res = getSensors(std::vector{}); std::vector sensorNames; - if (sensorConfig_.pmUnitSensorsList()->empty()) { - for (const auto& [fruName, sensorMap] : *sensorConfig_.sensorMapList()) { - for (const auto& [sensorName, sensor] : sensorMap) { - sensorNames.push_back(sensorName); - } - } - } else { - for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { - for (const auto& sensor : *pmUnitSensors.sensors()) { - sensorNames.push_back(*sensor.name()); - } + for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { + for (const auto& sensor : *pmUnitSensors.sensors()) { + sensorNames.push_back(*sensor.name()); } } EXPECT_EQ(sensorNames.size(), res.sensorData()->size()); @@ -87,17 +79,9 @@ TEST_F(SensorServiceHwTest, GetBogusSensor) { TEST_F(SensorServiceHwTest, GetSomeSensors) { std::vector sensorNames; - if (sensorConfig_.pmUnitSensorsList()->empty()) { - for (const auto& [fruName, sensorMap] : *sensorConfig_.sensorMapList()) { - if (sensorMap.size() > 0) { - sensorNames.push_back(sensorMap.begin()->first); - } - } - } else { - for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { - if (pmUnitSensors.sensors()->size() > 0) { - sensorNames.push_back(*pmUnitSensors.sensors()->front().name()); - } + for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { + if (pmUnitSensors.sensors()->size() > 0) { + sensorNames.push_back(*pmUnitSensors.sensors()->front().name()); } } @@ -146,17 +130,9 @@ TEST_F(SensorServiceHwTest, GetSomeSensors) { TEST_F(SensorServiceHwTest, GetSomeSensorsViaThrift) { std::vector sensorNames; - if (sensorConfig_.pmUnitSensorsList()->empty()) { - for (const auto& [fruName, sensorMap] : *sensorConfig_.sensorMapList()) { - if (sensorMap.size() > 0) { - sensorNames.push_back(sensorMap.begin()->first); - } - } - } else { - for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { - if (pmUnitSensors.sensors()->size() > 0) { - sensorNames.push_back(*pmUnitSensors.sensors()->front().name()); - } + for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { + if (pmUnitSensors.sensors()->size() > 0) { + sensorNames.push_back(*pmUnitSensors.sensors()->front().name()); } } // Trigger a fetch before the thrift request hits the server. From ee600b28aaf2bf9f2c239ef12b309c27ab7dc9c2 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Thu, 10 Oct 2024 14:59:19 -0700 Subject: [PATCH 052/479] Drop sensorMapList usage in UnitTests Summary: Unit test was using legacy structs. Changed it to use new structs Reviewed By: alandau Differential Revision: D64125102 fbshipit-source-id: af8eda890025f896a5c1c30302712243454a92b9 --- .../test/SensorServiceImplTest.cpp | 26 +++++---- .../test/SensorServiceThriftHandlerTest.cpp | 11 +++- .../sensor_service/test/TestUtils.cpp | 55 ++++++++++--------- 3 files changed, 50 insertions(+), 42 deletions(-) diff --git a/fboss/platform/sensor_service/test/SensorServiceImplTest.cpp b/fboss/platform/sensor_service/test/SensorServiceImplTest.cpp index e73e88b0b295e..1665dc32a4b46 100644 --- a/fboss/platform/sensor_service/test/SensorServiceImplTest.cpp +++ b/fboss/platform/sensor_service/test/SensorServiceImplTest.cpp @@ -1,6 +1,7 @@ // (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. #include +#include #include #include @@ -60,9 +61,9 @@ TEST_F(SensorServiceImplTest, fetchAndCheckSensorDataFailure) { SensorConfig sensorConfig; apache::thrift::SimpleJSONSerializer::deserialize( sensorConfJson, sensorConfig); - for (const auto& [fruName, sensorMap] : *sensorConfig.sensorMapList()) { - for (const auto& [sensorName, sensor] : sensorMap) { - ASSERT_TRUE(std::filesystem::remove(*sensor.path())); + for (const auto& pmUnitSensors : *sensorConfig.pmUnitSensorsList()) { + for (const auto& pmSensors : *pmUnitSensors.sensors()) { + ASSERT_TRUE(std::filesystem::remove(*pmSensors.sysfsPath())); } } @@ -85,9 +86,9 @@ TEST_F(SensorServiceImplTest, fetchAndCheckSensorDataSuccesAndThenFailure) { SensorConfig sensorConfig; apache::thrift::SimpleJSONSerializer::deserialize( sensorConfJson, sensorConfig); - for (const auto& [fruName, sensorMap] : *sensorConfig.sensorMapList()) { - for (const auto& [sensorName, sensor] : sensorMap) { - ASSERT_TRUE(std::filesystem::remove(*sensor.path())); + for (const auto& pmUnitSensors : *sensorConfig.pmUnitSensorsList()) { + for (const auto& pmSensors : *pmUnitSensors.sensors()) { + ASSERT_TRUE(std::filesystem::remove(*pmSensors.sysfsPath())); } } // Check that sensor value/timestamp are now empty which implies read failed @@ -95,18 +96,19 @@ TEST_F(SensorServiceImplTest, fetchAndCheckSensorDataSuccesAndThenFailure) { } TEST_F(SensorServiceImplTest, getSomeSensors) { + auto mockSensorData = getDefaultMockSensorData(); + auto mockSensorName = *std::views::keys(mockSensorData).begin(); + auto now = Utils::nowInSecs(); folly::test::TemporaryDirectory tmpDir = folly::test::TemporaryDirectory(); auto sensorServiceImpl = createSensorServiceImplForTest(tmpDir.path().string()); sensorServiceImpl->fetchSensorData(); - auto sensorData = sensorServiceImpl->getSensorsData( - {"MOCK_FRU_1_SENSOR_1", "BOGUS_SENSOR"}); + auto sensorData = + sensorServiceImpl->getSensorsData({mockSensorName, "BOGUS_SENSOR"}); EXPECT_EQ(sensorData.size(), 1); - EXPECT_EQ(*sensorData[0].name(), "MOCK_FRU_1_SENSOR_1"); - EXPECT_FLOAT_EQ( - *sensorData[0].value(), - getDefaultMockSensorData()["MOCK_FRU_1_SENSOR_1"]); + EXPECT_EQ(*sensorData[0].name(), mockSensorName); + EXPECT_FLOAT_EQ(*sensorData[0].value(), mockSensorData[mockSensorName]); EXPECT_GE(*sensorData[0].timeStamp(), now); } diff --git a/fboss/platform/sensor_service/test/SensorServiceThriftHandlerTest.cpp b/fboss/platform/sensor_service/test/SensorServiceThriftHandlerTest.cpp index 03024f6c9a73f..0b86053f022f2 100644 --- a/fboss/platform/sensor_service/test/SensorServiceThriftHandlerTest.cpp +++ b/fboss/platform/sensor_service/test/SensorServiceThriftHandlerTest.cpp @@ -1,5 +1,7 @@ // (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +#include + #include #include @@ -37,16 +39,19 @@ TEST_F( TEST_F( SensorServiceThriftHandlerTest, getSensorValuesByNameWithNonEmptySensorName) { - auto sensorNames = std::vector{"MOCK_FRU_1_SENSOR_1"}; + auto mockSensorData = getDefaultMockSensorData(); + auto mockSensorNamesIt = std::views::keys(mockSensorData).begin(); + + auto sensorNames = std::vector{*mockSensorNamesIt}; SensorReadResponse response; sensorServiceHandler_->getSensorValuesByNames( response, std::make_unique>(sensorNames)); EXPECT_EQ(response.sensorData()->size(), sensorNames.size()); EXPECT_EQ( - sensorMockData_.at("MOCK_FRU_1_SENSOR_1"), + sensorMockData_.at(*mockSensorNamesIt), *response.sensorData()[0].value()); - sensorNames.push_back("MOCK_FRU_1_SENSOR_2"); + sensorNames.push_back(*(++mockSensorNamesIt)); sensorServiceHandler_->getSensorValuesByNames( response, std::make_unique>(sensorNames)); EXPECT_EQ(response.sensorData()->size(), sensorNames.size()); diff --git a/fboss/platform/sensor_service/test/TestUtils.cpp b/fboss/platform/sensor_service/test/TestUtils.cpp index b5b5594d68219..7a965940efe6e 100644 --- a/fboss/platform/sensor_service/test/TestUtils.cpp +++ b/fboss/platform/sensor_service/test/TestUtils.cpp @@ -13,33 +13,34 @@ namespace { std::string mockSensorConfig(const std::string& tmpPath) { SensorConfig config; + PmUnitSensors pmUnitSensors; + pmUnitSensors.slotPath() = "/"; + pmUnitSensors.pmUnitName() = "MOCK"; - Sensor mock_fru_1_sensor_1, mock_fru_1_sensor_2, mock_fru_2_sensor_1; - mock_fru_1_sensor_1.path_ref() = tmpPath + "/mock_fru_1_sensor_1_path:temp1"; - mock_fru_1_sensor_2.path_ref() = tmpPath + "/mock_fru_1_sensor_2_path:fan1"; - mock_fru_2_sensor_1.path_ref() = tmpPath + "/mock_fru_2_sensor_1_path:vin"; - std::string value = "25"; - folly::writeFile(value, (*mock_fru_1_sensor_1.path()).c_str()); - value = "11152"; - folly::writeFile(value, (*mock_fru_1_sensor_2.path()).c_str()); - value = "11.875"; - folly::writeFile(value, (*mock_fru_2_sensor_1.path()).c_str()); + PmSensor mockFruSensor1, mockFruSensor2, mockFruSensor3; + mockFruSensor1.name() = "MOCK_FRU_SENSOR1"; + mockFruSensor1.compute() = "@/1000"; + mockFruSensor1.type() = SensorType::TEMPERTURE; + mockFruSensor1.sysfsPath() = tmpPath + "/mock_fru_sensor_1_path:temp1"; + folly::writeFile(std::string{"25"}, mockFruSensor1.sysfsPath()->c_str()); + mockFruSensor2.name() = "MOCK_FRU_SENSOR2"; + mockFruSensor2.type() = SensorType::FAN; + mockFruSensor2.sysfsPath() = tmpPath + "/mock_fru_sensor_2_path:fan1"; + folly::writeFile(std::string{"11152"}, mockFruSensor2.sysfsPath()->c_str()); + mockFruSensor3.name() = "MOCK_FRU_SENSOR3"; + mockFruSensor3.compute() = "@ + 5"; + mockFruSensor3.type() = SensorType::VOLTAGE; + mockFruSensor3.sysfsPath() = tmpPath + "/mock_fru_sensor_3_path:vin"; + folly::writeFile(std::string{"11.875"}, mockFruSensor3.sysfsPath()->c_str()); - mock_fru_1_sensor_1.compute() = "@/1000"; - mock_fru_2_sensor_1.compute() = "@ + 5"; - - mock_fru_1_sensor_1.type_ref() = SensorType::TEMPERTURE; - mock_fru_1_sensor_2.type_ref() = SensorType::FAN; - mock_fru_2_sensor_1.type_ref() = SensorType::VOLTAGE; - - sensorMap sMapFru1, sMapFru2; - sMapFru1["MOCK_FRU_1_SENSOR_1"] = mock_fru_1_sensor_1; - sMapFru1["MOCK_FRU_1_SENSOR_2"] = mock_fru_1_sensor_2; - sMapFru2["MOCK_FRU_2_SENSOR_1"] = mock_fru_2_sensor_1; - config.sensorMapList_ref() = { - {"MOCK_FRU1", sMapFru1}, {"MOCK_FRU2", sMapFru2}}; + pmUnitSensors.sensors() = { + std::move(mockFruSensor1), + std::move(mockFruSensor2), + std::move(mockFruSensor3), + }; + config.pmUnitSensorsList() = {std::move(pmUnitSensors)}; - std::string fileName = tmpPath + "/mock_sensor_config"; + std::string fileName = tmpPath + "/sensor_service.json"; folly::writeFile( apache::thrift::SimpleJSONSerializer::serialize(config), fileName.c_str()); @@ -57,8 +58,8 @@ std::shared_ptr createSensorServiceImplForTest( std::map getDefaultMockSensorData() { return std::map{ - {"MOCK_FRU_1_SENSOR_1", 0.025 /* 25/10000 */}, - {"MOCK_FRU_1_SENSOR_2", 11152}, - {"MOCK_FRU_2_SENSOR_1", 16.875 /* 11.875 + 5*/}, + {"MOCK_FRU_SENSOR1", 0.025 /* 25/10000 */}, + {"MOCK_FRU_SENSOR2", 11152}, + {"MOCK_FRU_SENSOR3", 16.875 /* 11.875 + 5*/}, }; } From e134e4cd7d8895884a95b6dde867c3217b82c189 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Thu, 10 Oct 2024 14:59:19 -0700 Subject: [PATCH 053/479] Remove sensorMapList usage in SensorServiceImpl Summary: - Removed sensorMapList usage - Renamed createSensorData to fetchSensorDataImpl as it's more accurate - Modified the previous fetchSensorDataImpl to resolveSensors. Reviewed By: alandau Differential Revision: D64117524 fbshipit-source-id: 6f3d864ca4c828eb70750ad20142db2bd2751d67 --- .../sensor_service/SensorServiceImpl.cpp | 134 +++++++----------- .../sensor_service/SensorServiceImpl.h | 14 +- 2 files changed, 50 insertions(+), 98 deletions(-) diff --git a/fboss/platform/sensor_service/SensorServiceImpl.cpp b/fboss/platform/sensor_service/SensorServiceImpl.cpp index 892b4f326b25f..a6825ecc57294 100644 --- a/fboss/platform/sensor_service/SensorServiceImpl.cpp +++ b/fboss/platform/sensor_service/SensorServiceImpl.cpp @@ -37,18 +37,7 @@ SensorServiceImpl::SensorServiceImpl() { XLOG(DBG2) << "Read sensor config: " << sensorConfJson; apache::thrift::SimpleJSONSerializer::deserialize( sensorConfJson, sensorConfig_); - for (const auto& [fruName, sensorMap] : *sensorConfig_.sensorMapList()) { - for (const auto& [sensorName, sensor] : sensorMap) { - XLOG(INFO) << fmt::format( - "{}: Path={}, Compute={}, FRU={}", - sensorName, - *sensor.path(), - sensor.compute().value_or(""), - fruName); - } - } fsdbSyncer_ = std::make_unique(); - XLOG(INFO) << "========================================================"; } SensorServiceImpl::~SensorServiceImpl() { @@ -78,43 +67,34 @@ std::map SensorServiceImpl::getAllSensorData() { void SensorServiceImpl::fetchSensorData() { std::map polledData; uint readFailures{0}; - // Not all platforms have new sensor thrift structs. - // If it's defined, we will use new sensor structs - // Otherwise fall back to the existing sensors structs. - if (!sensorConfig_.pmUnitSensorsList()->empty()) { - XLOG(INFO) << "Reading SensorData using PM based sensor structs..."; - for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { - auto pmSensors = *pmUnitSensors.sensors(); - if (auto versionedPmSensors = Utils().resolveVersionedSensors( - pmUnitInfoFetcher_, - *pmUnitSensors.slotPath(), - *pmUnitSensors.versionedSensors())) { - XLOG(INFO) << fmt::format( - "Resolved to versionedPmSensors config with version {}.{}.{} for pmUnit {} at {}", - *versionedPmSensors->productProductionState(), - *versionedPmSensors->productVersion(), - *versionedPmSensors->productSubVersion(), - *pmUnitSensors.pmUnitName(), - *pmUnitSensors.slotPath()); - pmSensors.insert( - pmSensors.end(), - versionedPmSensors->sensors()->begin(), - versionedPmSensors->sensors()->end()); - } - XLOG(INFO) << fmt::format( - "Processing {} unit {} sensors", - *pmUnitSensors.pmUnitName(), - pmSensors.size()); - for (const auto& sensor : pmSensors) { - fetchSensorDataImpl(sensor, readFailures, polledData); - } - } - } else { - XLOG(INFO) << "Fetching using legacy sensor structs..."; - for (const auto& [fruName, sensorMap] : *sensorConfig_.sensorMapList()) { - for (const auto& [sensorName, sensor] : sensorMap) { - fetchSensorDataImpl( - std::make_pair(sensorName, sensor), readFailures, polledData); + XLOG(INFO) << "Reading SensorData using PM based sensor structs..."; + for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { + auto pmSensors = resolveSensors(pmUnitSensors); + XLOG(INFO) << fmt::format( + "Processing {} unit {} sensors", + *pmUnitSensors.pmUnitName(), + pmSensors.size()); + for (const auto& sensor : pmSensors) { + const auto& sensorName = *sensor.name(); + auto sensorData = fetchSensorDataImpl( + sensorName, + *sensor.sysfsPath(), + *sensor.type(), + sensor.thresholds().to_optional(), + sensor.compute().to_optional()); + polledData[sensorName] = sensorData; + // We log 0 if there is a read failure. If we dont log 0 on failure, + // fb303 will pick up the last reported (on read success) value and + // keep reporting that as the value. For 0 values, it is accurate to + // read the value along with the kReadFailure counter. Alternative is + // to delete this counter if there is a failure. + fb303::fbData->setCounter( + fmt::format(kReadValue, sensorName), sensorData.value().value_or(0)); + if (!sensorData.value()) { + fb303::fbData->setCounter(fmt::format(kReadFailure, sensorName), 1); + readFailures++; + } else { + fb303::fbData->setCounter(fmt::format(kReadFailure, sensorName), 0); } } } @@ -141,47 +121,29 @@ void SensorServiceImpl::fetchSensorData() { } } -template -void SensorServiceImpl::fetchSensorDataImpl( - const T& sensor, - uint& readFailures, - std::map& polledData) { - SensorData sensorData; - std::string sensorName; - if constexpr (std::is_same_v>) { - sensorName = sensor.first; - sensorData = createSensorData( - sensorName, - *sensor.second.path(), - *sensor.second.type(), - sensor.second.thresholds().to_optional(), - sensor.second.compute().to_optional()); - } else { - sensorName = *sensor.name(); - sensorData = createSensorData( - sensorName, - *sensor.sysfsPath(), - *sensor.type(), - sensor.thresholds().to_optional(), - sensor.compute().to_optional()); - } - polledData[sensorName] = sensorData; - // We log 0 if there is a read failure. If we dont log 0 on failure, - // fb303 will pick up the last reported (on read success) value and - // keep reporting that as the value. For 0 values, it is accurate to - // read the value along with the kReadFailure counter. Alternative is - // to delete this counter if there is a failure. - fb303::fbData->setCounter( - fmt::format(kReadValue, sensorName), sensorData.value().value_or(0)); - if (!sensorData.value()) { - fb303::fbData->setCounter(fmt::format(kReadFailure, sensorName), 1); - readFailures++; - } else { - fb303::fbData->setCounter(fmt::format(kReadFailure, sensorName), 0); +std::vector SensorServiceImpl::resolveSensors( + const PmUnitSensors& pmUnitSensors) { + auto pmSensors = *pmUnitSensors.sensors(); + if (auto versionedPmSensors = Utils().resolveVersionedSensors( + pmUnitInfoFetcher_, + *pmUnitSensors.slotPath(), + *pmUnitSensors.versionedSensors())) { + XLOG(INFO) << fmt::format( + "Resolved to versionedPmSensors config with version {}.{}.{} for pmUnit {} at {}", + *versionedPmSensors->productProductionState(), + *versionedPmSensors->productVersion(), + *versionedPmSensors->productSubVersion(), + *pmUnitSensors.pmUnitName(), + *pmUnitSensors.slotPath()); + pmSensors.insert( + pmSensors.end(), + versionedPmSensors->sensors()->begin(), + versionedPmSensors->sensors()->end()); } + return pmSensors; } -SensorData SensorServiceImpl::createSensorData( +SensorData SensorServiceImpl::fetchSensorDataImpl( const std::string& sensorName, const std::string& sysfsPath, SensorType sensorType, diff --git a/fboss/platform/sensor_service/SensorServiceImpl.h b/fboss/platform/sensor_service/SensorServiceImpl.h index b2aab64404d98..dfa6758f2bf3d 100644 --- a/fboss/platform/sensor_service/SensorServiceImpl.h +++ b/fboss/platform/sensor_service/SensorServiceImpl.h @@ -47,18 +47,8 @@ class SensorServiceImpl { } private: - // Interim function while migrating to PmSensor. - // This will be removed once migration is done for all platforms. - template < - typename T, - typename = std::enable_if_t< - std::is_same_v> || - std::is_same_v>> - void fetchSensorDataImpl( - const T& sensor, - uint& readFailures, - std::map& polledData); - SensorData createSensorData( + std::vector resolveSensors(const PmUnitSensors& pmUnitSensors); + SensorData fetchSensorDataImpl( const std::string& name, const std::string& sysfsPath, SensorType sensorType, From 5868b87e8ec54da72f9d3449ca6f536c8e0b3e31 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Thu, 10 Oct 2024 14:59:19 -0700 Subject: [PATCH 054/479] Delete legacy sensor structs Summary: Delete them from sensor_config.thrift Reviewed By: alandau Differential Revision: D64118342 fbshipit-source-id: f5a0d756e3957b8b1db1d93416b4a6031b5b3c0c --- .../sensor_service/if/sensor_config.thrift | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/fboss/platform/sensor_service/if/sensor_config.thrift b/fboss/platform/sensor_service/if/sensor_config.thrift index 4ec125b0a4e5e..7ef900ddf738c 100644 --- a/fboss/platform/sensor_service/if/sensor_config.thrift +++ b/fboss/platform/sensor_service/if/sensor_config.thrift @@ -42,17 +42,6 @@ struct Thresholds { 6: optional double lowerCriticalVal; } -struct Sensor { - // Sysfs path - 1: string path; - // Contains the manufacture provided threshold values - 2: optional Thresholds thresholds; - // Compute method, same format and calculation approach as lm_sensor, e.g. @*0.1 - 3: optional string compute; - // contain various sensor type - 4: SensorType type; -} - // `PmSensor`: Describes a sensor in PmUnit. // // `name`: Name of the sensor. This isn't neccessarily same as PmUnitScopedName in PM config. @@ -107,12 +96,7 @@ struct PmUnitSensors { 4: list versionedSensors; } -typedef string SensorName -typedef map sensorMap -typedef string FruName - // The configuration for sensor mapping. struct SensorConfig { 1: list pmUnitSensorsList; - 2: map sensorMapList; } From 7ef0c4de6189a90119a6a4d71f735ebe3356d4a8 Mon Sep 17 00:00:00 2001 From: Chet Powers Date: Thu, 10 Oct 2024 15:26:19 -0700 Subject: [PATCH 055/479] Pass multi-npu-platform-mapping to qsfp_util Summary: Currently we're seeing opticsTxDisableEnable and testOpticsRemediation fail due to this missing flag on janga. When we call qsfp_util in the test, it's not able to recognize ports on the second NPU: ``` 2024/10/07 19:06:50.388|937684|MainThread|D|paramiko_utils: error: invalid port name/number "fab1/23/1": map::at ``` We should pass this flag to the qsfp_util whenever it's passed to the link test binary Reviewed By: xanabani Differential Revision: D64064512 fbshipit-source-id: a97fd4b1600eb242696ffa9ef37f58a1a6d2b4a8 --- .../link_tests/AgentEnsembleLinkSanityTests.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp b/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp index c2d8587b782a3..dbed0e7e20db5 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp @@ -42,6 +42,14 @@ bool isEqual( getChannelId(left) == getChannelId(right) && getChannels(left) == getChannels(right); } + +// For some reason this flag always evaluates as false if we hardcode the string +// So return it from a function instead +const std::string qsfpUtilPrefix() { + return FLAGS_multi_npu_platform_mapping + ? "wedge_qsfp_util --multi-npu-platform-mapping " + : "wedge_qsfp_util "; +} } // namespace class AgentEnsembleLinkSanityTestDataPlaneFlood : public AgentEnsembleLinkTest { @@ -275,7 +283,7 @@ TEST_F(AgentEnsembleLinkTest, opticsTxDisableRandomPorts) { // 3. Disable the randomly selected port from step 1 const std::string txDisableCmd = - "wedge_qsfp_util " + disabledPortNames + " --tx_disable"; + qsfpUtilPrefix() + disabledPortNames + " --tx_disable"; XLOG(DBG2) << fmt::format( "opticsTxDisableRandomPorts: Disabling ports using command: {:s}", txDisableCmd); @@ -296,7 +304,7 @@ TEST_F(AgentEnsembleLinkTest, opticsTxDisableRandomPorts) { // 6. Enable the randomly selected port from step 1 const std::string txEnableCmd = - "wedge_qsfp_util " + disabledPortNames + " --tx_enable"; + qsfpUtilPrefix() + disabledPortNames + " --tx_enable"; XLOG(DBG2) << fmt::format( "opticsTxDisableRandomPorts: Enabling ports using command: {:s}", txEnableCmd); @@ -317,7 +325,7 @@ TEST_F(AgentEnsembleLinkTest, opticsTxDisableEnable) { << "opticsTxDisableEnable: Did not detect any optical transceivers"; if (!opticalPorts.empty()) { - opticalPortNames = "wedge_qsfp_util " + opticalPortNames; + opticalPortNames = qsfpUtilPrefix() + opticalPortNames; const std::string txDisableCmd = opticalPortNames + "--tx-disable"; XLOG(DBG2) << "opticsTxDisableEnable: About to execute cmd: " @@ -375,7 +383,7 @@ TEST_F(AgentEnsembleLinkTest, testOpticsRemediation) { } const std::string txDisableCmd = - "wedge_qsfp_util " + disabledPortNames + " --tx-disable"; + qsfpUtilPrefix() + disabledPortNames + " --tx-disable"; // @lint-ignore CLANGTIDY folly::Subprocess(txDisableCmd).waitChecked(); From 50da808ac38bbdc529bd9bcd1d105d100b3733e7 Mon Sep 17 00:00:00 2001 From: Chet Powers Date: Thu, 10 Oct 2024 15:26:19 -0700 Subject: [PATCH 056/479] Fix some log strings Summary: The log strings had the wrong test name, fixing them here Reviewed By: harshitgulati18 Differential Revision: D64142582 fbshipit-source-id: d8db8f9d84d661e55632c08c4710562350a20dd4 --- .../test/link_tests/AgentEnsembleLinkSanityTests.cpp | 8 +++++--- fboss/agent/test/link_tests/LinkSanityTests.cpp | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp b/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp index dbed0e7e20db5..757a379d22fbf 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp @@ -237,7 +237,7 @@ TEST_F(AgentEnsembleLinkSanityTestDataPlaneFlood, ptpEnableIsHitless) { TEST_F(AgentEnsembleLinkTest, opticsTxDisableRandomPorts) { auto [opticalPorts, opticalPortNames] = getOpticalCabledPortsAndNames(); EXPECT_FALSE(opticalPorts.empty()) - << "opticsTxDisableEnable: Did not detect any optical transceivers"; + << "opticsTxDisableRandomPorts: Did not detect any optical transceivers"; auto connectedPairPortIds = getConnectedOpticalPortPairWithFeature( TransceiverFeature::TX_DISABLE, phy::Side::LINE); @@ -295,7 +295,8 @@ TEST_F(AgentEnsembleLinkTest, opticsTxDisableRandomPorts) { // 4. Verify all Expected Down ports from step 2 go Down EXPECT_NO_THROW(waitForLinkStatus(expectedDownPorts, false)); XLOG(DBG2) << fmt::format( - "opticsTxDisableEnable: link Tx disabled for {:s}", disabledPortNames); + "opticsTxDisableRandomPorts: link Tx disabled for {:s}", + disabledPortNames); // 5. Verify thet expected Up ports (all optical ports - expected Down ports) // keep @@ -316,7 +317,8 @@ TEST_F(AgentEnsembleLinkTest, opticsTxDisableRandomPorts) { // 7. Make sure all the ports are Up again EXPECT_NO_THROW(waitForLinkStatus(opticalPorts, true)); XLOG(DBG2) << fmt::format( - "opticsTxDisableEnable: link Tx enabled for {:s}", disabledPortNames); + "opticsTxDisableRandomPorts: link Tx enabled for {:s}", + disabledPortNames); } TEST_F(AgentEnsembleLinkTest, opticsTxDisableEnable) { diff --git a/fboss/agent/test/link_tests/LinkSanityTests.cpp b/fboss/agent/test/link_tests/LinkSanityTests.cpp index ba3d374c3ebb6..a7a1f79e9cb90 100644 --- a/fboss/agent/test/link_tests/LinkSanityTests.cpp +++ b/fboss/agent/test/link_tests/LinkSanityTests.cpp @@ -235,7 +235,7 @@ TEST_F(LinkSanityTestDataPlaneFlood, ptpEnableIsHitless) { TEST_F(LinkTest, opticsTxDisableRandomPorts) { auto [opticalPorts, opticalPortNames] = getOpticalCabledPortsAndNames(); EXPECT_FALSE(opticalPorts.empty()) - << "opticsTxDisableEnable: Did not detect any optical transceivers"; + << "opticsTxDisableRandomPorts: Did not detect any optical transceivers"; auto connectedPairPortIds = getConnectedOpticalPortPairWithFeature( TransceiverFeature::TX_DISABLE, phy::Side::LINE); @@ -293,7 +293,8 @@ TEST_F(LinkTest, opticsTxDisableRandomPorts) { // 4. Verify all Expected Down ports from step 2 go Down EXPECT_NO_THROW(waitForLinkStatus(expectedDownPorts, false)); XLOG(DBG2) << fmt::format( - "opticsTxDisableEnable: link Tx disabled for {:s}", disabledPortNames); + "opticsTxDisableRandomPorts: link Tx disabled for {:s}", + disabledPortNames); // 5. Verify thet expected Up ports (all optical ports - expected Down ports) // keep @@ -314,7 +315,8 @@ TEST_F(LinkTest, opticsTxDisableRandomPorts) { // 7. Make sure all the ports are Up again EXPECT_NO_THROW(waitForLinkStatus(opticalPorts, true)); XLOG(DBG2) << fmt::format( - "opticsTxDisableEnable: link Tx enabled for {:s}", disabledPortNames); + "opticsTxDisableRandomPorts: link Tx enabled for {:s}", + disabledPortNames); } TEST_F(LinkTest, opticsTxDisableEnable) { From ca8bc77f421ebb99ec978accb4e5e01b972d30bf Mon Sep 17 00:00:00 2001 From: Chet Powers Date: Thu, 10 Oct 2024 15:26:19 -0700 Subject: [PATCH 057/479] use folly::synchronized for I2cControllerStats Summary: We were running into race conditions with these stats, make the I2cControllerStats object synchronized Reviewed By: harshitgulati18 Differential Revision: D64145306 fbshipit-source-id: 1615c2ef25f93446ad5018b1aee3f48b2ce88bf3 --- fboss/lib/i2c/BUCK | 1 + fboss/lib/i2c/I2cController.h | 34 ++++++++++++++++++---------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/fboss/lib/i2c/BUCK b/fboss/lib/i2c/BUCK index 27d95f964c958..47ef7233224c2 100644 --- a/fboss/lib/i2c/BUCK +++ b/fboss/lib/i2c/BUCK @@ -45,6 +45,7 @@ cpp_library( "//fboss/agent:utils", "//folly:format", "//folly:range", + "//folly:synchronized", "//folly/io/async:async_base", "//folly/lang:bits", "//folly/logging:logging", diff --git a/fboss/lib/i2c/I2cController.h b/fboss/lib/i2c/I2cController.h index fcf72d3b9a86d..4dc0bdc834c2b 100644 --- a/fboss/lib/i2c/I2cController.h +++ b/fboss/lib/i2c/I2cController.h @@ -9,6 +9,7 @@ */ #pragma once +#include #include #include "fboss/lib/i2c/gen-cpp2/i2c_controller_stats_types.h" @@ -18,50 +19,51 @@ namespace facebook::fboss { */ class I2cController { public: - I2cController(std::string name) { - *i2cControllerPlatformStats_.controllerName_() = name; + explicit I2cController(std::string name) { + *i2cControllerPlatformStats_.wlock()->controllerName_() = name; } virtual ~I2cController() {} // Reset all i2c stats void resetStats() { - *i2cControllerPlatformStats_.readTotal_() = 0; - *i2cControllerPlatformStats_.readFailed_() = 0; - *i2cControllerPlatformStats_.readBytes_() = 0; - *i2cControllerPlatformStats_.writeTotal_() = 0; - *i2cControllerPlatformStats_.writeFailed_() = 0; - *i2cControllerPlatformStats_.writeBytes_() = 0; + auto stats = i2cControllerPlatformStats_.wlock(); + *stats->readTotal_() = 0; + *stats->readFailed_() = 0; + *stats->readBytes_() = 0; + *stats->writeTotal_() = 0; + *stats->writeFailed_() = 0; + *stats->writeBytes_() = 0; } // Total number of reads void incrReadTotal(uint32_t count = 1) { - *i2cControllerPlatformStats_.readTotal_() += count; + *i2cControllerPlatformStats_.wlock()->readTotal_() += count; } // Total Read failures void incrReadFailed(uint32_t count = 1) { - *i2cControllerPlatformStats_.readFailed_() += count; + *i2cControllerPlatformStats_.wlock()->readFailed_() += count; } // Number of bytes read void incrReadBytes(uint32_t count = 1) { - *i2cControllerPlatformStats_.readBytes_() += count; + *i2cControllerPlatformStats_.wlock()->readBytes_() += count; } // Total number of writes void incrWriteTotal(uint32_t count = 1) { - *i2cControllerPlatformStats_.writeTotal_() += count; + *i2cControllerPlatformStats_.wlock()->writeTotal_() += count; } // Total write failures void incrWriteFailed(uint32_t count = 1) { - *i2cControllerPlatformStats_.writeFailed_() += count; + *i2cControllerPlatformStats_.wlock()->writeFailed_() += count; } // Number of bytes written void incrWriteBytes(uint32_t count = 1) { - *i2cControllerPlatformStats_.writeBytes_() += count; + *i2cControllerPlatformStats_.wlock()->writeBytes_() += count; } /* Get the I2c transaction stats from the i2c controller */ const I2cControllerStats getI2cControllerPlatformStats() const { // return the structre reference of latest i2c transaction stats - return i2cControllerPlatformStats_; + return *i2cControllerPlatformStats_.rlock(); } virtual void i2cTimeProfilingStart() {} @@ -72,7 +74,7 @@ class I2cController { private: // Platform i2c controller stats - I2cControllerStats i2cControllerPlatformStats_; + folly::Synchronized i2cControllerPlatformStats_; }; } // namespace facebook::fboss From 2d179d5349192b758304a42c6c4bfd722d0b734b Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 10 Oct 2024 17:12:28 -0700 Subject: [PATCH 058/479] Test both v4 and v6 destinations in remote nbr discard test Summary: As titled Reviewed By: zechengh09 Differential Revision: D64192519 fbshipit-source-id: f8d4c9a7263c8d78081eb775ae93d35ce5691af6 --- .../test/agent_hw_tests/AgentVoqSwitchTests.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp index fb6209ee78b34..806727376735e 100644 --- a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp @@ -1941,18 +1941,20 @@ TEST_F( auto verify = [=, this]() { PortID portId = masterLogicalInterfacePortIds()[0]; - folly::IPAddressV6 kNeighborIp("100::2"); + folly::IPAddressV6 kNeighbor6Ip("100::2"); + folly::IPAddressV4 kNeighbor4Ip("100.0.0.2"); auto portStatsBefore = getLatestPortStats(portId); auto switchDropStatsBefore = getAggregatedSwitchDropStats(); - sendPacket(kNeighborIp, portId); + sendPacket(kNeighbor6Ip, portId); + sendPacket(kNeighbor4Ip, portId); WITH_RETRIES({ auto portStatsAfter = getLatestPortStats(portId); auto switchDropStatsAfter = getAggregatedSwitchDropStats(); EXPECT_EVENTUALLY_EQ( - 1, + 2, *portStatsAfter.inDiscardsRaw_() - *portStatsBefore.inDiscardsRaw_()); EXPECT_EVENTUALLY_EQ( - 1, + 2, *portStatsAfter.inDstNullDiscards_() - *portStatsBefore.inDstNullDiscards_()); EXPECT_EVENTUALLY_EQ( @@ -1961,7 +1963,7 @@ TEST_F( EXPECT_EVENTUALLY_EQ( *switchDropStatsAfter.ingressPacketPipelineRejectDrops() - *switchDropStatsBefore.ingressPacketPipelineRejectDrops(), - 1); + 2); // Pipeline reject drop, not a queue resolution drop, // which happens say when a pkt comes in with a non router // MAC From 74d45c09b17a8db62bdf9865f6f514b080275f40 Mon Sep 17 00:00:00 2001 From: Chet Powers Date: Thu, 10 Oct 2024 17:23:28 -0700 Subject: [PATCH 059/479] Allow model MINIPACK3 for montblanc Summary: The fruid.json on fboss324778231.snc1 has a model of MINIPACK3. Since we weren't checking this, it was hitting the comparison against 'MINIPACK' and trying to initialize as a minipack1 device Reviewed By: harshitgulati18 Differential Revision: D64212436 fbshipit-source-id: 9f2dea85fe8a93db1dbc41f81f5ecd1356540dbf --- fboss/lib/platforms/PlatformProductInfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fboss/lib/platforms/PlatformProductInfo.cpp b/fboss/lib/platforms/PlatformProductInfo.cpp index 1b6ce83753c36..0f0de84c30137 100644 --- a/fboss/lib/platforms/PlatformProductInfo.cpp +++ b/fboss/lib/platforms/PlatformProductInfo.cpp @@ -95,7 +95,8 @@ void PlatformProductInfo::initMode() { type_ = PlatformType::PLATFORM_GALAXY_FC; } else if ( modelName.find("Montblanc") == 0 || modelName.find("MONTBLANC") == 0 || - modelName.find("MINIPACK3_CHASSIS_BUNDLE") == 0) { + modelName.find("MINIPACK3_CHASSIS_BUNDLE") == 0 || + modelName.find("MINIPACK3") == 0) { type_ = PlatformType::PLATFORM_MONTBLANC; } else if ( modelName.find("MINIPACK") == 0 || modelName.find("MINIPHOTON") == 0) { From d5387c59f9913a5e9d40b10f22cc9de74be38d42 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Thu, 10 Oct 2024 18:55:04 -0700 Subject: [PATCH 060/479] enhance AgentCoppQosTest to verify mid vs low traffic Summary: This test enhancement should catch wrong CPU port scheduler behavior due to missing patch D62544053, see CS00012369373 for more details. Differential Revision: D64130591 fbshipit-source-id: 0539ab87e5c16c097ad249eef5e2e73855a681a3 --- .../test/agent_hw_tests/AgentCoppTests.cpp | 45 ++++++++++++++++--- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp b/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp index 3694e90b265b3..a3b3c945dbec9 100644 --- a/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp @@ -1660,7 +1660,7 @@ TEST_F(AgentCoppQueueStuckTest, CpuQueueHighRateTraffic) { TEST_F(AgentCoppQosTest, HighVsLowerPriorityCpuQueueTrafficPrioritization) { constexpr int kReceiveRetries = 2; - constexpr int kHighPriorityPacketCount = 30000; + constexpr int kHigherPriorityPacketCount = 30000; constexpr int packetsPerBurst = 1000; auto setup = [=, this]() { setupEcmpDataplaneLoop(); }; @@ -1668,7 +1668,7 @@ TEST_F(AgentCoppQosTest, HighVsLowerPriorityCpuQueueTrafficPrioritization) { auto verify = [&]() { auto configIntf = folly::copy( *(this->initialConfig(*getAgentEnsemble())).interfaces())[1]; - const auto ipForHighPriorityQueue = + const auto ipForHigherPriorityQueue = folly::IPAddress::createNetwork(configIntf.ipAddresses()[1], -1, false) .first; auto baseVlan = utility::firstVlanID(getProgrammedState()); @@ -1685,6 +1685,7 @@ TEST_F(AgentCoppQosTest, HighVsLowerPriorityCpuQueueTrafficPrioritization) { auto switchId = getSw()->getScopeResolver()->scope(portId).switchId(); auto asic = getSw()->getHwAsicTable()->getHwAsic(switchId); + // first verify high priority traffic vs low priority traffic auto highPriorityCoppQueueStatsBefore = utility::getQueueOutPacketsWithRetry( getSw(), @@ -1698,9 +1699,9 @@ TEST_F(AgentCoppQosTest, HighVsLowerPriorityCpuQueueTrafficPrioritization) { sendPacketBursts( portId, nextVlan, - kHighPriorityPacketCount, + kHigherPriorityPacketCount, packetsPerBurst, - ipForHighPriorityQueue, + ipForHigherPriorityQueue, utility::kNonSpecialPort1, utility::kBgpPort); @@ -1711,12 +1712,44 @@ TEST_F(AgentCoppQosTest, HighVsLowerPriorityCpuQueueTrafficPrioritization) { this->masterLogicalPortIds({cfg::PortType::INTERFACE_PORT})[0]), utility::getCoppHighPriQueueId(asic), kReceiveRetries, - highPriorityCoppQueueStatsBefore + kHighPriorityPacketCount); + highPriorityCoppQueueStatsBefore + kHigherPriorityPacketCount); EXPECT_EQ( - kHighPriorityPacketCount, + kHigherPriorityPacketCount, highPriorityCoppQueueStatsAfter - highPriorityCoppQueueStatsBefore); + // then verify mid priority traffic vs low priority traffic + auto midPriorityCoppQueueStatsBefore = utility::getQueueOutPacketsWithRetry( + getSw(), + this->switchIdForPort( + this->masterLogicalPortIds({cfg::PortType::INTERFACE_PORT})[0]), + utility::getCoppMidPriQueueId(this->getAgentEnsemble()->getL3Asics()), + kReceiveRetries, + 0); + + // Send a fixed number of mid priority packets on port1 + sendPacketBursts( + portId, + nextVlan, + kHigherPriorityPacketCount, + packetsPerBurst, + ipForHigherPriorityQueue, + utility::kNonSpecialPort1, + utility::kNonSpecialPort2); + + // Check mid priority queue stats to see if all packets are received + auto midPriorityCoppQueueStatsAfter = utility::getQueueOutPacketsWithRetry( + getSw(), + this->switchIdForPort( + this->masterLogicalPortIds({cfg::PortType::INTERFACE_PORT})[0]), + utility::getCoppMidPriQueueId(this->getAgentEnsemble()->getL3Asics()), + kReceiveRetries, + highPriorityCoppQueueStatsBefore + kHigherPriorityPacketCount); + + EXPECT_EQ( + kHigherPriorityPacketCount, + midPriorityCoppQueueStatsAfter - midPriorityCoppQueueStatsBefore); + if (asic->isSupported(HwAsic::Feature::CPU_VOQ_BUFFER_PROFILE)) { // check watermark of low priority voq should reach max shared buffer size const double kVariance = 0.01; From 5c0afee9e4d596199a9882b0ca22b8d60812c5f9 Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Thu, 10 Oct 2024 21:42:31 -0700 Subject: [PATCH 061/479] PathVisitor: make to_dynamic work with struct type 1/n Summary: instead of folly::dynamc, it turns out apache::thrift::to_dynamic is more preferred from some wp search. and that is why we are seeing compilation issue with struct. so changing that and make compilation happy Differential Revision: D64123869 Privacy Context Container: L1125642 fbshipit-source-id: a1994a0f98363813020a0fc4a1072852365fce1d --- fboss/thrift_cow/nodes/ThriftHybridNode-inl.h | 5 ++++- fboss/thrift_cow/visitors/tests/BUCK | 1 + fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp | 12 +++++++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/fboss/thrift_cow/nodes/ThriftHybridNode-inl.h b/fboss/thrift_cow/nodes/ThriftHybridNode-inl.h index 542a608358a9f..9a7356b60c403 100644 --- a/fboss/thrift_cow/nodes/ThriftHybridNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftHybridNode-inl.h @@ -103,7 +103,10 @@ struct ThriftHybridNode : public thrift_cow::Serializable { #ifdef ENABLE_DYNAMIC_APIS folly::dynamic toFollyDynamic() const { - return folly::toDynamic(this->ref()); + folly::dynamic dyn; + facebook::thrift::to_dynamic( + dyn, this->ref(), facebook::thrift::dynamic_format::JSON_1); + return dyn; } // this would override the underlying thrift object diff --git a/fboss/thrift_cow/visitors/tests/BUCK b/fboss/thrift_cow/visitors/tests/BUCK index 80efd055362e9..18c55eb64bc6f 100644 --- a/fboss/thrift_cow/visitors/tests/BUCK +++ b/fboss/thrift_cow/visitors/tests/BUCK @@ -27,6 +27,7 @@ cpp_unittest( ], preprocessor_flags = [ "-DENABLE_DYNAMIC_APIS", + # "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", ], deps = [ "fbsource//third-party/googletest:gmock", diff --git a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp index 3b07f8d447395..cbe397df4eaa1 100644 --- a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp @@ -86,17 +86,17 @@ TEST(PathVisitorTests, AccessFieldInContainer) { auto structA = createSimpleTestStruct(); auto nodeA = std::make_shared>(structA); - cfg::L4PortRange got; - auto processPath = pvlambda([&got](auto& node, auto begin, auto end) { + folly::dynamic dyn; + auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { EXPECT_EQ(begin, end); - got = facebook::thrift::from_dynamic( - node.toFollyDynamic(), facebook::thrift::dynamic_format::JSON_1); + dyn = node.toFollyDynamic(); }); - std::vector path{"mapOfEnumToStruct", "3"}; auto result = RootPathVisitor::visit( *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); EXPECT_EQ(result, ThriftTraverseResult::OK); + cfg::L4PortRange got = facebook::thrift::from_dynamic( + dyn, facebook::thrift::dynamic_format::JSON_1); EXPECT_EQ(*got.min(), 100); EXPECT_EQ(*got.max(), 200); @@ -104,6 +104,8 @@ TEST(PathVisitorTests, AccessFieldInContainer) { result = RootPathVisitor::visit( *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); EXPECT_EQ(result, ThriftTraverseResult::OK); + got = facebook::thrift::from_dynamic( + dyn, facebook::thrift::dynamic_format::JSON_1); EXPECT_EQ(*got.min(), 100); EXPECT_EQ(*got.max(), 200); } From 43dd760613d3493f4cf5b0808e3f8caaff9d962d Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Thu, 10 Oct 2024 21:42:31 -0700 Subject: [PATCH 062/479] access map's value based on key 2/n Summary: making incremental change here where if we are accessing beyond the map. For example, hybridMap/1 where we annotate hybridMap as skip_thrift_cow We are able to get the value the key points to. Differential Revision: D63910795 Privacy Context Container: L1210319 fbshipit-source-id: 0b7e7696833881272442daca02ccf37b1b20ca2c --- fboss/thrift_cow/visitors/PathVisitor.h | 14 ++++++++++++-- .../thrift_cow/visitors/tests/PathVisitorTests.cpp | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/fboss/thrift_cow/visitors/PathVisitor.h b/fboss/thrift_cow/visitors/PathVisitor.h index fb04857aa7348..eecbefff32a3a 100644 --- a/fboss/thrift_cow/visitors/PathVisitor.h +++ b/fboss/thrift_cow/visitors/PathVisitor.h @@ -365,8 +365,18 @@ struct PathVisitorImpl< if (begin == end) { op.visitTyped(node, begin, end); } else { - // TODO: handle traversing thrift objects in hybrid nodes - return ThriftTraverseResult::VISITOR_EXCEPTION; + // get the value based on the key + auto& tObj = node.ref(); + using KeyT = typename folly::remove_cvref_t::key_type; + // Get key + auto token = *begin++; + auto key = folly::tryTo(token); + if (!key.hasValue()) { + return ThriftTraverseResult::INVALID_MAP_KEY; + } + auto& val = tObj.at(key.value()); + // TODO: support operator + LOG(INFO) << val; } return ThriftTraverseResult::OK; } catch (const std::exception& ex) { diff --git a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp index cbe397df4eaa1..f1e75f7387aa9 100644 --- a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp @@ -72,12 +72,12 @@ TEST(PathVisitorTests, HybridMapAccess) { EXPECT_TRUE(dyn[1].asBool()); } { - // TODO: handle traversing beyond hybrid node // hybridMap/1 std::vector path = {"hybridMap", "1"}; auto result = RootPathVisitor::visit( *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); - EXPECT_EQ(result, ThriftTraverseResult::VISITOR_EXCEPTION); + EXPECT_EQ(result, ThriftTraverseResult::OK); + // EXPECT_TRUE(dyn.asBool()); } } #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ From 4ceb867505ff868abd13de271c0897fa13e373e4 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 10 Oct 2024 21:43:08 -0700 Subject: [PATCH 063/479] Default to non-cached hw-object data from fboss2 cli Summary: As titled. This is the same default as we had for fboss cli. We are more interested in HW/SAI level data than the one cached in our store. https://www.internalfb.com/code/fbsource/[b4af2e4876fe9080e56b1c49a813c9ed862f5414]/fbcode/fboss/agent/if/ctrl.thrift?lines=1142-1143 Reviewed By: shri-khare, zechengh09 Differential Revision: D64215323 fbshipit-source-id: cbd3d921b25082cd7b4d11ee76dc61e9c9becbc0 --- fboss/cli/fboss2/commands/show/hwobject/CmdShowHwObject.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fboss/cli/fboss2/commands/show/hwobject/CmdShowHwObject.h b/fboss/cli/fboss2/commands/show/hwobject/CmdShowHwObject.h index bb326744f3f77..6506e2101de06 100644 --- a/fboss/cli/fboss2/commands/show/hwobject/CmdShowHwObject.h +++ b/fboss/cli/fboss2/commands/show/hwobject/CmdShowHwObject.h @@ -39,8 +39,10 @@ class CmdShowHwObject [&hwObjectInfo, queriedHwObjectTypes]( apache::thrift::Client& client) { std::string hwAgentObjectInfo; + // TODO - we look at non cached objects. Add a cli option to + // look at cached objects if so desired. client.sync_listHwObjects( - hwAgentObjectInfo, queriedHwObjectTypes.data(), true); + hwAgentObjectInfo, queriedHwObjectTypes.data(), false); hwObjectInfo += hwAgentObjectInfo; }; utils::runOnAllHwAgents(hostInfo, hwAgentQueryFn); From 3db7847802bdff283d1e0da9b7a047c6cde485ec Mon Sep 17 00:00:00 2001 From: Max Ng Date: Thu, 10 Oct 2024 22:54:29 -0700 Subject: [PATCH 064/479] Add missing PfcTestUtils cmake target Summary: Add missing PfcTestUtils cmake target Reviewed By: zechengh09 Differential Revision: D64216135 fbshipit-source-id: a0967511e2aa49ad0e00fcfdeeb66610a2a18082 --- cmake/AgentTestAgentHwTests.cmake | 1 + cmake/AgentTestUtils.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/cmake/AgentTestAgentHwTests.cmake b/cmake/AgentTestAgentHwTests.cmake index 46dac0a62d857..84d1f19aa1d7c 100644 --- a/cmake/AgentTestAgentHwTests.cmake +++ b/cmake/AgentTestAgentHwTests.cmake @@ -78,6 +78,7 @@ target_link_libraries(agent_hw_test_src trunk_utils traffic_policy_utils olympic_qos_utils + pfc_test_utils qos_test_utils queue_test_utils invariant_test_utils diff --git a/cmake/AgentTestUtils.cmake b/cmake/AgentTestUtils.cmake index b71fa301af85c..c658c49267918 100644 --- a/cmake/AgentTestUtils.cmake +++ b/cmake/AgentTestUtils.cmake @@ -352,6 +352,17 @@ target_link_libraries(route_test_utils route_distribution_gen ) +add_library(pfc_test_utils + fboss/agent/test/utils/PfcTestUtils.cpp +) + +target_link_libraries(pfc_test_utils + acl_test_utils + hardware_stats_cpp2 + switch_config_cpp2 + utils +) + add_library(queue_test_utils fboss/agent/test/utils/QueueTestUtils.cpp ) From 9127b03eae992903e4da96e8b781567ebe504381 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 10 Oct 2024 23:18:17 -0700 Subject: [PATCH 065/479] Don't assume fixed subnet, nhop address for a port Summary: These can vary for different chips. Esp on VOQ switches, where the first interface might be the RCY interface. Reviewed By: zechengh09 Differential Revision: D64208651 fbshipit-source-id: 30d20d9ae273cf147731330d8977b3d13b40c09a --- fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp b/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp index 8fd03f4ffc12b..44dcaa0bec18a 100644 --- a/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp @@ -457,6 +457,10 @@ class AgentNeighborOnMultiplePortsTest : public AgentHwTest { return utility::onePortPerInterfaceConfig( ensemble.getSw(), ensemble.masterLogicalPortIds()); } + folly::IPAddressV6 neighborIP(PortID port) const { + utility::EcmpSetupAnyNPorts6 ecmpHelper6(getProgrammedState()); + return ecmpHelper6.ip(PortDescriptor(port)); + } void oneNeighborPerPortSetup(const std::vector& portIds) { auto cfg = initialConfig(*getAgentEnsemble()); @@ -532,9 +536,11 @@ TYPED_TEST(AgentNeighborOnMultiplePortsTest, ResolveOnTwoPorts) { }; auto verify = [&]() { EXPECT_FALSE(this->isProgrammedToCPU( - this->masterLogicalInterfacePortIds()[0], folly::IPAddressV6("1::1"))); + this->masterLogicalInterfacePortIds()[0], + this->neighborIP(this->masterLogicalInterfacePortIds()[0]))); EXPECT_FALSE(this->isProgrammedToCPU( - this->masterLogicalInterfacePortIds()[1], folly::IPAddressV6("2::2"))); + this->masterLogicalInterfacePortIds()[1], + this->neighborIP(this->masterLogicalInterfacePortIds()[1]))); }; this->verifyAcrossWarmBoots(setup, verify); } From 7fcfc9019e59c72d1ca8ade7f330cda9ff373b6d Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 11 Oct 2024 00:13:44 -0700 Subject: [PATCH 066/479] Use passed in switch state in state update function lambda Summary: As titled. Reviewed By: zechengh09 Differential Revision: D64208893 fbshipit-source-id: ac4cf1111a4e9fa2c1cfd8f44d37de881cc74869 --- fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp b/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp index 44dcaa0bec18a..2aeb49b2a4c47 100644 --- a/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp @@ -481,8 +481,7 @@ class AgentNeighborOnMultiplePortsTest : public AgentHwTest { this->applyNewState([&](const std::shared_ptr& in) { utility::EcmpSetupAnyNPorts6 ecmpHelper6( in, utility::MacAddressGenerator().get(dstMac.u64NBO() + idx + 1)); - return ecmpHelper6.resolveNextHops( - getProgrammedState(), {PortDescriptor(portIds[idx])}); + return ecmpHelper6.resolveNextHops(in, {PortDescriptor(portIds[idx])}); }); } From be21106f5749799f129e4d9873f24e1a425552fd Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 11 Oct 2024 00:13:44 -0700 Subject: [PATCH 067/479] Remove stray debug log Summary: As titled Reviewed By: zechengh09 Differential Revision: D64209603 fbshipit-source-id: b3ef2f1be25c86562e125f4d87d9a15a355247ed --- fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp b/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp index 2aeb49b2a4c47..cbb1e54bc9f8e 100644 --- a/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp @@ -257,7 +257,6 @@ class AgentNeighborTest : public AgentHwTest { kIntfID(), NeighborT::getNeighborAddress(), *getAgentEnsemble()); EXPECT_EVENTUALLY_TRUE(neighborInfo.classId().has_value()); if (neighborInfo.classId().has_value()) { - XLOG(INFO) << " GOT CLASSID: " << neighborInfo.classId().value(); EXPECT_EVENTUALLY_TRUE( programToTrunk || classID == neighborInfo.classId().value()); } From ffafcac03452400a96aa3e641c18ca58f59977ed Mon Sep 17 00:00:00 2001 From: genkzgnluxbjeyb Date: Fri, 11 Oct 2024 02:35:39 -0700 Subject: [PATCH 068/479] fboss_asic_production_features_sync Differential Revision: D64227413 fbshipit-source-id: 3854c2164243d4ccca09b1de017e75515e310681 --- ...asic_production_features.materialized_JSON | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/fboss/oss/production_features/asic_production_features.materialized_JSON b/fboss/oss/production_features/asic_production_features.materialized_JSON index eb971bb518ff0..3c035e9cb782e 100644 --- a/fboss/oss/production_features/asic_production_features.materialized_JSON +++ b/fboss/oss/production_features/asic_production_features.materialized_JSON @@ -27,7 +27,8 @@ 38, 39, 41, - 40 + 40, + 44 ], "jericho2": [ 2, @@ -112,7 +113,8 @@ 35, 36, 37, - 41 + 41, + 44 ], "tomahawk3": [ 2, @@ -148,7 +150,8 @@ 38, 39, 40, - 42 + 42, + 44 ], "tomahawk4": [ 2, @@ -183,7 +186,8 @@ 39, 40, 42, - 43 + 43, + 44 ], "tomahawk5": [ 2, @@ -216,7 +220,8 @@ 38, 39, 40, - 42 + 42, + 44 ], "yuba": [ 2, @@ -246,7 +251,8 @@ 40, 7, 25, - 42 + 42, + 44 ] }, "asicToFeatureNames": { @@ -277,7 +283,8 @@ "HGRID_DU_ROUTE_SCALE", "HGRID_UU_ROUTE_SCALE", "TH_ALPM_ROUTE_SCALE", - "HUNDRED_THOUSAND_ROUTE_SCALE" + "HUNDRED_THOUSAND_ROUTE_SCALE", + "VLAN" ], "jericho2": [ "CPU_RX_TX", @@ -362,7 +369,8 @@ "EGRESS_MIRRORING", "RSW_ROUTE_SCALE", "FSW_ROUTE_SCALE", - "TH_ALPM_ROUTE_SCALE" + "TH_ALPM_ROUTE_SCALE", + "VLAN" ], "tomahawk3": [ "CPU_RX_TX", @@ -398,7 +406,8 @@ "HGRID_DU_ROUTE_SCALE", "HGRID_UU_ROUTE_SCALE", "HUNDRED_THOUSAND_ROUTE_SCALE", - "PFC" + "PFC", + "VLAN" ], "tomahawk4": [ "CPU_RX_TX", @@ -433,7 +442,8 @@ "HGRID_UU_ROUTE_SCALE", "HUNDRED_THOUSAND_ROUTE_SCALE", "PFC", - "UDF_WR_IMMEDIATE_ACL" + "UDF_WR_IMMEDIATE_ACL", + "VLAN" ], "tomahawk5": [ "CPU_RX_TX", @@ -466,7 +476,8 @@ "HGRID_DU_ROUTE_SCALE", "HGRID_UU_ROUTE_SCALE", "HUNDRED_THOUSAND_ROUTE_SCALE", - "PFC" + "PFC", + "VLAN" ], "yuba": [ "CPU_RX_TX", @@ -496,7 +507,8 @@ "HUNDRED_THOUSAND_ROUTE_SCALE", "PRBS", "MAC_LEARNING", - "PFC" + "PFC", + "VLAN" ] } } \ No newline at end of file From f9eede0d7226fbd6e895f993803ee579995166dc Mon Sep 17 00:00:00 2001 From: Alex Hornby Date: Fri, 11 Oct 2024 03:39:48 -0700 Subject: [PATCH 069/479] sapling getdeps cli build and test support for python 3.12 Summary: Ubuntu 24.04 and Fedora 40 are both python 3.12 based. Update sapling's OSS getdeps build to allow build/run/test on python 3.12 while keeping 3.10 support. * distutils is deprecated in python 3.12 stdlib, but fortunately setuptools is pretty similar and includes a vendored distutils, so: * added a manifest so we get python3-setuptools installed. * setup.py: removed deprecated usage like `find_executable` in favor of `shutil.which()`, also removed some super old xcode 4/5.1 detection I found * util.py makedate(): datetime.utcfromtimestamp is deprecated in 3.12, so updated to use non-deprecated methods. Tested with test-command-template.t which shows tz offset. * Makefile: disabled test-eager-exchange.t on 3.12 where updating the expectation to run on 3.12 and 3.10 is tricky (debug output differs) * tests modified to run on 3.12 and 3.10: * test-import-eol.t: updated for invalid escape sequence warnings * test-install.t: updated to filter out message that appears in different order on 3.12 vs earlier versions * test-merge-driver2.t: match different debug output in 3.12, remove check for mercurial package * test-sign-commit.t: updated to add --yes for newer gpg that python 3.12 using distros have * found some tests needed bunzip2, so update manifest for sapling and bz2 to install it X-link: https://github.com/facebook/sapling/pull/964 X-link: https://github.com/facebookincubator/zstrong/pull/1005 Reviewed By: quark-zju, singhsrb Differential Revision: D63958742 Pulled By: ahornby fbshipit-source-id: 460c42eb1315f2e1631c74d356e4976469104c1b --- build/fbcode_builder/manifests/bz2 | 2 ++ build/fbcode_builder/manifests/python-setuptools | 9 +++++++++ build/fbcode_builder/manifests/sapling | 1 + 3 files changed, 12 insertions(+) diff --git a/build/fbcode_builder/manifests/bz2 b/build/fbcode_builder/manifests/bz2 index af2f357d5dbe8..cfbea9c8fd1cc 100644 --- a/build/fbcode_builder/manifests/bz2 +++ b/build/fbcode_builder/manifests/bz2 @@ -3,12 +3,14 @@ name = bz2 [debs] libbz2-dev +bzip2 [homebrew] bzip2 [rpms] bzip2-devel +bzip2 [download] url = https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz diff --git a/build/fbcode_builder/manifests/python-setuptools b/build/fbcode_builder/manifests/python-setuptools index 7ca2e1e498cb5..6e71b3b008fd5 100644 --- a/build/fbcode_builder/manifests/python-setuptools +++ b/build/fbcode_builder/manifests/python-setuptools @@ -7,3 +7,12 @@ sha256 = 02fa291a0471b3a18b2b2481ed902af520c69e8ae0919c13da936542754b4c56 [build] builder = python-wheel + +[rpms] +python3-setuptools + +[homebrew] +python-setuptools + +[debs] +python3-setuptools diff --git a/build/fbcode_builder/manifests/sapling b/build/fbcode_builder/manifests/sapling index bbbfe1e40f87f..c067360ef82ba 100644 --- a/build/fbcode_builder/manifests/sapling +++ b/build/fbcode_builder/manifests/sapling @@ -65,6 +65,7 @@ hexdump [dependencies.not(os=windows)] python +python-setuptools # We use the system openssl on linux [dependencies.not(os=linux)] From 6861e41b42a108bbc1bff6a4117845acc55384e9 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 11 Oct 2024 05:13:03 -0700 Subject: [PATCH 070/479] Add VLAN feature to production features thrift Summary: As titled Reviewed By: zechengh09 Differential Revision: D64224660 Privacy Context Container: L1125642 fbshipit-source-id: 4a5d05b8f67fa8a5324ea514eb64e896b6e9c986 --- fboss/agent/test/production_features.thrift | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/agent/test/production_features.thrift b/fboss/agent/test/production_features.thrift index 19df050545982..05885a19a636a 100644 --- a/fboss/agent/test/production_features.thrift +++ b/fboss/agent/test/production_features.thrift @@ -54,6 +54,7 @@ enum ProductionFeature { TH_ALPM_ROUTE_SCALE = 41, PFC = 42, UDF_WR_IMMEDIATE_ACL = 43, + VLAN = 44, # production feature which is present on all platforms, keep it at the end HW_SWITCH = 65536, } From e793cd9fddf63c85751e709eff1a39e169446ed3 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 11 Oct 2024 05:13:03 -0700 Subject: [PATCH 071/479] For non interface table test type, we need VLAN feature Summary: As titled Reviewed By: zechengh09 Differential Revision: D64225101 fbshipit-source-id: 757f121dbda1cf5ddf109fec9a6a42d76aeccf28 --- fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp b/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp index cbb1e54bc9f8e..f9cda569121a2 100644 --- a/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp @@ -117,6 +117,8 @@ class AgentNeighborTest : public AgentHwTest { if (isIntfNbrTable) { features.push_back( production_features::ProductionFeature::INTERFACE_NEIGHBOR_TABLE); + } else { + features.push_back(production_features::ProductionFeature::VLAN); } if (programToTrunk) { features.push_back(production_features::ProductionFeature::LAG); From a401688e1b26f82b1cad308f30f47ed8fecaf5e6 Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Fri, 11 Oct 2024 08:23:01 -0700 Subject: [PATCH 072/479] serialize reader that accepts thrift object 3/n Summary: create serializable reader that could wrap around thrift object. Differential Revision: D64066007 Privacy Context Container: L1125642 fbshipit-source-id: 25876f98838f8b3a1dfb793299ab9806457aea5e --- fboss/thrift_cow/visitors/PathVisitor.h | 64 +++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/fboss/thrift_cow/visitors/PathVisitor.h b/fboss/thrift_cow/visitors/PathVisitor.h index eecbefff32a3a..84757158de0c0 100644 --- a/fboss/thrift_cow/visitors/PathVisitor.h +++ b/fboss/thrift_cow/visitors/PathVisitor.h @@ -18,6 +18,8 @@ namespace facebook::fboss::thrift_cow { struct HybridNodeType; +struct NodeType; +struct FieldsType; namespace pv_detail { using PathIter = typename std::vector::const_iterator; @@ -29,11 +31,43 @@ using PathIter = typename std::vector::const_iterator; // instantiations class BasePathVisitorOperator { public: + template + class SerializableReader : public Serializable { + public: + explicit SerializableReader(TType& node) : node_(node) {} + + folly::IOBuf encodeBuf(fsdb::OperProtocol proto) const override { + folly::IOBufQueue queue; + switch (proto) { + case fsdb::OperProtocol::BINARY: + apache::thrift::BinarySerializer::serialize(node_, &queue); + break; + case fsdb::OperProtocol::COMPACT: + apache::thrift::CompactSerializer::serialize(node_, &queue); + break; + case fsdb::OperProtocol::SIMPLE_JSON: + apache::thrift::SimpleJSONSerializer::serialize(node_, &queue); + break; + default: + throw std::runtime_error(folly::to( + "Unknown protocol: ", static_cast(proto))); + } + return queue.moveAsValue(); + } + + void fromEncodedBuf(fsdb::OperProtocol, folly::IOBuf&&) override {} + + private: + TType& node_; + }; + virtual ~BasePathVisitorOperator() = default; template inline void - visitTyped(Node& node, pv_detail::PathIter begin, pv_detail::PathIter end) { + visitTyped(Node& node, pv_detail::PathIter begin, pv_detail::PathIter end) + requires(is_cow_type_v) + { if constexpr (std::is_const_v) { cvisit(node, begin, end); cvisit(node); @@ -43,6 +77,25 @@ class BasePathVisitorOperator { } } + template + inline void + visitTyped(Node& node, pv_detail::PathIter begin, pv_detail::PathIter end) + requires(apache::thrift::is_thrift_class_v) + { + // supporting only read-only visitation + CHECK(visitReadOnly_); + + // Node is not a Serializable, dispatch with wrapper + SerializableReader wrapper(node); + if constexpr (std::is_const_v) { + cvisit(wrapper, begin, end); + cvisit(wrapper); + } else { + visit(wrapper, begin, end); + visit(wrapper); + } + } + protected: virtual void visit( Serializable& /* node */, @@ -57,6 +110,8 @@ class BasePathVisitorOperator { pv_detail::PathIter /* end */) {} virtual void cvisit(const Serializable& node) {} + + bool visitReadOnly_ = true; }; struct GetEncodedPathVisitorOperator : public BasePathVisitorOperator { @@ -82,7 +137,9 @@ struct SetEncodedPathVisitorOperator : public BasePathVisitorOperator { SetEncodedPathVisitorOperator( fsdb::OperProtocol protocol, const folly::fbstring& val) - : protocol_(protocol), val_(val) {} + : protocol_(protocol), val_(val) { + visitReadOnly_ = false; + } protected: void visit(facebook::fboss::thrift_cow::Serializable& node) override { @@ -122,9 +179,6 @@ enum class ThriftTraverseResult { * This allows a visitor to use the remaining path tokens if needed. */ -struct NodeType; -struct FieldsType; - enum class PathVisitMode { /* * In this mode, we visit every node along a given path. From 3caedf266e69860ba6547537cea477ce601d4c57 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Fri, 11 Oct 2024 08:49:33 -0700 Subject: [PATCH 073/479] update ecmp scale numbers for Tomahawk5 Summary: as titled, see CS00012367825 for more details Reviewed By: srikrishnagopu Differential Revision: D64194208 fbshipit-source-id: 6d1d11a0a5f9a39661c3a26b711cc3f7346d52c8 --- fboss/agent/hw/switch_asics/Tomahawk5Asic.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fboss/agent/hw/switch_asics/Tomahawk5Asic.h b/fboss/agent/hw/switch_asics/Tomahawk5Asic.h index 4f61a4c099c7c..6675427c9bddc 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk5Asic.h +++ b/fboss/agent/hw/switch_asics/Tomahawk5Asic.h @@ -84,6 +84,17 @@ class Tomahawk5Asic : public BroadcomXgsAsic { // TODO: update numbers if necessary return 4096; } + std::optional getMaxEcmpGroups() const override { + return 4096; + } + std::optional getMaxEcmpMembers() const override { + // CS00012330051 + return 32000; + } + std::optional getMaxDlbEcmpGroups() const override { + // TODO: old TH4 number, update if necessary + return 128; + } uint32_t getStaticQueueLimitBytes() const override { // TODO: update numbers if necessary return getMMUSizeBytes() / 2; From 184c1f92ba9142ecf99fa40b7b9f25057fc7502c Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Fri, 11 Oct 2024 09:35:04 -0700 Subject: [PATCH 074/479] Updating submodules Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/afcbcb9ab6e1850275a80a44ce68b022d704c2a9 https://github.com/facebook/fb303/commit/589a03544b30950be773dc4767ac95d7f94110ed https://github.com/facebook/fbthrift/commit/5ae23ab52d29fec02244a7d50903cf1fb4031ace https://github.com/facebook/folly/commit/452c7438adb67321f99f2bca7395087ef59dd58f https://github.com/facebook/mvfst/commit/23a547dc0ebac4b5c8f8d51543ca98c06278b462 https://github.com/facebook/proxygen/commit/f2be75f983d805d553ae2b09469723446bf12c10 https://github.com/facebook/wangle/commit/95d995a1dc06d5244676f4981393accb205753b3 https://github.com/facebookexperimental/edencommon/commit/e34c881c1821dcd4aa25361c4020109013e01a9c https://github.com/facebookexperimental/rust-shed/commit/557328688eee8de4d2dc9cfeeae28409c3bdab0f https://github.com/facebookincubator/fizz/commit/4af8e7f3a16c3111bf020cd8b547cccd78d37420 Reviewed By: ckwalsh fbshipit-source-id: 78149a32e91b03a1593065248508a5f38151a7ef --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index c8a16d59801a1..f4ccac3cc35b9 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit b1748a9eb2e559e3ea96f08c2edbc40ae3a580ba +Subproject commit 589a03544b30950be773dc4767ac95d7f94110ed diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index b038a158b4293..834e27b2b0157 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit d4ac595596038eba65a939434c2bc56c5a7e092c +Subproject commit 5ae23ab52d29fec02244a7d50903cf1fb4031ace diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index a78f32e05925d..dbb0dfb34dcf5 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 475d3e45a2f64d02df57054bfa81e894fb93e095 +Subproject commit 452c7438adb67321f99f2bca7395087ef59dd58f diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 3ca1b3f83d70b..96c2a3e0d9e5e 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 359b3990bafa4c8274a14866fe91aed98df56ab6 +Subproject commit 95d995a1dc06d5244676f4981393accb205753b3 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index cce2558548bcc..a519e70d93742 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit e031936fd1c92c8516ec9f7817158c49134b3ded +Subproject commit 4af8e7f3a16c3111bf020cd8b547cccd78d37420 From ba3106e718bc2f23017a312b2cfa76af65ee244b Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Fri, 11 Oct 2024 11:09:46 -0700 Subject: [PATCH 075/479] RecurseVisitor: visit hybrid nodes Summary: In RecurseVisitor add handling to visit hybrid nodes. Reviewed By: wilsonwinhi Differential Revision: D64209770 fbshipit-source-id: b2212d1d1453600f856dc864a37d378a87f9d702 --- fboss/thrift_cow/visitors/RecurseVisitor.h | 97 +++++++++++++++++++ .../visitors/tests/RecurseVisitorTests.cpp | 16 +++ 2 files changed, 113 insertions(+) diff --git a/fboss/thrift_cow/visitors/RecurseVisitor.h b/fboss/thrift_cow/visitors/RecurseVisitor.h index 43d6190e205f1..c88bb565b3488 100644 --- a/fboss/thrift_cow/visitors/RecurseVisitor.h +++ b/fboss/thrift_cow/visitors/RecurseVisitor.h @@ -15,6 +15,8 @@ namespace facebook::fboss::thrift_cow { +struct HybridNodeType; + enum class RecurseVisitMode { /* * In this mode, we visit every path in the tree, including @@ -147,6 +149,25 @@ struct RecurseVisitor> { traverser, node, options, std::forward(f)); } + template + static void visit( + TraverseHelper& traverser, + NodePtr& node, + RecurseVisitOptions options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v< + typename folly::remove_cvref_t::element_type::CowType, + HybridNodeType>) + { + if (!options.recurseIntoHybridNodes) { + rv_detail::invokeVisitorFnHelper(traverser, node, std::forward(f)); + } else { + throw std::runtime_error(folly::to( + "RecurseVisitor support for recurseIntoHybridNode in Set not implemented")); + } + } + template static void visit( TraverseHelper& traverser, @@ -187,6 +208,25 @@ struct RecurseVisitor> { traverser, node, options, std::forward(f)); } + template + static void visit( + TraverseHelper& traverser, + NodePtr& node, + RecurseVisitOptions options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v< + typename folly::remove_cvref_t::element_type::CowType, + HybridNodeType>) + { + if (!options.recurseIntoHybridNodes) { + rv_detail::invokeVisitorFnHelper(traverser, node, std::forward(f)); + } else { + throw std::runtime_error(folly::to( + "RecurseVisitor support for recurseIntoHybridNode in List not implemented")); + } + } + template static void visit( TraverseHelper& traverser, @@ -227,6 +267,25 @@ struct RecurseVisitor< traverser, node, options, std::forward(f)); } + template + static void visit( + TraverseHelper& traverser, + NodePtr& node, + RecurseVisitOptions options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v< + typename folly::remove_cvref_t::element_type::CowType, + HybridNodeType>) + { + if (!options.recurseIntoHybridNodes) { + rv_detail::invokeVisitorFnHelper(traverser, node, std::forward(f)); + } else { + throw std::runtime_error(folly::to( + "RecurseVisitor support for recurseIntoHybridNode in Map not implemented")); + } + } + template static void visit( TraverseHelper& traverser, @@ -275,6 +334,25 @@ struct RecurseVisitor { traverser, node, options, std::forward(f)); } + template + static void visit( + TraverseHelper& traverser, + NodePtr& node, + RecurseVisitOptions options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v< + typename folly::remove_cvref_t::element_type::CowType, + HybridNodeType>) + { + if (!options.recurseIntoHybridNodes) { + rv_detail::invokeVisitorFnHelper(traverser, node, std::forward(f)); + } else { + throw std::runtime_error(folly::to( + "RecurseVisitor support for recurseIntoHybridNode in Variant not implemented")); + } + } + template static void visit( TraverseHelper& traverser, @@ -348,6 +426,25 @@ struct RecurseVisitor { traverser, node, options, std::forward(f)); } + template + static void visit( + TraverseHelper& traverser, + NodePtr& node, + RecurseVisitOptions options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v< + typename folly::remove_cvref_t::element_type::CowType, + HybridNodeType>) + { + if (!options.recurseIntoHybridNodes) { + rv_detail::invokeVisitorFnHelper(traverser, node, std::forward(f)); + } else { + throw std::runtime_error(folly::to( + "RecurseVisitor support for recurseIntoHybridNode in Struct not implemented")); + } + } + template static void visit( TraverseHelper& traverser, diff --git a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp index 0c5dc24fc370a..248a8ea9e9913 100644 --- a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp @@ -73,7 +73,9 @@ TEST(RecurseVisitorTests, TestFullRecurse) { {{"hybridSet"}, dynamic::array()}, {{"hybridUnion"}, dynamic::object()}, {{"hybridStruct"}, testDyn["hybridStruct"]}, +#ifndef __ENABLE_HYBRID_THRIFT_COW_TESTS__ {{"hybridStruct", "childMap"}, testDyn["hybridStruct"]["childMap"]}, +#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ {{"inlineBool"}, testDyn["inlineBool"]}, {{"inlineInt"}, testDyn["inlineInt"]}, {{"inlineString"}, testDyn["inlineString"]}, @@ -130,6 +132,13 @@ TEST(RecurseVisitorTests, TestLeafRecurse) { RootRecurseVisitor::visit(nodeA, RecurseVisitMode::LEAVES, processPath); std::map, folly::dynamic> expected = { +#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ + {{"hybridMap"}, testDyn["hybridMap"]}, + {{"hybridList"}, testDyn["hybridList"]}, + {{"hybridSet"}, testDyn["hybridSet"]}, + {{"hybridUnion"}, testDyn["hybridUnion"]}, + {{"hybridStruct"}, testDyn["hybridStruct"]}, +#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ {{"inlineBool"}, testDyn["inlineBool"]}, {{"inlineInt"}, testDyn["inlineInt"]}, {{"inlineString"}, testDyn["inlineString"]}, @@ -160,6 +169,13 @@ TEST(RecurseVisitorTests, TestLeafRecurse) { processPath); expected = { +#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ + {{"27"}, testDyn["hybridMap"]}, + {{"28"}, testDyn["hybridList"]}, + {{"29"}, testDyn["hybridSet"]}, + {{"30"}, testDyn["hybridUnion"]}, + {{"31"}, testDyn["hybridStruct"]}, +#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ {{"1"}, testDyn["inlineBool"]}, {{"2"}, testDyn["inlineInt"]}, {{"3"}, testDyn["inlineString"]}, From ca6be739db020935f8c5ddf606719f79bf84674d Mon Sep 17 00:00:00 2001 From: Jimmy Ye Date: Fri, 11 Oct 2024 11:16:49 -0700 Subject: [PATCH 076/479] Clean sensor_service slot path regex Reviewed By: kimdo8736 Differential Revision: D64206841 fbshipit-source-id: be9f6059298154888aeb0807df7d1cdee9f9d8ab --- fboss/platform/sensor_service/ConfigValidator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fboss/platform/sensor_service/ConfigValidator.cpp b/fboss/platform/sensor_service/ConfigValidator.cpp index aa5d5cd561ebe..90cd312d35ae8 100644 --- a/fboss/platform/sensor_service/ConfigValidator.cpp +++ b/fboss/platform/sensor_service/ConfigValidator.cpp @@ -11,8 +11,7 @@ using namespace sensor_config; namespace { // For more info, see below // https://github.com/facebook/fboss/blob/main/fboss/platform/platform_manager/platform_manager_config.thrift#L73 -const re2::RE2 kSlotPathRe = - "/(([A-Z]+(_[A-Z]+)*_SLOT@\\d+/)*[A-Z]+(_[A-Z]+)*_SLOT@\\d+$)*"; +const re2::RE2 kSlotPathRe = "/|(/([A-Z]+_)+SLOT@\\d+)+"; } // namespace bool ConfigValidator::isValid(const SensorConfig& sensorConfig) { From 0c60d67b137ecff4e0f05c1e6f4de08c9494e79d Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Fri, 11 Oct 2024 12:38:48 -0700 Subject: [PATCH 077/479] Add xxhash as a dependency Summary: X-link: https://github.com/facebookincubator/zstrong/pull/1008 This doesn't seem to be a new dependency, but build errors only recently started surfacing for OSS: https://www.internalfb.com/sandcastle/workflow/3098476543635661395 Reviewed By: robertroeser Differential Revision: D64120664 fbshipit-source-id: 64d6fa130fa41bcbb9a40003b3b02eed38123641 --- build/fbcode_builder/CMake/FindXxhash.cmake | 40 +++++++++++++++++++++ build/fbcode_builder/manifests/fbthrift | 1 + build/fbcode_builder/manifests/xxhash | 15 ++++++++ 3 files changed, 56 insertions(+) create mode 100644 build/fbcode_builder/CMake/FindXxhash.cmake diff --git a/build/fbcode_builder/CMake/FindXxhash.cmake b/build/fbcode_builder/CMake/FindXxhash.cmake new file mode 100644 index 0000000000000..04760cbf78018 --- /dev/null +++ b/build/fbcode_builder/CMake/FindXxhash.cmake @@ -0,0 +1,40 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# - Try to find Facebook xxhash library +# This will define +# Xxhash_FOUND +# Xxhash_INCLUDE_DIR +# Xxhash_LIBRARY +# + +find_path(Xxhash_INCLUDE_DIR NAMES xxhash.h) + +find_library(Xxhash_LIBRARY_RELEASE NAMES xxhash) + +include(SelectLibraryConfigurations) +SELECT_LIBRARY_CONFIGURATIONS(Xxhash) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + Xxhash DEFAULT_MSG + Xxhash_LIBRARY Xxhash_INCLUDE_DIR +) + +if (Xxhash_FOUND) + message(STATUS "Found xxhash: ${Xxhash_LIBRARY}") +endif() + +mark_as_advanced(Xxhash_INCLUDE_DIR Xxhash_LIBRARY) diff --git a/build/fbcode_builder/manifests/fbthrift b/build/fbcode_builder/manifests/fbthrift index 81fea9d64ec17..964b97cc028e7 100644 --- a/build/fbcode_builder/manifests/fbthrift +++ b/build/fbcode_builder/manifests/fbthrift @@ -26,6 +26,7 @@ libsodium wangle zstd mvfst +xxhash # Thrift also depends on openssl but since the latter requires a platform- # specific configuration we rely on the folly manifest to provide this # dependency to avoid duplication. diff --git a/build/fbcode_builder/manifests/xxhash b/build/fbcode_builder/manifests/xxhash index 0af55726c12c1..8e490011e5800 100644 --- a/build/fbcode_builder/manifests/xxhash +++ b/build/fbcode_builder/manifests/xxhash @@ -1,5 +1,20 @@ [manifest] name = xxhash +[download] +url = https://github.com/Cyan4973/xxHash/archive/refs/tags/v0.8.2.tar.gz +sha256 = baee0c6afd4f03165de7a4e67988d16f0f2b257b51d0e3cb91909302a26a79c4 + [rpms] xxhash-devel + +[build.not(os=windows)] +builder = make +subdir = xxHash-0.8.2 + +[make.build_args] +all + +[make.install_args] +install + From 58b76ad3bc5fa048858ebd40e11823660e8cfb87 Mon Sep 17 00:00:00 2001 From: Cullen Walsh Date: Fri, 11 Oct 2024 12:43:19 -0700 Subject: [PATCH 078/479] Add copyright headers Summary: Automated checkup identified that certain files were missing copyright headers. Grepped for all files that did not contain "Meta Platforms" and added headers, confirmed they have a separate license header, or were generated code. Reviewed By: bigfootjon Differential Revision: D64014138 fbshipit-source-id: 2b04790b6be772dafce614b1f90c632fd8271ad7 --- shim/.buckconfig | 7 +++++++ shim/.buckroot | 6 ++++++ shim/.gitignore | 7 +++++++ shim/BUCK | 7 +++++++ shim/README.md | 7 +++++++ shim/third-party/macros/rust_third_party.bzl | 7 +++++++ shim/third-party/ocaml/BUCK | 7 +++++++ shim/third-party/ocaml/opam/lib/ocaml | 7 +++++++ shim/third-party/proto/BUCK | 7 +++++++ shim/third-party/proto/defs.bzl | 7 +++++++ shim/third-party/proto/releases.bzl | 7 +++++++ shim/third-party/proto/update.py | 16 ++++++++++++++++ shim/third-party/rust/.gitignore | 7 +++++++ shim/third-party/rust/Cargo.toml | 7 +++++++ shim/third-party/rust/defs.bzl | 7 +++++++ shim/third-party/rust/fixups/ahash/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/anyhow/fixups.toml | 7 +++++++ .../rust/fixups/async-trait/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/atomic/fixups.toml | 7 +++++++ .../rust/fixups/axum-core/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/axum/fixups.toml | 7 +++++++ .../rust/fixups/backtrace/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/blake3/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/bumpalo/fixups.toml | 7 +++++++ .../rust/fixups/bzip2-sys/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/clap/fixups.toml | 7 +++++++ .../rust/fixups/clap_builder/fixups.toml | 7 +++++++ .../rust/fixups/clap_derive/fixups.toml | 7 +++++++ .../rust/fixups/core-foundation-sys/fixups.toml | 7 +++++++ .../rust/fixups/crc32fast/fixups.toml | 7 +++++++ .../rust/fixups/criterion/fixups.toml | 7 +++++++ .../rust/fixups/crossbeam-epoch/fixups.toml | 7 +++++++ .../rust/fixups/crossbeam-queue/fixups.toml | 7 +++++++ .../rust/fixups/crossbeam-utils/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/crunchy/fixups.toml | 7 +++++++ .../rust/fixups/darwin-libproc-sys/fixups.toml | 7 +++++++ .../rust/fixups/debugserver-types/fixups.toml | 7 +++++++ .../rust/fixups/derive_more-impl/fixups.toml | 7 +++++++ .../rust/fixups/derive_more/fixups.toml | 7 +++++++ .../rust/fixups/erased-serde/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/fs-err/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/fs4/fixups.toml | 7 +++++++ .../rust/fixups/futures-channel/fixups.toml | 7 +++++++ .../rust/fixups/futures-core/fixups.toml | 7 +++++++ .../rust/fixups/futures-task/fixups.toml | 7 +++++++ .../rust/fixups/futures-util/fixups.toml | 7 +++++++ .../rust/fixups/generic-array/fixups.toml | 7 +++++++ .../rust/fixups/getrandom/fixups.toml | 7 +++++++ .../third-party/rust/fixups/httparse/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/hyper/fixups.toml | 7 +++++++ .../third-party/rust/fixups/indexmap/fixups.toml | 7 +++++++ .../rust/fixups/io-lifetimes/fixups.toml | 7 +++++++ .../rust/fixups/jemalloc-sys/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/lalrpop/fixups.toml | 7 +++++++ .../rust/fixups/lexical-core/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/libc/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/libm/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/libsqlite3-sys/BUCK | 7 +++++++ .../rust/fixups/libsqlite3-sys/fixups.toml | 7 +++++++ .../third-party/rust/fixups/lock_api/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/log/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/memchr/fixups.toml | 7 +++++++ .../rust/fixups/memoffset/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/mio/fixups.toml | 7 +++++++ .../rust/fixups/native-tls/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/nix/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/nom/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/ntapi/fixups.toml | 7 +++++++ .../rust/fixups/num-bigint/fixups.toml | 7 +++++++ .../rust/fixups/num-integer/fixups.toml | 7 +++++++ .../rust/fixups/num-traits/fixups.toml | 7 +++++++ .../rust/fixups/oid-registry/fixups.toml | 7 +++++++ .../rust/fixups/parking_lot/fixups.toml | 7 +++++++ .../rust/fixups/parking_lot_core/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/paste/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/pest/fixups.toml | 7 +++++++ .../rust/fixups/pin-project-internal/fixups.toml | 7 +++++++ .../rust/fixups/platforms/fixups.toml | 7 +++++++ .../rust/fixups/prettyplease/fixups.toml | 7 +++++++ .../fixups/proc-macro-error-attr/fixups.toml | 7 +++++++ .../rust/fixups/proc-macro-error/fixups.toml | 7 +++++++ .../rust/fixups/proc-macro-hack/fixups.toml | 7 +++++++ .../rust/fixups/proc-macro2/fixups.toml | 7 +++++++ .../rust/fixups/prost-build/fixups.toml | 7 +++++++ .../rust/fixups/pulldown-cmark/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/quote/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/radium/fixups.toml | 7 +++++++ .../rust/fixups/rayon-core/fixups.toml | 7 +++++++ .../third-party/rust/fixups/ref-cast/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/reqwest/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/ring/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/rustix/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/rustls/fixups.toml | 7 +++++++ .../rust/fixups/rustversion/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/serde/fixups.toml | 7 +++++++ .../rust/fixups/serde_derive/fixups.toml | 7 +++++++ .../rust/fixups/serde_json/fixups.toml | 7 +++++++ .../rust/fixups/signal-hook/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/slab/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/slog/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/syn/fixups.toml | 7 +++++++ .../third-party/rust/fixups/sys-info/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/sysinfo/fixups.toml | 7 +++++++ .../third-party/rust/fixups/tempfile/fixups.toml | 7 +++++++ .../third-party/rust/fixups/terminfo/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/termwiz/fixups.toml | 7 +++++++ .../rust/fixups/test-case/fixups.toml | 7 +++++++ .../rust/fixups/thiserror/fixups.toml | 7 +++++++ .../rust/fixups/tiny-keccak/fixups.toml | 7 +++++++ .../rust/fixups/tokio-stream/fixups.toml | 7 +++++++ .../rust/fixups/tokio-util/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/tokio/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/tonic/fixups.toml | 7 +++++++ .../rust/fixups/tracing-subscriber/fixups.toml | 7 +++++++ .../third-party/rust/fixups/trybuild/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/typenum/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/unicase/fixups.toml | 7 +++++++ .../winapi-x86_64-pc-windows-gnu/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/winapi/fixups.toml | 7 +++++++ .../rust/fixups/windows-targets/fixups.toml | 7 +++++++ .../fixups/windows_aarch64_gnullvm/fixups.toml | 7 +++++++ .../rust/fixups/windows_x86_64_gnu/fixups.toml | 7 +++++++ .../fixups/windows_x86_64_gnullvm/fixups.toml | 7 +++++++ .../rust/fixups/windows_x86_64_msvc/fixups.toml | 7 +++++++ shim/third-party/rust/fixups/winreg/fixups.toml | 7 +++++++ .../third-party/rust/fixups/zerocopy/fixups.toml | 7 +++++++ .../rust/fixups/zstd-safe/fixups.toml | 7 +++++++ .../third-party/rust/fixups/zstd-sys/fixups.toml | 7 +++++++ shim/third-party/rust/reindeer.toml | 7 +++++++ 129 files changed, 911 insertions(+) diff --git a/shim/.buckconfig b/shim/.buckconfig index 971b77525c8b7..de18401ccbbbd 100644 --- a/shim/.buckconfig +++ b/shim/.buckconfig @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [cells] shim = . prelude = prelude diff --git a/shim/.buckroot b/shim/.buckroot index e69de29bb2d1d..a869e838b4c7c 100644 --- a/shim/.buckroot +++ b/shim/.buckroot @@ -0,0 +1,6 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. diff --git a/shim/.gitignore b/shim/.gitignore index a1412f7fa8e00..ca95b0e4631fb 100644 --- a/shim/.gitignore +++ b/shim/.gitignore @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # We currently expect end users to run reindeer vendor themselves # so mark these things as to ignore /third-party/rust/.cargo/ diff --git a/shim/BUCK b/shim/BUCK index e25618a0730b1..30019fa0007ee 100644 --- a/shim/BUCK +++ b/shim/BUCK @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + load("@prelude//toolchains:cxx.bzl", "system_cxx_toolchain") load("@prelude//toolchains:genrule.bzl", "system_genrule_toolchain") load("@prelude//toolchains:go.bzl", "system_go_toolchain") diff --git a/shim/README.md b/shim/README.md index 564697b4d6726..72345d6ba0568 100644 --- a/shim/README.md +++ b/shim/README.md @@ -9,3 +9,10 @@ should be nearly identical to the internal buck2 experience. Prefer to use [rules from the buck2 prelude](https://buck2.build/docs/prelude/globals/) and the [buck2 build apis](https://buck2.build/docs/api/build/globals/) + +## License + +This source code is licensed under both the MIT license found in the +LICENSE-MIT file in the root directory of this source tree and the Apache +License, Version 2.0 found in the LICENSE-APACHE file in the root directory +of this source tree. diff --git a/shim/third-party/macros/rust_third_party.bzl b/shim/third-party/macros/rust_third_party.bzl index f6a0bd3d227ca..d00ddce82274c 100644 --- a/shim/third-party/macros/rust_third_party.bzl +++ b/shim/third-party/macros/rust_third_party.bzl @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # @nolint def third_party_rust_prebuilt_cxx_library(name, **kwargs): diff --git a/shim/third-party/ocaml/BUCK b/shim/third-party/ocaml/BUCK index 2343d7b5ee9fa..1b62b09b57723 100644 --- a/shim/third-party/ocaml/BUCK +++ b/shim/third-party/ocaml/BUCK @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." prebuilt_cxx_library( name = "ocaml-dev", diff --git a/shim/third-party/ocaml/opam/lib/ocaml b/shim/third-party/ocaml/opam/lib/ocaml index 8bd17a7ca8148..971daaba53aad 100644 --- a/shim/third-party/ocaml/opam/lib/ocaml +++ b/shim/third-party/ocaml/opam/lib/ocaml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # Fake file so that buck2 can run in non-ocamlrep repos diff --git a/shim/third-party/proto/BUCK b/shim/third-party/proto/BUCK index d8381b74dc03c..aefe5570a8e11 100644 --- a/shim/third-party/proto/BUCK +++ b/shim/third-party/proto/BUCK @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." load(":defs.bzl", "protoc_distribution") diff --git a/shim/third-party/proto/defs.bzl b/shim/third-party/proto/defs.bzl index 18938c5a7fd73..9f8d50608b8f5 100644 --- a/shim/third-party/proto/defs.bzl +++ b/shim/third-party/proto/defs.bzl @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + load("@prelude//http_archive/exec_deps.bzl", "HttpArchiveExecDeps") load(":releases.bzl", "releases") diff --git a/shim/third-party/proto/releases.bzl b/shim/third-party/proto/releases.bzl index 153ca496e4c99..2feb48e70e6b2 100644 --- a/shim/third-party/proto/releases.bzl +++ b/shim/third-party/proto/releases.bzl @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # @generated # Update with ./update.py > releases.bzl releases = { diff --git a/shim/third-party/proto/update.py b/shim/third-party/proto/update.py index cfee489f671ea..c3ac3a631a102 100755 --- a/shim/third-party/proto/update.py +++ b/shim/third-party/proto/update.py @@ -1,4 +1,11 @@ #!/usr/bin/env python3 +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + """Query recent Github release artifacts for protobuf. Use this script to update the releases.bzl file that contains metadata about @@ -36,6 +43,14 @@ } } """ +COPYRIGHT_HEADER = """\ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. +""" async def query_releases(): async with aiohttp.ClientSession(raise_for_status=True) as session: @@ -91,6 +106,7 @@ async def main(): releases = await query_releases() formatted = format_releases(releases) with_sha256 = await hash_releases(formatted) + print(COPYRIGHT_HEADER) print("# @" + "generated") print("# Update with ./update.py > releases.bzl") print("releases = ", json.dumps(with_sha256, indent=4)) diff --git a/shim/third-party/rust/.gitignore b/shim/third-party/rust/.gitignore index c18f3dc437a24..95e346d623f6d 100644 --- a/shim/third-party/rust/.gitignore +++ b/shim/third-party/rust/.gitignore @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # Ignore Cargo-related stuff .cargo/registry .cargo/git diff --git a/shim/third-party/rust/Cargo.toml b/shim/third-party/rust/Cargo.toml index 903e5fcb1c36a..84ec27d4c2bed 100644 --- a/shim/third-party/rust/Cargo.toml +++ b/shim/third-party/rust/Cargo.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # Definitions of third-party libraries used for buck2 build of buck2. # This file is **not** used by cargo build of buck2. # See the /docs/bootstrapping.md for more details. diff --git a/shim/third-party/rust/defs.bzl b/shim/third-party/rust/defs.bzl index 6d295fdd565ce..ae25b318287ca 100644 --- a/shim/third-party/rust/defs.bzl +++ b/shim/third-party/rust/defs.bzl @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + def rust_library_from_crates(name): # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." native.export_file(name = name, src = "BUCK", visibility = ["PUBLIC"]) diff --git a/shim/third-party/rust/fixups/ahash/fixups.toml b/shim/third-party/rust/fixups/ahash/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/ahash/fixups.toml +++ b/shim/third-party/rust/fixups/ahash/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/anyhow/fixups.toml b/shim/third-party/rust/fixups/anyhow/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/anyhow/fixups.toml +++ b/shim/third-party/rust/fixups/anyhow/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/async-trait/fixups.toml b/shim/third-party/rust/fixups/async-trait/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/async-trait/fixups.toml +++ b/shim/third-party/rust/fixups/async-trait/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/atomic/fixups.toml b/shim/third-party/rust/fixups/atomic/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/atomic/fixups.toml +++ b/shim/third-party/rust/fixups/atomic/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/axum-core/fixups.toml b/shim/third-party/rust/fixups/axum-core/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/axum-core/fixups.toml +++ b/shim/third-party/rust/fixups/axum-core/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/axum/fixups.toml b/shim/third-party/rust/fixups/axum/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/axum/fixups.toml +++ b/shim/third-party/rust/fixups/axum/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/backtrace/fixups.toml b/shim/third-party/rust/fixups/backtrace/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/backtrace/fixups.toml +++ b/shim/third-party/rust/fixups/backtrace/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/blake3/fixups.toml b/shim/third-party/rust/fixups/blake3/fixups.toml index 389fd57acfc70..19d0d8adf8302 100644 --- a/shim/third-party/rust/fixups/blake3/fixups.toml +++ b/shim/third-party/rust/fixups/blake3/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] ## The various X86 platform fixups diff --git a/shim/third-party/rust/fixups/bumpalo/fixups.toml b/shim/third-party/rust/fixups/bumpalo/fixups.toml index edd9a2079bd4c..928a0682c4668 100644 --- a/shim/third-party/rust/fixups/bumpalo/fixups.toml +++ b/shim/third-party/rust/fixups/bumpalo/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + extra_srcs = ["README.md"] diff --git a/shim/third-party/rust/fixups/bzip2-sys/fixups.toml b/shim/third-party/rust/fixups/bzip2-sys/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/bzip2-sys/fixups.toml +++ b/shim/third-party/rust/fixups/bzip2-sys/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/clap/fixups.toml b/shim/third-party/rust/fixups/clap/fixups.toml index ee94fdc2f29cc..41256d384f583 100644 --- a/shim/third-party/rust/fixups/clap/fixups.toml +++ b/shim/third-party/rust/fixups/clap/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + omit_features = ["deprecated"] diff --git a/shim/third-party/rust/fixups/clap_builder/fixups.toml b/shim/third-party/rust/fixups/clap_builder/fixups.toml index edd9a2079bd4c..928a0682c4668 100644 --- a/shim/third-party/rust/fixups/clap_builder/fixups.toml +++ b/shim/third-party/rust/fixups/clap_builder/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + extra_srcs = ["README.md"] diff --git a/shim/third-party/rust/fixups/clap_derive/fixups.toml b/shim/third-party/rust/fixups/clap_derive/fixups.toml index ee94fdc2f29cc..41256d384f583 100644 --- a/shim/third-party/rust/fixups/clap_derive/fixups.toml +++ b/shim/third-party/rust/fixups/clap_derive/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + omit_features = ["deprecated"] diff --git a/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml b/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml +++ b/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/crc32fast/fixups.toml b/shim/third-party/rust/fixups/crc32fast/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/crc32fast/fixups.toml +++ b/shim/third-party/rust/fixups/crc32fast/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/criterion/fixups.toml b/shim/third-party/rust/fixups/criterion/fixups.toml index 41439d3356a5e..1da45ba23144e 100644 --- a/shim/third-party/rust/fixups/criterion/fixups.toml +++ b/shim/third-party/rust/fixups/criterion/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + cargo_env = true diff --git a/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml b/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml index 3510928422a31..118f26932835f 100644 --- a/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml +++ b/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] cargo_env = true diff --git a/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml b/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml index 3510928422a31..118f26932835f 100644 --- a/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml +++ b/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] cargo_env = true diff --git a/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml b/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml index 3510928422a31..118f26932835f 100644 --- a/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml +++ b/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] cargo_env = true diff --git a/shim/third-party/rust/fixups/crunchy/fixups.toml b/shim/third-party/rust/fixups/crunchy/fixups.toml index ac9ebfb4af71d..309316ac45495 100644 --- a/shim/third-party/rust/fixups/crunchy/fixups.toml +++ b/shim/third-party/rust/fixups/crunchy/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml b/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml +++ b/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/debugserver-types/fixups.toml b/shim/third-party/rust/fixups/debugserver-types/fixups.toml index 50645274fe787..c740f1218e2b4 100644 --- a/shim/third-party/rust/fixups/debugserver-types/fixups.toml +++ b/shim/third-party/rust/fixups/debugserver-types/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + extra_srcs = ["src/schema.json"] cargo_env = true diff --git a/shim/third-party/rust/fixups/derive_more-impl/fixups.toml b/shim/third-party/rust/fixups/derive_more-impl/fixups.toml index 2b26bb6745cce..190a6c25c4434 100644 --- a/shim/third-party/rust/fixups/derive_more-impl/fixups.toml +++ b/shim/third-party/rust/fixups/derive_more-impl/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + extra_srcs = ["README.md", "doc/*.md"] diff --git a/shim/third-party/rust/fixups/derive_more/fixups.toml b/shim/third-party/rust/fixups/derive_more/fixups.toml index edd9a2079bd4c..928a0682c4668 100644 --- a/shim/third-party/rust/fixups/derive_more/fixups.toml +++ b/shim/third-party/rust/fixups/derive_more/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + extra_srcs = ["README.md"] diff --git a/shim/third-party/rust/fixups/erased-serde/fixups.toml b/shim/third-party/rust/fixups/erased-serde/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/erased-serde/fixups.toml +++ b/shim/third-party/rust/fixups/erased-serde/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/fs-err/fixups.toml b/shim/third-party/rust/fixups/fs-err/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/fs-err/fixups.toml +++ b/shim/third-party/rust/fixups/fs-err/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/fs4/fixups.toml b/shim/third-party/rust/fixups/fs4/fixups.toml index af7edb27e3bb7..9b40a18f4cab3 100644 --- a/shim/third-party/rust/fixups/fs4/fixups.toml +++ b/shim/third-party/rust/fixups/fs4/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/futures-channel/fixups.toml b/shim/third-party/rust/fixups/futures-channel/fixups.toml index 3510928422a31..118f26932835f 100644 --- a/shim/third-party/rust/fixups/futures-channel/fixups.toml +++ b/shim/third-party/rust/fixups/futures-channel/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] cargo_env = true diff --git a/shim/third-party/rust/fixups/futures-core/fixups.toml b/shim/third-party/rust/fixups/futures-core/fixups.toml index 3510928422a31..118f26932835f 100644 --- a/shim/third-party/rust/fixups/futures-core/fixups.toml +++ b/shim/third-party/rust/fixups/futures-core/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] cargo_env = true diff --git a/shim/third-party/rust/fixups/futures-task/fixups.toml b/shim/third-party/rust/fixups/futures-task/fixups.toml index 3510928422a31..118f26932835f 100644 --- a/shim/third-party/rust/fixups/futures-task/fixups.toml +++ b/shim/third-party/rust/fixups/futures-task/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] cargo_env = true diff --git a/shim/third-party/rust/fixups/futures-util/fixups.toml b/shim/third-party/rust/fixups/futures-util/fixups.toml index 3510928422a31..118f26932835f 100644 --- a/shim/third-party/rust/fixups/futures-util/fixups.toml +++ b/shim/third-party/rust/fixups/futures-util/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] cargo_env = true diff --git a/shim/third-party/rust/fixups/generic-array/fixups.toml b/shim/third-party/rust/fixups/generic-array/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/generic-array/fixups.toml +++ b/shim/third-party/rust/fixups/generic-array/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/getrandom/fixups.toml b/shim/third-party/rust/fixups/getrandom/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/getrandom/fixups.toml +++ b/shim/third-party/rust/fixups/getrandom/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/httparse/fixups.toml b/shim/third-party/rust/fixups/httparse/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/httparse/fixups.toml +++ b/shim/third-party/rust/fixups/httparse/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/hyper/fixups.toml b/shim/third-party/rust/fixups/hyper/fixups.toml index 9118e9de767c8..4dc9cd11669f1 100644 --- a/shim/third-party/rust/fixups/hyper/fixups.toml +++ b/shim/third-party/rust/fixups/hyper/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # reindeer cannot see through `cfg_proto!` macros and the like extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/indexmap/fixups.toml b/shim/third-party/rust/fixups/indexmap/fixups.toml index 4aa45eda12c3c..4088726881865 100644 --- a/shim/third-party/rust/fixups/indexmap/fixups.toml +++ b/shim/third-party/rust/fixups/indexmap/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] cfgs = ["has_std"] diff --git a/shim/third-party/rust/fixups/io-lifetimes/fixups.toml b/shim/third-party/rust/fixups/io-lifetimes/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/io-lifetimes/fixups.toml +++ b/shim/third-party/rust/fixups/io-lifetimes/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml b/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml +++ b/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/lalrpop/fixups.toml b/shim/third-party/rust/fixups/lalrpop/fixups.toml index 41439d3356a5e..1da45ba23144e 100644 --- a/shim/third-party/rust/fixups/lalrpop/fixups.toml +++ b/shim/third-party/rust/fixups/lalrpop/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + cargo_env = true diff --git a/shim/third-party/rust/fixups/lexical-core/fixups.toml b/shim/third-party/rust/fixups/lexical-core/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/lexical-core/fixups.toml +++ b/shim/third-party/rust/fixups/lexical-core/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/libc/fixups.toml b/shim/third-party/rust/fixups/libc/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/libc/fixups.toml +++ b/shim/third-party/rust/fixups/libc/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/libm/fixups.toml b/shim/third-party/rust/fixups/libm/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/libm/fixups.toml +++ b/shim/third-party/rust/fixups/libm/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/libsqlite3-sys/BUCK b/shim/third-party/rust/fixups/libsqlite3-sys/BUCK index de78a99d5a5a5..938b0a56d0939 100644 --- a/shim/third-party/rust/fixups/libsqlite3-sys/BUCK +++ b/shim/third-party/rust/fixups/libsqlite3-sys/BUCK @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + filegroup( name = "out_dir", srcs = ["bindgen.rs"], diff --git a/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml b/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml index 240a5c89c3f6d..139464b1cab3c 100644 --- a/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml +++ b/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # libsqlite3-sys uses a bindgen binding to libsqlite. # We can't easily import bindgen because of its libclang dependency, # so in the meantime we need to use pre-generated bindgen files. diff --git a/shim/third-party/rust/fixups/lock_api/fixups.toml b/shim/third-party/rust/fixups/lock_api/fixups.toml index 6c1a3d45a5a33..4d082640b5813 100644 --- a/shim/third-party/rust/fixups/lock_api/fixups.toml +++ b/shim/third-party/rust/fixups/lock_api/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # the build script for lock_api is a version check for rust 1.61. [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/log/fixups.toml b/shim/third-party/rust/fixups/log/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/log/fixups.toml +++ b/shim/third-party/rust/fixups/log/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/memchr/fixups.toml b/shim/third-party/rust/fixups/memchr/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/memchr/fixups.toml +++ b/shim/third-party/rust/fixups/memchr/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/memoffset/fixups.toml b/shim/third-party/rust/fixups/memoffset/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/memoffset/fixups.toml +++ b/shim/third-party/rust/fixups/memoffset/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/mio/fixups.toml b/shim/third-party/rust/fixups/mio/fixups.toml index af7edb27e3bb7..9b40a18f4cab3 100644 --- a/shim/third-party/rust/fixups/mio/fixups.toml +++ b/shim/third-party/rust/fixups/mio/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/native-tls/fixups.toml b/shim/third-party/rust/fixups/native-tls/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/native-tls/fixups.toml +++ b/shim/third-party/rust/fixups/native-tls/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/nix/fixups.toml b/shim/third-party/rust/fixups/nix/fixups.toml index 1849ea069d254..c269a19b413eb 100644 --- a/shim/third-party/rust/fixups/nix/fixups.toml +++ b/shim/third-party/rust/fixups/nix/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/nom/fixups.toml b/shim/third-party/rust/fixups/nom/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/nom/fixups.toml +++ b/shim/third-party/rust/fixups/nom/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/ntapi/fixups.toml b/shim/third-party/rust/fixups/ntapi/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/ntapi/fixups.toml +++ b/shim/third-party/rust/fixups/ntapi/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/num-bigint/fixups.toml b/shim/third-party/rust/fixups/num-bigint/fixups.toml index df0b424f49700..55e01177fd86d 100644 --- a/shim/third-party/rust/fixups/num-bigint/fixups.toml +++ b/shim/third-party/rust/fixups/num-bigint/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/num-integer/fixups.toml b/shim/third-party/rust/fixups/num-integer/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/num-integer/fixups.toml +++ b/shim/third-party/rust/fixups/num-integer/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/num-traits/fixups.toml b/shim/third-party/rust/fixups/num-traits/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/num-traits/fixups.toml +++ b/shim/third-party/rust/fixups/num-traits/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/oid-registry/fixups.toml b/shim/third-party/rust/fixups/oid-registry/fixups.toml index 79d5cb979d12d..45a72665bb10f 100644 --- a/shim/third-party/rust/fixups/oid-registry/fixups.toml +++ b/shim/third-party/rust/fixups/oid-registry/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + cargo_env = [ "CARGO_PKG_NAME", # Needed by _buck1_handle_manifest_dir "CARGO_MANIFEST_DIR", diff --git a/shim/third-party/rust/fixups/parking_lot/fixups.toml b/shim/third-party/rust/fixups/parking_lot/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/parking_lot/fixups.toml +++ b/shim/third-party/rust/fixups/parking_lot/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/parking_lot_core/fixups.toml b/shim/third-party/rust/fixups/parking_lot_core/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/parking_lot_core/fixups.toml +++ b/shim/third-party/rust/fixups/parking_lot_core/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/paste/fixups.toml b/shim/third-party/rust/fixups/paste/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/paste/fixups.toml +++ b/shim/third-party/rust/fixups/paste/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/pest/fixups.toml b/shim/third-party/rust/fixups/pest/fixups.toml index af7edb27e3bb7..9b40a18f4cab3 100644 --- a/shim/third-party/rust/fixups/pest/fixups.toml +++ b/shim/third-party/rust/fixups/pest/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/pin-project-internal/fixups.toml b/shim/third-party/rust/fixups/pin-project-internal/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/pin-project-internal/fixups.toml +++ b/shim/third-party/rust/fixups/pin-project-internal/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/platforms/fixups.toml b/shim/third-party/rust/fixups/platforms/fixups.toml index e086791cd2f5b..beb28c099061b 100644 --- a/shim/third-party/rust/fixups/platforms/fixups.toml +++ b/shim/third-party/rust/fixups/platforms/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # Buildscript sets TARGET in environment buildscript = [] diff --git a/shim/third-party/rust/fixups/prettyplease/fixups.toml b/shim/third-party/rust/fixups/prettyplease/fixups.toml index 3510928422a31..118f26932835f 100644 --- a/shim/third-party/rust/fixups/prettyplease/fixups.toml +++ b/shim/third-party/rust/fixups/prettyplease/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] cargo_env = true diff --git a/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml b/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml +++ b/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/proc-macro-error/fixups.toml b/shim/third-party/rust/fixups/proc-macro-error/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/proc-macro-error/fixups.toml +++ b/shim/third-party/rust/fixups/proc-macro-error/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml b/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml +++ b/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/proc-macro2/fixups.toml b/shim/third-party/rust/fixups/proc-macro2/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/proc-macro2/fixups.toml +++ b/shim/third-party/rust/fixups/proc-macro2/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/prost-build/fixups.toml b/shim/third-party/rust/fixups/prost-build/fixups.toml index 5865e69048455..61a5cb67428b6 100644 --- a/shim/third-party/rust/fixups/prost-build/fixups.toml +++ b/shim/third-party/rust/fixups/prost-build/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] # These are here because the crate uses the env! macro diff --git a/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml b/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml +++ b/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/quote/fixups.toml b/shim/third-party/rust/fixups/quote/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/quote/fixups.toml +++ b/shim/third-party/rust/fixups/quote/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/radium/fixups.toml b/shim/third-party/rust/fixups/radium/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/radium/fixups.toml +++ b/shim/third-party/rust/fixups/radium/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/rayon-core/fixups.toml b/shim/third-party/rust/fixups/rayon-core/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/rayon-core/fixups.toml +++ b/shim/third-party/rust/fixups/rayon-core/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/ref-cast/fixups.toml b/shim/third-party/rust/fixups/ref-cast/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/ref-cast/fixups.toml +++ b/shim/third-party/rust/fixups/ref-cast/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/reqwest/fixups.toml b/shim/third-party/rust/fixups/reqwest/fixups.toml index af7edb27e3bb7..9b40a18f4cab3 100644 --- a/shim/third-party/rust/fixups/reqwest/fixups.toml +++ b/shim/third-party/rust/fixups/reqwest/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/ring/fixups.toml b/shim/third-party/rust/fixups/ring/fixups.toml index d2c83589cf4de..8e7020eb716be 100644 --- a/shim/third-party/rust/fixups/ring/fixups.toml +++ b/shim/third-party/rust/fixups/ring/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # Copied from fbsource fixup. buildscript = [] diff --git a/shim/third-party/rust/fixups/rustix/fixups.toml b/shim/third-party/rust/fixups/rustix/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/rustix/fixups.toml +++ b/shim/third-party/rust/fixups/rustix/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/rustls/fixups.toml b/shim/third-party/rust/fixups/rustls/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/rustls/fixups.toml +++ b/shim/third-party/rust/fixups/rustls/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/rustversion/fixups.toml b/shim/third-party/rust/fixups/rustversion/fixups.toml index ac9ebfb4af71d..309316ac45495 100644 --- a/shim/third-party/rust/fixups/rustversion/fixups.toml +++ b/shim/third-party/rust/fixups/rustversion/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/serde/fixups.toml b/shim/third-party/rust/fixups/serde/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/serde/fixups.toml +++ b/shim/third-party/rust/fixups/serde/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/serde_derive/fixups.toml b/shim/third-party/rust/fixups/serde_derive/fixups.toml index 7de4ebb3e1996..015a575a2f772 100644 --- a/shim/third-party/rust/fixups/serde_derive/fixups.toml +++ b/shim/third-party/rust/fixups/serde_derive/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # To set `CARGO_MANIFEST_DIR` cargo_env = true buildscript = [] diff --git a/shim/third-party/rust/fixups/serde_json/fixups.toml b/shim/third-party/rust/fixups/serde_json/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/serde_json/fixups.toml +++ b/shim/third-party/rust/fixups/serde_json/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/signal-hook/fixups.toml b/shim/third-party/rust/fixups/signal-hook/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/signal-hook/fixups.toml +++ b/shim/third-party/rust/fixups/signal-hook/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/slab/fixups.toml b/shim/third-party/rust/fixups/slab/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/slab/fixups.toml +++ b/shim/third-party/rust/fixups/slab/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/slog/fixups.toml b/shim/third-party/rust/fixups/slog/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/slog/fixups.toml +++ b/shim/third-party/rust/fixups/slog/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/syn/fixups.toml b/shim/third-party/rust/fixups/syn/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/syn/fixups.toml +++ b/shim/third-party/rust/fixups/syn/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/sys-info/fixups.toml b/shim/third-party/rust/fixups/sys-info/fixups.toml index 5d124b3ad7ad2..39a5fdc37278f 100644 --- a/shim/third-party/rust/fixups/sys-info/fixups.toml +++ b/shim/third-party/rust/fixups/sys-info/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] [[platform_fixup.'cfg(target_os = "linux")'.buildscript]] diff --git a/shim/third-party/rust/fixups/sysinfo/fixups.toml b/shim/third-party/rust/fixups/sysinfo/fixups.toml index 8518b1897006d..bcf5ac4924828 100644 --- a/shim/third-party/rust/fixups/sysinfo/fixups.toml +++ b/shim/third-party/rust/fixups/sysinfo/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + extra_srcs = ["README.md", "md_doc/**/*.md"] buildscript = [] diff --git a/shim/third-party/rust/fixups/tempfile/fixups.toml b/shim/third-party/rust/fixups/tempfile/fixups.toml index 5e026f75e0de3..d514599437f6a 100644 --- a/shim/third-party/rust/fixups/tempfile/fixups.toml +++ b/shim/third-party/rust/fixups/tempfile/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/terminfo/fixups.toml b/shim/third-party/rust/fixups/terminfo/fixups.toml index ac9ebfb4af71d..309316ac45495 100644 --- a/shim/third-party/rust/fixups/terminfo/fixups.toml +++ b/shim/third-party/rust/fixups/terminfo/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/termwiz/fixups.toml b/shim/third-party/rust/fixups/termwiz/fixups.toml index fdba1eb21b86a..478b0154e80be 100644 --- a/shim/third-party/rust/fixups/termwiz/fixups.toml +++ b/shim/third-party/rust/fixups/termwiz/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + cargo_env = true extra_srcs = ["src/**/*.pest"] diff --git a/shim/third-party/rust/fixups/test-case/fixups.toml b/shim/third-party/rust/fixups/test-case/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/test-case/fixups.toml +++ b/shim/third-party/rust/fixups/test-case/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/thiserror/fixups.toml b/shim/third-party/rust/fixups/thiserror/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/thiserror/fixups.toml +++ b/shim/third-party/rust/fixups/thiserror/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/tiny-keccak/fixups.toml b/shim/third-party/rust/fixups/tiny-keccak/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/tiny-keccak/fixups.toml +++ b/shim/third-party/rust/fixups/tiny-keccak/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/tokio-stream/fixups.toml b/shim/third-party/rust/fixups/tokio-stream/fixups.toml index a1f4f0e7091d5..3c20ec4086b2a 100644 --- a/shim/third-party/rust/fixups/tokio-stream/fixups.toml +++ b/shim/third-party/rust/fixups/tokio-stream/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # reindeer cannot see through `cfg_sync!` macros and the like extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/tokio-util/fixups.toml b/shim/third-party/rust/fixups/tokio-util/fixups.toml index af7edb27e3bb7..9b40a18f4cab3 100644 --- a/shim/third-party/rust/fixups/tokio-util/fixups.toml +++ b/shim/third-party/rust/fixups/tokio-util/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/tokio/fixups.toml b/shim/third-party/rust/fixups/tokio/fixups.toml index d69dcefddb329..1446deebebdcd 100644 --- a/shim/third-party/rust/fixups/tokio/fixups.toml +++ b/shim/third-party/rust/fixups/tokio/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + cfgs = ["tokio_unstable", "tokio_track_caller"] extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/tonic/fixups.toml b/shim/third-party/rust/fixups/tonic/fixups.toml index 41439d3356a5e..1da45ba23144e 100644 --- a/shim/third-party/rust/fixups/tonic/fixups.toml +++ b/shim/third-party/rust/fixups/tonic/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + cargo_env = true diff --git a/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml b/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml index 28683dbe3cbbf..bb8e8892b738a 100644 --- a/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml +++ b/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # Reindeer can't find the dependencies due to being confused by the feature! macro. extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/trybuild/fixups.toml b/shim/third-party/rust/fixups/trybuild/fixups.toml index ac9ebfb4af71d..309316ac45495 100644 --- a/shim/third-party/rust/fixups/trybuild/fixups.toml +++ b/shim/third-party/rust/fixups/trybuild/fixups.toml @@ -1,2 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [[buildscript]] [buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/typenum/fixups.toml b/shim/third-party/rust/fixups/typenum/fixups.toml index 7ab02e4fd17cf..6f947d94b63de 100644 --- a/shim/third-party/rust/fixups/typenum/fixups.toml +++ b/shim/third-party/rust/fixups/typenum/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + features = ["force_unix_path_separator"] [[buildscript]] diff --git a/shim/third-party/rust/fixups/unicase/fixups.toml b/shim/third-party/rust/fixups/unicase/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/unicase/fixups.toml +++ b/shim/third-party/rust/fixups/unicase/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml b/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml index 07c79834d924f..a5a969de56ac5 100644 --- a/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml +++ b/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] [[platform_fixup.'cfg(target_os = "windows")'.buildscript]] diff --git a/shim/third-party/rust/fixups/winapi/fixups.toml b/shim/third-party/rust/fixups/winapi/fixups.toml index ec4f86e500d0a..295d056aba7bf 100644 --- a/shim/third-party/rust/fixups/winapi/fixups.toml +++ b/shim/third-party/rust/fixups/winapi/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] [[platform_fixup.'cfg(target_os = "windows")'.buildscript]] diff --git a/shim/third-party/rust/fixups/windows-targets/fixups.toml b/shim/third-party/rust/fixups/windows-targets/fixups.toml index b3555c7795e3d..9268eebf6b8fe 100644 --- a/shim/third-party/rust/fixups/windows-targets/fixups.toml +++ b/shim/third-party/rust/fixups/windows-targets/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + [platform_fixup.'cfg(any(target_os = "windows", target_os = "linux"))'] version = ">=0.48.0" cfgs = ["windows_raw_dylib"] diff --git a/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml b/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml index f40e9f9cbe6b1..c924883f5b0b5 100644 --- a/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml +++ b/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] [platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'] diff --git a/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml b/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml index b25e7f05fa57c..aa5cd0bf4e70d 100644 --- a/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml +++ b/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] [platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'] diff --git a/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml b/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml index a5579b6930ec1..568edc03a17d5 100644 --- a/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml +++ b/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] [platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'] diff --git a/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml b/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml index 8e8dea3516505..541a4b122ebac 100644 --- a/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml +++ b/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] [platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'] diff --git a/shim/third-party/rust/fixups/winreg/fixups.toml b/shim/third-party/rust/fixups/winreg/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/winreg/fixups.toml +++ b/shim/third-party/rust/fixups/winreg/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/zerocopy/fixups.toml b/shim/third-party/rust/fixups/zerocopy/fixups.toml index 41439d3356a5e..1da45ba23144e 100644 --- a/shim/third-party/rust/fixups/zerocopy/fixups.toml +++ b/shim/third-party/rust/fixups/zerocopy/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + cargo_env = true diff --git a/shim/third-party/rust/fixups/zstd-safe/fixups.toml b/shim/third-party/rust/fixups/zstd-safe/fixups.toml index db40d72cb2eaf..554cc0dae2b2b 100644 --- a/shim/third-party/rust/fixups/zstd-safe/fixups.toml +++ b/shim/third-party/rust/fixups/zstd-safe/fixups.toml @@ -1 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] diff --git a/shim/third-party/rust/fixups/zstd-sys/fixups.toml b/shim/third-party/rust/fixups/zstd-sys/fixups.toml index 2e2d704263ab5..c627d9be88ba6 100644 --- a/shim/third-party/rust/fixups/zstd-sys/fixups.toml +++ b/shim/third-party/rust/fixups/zstd-sys/fixups.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + buildscript = [] [[platform_fixup.'cfg(not(all(target_os = "windows", target_env = "msvc")))'.buildscript]] diff --git a/shim/third-party/rust/reindeer.toml b/shim/third-party/rust/reindeer.toml index ab3d1f8d4dbfa..13d929bbbe93e 100644 --- a/shim/third-party/rust/reindeer.toml +++ b/shim/third-party/rust/reindeer.toml @@ -1,3 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + # Configuration for Reindeer to generate Buck targets from Cargo.toml # # Overview of available options: From f30c508a1e6f13caf94884f07267aa6b01d657bc Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Fri, 11 Oct 2024 13:21:26 -0700 Subject: [PATCH 079/479] DeltaVisitor: visit hybrid nodes Summary: In DeltaVisitor add handling to visit hybrid nodes. Reviewed By: wilsonwinhi Differential Revision: D64226880 fbshipit-source-id: c3b9f2764788979bfb319f29459a1cc72051adaa --- fboss/thrift_cow/visitors/DeltaVisitor.h | 236 +++++++++++++++++++++++ 1 file changed, 236 insertions(+) diff --git a/fboss/thrift_cow/visitors/DeltaVisitor.h b/fboss/thrift_cow/visitors/DeltaVisitor.h index b84059ac87f0a..9e8d161a10ea3 100644 --- a/fboss/thrift_cow/visitors/DeltaVisitor.h +++ b/fboss/thrift_cow/visitors/DeltaVisitor.h @@ -19,6 +19,8 @@ namespace facebook::fboss::thrift_cow { +struct HybridNodeType; + /* * This visitor takes two ThriftCow objects, finds changed paths and * then runs the provided function against any paths that differ @@ -265,6 +267,29 @@ void visitAddedOrRemovedNode( } } +template +void visitAddedOrRemovedNode( + TraverseHelper& traverser, + const std::shared_ptr& oldNode, + const std::shared_ptr& newNode, + const DeltaVisitOptions& options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v) +{ + if (!options.recurseIntoHybridNodes) { + invokeVisitorFnHelper( + traverser, + oldNode, + newNode, + DeltaElemTag::MINIMAL, + std::forward(f)); + } else { + throw std::runtime_error(folly::to( + "DeltaVisitor support for recurseIntoHybridNode not implemented")); + } +} + template void visitAddedOrRemovedNode( TraverseHelper& traverser, @@ -355,6 +380,54 @@ struct DeltaVisitor> { return hasDifferences; } + + template + static bool visit( + TraverseHelper& traverser, + const std::shared_ptr& oldFields, + const std::shared_ptr& newFields, + const DeltaVisitOptions& options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v) + { + if (options.recurseIntoHybridNodes) { + throw std::runtime_error(folly::to( + "DeltaVisitor support for recurseIntoHybridNode for Set not implemented")); + } + bool hasDifferences{false}; + // if both old and new are non-null, compare contents + if ((oldFields != newFields) && + (static_cast(oldFields) && static_cast(newFields))) { + const auto& oldRef = oldFields->ref(); + const auto& newRef = newFields->ref(); + std::set_symmetric_difference( + oldRef.begin(), + oldRef.end(), + newRef.begin(), + newRef.end(), + boost::make_function_output_iterator([&](const auto& val) { + if (!val) { + // shouldn't happen... + return; + } + if (oldRef.count(val) && newRef.count(val)) { + return; + } + + hasDifferences = true; + })); + } + if (hasDifferences) { + dv_detail::invokeVisitorFnHelper( + traverser, + oldFields, + newFields, + DeltaElemTag::MINIMAL, + std::forward(f)); + } + return hasDifferences; + } }; /** @@ -433,6 +506,52 @@ struct DeltaVisitor> { return hasDifferences; } + + template + static bool visit( + TraverseHelper& traverser, + const std::shared_ptr& oldFields, + const std::shared_ptr& newFields, + const DeltaVisitOptions& options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v) + { + if (options.recurseIntoHybridNodes) { + throw std::runtime_error(folly::to( + "DeltaVisitor support for recurseIntoHybridNode for List not implemented")); + } + bool hasDifferences{false}; + // if both old and new are non-null, compare contents + if ((oldFields != newFields) && + (static_cast(oldFields) && static_cast(newFields))) { + const auto& oldRef = oldFields->ref(); + const auto& newRef = newFields->ref(); + + int minSize = std::min(oldRef.size(), newRef.size()); + + if (oldRef.size() != newRef.size()) { // entries added or removed + hasDifferences = true; + } else { + for (int i = 0; i < minSize; ++i) { + const auto& oldElem = oldRef.at(i); + const auto& newElem = newRef.at(i); + if (oldElem != newElem) { + hasDifferences = true; + } + } + } + } + if (hasDifferences) { + dv_detail::invokeVisitorFnHelper( + traverser, + oldFields, + newFields, + DeltaElemTag::MINIMAL, + std::forward(f)); + } + return hasDifferences; + } }; /** @@ -500,6 +619,53 @@ struct DeltaVisitor< return hasDifferences; } + + template + static bool visit( + TraverseHelper& traverser, + const std::shared_ptr& oldFields, + const std::shared_ptr& newFields, + const DeltaVisitOptions& options, + Func&& f) + // only enable for Fields types + requires(std::is_same_v) + { + if (options.recurseIntoHybridNodes) { + throw std::runtime_error(folly::to( + "DeltaVisitor support for recurseIntoHybridNode for Map not implemented")); + } + bool hasDifferences{false}; + // if both old and new are non-null, compare contents + if ((oldFields != newFields) && + (static_cast(oldFields) && static_cast(newFields))) { + const auto& oldRef = oldFields->ref(); + const auto& newRef = newFields->ref(); + // changed entries + for (const auto& [key, val] : oldRef) { + auto it = newRef.find(key); + if (it == newRef.end()) { + hasDifferences = true; + } else if (val != it->second) { + hasDifferences = true; + } + } + + for (const auto& [key, val] : newRef) { + if (oldRef.find(key) == oldRef.end()) { + hasDifferences = true; + } + } + } + if (hasDifferences) { + dv_detail::invokeVisitorFnHelper( + traverser, + oldFields, + newFields, + DeltaElemTag::MINIMAL, + std::forward(f)); + } + return hasDifferences; + } }; /** @@ -617,6 +783,41 @@ struct DeltaVisitor { return hasDifferences; } + + template + static bool visit( + TraverseHelper& traverser, + const std::shared_ptr& oldFields, + const std::shared_ptr& newFields, + const DeltaVisitOptions& options, + Func&& f) + // only enable for Fields types + requires(std::is_same_v) + { + if (options.recurseIntoHybridNodes) { + throw std::runtime_error(folly::to( + "DeltaVisitor support for recurseIntoHybridNode for Variant not implemented")); + } + bool hasDifferences{false}; + // if both old and new are non-null, compare contents + if ((oldFields != newFields) && + (static_cast(oldFields) && static_cast(newFields))) { + const auto& oldRef = oldFields->ref(); + const auto& newRef = newFields->ref(); + if (oldRef != newRef) { + hasDifferences = true; + } + } + if (hasDifferences) { + dv_detail::invokeVisitorFnHelper( + traverser, + oldFields, + newFields, + DeltaElemTag::MINIMAL, + std::forward(f)); + } + return hasDifferences; + } }; /** @@ -700,6 +901,41 @@ struct DeltaVisitor { return hasDifferences; } + + template + static bool visit( + TraverseHelper& traverser, + const std::shared_ptr& oldFields, + const std::shared_ptr& newFields, + const DeltaVisitOptions& options, + Func&& f) + // only enable for Fields types + requires(std::is_same_v) + { + if (options.recurseIntoHybridNodes) { + throw std::runtime_error(folly::to( + "DeltaVisitor support for recurseIntoHybridNode for Struct not implemented")); + } + bool hasDifferences{false}; + // if both old and new are non-null, compare contents + if ((oldFields != newFields) && + (static_cast(oldFields) && static_cast(newFields))) { + const auto& oldRef = oldFields->ref(); + const auto& newRef = newFields->ref(); + if (oldRef != newRef) { + hasDifferences = true; + } + } + if (hasDifferences) { + dv_detail::invokeVisitorFnHelper( + traverser, + oldFields, + newFields, + DeltaElemTag::MINIMAL, + std::forward(f)); + } + return hasDifferences; + } }; /** From d88e21e34bfe7421ab6a2ac1b4b2591be3512a3c Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Fri, 11 Oct 2024 16:00:55 -0700 Subject: [PATCH 080/479] add new fboss feature PORT_MTU_ERROR_TRAP Summary: Add this new feature for J3 platforms, where FBOSS will use port mtu error trap instead of existing L3 mtu error trap, see CS00012371071 for details Reviewed By: shri-khare Differential Revision: D64242635 Privacy Context Container: L1125642 fbshipit-source-id: 6ce4753b1487891907fcb3b5fa0cb9667c67f5f9 --- fboss/agent/hw/switch_asics/EbroAsic.cpp | 1 + fboss/agent/hw/switch_asics/HwAsic.h | 1 + fboss/agent/hw/switch_asics/Jericho2Asic.cpp | 1 + fboss/agent/hw/switch_asics/Jericho3Asic.cpp | 1 + fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp | 1 + fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp | 1 + fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp | 1 + fboss/agent/hw/switch_asics/TomahawkAsic.cpp | 1 + fboss/agent/hw/switch_asics/Trident2Asic.cpp | 1 + fboss/agent/hw/switch_asics/YubaAsic.cpp | 1 + 10 files changed, 10 insertions(+) diff --git a/fboss/agent/hw/switch_asics/EbroAsic.cpp b/fboss/agent/hw/switch_asics/EbroAsic.cpp index a7ec4bc25a7d9..ef87871d7a0b2 100644 --- a/fboss/agent/hw/switch_asics/EbroAsic.cpp +++ b/fboss/agent/hw/switch_asics/EbroAsic.cpp @@ -187,6 +187,7 @@ bool EbroAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::EGRESS_GVOQ_WATERMARK_BYTES: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return false; case HwAsic::Feature::SAI_ACL_ENTRY_SRC_PORT_QUALIFIER: /* diff --git a/fboss/agent/hw/switch_asics/HwAsic.h b/fboss/agent/hw/switch_asics/HwAsic.h index 09a7e23c9f4b9..47ff2f2983adf 100644 --- a/fboss/agent/hw/switch_asics/HwAsic.h +++ b/fboss/agent/hw/switch_asics/HwAsic.h @@ -196,6 +196,7 @@ class HwAsic { INGRESS_PRIORITY_GROUP_SHARED_WATERMARK, MULTIPLE_EGRESS_BUFFER_POOL, ENABLE_DELAY_DROP_CONGESTION_THRESHOLD, + PORT_MTU_ERROR_TRAP, }; enum class AsicMode { diff --git a/fboss/agent/hw/switch_asics/Jericho2Asic.cpp b/fboss/agent/hw/switch_asics/Jericho2Asic.cpp index c6f90b5ad4974..963ddc9fffa6d 100644 --- a/fboss/agent/hw/switch_asics/Jericho2Asic.cpp +++ b/fboss/agent/hw/switch_asics/Jericho2Asic.cpp @@ -186,6 +186,7 @@ bool Jericho2Asic::isSupported(Feature feature) const { case HwAsic::Feature::EGRESS_GVOQ_WATERMARK_BYTES: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Jericho3Asic.cpp b/fboss/agent/hw/switch_asics/Jericho3Asic.cpp index 9afc523f9811b..845a4ac238fe8 100644 --- a/fboss/agent/hw/switch_asics/Jericho3Asic.cpp +++ b/fboss/agent/hw/switch_asics/Jericho3Asic.cpp @@ -89,6 +89,7 @@ bool Jericho3Asic::isSupported(Feature feature) const { case HwAsic::Feature::NO_RX_REASON_TRAP: case HwAsic::Feature::EGRESS_GVOQ_WATERMARK_BYTES: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return true; // Features not expected to work on SIM case HwAsic::Feature::SHARED_INGRESS_EGRESS_BUFFER_POOL: diff --git a/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp index af34e88eb5376..3c85d554a0ce2 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp @@ -180,6 +180,7 @@ bool Tomahawk3Asic::isSupported(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_HEADROOM_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp index ef8e2bc1675c4..d3814abe8bcd7 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp @@ -199,6 +199,7 @@ bool Tomahawk4Asic::isSupported(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_HEADROOM_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp index 8089078b34263..449c95fce17eb 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp @@ -182,6 +182,7 @@ bool Tomahawk5Asic::isSupported(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/TomahawkAsic.cpp b/fboss/agent/hw/switch_asics/TomahawkAsic.cpp index 3cc4371db118c..a706065615b05 100644 --- a/fboss/agent/hw/switch_asics/TomahawkAsic.cpp +++ b/fboss/agent/hw/switch_asics/TomahawkAsic.cpp @@ -180,6 +180,7 @@ bool TomahawkAsic::isSupported(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Trident2Asic.cpp b/fboss/agent/hw/switch_asics/Trident2Asic.cpp index 20256e5cb3d85..dc1cbed46ca0c 100644 --- a/fboss/agent/hw/switch_asics/Trident2Asic.cpp +++ b/fboss/agent/hw/switch_asics/Trident2Asic.cpp @@ -180,6 +180,7 @@ bool Trident2Asic::isSupported(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/YubaAsic.cpp b/fboss/agent/hw/switch_asics/YubaAsic.cpp index 539c1b14c6eac..21d420d30418b 100644 --- a/fboss/agent/hw/switch_asics/YubaAsic.cpp +++ b/fboss/agent/hw/switch_asics/YubaAsic.cpp @@ -186,6 +186,7 @@ bool YubaAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::NO_RX_REASON_TRAP: case HwAsic::Feature::EGRESS_GVOQ_WATERMARK_BYTES: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return false; } return false; From af3dce78a6602874418888323cefe34e8d74fb9c Mon Sep 17 00:00:00 2001 From: Mohammed Al-Sanabani Date: Fri, 11 Oct 2024 16:27:55 -0700 Subject: [PATCH 081/479] Fix broken tests for wedge400c Summary: Some tests were broken https://www.internalfb.com/intern/testinfra/testconsole/testrun/14355223865327136/ because of diff stack: D63621992 This change fixes that ( attributes not applicable to leaba/1.42.8 ) Reviewed By: srikrishnagopu, harshitgulati18 Differential Revision: D64258853 fbshipit-source-id: 923c54e71586769ee5de525b50a95c17901d7521 --- fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index 8749667c4634b..02d6a8cda0223 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -1194,6 +1194,7 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { setTxRxAttr( attrs, SaiPortSerdesTraits::Attributes::TxLutMode{}, txLutMode); +#if defined(TAJO_SDK_GTE_24_4_90) setTxRxAttr( attrs, SaiPortSerdesTraits::Attributes::TxDiffEncoderEn{}, @@ -1284,6 +1285,7 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( attrs, SaiPortSerdesTraits::Attributes::RxCdrTdetFineStepOvVal{}, rxCdrTdetFineStepOvVal); +#endif } } From 37859da042ee8586676879c16a01b93cd717ea10 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Fri, 11 Oct 2024 17:57:32 -0700 Subject: [PATCH 082/479] fbcode//fboss/agent/thrift_packet_stream/tests/TARGETS Reviewed By: jasmeetbagga Differential Revision: D64168727 fbshipit-source-id: 5b072c875992755b2229f2fc7b3f6012a9b0e86c --- fboss/agent/thrift_packet_stream/tests/BUCK | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fboss/agent/thrift_packet_stream/tests/BUCK b/fboss/agent/thrift_packet_stream/tests/BUCK index cc4d58a258df8..1a54d2cb1fde9 100644 --- a/fboss/agent/thrift_packet_stream/tests/BUCK +++ b/fboss/agent/thrift_packet_stream/tests/BUCK @@ -27,11 +27,11 @@ cpp_unittest( "BidirectionalPacketStreamTest.cpp", ], deps = [ - "//fboss/agent:fboss-event-base", "//fboss/agent/thrift_packet_stream:bidirectional_packet_stream", "//fboss/lib:common_utils", "//folly:memory", "//folly:random", + "//folly/io/async:async_base", "//folly/io/async:event_base_manager", "//folly/io/async:scoped_event_base_thread", "//folly/logging:logging", From c80a314e903f39195798a96ca72aae9075afaf91 Mon Sep 17 00:00:00 2001 From: Ron He Date: Fri, 11 Oct 2024 18:11:32 -0700 Subject: [PATCH 083/479] Modify expected TxFir setting if zero preemphasis is enabled - second try Summary: Original diff D57993788 - we had issue on TH3 roundtrip tests, which got clarified during discussion with Brcm. Issue will be addressed in D64218169. As titled. Currently we set preemphasis to zero for port serdes, but did not maintain the zero preemphasis setting for next delta processing - this leads to resetting txFir to the desired values from platform mapping. Fix this by 1. Process change zero preemphasis setting prior to serdes programming. 2. Different handling for leaba and brcm a. Leaba requires remove and create for zero preemphasis b. Brcm requires direct setting of zero preemphasis but not accepting create. 3. For desired TxFir setting, if zero preemphasis is set, all Tx setting should be zero. Differential Revision: D61736115 fbshipit-source-id: 888857e37197ed0cbbb1432ca9078777b23f90f4 --- fboss/agent/hw/sai/switch/SaiPortManager.cpp | 77 +++++++++---------- fboss/agent/hw/sai/switch/SaiPortManager.h | 3 +- .../hw/sai/switch/npu/SaiPortManager.cpp | 61 ++++++++++----- .../hw/sai/switch/phy/SaiPortManager.cpp | 3 +- 4 files changed, 81 insertions(+), 63 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index d4bc533ea40b9..63399f06c65b3 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -2877,59 +2877,52 @@ void SaiPortManager::changeZeroPreemphasis( bool supportsZeroPreemphasis = platform_->getAsic()->isSupported( HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS); #endif + if (!supportsZeroPreemphasis) { return; } - auto gotAttributes = portHandle->port->attributes(); - auto numLanes = - std::get(gotAttributes) - .value() - .size(); - auto serDesAttributes = serdesAttributesFromSwPinConfigs( portHandle->port->adapterKey(), newPort->getPinConfigs(), - portHandle->serdes); - - auto setTxRxAttr = [](auto& attrs, auto type, const auto& val) { - auto& attr = std::get>>(attrs); - if (!val.empty()) { - attr = val; - } - }; - auto zeroVal = std::vector(numLanes, static_cast(0)); - if (platform_->getAsic()->isSupported( - HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS)) { - setTxRxAttr( - serDesAttributes, - SaiPortSerdesTraits::Attributes::Preemphasis{}, - zeroVal); - } else { - // Set three-tap values to zero - setTxRxAttr( - serDesAttributes, - SaiPortSerdesTraits::Attributes::TxFirPre1{}, - zeroVal); - setTxRxAttr( - serDesAttributes, - SaiPortSerdesTraits::Attributes::TxFirMain{}, - zeroVal); - setTxRxAttr( - serDesAttributes, - SaiPortSerdesTraits::Attributes::TxFirPost1{}, - zeroVal); - } + portHandle->serdes, + newPort->getZeroPreemphasis()); if (platform_->isSerdesApiSupported() && platform_->getAsic()->isSupported( HwAsic::Feature::SAI_PORT_SERDES_PROGRAMMING)) { - portHandle->serdes->setAttributes(serDesAttributes); +#ifdef TAJO_SAI_SDK + // TAJO requires recreating serdes object to zero peremphasis. + SaiPortSerdesTraits::AdapterHostKey serdesKey{ + portHandle->port->adapterKey()}; + auto& store = saiStore_->get(); + auto serdes = store.get(serdesKey); + portHandle->serdes.reset(); + serdes.reset(); + portHandle->serdes = store.setObject(serdesKey, serDesAttributes); +#else + // Brcm enforces main tap to be greater than all attributes. + // Hence set other attributes first, and then set main to zero. + auto setTxRxAttr = [](auto& attrs, auto type, const auto& val) { + auto& attr = + std::get>>(attrs); + if (!val.empty()) { + attr = val; + } + }; - // Read from HW to see if six-tap attribute changes after setting - // preemphasis. Then update sai store only. - reloadSixTapAttributes(portHandle, serDesAttributes); - portHandle->serdes->setAttributes( - serDesAttributes, /* skipHwWrite */ true); + auto nonZeroMainAttribute = serDesAttributes; + auto txMain = + std::get>( + serDesAttributes); + if (txMain.has_value()) { + setTxRxAttr( + nonZeroMainAttribute, + SaiPortSerdesTraits::Attributes::TxFirMain{}, + txMain.value().value()); + portHandle->serdes->setAttributes(nonZeroMainAttribute); + } + portHandle->serdes->setAttributes(serDesAttributes); +#endif } } } diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.h b/fboss/agent/hw/sai/switch/SaiPortManager.h index 4b38a2d0c8643..f48ac79051e2f 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.h +++ b/fboss/agent/hw/sai/switch/SaiPortManager.h @@ -156,7 +156,8 @@ class SaiPortManager { SaiPortSerdesTraits::CreateAttributes serdesAttributesFromSwPinConfigs( PortSaiId portSaid, const std::vector& pinConfigs, - const std::shared_ptr& serdes); + const std::shared_ptr& serdes, + bool zeroPreemphasis = false); const SaiPortHandle* getPortHandle(PortID swId) const; SaiPortHandle* getPortHandle(PortID swId); diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index 02d6a8cda0223..62815ca3e7393 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -317,6 +317,9 @@ void SaiPortManager::changePortImpl( getPortAdapterHostKeyFromAttr(newAttributes)}; auto& portStore = saiStore_->get(); auto saiPort = portStore.setObject(portKey, newAttributes, newPort->getID()); + + changeZeroPreemphasis(oldPort, newPort); + programSerdes(saiPort, newPort, existingPort); // if vlan changed update it, this is important for rx processing if (newPort->getIngressVlan() != oldPort->getIngressVlan()) { @@ -340,7 +343,6 @@ void SaiPortManager::changePortImpl( changeSamplePacket(oldPort, newPort); changePfc(oldPort, newPort); changeRxLaneSquelch(oldPort, newPort); - changeZeroPreemphasis(oldPort, newPort); changeTxEnable(oldPort, newPort); programPfcBuffers(newPort); @@ -918,9 +920,26 @@ void SaiPortManager::programSerdes( << "some lanes are missing for rx-settings"; } + // Check if the platform supports setting zero preemphasis. + // TH4 and TH5 starts supporting zero preemphasis starting 11.0 +#if defined(BRCM_SAI_SDK_GTE_11_0) + bool supportsZeroPreemphasis = + platform_->getAsic()->isSupported( + HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS) || + platform_->getAsic()->getAsicType() == + cfg::AsicType::ASIC_TYPE_TOMAHAWK4 || + platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_TOMAHAWK5; +#else + bool supportsZeroPreemphasis = platform_->getAsic()->isSupported( + HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS); +#endif + SaiPortSerdesTraits::CreateAttributes serdesAttributes = serdesAttributesFromSwPinConfigs( - saiPort->adapterKey(), swPort->getPinConfigs(), serdes); + saiPort->adapterKey(), + swPort->getPinConfigs(), + serdes, + swPort->getZeroPreemphasis() && supportsZeroPreemphasis); if (serdes && checkPortSerdesAttributes(serdes->attributes(), serdesAttributes)) { portHandle->serdes = serdes; @@ -964,7 +983,8 @@ SaiPortSerdesTraits::CreateAttributes SaiPortManager::serdesAttributesFromSwPinConfigs( PortSaiId portSaiId, const std::vector& pinConfigs, - const std::shared_ptr& serdes) { + const std::shared_ptr& serdes, + bool zeroPreemphasis) { SaiPortSerdesTraits::CreateAttributes attrs; SaiPortSerdesTraits::Attributes::TxFirPre1::ValueType txPre1; @@ -1034,19 +1054,19 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( if (platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_YUBA) { if (auto firPre1 = tx->firPre1()) { - txPre1.push_back(*firPre1); + txPre1.push_back(zeroPreemphasis ? 0 : *firPre1); } if (auto firPre2 = tx->firPre2()) { - txPre2.push_back(*firPre2); + txPre2.push_back(zeroPreemphasis ? 0 : *firPre2); } if (auto firPre3 = tx->firPre3()) { - txPre3.push_back(*firPre3); + txPre3.push_back(zeroPreemphasis ? 0 : *firPre3); } if (auto firMain = tx->firMain()) { - txMain.push_back(*firMain); + txMain.push_back(zeroPreemphasis ? 0 : *firMain); } if (auto firPost1 = tx->firPost1()) { - txPost1.push_back(*firPost1); + txPost1.push_back(zeroPreemphasis ? 0 : *firPost1); } if (auto diffEncoderEn = tx->diffEncoderEn()) { txDiffEncoderEn.push_back(diffEncoderEn.value()); @@ -1073,28 +1093,28 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( txDriverSwing.push_back(driverSwing.value()); } } else { - txPre1.push_back(*tx->pre()); - txMain.push_back(*tx->main()); - txPost1.push_back(*tx->post()); + txPre1.push_back(zeroPreemphasis ? 0 : *tx->pre()); + txMain.push_back(zeroPreemphasis ? 0 : *tx->main()); + txPost1.push_back(zeroPreemphasis ? 0 : *tx->post()); if (FLAGS_sai_configure_six_tap && platform_->getAsic()->isSupported( HwAsic::Feature::SAI_CONFIGURE_SIX_TAP)) { - txPost2.push_back(*tx->post2()); - txPost3.push_back(*tx->post3()); - txPre2.push_back(*tx->pre2()); + txPost2.push_back(zeroPreemphasis ? 0 : *tx->post2()); + txPost3.push_back(zeroPreemphasis ? 0 : *tx->post3()); + txPre2.push_back(zeroPreemphasis ? 0 : *tx->pre2()); if (platform_->getAsic()->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { if (auto lutMode = tx->lutMode()) { - txLutMode.push_back(*lutMode); + txLutMode.push_back(zeroPreemphasis ? 0 : *lutMode); } } } if (auto pre3 = tx->pre3()) { - txPre3.push_back(*pre3); + txPre3.push_back(zeroPreemphasis ? 0 : *pre3); } if (auto driveCurrent = tx->driveCurrent()) { - txIDriver.push_back(driveCurrent.value()); + txIDriver.push_back(zeroPreemphasis ? 0 : driveCurrent.value()); } } } @@ -1293,10 +1313,13 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( setTxRxAttr(attrs, SaiPortSerdesTraits::Attributes::TxFirPre3{}, txPre3); } - if (platform_->getAsic()->getPortSerdesPreemphasis().has_value()) { + if (platform_->getAsic()->getPortSerdesPreemphasis().has_value() || + zeroPreemphasis) { SaiPortSerdesTraits::Attributes::Preemphasis::ValueType preempahsis( numExpectedTxLanes, - platform_->getAsic()->getPortSerdesPreemphasis().value()); + zeroPreemphasis + ? 0 + : platform_->getAsic()->getPortSerdesPreemphasis().value()); setTxRxAttr( attrs, SaiPortSerdesTraits::Attributes::Preemphasis{}, preempahsis); } diff --git a/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp index c4b8e7751b327..8c002ae12e1fa 100644 --- a/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp @@ -365,7 +365,8 @@ SaiPortSerdesTraits::CreateAttributes SaiPortManager::serdesAttributesFromSwPinConfigs( PortSaiId portSaiId, const std::vector& pinConfigs, - const std::shared_ptr& /* serdes */) { + const std::shared_ptr& /* serdes */, + bool /* zeroPreemphasis */) { SaiPortSerdesTraits::CreateAttributes attrs; SaiPortSerdesTraits::Attributes::TxFirPre1::ValueType txPre1; From 43ca97125d9b165be4530a922c0bb84129843168 Mon Sep 17 00:00:00 2001 From: Ron He Date: Fri, 11 Oct 2024 18:11:32 -0700 Subject: [PATCH 084/479] Fix setting maintap in zero preemphasis setting - second try Summary: Original diff D58880165 - we had issue on TH3 roundtrip tests, which got clarified during discussion with Brcm. Issue will be addressed in D64218169. As titled. The goal is to set preemphasis + all six-tap values to zero (except main), and then set main to zero. This is due to the check on yamp platform - ERROR: in BLACKHAWK, main TAP is expected to be greater than all other TAPs.ERROR:chip/blackhawk/tier1/blackhawk_tsc_config.c->blackhawk_tsc_validate_txfir_cfg() SerDes err_code = ERR_CODE_BAD_PTR_OR_INVALID_INPUT : 26 Fix this by first setting sixtap but keeping main the same, and then set main to zero. Differential Revision: D61736113 fbshipit-source-id: fbcdbf1b300a7bf2c4c9e70f5cd7bc57416fd0ce --- fboss/agent/hw/sai/switch/SaiPortManager.cpp | 21 +++++++------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index 63399f06c65b3..cca2e8cd9b15b 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -2902,25 +2902,18 @@ void SaiPortManager::changeZeroPreemphasis( #else // Brcm enforces main tap to be greater than all attributes. // Hence set other attributes first, and then set main to zero. - auto setTxRxAttr = [](auto& attrs, auto type, const auto& val) { - auto& attr = - std::get>>(attrs); - if (!val.empty()) { - attr = val; - } - }; - auto nonZeroMainAttribute = serDesAttributes; auto txMain = std::get>( - serDesAttributes); + portHandle->serdes->attributes()); if (txMain.has_value()) { - setTxRxAttr( - nonZeroMainAttribute, - SaiPortSerdesTraits::Attributes::TxFirMain{}, - txMain.value().value()); - portHandle->serdes->setAttributes(nonZeroMainAttribute); + std::get>( + nonZeroMainAttribute) = txMain.value().value(); + } else { + std::get>( + nonZeroMainAttribute) = std::nullopt; } + portHandle->serdes->setAttributes(nonZeroMainAttribute); portHandle->serdes->setAttributes(serDesAttributes); #endif } From ab00c851282452c43b8773ee07981f2613664b5d Mon Sep 17 00:00:00 2001 From: Ron He Date: Fri, 11 Oct 2024 18:11:32 -0700 Subject: [PATCH 085/479] Handle TH3 serdes creation with preemphasis zero Summary: As discussed in CS00012356930, on TH3 devices we cannot create serdes with preemphasis zero along with other attributes. E.g. SaiApiError.h:67] [port] Failed to create sai entity PortSerdesSaiId(0): (PortId: 4294967297, Preemphasis: [0, 0], nullopt, TxFirPre1: [0, 0], nullopt, nullopt, TxFirMain: [0, 0], TxFirPost1: [0, 0], nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt): INVALID PARAMETER Need to separately create serdes with preemphasis zero, then program other attributes if necessary. Differential Revision: D64218169 fbshipit-source-id: fb0b3b3b86d6ec34aea6bb9485b7af0f79d82247 --- fboss/agent/hw/sai/switch/SaiPortManager.h | 3 ++ .../hw/sai/switch/npu/SaiPortManager.cpp | 35 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.h b/fboss/agent/hw/sai/switch/SaiPortManager.h index f48ac79051e2f..2d9828a2420b5 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.h +++ b/fboss/agent/hw/sai/switch/SaiPortManager.h @@ -425,6 +425,9 @@ class SaiPortManager { double calculateRate(uint32_t speed); void updatePrbsStatsEntryRate(const std::shared_ptr& swPort); void resetCableLength(PortID portId); + void createSerdesWithZeroPreemphasis( + SaiPortHandle* portHandle, + const std::vector& pinConfigs); SaiStore* saiStore_; SaiManagerTable* managerTable_; diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index 62815ca3e7393..080537679a534 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -956,6 +956,11 @@ void SaiPortManager::programSerdes( portHandle->serdes.reset(); serdes.reset(); } + if (platform_->getAsic()->getAsicType() == + cfg::AsicType::ASIC_TYPE_TOMAHAWK3 && + swPort->getZeroPreemphasis()) { + createSerdesWithZeroPreemphasis(portHandle, swPort->getPinConfigs()); + } // create if serdes doesn't exist or update existing serdes portHandle->serdes = store.setObject(serdesKey, serdesAttributes); @@ -1379,4 +1384,34 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( } return attrs; } + +void SaiPortManager::createSerdesWithZeroPreemphasis( + SaiPortHandle* portHandle, + const std::vector& pinConfigs) { + SaiPortSerdesTraits::CreateAttributes attributes; + + auto portSaiId = portHandle->port->adapterKey(); + std::get(attributes) = + static_cast(portSaiId); + + auto numExpectedTxLanes = 0; + for (const auto& pinConfig : pinConfigs) { + if (auto tx = pinConfig.tx()) { + ++numExpectedTxLanes; + } + } + + SaiPortSerdesTraits::Attributes::Preemphasis::ValueType preemphasis; + preemphasis.resize(numExpectedTxLanes, 0); + std::get>>( + attributes) = preemphasis; + SaiPortSerdesTraits::AdapterHostKey serdesKey{portSaiId}; + auto& store = saiStore_->get(); + portHandle->serdes = store.setObject(serdesKey, attributes); + + // Reload attributes + reloadSixTapAttributes(portHandle, attributes); + portHandle->serdes->setAttributes(attributes, true /* skipHwWrite */); +} } // namespace facebook::fboss From 60926c83ed27f4c3362ba37a4d26111e0bb40b31 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Sat, 12 Oct 2024 09:33:32 -0700 Subject: [PATCH 086/479] Updating submodules Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/ec0105fb4100a6aa7637b14db600a064444a0e2f https://github.com/facebook/buck2-shims-meta/commit/58904ec60bfacea4ad7f4b4bf334b44a2605d263 https://github.com/facebook/fb303/commit/8202aa5404cf50b3334817dd4c670239039efbb6 https://github.com/facebook/fbthrift/commit/c8c7192ab70a99906e076c143165ebe1536735ee https://github.com/facebook/folly/commit/0aa6ed46b941d384214b9a0cdf9b339bf68913c6 https://github.com/facebook/mvfst/commit/90de80c68fc55675dda61ceaa1347dde9d98a80e https://github.com/facebook/proxygen/commit/766cb9b5a7aba502e786f5a862625ccde2a49bb5 https://github.com/facebook/wangle/commit/eaf1ceb283aad40eb70cc2982128477289bf2192 https://github.com/facebookexperimental/edencommon/commit/5f08652d42cef83ea0f84cca48464de6499584dd https://github.com/facebookexperimental/rust-shed/commit/975ce7359cd835664173174f8acc93b37c0a1d36 https://github.com/facebookincubator/fizz/commit/1ae8f729a6c4606c2af9122895d54962e74e1c13 Reviewed By: ckwalsh fbshipit-source-id: bc5645f1e4f1ace8b8455105ebf265b4fd3b73c5 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index f4ccac3cc35b9..6953d64e0b5cc 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 589a03544b30950be773dc4767ac95d7f94110ed +Subproject commit 8202aa5404cf50b3334817dd4c670239039efbb6 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 834e27b2b0157..3727c1abf8f2e 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 5ae23ab52d29fec02244a7d50903cf1fb4031ace +Subproject commit c8c7192ab70a99906e076c143165ebe1536735ee diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index dbb0dfb34dcf5..e692fc15015cd 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 452c7438adb67321f99f2bca7395087ef59dd58f +Subproject commit 0aa6ed46b941d384214b9a0cdf9b339bf68913c6 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 96c2a3e0d9e5e..3c5ab975f48de 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 95d995a1dc06d5244676f4981393accb205753b3 +Subproject commit eaf1ceb283aad40eb70cc2982128477289bf2192 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index a519e70d93742..71d86f97cf165 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 4af8e7f3a16c3111bf020cd8b547cccd78d37420 +Subproject commit 1ae8f729a6c4606c2af9122895d54962e74e1c13 From ee372aca72483618b00cfbd64bec4e85078848e1 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Sun, 13 Oct 2024 09:33:20 -0700 Subject: [PATCH 087/479] Updating submodules Summary: GitHub commits: https://github.com/facebook/fb303/commit/adcc9b7a0f8149c0899df1734207021d03a0b359 https://github.com/facebook/fbthrift/commit/4408523755ed370e1358acce44a26b350c204f9b https://github.com/facebook/folly/commit/ad90720829db5ba0c3d0e44994856dcce33d7940 https://github.com/facebook/mvfst/commit/e73e1f8303b4dc08a6d260d22fe922e0abf031d7 https://github.com/facebook/proxygen/commit/6570aa90e116c278d31bbe897a8b26f33c2c2b0c https://github.com/facebook/wangle/commit/8107673c3417e7cf88b4953ac7cc199dee63ee8c https://github.com/facebookexperimental/edencommon/commit/96b50e374a43abe7cf88d3b5039044c2e9c7af37 https://github.com/facebookexperimental/rust-shed/commit/0864b31c1c851755425849375ce5e3f0ff932906 https://github.com/facebookincubator/fizz/commit/cbcc84080cacc0006fd5ac464a6c57604057cfb0 Reviewed By: ckwalsh fbshipit-source-id: dadd0290b8a234c4c96f6f73f2dc6148e3d03e3e --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 6953d64e0b5cc..94e2576960bb4 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 8202aa5404cf50b3334817dd4c670239039efbb6 +Subproject commit adcc9b7a0f8149c0899df1734207021d03a0b359 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 3727c1abf8f2e..4ebb68b5866b9 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit c8c7192ab70a99906e076c143165ebe1536735ee +Subproject commit 4408523755ed370e1358acce44a26b350c204f9b diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index e692fc15015cd..e0e94d9e9f659 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 0aa6ed46b941d384214b9a0cdf9b339bf68913c6 +Subproject commit ad90720829db5ba0c3d0e44994856dcce33d7940 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 3c5ab975f48de..97a473c3e6646 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit eaf1ceb283aad40eb70cc2982128477289bf2192 +Subproject commit 8107673c3417e7cf88b4953ac7cc199dee63ee8c diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 71d86f97cf165..3fd586941f20b 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 1ae8f729a6c4606c2af9122895d54962e74e1c13 +Subproject commit cbcc84080cacc0006fd5ac464a6c57604057cfb0 From 9dbd88f16d7d1c39ea8ea0531eae673143b86746 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005232357 Date: Sun, 13 Oct 2024 09:54:07 -0700 Subject: [PATCH 088/479] Revert D64218169 Summary: This diff reverts D64218169 Roundtrip tests are failing Attempting to remove SAI obj PortSerdesSaiId(281848638865408) while hw writes are not expected. Reviewed By: msomasundaran Differential Revision: D64296800 fbshipit-source-id: 18e44b02570b8ec3e4d9ee6f4c1ecda433c8c153 --- fboss/agent/hw/sai/switch/SaiPortManager.h | 3 -- .../hw/sai/switch/npu/SaiPortManager.cpp | 35 ------------------- 2 files changed, 38 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.h b/fboss/agent/hw/sai/switch/SaiPortManager.h index 2d9828a2420b5..f48ac79051e2f 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.h +++ b/fboss/agent/hw/sai/switch/SaiPortManager.h @@ -425,9 +425,6 @@ class SaiPortManager { double calculateRate(uint32_t speed); void updatePrbsStatsEntryRate(const std::shared_ptr& swPort); void resetCableLength(PortID portId); - void createSerdesWithZeroPreemphasis( - SaiPortHandle* portHandle, - const std::vector& pinConfigs); SaiStore* saiStore_; SaiManagerTable* managerTable_; diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index 080537679a534..62815ca3e7393 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -956,11 +956,6 @@ void SaiPortManager::programSerdes( portHandle->serdes.reset(); serdes.reset(); } - if (platform_->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_TOMAHAWK3 && - swPort->getZeroPreemphasis()) { - createSerdesWithZeroPreemphasis(portHandle, swPort->getPinConfigs()); - } // create if serdes doesn't exist or update existing serdes portHandle->serdes = store.setObject(serdesKey, serdesAttributes); @@ -1384,34 +1379,4 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( } return attrs; } - -void SaiPortManager::createSerdesWithZeroPreemphasis( - SaiPortHandle* portHandle, - const std::vector& pinConfigs) { - SaiPortSerdesTraits::CreateAttributes attributes; - - auto portSaiId = portHandle->port->adapterKey(); - std::get(attributes) = - static_cast(portSaiId); - - auto numExpectedTxLanes = 0; - for (const auto& pinConfig : pinConfigs) { - if (auto tx = pinConfig.tx()) { - ++numExpectedTxLanes; - } - } - - SaiPortSerdesTraits::Attributes::Preemphasis::ValueType preemphasis; - preemphasis.resize(numExpectedTxLanes, 0); - std::get>>( - attributes) = preemphasis; - SaiPortSerdesTraits::AdapterHostKey serdesKey{portSaiId}; - auto& store = saiStore_->get(); - portHandle->serdes = store.setObject(serdesKey, attributes); - - // Reload attributes - reloadSixTapAttributes(portHandle, attributes); - portHandle->serdes->setAttributes(attributes, true /* skipHwWrite */); -} } // namespace facebook::fboss From 4881387c1bb9177e4324f08a0744a90da210561b Mon Sep 17 00:00:00 2001 From: generatedunixname89002005232357 Date: Sun, 13 Oct 2024 09:54:07 -0700 Subject: [PATCH 089/479] Revert D61736113 Summary: This diff reverts D61736113 Depends on D64296800 Roundtrip tests are failing Attempting to remove SAI obj PortSerdesSaiId(281848638865408) while hw writes are not expected. Reviewed By: msomasundaran Differential Revision: D64296805 fbshipit-source-id: ff70dcca4bec11c3105600da43c91ee565a85cec --- fboss/agent/hw/sai/switch/SaiPortManager.cpp | 21 +++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index cca2e8cd9b15b..63399f06c65b3 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -2902,18 +2902,25 @@ void SaiPortManager::changeZeroPreemphasis( #else // Brcm enforces main tap to be greater than all attributes. // Hence set other attributes first, and then set main to zero. + auto setTxRxAttr = [](auto& attrs, auto type, const auto& val) { + auto& attr = + std::get>>(attrs); + if (!val.empty()) { + attr = val; + } + }; + auto nonZeroMainAttribute = serDesAttributes; auto txMain = std::get>( - portHandle->serdes->attributes()); + serDesAttributes); if (txMain.has_value()) { - std::get>( - nonZeroMainAttribute) = txMain.value().value(); - } else { - std::get>( - nonZeroMainAttribute) = std::nullopt; + setTxRxAttr( + nonZeroMainAttribute, + SaiPortSerdesTraits::Attributes::TxFirMain{}, + txMain.value().value()); + portHandle->serdes->setAttributes(nonZeroMainAttribute); } - portHandle->serdes->setAttributes(nonZeroMainAttribute); portHandle->serdes->setAttributes(serDesAttributes); #endif } From 44528db4e254fb31fcdf40f3ed7c923b70eb38c4 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005232357 Date: Sun, 13 Oct 2024 09:54:07 -0700 Subject: [PATCH 090/479] Revert D61736115 Summary: This diff reverts D61736115 Depends on D64296805 Roundtrip tests are failing Attempting to remove SAI obj PortSerdesSaiId(281848638865408) while hw writes are not expected. Reviewed By: msomasundaran Differential Revision: D64296808 fbshipit-source-id: eed9d30c8c2c8ee47a50602952c1aff6c714fef5 --- fboss/agent/hw/sai/switch/SaiPortManager.cpp | 77 ++++++++++--------- fboss/agent/hw/sai/switch/SaiPortManager.h | 3 +- .../hw/sai/switch/npu/SaiPortManager.cpp | 61 +++++---------- .../hw/sai/switch/phy/SaiPortManager.cpp | 3 +- 4 files changed, 63 insertions(+), 81 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index 63399f06c65b3..d4bc533ea40b9 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -2877,52 +2877,59 @@ void SaiPortManager::changeZeroPreemphasis( bool supportsZeroPreemphasis = platform_->getAsic()->isSupported( HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS); #endif - if (!supportsZeroPreemphasis) { return; } + auto gotAttributes = portHandle->port->attributes(); + auto numLanes = + std::get(gotAttributes) + .value() + .size(); + auto serDesAttributes = serdesAttributesFromSwPinConfigs( portHandle->port->adapterKey(), newPort->getPinConfigs(), - portHandle->serdes, - newPort->getZeroPreemphasis()); + portHandle->serdes); + + auto setTxRxAttr = [](auto& attrs, auto type, const auto& val) { + auto& attr = std::get>>(attrs); + if (!val.empty()) { + attr = val; + } + }; + auto zeroVal = std::vector(numLanes, static_cast(0)); + if (platform_->getAsic()->isSupported( + HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS)) { + setTxRxAttr( + serDesAttributes, + SaiPortSerdesTraits::Attributes::Preemphasis{}, + zeroVal); + } else { + // Set three-tap values to zero + setTxRxAttr( + serDesAttributes, + SaiPortSerdesTraits::Attributes::TxFirPre1{}, + zeroVal); + setTxRxAttr( + serDesAttributes, + SaiPortSerdesTraits::Attributes::TxFirMain{}, + zeroVal); + setTxRxAttr( + serDesAttributes, + SaiPortSerdesTraits::Attributes::TxFirPost1{}, + zeroVal); + } if (platform_->isSerdesApiSupported() && platform_->getAsic()->isSupported( HwAsic::Feature::SAI_PORT_SERDES_PROGRAMMING)) { -#ifdef TAJO_SAI_SDK - // TAJO requires recreating serdes object to zero peremphasis. - SaiPortSerdesTraits::AdapterHostKey serdesKey{ - portHandle->port->adapterKey()}; - auto& store = saiStore_->get(); - auto serdes = store.get(serdesKey); - portHandle->serdes.reset(); - serdes.reset(); - portHandle->serdes = store.setObject(serdesKey, serDesAttributes); -#else - // Brcm enforces main tap to be greater than all attributes. - // Hence set other attributes first, and then set main to zero. - auto setTxRxAttr = [](auto& attrs, auto type, const auto& val) { - auto& attr = - std::get>>(attrs); - if (!val.empty()) { - attr = val; - } - }; - - auto nonZeroMainAttribute = serDesAttributes; - auto txMain = - std::get>( - serDesAttributes); - if (txMain.has_value()) { - setTxRxAttr( - nonZeroMainAttribute, - SaiPortSerdesTraits::Attributes::TxFirMain{}, - txMain.value().value()); - portHandle->serdes->setAttributes(nonZeroMainAttribute); - } portHandle->serdes->setAttributes(serDesAttributes); -#endif + + // Read from HW to see if six-tap attribute changes after setting + // preemphasis. Then update sai store only. + reloadSixTapAttributes(portHandle, serDesAttributes); + portHandle->serdes->setAttributes( + serDesAttributes, /* skipHwWrite */ true); } } } diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.h b/fboss/agent/hw/sai/switch/SaiPortManager.h index f48ac79051e2f..4b38a2d0c8643 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.h +++ b/fboss/agent/hw/sai/switch/SaiPortManager.h @@ -156,8 +156,7 @@ class SaiPortManager { SaiPortSerdesTraits::CreateAttributes serdesAttributesFromSwPinConfigs( PortSaiId portSaid, const std::vector& pinConfigs, - const std::shared_ptr& serdes, - bool zeroPreemphasis = false); + const std::shared_ptr& serdes); const SaiPortHandle* getPortHandle(PortID swId) const; SaiPortHandle* getPortHandle(PortID swId); diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index 62815ca3e7393..02d6a8cda0223 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -317,9 +317,6 @@ void SaiPortManager::changePortImpl( getPortAdapterHostKeyFromAttr(newAttributes)}; auto& portStore = saiStore_->get(); auto saiPort = portStore.setObject(portKey, newAttributes, newPort->getID()); - - changeZeroPreemphasis(oldPort, newPort); - programSerdes(saiPort, newPort, existingPort); // if vlan changed update it, this is important for rx processing if (newPort->getIngressVlan() != oldPort->getIngressVlan()) { @@ -343,6 +340,7 @@ void SaiPortManager::changePortImpl( changeSamplePacket(oldPort, newPort); changePfc(oldPort, newPort); changeRxLaneSquelch(oldPort, newPort); + changeZeroPreemphasis(oldPort, newPort); changeTxEnable(oldPort, newPort); programPfcBuffers(newPort); @@ -920,26 +918,9 @@ void SaiPortManager::programSerdes( << "some lanes are missing for rx-settings"; } - // Check if the platform supports setting zero preemphasis. - // TH4 and TH5 starts supporting zero preemphasis starting 11.0 -#if defined(BRCM_SAI_SDK_GTE_11_0) - bool supportsZeroPreemphasis = - platform_->getAsic()->isSupported( - HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS) || - platform_->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_TOMAHAWK4 || - platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_TOMAHAWK5; -#else - bool supportsZeroPreemphasis = platform_->getAsic()->isSupported( - HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS); -#endif - SaiPortSerdesTraits::CreateAttributes serdesAttributes = serdesAttributesFromSwPinConfigs( - saiPort->adapterKey(), - swPort->getPinConfigs(), - serdes, - swPort->getZeroPreemphasis() && supportsZeroPreemphasis); + saiPort->adapterKey(), swPort->getPinConfigs(), serdes); if (serdes && checkPortSerdesAttributes(serdes->attributes(), serdesAttributes)) { portHandle->serdes = serdes; @@ -983,8 +964,7 @@ SaiPortSerdesTraits::CreateAttributes SaiPortManager::serdesAttributesFromSwPinConfigs( PortSaiId portSaiId, const std::vector& pinConfigs, - const std::shared_ptr& serdes, - bool zeroPreemphasis) { + const std::shared_ptr& serdes) { SaiPortSerdesTraits::CreateAttributes attrs; SaiPortSerdesTraits::Attributes::TxFirPre1::ValueType txPre1; @@ -1054,19 +1034,19 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( if (platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_YUBA) { if (auto firPre1 = tx->firPre1()) { - txPre1.push_back(zeroPreemphasis ? 0 : *firPre1); + txPre1.push_back(*firPre1); } if (auto firPre2 = tx->firPre2()) { - txPre2.push_back(zeroPreemphasis ? 0 : *firPre2); + txPre2.push_back(*firPre2); } if (auto firPre3 = tx->firPre3()) { - txPre3.push_back(zeroPreemphasis ? 0 : *firPre3); + txPre3.push_back(*firPre3); } if (auto firMain = tx->firMain()) { - txMain.push_back(zeroPreemphasis ? 0 : *firMain); + txMain.push_back(*firMain); } if (auto firPost1 = tx->firPost1()) { - txPost1.push_back(zeroPreemphasis ? 0 : *firPost1); + txPost1.push_back(*firPost1); } if (auto diffEncoderEn = tx->diffEncoderEn()) { txDiffEncoderEn.push_back(diffEncoderEn.value()); @@ -1093,28 +1073,28 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( txDriverSwing.push_back(driverSwing.value()); } } else { - txPre1.push_back(zeroPreemphasis ? 0 : *tx->pre()); - txMain.push_back(zeroPreemphasis ? 0 : *tx->main()); - txPost1.push_back(zeroPreemphasis ? 0 : *tx->post()); + txPre1.push_back(*tx->pre()); + txMain.push_back(*tx->main()); + txPost1.push_back(*tx->post()); if (FLAGS_sai_configure_six_tap && platform_->getAsic()->isSupported( HwAsic::Feature::SAI_CONFIGURE_SIX_TAP)) { - txPost2.push_back(zeroPreemphasis ? 0 : *tx->post2()); - txPost3.push_back(zeroPreemphasis ? 0 : *tx->post3()); - txPre2.push_back(zeroPreemphasis ? 0 : *tx->pre2()); + txPost2.push_back(*tx->post2()); + txPost3.push_back(*tx->post3()); + txPre2.push_back(*tx->pre2()); if (platform_->getAsic()->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { if (auto lutMode = tx->lutMode()) { - txLutMode.push_back(zeroPreemphasis ? 0 : *lutMode); + txLutMode.push_back(*lutMode); } } } if (auto pre3 = tx->pre3()) { - txPre3.push_back(zeroPreemphasis ? 0 : *pre3); + txPre3.push_back(*pre3); } if (auto driveCurrent = tx->driveCurrent()) { - txIDriver.push_back(zeroPreemphasis ? 0 : driveCurrent.value()); + txIDriver.push_back(driveCurrent.value()); } } } @@ -1313,13 +1293,10 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( setTxRxAttr(attrs, SaiPortSerdesTraits::Attributes::TxFirPre3{}, txPre3); } - if (platform_->getAsic()->getPortSerdesPreemphasis().has_value() || - zeroPreemphasis) { + if (platform_->getAsic()->getPortSerdesPreemphasis().has_value()) { SaiPortSerdesTraits::Attributes::Preemphasis::ValueType preempahsis( numExpectedTxLanes, - zeroPreemphasis - ? 0 - : platform_->getAsic()->getPortSerdesPreemphasis().value()); + platform_->getAsic()->getPortSerdesPreemphasis().value()); setTxRxAttr( attrs, SaiPortSerdesTraits::Attributes::Preemphasis{}, preempahsis); } diff --git a/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp index 8c002ae12e1fa..c4b8e7751b327 100644 --- a/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp @@ -365,8 +365,7 @@ SaiPortSerdesTraits::CreateAttributes SaiPortManager::serdesAttributesFromSwPinConfigs( PortSaiId portSaiId, const std::vector& pinConfigs, - const std::shared_ptr& /* serdes */, - bool /* zeroPreemphasis */) { + const std::shared_ptr& /* serdes */) { SaiPortSerdesTraits::CreateAttributes attrs; SaiPortSerdesTraits::Attributes::TxFirPre1::ValueType txPre1; From 73468172fb1d653f4d8fe3bdc3e8264d05e9fb33 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 13 Oct 2024 13:55:56 -0700 Subject: [PATCH 091/479] Add utility for line rate traffic on multiple ports Summary: Move the utility functions currently in `AgentVoqSwitchLineRateTest` to a common file for use in other tests. Reviewed By: maxwindiff Differential Revision: D63881545 fbshipit-source-id: f9586609d1b657f0aa97fd44d00d739c64515268 --- cmake/AgentTestUtils.cmake | 10 +++ fboss/agent/test/utils/BUCK | 17 +++++ .../test/utils/MultiPortTrafficTestUtils.cpp | 72 +++++++++++++++++++ .../test/utils/MultiPortTrafficTestUtils.h | 17 +++++ 4 files changed, 116 insertions(+) create mode 100644 fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp create mode 100644 fboss/agent/test/utils/MultiPortTrafficTestUtils.h diff --git a/cmake/AgentTestUtils.cmake b/cmake/AgentTestUtils.cmake index c658c49267918..20f3c3ed03812 100644 --- a/cmake/AgentTestUtils.cmake +++ b/cmake/AgentTestUtils.cmake @@ -411,3 +411,13 @@ target_link_libraries(voq_test_utils ecmp_helper test_ensemble_if ) + +add_library(multi_port_traffic_test_utils + fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp +) + +target_link_libraries(multi_port_traffic_test_utils + qos_test_utils + state + ecmp_helper +) diff --git a/fboss/agent/test/utils/BUCK b/fboss/agent/test/utils/BUCK index 5f557a663c448..3dbd006135946 100644 --- a/fboss/agent/test/utils/BUCK +++ b/fboss/agent/test/utils/BUCK @@ -527,3 +527,20 @@ cpp_library( "//fboss/agent/hw/switch_asics:switch_asics", ], ) + +cpp_library( + name = "multi_port_traffic_test_utils", + srcs = [ + "MultiPortTrafficTestUtils.cpp", + ], + headers = [ + "MultiPortTrafficTestUtils.h", + ], + exported_deps = [ + ":qos_test_utils", + "//fboss/agent:utils", + "//fboss/agent/state:state_utils", + "//fboss/agent/test:agent_hw_test", + "//fboss/agent/test:ecmp_helper", + ], +) diff --git a/fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp b/fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp new file mode 100644 index 0000000000000..bf6001aafbed2 --- /dev/null +++ b/fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp @@ -0,0 +1,72 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/agent/test/utils/MultiPortTrafficTestUtils.h" +#include "fboss/agent/state/StateUtils.h" +#include "fboss/agent/test/EcmpSetupHelper.h" +#include "fboss/agent/test/utils/QosTestUtils.h" + +namespace facebook::fboss::utility { +std::vector getOneRemoteHostIpPerInterfacePort( + facebook::fboss::AgentEnsemble* ensemble) { + std::vector ips; + for (int idx = 1; idx <= ensemble->masterLogicalInterfacePortIds().size(); + idx++) { + ips.push_back(folly::IPAddressV6(folly::to(2401, "::", idx))); + } + return ips; +} + +void setupEcmpDataplaneLoopOnAllPorts( + facebook::fboss::AgentEnsemble* ensemble) { + auto intfMac = utility::getFirstInterfaceMac(ensemble->getProgrammedState()); + utility::EcmpSetupTargetedPorts6 ecmpHelper( + ensemble->getProgrammedState(), intfMac); + std::vector portDescriptors; + std::vector> portDescSets; + for (auto& portId : ensemble->masterLogicalInterfacePortIds()) { + portDescriptors.push_back(PortDescriptor(portId)); + portDescSets.push_back(flat_set{PortDescriptor(portId)}); + } + ensemble->applyNewState( + [&portDescriptors, &ecmpHelper](const std::shared_ptr& in) { + return ecmpHelper.resolveNextHops( + in, + flat_set( + std::make_move_iterator(portDescriptors.begin()), + std::make_move_iterator(portDescriptors.end()))); + }); + + std::vector routePrefixes; + for (auto prefix : getOneRemoteHostIpPerInterfacePort(ensemble)) { + routePrefixes.push_back(RoutePrefixV6{prefix, 128}); + } + auto routeUpdater = ensemble->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&routeUpdater, portDescSets, routePrefixes); + for (auto& nhop : ecmpHelper.getNextHops()) { + utility::ttlDecrementHandlingForLoopbackTraffic( + ensemble, ecmpHelper.getRouterId(), nhop); + } +} + +void createTrafficOnMultiplePorts( + facebook::fboss::AgentEnsemble* ensemble, + int numberOfPorts, + std::function sendPacketFn) { + auto minPktsForLineRate = ensemble->getMinPktsForLineRate( + ensemble->masterLogicalInterfacePortIds()[0]); + auto hostIps = getOneRemoteHostIpPerInterfacePort(ensemble); + for (int idx = 0; idx < numberOfPorts; idx++) { + for (int count = 0; count < minPktsForLineRate; count++) { + sendPacketFn(ensemble, hostIps[idx]); + } + } + // Now, make sure that we have line rate traffic on these ports! + for (int idx = 0; idx < numberOfPorts; idx++) { + ensemble->waitForLineRateOnPort( + ensemble->masterLogicalInterfacePortIds()[idx]); + } +} + +} // namespace facebook::fboss::utility diff --git a/fboss/agent/test/utils/MultiPortTrafficTestUtils.h b/fboss/agent/test/utils/MultiPortTrafficTestUtils.h new file mode 100644 index 0000000000000..72ee1ddf57db0 --- /dev/null +++ b/fboss/agent/test/utils/MultiPortTrafficTestUtils.h @@ -0,0 +1,17 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#pragma once +#include "fboss/agent/Utils.h" +#include "fboss/agent/test/AgentHwTest.h" + +namespace facebook::fboss::utility { +std::vector getOneRemoteHostIpPerInterfacePort( + facebook::fboss::AgentEnsemble* ensemble); +void setupEcmpDataplaneLoopOnAllPorts(facebook::fboss::AgentEnsemble* ensemble); +void createTrafficOnMultiplePorts( + facebook::fboss::AgentEnsemble* ensemble, + int numberOfPorts, + std::function sendPacketFn); +} // namespace facebook::fboss::utility From cf90381337741083eda08e1cc43a32aad5e4eb1d Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 13 Oct 2024 13:55:56 -0700 Subject: [PATCH 092/479] New class and helper APIs for high rate sflow to mgmt port Summary: Class for high rate traffic in sflow test to stress eventor port in J3. Reviewed By: maxwindiff Differential Revision: D63881543 fbshipit-source-id: b8c00f3222463c601a361dce699cb9bd1534bdc9 --- .../agent_hw_tests/AgentSflowMirrorTest.cpp | 55 +++++++++++++++++++ fboss/agent/test/agent_hw_tests/BUCK | 1 + fboss/agent/test/utils/OlympicTestUtils.cpp | 3 +- 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp index e98e0c71ac968..bc4ac53911e0b 100644 --- a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp @@ -10,14 +10,17 @@ #include "fboss/agent/packet/PktFactory.h" #include "fboss/agent/packet/PktUtil.h" +#include "fboss/agent/test/AgentEnsemble.h" #include "fboss/agent/test/EcmpSetupHelper.h" #include "fboss/agent/test/ResourceLibUtil.h" #include "fboss/agent/test/TrunkUtils.h" #include "fboss/agent/test/utils/AsicUtils.h" #include "fboss/agent/test/utils/ConfigUtils.h" +#include "fboss/agent/test/utils/CoppTestUtils.h" #include "fboss/agent/test/utils/MirrorTestUtils.h" #include "fboss/agent/test/utils/OlympicTestUtils.h" #include "fboss/agent/test/utils/PacketSnooper.h" +#include "fboss/agent/test/utils/QosTestUtils.h" #include "fboss/lib/CommonUtils.h" #include "fboss/agent/SflowShimUtils.h" @@ -531,6 +534,58 @@ class AgentSflowMirrorOnTrunkTest : public AgentSflowMirrorTruncateTest { } }; +class AgentSflowMirrorWithLineRateTrafficTest + : public AgentSflowMirrorTest { + private: + static void sendPacket( + facebook::fboss::AgentEnsemble* ensemble, + const folly::IPAddressV6& dstIp) { + folly::IPAddressV6 kSrcIp("2402::1"); + const auto dstMac = + utility::getFirstInterfaceMac(ensemble->getProgrammedState()); + const auto srcMac = utility::MacAddressGenerator().get(dstMac.u64NBO() + 1); + + auto txPacket = utility::makeUDPTxPacket( + ensemble->getSw(), + std::nullopt, // vlanID + srcMac, + dstMac, + kSrcIp, + dstIp, + 8000, // l4 src port + 8001, // l4 dst port + 0x24 << 2, // dscp + 255, // hopLimit + std::vector(1024)); + // Forward the packet in the pipeline + ensemble->getSw()->sendPacketSwitchedAsync(std::move(txPacket)); + } + + void verifySflowEgressPortNotStuck() { + auto portId = getNonSflowSampledInterfacePorts(); + EXPECT_NO_THROW(getAgentEnsemble()->waitForLineRateOnPort(portId)); + // Make sure that we can sustain the rate for longer duration + constexpr int kNumberOfIterations{6}; + constexpr int kWaitPeriod{5}; + auto prevPortStats = getLatestPortStats(portId); + // Keep desired rate 2% lesser than line rate to allow for + // fluctuations. + auto desiredRate = + static_cast( + getProgrammedState()->getPorts()->getNodeIf(portId)->getSpeed()) * + 1000 * 1000 * 0.98; + for (int iter = 0; iter < kNumberOfIterations; iter++) { + sleep(kWaitPeriod); + auto curPortStats = getLatestPortStats(portId); + auto rate = getAgentEnsemble()->getTrafficRate( + prevPortStats, curPortStats, kWaitPeriod); + // Ensure that we always see greater than the desired rate + EXPECT_GT(rate, desiredRate); + prevPortStats = curPortStats; + } + } +}; + using AgentSflowMirrorTestV4 = AgentSflowMirrorTest; using AgentSflowMirrorTestV6 = AgentSflowMirrorTest; using AgentSflowMirrorTruncateTestV4 = diff --git a/fboss/agent/test/agent_hw_tests/BUCK b/fboss/agent/test/agent_hw_tests/BUCK index aba568e27d059..89718f33fda21 100644 --- a/fboss/agent/test/agent_hw_tests/BUCK +++ b/fboss/agent/test/agent_hw_tests/BUCK @@ -169,6 +169,7 @@ cpp_library( "//fboss/agent/state:label_forwarding_action", "//fboss/agent/state:state", "//fboss/agent/state:state_utils", + "//fboss/agent/test:agent_ensemble", "//fboss/agent/test:agent_hw_test", "//fboss/agent/test:ecmp_helper", "//fboss/agent/test:production_features-cpp2-types", diff --git a/fboss/agent/test/utils/OlympicTestUtils.cpp b/fboss/agent/test/utils/OlympicTestUtils.cpp index c7b10009e4e12..0149b34486239 100644 --- a/fboss/agent/test/utils/OlympicTestUtils.cpp +++ b/fboss/agent/test/utils/OlympicTestUtils.cpp @@ -177,7 +177,8 @@ void addEventorVoqConfig( queue.streamType() = streamType; queue.name() = "default"; *queue.scheduling() = cfg::QueueScheduling::INTERNAL; - queue.maxDynamicSharedBytes() = 20 * 1024 * 1024; + queue.maxDynamicSharedBytes() = 1024 * 1024; // 1MB + queue.scalingFactor() = cfg::MMUScalingFactor::ONE_HALF; std::vector eventorVoqConfig{std::move(queue)}; const std::string kEventorQueueConfigName{"eventor_queue_config"}; config->portQueueConfigs()[kEventorQueueConfigName] = eventorVoqConfig; From 66bdb45d1fa7bea10098db33876178714d792f4d Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 13 Oct 2024 13:55:56 -0700 Subject: [PATCH 093/479] New sflow test with high rate to management port Summary: Add a new test to stress sflow towards eventor port. Reviewed By: jasmeetbagga Differential Revision: D63881544 fbshipit-source-id: 0ae791bdd5c934642f994126a926da39de9cbf05 --- .../agent_hw_tests/AgentSflowMirrorTest.cpp | 23 +++++++++++++++++++ fboss/agent/test/agent_hw_tests/BUCK | 1 + 2 files changed, 24 insertions(+) diff --git a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp index bc4ac53911e0b..174cdb61ab447 100644 --- a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp @@ -18,6 +18,7 @@ #include "fboss/agent/test/utils/ConfigUtils.h" #include "fboss/agent/test/utils/CoppTestUtils.h" #include "fboss/agent/test/utils/MirrorTestUtils.h" +#include "fboss/agent/test/utils/MultiPortTrafficTestUtils.h" #include "fboss/agent/test/utils/OlympicTestUtils.h" #include "fboss/agent/test/utils/PacketSnooper.h" #include "fboss/agent/test/utils/QosTestUtils.h" @@ -536,6 +537,24 @@ class AgentSflowMirrorOnTrunkTest : public AgentSflowMirrorTruncateTest { class AgentSflowMirrorWithLineRateTrafficTest : public AgentSflowMirrorTest { + public: + void testSflowEgressCongestion() { + constexpr int kNumDataTrafficPorts{4}; + auto setup = [=, this]() { + auto config = initialConfig(*getAgentEnsemble()); + // Configure 1:1 sampling to ensure high rate on mirror egress port + configSampling(config, 1); + utility::setTTLZeroCpuConfig(getAgentEnsemble()->getL3Asics(), config); + applyNewConfig(config); + resolveRouteForMirrorDestination(); + utility::setupEcmpDataplaneLoopOnAllPorts(getAgentEnsemble()); + utility::createTrafficOnMultiplePorts( + getAgentEnsemble(), kNumDataTrafficPorts, sendPacket); + }; + auto verify = [=, this]() { verifySflowEgressPortNotStuck(); }; + verifyAcrossWarmBoots(setup, verify); + } + private: static void sendPacket( facebook::fboss::AgentEnsemble* ensemble, @@ -633,6 +652,10 @@ SFLOW_SAMPLING_TRUNK_TEST_V4_V6(VerifySampledPacketRate, { this->testSampledPacketRate(true); }) +TEST_F(AgentSflowMirrorWithLineRateTrafficTest, VerifySflowEgressCongestion) { + this->testSflowEgressCongestion(); +} + TEST_F(AgentSflowMirrorTestV4, MoveToV6) { // Test to migrate v4 mirror to v6 auto setup = [=, this]() { diff --git a/fboss/agent/test/agent_hw_tests/BUCK b/fboss/agent/test/agent_hw_tests/BUCK index 89718f33fda21..bcdf62b137f0a 100644 --- a/fboss/agent/test/agent_hw_tests/BUCK +++ b/fboss/agent/test/agent_hw_tests/BUCK @@ -119,6 +119,7 @@ cpp_library( "fbcode//fboss/agent/test/utils:load_balancer_test_utils", "fbcode//fboss/agent/test/utils:mac_test_utils", "fbcode//fboss/agent/test/utils:mirror_test_utils", + "fbcode//fboss/agent/test/utils:multi_port_traffic_test_utils", "fbcode//fboss/agent/test/utils:olympic_qos_utils", "fbcode//fboss/agent/test/utils:packet_snooper", "fbcode//fboss/agent/test/utils:pkt_test_utils", From 695698304fd77902f1e0d1af2d0f480ed78f4118 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 13 Oct 2024 13:55:56 -0700 Subject: [PATCH 094/479] Add check to ensure that eventor port voq FADT threshold works Summary: In the new test added, add a check to ensure that eventor port VOQ fadt threshold is respected, tail drops happen and queue building is bound. Reviewed By: jasmeetbagga Differential Revision: D63931410 fbshipit-source-id: d7995c26eb06920e5fd5e4049e148135c0f2dbb9 --- .../agent_hw_tests/AgentSflowMirrorTest.cpp | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp index 174cdb61ab447..91ac02725a2f4 100644 --- a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp @@ -551,7 +551,13 @@ class AgentSflowMirrorWithLineRateTrafficTest utility::createTrafficOnMultiplePorts( getAgentEnsemble(), kNumDataTrafficPorts, sendPacket); }; - auto verify = [=, this]() { verifySflowEgressPortNotStuck(); }; + auto verify = [=, this]() { + verifySflowEgressPortNotStuck(); + if (checkSameAndGetAsic()->isSupported( + HwAsic::Feature::EVENTOR_PORT_FOR_SFLOW)) { + validateEventorPortQueueLimitRespected(); + } + }; verifyAcrossWarmBoots(setup, verify); } @@ -603,6 +609,41 @@ class AgentSflowMirrorWithLineRateTrafficTest prevPortStats = curPortStats; } } + + void validateEventorPortQueueLimitRespected() { + auto config{initialConfig(*getAgentEnsemble())}; + uint32_t maxExpectedQueueLimitBytes{0}; + PortID eventorPortId; + for (auto& port : *config.ports()) { + if (*port.portType() == cfg::PortType::EVENTOR_PORT) { + auto voqConfigName = *port.portVoqConfigName(); + for (auto& voqConfig : config.portQueueConfigs()[voqConfigName]) { + // Set the expected queue limit bytes to be 15% higher than + // what we are configuring, as queue limit is not always + // respected accurately. + if (voqConfig.id() == 0) { + maxExpectedQueueLimitBytes = + *voqConfig.maxDynamicSharedBytes() * 1.15; + break; + } + } + eventorPortId = *port.logicalID(); + break; + } + } + EXPECT_GT(maxExpectedQueueLimitBytes, 0); + auto eventorSysPortId = getSystemPortID( + eventorPortId, + getProgrammedState(), + SwitchID(*checkSameAndGetAsic()->getSwitchId())); + WITH_RETRIES({ + auto latestStats = getLatestSysPortStats(eventorSysPortId); + auto watermarkBytes = latestStats.queueWatermarkBytes_()->at(0); + EXPECT_EVENTUALLY_GT(watermarkBytes, 0); + EXPECT_LT(watermarkBytes, maxExpectedQueueLimitBytes); + EXPECT_EVENTUALLY_GT(latestStats.queueOutDiscardBytes_()->at(0), 0); + }); + } }; using AgentSflowMirrorTestV4 = AgentSflowMirrorTest; From 458be3e482710c27e5d396b59360d29376bf9d87 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 13 Oct 2024 13:55:56 -0700 Subject: [PATCH 095/479] Add CPU qos policy to remove the limit on the TC->Q for data traffic Summary: Currently, there is no CPU queue policy present and the TC to queue mapping in PFC test is restrictive, remove the restriction by splitting CPU/recycle policy from data plane policy. Reviewed By: jasmeetbagga Differential Revision: D64136346 fbshipit-source-id: ca7c7e5eb40fe4641ecc06abfed45218ee783578 --- .../test/agent_hw_tests/AgentPfcTests.cpp | 4 +- .../agent_hw_tests/AgentTrafficPfcTests.cpp | 8 ++- fboss/agent/test/utils/BUCK | 2 +- fboss/agent/test/utils/PfcTestUtils.cpp | 62 ++++++++++++++----- fboss/agent/test/utils/PfcTestUtils.h | 4 +- 5 files changed, 58 insertions(+), 22 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentPfcTests.cpp b/fboss/agent/test/agent_hw_tests/AgentPfcTests.cpp index da08a1ff0432b..d510b78e2ee5a 100644 --- a/fboss/agent/test/agent_hw_tests/AgentPfcTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentPfcTests.cpp @@ -63,7 +63,7 @@ TEST_F(AgentPfcTest, verifyPfcCounters) { auto setup = [&]() { auto cfg = getAgentEnsemble()->getCurrentConfig(); - utility::setupPfcBuffers(cfg, portIds, losslessPgIds); + utility::setupPfcBuffers(getAgentEnsemble(), cfg, portIds, losslessPgIds); applyNewConfig(cfg); for (auto portId : portIds) { @@ -116,7 +116,7 @@ TEST_F(AgentPfcTest, verifyPfcLoopback) { auto setup = [&]() { auto cfg = getAgentEnsemble()->getCurrentConfig(); - utility::setupPfcBuffers(cfg, portIds, losslessPgIds); + utility::setupPfcBuffers(getAgentEnsemble(), cfg, portIds, losslessPgIds); utility::addPuntPfcPacketAcl( cfg, utility::getCoppMidPriQueueId(getAgentEnsemble()->getL3Asics())); applyNewConfig(cfg); diff --git a/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp b/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp index a96667aa748e1..c5b64882ab696 100644 --- a/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp @@ -370,6 +370,7 @@ class AgentTrafficPfcTest : public AgentHwTest { portIdsToConfigure = masterLogicalInterfacePortIds(); } utility::setupPfcBuffers( + getAgentEnsemble(), cfg, portIdsToConfigure, kLosslessPgIds, @@ -507,7 +508,12 @@ class AgentTrafficPfcWatchdogTest : public AgentTrafficPfcTest { void setupConfigAndEcmpTraffic(const std::vector& portIds) { cfg::SwitchConfig cfg = getAgentEnsemble()->getCurrentConfig(); utility::setupPfcBuffers( - cfg, portIds, kLosslessPgIds, {}, PfcBufferParams{}); + getAgentEnsemble(), + cfg, + portIds, + kLosslessPgIds, + {}, + PfcBufferParams{}); applyNewConfig(cfg); setupEcmpTraffic(portIds); } diff --git a/fboss/agent/test/utils/BUCK b/fboss/agent/test/utils/BUCK index 3dbd006135946..92e4b2a918868 100644 --- a/fboss/agent/test/utils/BUCK +++ b/fboss/agent/test/utils/BUCK @@ -451,10 +451,10 @@ cpp_library( exported_deps = [ "fbsource//third-party/googletest:gtest", ":acl_test_utils", - "//fboss/agent:fboss-types", "//fboss/agent:switch_config-cpp2-types", "//fboss/agent:utils", "//fboss/agent/hw:hardware_stats-cpp2-types", + "//fboss/agent/test:agent_hw_test", ], ) diff --git a/fboss/agent/test/utils/PfcTestUtils.cpp b/fboss/agent/test/utils/PfcTestUtils.cpp index 281928f014fba..737d764f736f3 100644 --- a/fboss/agent/test/utils/PfcTestUtils.cpp +++ b/fboss/agent/test/utils/PfcTestUtils.cpp @@ -16,6 +16,7 @@ static const std::vector kLossyPgIds{0}; void setupQosMapForPfc( cfg::QosMap& qosMap, + bool isCpuQosMap, const std::map& tc2PgOverride = {}) { // update pfc maps std::map tc2PgId; @@ -25,10 +26,14 @@ void setupQosMapForPfc( // program defaults for (auto i = 0; i < 8; i++) { tc2PgId.emplace(i, i); - // Jericho3 cpu/recycle port only has 2 egress queues. Tomahawk has more - // queues, but we stick to the lowest common denominator here. - // See https://fburl.com/gdoc/nyyg1cve and https://fburl.com/code/mhdeuiky - tc2QueueId.emplace(i, i < 7 ? 0 : 1); + if (isCpuQosMap) { + // Jericho3 cpu/recycle port only has 2 egress queues. Tomahawk has more + // queues, but we stick to the lowest common denominator here. + // See https://fburl.com/gdoc/nyyg1cve and https://fburl.com/code/mhdeuiky + tc2QueueId.emplace(i, i < 7 ? 0 : 1); + } else { + tc2QueueId.emplace(i, i); + } pfcPri2PgId.emplace(i, i); pfcPri2QueueId.emplace(i, i); } @@ -51,6 +56,7 @@ void setupQosMapForPfc( } void setupPfc( + facebook::fboss::AgentEnsemble* ensemble, cfg::SwitchConfig& cfg, const std::vector& ports, const std::map& tcToPgOverride) { @@ -59,18 +65,6 @@ void setupPfc( pfc.rx() = true; pfc.portPgConfigName() = "foo"; - cfg::QosMap qosMap; - // setup qos map with pfc structs - setupQosMapForPfc(qosMap, tcToPgOverride); - - // setup qosPolicy - cfg.qosPolicies()->resize(1); - cfg.qosPolicies()[0].name() = "qp"; - cfg.qosPolicies()[0].qosMap() = std::move(qosMap); - cfg::TrafficPolicyConfig dataPlaneTrafficPolicy; - dataPlaneTrafficPolicy.defaultQosPolicy() = "qp"; - cfg.dataPlaneTrafficPolicy() = std::move(dataPlaneTrafficPolicy); - for (const auto& portID : ports) { auto portCfg = std::find_if( cfg.ports()->begin(), cfg.ports()->end(), [&portID](auto& port) { @@ -78,6 +72,39 @@ void setupPfc( }); portCfg->pfc() = pfc; } + + // setup qosPolicy + auto setupQosPolicy = [&](bool isCpuQosMap, const std::string& name) { + cfg::QosMap qosMap; + setupQosMapForPfc(qosMap, isCpuQosMap, tcToPgOverride); + auto qosPolicy = cfg::QosPolicy(); + *qosPolicy.name() = name; + qosPolicy.qosMap() = std::move(qosMap); + cfg.qosPolicies()->push_back(qosPolicy); + cfg::TrafficPolicyConfig trafficPolicy; + trafficPolicy.defaultQosPolicy() = name; + return trafficPolicy; + }; + auto dataTrafficPolicy = setupQosPolicy(false /*isCpuQosMap*/, "qp"); + if (ensemble->getHwAsicTable() + ->getHwAsics() + .cbegin() + ->second->getSwitchType() == cfg::SwitchType::VOQ) { + cfg::CPUTrafficPolicyConfig cpuPolicy; + const std::string kCpuQueueingPolicy{"cpuQp"}; + cpuPolicy.trafficPolicy() = + setupQosPolicy(true /*isCpuQosMap*/, kCpuQueueingPolicy); + cfg.cpuTrafficPolicy() = std::move(cpuPolicy); + std::map portIdToQosPolicy{}; + for (const auto& portId : ensemble->masterLogicalPortIds( + {cfg::PortType::CPU_PORT, cfg::PortType::RECYCLE_PORT})) { + portIdToQosPolicy[static_cast(portId)] = kCpuQueueingPolicy; + } + if (portIdToQosPolicy.size()) { + dataTrafficPolicy.portIdToQosPolicy() = std::move(portIdToQosPolicy); + } + } + cfg.dataPlaneTrafficPolicy() = dataTrafficPolicy; } void setupBufferPoolConfig( @@ -149,12 +176,13 @@ void setupPortPgConfig( } // namespace void setupPfcBuffers( + facebook::fboss::AgentEnsemble* ensemble, cfg::SwitchConfig& cfg, const std::vector& ports, const std::vector& losslessPgIds, const std::map& tcToPgOverride, PfcBufferParams buffer) { - setupPfc(cfg, ports, tcToPgOverride); + setupPfc(ensemble, cfg, ports, tcToPgOverride); std::map> portPgConfigMap; setupPortPgConfig( diff --git a/fboss/agent/test/utils/PfcTestUtils.h b/fboss/agent/test/utils/PfcTestUtils.h index 5ebabb23041e1..dbbbcb19b2ab2 100644 --- a/fboss/agent/test/utils/PfcTestUtils.h +++ b/fboss/agent/test/utils/PfcTestUtils.h @@ -2,9 +2,10 @@ #pragma once +#include "fboss/agent/Utils.h" #include "fboss/agent/gen-cpp2/switch_config_types.h" #include "fboss/agent/hw/gen-cpp2/hardware_stats_types.h" -#include "fboss/agent/types.h" +#include "fboss/agent/test/AgentHwTest.h" namespace facebook::fboss::utility { @@ -19,6 +20,7 @@ struct PfcBufferParams { }; void setupPfcBuffers( + facebook::fboss::AgentEnsemble* ensemble, cfg::SwitchConfig& cfg, const std::vector& ports, const std::vector& losslessPgIds, From 4a239b465d342b03ee2c2110c57e0fa6a527bf71 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 13 Oct 2024 13:55:56 -0700 Subject: [PATCH 096/479] Add an option to specify the traffic rate to expect on ports Summary: In some test cases, we cannot expect line rate traffic on ports when PFC is enabled etc., hence be able to specify a percentage line rate to expect on port after creating a traffic loop. Reviewed By: maxwindiff Differential Revision: D64136347 fbshipit-source-id: cf2d7fe9e07101747a738b17f8751a61751cf0fa --- .../agent/test/utils/MultiPortTrafficTestUtils.cpp | 14 ++++++++++---- fboss/agent/test/utils/MultiPortTrafficTestUtils.h | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp b/fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp index bf6001aafbed2..43ab5f63e1037 100644 --- a/fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp +++ b/fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp @@ -11,7 +11,7 @@ std::vector getOneRemoteHostIpPerInterfacePort( std::vector ips; for (int idx = 1; idx <= ensemble->masterLogicalInterfacePortIds().size(); idx++) { - ips.push_back(folly::IPAddressV6(folly::to(2401, "::", idx))); + ips.push_back(folly::IPAddressV6(folly::to("2401::", idx))); } return ips; } @@ -53,7 +53,8 @@ void createTrafficOnMultiplePorts( int numberOfPorts, std::function sendPacketFn) { + const folly::IPAddressV6&)> sendPacketFn, + double desiredPctLineRate) { auto minPktsForLineRate = ensemble->getMinPktsForLineRate( ensemble->masterLogicalInterfacePortIds()[0]); auto hostIps = getOneRemoteHostIpPerInterfacePort(ensemble); @@ -64,8 +65,13 @@ void createTrafficOnMultiplePorts( } // Now, make sure that we have line rate traffic on these ports! for (int idx = 0; idx < numberOfPorts; idx++) { - ensemble->waitForLineRateOnPort( - ensemble->masterLogicalInterfacePortIds()[idx]); + auto portId = ensemble->masterLogicalInterfacePortIds()[idx]; + uint64_t desiredRate = static_cast(ensemble->getProgrammedState() + ->getPorts() + ->getNodeIf(portId) + ->getSpeed()) * + 1000 * 1000 * desiredPctLineRate / 100; + ensemble->waitForSpecificRateOnPort(portId, desiredRate); } } diff --git a/fboss/agent/test/utils/MultiPortTrafficTestUtils.h b/fboss/agent/test/utils/MultiPortTrafficTestUtils.h index 72ee1ddf57db0..3fa25fc26ce28 100644 --- a/fboss/agent/test/utils/MultiPortTrafficTestUtils.h +++ b/fboss/agent/test/utils/MultiPortTrafficTestUtils.h @@ -13,5 +13,6 @@ void createTrafficOnMultiplePorts( int numberOfPorts, std::function sendPacketFn); + const folly::IPAddressV6&)> sendPacketFn, + double desiredPctLineRate = 100); } // namespace facebook::fboss::utility From 8e74f5a1107c5e0c0d915c3582cc233ec6b8c072 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 13 Oct 2024 13:55:56 -0700 Subject: [PATCH 097/479] Use lossless PGs and PFC settings along with sflow Summary: Use PFC config along with sflow configs to recreate CS00012365464. Reviewed By: maxwindiff Differential Revision: D64136345 fbshipit-source-id: 7da455ad1ff53402ba8508ca82ba3d51952d673a --- .../agent_hw_tests/AgentSflowMirrorTest.cpp | 43 ++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp index 91ac02725a2f4..deb1c8185c1f8 100644 --- a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp @@ -21,6 +21,7 @@ #include "fboss/agent/test/utils/MultiPortTrafficTestUtils.h" #include "fboss/agent/test/utils/OlympicTestUtils.h" #include "fboss/agent/test/utils/PacketSnooper.h" +#include "fboss/agent/test/utils/PfcTestUtils.h" #include "fboss/agent/test/utils/QosTestUtils.h" #include "fboss/lib/CommonUtils.h" @@ -538,18 +539,38 @@ class AgentSflowMirrorOnTrunkTest : public AgentSflowMirrorTruncateTest { class AgentSflowMirrorWithLineRateTrafficTest : public AgentSflowMirrorTest { public: + static const int kLosslessPriority{2}; void testSflowEgressCongestion() { - constexpr int kNumDataTrafficPorts{4}; + constexpr int kNumDataTrafficPorts{6}; auto setup = [=, this]() { + auto allPorts = masterLogicalInterfacePortIds(); + std::vector portIds( + allPorts.begin(), allPorts.begin() + kNumDataTrafficPorts); + std::vector losslessPgIds = {kLosslessPriority}; auto config = initialConfig(*getAgentEnsemble()); // Configure 1:1 sampling to ensure high rate on mirror egress port configSampling(config, 1); + // PFC buffer configurations to ensure we have lossless traffic + const std::map tcToPgOverride{}; + const utility::PfcBufferParams bufferParams{ + .scalingFactor = cfg::MMUScalingFactor::ONE}; + utility::setupPfcBuffers( + getAgentEnsemble(), + config, + portIds, + losslessPgIds, + tcToPgOverride, + bufferParams); + // Make sure that traffic is going to loop for ever! utility::setTTLZeroCpuConfig(getAgentEnsemble()->getL3Asics(), config); applyNewConfig(config); resolveRouteForMirrorDestination(); utility::setupEcmpDataplaneLoopOnAllPorts(getAgentEnsemble()); utility::createTrafficOnMultiplePorts( - getAgentEnsemble(), kNumDataTrafficPorts, sendPacket); + getAgentEnsemble(), + kNumDataTrafficPorts, + sendPacket, + 50 /*desiredPctLineRate*/); }; auto verify = [=, this]() { verifySflowEgressPortNotStuck(); @@ -579,26 +600,26 @@ class AgentSflowMirrorWithLineRateTrafficTest dstIp, 8000, // l4 src port 8001, // l4 dst port - 0x24 << 2, // dscp + kLosslessPriority * 8 << 2, // dscp for lossless traffic 255, // hopLimit - std::vector(1024)); + std::vector(4500)); // Forward the packet in the pipeline ensemble->getSw()->sendPacketSwitchedAsync(std::move(txPacket)); } void verifySflowEgressPortNotStuck() { auto portId = getNonSflowSampledInterfacePorts(); - EXPECT_NO_THROW(getAgentEnsemble()->waitForLineRateOnPort(portId)); + // Check if stay above 90% of line rate + auto desiredRate = + static_cast( + getProgrammedState()->getPorts()->getNodeIf(portId)->getSpeed()) * + 1000 * 1000 * 0.9; + EXPECT_NO_THROW( + getAgentEnsemble()->waitForSpecificRateOnPort(portId, desiredRate)); // Make sure that we can sustain the rate for longer duration constexpr int kNumberOfIterations{6}; constexpr int kWaitPeriod{5}; auto prevPortStats = getLatestPortStats(portId); - // Keep desired rate 2% lesser than line rate to allow for - // fluctuations. - auto desiredRate = - static_cast( - getProgrammedState()->getPorts()->getNodeIf(portId)->getSpeed()) * - 1000 * 1000 * 0.98; for (int iter = 0; iter < kNumberOfIterations; iter++) { sleep(kWaitPeriod); auto curPortStats = getLatestPortStats(portId); From 10c188c338d4f12a685914471cb0ee25313121ab Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 13 Oct 2024 13:55:56 -0700 Subject: [PATCH 098/479] Modify sflow line rate test to enable mirror after traffic start Summary: Modify the test flow to apply mirror config after starting traffic so that we simulate a burst towards egress ports resulting in eventor getting into a stuck state. Reviewed By: jasmeetbagga Differential Revision: D64251314 fbshipit-source-id: cc4f8b89aad03fc6bd4e60ccd86db1ee4ae0f811 --- .../agent_hw_tests/AgentSflowMirrorTest.cpp | 34 ++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp index deb1c8185c1f8..8e325d50a9803 100644 --- a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp @@ -45,25 +45,32 @@ class AgentSflowMirrorTest : public AgentHwTest { } } - cfg::SwitchConfig initialConfig( - const AgentEnsemble& ensemble) const override { + cfg::SwitchConfig baseConfig(const AgentEnsemble& ensemble, bool enableMirror) + const { auto cfg = utility::onePortPerInterfaceConfig( ensemble.getSw(), ensemble.masterLogicalPortIds(), true /*interfaceHasSubnet*/); + if (enableMirror) { + this->configureMirror(cfg); + } auto port0 = ensemble.masterLogicalPortIds()[0]; auto port0Switch = ensemble.getSw()->getScopeResolver()->scope(port0).switchId(); auto asic = ensemble.getSw()->getHwAsicTable()->getHwAsic(port0Switch); auto ports = getPortsForSampling(ensemble.masterLogicalPortIds(), asic); - this->configureMirror(cfg); if (asic->isSupported(HwAsic::Feature::EVENTOR_PORT_FOR_SFLOW)) { utility::addEventorVoqConfig(&cfg, cfg::StreamType::UNICAST); } return cfg; } + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { + return baseConfig(ensemble, true /* enableMirror */); + } + void configureMirror(cfg::SwitchConfig& cfg, bool v4) const { utility::configureSflowMirror( cfg, kSflowMirror, false, utility::getSflowMirrorDestination(v4).str()); @@ -540,16 +547,18 @@ class AgentSflowMirrorWithLineRateTrafficTest : public AgentSflowMirrorTest { public: static const int kLosslessPriority{2}; + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { + return baseConfig(ensemble, false /* enableMirror */); + } void testSflowEgressCongestion() { constexpr int kNumDataTrafficPorts{6}; - auto setup = [=, this]() { + auto baseSetup = [=, this]() { auto allPorts = masterLogicalInterfacePortIds(); std::vector portIds( allPorts.begin(), allPorts.begin() + kNumDataTrafficPorts); std::vector losslessPgIds = {kLosslessPriority}; auto config = initialConfig(*getAgentEnsemble()); - // Configure 1:1 sampling to ensure high rate on mirror egress port - configSampling(config, 1); // PFC buffer configurations to ensure we have lossless traffic const std::map tcToPgOverride{}; const utility::PfcBufferParams bufferParams{ @@ -563,14 +572,23 @@ class AgentSflowMirrorWithLineRateTrafficTest bufferParams); // Make sure that traffic is going to loop for ever! utility::setTTLZeroCpuConfig(getAgentEnsemble()->getL3Asics(), config); - applyNewConfig(config); - resolveRouteForMirrorDestination(); + return config; + }; + auto setup = [=, this]() { + applyNewConfig(baseSetup()); utility::setupEcmpDataplaneLoopOnAllPorts(getAgentEnsemble()); utility::createTrafficOnMultiplePorts( getAgentEnsemble(), kNumDataTrafficPorts, sendPacket, 50 /*desiredPctLineRate*/); + // Now that we have line rate traffic, enable mirror + auto config = baseSetup(); + this->configureMirror(config, false); + // Configure 1:1 sampling to ensure high rate on mirror egress port + configSampling(config, 1); + applyNewConfig(config); + resolveRouteForMirrorDestination(); }; auto verify = [=, this]() { verifySflowEgressPortNotStuck(); From c787acaadd3e5202dd1f3b791133f0774185e474 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Mon, 14 Oct 2024 00:23:37 -0700 Subject: [PATCH 099/479] Add SAI TAM Transport API, Fakes, Tracer Summary: Add SAI TAM transport API, Fakes and Tracer integration. Reviewed By: nivinl Differential Revision: D64122408 fbshipit-source-id: d7d9b38a66847af327c66184c4ba3a5c96638bab --- fboss/agent/hw/sai/api/TamApi.h | 54 ++++++++++ fboss/agent/hw/sai/api/Types.h | 1 + fboss/agent/hw/sai/api/tests/TamApiTest.cpp | 21 ++++ fboss/agent/hw/sai/fake/FakeSai.cpp | 1 + fboss/agent/hw/sai/fake/FakeSai.h | 3 +- fboss/agent/hw/sai/fake/FakeSaiObject.cpp | 9 ++ fboss/agent/hw/sai/fake/FakeSaiTam.cpp | 112 ++++++++++++++++++++ fboss/agent/hw/sai/fake/FakeSaiTam.h | 20 ++++ fboss/agent/hw/sai/tracer/SaiTracer.cpp | 4 + fboss/agent/hw/sai/tracer/SaiTracer.h | 2 + fboss/agent/hw/sai/tracer/TamApiTracer.cpp | 18 ++++ fboss/agent/hw/sai/tracer/TamApiTracer.h | 1 + 12 files changed, 245 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/api/TamApi.h b/fboss/agent/hw/sai/api/TamApi.h index 2cd0edd816b17..20ab76efd4f56 100644 --- a/fboss/agent/hw/sai/api/TamApi.h +++ b/fboss/agent/hw/sai/api/TamApi.h @@ -16,6 +16,36 @@ namespace facebook::fboss { class TamApi; +struct SaiTamTransportTraits { + static constexpr sai_object_type_t ObjectType = SAI_OBJECT_TYPE_TAM_TRANSPORT; + using SaiApiT = TamApi; + struct Attributes { + using EnumType = sai_tam_transport_attr_t; + using Type = SaiAttribute< + EnumType, + SAI_TAM_TRANSPORT_ATTR_TRANSPORT_TYPE, + sai_int32_t>; + using SrcPort = + SaiAttribute; + using DstPort = + SaiAttribute; + using Mtu = + SaiAttribute; + }; + using AdapterKey = TamTransportSaiId; + using AdapterHostKey = std::tuple< + Attributes::Type, + Attributes::SrcPort, + Attributes::DstPort, + Attributes::Mtu>; + using CreateAttributes = AdapterHostKey; +}; + +SAI_ATTRIBUTE_NAME(TamTransport, Type) +SAI_ATTRIBUTE_NAME(TamTransport, SrcPort) +SAI_ATTRIBUTE_NAME(TamTransport, DstPort) +SAI_ATTRIBUTE_NAME(TamTransport, Mtu) + struct SaiTamReportTraits { static constexpr sai_object_type_t ObjectType = SAI_OBJECT_TYPE_TAM_REPORT; using SaiApiT = TamApi; @@ -212,6 +242,30 @@ class TamApi : public SaiApi { return api_->set_tam_report_attribute(id, attr); } + // TAM Transport + sai_status_t _create( + TamTransportSaiId* id, + sai_object_id_t switch_id, + size_t count, + sai_attribute_t* attr_list) const { + return api_->create_tam_transport( + rawSaiId(id), switch_id, count, attr_list); + } + + sai_status_t _remove(TamTransportSaiId id) const { + return api_->remove_tam_transport(id); + } + + sai_status_t _getAttribute(TamTransportSaiId id, sai_attribute_t* attr) + const { + return api_->get_tam_transport_attribute(id, 1, attr); + } + + sai_status_t _setAttribute(TamTransportSaiId id, const sai_attribute_t* attr) + const { + return api_->set_tam_transport_attribute(id, attr); + } + sai_tam_api_t* api_; friend class SaiApi; }; diff --git a/fboss/agent/hw/sai/api/Types.h b/fboss/agent/hw/sai/api/Types.h index 17276b7524311..d29d6715fae42 100644 --- a/fboss/agent/hw/sai/api/Types.h +++ b/fboss/agent/hw/sai/api/Types.h @@ -58,6 +58,7 @@ FBOSS_STRONG_TYPE(sai_object_id_t, VirtualRouterSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, VlanSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, VlanMemberSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, WredSaiId); +FBOSS_STRONG_TYPE(sai_object_id_t, TamTransportSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamReportSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamEventActionSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamEventSaiId); diff --git a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp index d4a0a54fb52d3..bbbe158d64c0d 100644 --- a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp @@ -24,6 +24,27 @@ class TamApiTest : public ::testing::Test { std::unique_ptr tamApi; }; +TEST_F(TamApiTest, TamTransport) { + SaiTamTransportTraits::CreateAttributes transportAttr; + std::get(transportAttr) = + SAI_TAM_TRANSPORT_TYPE_UDP; + std::get(transportAttr) = 10001; + std::get(transportAttr) = 10002; + std::get(transportAttr) = 1500; + + auto transportSaiId = + tamApi->create(transportAttr, switchId); + EXPECT_EQ( + tamApi->getAttribute( + transportSaiId, SaiTamTransportTraits::CreateAttributes{}), + transportAttr); + tamApi->remove(transportSaiId); + EXPECT_THROW( + tamApi->getAttribute( + transportSaiId, SaiTamTransportTraits::CreateAttributes{}), + std::exception); +} + TEST_F(TamApiTest, TamReport) { SaiTamReportTraits::CreateAttributes reportAttr; // for call back diff --git a/fboss/agent/hw/sai/fake/FakeSai.cpp b/fboss/agent/hw/sai/fake/FakeSai.cpp index e6315c3acc735..f1cdf1f7bec00 100644 --- a/fboss/agent/hw/sai/fake/FakeSai.cpp +++ b/fboss/agent/hw/sai/fake/FakeSai.cpp @@ -64,6 +64,7 @@ void FakeSai::clear() { fs->tamEventManager.clear(); fs->tamEventActionManager.clear(); fs->tamReportManager.clear(); + fs->tamTransportManager.clear(); fs->tunnelManager.clear(); fs->tunnelTermManager.clear(); fs->systemPortManager.clear(); diff --git a/fboss/agent/hw/sai/fake/FakeSai.h b/fboss/agent/hw/sai/fake/FakeSai.h index c2ed68b671b3a..6c63c5a84a40d 100644 --- a/fboss/agent/hw/sai/fake/FakeSai.h +++ b/fboss/agent/hw/sai/fake/FakeSai.h @@ -97,9 +97,10 @@ struct FakeSai { FakeTamManager tamManager; FakeTamEventManager tamEventManager; FakeTamEventActionManager tamEventActionManager; + FakeTamReportManager tamReportManager; + FakeTamTransportManager tamTransportManager; FakeTunnelManager tunnelManager; FakeTunnelTermManager tunnelTermManager; - FakeTamReportManager tamReportManager; FakeMacsecManager macsecManager; FakeMacsecPortManager macsecPortManager; FakeMacsecSAManager macsecSAManager; diff --git a/fboss/agent/hw/sai/fake/FakeSaiObject.cpp b/fboss/agent/hw/sai/fake/FakeSaiObject.cpp index b3c46cb552f37..9dde228e6eb50 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiObject.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiObject.cpp @@ -149,6 +149,9 @@ sai_status_t sai_get_object_count( case SAI_OBJECT_TYPE_WRED: *count = fs->wredManager.map().size(); break; + case SAI_OBJECT_TYPE_TAM_TRANSPORT: + *count = fs->tamTransportManager.map().size(); + break; case SAI_OBJECT_TYPE_TAM_REPORT: *count = fs->tamReportManager.map().size(); break; @@ -482,6 +485,12 @@ sai_status_t sai_get_object_key( } break; } + case SAI_OBJECT_TYPE_TAM_TRANSPORT: { + for (const auto& ob : fs->tamTransportManager.map()) { + object_list[i++].key.object_id = ob.second.id; + } + break; + } case SAI_OBJECT_TYPE_TAM_REPORT: { for (const auto& ob : fs->tamReportManager.map()) { object_list[i++].key.object_id = ob.second.id; diff --git a/fboss/agent/hw/sai/fake/FakeSaiTam.cpp b/fboss/agent/hw/sai/fake/FakeSaiTam.cpp index 60139f06b7d50..4c984f1cf8391 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiTam.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiTam.cpp @@ -396,6 +396,113 @@ sai_status_t set_tam_report_attribute( } return SAI_STATUS_SUCCESS; } + +sai_status_t create_tam_transport( + sai_object_id_t* id, + sai_object_id_t /*switch_id*/, + uint32_t attr_count, + const sai_attribute_t* attr_list) { + sai_int32_t transportType{}; + sai_uint32_t srcPort{}; + sai_uint32_t dstPort{}; + sai_uint32_t mtu{}; + + for (auto i = 0; i < attr_count; i++) { + switch (attr_list[i].id) { + case SAI_TAM_TRANSPORT_ATTR_TRANSPORT_TYPE: + transportType = attr_list[i].value.s32; + break; + + case SAI_TAM_TRANSPORT_ATTR_SRC_PORT: + srcPort = attr_list[i].value.u32; + break; + + case SAI_TAM_TRANSPORT_ATTR_DST_PORT: + dstPort = attr_list[i].value.u32; + break; + + case SAI_TAM_TRANSPORT_ATTR_MTU: + mtu = attr_list[i].value.u32; + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; + } + } + auto fs = FakeSai::getInstance(); + *id = fs->tamTransportManager.create(transportType, srcPort, dstPort, mtu); + return SAI_STATUS_SUCCESS; +} + +sai_status_t remove_tam_transport(sai_object_id_t id) { + auto fs = FakeSai::getInstance(); + fs->tamTransportManager.remove(id); + return SAI_STATUS_SUCCESS; +} + +sai_status_t get_tam_transport_attribute( + sai_object_id_t id, + uint32_t attr_count, + sai_attribute_t* attr_list) { + auto fs = FakeSai::getInstance(); + auto& transport = fs->tamTransportManager.get(id); + for (auto i = 0; i < attr_count; i++) { + switch (attr_list[i].id) { + case SAI_TAM_TRANSPORT_ATTR_TRANSPORT_TYPE: + attr_list[i].value.s32 = transport.transportType_; + break; + + case SAI_TAM_TRANSPORT_ATTR_SRC_PORT: + attr_list[i].value.u32 = transport.srcPort_; + break; + + case SAI_TAM_TRANSPORT_ATTR_DST_PORT: + attr_list[i].value.u32 = transport.dstPort_; + break; + + case SAI_TAM_TRANSPORT_ATTR_MTU: + attr_list[i].value.u32 = transport.mtu_; + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; + } + } + return SAI_STATUS_SUCCESS; +} + +sai_status_t set_tam_transport_attribute( + sai_object_id_t id, + const sai_attribute_t* attr) { + try { + auto fs = FakeSai::getInstance(); + auto& transport = fs->tamTransportManager.get(id); + switch (attr->id) { + case SAI_TAM_TRANSPORT_ATTR_TRANSPORT_TYPE: + transport.transportType_ = attr->value.s32; + break; + + case SAI_TAM_TRANSPORT_ATTR_SRC_PORT: + transport.srcPort_ = attr->value.u32; + break; + + case SAI_TAM_TRANSPORT_ATTR_DST_PORT: + transport.dstPort_ = attr->value.u32; + break; + + case SAI_TAM_TRANSPORT_ATTR_MTU: + transport.mtu_ = attr->value.u32; + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0; + } + } catch (...) { + return SAI_STATUS_ITEM_NOT_FOUND; + } + return SAI_STATUS_SUCCESS; +} + } // namespace namespace facebook::fboss { @@ -422,6 +529,11 @@ void populate_tam_api(sai_tam_api_t** tam_api) { _tam_api.set_tam_report_attribute = &set_tam_report_attribute; _tam_api.get_tam_report_attribute = &get_tam_report_attribute; + _tam_api.create_tam_transport = &create_tam_transport; + _tam_api.remove_tam_transport = &remove_tam_transport; + _tam_api.set_tam_transport_attribute = &set_tam_transport_attribute; + _tam_api.get_tam_transport_attribute = &get_tam_transport_attribute; + *tam_api = &_tam_api; } diff --git a/fboss/agent/hw/sai/fake/FakeSaiTam.h b/fboss/agent/hw/sai/fake/FakeSaiTam.h index 5149fe37bbe34..29a06d8eb0b1e 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiTam.h +++ b/fboss/agent/hw/sai/fake/FakeSaiTam.h @@ -54,11 +54,31 @@ class FakeSaiTamReport { sai_int32_t type_; }; +class FakeSaiTamTransport { + public: + FakeSaiTamTransport( + sai_int32_t transportType, + sai_uint32_t srcPort, + sai_uint32_t dstPort, + sai_uint32_t mtu) + : transportType_(transportType), + srcPort_(srcPort), + dstPort_(dstPort), + mtu_(mtu) {} + sai_object_id_t id; + sai_int32_t transportType_; + sai_uint32_t srcPort_; + sai_uint32_t dstPort_; + sai_uint32_t mtu_; +}; + using FakeTamManager = FakeManager; using FakeTamEventManager = FakeManager; using FakeTamEventActionManager = FakeManager; using FakeTamReportManager = FakeManager; +using FakeTamTransportManager = + FakeManager; void populate_tam_api(sai_tam_api_t** tam_api); diff --git a/fboss/agent/hw/sai/tracer/SaiTracer.cpp b/fboss/agent/hw/sai/tracer/SaiTracer.cpp index 1c323c308e610..8f924b138f0cc 100644 --- a/fboss/agent/hw/sai/tracer/SaiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/SaiTracer.cpp @@ -1475,6 +1475,9 @@ vector SaiTracer::setAttrList( case SAI_OBJECT_TYPE_TAM_REPORT: setTamReportAttributes(attr_list, attr_count, attrLines, rv); break; + case SAI_OBJECT_TYPE_TAM_TRANSPORT: + setTamTransportAttributes(attr_list, attr_count, attrLines, rv); + break; case SAI_OBJECT_TYPE_TUNNEL: setTunnelAttributes(attr_list, attr_count, attrLines, rv); break; @@ -1836,6 +1839,7 @@ void SaiTracer::initVarCounts() { varCounts_.emplace(SAI_OBJECT_TYPE_SCHEDULER_GROUP, 0); varCounts_.emplace(SAI_OBJECT_TYPE_SWITCH, 0); varCounts_.emplace(SAI_OBJECT_TYPE_SYSTEM_PORT, 0); + varCounts_.emplace(SAI_OBJECT_TYPE_TAM_TRANSPORT, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM_REPORT, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM_EVENT_ACTION, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM_EVENT, 0); diff --git a/fboss/agent/hw/sai/tracer/SaiTracer.h b/fboss/agent/hw/sai/tracer/SaiTracer.h index c149fb27691e7..f3aef747623a3 100644 --- a/fboss/agent/hw/sai/tracer/SaiTracer.h +++ b/fboss/agent/hw/sai/tracer/SaiTracer.h @@ -408,6 +408,7 @@ class SaiTracer { {SAI_OBJECT_TYPE_SCHEDULER_GROUP, "schedulerGroup_"}, {SAI_OBJECT_TYPE_SWITCH, "switch_"}, {SAI_OBJECT_TYPE_SYSTEM_PORT, "systemPort_"}, + {SAI_OBJECT_TYPE_TAM_TRANSPORT, "tamTransport_"}, {SAI_OBJECT_TYPE_TAM_REPORT, "tamReport_"}, {SAI_OBJECT_TYPE_TAM_EVENT_ACTION, "tamEventAction_"}, {SAI_OBJECT_TYPE_TAM_EVENT, "tamEvent_"}, @@ -471,6 +472,7 @@ class SaiTracer { {SAI_OBJECT_TYPE_SCHEDULER_GROUP, "scheduler_group_api->"}, {SAI_OBJECT_TYPE_SWITCH, "switch_api->"}, {SAI_OBJECT_TYPE_SYSTEM_PORT, "system_port_api->"}, + {SAI_OBJECT_TYPE_TAM_TRANSPORT, "tam_api->"}, {SAI_OBJECT_TYPE_TAM_REPORT, "tam_api->"}, {SAI_OBJECT_TYPE_TAM_EVENT_ACTION, "tam_api->"}, {SAI_OBJECT_TYPE_TAM_EVENT, "tam_api->"}, diff --git a/fboss/agent/hw/sai/tracer/TamApiTracer.cpp b/fboss/agent/hw/sai/tracer/TamApiTracer.cpp index b6ead428a1ef6..47693fb33bb58 100644 --- a/fboss/agent/hw/sai/tracer/TamApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/TamApiTracer.cpp @@ -37,6 +37,13 @@ std::map> _TamReportMap{ SAI_ATTR_MAP(TamReport, Type), }; +std::map> _TamTransportMap{ + SAI_ATTR_MAP(TamTransport, Type), + SAI_ATTR_MAP(TamTransport, SrcPort), + SAI_ATTR_MAP(TamTransport, DstPort), + SAI_ATTR_MAP(TamTransport, Mtu), +}; + void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(TamEvent, SwitchEventType) SAI_EXT_ATTR_MAP(TamEvent, SwitchEventId) @@ -66,6 +73,11 @@ WRAP_REMOVE_FUNC(tam_report, SAI_OBJECT_TYPE_TAM_REPORT, tam); WRAP_SET_ATTR_FUNC(tam_report, SAI_OBJECT_TYPE_TAM_REPORT, tam); WRAP_GET_ATTR_FUNC(tam_report, SAI_OBJECT_TYPE_TAM_REPORT, tam); +WRAP_CREATE_FUNC(tam_transport, SAI_OBJECT_TYPE_TAM_TRANSPORT, tam); +WRAP_REMOVE_FUNC(tam_transport, SAI_OBJECT_TYPE_TAM_TRANSPORT, tam); +WRAP_SET_ATTR_FUNC(tam_transport, SAI_OBJECT_TYPE_TAM_TRANSPORT, tam); +WRAP_GET_ATTR_FUNC(tam_transport, SAI_OBJECT_TYPE_TAM_TRANSPORT, tam); + sai_tam_api_t* wrappedTamApi() { handleExtensionAttributes(); static sai_tam_api_t tamWrappers; @@ -91,6 +103,11 @@ sai_tam_api_t* wrappedTamApi() { tamWrappers.set_tam_report_attribute = &wrap_set_tam_report_attribute; tamWrappers.get_tam_report_attribute = &wrap_get_tam_report_attribute; + tamWrappers.create_tam_transport = &wrap_create_tam_transport; + tamWrappers.remove_tam_transport = &wrap_remove_tam_transport; + tamWrappers.set_tam_transport_attribute = &wrap_set_tam_transport_attribute; + tamWrappers.get_tam_transport_attribute = &wrap_get_tam_transport_attribute; + return &tamWrappers; } @@ -98,5 +115,6 @@ SET_SAI_ATTRIBUTES(Tam) SET_SAI_ATTRIBUTES(TamEvent) SET_SAI_ATTRIBUTES(TamEventAction) SET_SAI_ATTRIBUTES(TamReport) +SET_SAI_ATTRIBUTES(TamTransport) } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/tracer/TamApiTracer.h b/fboss/agent/hw/sai/tracer/TamApiTracer.h index 996adb666a108..8b67e99b8d48c 100644 --- a/fboss/agent/hw/sai/tracer/TamApiTracer.h +++ b/fboss/agent/hw/sai/tracer/TamApiTracer.h @@ -12,5 +12,6 @@ SET_ATTRIBUTE_FUNC_DECLARATION(Tam); SET_ATTRIBUTE_FUNC_DECLARATION(TamEvent); SET_ATTRIBUTE_FUNC_DECLARATION(TamEventAction); SET_ATTRIBUTE_FUNC_DECLARATION(TamReport); +SET_ATTRIBUTE_FUNC_DECLARATION(TamTransport); } // namespace facebook::fboss From d3eba27a7eca12176d90bbf92c5dab0bb86093ad Mon Sep 17 00:00:00 2001 From: Max Ng Date: Mon, 14 Oct 2024 00:23:37 -0700 Subject: [PATCH 100/479] Add SAI TAM Transport Store Summary: Add SAI TAM transport to SaiStore Reviewed By: nivinl Differential Revision: D64122617 fbshipit-source-id: 2e5b5daa7306cd7d50c9de48dd572658bee79730 --- fboss/agent/hw/sai/api/LoggingUtil.cpp | 2 + fboss/agent/hw/sai/store/SaiStore.h | 3 +- .../agent/hw/sai/store/tests/TamStoreTest.cpp | 68 +++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/api/LoggingUtil.cpp b/fboss/agent/hw/sai/api/LoggingUtil.cpp index 5b0835bf89c3e..07cd7de6ac3af 100644 --- a/fboss/agent/hw/sai/api/LoggingUtil.cpp +++ b/fboss/agent/hw/sai/api/LoggingUtil.cpp @@ -208,6 +208,8 @@ folly::StringPiece saiObjectTypeToString(sai_object_type_t objectType) { return "debug-counter"; case SAI_OBJECT_TYPE_WRED: return "wred"; + case SAI_OBJECT_TYPE_TAM_TRANSPORT: + return "tam-transport"; case SAI_OBJECT_TYPE_TAM_REPORT: return "tam-report"; case SAI_OBJECT_TYPE_TAM_EVENT_ACTION: diff --git a/fboss/agent/hw/sai/store/SaiStore.h b/fboss/agent/hw/sai/store/SaiStore.h index 7e43c5b49bd2a..9b30b74a41d34 100644 --- a/fboss/agent/hw/sai/store/SaiStore.h +++ b/fboss/agent/hw/sai/store/SaiStore.h @@ -624,10 +624,11 @@ class SaiStore { SaiObjectStore, SaiObjectStore, SaiObjectStore, + SaiObjectStore, SaiObjectStore, SaiObjectStore, SaiObjectStore, - SaiObjectStore, + SaiObjectStore, SaiObjectStore, SaiObjectStore, SaiObjectStore, diff --git a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp index d0b4e6c4ab45a..8c91295c25732 100644 --- a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp @@ -14,6 +14,17 @@ class TamStoreTest : public SaiStoreTest { SaiStoreTest::SetUp(); } + facebook::fboss::SaiTamTransportTraits::CreateAttributes + tamTransportTraits() { + SaiTamTransportTraits::CreateAttributes result; + std::get(result) = + SAI_TAM_TRANSPORT_TYPE_UDP; + std::get(result) = 10001; + std::get(result) = 10002; + std::get(result) = 1500; + return result; + } + facebook::fboss::SaiTamReportTraits::CreateAttributes tamReportTraits() { return SaiTamReportTraits::CreateAttributes{ SAI_TAM_REPORT_TYPE_VENDOR_EXTN}; @@ -48,6 +59,11 @@ class TamStoreTest : public SaiStoreTest { return SaiTamTraits::CreateAttributes{events, bindpoints}; } + facebook::fboss::TamTransportSaiId createTransport() { + return saiApiTable->tamApi().create( + tamTransportTraits(), 0); + } + facebook::fboss::TamReportSaiId createReport() { return saiApiTable->tamApi().create( tamReportTraits(), 0); @@ -70,6 +86,7 @@ class TamStoreTest : public SaiStoreTest { }; TEST_F(TamStoreTest, loadTam) { + auto transport = createTransport(); auto report = createReport(); auto action = createEventAction(report); auto event = createEvent(action); @@ -78,10 +95,12 @@ TEST_F(TamStoreTest, loadTam) { SaiStore s(0); s.reload(); + auto& transportStore = s.get(); auto& reportStore = s.get(); auto& actionStore = s.get(); auto& eventStore = s.get(); auto& tamStore = s.get(); + EXPECT_EQ(transportStore.get(tamTransportTraits())->adapterKey(), transport); EXPECT_EQ( reportStore .get(SaiTamReportTraits::AdapterHostKey{ @@ -97,11 +116,31 @@ TEST_F(TamStoreTest, loadTam) { } TEST_F(TamStoreTest, tamCtors) { + auto transport = createTransport(); auto report = createReport(); auto action = createEventAction(report); auto event = createEvent(action); auto tam = createTam(event); + auto transportObj = createObj(transport); + auto tamTransportAhk = tamTransportTraits(); + EXPECT_EQ( + GET_ATTR(TamTransport, Type, transportObj.attributes()), + std::get(tamTransportAhk) + .value()); + EXPECT_EQ( + GET_ATTR(TamTransport, SrcPort, transportObj.attributes()), + std::get(tamTransportAhk) + .value()); + EXPECT_EQ( + GET_ATTR(TamTransport, DstPort, transportObj.attributes()), + std::get(tamTransportAhk) + .value()); + EXPECT_EQ( + GET_ATTR(TamTransport, Mtu, transportObj.attributes()), + std::get(tamTransportAhk) + .value()); + auto reportObj = createObj(report); EXPECT_EQ( GET_ATTR(TamReport, Type, reportObj.attributes()), @@ -141,6 +180,25 @@ TEST_F(TamStoreTest, tamCtors) { TEST_F(TamStoreTest, setObject) { SaiStore s(0); s.reload(); + + auto transportAhk = tamTransportTraits(); + auto transport = + s.get().setObject(transportAhk, transportAhk); + EXPECT_EQ( + GET_ATTR(TamTransport, Type, transport->attributes()), + std::get(transportAhk).value()); + EXPECT_EQ( + GET_ATTR(TamTransport, SrcPort, transport->attributes()), + std::get(transportAhk) + .value()); + EXPECT_EQ( + GET_ATTR(TamTransport, DstPort, transport->attributes()), + std::get(transportAhk) + .value()); + EXPECT_EQ( + GET_ATTR(TamTransport, Mtu, transport->attributes()), + std::get(transportAhk).value()); + auto reportKey = tamReportTraits(); auto report = s.get().setObject(reportKey, reportKey); EXPECT_EQ( @@ -194,6 +252,10 @@ TEST_F(TamStoreTest, updateObject) { auto eventAhk = tamEventTraits(action->adapterKey()); auto event = s.get().setObject(eventAhk, eventAhk); + auto transportAhk = tamTransportTraits(); + auto transport = + s.get().setObject(transportAhk, transportAhk); + auto tamAhk = tamTraits(event->adapterKey()); auto tam = s.get().setObject(tamAhk, tamAhk); @@ -204,4 +266,10 @@ TEST_F(TamStoreTest, updateObject) { EXPECT_EQ( GET_ATTR(TamEvent, SwitchEventType, updatedEvent->attributes()), newEvents); + + std::get(transportAhk) = 10003; + auto updatedTransport = + s.get().setObject(transportAhk, transportAhk); + EXPECT_EQ( + GET_ATTR(TamTransport, DstPort, updatedTransport->attributes()), 10003); } From 2ab9bdf5ae7b91c05b320edfb8c6c591698fc6b7 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Mon, 14 Oct 2024 00:23:37 -0700 Subject: [PATCH 101/479] Add SAI TAM Transport to SaiSwitch Summary: Add SAI TAM transport to SaiSwitch. Reviewed By: nivinl Differential Revision: D64122844 fbshipit-source-id: 1da59784e831b75befbe6135684be092a44ff7b7 --- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 1 + fboss/agent/hw/sai/switch/SaiTamManager.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 6a4107dc10e1c..524a60b8e50de 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -3693,6 +3693,7 @@ std::string SaiSwitch::listObjects( objTypes.push_back(SAI_OBJECT_TYPE_DEBUG_COUNTER); break; case HwObjectType::TELEMETRY: + objTypes.push_back(SAI_OBJECT_TYPE_TAM_TRANSPORT); objTypes.push_back(SAI_OBJECT_TYPE_TAM_REPORT); objTypes.push_back(SAI_OBJECT_TYPE_TAM_EVENT_ACTION); objTypes.push_back(SAI_OBJECT_TYPE_TAM_EVENT); diff --git a/fboss/agent/hw/sai/switch/SaiTamManager.h b/fboss/agent/hw/sai/switch/SaiTamManager.h index ab01893fcf1e4..bcbd941944a6e 100644 --- a/fboss/agent/hw/sai/switch/SaiTamManager.h +++ b/fboss/agent/hw/sai/switch/SaiTamManager.h @@ -11,12 +11,14 @@ class SaiManagerTable; class SaiPlatform; class SaiStore; +using SaiTamTransport = SaiObject; using SaiTamReport = SaiObject; using SaiTamEventAction = SaiObject; using SaiTamEvent = SaiObject; using SaiTam = SaiObject; struct SaiTamHandle { + std::shared_ptr transport; std::shared_ptr report; std::shared_ptr action; std::shared_ptr event; From 50062485016b207a95d89be3cf198218dc60449e Mon Sep 17 00:00:00 2001 From: Ron He Date: Mon, 14 Oct 2024 02:49:07 -0700 Subject: [PATCH 102/479] Remove migrated trafficPFC tests Summary: Tests are migrated to Agent hw tests. Cleaning them up Reviewed By: shri-khare Differential Revision: D64312908 fbshipit-source-id: 9580a8a2aeefb048bd041ec268227d111eb68387 --- cmake/AgentHwTest.cmake | 1 - fboss/agent/hw/test/BUCK | 3 - .../dataplane_tests/HwTrafficPfcTests.cpp | 833 ------------------ 3 files changed, 837 deletions(-) delete mode 100644 fboss/agent/hw/test/dataplane_tests/HwTrafficPfcTests.cpp diff --git a/cmake/AgentHwTest.cmake b/cmake/AgentHwTest.cmake index 7848215696a09..d767d6890804d 100644 --- a/cmake/AgentHwTest.cmake +++ b/cmake/AgentHwTest.cmake @@ -230,7 +230,6 @@ set(hw_switch_test_srcs fboss/agent/hw/test/dataplane_tests/HwMPLSTests.cpp fboss/agent/hw/test/dataplane_tests/HwLoadBalancerTests.cpp fboss/agent/hw/test/dataplane_tests/HwTeFlowTrafficTests.cpp - fboss/agent/hw/test/dataplane_tests/HwTrafficPfcTests.cpp fboss/agent/hw/test/dataplane_tests/HwProdInvariantHelper.cpp fboss/agent/hw/test/dataplane_tests/HwProdInvariantTests.cpp fboss/agent/hw/test/dataplane_tests/HwPacketSendTests.cpp diff --git a/fboss/agent/hw/test/BUCK b/fboss/agent/hw/test/BUCK index 731305b167aed..82a99ab4f505f 100644 --- a/fboss/agent/hw/test/BUCK +++ b/fboss/agent/hw/test/BUCK @@ -377,7 +377,6 @@ hw_dataplane_test_srcs = [ "dataplane_tests/HwSflowTests.cpp", "dataplane_tests/HwTrunkLoadBalancerTests.cpp", "dataplane_tests/HwTeFlowTrafficTests.cpp", - "dataplane_tests/HwTrafficPfcTests.cpp", "dataplane_tests/HwRouteStatTests.cpp", ] @@ -431,10 +430,8 @@ cpp_library( "//fboss/agent:packet", "//fboss/agent:platform_base", "//fboss/agent:route_update_wrapper", - "//fboss/agent:stats", "//fboss/agent:switch_config-cpp2-types", "//fboss/agent:switchid_scope_resolver", - "//fboss/agent:utils", "//fboss/agent:validated_shell_commands-cpp2-types", "//fboss/agent/hw:counter_utils", "//fboss/agent/hw:hardware_stats-cpp2-types", diff --git a/fboss/agent/hw/test/dataplane_tests/HwTrafficPfcTests.cpp b/fboss/agent/hw/test/dataplane_tests/HwTrafficPfcTests.cpp deleted file mode 100644 index d8ae92f72a95a..0000000000000 --- a/fboss/agent/hw/test/dataplane_tests/HwTrafficPfcTests.cpp +++ /dev/null @@ -1,833 +0,0 @@ -#include - -#include "fboss/agent/Platform.h" -#include "fboss/agent/SwitchStats.h" -#include "fboss/agent/Utils.h" -#include "fboss/agent/hw/test/ConfigFactory.h" -#include "fboss/agent/hw/test/HwLinkStateDependentTest.h" -#include "fboss/agent/hw/test/HwTestCoppUtils.h" -#include "fboss/agent/hw/test/HwTestPacketUtils.h" -#include "fboss/agent/test/EcmpSetupHelper.h" - -#include "fboss/agent/hw/test/dataplane_tests/HwTestQosUtils.h" -#include "fboss/agent/state/Interface.h" -#include "fboss/agent/state/Port.h" -#include "fboss/agent/state/PortMap.h" -#include "fboss/agent/state/SwitchState.h" -#include "fboss/agent/test/ResourceLibUtil.h" - -#include "fboss/lib/CommonUtils.h" - -using folly::IPAddress; -using folly::IPAddressV6; -using std::string; - -DEFINE_bool( - skip_stop_pfc_test_traffic, - false, - "Skip stopping traffic after traffic test!"); -namespace { -static constexpr auto kGlobalSharedBytes{20000}; -static constexpr auto kGlobalHeadroomBytes{ - 5000}; // keep this lower than globalSharedBytes -static constexpr auto kPgLimitBytes{2200}; -static constexpr auto kPgResumeOffsetBytes{1800}; -static constexpr auto kPgHeadroomBytes{ - 2200}; // keep this lower than kGlobalSharedBytes -static constexpr auto kGlobalIngressEgressBufferPoolSize{ - 5064760}; // Keep a high pool size for DNX -static constexpr auto kLosslessTrafficClass{2}; -static constexpr auto kLosslessPriority{2}; -static constexpr auto kNumberOfPortsToEnablePfcOn{2}; -static const std::vector kLosslessPgIds{2, 3}; -static const std::vector kLossyPgIds{0}; -// Hardcoding register value to force PFC generation for port 2, -// kLosslessPriority for DNX. This needs to be modified if the -// port used in test or PFC priority changes! Details of how to -// compute the value to use for a port/priority is captured in -// CS00012321021. To summarize, -// value = 1 << ((port_first_phy - core_first_phy)*8 + priority, -// with port_first_phy from "port management dump full port=<>", -// core_first_phy from "dnx data dump nif.phys.nof_phys_per_core". -static const std:: - map, std::string> - kRegValToForcePfcTxForPriorityOnPortDnx = { - {std::make_tuple( - facebook::fboss::cfg::AsicType::ASIC_TYPE_JERICHO2, - 2, - 2), - "0x40000000000000000"}, - {std::make_tuple( - facebook::fboss::cfg::AsicType::ASIC_TYPE_JERICHO3, - 8, - 2), - "4"}, -}; - -struct PfcBufferParams { - int globalShared = kGlobalSharedBytes; - int globalHeadroom = kGlobalHeadroomBytes; - int pgLimit = kPgLimitBytes; - int pgHeadroom = kPgHeadroomBytes; - std::optional scalingFactor = - facebook::fboss::cfg::MMUScalingFactor::ONE_128TH; - int resumeOffset = kPgResumeOffsetBytes; -}; - -struct TrafficTestParams { - PfcBufferParams buffer = PfcBufferParams{}; - bool expectDrop = false; - bool scale = false; -}; - -std::tuple getPfcTxRxXonHwPortStats( - facebook::fboss::HwSwitchEnsemble* ensemble, - const facebook::fboss::HwPortStats& portStats, - const int pfcPriority) { - return { - portStats.get_outPfc_().at(pfcPriority), - portStats.get_inPfc_().at(pfcPriority), - ensemble->getAsic()->isSupported( - facebook::fboss::HwAsic::Feature::PFC_XON_TO_XOFF_COUNTER) - ? portStats.get_inPfcXon_().at(pfcPriority) - : 0}; -} - -bool getPfcCountersRetry( - facebook::fboss::HwSwitchEnsemble* ensemble, - const facebook::fboss::PortID& portId, - const int pfcPriority) { - int txPfcCtr = 0, rxPfcCtr = 0, rxPfcXonCtr = 0; - - auto pfcCountersIncrementing = [&](const auto& newStats) { - auto portStatsIter = newStats.find(portId); - std::tie(txPfcCtr, rxPfcCtr, rxPfcXonCtr) = - getPfcTxRxXonHwPortStats(ensemble, portStatsIter->second, pfcPriority); - XLOG(DBG0) << " Port: " << portId << " PFC TX/RX PFC/RX_PFC_XON " - << txPfcCtr << "/" << rxPfcCtr << "/" << rxPfcXonCtr - << ", priority: " << pfcPriority; - - if (ensemble->getAsic()->isSupported( - facebook::fboss::HwAsic::Feature::PFC_XON_TO_XOFF_COUNTER)) { - return (txPfcCtr > 0 && rxPfcCtr > 0 && rxPfcXonCtr > 0); - } - return (txPfcCtr > 0 && rxPfcCtr > 0); - }; - - return ensemble->waitPortStatsCondition( - pfcCountersIncrementing, 10, std::chrono::milliseconds(500)); -} - -void validatePfcCounters( - facebook::fboss::HwSwitchEnsemble* ensemble, - const int pri, - const std::vector& portIds) { - // no need t retry if looking for baseline counter - for (const auto& portId : portIds) { - EXPECT_TRUE(getPfcCountersRetry(ensemble, portId, pri)); - } -} - -void validateBufferPoolWatermarkCounters( - facebook::fboss::HwSwitchEnsemble* ensemble, - const int /* pri */, - const std::vector& /* portIds */) { - uint64_t globalHeadroomWatermark{}; - uint64_t globalSharedWatermark{}; - WITH_RETRIES({ - ensemble->getHwSwitch()->updateStats(); - auto switchWatermarkStats = - ensemble->getHwSwitch()->getSwitchWatermarkStats(); - for (auto& headroomStats : - *switchWatermarkStats.globalHeadroomWatermarkBytes()) { - globalHeadroomWatermark += headroomStats.second; - } - for (auto& sharedStats : - *switchWatermarkStats.globalSharedWatermarkBytes()) { - globalSharedWatermark += sharedStats.second; - } - XLOG(DBG0) << "Global headroom watermark: " << globalHeadroomWatermark - << ", Global shared watermark: " << globalSharedWatermark; - if (ensemble->getAsic()->isSupported( - facebook::fboss::HwAsic::Feature:: - INGRESS_PRIORITY_GROUP_HEADROOM_WATERMARK)) { - EXPECT_EVENTUALLY_GT(globalHeadroomWatermark, 0); - } - EXPECT_EVENTUALLY_GT(globalSharedWatermark, 0); - }); -} - -void validateIngressPriorityGroupWatermarkCounters( - facebook::fboss::HwSwitchEnsemble* ensemble, - const int pri, - const std::vector& portIds) { - std::string watermarkKeys = "shared"; - int numKeys = 1; - if (ensemble->getAsic()->isSupported( - facebook::fboss::HwAsic::Feature:: - INGRESS_PRIORITY_GROUP_HEADROOM_WATERMARK)) { - watermarkKeys.append("|headroom"); - numKeys++; - } - auto ingressPriorityGroupWatermarksIncrementing = - [&](const auto& /*newStats*/) { - for (const auto& portId : portIds) { - const auto& portName = ensemble->getProgrammedState() - ->getPorts() - ->getNodeIf(portId) - ->getName(); - std::string pg = - ensemble->isSai() ? folly::sformat(".pg{}", pri) : ""; - auto regex = folly::sformat( - "buffer_watermark_pg_({}).{}{}.p100.60", - watermarkKeys, - portName, - pg); - auto counters = facebook::fb303::fbData->getRegexCounters(regex); - CHECK_EQ(counters.size(), numKeys); - for (const auto& ctr : counters) { - XLOG(DBG0) << ctr.first << " : " << ctr.second; - if (!ctr.second) { - return false; - } - } - } - return true; - }; - EXPECT_TRUE(ensemble->waitPortStatsCondition( - ingressPriorityGroupWatermarksIncrementing, - 5, - std::chrono::milliseconds(1000))); -} - -} // namespace - -namespace facebook::fboss { - -class HwTrafficPfcTest : public HwLinkStateDependentTest { - private: - void SetUp() override { - FLAGS_mmu_lossless_mode = true; - /* - * Makes this flag available so that it can be used in early - * stages of init to setup common buffer pool for specific - * asics like Jericho2. - */ - FLAGS_ingress_egress_buffer_pool_size = kGlobalIngressEgressBufferPoolSize; - HwLinkStateDependentTest::SetUp(); - } - - cfg::SwitchConfig initialConfig() const override { - auto cfg = utility::onePortPerInterfaceConfig( - getHwSwitch(), - masterLogicalPortIds(), - getAsic()->desiredLoopbackModes()); - utility::setTTLZeroCpuConfig(getHwSwitchEnsemble()->getL3Asics(), cfg); - return cfg; - } - - std::vector portIdsForTest() { - return { - masterLogicalInterfacePortIds()[0], masterLogicalInterfacePortIds()[1]}; - } - - std::vector kDestIps() const { - return { - folly::IPAddressV6("2620:0:1cfe:face:b00c::4"), - folly::IPAddressV6("2620:0:1cfe:face:b00c::5")}; - } - - folly::MacAddress getIntfMac() const { - return utility::getFirstInterfaceMac(getProgrammedState()); - } - - void setupQosMapForPfc(cfg::QosMap& qosMap) { - // update pfc maps - std::map tc2PgId; - std::map pfcPri2PgId; - std::map pfcPri2QueueId; - // program defaults - for (auto i = 0; i < 8; i++) { - tc2PgId.emplace(i, i); - pfcPri2PgId.emplace(i, i); - pfcPri2QueueId.emplace(i, i); - } - - for (auto& tc2Pg : tc2PgOverride) { - tc2PgId[tc2Pg.first] = tc2Pg.second; - } - for (auto& tmp : pfcPri2PgIdOverride) { - pfcPri2PgId[tmp.first] = tmp.second; - } - - qosMap.dscpMaps()->resize(8); - for (auto i = 0; i < 8; i++) { - qosMap.dscpMaps()[i].internalTrafficClass() = i; - for (auto j = 0; j < 8; j++) { - qosMap.dscpMaps()[i].fromDscpToTrafficClass()->push_back(8 * i + j); - } - } - qosMap.trafficClassToPgId() = std::move(tc2PgId); - qosMap.pfcPriorityToPgId() = std::move(pfcPri2PgId); - qosMap.pfcPriorityToQueueId() = std::move(pfcPri2QueueId); - } - - void setupPfc(cfg::SwitchConfig& cfg, const std::vector& ports) { - cfg::PortPfc pfc; - pfc.tx() = true; - pfc.rx() = true; - pfc.portPgConfigName() = "foo"; - - cfg::QosMap qosMap; - // setup qos map with pfc structs - setupQosMapForPfc(qosMap); - - // setup qosPolicy - cfg.qosPolicies()->resize(1); - cfg.qosPolicies()[0].name() = "qp"; - cfg.qosPolicies()[0].qosMap() = qosMap; - cfg::TrafficPolicyConfig dataPlaneTrafficPolicy; - dataPlaneTrafficPolicy.defaultQosPolicy() = "qp"; - cfg.dataPlaneTrafficPolicy() = dataPlaneTrafficPolicy; - - for (const auto& portID : ports) { - auto portCfg = std::find_if( - cfg.ports()->begin(), cfg.ports()->end(), [&portID](auto& port) { - return PortID(*port.logicalID()) == portID; - }); - portCfg->pfc() = pfc; - } - } - - void setupBufferPoolConfig( - std::map& bufferPoolCfgMap, - int globalSharedBytes, - int globalHeadroomBytes) { - cfg::BufferPoolConfig poolConfig; - // provide small shared buffer size - // idea is to hit the limit and trigger XOFF (PFC) - poolConfig.sharedBytes() = globalSharedBytes; - poolConfig.headroomBytes() = globalHeadroomBytes; - bufferPoolCfgMap.insert(std::make_pair("bufferNew", poolConfig)); - } - - void setupPortPgConfig( - std::map>& portPgConfigMap, - int pgLimit, - int pgHeadroom, - std::optional scalingFactor, - int resumeOffset) { - std::vector portPgConfigs; - // create 2 pgs - for (auto pgId : kLosslessPgIds) { - cfg::PortPgConfig pgConfig; - pgConfig.id() = pgId; - pgConfig.bufferPoolName() = "bufferNew"; - // provide atleast 1 cell worth of minLimit - pgConfig.minLimitBytes() = pgLimit; - // set large enough headroom to avoid drop - pgConfig.headroomLimitBytes() = pgHeadroom; - // resume offset - pgConfig.resumeOffsetBytes() = resumeOffset; - // set scaling factor - if (scalingFactor) { - pgConfig.scalingFactor() = *scalingFactor; - } - portPgConfigs.emplace_back(pgConfig); - } - - // create lossy pgs - if (!FLAGS_allow_zero_headroom_for_lossless_pg) { - // If the flag is set, we already have lossless PGs being created - // with headroom as 0 and there is no way to differentiate lossy - // and lossless PGs now that headroom is set to zero for lossless. - // So, avoid creating lossy PGs as this will result in PFC being - // enabled for 3 priorities, which is not supported for TAJO. - for (auto pgId : kLossyPgIds) { - cfg::PortPgConfig pgConfig; - pgConfig.id() = pgId; - pgConfig.bufferPoolName() = "bufferNew"; - // provide atleast 1 cell worth of minLimit - pgConfig.minLimitBytes() = pgLimit; - // headroom set 0 identifies lossy pgs - pgConfig.headroomLimitBytes() = 0; - // resume offset - pgConfig.resumeOffsetBytes() = resumeOffset; - // set scaling factor - if (scalingFactor) { - pgConfig.scalingFactor() = *scalingFactor; - } - portPgConfigs.emplace_back(pgConfig); - } - } - - portPgConfigMap["foo"] = portPgConfigs; - } - - void setupBuffers( - PfcBufferParams buffer = PfcBufferParams{}, - bool scaleConfig = false) { - auto newCfg{initialConfig()}; - int numberOfPorts = scaleConfig ? masterLogicalInterfacePortIds().size() - : kNumberOfPortsToEnablePfcOn; - auto allPorts = masterLogicalInterfacePortIds(); - std::vector ports( - allPorts.begin(), allPorts.begin() + numberOfPorts); - setupPfc(newCfg, ports); - - std::map> portPgConfigMap; - setupPortPgConfig( - portPgConfigMap, - buffer.pgLimit, - buffer.pgHeadroom, - buffer.scalingFactor, - buffer.resumeOffset); - newCfg.portPgConfigs() = portPgConfigMap; - - // create buffer pool - std::map bufferPoolCfgMap; - setupBufferPoolConfig( - bufferPoolCfgMap, buffer.globalShared, buffer.globalHeadroom); - newCfg.bufferPoolConfigs() = bufferPoolCfgMap; - cfg_ = newCfg; - applyNewConfig(newCfg); - } - - HwSwitchEnsemble::Features featuresDesired() const override { - return {HwSwitchEnsemble::LINKSCAN, HwSwitchEnsemble::PACKET_RX}; - } - - std::tuple getTxRxXonPfcCounters( - const facebook::fboss::PortID& portId, - const int pfcPriority) { - auto portStats = getLatestPortStats(portId); - return getPfcTxRxXonHwPortStats( - getHwSwitchEnsemble(), portStats, pfcPriority); - } - - void validateInitPfcCounters( - const std::vector& portIds, - const int pfcPriority) { - int txPfcCtr = 0, rxPfcCtr = 0, rxPfcXonCtr = 0; - // no need to retry if looking for baseline counter - for (const auto& portId : portIds) { - auto portStats = getHwSwitchEnsemble()->getLatestPortStats(portId); - auto ingressDropRaw = *portStats.inDiscardsRaw_(); - XLOG(DBG0) << " validateInitPfcCounters: Port: " << portId - << " IngressDropRaw: " << ingressDropRaw; - EXPECT_TRUE(ingressDropRaw == 0); - std::tie(txPfcCtr, rxPfcCtr, rxPfcXonCtr) = - getTxRxXonPfcCounters(portId, pfcPriority); - EXPECT_TRUE((txPfcCtr == 0) && (rxPfcCtr == 0) && (rxPfcXonCtr == 0)); - } - } - - void validateIngressDropCounters(const std::vector& portIds) { - WITH_RETRIES({ - for (const auto& portId : portIds) { - auto portStats = getHwSwitchEnsemble()->getLatestPortStats(portId); - auto ingressDropRaw = *portStats.inDiscardsRaw_(); - uint64_t ingressCongestionDiscards = 0; - std::string ingressCongestionDiscardLog{}; - if (getHwSwitchEnsemble()->getAsic()->isSupported( - HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS)) { - ingressCongestionDiscards = *portStats.inCongestionDiscards_(); - ingressCongestionDiscardLog = " IngressCongestionDiscards: " + - std::to_string(ingressCongestionDiscards); - } - XLOG(DBG0) << " validateIngressDropCounters: Port: " << portId - << " IngressDropRaw: " << ingressDropRaw - << ingressCongestionDiscardLog; - EXPECT_EVENTUALLY_GT(ingressDropRaw, 0); - if (getHwSwitchEnsemble()->getAsic()->isSupported( - HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS)) { - EXPECT_EVENTUALLY_GT(ingressCongestionDiscards, 0); - } - } - if (getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3) { - // Jericho3 has additional VSQ drops counters which accounts for - // ingress buffer drops. - getHwSwitchEnsemble()->getHwSwitch()->updateStats(); - fb303::ThreadCachedServiceData::get()->publishStats(); - auto vsqResourcesExhautionDrops = getHwSwitchEnsemble() - ->getHwSwitch() - ->getSwitchStats() - ->getVsqResourcesExhautionDrops(); - XLOG(DBG0) - << " validateIngressDropCounters: vsqResourceExhaustionDrops: " - << vsqResourcesExhautionDrops; - EXPECT_EVENTUALLY_GT(vsqResourcesExhautionDrops, 0); - } - }); - } - - protected: - void runTestWithCfg( - const int trafficClass, - const int pfcPriority, - TrafficTestParams testParams = TrafficTestParams{}, - std::function& portIdsToValidate)> validateCounterFn = - validatePfcCounters) { - std::vector portIds = portIdsForTest(); - auto setup = [&]() { - if ((getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO2) || - (getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3)) { - // Keep low scaling factor so that headroom usage is attempted - // for Jericho family of ASICs. - testParams.buffer.scalingFactor = cfg::MMUScalingFactor::ONE_32768TH; - } - setupBuffers(testParams.buffer, testParams.scale); - setupEcmpTraffic(portIds); - // ensure counter is 0 before we start traffic - validateInitPfcCounters(portIds, pfcPriority); - }; - auto verifyCommon = [&](bool postWb) { - pumpTraffic(trafficClass); - // check counters are as expected - validateCounterFn(getHwSwitchEnsemble(), pfcPriority, portIds); - if (testParams.expectDrop) { - validateIngressDropCounters(portIds); - } - if (!FLAGS_skip_stop_pfc_test_traffic && postWb) { - // stop traffic so that unconfiguration can happen without issues - stopTraffic(portIds); - } - }; - auto verify = [&]() { verifyCommon(false /* postWb */); }; - auto verifyPostWb = [&]() { verifyCommon(true /* postWb */); }; - verifyAcrossWarmBoots(setup, verify, []() {}, verifyPostWb); - } - - void setupEcmpTraffic(const std::vector& portIds) { - utility::EcmpSetupTargetedPorts6 ecmpHelper{ - getProgrammedState(), getIntfMac()}; - - CHECK_EQ(portIds.size(), kDestIps().size()); - for (int i = 0; i < portIds.size(); ++i) { - const PortDescriptor port(portIds[i]); - RoutePrefixV6 route{kDestIps()[i], 128}; - applyNewState(ecmpHelper.resolveNextHops(getProgrammedState(), {port})); - ecmpHelper.programRoutes(getRouteUpdater(), {port}, {route}); - utility::ttlDecrementHandlingForLoopbackTraffic( - getHwSwitchEnsemble(), - ecmpHelper.getRouterId(), - ecmpHelper.nhop(port)); - } - } - - void setupConfigAndEcmpTraffic() { - setupBuffers(); - setupEcmpTraffic(portIdsForTest()); - } - - public: - void pumpTraffic(const int priority) { - auto vlanId = utility::firstVlanID(initialConfig()); - auto intfMac = getIntfMac(); - auto srcMac = utility::MacAddressGenerator().get(intfMac.u64NBO() + 1); - // pri = 7 => dscp 56 - int dscp = priority * 8; - // Tomahawk4 need 5 packets per flow to trigger PFC - int numPacketsPerFlow = getHwSwitchEnsemble()->getMinPktsForLineRate( - masterLogicalInterfacePortIds()[0]); - for (int i = 0; i < numPacketsPerFlow; i++) { - for (const auto& dstIp : kDestIps()) { - auto txPacket = utility::makeUDPTxPacket( - getHwSwitch(), - vlanId, - srcMac, - intfMac, - folly::IPAddressV6("2620:0:1cfe:face:b00c::3"), - dstIp, - 8000, - 8001, - dscp << 2, // dscp is last 6 bits in TC - 255, - std::vector(2000, 0xff)); - - getHwSwitch()->sendPacketSwitchedSync(std::move(txPacket)); - } - } - } - void stopTraffic(const std::vector& portIds) { - // Toggle the link to break looping traffic - for (auto portId : portIds) { - bringDownPort(portId); - bringUpPort(portId); - } - } - - bool canTriggerPfcDeadlockDetectionWithTraffic() { - // Return false for ASICs that cannot trigger PFC detection with - // loop traffic! - if ((getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO2) || - (getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3)) { - return false; - } else { - return true; - } - } - - void setupWatchdog(bool enable) { - cfg::PfcWatchdog pfcWatchdog; - if (enable) { - pfcWatchdog.recoveryAction() = cfg::PfcWatchdogRecoveryAction::NO_DROP; - if (canTriggerPfcDeadlockDetectionWithTraffic()) { - pfcWatchdog.recoveryTimeMsecs() = 10; - pfcWatchdog.detectionTimeMsecs() = 1; - } else { - pfcWatchdog.recoveryTimeMsecs() = 1000; - pfcWatchdog.detectionTimeMsecs() = 200; - } - } - - for (const auto& portID : portIdsForTest()) { - auto portCfg = utility::findCfgPort(cfg_, portID); - if (portCfg->pfc().has_value()) { - if (enable) { - portCfg->pfc()->watchdog() = pfcWatchdog; - } else { - portCfg->pfc()->watchdog().reset(); - } - } - } - applyNewConfig(cfg_); - } - - void validatePfcWatchdogCountersReset(const PortID& port) { - auto deadlockCtr = - getHwSwitchEnsemble()->readPfcDeadlockDetectionCounter(port); - auto recoveryCtr = - getHwSwitchEnsemble()->readPfcDeadlockRecoveryCounter(port); - XLOG(DBG2) << "deadlockCtr:" << deadlockCtr - << ", recoveryCtr:" << recoveryCtr; - EXPECT_TRUE((deadlockCtr == 0) && (recoveryCtr == 0)); - } - - void validatePfcWatchdogCounters(const PortID& port) { - int deadlockCtrBefore = - getHwSwitchEnsemble()->readPfcDeadlockDetectionCounter(port); - int recoveryCtrBefore = - getHwSwitchEnsemble()->readPfcDeadlockRecoveryCounter(port); - WITH_RETRIES_N_TIMED(10, std::chrono::milliseconds(1000), { - int deadlockCtr = - getHwSwitchEnsemble()->readPfcDeadlockDetectionCounter(port); - int recoveryCtr = - getHwSwitchEnsemble()->readPfcDeadlockRecoveryCounter(port); - XLOG(DBG0) << "For port: " << port << " deadlockCtr = " << deadlockCtr - << " recoveryCtr = " << recoveryCtr; - EXPECT_EVENTUALLY_TRUE( - (deadlockCtr > deadlockCtrBefore) && - (recoveryCtr > recoveryCtrBefore)); - }); - } - - void validateRxPfcCounterIncrement( - const PortID& port, - const int pfcPriority) { - int retries = 2; - int rxPfcCtrOld = 0; - std::tie(std::ignore, rxPfcCtrOld, std::ignore) = - getTxRxXonPfcCounters(port, pfcPriority); - while (retries--) { - int rxPfcCtrNew = 0; - std::this_thread::sleep_for(std::chrono::seconds(1)); - std::tie(std::ignore, rxPfcCtrNew, std::ignore) = - getTxRxXonPfcCounters(port, pfcPriority); - if (rxPfcCtrNew > rxPfcCtrOld) { - return; - } - } - EXPECT_TRUE(0); - } - - void triggerPfcDeadlockDetection(const PortID& port) { - if ((getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO2) || - (getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3)) { - // As traffic cannot trigger deadlock for DNX, force back - // to back PFC frame generation which causes a deadlock! - XLOG(DBG0) << "Triggering PFC deadlock detection on port ID : " - << static_cast(port); - auto iter = kRegValToForcePfcTxForPriorityOnPortDnx.find(std::make_tuple( - getAsic()->getAsicType(), static_cast(port), kLosslessPriority)); - EXPECT_FALSE(iter == kRegValToForcePfcTxForPriorityOnPortDnx.end()); - std::string out; - getHwSwitchEnsemble()->runDiagCommand( - "modreg CFC_FRC_NIF_ETH_PFC FRC_NIF_ETH_PFC=" + iter->second + - "\nquit\n", - out); - } else { - // Send traffic to trigger deadlock - pumpTraffic(kLosslessTrafficClass); - validateRxPfcCounterIncrement(port, kLosslessPriority); - } - } - - std::map tc2PgOverride = {}; - std::map pfcPri2PgIdOverride = {}; - cfg::SwitchConfig cfg_; -}; - -class HwTrafficPfcGenTest - : public HwTrafficPfcTest, - public testing::WithParamInterface { - void SetUp() override { - auto testParams = GetParam(); - FLAGS_mmu_lossless_mode = true; - /* - * Makes this flag available so that it can be used in early - * stages of init to setup common buffer pool for specific - * asics like Jericho2. - */ - FLAGS_ingress_egress_buffer_pool_size = kGlobalIngressEgressBufferPoolSize; - if (testParams.buffer.pgHeadroom == 0) { - // Force headroom 0 for lossless PG - FLAGS_allow_zero_headroom_for_lossless_pg = true; - } - HwLinkStateDependentTest::SetUp(); - } -}; - -INSTANTIATE_TEST_SUITE_P( - HwTrafficPfcTest, - HwTrafficPfcGenTest, - testing::Values( - TrafficTestParams{}, - TrafficTestParams{ - .buffer = - PfcBufferParams{ - .globalShared = kGlobalSharedBytes * 5, - .pgLimit = kPgLimitBytes / 3, - .resumeOffset = kPgResumeOffsetBytes / 3}, - .scale = true}, - TrafficTestParams{ - .buffer = - PfcBufferParams{.pgHeadroom = 0, .scalingFactor = std::nullopt}, - .expectDrop = true}, - TrafficTestParams{ - .buffer = - PfcBufferParams{ - .globalHeadroom = 0, - .scalingFactor = std::nullopt}, - .expectDrop = true}), - [](const ::testing::TestParamInfo& info) { - auto testParams = info.param; - if (testParams.buffer.pgHeadroom == 0) { - return "WithZeroPgHeadRoomCfg"; - } else if (testParams.buffer.globalHeadroom == 0) { - return "WithZeroGlobalHeadRoomCfg"; - } else if (testParams.scale) { - return "WithScaleCfg"; - } else { - return "WithDefaultCfg"; - } - }); - -TEST_P(HwTrafficPfcGenTest, verifyPfc) { - const int trafficClass = kLosslessTrafficClass; - const int pfcPriority = kLosslessPriority; - TrafficTestParams trafficParams = GetParam(); - runTestWithCfg(trafficClass, pfcPriority, trafficParams); -} - -TEST_F(HwTrafficPfcTest, verifyBufferPoolWatermarks) { - const int trafficClass = kLosslessTrafficClass; - const int pfcPriority = kLosslessPriority; - cfg::MMUScalingFactor scalingFactor = - getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO2 - ? cfg::MMUScalingFactor::ONE_32768TH - : cfg::MMUScalingFactor::ONE_64TH; - runTestWithCfg( - trafficClass, - pfcPriority, - TrafficTestParams{ - .buffer = PfcBufferParams{.scalingFactor = scalingFactor}}, - validateBufferPoolWatermarkCounters); -} - -TEST_F(HwTrafficPfcTest, verifyIngressPriorityGroupWatermarks) { - const int trafficClass = kLosslessTrafficClass; - const int pfcPriority = kLosslessPriority; - runTestWithCfg( - trafficClass, - pfcPriority, - TrafficTestParams{ - .buffer = PfcBufferParams{.scalingFactor = std::nullopt}}, - validateIngressPriorityGroupWatermarkCounters); -} - -// intent of this test is to send traffic so that it maps to -// tc 2, now map tc 2 to PG 3. Mapping from PG to pfc priority -// is 1:1, which means PG 3 is mapped to pfc priority 3. -// Generate traffic to fire off PFC with smaller shared buffer -TEST_F(HwTrafficPfcTest, verifyPfcWithMapChanges_0) { - const int trafficClass = kLosslessTrafficClass; - const int pfcPriority = 3; - tc2PgOverride.insert(std::make_pair(trafficClass, pfcPriority)); - runTestWithCfg(trafficClass, pfcPriority); -} - -// intent of this test is to send traffic so that it maps to -// tc 7. Now we map tc 7 -> PG 2. Mapping from PG to pfc -// priority is 1:1, which means PG 2 is mapped to pfc priority 2. -// Generate traffic to fire off PFC with smaller shared buffer -TEST_F(HwTrafficPfcTest, verifyPfcWithMapChanges_1) { - const int trafficClass = 7; - const int pfcPriority = kLosslessPriority; - tc2PgOverride.insert(std::make_pair(trafficClass, pfcPriority)); - runTestWithCfg(trafficClass, pfcPriority); -} - -// intent of this test is to setup watchdog for the PFC -// and observe it kicks in and update the watchdog counters -// watchdog counters are created/incremented when callback -// for deadlock/recovery kicks in -TEST_F(HwTrafficPfcTest, PfcWatchdog) { - auto setup = [&]() { - setupConfigAndEcmpTraffic(); - setupWatchdog(true /* enable watchdog */); - }; - auto verify = [&]() { - triggerPfcDeadlockDetection(masterLogicalInterfacePortIds()[0]); - validatePfcWatchdogCounters(masterLogicalInterfacePortIds()[0]); - }; - verifyAcrossWarmBoots(setup, verify); -} - -// intent of this test is to setup watchdog for PFC -// and remove it. Observe that counters should stop incrementing -// Clear them and check they stay the same -// Since the watchdog counters are sw based, upon warm boot -// we don't expect these counters to be incremented either -TEST_F(HwTrafficPfcTest, PfcWatchdogReset) { - auto setup = [&]() { - setupConfigAndEcmpTraffic(); - setupWatchdog(true /* enable watchdog */); - triggerPfcDeadlockDetection(masterLogicalInterfacePortIds()[0]); - // lets wait for the watchdog counters to be populated - validatePfcWatchdogCounters(masterLogicalInterfacePortIds()[0]); - // reset watchdog - setupWatchdog(false /* disable */); - // reset the watchdog counters - getHwSwitchEnsemble()->clearPfcDeadlockRecoveryCounter( - masterLogicalInterfacePortIds()[0]); - getHwSwitchEnsemble()->clearPfcDeadlockDetectionCounter( - masterLogicalInterfacePortIds()[0]); - }; - - auto verify = [&]() { - // ensure that RX PFC continues to increment - validateRxPfcCounterIncrement( - masterLogicalInterfacePortIds()[0], kLosslessPriority); - // validate that pfc watchdog counters do not increment anymore - validatePfcWatchdogCountersReset(masterLogicalInterfacePortIds()[0]); - }; - - // warmboot support to be added in next step - verifyAcrossWarmBoots(setup, verify); -} - -} // namespace facebook::fboss From 39b0d48997679bbf80ce8a5a408619030793a79e Mon Sep 17 00:00:00 2001 From: Max Ng Date: Mon, 14 Oct 2024 09:31:07 -0700 Subject: [PATCH 103/479] Add SAI TAM Collector API, Fakes, Tracer Summary: Add SAI TAM collector API, Fakes and Tracer integration. Reviewed By: nivinl Differential Revision: D64123353 fbshipit-source-id: be70d47b18966596063ad4cf49557695d66f504f --- fboss/agent/hw/sai/api/TamApi.h | 60 +++++++++ fboss/agent/hw/sai/api/Types.h | 1 + fboss/agent/hw/sai/api/tests/TamApiTest.cpp | 56 +++++++++ fboss/agent/hw/sai/fake/FakeSai.cpp | 1 + fboss/agent/hw/sai/fake/FakeSai.h | 1 + fboss/agent/hw/sai/fake/FakeSaiObject.cpp | 9 ++ fboss/agent/hw/sai/fake/FakeSaiTam.cpp | 131 ++++++++++++++++++++ fboss/agent/hw/sai/fake/FakeSaiTam.h | 25 ++++ fboss/agent/hw/sai/tracer/SaiTracer.cpp | 4 + fboss/agent/hw/sai/tracer/SaiTracer.h | 2 + fboss/agent/hw/sai/tracer/TamApiTracer.cpp | 19 +++ fboss/agent/hw/sai/tracer/TamApiTracer.h | 1 + 12 files changed, 310 insertions(+) diff --git a/fboss/agent/hw/sai/api/TamApi.h b/fboss/agent/hw/sai/api/TamApi.h index 20ab76efd4f56..6ba89db27d465 100644 --- a/fboss/agent/hw/sai/api/TamApi.h +++ b/fboss/agent/hw/sai/api/TamApi.h @@ -16,6 +16,42 @@ namespace facebook::fboss { class TamApi; +struct SaiTamCollectorTraits { + static constexpr sai_object_type_t ObjectType = SAI_OBJECT_TYPE_TAM_COLLECTOR; + using SaiApiT = TamApi; + struct Attributes { + using EnumType = sai_tam_collector_attr_t; + using SrcIp = + SaiAttribute; + using DstIp = + SaiAttribute; + using TruncateSize = SaiAttribute< + EnumType, + SAI_TAM_COLLECTOR_ATTR_TRUNCATE_SIZE, + sai_uint16_t>; + using Transport = SaiAttribute< + EnumType, + SAI_TAM_COLLECTOR_ATTR_TRANSPORT, + sai_object_id_t>; + using DscpValue = + SaiAttribute; + }; + using AdapterKey = TamCollectorSaiId; + using AdapterHostKey = std::tuple< + Attributes::SrcIp, + Attributes::DstIp, + std::optional, + Attributes::Transport, + std::optional>; + using CreateAttributes = AdapterHostKey; +}; + +SAI_ATTRIBUTE_NAME(TamCollector, SrcIp) +SAI_ATTRIBUTE_NAME(TamCollector, DstIp) +SAI_ATTRIBUTE_NAME(TamCollector, TruncateSize) +SAI_ATTRIBUTE_NAME(TamCollector, Transport) +SAI_ATTRIBUTE_NAME(TamCollector, DscpValue) + struct SaiTamTransportTraits { static constexpr sai_object_type_t ObjectType = SAI_OBJECT_TYPE_TAM_TRANSPORT; using SaiApiT = TamApi; @@ -266,6 +302,30 @@ class TamApi : public SaiApi { return api_->set_tam_transport_attribute(id, attr); } + // TAM Collector + sai_status_t _create( + TamCollectorSaiId* id, + sai_object_id_t switch_id, + size_t count, + sai_attribute_t* attr_list) const { + return api_->create_tam_collector( + rawSaiId(id), switch_id, count, attr_list); + } + + sai_status_t _remove(TamCollectorSaiId id) const { + return api_->remove_tam_collector(id); + } + + sai_status_t _getAttribute(TamCollectorSaiId id, sai_attribute_t* attr) + const { + return api_->get_tam_collector_attribute(id, 1, attr); + } + + sai_status_t _setAttribute(TamCollectorSaiId id, const sai_attribute_t* attr) + const { + return api_->set_tam_collector_attribute(id, attr); + } + sai_tam_api_t* api_; friend class SaiApi; }; diff --git a/fboss/agent/hw/sai/api/Types.h b/fboss/agent/hw/sai/api/Types.h index d29d6715fae42..aa79134811bce 100644 --- a/fboss/agent/hw/sai/api/Types.h +++ b/fboss/agent/hw/sai/api/Types.h @@ -58,6 +58,7 @@ FBOSS_STRONG_TYPE(sai_object_id_t, VirtualRouterSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, VlanSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, VlanMemberSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, WredSaiId); +FBOSS_STRONG_TYPE(sai_object_id_t, TamCollectorSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamTransportSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamReportSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamEventActionSaiId); diff --git a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp index bbbe158d64c0d..cf32a004e52f7 100644 --- a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp @@ -24,6 +24,62 @@ class TamApiTest : public ::testing::Test { std::unique_ptr tamApi; }; +TEST_F(TamApiTest, TamCollectorV4) { + folly::IPAddress srcIp{"1.1.1.1"}; + folly::IPAddress dstIp{"2.2.2.2"}; + sai_object_id_t transportSaiObjectId = 100; + + SaiTamCollectorTraits::CreateAttributes collectorAttr; + std::get(collectorAttr) = srcIp; + std::get(collectorAttr) = dstIp; + std::get>( + collectorAttr) = 128; + std::get(collectorAttr) = + transportSaiObjectId; + std::get>( + collectorAttr) = 0; + + auto collectorSaiId = + tamApi->create(collectorAttr, switchId); + EXPECT_EQ( + tamApi->getAttribute( + collectorSaiId, SaiTamCollectorTraits::CreateAttributes{}), + collectorAttr); + tamApi->remove(collectorSaiId); + EXPECT_THROW( + tamApi->getAttribute( + collectorSaiId, SaiTamCollectorTraits::CreateAttributes{}), + std::exception); +} + +TEST_F(TamApiTest, TamCollectorV6) { + folly::IPAddress srcIp{"2401::1"}; + folly::IPAddress dstIp{"2401::2"}; + sai_object_id_t transportSaiObjectId = 100; + + SaiTamCollectorTraits::CreateAttributes collectorAttr; + std::get(collectorAttr) = srcIp; + std::get(collectorAttr) = dstIp; + std::get>( + collectorAttr) = 128; + std::get(collectorAttr) = + transportSaiObjectId; + std::get>( + collectorAttr) = 0; + + auto collectorSaiId = + tamApi->create(collectorAttr, switchId); + EXPECT_EQ( + tamApi->getAttribute( + collectorSaiId, SaiTamCollectorTraits::CreateAttributes{}), + collectorAttr); + tamApi->remove(collectorSaiId); + EXPECT_THROW( + tamApi->getAttribute( + collectorSaiId, SaiTamCollectorTraits::CreateAttributes{}), + std::exception); +} + TEST_F(TamApiTest, TamTransport) { SaiTamTransportTraits::CreateAttributes transportAttr; std::get(transportAttr) = diff --git a/fboss/agent/hw/sai/fake/FakeSai.cpp b/fboss/agent/hw/sai/fake/FakeSai.cpp index f1cdf1f7bec00..1888dfd83661e 100644 --- a/fboss/agent/hw/sai/fake/FakeSai.cpp +++ b/fboss/agent/hw/sai/fake/FakeSai.cpp @@ -65,6 +65,7 @@ void FakeSai::clear() { fs->tamEventActionManager.clear(); fs->tamReportManager.clear(); fs->tamTransportManager.clear(); + fs->tamCollectorManager.clear(); fs->tunnelManager.clear(); fs->tunnelTermManager.clear(); fs->systemPortManager.clear(); diff --git a/fboss/agent/hw/sai/fake/FakeSai.h b/fboss/agent/hw/sai/fake/FakeSai.h index 6c63c5a84a40d..35cdc16b0b625 100644 --- a/fboss/agent/hw/sai/fake/FakeSai.h +++ b/fboss/agent/hw/sai/fake/FakeSai.h @@ -99,6 +99,7 @@ struct FakeSai { FakeTamEventActionManager tamEventActionManager; FakeTamReportManager tamReportManager; FakeTamTransportManager tamTransportManager; + FakeTamCollectorManager tamCollectorManager; FakeTunnelManager tunnelManager; FakeTunnelTermManager tunnelTermManager; FakeMacsecManager macsecManager; diff --git a/fboss/agent/hw/sai/fake/FakeSaiObject.cpp b/fboss/agent/hw/sai/fake/FakeSaiObject.cpp index 9dde228e6eb50..d2b7c8573243d 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiObject.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiObject.cpp @@ -149,6 +149,9 @@ sai_status_t sai_get_object_count( case SAI_OBJECT_TYPE_WRED: *count = fs->wredManager.map().size(); break; + case SAI_OBJECT_TYPE_TAM_COLLECTOR: + *count = fs->tamCollectorManager.map().size(); + break; case SAI_OBJECT_TYPE_TAM_TRANSPORT: *count = fs->tamTransportManager.map().size(); break; @@ -485,6 +488,12 @@ sai_status_t sai_get_object_key( } break; } + case SAI_OBJECT_TYPE_TAM_COLLECTOR: { + for (const auto& ob : fs->tamCollectorManager.map()) { + object_list[i++].key.object_id = ob.second.id; + } + break; + } case SAI_OBJECT_TYPE_TAM_TRANSPORT: { for (const auto& ob : fs->tamTransportManager.map()) { object_list[i++].key.object_id = ob.second.id; diff --git a/fboss/agent/hw/sai/fake/FakeSaiTam.cpp b/fboss/agent/hw/sai/fake/FakeSaiTam.cpp index 4c984f1cf8391..96e1bdfbca55a 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiTam.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiTam.cpp @@ -2,6 +2,7 @@ #include "fboss/agent/hw/sai/fake/FakeSaiTam.h" +#include "fboss/agent/hw/sai/api/AddressUtil.h" #include "fboss/agent/hw/sai/fake/FakeSai.h" namespace { @@ -503,6 +504,131 @@ sai_status_t set_tam_transport_attribute( return SAI_STATUS_SUCCESS; } +sai_status_t create_tam_collector( + sai_object_id_t* id, + sai_object_id_t /*switch_id*/, + uint32_t attr_count, + const sai_attribute_t* attr_list) { + folly::IPAddress srcIp{}; + folly::IPAddress dstIp{}; + std::optional truncateSize{}; + sai_object_id_t transport{}; + std::optional dscp{}; + + for (auto i = 0; i < attr_count; i++) { + switch (attr_list[i].id) { + case SAI_TAM_COLLECTOR_ATTR_SRC_IP: + srcIp = facebook::fboss::fromSaiIpAddress(attr_list[i].value.ipaddr); + break; + + case SAI_TAM_COLLECTOR_ATTR_DST_IP: + dstIp = facebook::fboss::fromSaiIpAddress(attr_list[i].value.ipaddr); + break; + + case SAI_TAM_COLLECTOR_ATTR_TRUNCATE_SIZE: + truncateSize = attr_list[i].value.u16; + break; + + case SAI_TAM_COLLECTOR_ATTR_TRANSPORT: + transport = attr_list[i].value.oid; + break; + + case SAI_TAM_COLLECTOR_ATTR_DSCP_VALUE: + dscp = attr_list[i].value.u8; + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; + } + } + auto fs = FakeSai::getInstance(); + *id = fs->tamCollectorManager.create( + srcIp, dstIp, truncateSize, transport, dscp); + return SAI_STATUS_SUCCESS; +} + +sai_status_t remove_tam_collector(sai_object_id_t id) { + auto fs = FakeSai::getInstance(); + fs->tamCollectorManager.remove(id); + return SAI_STATUS_SUCCESS; +} + +sai_status_t get_tam_collector_attribute( + sai_object_id_t id, + uint32_t attr_count, + sai_attribute_t* attr_list) { + auto fs = FakeSai::getInstance(); + auto& collector = fs->tamCollectorManager.get(id); + for (auto i = 0; i < attr_count; i++) { + switch (attr_list[i].id) { + case SAI_TAM_COLLECTOR_ATTR_SRC_IP: + attr_list[i].value.ipaddr = + facebook::fboss::toSaiIpAddress(folly::IPAddress(collector.srcIp_)); + break; + + case SAI_TAM_COLLECTOR_ATTR_DST_IP: + attr_list[i].value.ipaddr = + facebook::fboss::toSaiIpAddress(folly::IPAddress(collector.dstIp_)); + break; + + case SAI_TAM_COLLECTOR_ATTR_TRUNCATE_SIZE: + attr_list[i].value.u16 = collector.truncateSize_.value(); + break; + + case SAI_TAM_COLLECTOR_ATTR_TRANSPORT: + attr_list[i].value.oid = collector.transport_; + break; + + case SAI_TAM_COLLECTOR_ATTR_DSCP_VALUE: + attr_list[i].value.u8 = collector.dscp_.value(); + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; + } + } + return SAI_STATUS_SUCCESS; +} + +sai_status_t set_tam_collector_attribute( + sai_object_id_t id, + const sai_attribute_t* attr) { + try { + auto fs = FakeSai::getInstance(); + auto& collector = fs->tamCollectorManager.get(id); + + switch (attr->id) { + case SAI_TAM_COLLECTOR_ATTR_SRC_IP: + collector.srcIp_ = + facebook::fboss::fromSaiIpAddress(attr->value.ipaddr); + break; + + case SAI_TAM_COLLECTOR_ATTR_DST_IP: + collector.dstIp_ = + facebook::fboss::fromSaiIpAddress(attr->value.ipaddr); + break; + + case SAI_TAM_COLLECTOR_ATTR_TRUNCATE_SIZE: + collector.truncateSize_ = attr->value.u16; + break; + + case SAI_TAM_COLLECTOR_ATTR_TRANSPORT: + collector.transport_ = attr->value.oid; + break; + + case SAI_TAM_COLLECTOR_ATTR_DSCP_VALUE: + collector.dscp_ = attr->value.u8; + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0; + } + } catch (...) { + return SAI_STATUS_ITEM_NOT_FOUND; + } + return SAI_STATUS_SUCCESS; +} + } // namespace namespace facebook::fboss { @@ -534,6 +660,11 @@ void populate_tam_api(sai_tam_api_t** tam_api) { _tam_api.set_tam_transport_attribute = &set_tam_transport_attribute; _tam_api.get_tam_transport_attribute = &get_tam_transport_attribute; + _tam_api.create_tam_collector = &create_tam_collector; + _tam_api.remove_tam_collector = &remove_tam_collector; + _tam_api.set_tam_collector_attribute = &set_tam_collector_attribute; + _tam_api.get_tam_collector_attribute = &get_tam_collector_attribute; + *tam_api = &_tam_api; } diff --git a/fboss/agent/hw/sai/fake/FakeSaiTam.h b/fboss/agent/hw/sai/fake/FakeSaiTam.h index 29a06d8eb0b1e..86386ae768562 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiTam.h +++ b/fboss/agent/hw/sai/fake/FakeSaiTam.h @@ -4,6 +4,8 @@ #include "fboss/agent/hw/sai/fake/FakeManager.h" +#include + extern "C" { #include } @@ -72,6 +74,27 @@ class FakeSaiTamTransport { sai_uint32_t mtu_; }; +class FakeSaiTamCollector { + public: + FakeSaiTamCollector( + const folly::IPAddress& srcIp, + const folly::IPAddress& dstIp, + std::optional truncateSize, + sai_object_id_t transport, + std::optional dscp) + : srcIp_(srcIp), + dstIp_(dstIp), + truncateSize_(truncateSize), + transport_(transport), + dscp_(dscp) {} + sai_object_id_t id; + folly::IPAddress srcIp_; + folly::IPAddress dstIp_; + std::optional truncateSize_; + sai_object_id_t transport_; + std::optional dscp_; +}; + using FakeTamManager = FakeManager; using FakeTamEventManager = FakeManager; using FakeTamEventActionManager = @@ -79,6 +102,8 @@ using FakeTamEventActionManager = using FakeTamReportManager = FakeManager; using FakeTamTransportManager = FakeManager; +using FakeTamCollectorManager = + FakeManager; void populate_tam_api(sai_tam_api_t** tam_api); diff --git a/fboss/agent/hw/sai/tracer/SaiTracer.cpp b/fboss/agent/hw/sai/tracer/SaiTracer.cpp index 8f924b138f0cc..62b0883d74aa0 100644 --- a/fboss/agent/hw/sai/tracer/SaiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/SaiTracer.cpp @@ -1478,6 +1478,9 @@ vector SaiTracer::setAttrList( case SAI_OBJECT_TYPE_TAM_TRANSPORT: setTamTransportAttributes(attr_list, attr_count, attrLines, rv); break; + case SAI_OBJECT_TYPE_TAM_COLLECTOR: + setTamCollectorAttributes(attr_list, attr_count, attrLines, rv); + break; case SAI_OBJECT_TYPE_TUNNEL: setTunnelAttributes(attr_list, attr_count, attrLines, rv); break; @@ -1839,6 +1842,7 @@ void SaiTracer::initVarCounts() { varCounts_.emplace(SAI_OBJECT_TYPE_SCHEDULER_GROUP, 0); varCounts_.emplace(SAI_OBJECT_TYPE_SWITCH, 0); varCounts_.emplace(SAI_OBJECT_TYPE_SYSTEM_PORT, 0); + varCounts_.emplace(SAI_OBJECT_TYPE_TAM_COLLECTOR, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM_TRANSPORT, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM_REPORT, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM_EVENT_ACTION, 0); diff --git a/fboss/agent/hw/sai/tracer/SaiTracer.h b/fboss/agent/hw/sai/tracer/SaiTracer.h index f3aef747623a3..e729abdcb5aeb 100644 --- a/fboss/agent/hw/sai/tracer/SaiTracer.h +++ b/fboss/agent/hw/sai/tracer/SaiTracer.h @@ -408,6 +408,7 @@ class SaiTracer { {SAI_OBJECT_TYPE_SCHEDULER_GROUP, "schedulerGroup_"}, {SAI_OBJECT_TYPE_SWITCH, "switch_"}, {SAI_OBJECT_TYPE_SYSTEM_PORT, "systemPort_"}, + {SAI_OBJECT_TYPE_TAM_COLLECTOR, "tamCollector_"}, {SAI_OBJECT_TYPE_TAM_TRANSPORT, "tamTransport_"}, {SAI_OBJECT_TYPE_TAM_REPORT, "tamReport_"}, {SAI_OBJECT_TYPE_TAM_EVENT_ACTION, "tamEventAction_"}, @@ -472,6 +473,7 @@ class SaiTracer { {SAI_OBJECT_TYPE_SCHEDULER_GROUP, "scheduler_group_api->"}, {SAI_OBJECT_TYPE_SWITCH, "switch_api->"}, {SAI_OBJECT_TYPE_SYSTEM_PORT, "system_port_api->"}, + {SAI_OBJECT_TYPE_TAM_COLLECTOR, "tam_api->"}, {SAI_OBJECT_TYPE_TAM_TRANSPORT, "tam_api->"}, {SAI_OBJECT_TYPE_TAM_REPORT, "tam_api->"}, {SAI_OBJECT_TYPE_TAM_EVENT_ACTION, "tam_api->"}, diff --git a/fboss/agent/hw/sai/tracer/TamApiTracer.cpp b/fboss/agent/hw/sai/tracer/TamApiTracer.cpp index 47693fb33bb58..b19942978d263 100644 --- a/fboss/agent/hw/sai/tracer/TamApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/TamApiTracer.cpp @@ -44,6 +44,14 @@ std::map> _TamTransportMap{ SAI_ATTR_MAP(TamTransport, Mtu), }; +std::map> _TamCollectorMap{ + SAI_ATTR_MAP(TamCollector, SrcIp), + SAI_ATTR_MAP(TamCollector, DstIp), + SAI_ATTR_MAP(TamCollector, TruncateSize), + SAI_ATTR_MAP(TamCollector, Transport), + SAI_ATTR_MAP(TamCollector, DscpValue), +}; + void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(TamEvent, SwitchEventType) SAI_EXT_ATTR_MAP(TamEvent, SwitchEventId) @@ -78,6 +86,11 @@ WRAP_REMOVE_FUNC(tam_transport, SAI_OBJECT_TYPE_TAM_TRANSPORT, tam); WRAP_SET_ATTR_FUNC(tam_transport, SAI_OBJECT_TYPE_TAM_TRANSPORT, tam); WRAP_GET_ATTR_FUNC(tam_transport, SAI_OBJECT_TYPE_TAM_TRANSPORT, tam); +WRAP_CREATE_FUNC(tam_collector, SAI_OBJECT_TYPE_TAM_COLLECTOR, tam); +WRAP_REMOVE_FUNC(tam_collector, SAI_OBJECT_TYPE_TAM_COLLECTOR, tam); +WRAP_SET_ATTR_FUNC(tam_collector, SAI_OBJECT_TYPE_TAM_COLLECTOR, tam); +WRAP_GET_ATTR_FUNC(tam_collector, SAI_OBJECT_TYPE_TAM_COLLECTOR, tam); + sai_tam_api_t* wrappedTamApi() { handleExtensionAttributes(); static sai_tam_api_t tamWrappers; @@ -108,6 +121,11 @@ sai_tam_api_t* wrappedTamApi() { tamWrappers.set_tam_transport_attribute = &wrap_set_tam_transport_attribute; tamWrappers.get_tam_transport_attribute = &wrap_get_tam_transport_attribute; + tamWrappers.create_tam_collector = &wrap_create_tam_collector; + tamWrappers.remove_tam_collector = &wrap_remove_tam_collector; + tamWrappers.set_tam_collector_attribute = &wrap_set_tam_collector_attribute; + tamWrappers.get_tam_collector_attribute = &wrap_get_tam_transport_attribute; + return &tamWrappers; } @@ -116,5 +134,6 @@ SET_SAI_ATTRIBUTES(TamEvent) SET_SAI_ATTRIBUTES(TamEventAction) SET_SAI_ATTRIBUTES(TamReport) SET_SAI_ATTRIBUTES(TamTransport) +SET_SAI_ATTRIBUTES(TamCollector) } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/tracer/TamApiTracer.h b/fboss/agent/hw/sai/tracer/TamApiTracer.h index 8b67e99b8d48c..fe2bf029f895e 100644 --- a/fboss/agent/hw/sai/tracer/TamApiTracer.h +++ b/fboss/agent/hw/sai/tracer/TamApiTracer.h @@ -13,5 +13,6 @@ SET_ATTRIBUTE_FUNC_DECLARATION(TamEvent); SET_ATTRIBUTE_FUNC_DECLARATION(TamEventAction); SET_ATTRIBUTE_FUNC_DECLARATION(TamReport); SET_ATTRIBUTE_FUNC_DECLARATION(TamTransport); +SET_ATTRIBUTE_FUNC_DECLARATION(TamCollector); } // namespace facebook::fboss From b104d31dedb4a4bb9eb2c312d4c2572aed699a56 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Mon, 14 Oct 2024 09:31:07 -0700 Subject: [PATCH 104/479] Add SAI TAM Collector Store Summary: Add SAI TAM collector to SaiStore. Reviewed By: nivinl Differential Revision: D64123473 fbshipit-source-id: cda7bfd70b5e5f08cfd2c0a0dba81b38b6bbc047 --- fboss/agent/hw/sai/api/LoggingUtil.cpp | 2 + fboss/agent/hw/sai/store/SaiStore.h | 1 + .../agent/hw/sai/store/tests/TamStoreTest.cpp | 181 ++++++++++++++++++ 3 files changed, 184 insertions(+) diff --git a/fboss/agent/hw/sai/api/LoggingUtil.cpp b/fboss/agent/hw/sai/api/LoggingUtil.cpp index 07cd7de6ac3af..289553b79c751 100644 --- a/fboss/agent/hw/sai/api/LoggingUtil.cpp +++ b/fboss/agent/hw/sai/api/LoggingUtil.cpp @@ -208,6 +208,8 @@ folly::StringPiece saiObjectTypeToString(sai_object_type_t objectType) { return "debug-counter"; case SAI_OBJECT_TYPE_WRED: return "wred"; + case SAI_OBJECT_TYPE_TAM_COLLECTOR: + return "tam-collector"; case SAI_OBJECT_TYPE_TAM_TRANSPORT: return "tam-transport"; case SAI_OBJECT_TYPE_TAM_REPORT: diff --git a/fboss/agent/hw/sai/store/SaiStore.h b/fboss/agent/hw/sai/store/SaiStore.h index 9b30b74a41d34..31f529c809f9b 100644 --- a/fboss/agent/hw/sai/store/SaiStore.h +++ b/fboss/agent/hw/sai/store/SaiStore.h @@ -629,6 +629,7 @@ class SaiStore { SaiObjectStore, SaiObjectStore, SaiObjectStore, + SaiObjectStore, SaiObjectStore, SaiObjectStore, SaiObjectStore, diff --git a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp index 8c91295c25732..832051dfda57f 100644 --- a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp @@ -14,6 +14,28 @@ class TamStoreTest : public SaiStoreTest { SaiStoreTest::SetUp(); } + const folly::IPAddress kTamCollectorSrcIpV4{"1.1.1.1"}; + const folly::IPAddress kTamCollectorDstIpV4{"2.2.2.2"}; + const folly::IPAddress kTamCollectorSrcIpV6{"2401::1"}; + const folly::IPAddress kTamCollectorDstIpV6{"2401::2"}; + + facebook::fboss::SaiTamCollectorTraits::CreateAttributes tamCollectorTraits( + facebook::fboss::TamTransportSaiId transportId, + bool ipV4) { + SaiTamCollectorTraits::CreateAttributes result; + std::get(result) = + ipV4 ? kTamCollectorSrcIpV4 : kTamCollectorSrcIpV6; + std::get(result) = + ipV4 ? kTamCollectorDstIpV4 : kTamCollectorDstIpV6; + std::get>( + result) = 128; + std::get(result) = + SaiTamCollectorTraits::Attributes::Transport{transportId}; + std::get>( + result) = 0; + return result; + } + facebook::fboss::SaiTamTransportTraits::CreateAttributes tamTransportTraits() { SaiTamTransportTraits::CreateAttributes result; @@ -59,6 +81,13 @@ class TamStoreTest : public SaiStoreTest { return SaiTamTraits::CreateAttributes{events, bindpoints}; } + facebook::fboss::TamCollectorSaiId createCollector( + facebook::fboss::TamTransportSaiId transportId, + bool ipV4) { + return saiApiTable->tamApi().create( + tamCollectorTraits(transportId, ipV4), ipV4 ? 0 : 1); + } + facebook::fboss::TamTransportSaiId createTransport() { return saiApiTable->tamApi().create( tamTransportTraits(), 0); @@ -87,6 +116,8 @@ class TamStoreTest : public SaiStoreTest { TEST_F(TamStoreTest, loadTam) { auto transport = createTransport(); + auto collectorV4 = createCollector(transport, true /* ipV4 */); + auto collectorV6 = createCollector(transport, false /* ipV4 */); auto report = createReport(); auto action = createEventAction(report); auto event = createEvent(action); @@ -95,11 +126,20 @@ TEST_F(TamStoreTest, loadTam) { SaiStore s(0); s.reload(); + auto& collectorStore = s.get(); auto& transportStore = s.get(); auto& reportStore = s.get(); auto& actionStore = s.get(); auto& eventStore = s.get(); auto& tamStore = s.get(); + EXPECT_EQ( + collectorStore.get(tamCollectorTraits(transport, true /* ipV4 */)) + ->adapterKey(), + collectorV4); + EXPECT_EQ( + collectorStore.get(tamCollectorTraits(transport, false /* ipV4 */)) + ->adapterKey(), + collectorV6); EXPECT_EQ(transportStore.get(tamTransportTraits())->adapterKey(), transport); EXPECT_EQ( reportStore @@ -117,6 +157,8 @@ TEST_F(TamStoreTest, loadTam) { TEST_F(TamStoreTest, tamCtors) { auto transport = createTransport(); + auto collectorV4 = createCollector(transport, true /* ipV4 */); + auto collectorV6 = createCollector(transport, false /* ipV4 */); auto report = createReport(); auto action = createEventAction(report); auto event = createEvent(action); @@ -141,6 +183,60 @@ TEST_F(TamStoreTest, tamCtors) { std::get(tamTransportAhk) .value()); + auto collectorObjV4 = createObj(collectorV4); + auto tamCollectorAhkV4 = tamCollectorTraits(transport, true /* ipV4 */); + EXPECT_EQ( + GET_ATTR(TamCollector, SrcIp, collectorObjV4.attributes()), + std::get(tamCollectorAhkV4) + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, DstIp, collectorObjV4.attributes()), + std::get(tamCollectorAhkV4) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, TruncateSize, collectorObjV4.attributes()), + std::get>( + tamCollectorAhkV4) + .value() + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, Transport, collectorObjV4.attributes()), + std::get(tamCollectorAhkV4) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, DscpValue, collectorObjV4.attributes()), + std::get>( + tamCollectorAhkV4) + .value() + .value()); + + auto collectorObjV6 = createObj(collectorV6); + auto tamCollectorAhkV6 = tamCollectorTraits(transport, false /* ipV6 */); + EXPECT_EQ( + GET_ATTR(TamCollector, SrcIp, collectorObjV6.attributes()), + std::get(tamCollectorAhkV6) + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, DstIp, collectorObjV6.attributes()), + std::get(tamCollectorAhkV6) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, TruncateSize, collectorObjV6.attributes()), + std::get>( + tamCollectorAhkV6) + .value() + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, Transport, collectorObjV6.attributes()), + std::get(tamCollectorAhkV6) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, DscpValue, collectorObjV6.attributes()), + std::get>( + tamCollectorAhkV6) + .value() + .value()); + auto reportObj = createObj(report); EXPECT_EQ( GET_ATTR(TamReport, Type, reportObj.attributes()), @@ -199,6 +295,64 @@ TEST_F(TamStoreTest, setObject) { GET_ATTR(TamTransport, Mtu, transport->attributes()), std::get(transportAhk).value()); + auto collectorAhkV4 = + tamCollectorTraits(transport->adapterKey(), true /* ipV4 */); + auto collectorV4 = + s.get().setObject(collectorAhkV4, collectorAhkV4); + EXPECT_EQ( + GET_ATTR(TamCollector, SrcIp, collectorV4->attributes()), + std::get(collectorAhkV4) + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, DstIp, collectorV4->attributes()), + std::get(collectorAhkV4) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, TruncateSize, collectorV4->attributes()), + std::get>( + collectorAhkV4) + .value() + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, Transport, collectorV4->attributes()), + std::get(collectorAhkV4) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, DscpValue, collectorV4->attributes()), + std::get>( + collectorAhkV4) + .value() + .value()); + + auto collectorAhkV6 = + tamCollectorTraits(transport->adapterKey(), false /* ipV6 */); + auto collectorV6 = + s.get().setObject(collectorAhkV6, collectorAhkV6); + EXPECT_EQ( + GET_ATTR(TamCollector, SrcIp, collectorV6->attributes()), + std::get(collectorAhkV6) + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, DstIp, collectorV6->attributes()), + std::get(collectorAhkV6) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, TruncateSize, collectorV6->attributes()), + std::get>( + collectorAhkV6) + .value() + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, Transport, collectorV6->attributes()), + std::get(collectorAhkV6) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, DscpValue, collectorV6->attributes()), + std::get>( + collectorAhkV6) + .value() + .value()); + auto reportKey = tamReportTraits(); auto report = s.get().setObject(reportKey, reportKey); EXPECT_EQ( @@ -256,6 +410,16 @@ TEST_F(TamStoreTest, updateObject) { auto transport = s.get().setObject(transportAhk, transportAhk); + auto collectorAhkV4 = + tamCollectorTraits(transport->adapterKey(), true /* ipV4 */); + auto collectorV4 = + s.get().setObject(collectorAhkV4, collectorAhkV4); + + auto collectorAhkV6 = + tamCollectorTraits(transport->adapterKey(), false /* ipV4 */); + auto collectorV6 = + s.get().setObject(collectorAhkV6, collectorAhkV6); + auto tamAhk = tamTraits(event->adapterKey()); auto tam = s.get().setObject(tamAhk, tamAhk); @@ -272,4 +436,21 @@ TEST_F(TamStoreTest, updateObject) { s.get().setObject(transportAhk, transportAhk); EXPECT_EQ( GET_ATTR(TamTransport, DstPort, updatedTransport->attributes()), 10003); + + std::get>( + collectorAhkV4) = 256; + auto updatedCollectorV4 = + s.get().setObject(collectorAhkV4, collectorAhkV4); + EXPECT_EQ( + GET_OPT_ATTR( + TamCollector, TruncateSize, updatedCollectorV4->attributes()), + 256); + + std::get>( + collectorAhkV6) = 2; + auto updatedCollectorV6 = + s.get().setObject(collectorAhkV6, collectorAhkV6); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, DscpValue, updatedCollectorV6->attributes()), + 2); } From bdb24a05bc8fc520598b8c1464b411465f73118e Mon Sep 17 00:00:00 2001 From: Max Ng Date: Mon, 14 Oct 2024 09:31:07 -0700 Subject: [PATCH 105/479] Add SAI TAM Collector to SaiSwitch Summary: Add SAI TAM collector to SaiSwitch. Reviewed By: nivinl Differential Revision: D64019353 fbshipit-source-id: 84f81df6519c36ac25e08ecd8663040c9922609e --- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 1 + fboss/agent/hw/sai/switch/SaiTamManager.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 524a60b8e50de..372d1109bd6d5 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -3693,6 +3693,7 @@ std::string SaiSwitch::listObjects( objTypes.push_back(SAI_OBJECT_TYPE_DEBUG_COUNTER); break; case HwObjectType::TELEMETRY: + objTypes.push_back(SAI_OBJECT_TYPE_TAM_COLLECTOR); objTypes.push_back(SAI_OBJECT_TYPE_TAM_TRANSPORT); objTypes.push_back(SAI_OBJECT_TYPE_TAM_REPORT); objTypes.push_back(SAI_OBJECT_TYPE_TAM_EVENT_ACTION); diff --git a/fboss/agent/hw/sai/switch/SaiTamManager.h b/fboss/agent/hw/sai/switch/SaiTamManager.h index bcbd941944a6e..a040962065eda 100644 --- a/fboss/agent/hw/sai/switch/SaiTamManager.h +++ b/fboss/agent/hw/sai/switch/SaiTamManager.h @@ -11,6 +11,7 @@ class SaiManagerTable; class SaiPlatform; class SaiStore; +using SaiTamCollector = SaiObject; using SaiTamTransport = SaiObject; using SaiTamReport = SaiObject; using SaiTamEventAction = SaiObject; @@ -18,6 +19,7 @@ using SaiTamEvent = SaiObject; using SaiTam = SaiObject; struct SaiTamHandle { + std::shared_ptr collector; std::shared_ptr transport; std::shared_ptr report; std::shared_ptr action; From 8e263031a8bd31bbd994386a0d33b0df79d2ee8a Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Mon, 14 Oct 2024 09:35:15 -0700 Subject: [PATCH 106/479] Updating submodules Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/c06384e55772046d1fdd19f3c6d04ab5dc929f91 https://github.com/facebook/fb303/commit/943f36701bb462e9e1fa8f693ac4a6965c5458c2 https://github.com/facebook/fbthrift/commit/f2c4e6c61f8235d909f0af06ac0bb3043a2ce3a5 https://github.com/facebook/folly/commit/b293f9eac370fe89d437a53c73d58ac575407245 https://github.com/facebook/mvfst/commit/71571281fd50deb5cd237f09e334df5851c4d1bc https://github.com/facebook/proxygen/commit/c86014c30b4d5ade2c3849b0e35a4ae070bc80d3 https://github.com/facebook/wangle/commit/997ed56811317851126281e0fdf4cc0a998eb319 https://github.com/facebookexperimental/edencommon/commit/6d4f09aa46a8f2acd91a01e5f404bfda62d875ae https://github.com/facebookexperimental/rust-shed/commit/6543321dba977d6e0081aef8ad4012d9971f8a1a https://github.com/facebookincubator/fizz/commit/6bc89c741356c393fd800ae2b9df8a917769c804 Reviewed By: bigfootjon fbshipit-source-id: 3fd1baadcfb28b95e1502d36b3dad48abb92b986 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 94e2576960bb4..8363f70483563 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit adcc9b7a0f8149c0899df1734207021d03a0b359 +Subproject commit 943f36701bb462e9e1fa8f693ac4a6965c5458c2 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 4ebb68b5866b9..3ccd6761ea759 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 4408523755ed370e1358acce44a26b350c204f9b +Subproject commit f2c4e6c61f8235d909f0af06ac0bb3043a2ce3a5 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index e0e94d9e9f659..babd0cbb4b834 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit ad90720829db5ba0c3d0e44994856dcce33d7940 +Subproject commit b293f9eac370fe89d437a53c73d58ac575407245 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 97a473c3e6646..a9ccc4fc6f1d6 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 8107673c3417e7cf88b4953ac7cc199dee63ee8c +Subproject commit 997ed56811317851126281e0fdf4cc0a998eb319 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 3fd586941f20b..72a4492190d27 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit cbcc84080cacc0006fd5ac464a6c57604057cfb0 +Subproject commit 6bc89c741356c393fd800ae2b9df8a917769c804 From 6bed442b2937ffba7fb9e835822df00b4485e322 Mon Sep 17 00:00:00 2001 From: TJ Yin Date: Mon, 14 Oct 2024 10:11:47 -0700 Subject: [PATCH 107/479] Migrate away from fatal for thrift enum Summary: Thrift is migrating away from fatal. This diff migrates fboss to the thrift API. Differential Revision: D64302350 fbshipit-source-id: dd4cce96709c60e35abc081dd70f9cc6d70a1d56 --- fboss/thrift_cow/nodes/BUCK | 1 + fboss/thrift_cow/nodes/NodeUtils.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fboss/thrift_cow/nodes/BUCK b/fboss/thrift_cow/nodes/BUCK index 63109da96a1dd..daa2f0268c4b7 100644 --- a/fboss/thrift_cow/nodes/BUCK +++ b/fboss/thrift_cow/nodes/BUCK @@ -25,6 +25,7 @@ cpp_library( ":serializer", "//fatal:fatal", "//folly:conv", + "//thrift/lib/cpp/util:enum_utils", "//thrift/lib/cpp2/reflection:reflection", ], ) diff --git a/fboss/thrift_cow/nodes/NodeUtils.h b/fboss/thrift_cow/nodes/NodeUtils.h index 7114f59d4496f..6f2506c8d5b98 100644 --- a/fboss/thrift_cow/nodes/NodeUtils.h +++ b/fboss/thrift_cow/nodes/NodeUtils.h @@ -6,6 +6,7 @@ #include #include +#include #include namespace facebook::fboss::thrift_cow { @@ -19,7 +20,7 @@ std::optional tryParseKey(const std::string& token) { is_same_v) { // special handling for enum keyed maps KeyT enumKey; - if (fatal::enum_traits::try_parse(enumKey, token)) { + if (apache::thrift::util::tryParseEnum(token, &enumKey)) { return enumKey; } } From bb4a5d0c5cec4fb207fdf98711848c65e4aacbc2 Mon Sep 17 00:00:00 2001 From: Alex Hornby Date: Mon, 14 Oct 2024 12:17:46 -0700 Subject: [PATCH 108/479] getdeps: add xxhash ubuntu and homebrew packages, fix actions generation and regenerate Summary: X-link: https://github.com/facebookincubator/zstrong/pull/1010 EdenFS build on github CI was failing with missing xxhash include: https://github.com/facebook/sapling/actions/runs/11311478649/job/31457761727#step:108:3838 Add package mappings to the xxhash manifest When I went to regenerate the github actions found I'd previously introduced a bug in the actions generation with a mis-merged run_tests check. Fix it and regenerate X-link: https://github.com/facebook/sapling/pull/966 Reviewed By: genevievehelsel Differential Revision: D64302134 Pulled By: ahornby fbshipit-source-id: 3384dab4f31e202881310e2b5369bb23fb533a1b --- build/fbcode_builder/getdeps.py | 18 ++++++++++++++---- build/fbcode_builder/manifests/xxhash | 7 +++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/build/fbcode_builder/getdeps.py b/build/fbcode_builder/getdeps.py index 8a42fcd43c7c9..ef81d3c3c887b 100755 --- a/build/fbcode_builder/getdeps.py +++ b/build/fbcode_builder/getdeps.py @@ -959,6 +959,10 @@ def get_run_on(self, args): def write_job_for_platform(self, platform, args): # noqa: C901 build_opts = setup_build_options(args, platform) ctx_gen = build_opts.get_context_generator() + if args.enable_tests: + ctx_gen.set_value_for_project(args.project, "test", "on") + else: + ctx_gen.set_value_for_project(args.project, "test", "off") loader = ManifestLoader(build_opts, ctx_gen) self.process_project_dir_arguments(args, loader) manifest = loader.load_manifest(args.project) @@ -1081,7 +1085,10 @@ def write_job_for_platform(self, platform, args): # noqa: C901 free_up_disk = "" allow_sys_arg = "" - if run_tests: + if ( + build_opts.allow_system_packages + and build_opts.host_type.get_package_manager() + ): sudo_arg = "sudo " allow_sys_arg = " --allow-system-packages" if build_opts.host_type.get_package_manager() == "deb": @@ -1092,13 +1099,16 @@ def write_job_for_platform(self, platform, args): # noqa: C901 if build_opts.is_darwin(): # brew is installed as regular user sudo_arg = "" + tests_arg = "--no-tests " + if run_tests: + tests_arg = "" out.write( - f" run: {sudo_arg}python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive {manifest.name}\n" + f" run: {sudo_arg}python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps {tests_arg}--recursive {manifest.name}\n" ) if build_opts.is_linux() or build_opts.is_freebsd(): out.write(" - name: Install packaging system deps\n") out.write( - f" run: {sudo_arg}python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive patchelf\n" + f" run: {sudo_arg}python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps {tests_arg}--recursive patchelf\n" ) required_locales = manifest.get( "github.actions", "required_locales", ctx=manifest_ctx @@ -1176,7 +1186,7 @@ def write_job_for_platform(self, platform, args): # noqa: C901 no_deps_arg = "--no-deps " no_tests_arg = "" - if not args.enable_tests: + if not run_tests: no_tests_arg = "--no-tests " out.write( diff --git a/build/fbcode_builder/manifests/xxhash b/build/fbcode_builder/manifests/xxhash index 8e490011e5800..557ded0ddd5e9 100644 --- a/build/fbcode_builder/manifests/xxhash +++ b/build/fbcode_builder/manifests/xxhash @@ -8,6 +8,13 @@ sha256 = baee0c6afd4f03165de7a4e67988d16f0f2b257b51d0e3cb91909302a26a79c4 [rpms] xxhash-devel +[debs] +libxxhash-dev +xxhash + +[homebrew] +xxhash + [build.not(os=windows)] builder = make subdir = xxHash-0.8.2 From d3729faeba8c05b00b8ef90e2a7d4a9bf1cc0b1e Mon Sep 17 00:00:00 2001 From: Ron He Date: Mon, 14 Oct 2024 12:26:46 -0700 Subject: [PATCH 109/479] Fix typo in sys port range calculation Summary: This is to support Voq Scale tests to work on devices with more than one NPU (Janga). Instead of creating dsfNodes/sys port range starting at the 2nd DSF node, compute those based on the current dsfNode struct (which will contain two nodes for Janga). Fix the typo of using current dsfNode size instead of numCores. Reviewed By: daiwei1983 Differential Revision: D64344443 fbshipit-source-id: df9e8e1723ee8b4181ca8c1706e95e0b35ae13bb --- fboss/agent/test/utils/DsfConfigUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fboss/agent/test/utils/DsfConfigUtils.cpp b/fboss/agent/test/utils/DsfConfigUtils.cpp index ced65c5ac98f3..614c7823c868a 100644 --- a/fboss/agent/test/utils/DsfConfigUtils.cpp +++ b/fboss/agent/test/utils/DsfConfigUtils.cpp @@ -63,7 +63,7 @@ std::optional> addRemoteIntfNodeCfg( : getDsfNodeCount(*asic); int remoteNodeStart = dsfNodes.rbegin()->first + numCores; int systemPortMin = - getPerNodeSysPorts(*asic, dsfNodes.begin()->first) * numCores; + getPerNodeSysPorts(*asic, dsfNodes.begin()->first) * curDsfNodes.size(); for (int remoteSwitchId = remoteNodeStart; remoteSwitchId < totalNodes * numCores; remoteSwitchId += numCores) { From ff0282df3cec97a1d04d7d26e51d9aeab0605549 Mon Sep 17 00:00:00 2001 From: Ron He Date: Mon, 14 Oct 2024 15:42:15 -0700 Subject: [PATCH 110/479] Add benchmark for sys port scale programming Summary: As titled. Measure time to program full system port scale + remote intf resolution. Reviewed By: jasmeetbagga Differential Revision: D64342571 fbshipit-source-id: 0bfc9ac85ebcc09d9517ebd16d0162e1f776c728 --- cmake/AgentHwBenchmarks.cmake | 11 +++ cmake/AgentHwSaiBenchmarks.cmake | 23 +++++- fboss/agent/hw/benchmarks/BUCK | 6 ++ .../HwVoqSysPortProgrammingBenchmark.cpp | 71 +++++++++++++++++++ fboss/agent/hw/sai/benchmarks/BUCK | 2 + 5 files changed, 110 insertions(+), 3 deletions(-) create mode 100644 fboss/agent/hw/benchmarks/HwVoqSysPortProgrammingBenchmark.cpp diff --git a/cmake/AgentHwBenchmarks.cmake b/cmake/AgentHwBenchmarks.cmake index ef73c370f8c08..42ba5560999bf 100644 --- a/cmake/AgentHwBenchmarks.cmake +++ b/cmake/AgentHwBenchmarks.cmake @@ -426,3 +426,14 @@ target_link_libraries(hw_switch_reachability_change_speed Folly::folly Folly::follybenchmark ) + +add_library(hw_voq_sys_port_programming + fboss/agent/hw/benchmarks/HwVoqSysPortProgrammingBenchmark.cpp +) + +target_link_libraries(hw_voq_sys_port_programming + voq_test_utils + dsf_config_utils + Folly::folly + Folly::follybenchmark +) diff --git a/cmake/AgentHwSaiBenchmarks.cmake b/cmake/AgentHwSaiBenchmarks.cmake index 083613688a753..e45f6b5677e02 100644 --- a/cmake/AgentHwSaiBenchmarks.cmake +++ b/cmake/AgentHwSaiBenchmarks.cmake @@ -471,15 +471,15 @@ function(BUILD_SAI_BENCHMARKS SAI_IMPL_NAME SAI_IMPL_ARG) ) add_executable(sai_switch_reachability_change_speed-${SAI_IMPL_NAME} /dev/null) - + target_link_libraries(sai_switch_reachability_change_speed-${SAI_IMPL_NAME} -Wl,--whole-archive hw_switch_reachability_change_speed mono_sai_agent_benchmarks_main ${SAI_IMPL_ARG} -Wl,--no-whole-archive - ) - + ) + set_target_properties(sai_switch_reachability_change_speed-${SAI_IMPL_NAME} PROPERTIES COMPILE_FLAGS "-DSAI_VER_MAJOR=${SAI_VER_MAJOR} \ @@ -487,6 +487,23 @@ function(BUILD_SAI_BENCHMARKS SAI_IMPL_NAME SAI_IMPL_ARG) -DSAI_VER_RELEASE=${SAI_VER_RELEASE}" ) + add_executable(sai_voq_sys_port_programming-${SAI_IMPL_NAME} /dev/null) + + target_link_libraries(sai_voq_sys_port_programming-${SAI_IMPL_NAME} + -Wl,--whole-archive + hw_voq_sys_port_programming + mono_sai_agent_benchmarks_main + ${SAI_IMPL_ARG} + -Wl,--no-whole-archive + ) + + set_target_properties(sai_voq_sys_port_programming-${SAI_IMPL_NAME} + PROPERTIES COMPILE_FLAGS + "-DSAI_VER_MAJOR=${SAI_VER_MAJOR} \ + -DSAI_VER_MINOR=${SAI_VER_MINOR} \ + -DSAI_VER_RELEASE=${SAI_VER_RELEASE}" + ) + endfunction() if(BUILD_SAI_FAKE AND BUILD_SAI_FAKE_BENCHMARKS) diff --git a/fboss/agent/hw/benchmarks/BUCK b/fboss/agent/hw/benchmarks/BUCK index 5694f6c71aef5..6462497e7593e 100644 --- a/fboss/agent/hw/benchmarks/BUCK +++ b/fboss/agent/hw/benchmarks/BUCK @@ -378,3 +378,9 @@ agent_benchmark_lib( "//fboss/agent/hw/test:hw_test_thrift_handler_h", ], ) + +agent_benchmark_lib( + name = "hw_voq_sys_port_programming", + srcs = ["HwVoqSysPortProgrammingBenchmark.cpp"], + extra_deps = [], +) diff --git a/fboss/agent/hw/benchmarks/HwVoqSysPortProgrammingBenchmark.cpp b/fboss/agent/hw/benchmarks/HwVoqSysPortProgrammingBenchmark.cpp new file mode 100644 index 0000000000000..7ae385be49ed3 --- /dev/null +++ b/fboss/agent/hw/benchmarks/HwVoqSysPortProgrammingBenchmark.cpp @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#include "fboss/agent/AgentFeatures.h" +#include "fboss/agent/DsfStateUpdaterUtil.h" +#include "fboss/agent/FibHelpers.h" +#include "fboss/agent/Utils.h" +#include "fboss/agent/hw/test/ConfigFactory.h" +#include "fboss/agent/test/AgentEnsemble.h" +#include "fboss/agent/test/utils/DsfConfigUtils.h" +#include "fboss/agent/test/utils/VoqTestUtils.h" +#include "fboss/lib/FunctionCallTimeReporter.h" + +#include + +namespace facebook::fboss { + +BENCHMARK(HwVoqSysPortProgramming) { + folly::BenchmarkSuspender suspender; + + AgentEnsembleSwitchConfigFn voqInitialConfig = + [](const AgentEnsemble& ensemble) { + FLAGS_hide_fabric_ports = false; + FLAGS_dsf_subscribe = false; + auto config = utility::onePortPerInterfaceConfig( + ensemble.getSw(), + ensemble.masterLogicalPortIds(), + true, /*interfaceHasSubnet*/ + true, /*setInterfaceMac*/ + utility::kBaseVlanId, + true /*enable fabric ports*/); + config.dsfNodes() = *utility::addRemoteIntfNodeCfg(*config.dsfNodes()); + return config; + }; + auto ensemble = + createAgentEnsemble(voqInitialConfig, false /*disableLinkStateToggler*/); + ScopedCallTimer timeIt; + + auto updateDsfStateFn = [&ensemble](const std::shared_ptr& in) { + std::map> switchId2SystemPorts; + std::map> switchId2Rifs; + utility::populateRemoteIntfAndSysPorts( + switchId2SystemPorts, + switchId2Rifs, + ensemble->getSw()->getConfig(), + ensemble->getSw()->getHwAsicTable()->isFeatureSupportedOnAllAsic( + HwAsic::Feature::RESERVED_ENCAP_INDEX_RANGE)); + return DsfStateUpdaterUtil::getUpdatedState( + in, + ensemble->getSw()->getScopeResolver(), + ensemble->getSw()->getRib(), + switchId2SystemPorts, + switchId2Rifs); + }; + + suspender.dismiss(); + ensemble->getSw()->getRib()->updateStateInRibThread( + [&ensemble, updateDsfStateFn]() { + ensemble->getSw()->updateStateWithHwFailureProtection( + folly::sformat("Update state for node: {}", 0), updateDsfStateFn); + }); + suspender.rehire(); +} +} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/benchmarks/BUCK b/fboss/agent/hw/sai/benchmarks/BUCK index 499c863a7a7ec..05b0fe97fa3e4 100644 --- a/fboss/agent/hw/sai/benchmarks/BUCK +++ b/fboss/agent/hw/sai/benchmarks/BUCK @@ -37,6 +37,7 @@ sai_mono_agent_benchmark( "//fboss/agent/hw/benchmarks:hw_tx_slow_path_rate", "//fboss/agent/hw/benchmarks:hw_voq_scale_route_add_speed", "//fboss/agent/hw/benchmarks:hw_voq_scale_route_del_speed", + "//fboss/agent/hw/benchmarks:hw_voq_sys_port_programming", "//fboss/agent/test:route_scale_gen", ], ) @@ -61,6 +62,7 @@ sai_multi_switch_agent_benchmark( "//fboss/agent/hw/benchmarks:hw_tx_slow_path_rate", "//fboss/agent/hw/benchmarks:hw_voq_scale_route_add_speed", "//fboss/agent/hw/benchmarks:hw_voq_scale_route_del_speed", + "//fboss/agent/hw/benchmarks:hw_voq_sys_port_programming", "//fboss/agent/test:route_scale_gen", ], ) From 72580a8a614c2c9860e9b750dba991f57f37d50b Mon Sep 17 00:00:00 2001 From: genkzgnluxbjeyb Date: Mon, 14 Oct 2024 16:01:00 -0700 Subject: [PATCH 111/479] fboss_link_known_bad_tests_sync Differential Revision: D64344595 fbshipit-source-id: 2cb3e33625f48b549f1e4d5c178109eb073d4fc5 --- ...oss_link_known_bad_tests.materialized_JSON | 3095 +++++++---------- 1 file changed, 1342 insertions(+), 1753 deletions(-) diff --git a/fboss/oss/link_known_bad_tests/fboss_link_known_bad_tests.materialized_JSON b/fboss/oss/link_known_bad_tests/fboss_link_known_bad_tests.materialized_JSON index 15fda659a2963..bca1dcf46d98a 100644 --- a/fboss/oss/link_known_bad_tests/fboss_link_known_bad_tests.materialized_JSON +++ b/fboss/oss/link_known_bad_tests/fboss_link_known_bad_tests.materialized_JSON @@ -11792,7 +11792,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ + "janga800bic/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -11838,48 +11838,9 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" - }, - { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" - }, - { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -11893,7 +11854,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "janga800bic/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -11940,46 +11901,69 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LacpTest.lacpFlap$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "LinkTest.verifyIphyFecCounters$" + } + ], + "janga800bic/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + { + "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "FsdbTest.statsPublishSubscribe$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "MacsecTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "MacsecFsdbTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTc.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" + }, + { + "test_name_regex": "PtpTests.*$" + }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -11994,7 +11978,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "janga800bic/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12041,46 +12025,69 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LacpTest.lacpFlap$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "LinkTest.verifyIphyFecCounters$" + } + ], + "janga800bic/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + { + "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "FsdbTest.statsPublishSubscribe$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "MacsecTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "MacsecFsdbTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTc.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" + }, + { + "test_name_regex": "PtpTests.*$" + }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -12095,7 +12102,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ + "janga800bic/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12142,46 +12149,69 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LacpTest.lacpFlap$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "LinkTest.verifyIphyFecCounters$" + } + ], + "janga800bic/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ + { + "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "FsdbTest.statsPublishSubscribe$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "MacsecTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "MacsecFsdbTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTc.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" + }, + { + "test_name_regex": "PtpTests.*$" + }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -12196,7 +12226,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "janga800bic/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12243,46 +12273,69 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LacpTest.lacpFlap$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "LinkTest.verifyIphyFecCounters$" + } + ], + "janga800bic/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + { + "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "FsdbTest.statsPublishSubscribe$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "MacsecTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "MacsecFsdbTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTc.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" + }, + { + "test_name_regex": "PtpTests.*$" + }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -12297,7 +12350,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12398,7 +12451,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ + "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12499,7 +12552,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12600,7 +12653,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12701,7 +12754,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ + "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12748,25 +12801,25 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" @@ -12786,6 +12839,9 @@ { "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -12799,7 +12855,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12845,6 +12901,12 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -12854,18 +12916,12 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, @@ -12884,6 +12940,9 @@ { "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -12897,7 +12956,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru400bfu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12943,6 +13002,12 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -12952,18 +13017,12 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, @@ -12982,6 +13041,9 @@ { "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -12995,7 +13057,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ + "meru400bfu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13041,6 +13103,12 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -13050,18 +13118,12 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, @@ -13080,6 +13142,9 @@ { "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -13093,7 +13158,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru400bfu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13139,6 +13204,12 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -13148,18 +13219,12 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, @@ -13178,6 +13243,9 @@ { "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -13191,7 +13259,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13289,7 +13357,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ + "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13387,7 +13455,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13485,7 +13553,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13583,7 +13651,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ + "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13630,28 +13698,43 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + }, + { + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -13666,7 +13749,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13713,28 +13796,43 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + }, + { + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -13749,7 +13847,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru400biu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13796,28 +13894,43 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + }, + { + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -13832,7 +13945,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ + "meru400biu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13879,28 +13992,43 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + }, + { + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -13915,7 +14043,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru400biu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13962,28 +14090,43 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + }, + { + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -13998,7 +14141,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14081,7 +14224,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ + "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14164,7 +14307,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14247,7 +14390,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14330,7 +14473,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ + "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14376,9 +14519,30 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableEnable$" + }, + { + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -14392,7 +14556,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14438,9 +14602,30 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableEnable$" + }, + { + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -14454,7 +14639,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru800bfa/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14500,9 +14685,30 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableEnable$" + }, + { + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -14516,7 +14722,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ + "meru800bfa/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14562,9 +14768,30 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableEnable$" + }, + { + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -14578,7 +14805,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru800bfa/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14624,9 +14851,30 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableEnable$" + }, + { + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -14640,7 +14888,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14702,7 +14950,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ + "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14764,7 +15012,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14826,7 +15074,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14888,7 +15136,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.26": [ + "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14908,13 +15156,10 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { "test_name_regex": "SpeedChangeTest.*$" @@ -14923,40 +15168,37 @@ "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "PtpTests.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.26/physdk-millenio-5.5/millenio-5.5": [ + "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14976,13 +15218,10 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { "test_name_regex": "SpeedChangeTest.*$" @@ -14991,40 +15230,37 @@ "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "PtpTests.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.28": [ + "meru800bia/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15044,13 +15280,10 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { "test_name_regex": "SpeedChangeTest.*$" @@ -15059,40 +15292,37 @@ "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "PtpTests.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.28/physdk-millenio-5.5/millenio-5.5": [ + "meru800bia/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15112,13 +15342,10 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { "test_name_regex": "SpeedChangeTest.*$" @@ -15127,40 +15354,37 @@ "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "PtpTests.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.28/6.5.28": [ + "meru800bia/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15180,13 +15404,10 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { "test_name_regex": "SpeedChangeTest.*$" @@ -15195,40 +15416,37 @@ "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PtpTests.*$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.28/6.5.28/physdk-millenio-5.5/millenio-5.5": [ + "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.26": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15296,332 +15514,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*$" - }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "minipack_7x16Q_1x16O/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*$" - }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*$" - }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*$" - }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*$" - }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ + "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.26/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15674,84 +15567,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "minipack_7x16Q_1x16O/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "MacLearningTest.l2EntryFlap" }, { "test_name_regex": "SpeedChangeTest.*$" }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ + "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15803,80 +15634,6 @@ { "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "montblanc/bcm/asicsdk-6.5.26/6.5.26": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, - { - "test_name_regex": "Prbs.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTc.*$" - }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, { "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, @@ -15893,7 +15650,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ + "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.28/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15912,26 +15669,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -15970,7 +15718,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ + "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.28/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15989,26 +15737,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16047,7 +15786,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.26/6.5.28": [ + "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.28/6.5.28/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16066,26 +15805,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16124,7 +15854,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "minipack_7x16Q_1x16O/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16143,26 +15873,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16186,22 +15907,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "minipack_7x16Q_1x16O/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16220,26 +15938,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16263,22 +15972,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.28/6.5.28": [ + "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16297,26 +16003,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16340,22 +16037,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16374,26 +16068,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16417,22 +16102,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16451,26 +16133,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16494,22 +16167,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ + "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16528,26 +16198,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16583,7 +16244,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "minipack_7x16Q_1x16O/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16602,26 +16263,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16657,7 +16309,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "minipack_7x16Q_1x16O/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16676,26 +16328,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16731,7 +16374,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ + "montblanc/bcm/asicsdk-6.5.26/6.5.26": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16793,19 +16436,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16867,19 +16513,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16941,19 +16590,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ + "montblanc/bcm/asicsdk-6.5.26/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17015,19 +16667,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17089,19 +16744,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17163,19 +16821,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ + "montblanc/bcm/asicsdk-6.5.28/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17237,19 +16898,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17311,19 +16975,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17385,19 +17052,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/1.42.8": [ + "montblanc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17422,6 +17092,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17437,6 +17110,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17446,15 +17122,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17468,16 +17135,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17502,6 +17166,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17517,6 +17184,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17526,15 +17196,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17548,16 +17209,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17582,6 +17240,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17597,6 +17258,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17606,15 +17270,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17628,16 +17283,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.4.90": [ + "montblanc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17662,6 +17314,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17677,6 +17332,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17686,15 +17344,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17708,16 +17357,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17742,6 +17388,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17757,6 +17406,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17766,15 +17418,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17788,16 +17431,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17822,6 +17462,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17837,6 +17480,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17846,15 +17492,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17868,16 +17505,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.4.90_yuba": [ + "montblanc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17902,6 +17536,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17917,6 +17554,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17926,15 +17566,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17948,16 +17579,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17982,6 +17610,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17997,6 +17628,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -18006,15 +17640,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -18028,16 +17653,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18062,6 +17684,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -18077,6 +17702,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -18086,15 +17714,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -18108,16 +17727,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.6.1_yuba": [ + "montblanc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18142,6 +17758,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -18157,6 +17776,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -18166,15 +17788,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -18188,16 +17801,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.6.1_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18222,6 +17832,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -18237,6 +17850,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -18246,15 +17862,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -18268,16 +17875,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.6.1_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18302,6 +17906,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -18317,6 +17924,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -18326,15 +17936,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -18348,16 +17949,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.8.3001": [ + "morgan800cc/sai/asicsdk-1.42.8/1.42.8": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18437,7 +18035,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18517,7 +18115,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18597,7 +18195,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.4.90/24.4.90": [ + "morgan800cc/sai/asicsdk-1.42.8/24.4.90": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18677,7 +18275,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18757,7 +18355,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18837,7 +18435,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.4.90_yuba/24.4.90_yuba": [ + "morgan800cc/sai/asicsdk-1.42.8/24.4.90_yuba": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18917,7 +18515,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18997,7 +18595,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19077,7 +18675,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.6.1_yuba/24.6.1_yuba": [ + "morgan800cc/sai/asicsdk-1.42.8/24.8.3001": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19157,7 +18755,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.6.1_yuba/24.6.1_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19237,7 +18835,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.6.1_yuba/24.6.1_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19317,7 +18915,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.8.3001/24.8.3001": [ + "morgan800cc/sai/asicsdk-24.4.90/24.4.90": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19397,7 +18995,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.8.3001/24.8.3001/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19477,7 +19075,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.8.3001/24.8.3001/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19557,7 +19155,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.26/6.5.26": [ + "morgan800cc/sai/asicsdk-24.4.90_yuba/24.4.90_yuba": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19582,15 +19180,15 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, + { + "test_name_regex": "Prbs.*$" + }, { "test_name_regex": "PtpTests.verifyPtpTc.*$" }, @@ -19607,34 +19205,37 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19659,15 +19260,15 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, + { + "test_name_regex": "Prbs.*$" + }, { "test_name_regex": "PtpTests.verifyPtpTc.*$" }, @@ -19684,34 +19285,37 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19736,15 +19340,15 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, + { + "test_name_regex": "Prbs.*$" + }, { "test_name_regex": "PtpTests.verifyPtpTc.*$" }, @@ -19761,34 +19365,37 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.26/6.5.28": [ + "morgan800cc/sai/asicsdk-24.8.3001/24.8.3001": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19813,15 +19420,15 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, + { + "test_name_regex": "Prbs.*$" + }, { "test_name_regex": "PtpTests.verifyPtpTc.*$" }, @@ -19838,34 +19445,37 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-24.8.3001/24.8.3001/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19890,15 +19500,15 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, + { + "test_name_regex": "Prbs.*$" + }, { "test_name_regex": "PtpTests.verifyPtpTc.*$" }, @@ -19915,34 +19525,37 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-24.8.3001/24.8.3001/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19967,15 +19580,15 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, + { + "test_name_regex": "Prbs.*$" + }, { "test_name_regex": "PtpTests.verifyPtpTc.*$" }, @@ -19992,34 +19605,37 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.28/6.5.28": [ + "tahan800bc/bcm/asicsdk-6.5.26/6.5.26": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20096,7 +19712,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20173,7 +19789,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20250,7 +19866,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ + "tahan800bc/bcm/asicsdk-6.5.26/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20312,19 +19928,22 @@ "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20386,19 +20005,22 @@ "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20460,19 +20082,22 @@ "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ + "tahan800bc/bcm/asicsdk-6.5.28/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20534,19 +20159,22 @@ "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20608,19 +20236,22 @@ "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20682,19 +20313,22 @@ "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ + "tahan800bc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20768,7 +20402,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20842,7 +20476,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20916,7 +20550,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ + "tahan800bc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20990,7 +20624,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21064,7 +20698,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21138,7 +20772,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.26/6.5.26": [ + "tahan800bc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21157,39 +20791,27 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable" - }, - { - "test_name_regex": "LinkTest.getTransceivers" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, - { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -21200,28 +20822,31 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21240,39 +20865,27 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable" - }, - { - "test_name_regex": "LinkTest.getTransceivers" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, - { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -21283,28 +20896,31 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21323,39 +20939,27 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable" - }, - { - "test_name_regex": "LinkTest.getTransceivers" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, - { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -21366,28 +20970,31 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.26/6.5.28": [ + "tahan800bc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21406,39 +21013,27 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable" - }, - { - "test_name_regex": "LinkTest.getTransceivers" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, - { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -21449,28 +21044,31 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21489,39 +21087,27 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable" - }, - { - "test_name_regex": "LinkTest.getTransceivers" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, - { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -21532,28 +21118,31 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21572,39 +21161,27 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable" - }, - { - "test_name_regex": "LinkTest.getTransceivers" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, - { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -21615,28 +21192,31 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + }, + { + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.28/6.5.28": [ + "wedge100s/bcm/asicsdk-6.5.26/6.5.26": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21719,7 +21299,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21802,7 +21382,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21885,7 +21465,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ + "wedge100s/bcm/asicsdk-6.5.26/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21953,19 +21533,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22033,19 +21616,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22113,19 +21699,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ + "wedge100s/bcm/asicsdk-6.5.28/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22193,19 +21782,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22273,19 +21865,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22353,19 +21948,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ + "wedge100s/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22445,7 +22043,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22525,7 +22123,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22605,7 +22203,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ + "wedge100s/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22685,7 +22283,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22765,7 +22363,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22845,7 +22443,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.26/6.5.26": [ + "wedge100s/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22865,37 +22463,28 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "LinkTest.getTransceivers" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -22903,6 +22492,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -22912,12 +22504,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -22925,22 +22511,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22960,37 +22543,28 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "LinkTest.getTransceivers" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -22998,6 +22572,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -23007,12 +22584,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -23020,22 +22591,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23055,37 +22623,28 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "LinkTest.getTransceivers" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -23093,6 +22652,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -23102,12 +22664,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -23115,22 +22671,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.26/6.5.28": [ + "wedge100s/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23150,37 +22703,28 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "LinkTest.getTransceivers" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -23189,19 +22733,16 @@ "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -23210,22 +22751,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23245,37 +22783,28 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "LinkTest.getTransceivers" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -23283,6 +22812,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -23292,12 +22824,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -23305,22 +22831,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23340,37 +22863,28 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "LinkTest.getTransceivers" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -23378,6 +22892,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -23387,12 +22904,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -23400,22 +22911,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.28/6.5.28": [ + "wedge400/bcm/asicsdk-6.5.26/6.5.26": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23510,7 +23018,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23605,7 +23113,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23700,7 +23208,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ + "wedge400/bcm/asicsdk-6.5.26/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23780,19 +23288,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23872,19 +23383,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23964,19 +23478,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ + "wedge400/bcm/asicsdk-6.5.28/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24056,19 +23573,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24148,19 +23668,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24240,19 +23763,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ + "wedge400/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24344,7 +23870,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24436,7 +23962,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24528,7 +24054,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ + "wedge400/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24620,7 +24146,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24712,7 +24238,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24804,7 +24330,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/1.42.8": [ + "wedge400/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24827,52 +24353,55 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.HUNDREDGToTWOHUNDREDG$" + "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.TWOHUNDREDGToHUNDREDG$" + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -24887,16 +24416,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24919,52 +24445,55 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" + }, + { + "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.HUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.TWOHUNDREDGToHUNDREDG$" + "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -24979,16 +24508,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25011,52 +24537,55 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.HUNDREDGToTWOHUNDREDG$" + "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.TWOHUNDREDGToHUNDREDG$" + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -25071,16 +24600,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.4.90": [ + "wedge400/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25103,52 +24629,55 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.HUNDREDGToTWOHUNDREDG$" + "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.TWOHUNDREDGToHUNDREDG$" + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -25163,16 +24692,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25195,52 +24721,55 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.HUNDREDGToTWOHUNDREDG$" + "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.TWOHUNDREDGToHUNDREDG$" + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -25255,16 +24784,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25287,52 +24813,55 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.HUNDREDGToTWOHUNDREDG$" + "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.TWOHUNDREDGToHUNDREDG$" + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -25347,16 +24876,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.4.90_yuba": [ + "wedge400c/sai/asicsdk-1.42.8/1.42.8": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25396,6 +24922,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -25448,7 +24977,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400c/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25488,6 +25017,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -25540,7 +25072,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400c/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25580,6 +25112,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -25632,7 +25167,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.6.1_yuba": [ + "wedge400c/sai/asicsdk-1.42.8/24.4.90": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25672,6 +25207,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -25724,7 +25262,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.6.1_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400c/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25764,6 +25302,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -25816,7 +25357,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.6.1_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400c/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25856,6 +25397,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -25908,7 +25452,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.8.3001": [ + "wedge400c/sai/asicsdk-1.42.8/24.4.90_yuba": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25948,6 +25492,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26000,7 +25547,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400c/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26040,6 +25587,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26092,7 +25642,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400c/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26132,6 +25682,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26184,7 +25737,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.4.90/24.4.90": [ + "wedge400c/sai/asicsdk-1.42.8/24.8.3001": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26224,6 +25777,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26276,7 +25832,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400c/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26316,6 +25872,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26368,7 +25927,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400c/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26408,6 +25967,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26460,7 +26022,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.4.90_yuba/24.4.90_yuba": [ + "wedge400c/sai/asicsdk-24.4.90/24.4.90": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26500,6 +26062,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26552,7 +26117,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400c/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26592,6 +26157,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26644,7 +26212,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400c/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26684,6 +26252,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26736,7 +26307,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.6.1_yuba/24.6.1_yuba": [ + "wedge400c/sai/asicsdk-24.4.90_yuba/24.4.90_yuba": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26776,6 +26347,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26828,7 +26402,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.6.1_yuba/24.6.1_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400c/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26868,6 +26442,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26920,7 +26497,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.6.1_yuba/24.6.1_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400c/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26960,6 +26537,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -27052,6 +26632,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -27144,6 +26727,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -27236,6 +26822,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, From ec8731c8a66454bbe54daf9be5560547b2837d84 Mon Sep 17 00:00:00 2001 From: Vasant Patil Date: Mon, 14 Oct 2024 16:01:09 -0700 Subject: [PATCH 112/479] Removing 24.6.1_yuba Summary: As titled. Differential Revision: D64311865 Privacy Context Container: L1125642 fbshipit-source-id: ed1f021958042679800927d71a39219959b741be --- fboss/agent/hw/sai/api/SaiVersion.h | 11 +++++------ fboss/agent/hw/sai/impl/impl.bzl | 1 - fboss/build/sdk.bzl | 6 ------ 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/fboss/agent/hw/sai/api/SaiVersion.h b/fboss/agent/hw/sai/api/SaiVersion.h index 09ef91ee3d944..61f68116a3c4b 100644 --- a/fboss/agent/hw/sai/api/SaiVersion.h +++ b/fboss/agent/hw/sai/api/SaiVersion.h @@ -110,19 +110,18 @@ * - TAJO_SDK_GTE_24_4_90: Flags for SDK >= 24.4.90 * - TAJO_SDK: Flags for all TAJO SDK */ -#if defined(TAJO_SDK_VERSION_24_4_90) || defined(TAJO_SDK_VERSION_24_6_1) || \ - defined(TAJO_SDK_VERSION_24_7_0) || defined(TAJO_SDK_VERSION_24_8_3001) +#if defined(TAJO_SDK_VERSION_24_4_90) || defined(TAJO_SDK_VERSION_24_7_0) || \ + defined(TAJO_SDK_VERSION_24_8_3001) #define TAJO_P4_WB_SDK #endif #if defined(TAJO_SDK_VERSION_1_42_8) || defined(TAJO_SDK_VERSION_24_4_90) || \ - defined(TAJO_SDK_VERSION_24_6_1) || defined(TAJO_SDK_VERSION_24_7_0) || \ - defined(TAJO_SDK_VERSION_24_8_3001) + defined(TAJO_SDK_VERSION_24_7_0) || defined(TAJO_SDK_VERSION_24_8_3001) #define TAJO_SDK_EBRO #endif -#if defined(TAJO_SDK_VERSION_24_4_90) || defined(TAJO_SDK_VERSION_24_6_1) || \ - defined(TAJO_SDK_VERSION_24_7_0) || defined(TAJO_SDK_VERSION_24_8_3001) +#if defined(TAJO_SDK_VERSION_24_4_90) || defined(TAJO_SDK_VERSION_24_7_0) || \ + defined(TAJO_SDK_VERSION_24_8_3001) #define TAJO_SDK_GTE_24_4_90 #endif diff --git a/fboss/agent/hw/sai/impl/impl.bzl b/fboss/agent/hw/sai/impl/impl.bzl index e88479d99b805..b7f25776b5d06 100644 --- a/fboss/agent/hw/sai/impl/impl.bzl +++ b/fboss/agent/hw/sai/impl/impl.bzl @@ -65,7 +65,6 @@ def to_impl_external_deps(sai_impl): ("leaba-sdk", "1.42.8"): [("leaba-sdk", None, "sai-sdk")], ("leaba-sdk", "24.4.90"): [("leaba-sdk", None, "dyn-sai"), ("leaba-sdk", None, "dyn-sdk")], ("leaba-sdk", "24.4.90_yuba"): [("leaba-sdk", None, "sai-sdk")], - ("leaba-sdk", "24.6.1_yuba"): [("leaba-sdk", None, "sai-sdk")], ("leaba-sdk", "24.7.0_yuba"): [("leaba-sdk", None, "sai-sdk")], ("leaba-sdk", "24.8.3001"): [("leaba-sdk", None, "dyn-sai"), ("leaba-sdk", None, "dyn-sdk")], } diff --git a/fboss/build/sdk.bzl b/fboss/build/sdk.bzl index 49778bcec1871..9b8361c5ad9f8 100644 --- a/fboss/build/sdk.bzl +++ b/fboss/build/sdk.bzl @@ -267,12 +267,6 @@ ALL_SDKS = [ stage = SdkStage.DEV, version = "24.4.90_yuba", ), - SaiLeabaSdk( - fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/24.6.1_yuba/res", - sai_version = "1.13.0", - stage = SdkStage.DEV, - version = "24.6.1_yuba", - ), SaiLeabaSdk( fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/24.7.0_yuba/res", sai_version = "1.13.0", From bbd230f9fac387a40051d8f609b7d2476f07a49b Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Mon, 14 Oct 2024 16:20:33 -0700 Subject: [PATCH 113/479] enhance J3 ACL trap NDP packets to high priority cpu queue Summary: This is part of the work to replace rx reason traps by ACL on J3, see https://docs.google.com/document/d/1PFuccXRI10zIdiDyUKyCAbKtJHJNOcDqYzkRlMgxN6Y/edit?usp=sharing for details. This diffs enhanced fboss ACL to trap NDP packets to high priority cpu queue on J3 and remove NDP rx reason traps from copp hw tets. Additional changes: 1. remove the assumption in ApplyThriftConfig that ACL proto has to be specified when matching icmp type. Otherwise, brcm-sai sdk will complain "IPV6 next header qualifier and icmpv6_type/codequalifiers cannot be added together" P1628181776. Let me know if we want brcm-sai side changes. shri-khare 2. fixed AgentCoppTest/0.NdpSolicitNeighbor. From discussion with brcm, J3 does not fully support multicast routing. So, if NDP solicit packet is sent without pipeline bypass, it will just go through L3 pipeline like normal ip packets. Here is what happening in AgentCoppTest/0.NdpSolicitNeighbor on J3 now: - NDP solicit packet sent from cpu port without pipeline by pass - packet hit no action acl if from cpu port at https://fburl.com/code/whx1jjag - packet forwarded and sent out of nif port - packet loopback from nif port - packet hit multicast + dscp 48 acll at https://fburl.com/code/jg2yfuwr and punt to high prio cpu queue Reviewed By: shri-khare Differential Revision: D63492319 Privacy Context Container: L1125642 fbshipit-source-id: dc927a75e1b5ecb207da7fab8a6bfb1d3944a11f --- fboss/agent/ApplyThriftConfig.cpp | 9 +-- fboss/agent/state/tests/AclTests.cpp | 3 - .../test/agent_hw_tests/AgentCoppTests.cpp | 30 +++++++-- fboss/agent/test/utils/BUCK | 1 + fboss/agent/test/utils/CoppTestUtils.cpp | 61 ++++++++++++++++++- 5 files changed, 88 insertions(+), 16 deletions(-) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 606d6f70f50b5..22d3781b84aec 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -3468,10 +3468,11 @@ void ThriftConfigApplier::checkAcl(const cfg::AclEntry* config) const { std::to_string(AclEntry::kMaxIcmpCode)); } } - if (config->icmpType() && - (!config->proto() || - !(*config->proto() == AclEntry::kProtoIcmp || - *config->proto() == AclEntry::kProtoIcmpv6))) { + // TODO(daiweix): check proto should be 58 if icmp type/code is specified + // after CS00012373216 is resolved. + if (config->icmpType() && config->proto() && + !(*config->proto() == AclEntry::kProtoIcmp || + *config->proto() == AclEntry::kProtoIcmpv6)) { throw FbossError( "proto must be either icmp or icmpv6 ", "if icmp type is set"); } diff --git a/fboss/agent/state/tests/AclTests.cpp b/fboss/agent/state/tests/AclTests.cpp index c628605e6d4bb..abeb0b2950e0e 100644 --- a/fboss/agent/state/tests/AclTests.cpp +++ b/fboss/agent/state/tests/AclTests.cpp @@ -486,9 +486,6 @@ TEST(Acl, Icmp) { // test config exceptions config.acls()[0].proto() = 4; - EXPECT_THROW( - publishAndApplyConfig(stateV1, &config, platform.get()), FbossError); - config.acls()[0].proto().reset(); EXPECT_THROW( publishAndApplyConfig(stateV1, &config, platform.get()), FbossError); config.acls()[0].proto() = 58; diff --git a/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp b/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp index a3b3c945dbec9..f96f0bf76fb24 100644 --- a/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp @@ -467,7 +467,8 @@ class AgentCoppTest : public AgentHwTest { const folly::IPAddressV6& neighborIp, ICMPv6Type type, bool outOfPort, - bool selfSolicit) { + bool selfSolicit, + bool snoopAndVerify = true) { auto vlanId = utility::firstVlanID(getProgrammedState()); auto intfMac = utility::getFirstInterfaceMac(getProgrammedState()); auto neighborMac = utility::MacAddressGenerator().get(intfMac.u64NBO() + 1); @@ -489,7 +490,7 @@ class AgentCoppTest : public AgentHwTest { intfMac, // my mac neighborIp, // sender ip folly::IPAddressV6("1::")); // sent to me - sendPkt(std::move(txPacket), outOfPort, true /*snoopAndVerify*/); + sendPkt(std::move(txPacket), outOfPort, snoopAndVerify); } } @@ -500,7 +501,8 @@ class AgentCoppTest : public AgentHwTest { bool selfSolicit = true, bool outOfPort = true, const int numPktsToSend = 1, - const int expectedPktDelta = 1) { + const int expectedPktDelta = 1, + bool snoopAndVerify = true) { auto beforeOutPkts = utility::getQueueOutPacketsWithRetry( getSw(), @@ -510,7 +512,13 @@ class AgentCoppTest : public AgentHwTest { queueId, 0 /* retryTimes */, 0 /* expectedNumPkts */); - sendNdpPkts(numPktsToSend, neighborIp, ndpType, outOfPort, selfSolicit); + sendNdpPkts( + numPktsToSend, + neighborIp, + ndpType, + outOfPort, + selfSolicit, + snoopAndVerify); auto afterOutPkts = utility::getQueueOutPacketsWithRetry( getSw(), @@ -1102,9 +1110,18 @@ TYPED_TEST(AgentCoppTest, NdpSolicitNeighbor) { // again. // More explanation in the test plan section of - D34782575 - auto setup = [=, this]() { this->setup(); }; + auto setup = [=, this]() { + this->setup(); + if (!this->isSupportedOnAllAsics(HwAsic::Feature::BRIDGE_PORT_8021Q)) { + this->setupEcmp(true); + } + }; auto verify = [=, this]() { XLOG(DBG2) << "verifying solicitation"; + // do not snoop when L2 is not supported, e.g. J3, where NDP packets goes + // through L3 pipeline and might change ttl and dst mac + bool snoopAndVerify = + this->isSupportedOnAllAsics(HwAsic::Feature::BRIDGE_PORT_8021Q); this->sendPktAndVerifyNdpPacketsCpuQueue( utility::getCoppHighPriQueueId(utility::checkSameAndGetAsic( this->getAgentEnsemble()->getL3Asics())), @@ -1113,7 +1130,8 @@ TYPED_TEST(AgentCoppTest, NdpSolicitNeighbor) { false, false, 1, - 1); + 1, + snoopAndVerify); }; this->verifyAcrossWarmBoots(setup, verify); } diff --git a/fboss/agent/test/utils/BUCK b/fboss/agent/test/utils/BUCK index 92e4b2a918868..9e3e492218562 100644 --- a/fboss/agent/test/utils/BUCK +++ b/fboss/agent/test/utils/BUCK @@ -35,6 +35,7 @@ cpp_library( "//fboss/agent:switch_config-cpp2-types", "//fboss/agent/hw:hardware_stats-cpp2-types", "//fboss/agent/hw/switch_asics:switch_asics", + "//fboss/agent/packet:packet", "//fboss/agent/packet:packet_factory", "//fboss/agent/state:state", "//fboss/agent/test:test_ensemble_if", diff --git a/fboss/agent/test/utils/CoppTestUtils.cpp b/fboss/agent/test/utils/CoppTestUtils.cpp index 753800ab6e30c..731fb3f07b26d 100644 --- a/fboss/agent/test/utils/CoppTestUtils.cpp +++ b/fboss/agent/test/utils/CoppTestUtils.cpp @@ -15,6 +15,7 @@ #include "fboss/agent/SwSwitch.h" #include "fboss/agent/TxPacket.h" #include "fboss/agent/hw/switch_asics/HwAsic.h" +#include "fboss/agent/packet/ICMPHdr.h" #include "fboss/agent/packet/PktFactory.h" #include "fboss/agent/state/Interface.h" #include "fboss/agent/state/SwitchState.h" @@ -493,6 +494,61 @@ void addHighPriAclForArp( acls.push_back(std::make_pair(acl2, action)); } +void addHighPriAclForNdp( + cfg::ToCpuAction toCpuAction, + int highPriQueueId, + std::vector>& acls, + bool isSai) { + cfg::Ttl ttl; + ttl.value() = 255; + ttl.mask() = 0xff; + auto action = createQueueMatchAction(highPriQueueId, isSai, toCpuAction); + + cfg::AclEntry acl1; + acl1.etherType() = cfg::EtherType::IPv6; + acl1.ttl() = ttl; + acl1.icmpType() = + static_cast(ICMPv6Type::ICMPV6_TYPE_NDP_ROUTER_SOLICITATION); + acl1.name() = + folly::to("cpuPolicing-high-ndp-router-solicit-acl"); + acls.push_back(std::make_pair(acl1, action)); + + cfg::AclEntry acl2; + acl2.etherType() = cfg::EtherType::IPv6; + acl2.ttl() = ttl; + acl2.icmpType() = + static_cast(ICMPv6Type::ICMPV6_TYPE_NDP_ROUTER_ADVERTISEMENT); + acl2.name() = + folly::to("cpuPolicing-high-ndp-router-advertisement-acl"); + acls.push_back(std::make_pair(acl2, action)); + + cfg::AclEntry acl3; + acl3.etherType() = cfg::EtherType::IPv6; + acl3.ttl() = ttl; + acl3.icmpType() = + static_cast(ICMPv6Type::ICMPV6_TYPE_NDP_NEIGHBOR_SOLICITATION); + acl3.name() = + folly::to("cpuPolicing-high-ndp-neighbor-solicit-acl"); + acls.push_back(std::make_pair(acl3, action)); + + cfg::AclEntry acl4; + acl4.etherType() = cfg::EtherType::IPv6; + acl4.ttl() = ttl; + acl4.icmpType() = + static_cast(ICMPv6Type::ICMPV6_TYPE_NDP_NEIGHBOR_ADVERTISEMENT); + acl4.name() = + folly::to("cpuPolicing-high-ndp-neighbor-advertisement-acl"); + acls.push_back(std::make_pair(acl4, action)); + + cfg::AclEntry acl5; + acl5.etherType() = cfg::EtherType::IPv6; + acl5.ttl() = ttl; + acl5.icmpType() = + static_cast(ICMPv6Type::ICMPV6_TYPE_NDP_REDIRECT_MESSAGE); + acl5.name() = folly::to("cpuPolicing-high-ndp-redirect-acl"); + acls.push_back(std::make_pair(acl5, action)); +} + void addHighPriAclForLacp( cfg::ToCpuAction toCpuAction, int highPriQueueId, @@ -745,7 +801,8 @@ std::vector> defaultCpuAclsForSai( if (hwAsic->isSupported(HwAsic::Feature::NO_RX_REASON_TRAP)) { addHighPriAclForArp( - + cfg::ToCpuAction::TRAP, getCoppHighPriQueueId(hwAsic), acls, true); + addHighPriAclForNdp( cfg::ToCpuAction::TRAP, getCoppHighPriQueueId(hwAsic), acls, true); addHighPriAclForBgp( hwAsic, @@ -1001,8 +1058,6 @@ std::vector getCoppRxReasonToQueuesForSai( if (hwAsic->isSupported(HwAsic::Feature::NO_RX_REASON_TRAP)) { // TODO(daiweix): remove these rx reason traps and replace them by ACLs rxReasonToQueues = { - ControlPlane::makeRxReasonToQueueEntry( - cfg::PacketRxReason::NDP, coppHighPriQueueId), ControlPlane::makeRxReasonToQueueEntry( cfg::PacketRxReason::TTL_1, kCoppLowPriQueueId), ControlPlane::makeRxReasonToQueueEntry( From 503b38fce27cc4fffa234b54a74a83a30b1cf8ac Mon Sep 17 00:00:00 2001 From: genkzgnluxbjeyb Date: Mon, 14 Oct 2024 16:29:43 -0700 Subject: [PATCH 114/479] fboss_hw_unsupported_tests_sync Differential Revision: D64344500 fbshipit-source-id: 8845060cbb777ac9017aabd9c05d99596a5ddf31 --- ...sai_hw_unsupported_tests.materialized_JSON | 53 ------------------- 1 file changed, 53 deletions(-) diff --git a/fboss/oss/sai_hw_unsupported_tests/sai_hw_unsupported_tests.materialized_JSON b/fboss/oss/sai_hw_unsupported_tests/sai_hw_unsupported_tests.materialized_JSON index 0e0a85da15dac..58aff04fb06b8 100644 --- a/fboss/oss/sai_hw_unsupported_tests/sai_hw_unsupported_tests.materialized_JSON +++ b/fboss/oss/sai_hw_unsupported_tests/sai_hw_unsupported_tests.materialized_JSON @@ -2009,59 +2009,6 @@ "test_name_regex": "HwAclCounterTest/[01].VerifyCounterBumpOnBthOpcodeHitFrontPanel$" } ], - "leaba/24.6.1_yuba/24.6.1_yuba/graphene200": [ - { - "test_name_regex": "HwFlowletAclCounterTest.*$" - }, - { - "test_name_regex": "HwFlowletSwitching.*$" - }, - { - "test_name_regex": "HwEcmpFlowletSwitching.*$" - }, - { - "test_name_regex": "HwLoadBalancerTestV6Flowlet.*$" - }, - { - "test_name_regex": "HwLoadBalancerTestV6EcmpToFlowlet.*$" - }, - { - "test_name_regex": "AgentFlowletSwitchingTest.*$" - }, - { - "test_name_regex": "HwTeFlowTest.*$" - }, - { - "test_name_regex": "HwTeFlowTrafficTest.*$" - }, - { - "test_name_regex": "HwUdfAcl.*$" - }, - { - "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.*HwTest_PROFILE_400G_8_PAM4_RS544X2N_COPPER" - }, - { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.*SaiQPHRollbackTest.rollback" - }, - { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.*AgentQueuePerHostTest/[0123].*" - }, - { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.*AgentQueuePerHostRouteTest/[01].*" - }, - { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.*AgentQueuePerHostL2Test.*" - }, - { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.*AgentAclPriorityTest/[0].*" - }, - { - "test_name_regex": "HwAclCounterTest/[01].*$" - }, - { - "test_name_regex": "HwAclCounterTest/[01].VerifyCounterBumpOnBthOpcodeHitFrontPanel$" - } - ], "leaba/24.8.3001/24.8.3001/gibraltar": [ { "test_name_regex": "HwFlowletAclCounterTest.*$" From 36fb9a27fb051e0ec1d45cdf07220f418b9e9abd Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Mon, 14 Oct 2024 16:31:39 -0700 Subject: [PATCH 115/479] Do not mark connected on heartbeats in dsf Summary: Enabling option added in D63554533 Differential Revision: D64061997 Privacy Context Container: L1125642 fbshipit-source-id: 8d3068a600b058f493b91f480d4048cc935e239a --- fboss/agent/DsfSubscriber.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fboss/agent/DsfSubscriber.cpp b/fboss/agent/DsfSubscriber.cpp index 021a84f1380e6..a00ddd443ba72 100644 --- a/fboss/agent/DsfSubscriber.cpp +++ b/fboss/agent/DsfSubscriber.cpp @@ -134,7 +134,8 @@ void DsfSubscriber::stateUpdated(const StateDelta& stateDelta) { fsdb::SubscriptionOptions opts{ folly::sformat("{}_{}:agent", localNodeName_, dstIPAddr.str()), false /* subscribeStats */, - FLAGS_dsf_gr_hold_time}; + FLAGS_dsf_gr_hold_time, + true /* requireInitialSyncToMarkConnect */}; auto subscriptionsWlock = subscriptions_.wlock(); if (subscriptionsWlock->find(remoteEndpoint) != subscriptionsWlock->end()) { From a4e9a6efd0fc522c765b18efc130a7deeab6cfd2 Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Mon, 14 Oct 2024 16:31:39 -0700 Subject: [PATCH 116/479] Add option to forcefully subscribe Summary: Adding an option to allow for duplicate subscriptions. This is mainly helpful in DSF, see next diff Differential Revision: D64050523 Privacy Context Container: L1125642 fbshipit-source-id: b7c2f40856ab9fb53123cba79c5243d4a7331c48 --- fboss/fsdb/if/fsdb_oper.thrift | 7 ++++- fboss/fsdb/server/ServiceHandler.cpp | 26 +++++++++--------- fboss/fsdb/server/ServiceHandler.h | 4 ++- fboss/fsdb/tests/client/FsdbPubSubTest.cpp | 3 +++ .../fsdb/tests/server/ServiceHandlerTest.cpp | 27 +++++++++++++++++++ 5 files changed, 53 insertions(+), 14 deletions(-) diff --git a/fboss/fsdb/if/fsdb_oper.thrift b/fboss/fsdb/if/fsdb_oper.thrift index 0787d787402be..5f002eb370526 100644 --- a/fboss/fsdb/if/fsdb_oper.thrift +++ b/fboss/fsdb/if/fsdb_oper.thrift @@ -95,6 +95,8 @@ struct OperSubRequest { 1: OperPath path; 2: OperProtocol protocol = OperProtocol.BINARY; 3: fsdb_common.SubscriberId subscriberId; + // Forcefully subscribe even if there is already a subscriber with the same SubscriberId + 4: bool forceSubscribe = false; } struct OperSubInitResponse {} @@ -104,6 +106,8 @@ struct OperSubRequestExtended { 1: list paths; 2: OperProtocol protocol = OperProtocol.BINARY; 3: fsdb_common.SubscriberId subscriberId; + // Forcefully subscribe even if there is already a subscriber with the same SubscriberId + 4: bool forceSubscribe = false; } struct OperSubPathUnit { @@ -130,7 +134,8 @@ typedef i32 SubscriptionKey struct SubRequest { 1: map paths; 3: fsdb_common.ClientId clientId; -// TODO: option to request shallow patches? + // Forcefully subscribe even if there is already a subscriber with the same SubscriberId + 4: bool forceSubscribe = false; } struct Patch { diff --git a/fboss/fsdb/server/ServiceHandler.cpp b/fboss/fsdb/server/ServiceHandler.cpp index 27f178bb55d14..64bdec5f4679a 100644 --- a/fboss/fsdb/server/ServiceHandler.cpp +++ b/fboss/fsdb/server/ServiceHandler.cpp @@ -674,7 +674,9 @@ void ServiceHandler::updateSubscriptionCounters( } } -void ServiceHandler::registerSubscription(const OperSubscriberInfo& info) { +void ServiceHandler::registerSubscription( + const OperSubscriberInfo& info, + bool forceSubscribe) { if (info.subscriberId()->empty()) { throw Utils::createFsdbException( FsdbErrorCode::EMPTY_SUBSCRIBER_ID, "Subscriber Id must not be empty"); @@ -694,7 +696,7 @@ void ServiceHandler::registerSubscription(const OperSubscriberInfo& info) { buildPathUnion(info), *info.type(), *info.isStats()); - if (FLAGS_forceRegisterSubscriptions) { + if (FLAGS_forceRegisterSubscriptions || forceSubscribe) { (*activeSubscriptions_.wlock())[std::move(key)] = info; } else { auto resp = activeSubscriptions_.wlock()->insert({std::move(key), info}); @@ -762,7 +764,7 @@ ServiceHandler::co_subscribeOperStatePath( PathValidator::validateStatePath(*request->path()->raw()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::PATH, false); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -800,7 +802,7 @@ ServiceHandler::co_subscribeOperStatsPath( PathValidator::validateStatsPath(*request->path()->raw()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::PATH, true); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -864,7 +866,7 @@ ServiceHandler::co_subscribeOperStateDelta( PathValidator::validateStatePath(*request->path()->raw()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::DELTA, false); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -896,7 +898,7 @@ ServiceHandler::co_subscribeOperStatePathExtended( PathValidator::validateExtendedStatePaths(*request->paths()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::PATH, false); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -942,7 +944,7 @@ ServiceHandler::co_subscribeOperStateDeltaExtended( PathValidator::validateExtendedStatePaths(*request->paths()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::DELTA, false); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -978,7 +980,7 @@ ServiceHandler::co_subscribeOperStatsDelta( PathValidator::validateStatsPath(*request->path()->raw()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::DELTA, true); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -1009,7 +1011,7 @@ ServiceHandler::co_subscribeOperStatsPathExtended( PathValidator::validateExtendedStatsPaths(*request->paths()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::PATH, true); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -1055,7 +1057,7 @@ ServiceHandler::co_subscribeOperStatsDeltaExtended( PathValidator::validateExtendedStatsPaths(*request->paths()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::DELTA, true); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -1090,7 +1092,7 @@ ServiceHandler::co_subscribeState(std::unique_ptr request) { auto log = LOG_THRIFT_CALL(INFO, getRequestDetails(*request)); validatePaths(*request->paths(), false); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::PATCH, false); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -1113,7 +1115,7 @@ ServiceHandler::co_subscribeStats(std::unique_ptr request) { auto log = LOG_THRIFT_CALL(INFO, getRequestDetails(*request)); validatePaths(*request->paths(), true); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::PATCH, true); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); diff --git a/fboss/fsdb/server/ServiceHandler.h b/fboss/fsdb/server/ServiceHandler.h index 61b4b1c5fbf2d..ee5e900dc4a54 100644 --- a/fboss/fsdb/server/ServiceHandler.h +++ b/fboss/fsdb/server/ServiceHandler.h @@ -204,7 +204,9 @@ class ServiceHandler : public FsdbServiceSvIf, } private: - void registerSubscription(const OperSubscriberInfo& info); + void registerSubscription( + const OperSubscriberInfo& info, + bool forceSubscribe = false); void unregisterSubscription(const OperSubscriberInfo& info); void updateSubscriptionCounters( const OperSubscriberInfo& info, diff --git a/fboss/fsdb/tests/client/FsdbPubSubTest.cpp b/fboss/fsdb/tests/client/FsdbPubSubTest.cpp index 011b3fd05eefd..c661e28c81951 100644 --- a/fboss/fsdb/tests/client/FsdbPubSubTest.cpp +++ b/fboss/fsdb/tests/client/FsdbPubSubTest.cpp @@ -388,6 +388,9 @@ TYPED_TEST(FsdbPubSubTest, dupSubscriber) { // @lint-ignore CLANGTIDY std::this_thread::sleep_for(std::chrono::seconds(3)); EXPECT_THROW({ auto res2 = this->subscribe(req); }, FsdbException); + + req.forceSubscribe() = true; + EXPECT_NO_THROW({ auto res2 = this->subscribe(req); }); } TYPED_TEST(FsdbPubSubTest, multiplePublishers) { diff --git a/fboss/fsdb/tests/server/ServiceHandlerTest.cpp b/fboss/fsdb/tests/server/ServiceHandlerTest.cpp index cb1fe2e767819..9d255e8782af1 100644 --- a/fboss/fsdb/tests/server/ServiceHandlerTest.cpp +++ b/fboss/fsdb/tests/server/ServiceHandlerTest.cpp @@ -42,6 +42,19 @@ class ServiceHandlerTest : public ::testing::Test { return req; } + SubRequest createPatchRequest( + const std::string& subId, + bool forceSubscribe = false) { + SubRequest req; + RawOperPath p; + p.path() = {"agent"}; + req.paths() = {{0, p}}; + req.clientId()->client() = FsdbClient::AGENT; + req.clientId()->instanceId() = subId; + req.forceSubscribe() = forceSubscribe; + return req; + } + std::unique_ptr fsdb_; }; @@ -109,4 +122,18 @@ TEST_F(ServiceHandlerTest, testSubscriberInfo) { }); } +TEST_F(ServiceHandlerTest, subscribeDup) { + folly::EventBase evb; + auto client = createClient(&evb); + auto sub1 = client->sync_subscribeState(createPatchRequest("test-sub-1")); + EXPECT_THROW( + client->sync_subscribeState(createPatchRequest("test-sub-1")), + fsdb::FsdbException); + + auto sub2 = + client->sync_subscribeState(createPatchRequest("test-sub-2", true)); + EXPECT_NO_THROW( + client->sync_subscribeState(createPatchRequest("test-sub-2", true))); +} + } // namespace facebook::fboss::fsdb::test From 9d1ae5ed567ddad431b98c633ef235ebb878b6d1 Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Mon, 14 Oct 2024 16:31:39 -0700 Subject: [PATCH 117/479] Pass forceSubscribe in DSF Summary: During warmboot shutdown, its possible for the socket FIN packets to get lost since agent's pkt flow is stopping. In these cases our remote fsdb will hold on to the old subscription and reject new ones for a few extra seconds which brings up our state convergence time Differential Revision: D64050522 Privacy Context Container: L1125642 fbshipit-source-id: 3b2d3c7c963a42246335a20dfb307cb8b34e85ed --- fboss/agent/DsfSubscriber.cpp | 3 ++- fboss/fsdb/client/FsdbPatchSubscriber.cpp | 1 + fboss/fsdb/client/FsdbSubscriber.h | 9 +++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/fboss/agent/DsfSubscriber.cpp b/fboss/agent/DsfSubscriber.cpp index a00ddd443ba72..b8a15ee131751 100644 --- a/fboss/agent/DsfSubscriber.cpp +++ b/fboss/agent/DsfSubscriber.cpp @@ -135,7 +135,8 @@ void DsfSubscriber::stateUpdated(const StateDelta& stateDelta) { folly::sformat("{}_{}:agent", localNodeName_, dstIPAddr.str()), false /* subscribeStats */, FLAGS_dsf_gr_hold_time, - true /* requireInitialSyncToMarkConnect */}; + true /* requireInitialSyncToMarkConnect */, + true /* forceSubscribe */}; auto subscriptionsWlock = subscriptions_.wlock(); if (subscriptionsWlock->find(remoteEndpoint) != subscriptionsWlock->end()) { diff --git a/fboss/fsdb/client/FsdbPatchSubscriber.cpp b/fboss/fsdb/client/FsdbPatchSubscriber.cpp index ca0e4416a6f46..a5d648e5f35c9 100644 --- a/fboss/fsdb/client/FsdbPatchSubscriber.cpp +++ b/fboss/fsdb/client/FsdbPatchSubscriber.cpp @@ -15,6 +15,7 @@ FsdbPatchSubscriberImpl::createRequest() request.clientId()->instanceId() = clientId(); RawOperPath path; request.paths() = this->subscribePaths(); + request.forceSubscribe() = this->subscriptionOptions().forceSubscribe_; return request; } diff --git a/fboss/fsdb/client/FsdbSubscriber.h b/fboss/fsdb/client/FsdbSubscriber.h index 0cae6a61b84c5..22f57649841ed 100644 --- a/fboss/fsdb/client/FsdbSubscriber.h +++ b/fboss/fsdb/client/FsdbSubscriber.h @@ -85,16 +85,19 @@ struct SubscriptionOptions { bool subscribeStats = false, uint32_t grHoldTimeSec = 0, // only mark subscription as CONNECTED on initial sync - bool requireInitialSyncToMarkConnect = false) + bool requireInitialSyncToMarkConnect = false, + bool forceSubscribe = false) : clientId_(clientId), subscribeStats_(subscribeStats), grHoldTimeSec_(grHoldTimeSec), - requireInitialSyncToMarkConnect_(requireInitialSyncToMarkConnect) {} + requireInitialSyncToMarkConnect_(requireInitialSyncToMarkConnect), + forceSubscribe_(forceSubscribe) {} const std::string clientId_; bool subscribeStats_{false}; uint32_t grHoldTimeSec_{0}; bool requireInitialSyncToMarkConnect_{false}; + bool forceSubscribe_{false}; }; struct SubscriptionInfo { @@ -205,11 +208,13 @@ class FsdbSubscriber : public FsdbSubscriberBase { OperSubRequest request; request.path() = operPath; request.subscriberId() = clientId(); + request.forceSubscribe() = subscriptionOptions_.forceSubscribe_; return request; } else if constexpr (std::is_same_v>) { OperSubRequestExtended request; request.paths() = subscribePaths_; request.subscriberId() = clientId(); + request.forceSubscribe() = subscriptionOptions_.forceSubscribe_; return request; } } From f20c5a8f4e92aee3cc5e5566c7759a7871e318b3 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Mon, 14 Oct 2024 17:56:51 -0700 Subject: [PATCH 118/479] add PORT_MTU_ERROR to switch_config Summary: This is for the new sai extension attributed SAI_HOSTIF_TRAP_TYPE_PORT_MTU_ERROR introduced to DNX platforms in CS00012371071 Differential Revision: D64341782 Privacy Context Container: L1125642 fbshipit-source-id: 4bf1ee5a21b7a2b41832c75fce23751b9d2de1aa --- fboss/agent/hw/bcm/BcmControlPlane.cpp | 1 + fboss/agent/hw/sai/switch/SaiHostifManager.cpp | 1 + fboss/agent/switch_config.thrift | 1 + 3 files changed, 3 insertions(+) diff --git a/fboss/agent/hw/bcm/BcmControlPlane.cpp b/fboss/agent/hw/bcm/BcmControlPlane.cpp index 4e97166d540c3..050a3bf928c0a 100644 --- a/fboss/agent/hw/bcm/BcmControlPlane.cpp +++ b/fboss/agent/hw/bcm/BcmControlPlane.cpp @@ -74,6 +74,7 @@ bcm_rx_reasons_t configRxReasonToBcmReasons(cfg::PacketRxReason reason) { return RxUtils::genReasons(bcmRxReasonNhop); case cfg::PacketRxReason::L3_MTU_ERROR: return RxUtils::genReasons(bcmRxReasonL3MtuFail); + case cfg::PacketRxReason::PORT_MTU_ERROR: case cfg::PacketRxReason::NDP: case cfg::PacketRxReason::LLDP: case cfg::PacketRxReason::ARP_RESPONSE: diff --git a/fboss/agent/hw/sai/switch/SaiHostifManager.cpp b/fboss/agent/hw/sai/switch/SaiHostifManager.cpp index 5dfa7b58c340d..6aac8fcbe6963 100644 --- a/fboss/agent/hw/sai/switch/SaiHostifManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiHostifManager.cpp @@ -128,6 +128,7 @@ SaiHostifManager::packetReasonToHostifTrap( SAI_HOSTIF_TRAP_TYPE_SAMPLEPACKET, SAI_PACKET_ACTION_TRAP); case cfg::PacketRxReason::EAPOL: return std::make_pair(SAI_HOSTIF_TRAP_TYPE_EAPOL, SAI_PACKET_ACTION_TRAP); + case cfg::PacketRxReason::PORT_MTU_ERROR: case cfg::PacketRxReason::MPLS_UNKNOWN_LABEL: case cfg::PacketRxReason::BPDU: case cfg::PacketRxReason::L3_SLOW_PATH: diff --git a/fboss/agent/switch_config.thrift b/fboss/agent/switch_config.thrift index b383318e53c49..ee8ce7c3dd773 100644 --- a/fboss/agent/switch_config.thrift +++ b/fboss/agent/switch_config.thrift @@ -932,6 +932,7 @@ enum PacketRxReason { SAMPLEPACKET = 18, // Sample Packet TTL_0 = 19, // Packets with TTL as 0 EAPOL = 20, // EAPOL for Macsec + PORT_MTU_ERROR = 21, // Packet size exceeds port MTU, should not use together with L3_MTU_ERROR } enum PortLoopbackMode { From b537290e264a7e7ff8572eeccf7facb4ef025b58 Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Mon, 14 Oct 2024 21:36:04 -0700 Subject: [PATCH 119/479] PatchApplier: handle hybrid nodes Summary: Implement specializations for hybrid node handling in PatchApplier Reviewed By: wilsonwinhi Differential Revision: D64339849 fbshipit-source-id: 28d70c471a13c7c713713f99e0424583cea6a6cb --- fboss/thrift_cow/nodes/ThriftHybridNode-inl.h | 1 + fboss/thrift_cow/visitors/PatchApplier.h | 118 ++++++++++++++++-- 2 files changed, 112 insertions(+), 7 deletions(-) diff --git a/fboss/thrift_cow/nodes/ThriftHybridNode-inl.h b/fboss/thrift_cow/nodes/ThriftHybridNode-inl.h index 9a7356b60c403..0229828464d43 100644 --- a/fboss/thrift_cow/nodes/ThriftHybridNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftHybridNode-inl.h @@ -23,6 +23,7 @@ template struct ThriftHybridNode : public thrift_cow::Serializable { public: using ThriftType = TType; + using TC = TypeClass; using CowType = HybridNodeType; using Self = ThriftHybridNode; using PathIter = typename std::vector::const_iterator; diff --git a/fboss/thrift_cow/visitors/PatchApplier.h b/fboss/thrift_cow/visitors/PatchApplier.h index 090f4f2fc35a4..aba38a7ab6b28 100644 --- a/fboss/thrift_cow/visitors/PatchApplier.h +++ b/fboss/thrift_cow/visitors/PatchApplier.h @@ -20,6 +20,7 @@ struct PatchApplier; struct NodeType; struct FieldsType; +struct HybridNodeType; namespace pa_detail { @@ -75,7 +76,26 @@ struct PatchApplier< Node& node, PatchNode&& patch, const fsdb::OperProtocol& protocol, - PatchTraverser& traverser) { + PatchTraverser& traverser) + requires( + is_cow_type_v && + std::is_same_v) + { + auto& underlying = node.ref(); + return PatchApplier::apply( + underlying, std::move(patch), protocol, traverser); + } + + template + static PatchApplyResult apply( + Node& node, + PatchNode&& patch, + const fsdb::OperProtocol& protocol, + PatchTraverser& traverser) + requires( + !is_cow_type_v || + !std::is_same_v) + { if (patch.getType() == PatchNode::Type::val) { return pa_detail::patchNode(node, patch.move_val(), protocol); } @@ -159,7 +179,26 @@ struct PatchApplier> { Node& node, PatchNode&& patch, const fsdb::OperProtocol& protocol, - PatchTraverser& traverser) { + PatchTraverser& traverser) + requires( + is_cow_type_v && + std::is_same_v) + { + auto& underlying = node.ref(); + return PatchApplier::apply( + underlying, std::move(patch), protocol, traverser); + } + + template + static PatchApplyResult apply( + Node& node, + PatchNode&& patch, + const fsdb::OperProtocol& protocol, + PatchTraverser& traverser) + requires( + !is_cow_type_v || + !std::is_same_v) + { if (patch.getType() == PatchNode::Type::val) { return pa_detail::patchNode(node, patch.move_val(), protocol); } @@ -248,7 +287,26 @@ struct PatchApplier> { Node& node, PatchNode&& patch, const fsdb::OperProtocol& protocol, - PatchTraverser& traverser) { + PatchTraverser& traverser) + requires( + is_cow_type_v && + std::is_same_v) + { + auto& underlying = node.ref(); + return PatchApplier::apply( + underlying, std::move(patch), protocol, traverser); + } + + template + static PatchApplyResult apply( + Node& node, + PatchNode&& patch, + const fsdb::OperProtocol& protocol, + PatchTraverser& traverser) + requires( + !is_cow_type_v || + !std::is_same_v) + { if (patch.getType() == PatchNode::Type::val) { return pa_detail::patchNode(node, patch.move_val(), protocol); } @@ -314,7 +372,26 @@ struct PatchApplier { Node& node, PatchNode&& patch, const fsdb::OperProtocol& protocol, - PatchTraverser& traverser) { + PatchTraverser& traverser) + requires( + is_cow_type_v && + std::is_same_v) + { + auto& underlying = node.ref(); + return PatchApplier::apply( + underlying, std::move(patch), protocol, traverser); + } + + template + static PatchApplyResult apply( + Node& node, + PatchNode&& patch, + const fsdb::OperProtocol& protocol, + PatchTraverser& traverser) + requires( + !is_cow_type_v || + !std::is_same_v) + { if (patch.getType() == PatchNode::Type::val) { return pa_detail::patchNode(node, patch.move_val(), protocol); } @@ -416,7 +493,26 @@ struct PatchApplier { Node& node, PatchNode&& patch, const fsdb::OperProtocol& protocol, - PatchTraverser& traverser) { + PatchTraverser& traverser) + requires( + is_cow_type_v && + std::is_same_v) + { + auto& underlying = node.ref(); + return PatchApplier::apply( + underlying, std::move(patch), protocol, traverser); + } + + template + static PatchApplyResult apply( + Node& node, + PatchNode&& patch, + const fsdb::OperProtocol& protocol, + PatchTraverser& traverser) + requires( + !is_cow_type_v || + !std::is_same_v) + { if (patch.getType() == PatchNode::Type::val) { return pa_detail::patchNode(node, patch.move_val(), protocol); } @@ -459,8 +555,16 @@ struct PatchApplier { } auto& child = node.template modify(); - result = - PatchApplier::apply(*child, std::move(childPatch), protocol); + + if constexpr (Fields::template HasSkipThriftCow::value) { + auto& underlying = child->ref(); + result = PatchApplier::apply( + underlying, std::move(childPatch), protocol); + return; + } else { + result = PatchApplier::apply( + *child, std::move(childPatch), protocol); + } }); return result; } From 2b97991a22eae859b2d0f33b43eab0ba646899c5 Mon Sep 17 00:00:00 2001 From: Mohammed Al-Sanabani Date: Mon, 14 Oct 2024 21:44:49 -0700 Subject: [PATCH 120/479] Refactor LedIO Summary: For bsp platforms, green/blue LEDs are not optional. Reviewed By: harshitgulati18 Differential Revision: D64172641 fbshipit-source-id: 25ced967ea9d6c6a6fd481ae55e7b3c0bf0d1264 --- fboss/lib/led/LedIO.cpp | 44 ++++++++++++++--------------------------- fboss/lib/led/LedIO.h | 6 +++--- 2 files changed, 18 insertions(+), 32 deletions(-) diff --git a/fboss/lib/led/LedIO.cpp b/fboss/lib/led/LedIO.cpp index aa0fda9f6f558..21cb04215d0cf 100644 --- a/fboss/lib/led/LedIO.cpp +++ b/fboss/lib/led/LedIO.cpp @@ -12,7 +12,6 @@ #include #include #include -#include "fboss/agent/FbossError.h" #include "fboss/led_service/LedUtils.h" #include "fboss/lib/led/gen-cpp2/led_mapping_types.h" @@ -31,18 +30,14 @@ constexpr auto kLedBlinkFast = "500"; namespace facebook::fboss { -LedIO::LedIO(LedMapping ledMapping) { - id_ = *ledMapping.id(); - if (auto blue = ledMapping.bluePath()) { - bluePath_ = *blue; - } - if (auto yellow = ledMapping.yellowPath()) { - yellowPath_ = *yellow; - } - if (!bluePath_.has_value() && !yellowPath_.has_value()) { +LedIO::LedIO(LedMapping ledMapping) : id_(*ledMapping.id()) { + if (!ledMapping.bluePath().has_value() || + !ledMapping.yellowPath().has_value()) { throw LedIOError( fmt::format("No color path set for ID {:d} (0 base)", id_)); } + bluePath_ = ledMapping.bluePath().value(); + yellowPath_ = ledMapping.yellowPath().value(); init(); } @@ -78,20 +73,14 @@ led::LedState LedIO::getLedState() const { void LedIO::init() { led::LedState ledState = utility::constructLedState(led::LedColor::OFF, led::Blink::OFF); - currState_ = ledState; - if (bluePath_.has_value()) { - blueOff(); - } - if (yellowPath_.has_value()) { - yellowOff(); - } + blueOff(); + yellowOff(); } void LedIO::blueOn(led::Blink blink) { - CHECK(bluePath_.has_value()); - setBlink(*bluePath_, blink); - setLed(*bluePath_, kLedOn); + setBlink(bluePath_, blink); + setLed(bluePath_, kLedOn); XLOG(INFO) << fmt::format( "Trace: set LED {:d} (0 base) to Blue and blink {:s}", id_, @@ -99,15 +88,13 @@ void LedIO::blueOn(led::Blink blink) { } void LedIO::blueOff() { - CHECK(bluePath_.has_value()); - setBlink(*bluePath_, led::Blink::OFF); - setLed(*bluePath_, kLedOff); + setBlink(bluePath_, led::Blink::OFF); + setLed(bluePath_, kLedOff); } void LedIO::yellowOn(led::Blink blink) { - CHECK(yellowPath_.has_value()); - setBlink(*yellowPath_, blink); - setLed(*yellowPath_, kLedOn); + setBlink(yellowPath_, blink); + setLed(yellowPath_, kLedOn); XLOG(INFO) << fmt::format( "Trace: set LED {:d} (0 base) to Yellow and blink {:s}", id_, @@ -115,9 +102,8 @@ void LedIO::yellowOn(led::Blink blink) { } void LedIO::yellowOff() { - CHECK(yellowPath_.has_value()); - setBlink(*yellowPath_, led::Blink::OFF); - setLed(*yellowPath_, kLedOff); + setBlink(yellowPath_, led::Blink::OFF); + setLed(yellowPath_, kLedOff); } void LedIO::setLed(const std::string& ledBasePath, const std::string& ledOp) { diff --git a/fboss/lib/led/LedIO.h b/fboss/lib/led/LedIO.h index d2e7e2a585d31..10fed61ff3a20 100644 --- a/fboss/lib/led/LedIO.h +++ b/fboss/lib/led/LedIO.h @@ -47,9 +47,9 @@ class LedIO { void setBlink(const std::string& ledPath, led::Blink blink); led::LedState currState_; - uint32_t id_; - std::optional bluePath_; - std::optional yellowPath_; + const uint32_t id_; + std::string bluePath_; + std::string yellowPath_; }; } // namespace facebook::fboss From 9a4b146621583222794fca393fe027bd38504bf0 Mon Sep 17 00:00:00 2001 From: Siva Muthusamy Date: Tue, 15 Oct 2024 06:12:57 -0700 Subject: [PATCH 121/479] Add eventor_sbus_dma_channels SoC config for 11.x J3AI in FBOSS Summary: Add eventor_sbus_dma_channels SoC config for 11.x J3AI in FBOSS. This will be reverted while integrating 12.0.0.3 and instead will be added in the config directly. Reviewed By: shri-khare, zechengh09 Differential Revision: D64310813 fbshipit-source-id: 177068a2e821b9588979c84248c11966a4b363c4 --- fboss/agent/platforms/sai/SaiPlatform.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index 22ffa618e938b..a261573a27b7d 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -258,6 +258,17 @@ std::string SaiPlatform::getHwAsicConfig( for (const auto& entry : commonConfigs) { addNameValue(entry); } + +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + if (getAsic()->isSupported(HwAsic::Feature::EVENTOR_PORT_FOR_SFLOW)) { + // Interim workaround for 11.0.0.14 as this SoC property is needed for + // J3AI 11.x but not for 12.x until 12.0.0.3. + // TODO: While integrating 12.0.0.3, this workaround needs to be removed + // and instead this SoC property would be added in config directly. + nameValStrs.push_back("eventor_sbus_dma_channels.BCM8889X=0,6,0,7"); + } +#endif + /* * Single NPU platfroms will not have any npu entries. In such cases, * we can directly use the common config. From fe5ffab89e48041cd2c7d811f2fbd425fecedce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hrvoje=20=C4=8Cavrak?= Date: Tue, 15 Oct 2024 06:55:26 -0700 Subject: [PATCH 122/479] Update power requirements Summary: Updating requirements for power behavior Created from CodeHub with https://fburl.com/edit-in-codehub Reviewed By: pedroforjazfigueiredo Differential Revision: D64393278 fbshipit-source-id: adf5b482410913eae9b7c31d57c7deedacce6a27 --- fboss/docs/provisioning/provisioning_requirements_npi.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fboss/docs/provisioning/provisioning_requirements_npi.md b/fboss/docs/provisioning/provisioning_requirements_npi.md index b4a59aeb3d81a..124fb5a3f1898 100644 --- a/fboss/docs/provisioning/provisioning_requirements_npi.md +++ b/fboss/docs/provisioning/provisioning_requirements_npi.md @@ -2,9 +2,9 @@ ### PE Network Provisioning -**Version 0.3.0** +**Version 0.3.1** -**February 2024** +**October 2024** 4-5 Grand Canal Quay @@ -246,6 +246,8 @@ There should be no unconventional requirements to boot the kernel, like providing the ACPI tables as a binary blob, etc. Those should be defined by the BIOS and loaded into the main memory for the OS to consume. +BIOS should, after loss of power, default to ON state when power is reapplied +and NOT try to return to "last known state". ### 7. Weutil support From e63f1bca414f60d814ae91a904c28d259fe43c88 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Tue, 15 Oct 2024 09:35:36 -0700 Subject: [PATCH 123/479] Updating submodules Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/03b66ea6b1aa2b33bd4e1be7adf75731265d5658 https://github.com/facebook/fb303/commit/46fe97bd4e39aa594418c3bcdc4c148d9aed34e8 https://github.com/facebook/fbthrift/commit/49dcc35b0d02cae84c7a2055a27e70639f4b8185 https://github.com/facebook/folly/commit/2e079666a2992f4080d52c3e626c47d007575dc3 https://github.com/facebook/mvfst/commit/e652742dcc1d33f752e9744f11e076c458841493 https://github.com/facebook/proxygen/commit/1745e7ce5743674b6a2af2b4f168ad78d196991f https://github.com/facebook/wangle/commit/51ad7353af953a1be8dad0a56e307f07f36b58cc https://github.com/facebookexperimental/edencommon/commit/c8a2a8a99366387c34f8a0c27fc50e9ef1fc2a5e https://github.com/facebookexperimental/rust-shed/commit/056225380f261e9e33d1ebb27032e2310cf0461d https://github.com/facebookincubator/fizz/commit/58924b55cc777e898797c5ee039056bc349b62d2 Reviewed By: bigfootjon fbshipit-source-id: 85402cca4c8f7cf008b141580f4f7844c929f8b0 --- buck2 | 30 +++++++++---------- .../deps/github_hashes/facebook/fb303-rev.txt | 2 +- .../github_hashes/facebook/fbthrift-rev.txt | 2 +- .../deps/github_hashes/facebook/folly-rev.txt | 2 +- .../github_hashes/facebook/wangle-rev.txt | 2 +- .../facebookincubator/fizz-rev.txt | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/buck2 b/buck2 index ae813b7f0d83a..d682ee0594550 100755 --- a/buck2 +++ b/buck2 @@ -4,62 +4,62 @@ "name": "buck2", "platforms": { "macos-aarch64": { - "size": 24192649, + "size": 24650797, "hash": "blake3", - "digest": "ada5e17e47e3751ceb767d342ae2cb87b1e8c8d909592a0a272af100e36087d9", + "digest": "c1d538cde7ac6ad0d8f12671420d09786622a97ae186ce4f8e676861910ae45b", "format": "zst", "path": "buck2-aarch64-apple-darwin", "providers": [ { - "url": "https://github.com/facebook/buck2/releases/download/2024-10-01/buck2-aarch64-apple-darwin.zst" + "url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-aarch64-apple-darwin.zst" } ] }, "linux-aarch64": { - "size": 26342488, + "size": 26956137, "hash": "blake3", - "digest": "c1b2a83f1730a98245c34e27562346f69e323d785ec0d0779707c2e99d6a455b", + "digest": "5bcb0ee9ed84799206d0cffd52e4b5ff4cacc9b1522d984f25e17c94414519c3", "format": "zst", "path": "buck2-aarch64-unknown-linux-musl", "providers": [ { - "url": "https://github.com/facebook/buck2/releases/download/2024-10-01/buck2-aarch64-unknown-linux-musl.zst" + "url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-aarch64-unknown-linux-musl.zst" } ] }, "macos-x86_64": { - "size": 25779123, + "size": 26405161, "hash": "blake3", - "digest": "900916c38b1c16a511ddccf62d649c9ce7a263f04aec586597f84658d922e67d", + "digest": "e388933ebd3bf8e2f9dcd20dbba33fe033319b1a07a67d92ef33e6c188512cb2", "format": "zst", "path": "buck2-x86_64-apple-darwin", "providers": [ { - "url": "https://github.com/facebook/buck2/releases/download/2024-10-01/buck2-x86_64-apple-darwin.zst" + "url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-x86_64-apple-darwin.zst" } ] }, "windows-x86_64": { - "size": 21230675, + "size": 21795979, "hash": "blake3", - "digest": "4001f9995d0c5dd57848a5a3b704abb12c034a2c3dccc5bf1f10eab8a01a3f98", + "digest": "7712324d3e71e487b76860f42f9a0d0e8bc49e692c13ce5053aabe8f1a30be8d", "format": "zst", "path": "buck2-x86_64-pc-windows-msvc.exe", "providers": [ { - "url": "https://github.com/facebook/buck2/releases/download/2024-10-01/buck2-x86_64-pc-windows-msvc.exe.zst" + "url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-x86_64-pc-windows-msvc.exe.zst" } ] }, "linux-x86_64": { - "size": 27176398, + "size": 27977618, "hash": "blake3", - "digest": "608d882a5ad55f8170e68849211c7e22d7f42fbf9fd1605dc03c93f85cf4a907", + "digest": "6f611bbf77c9544831405e68607682523f20f22aa55df1c5a3461f9c3a0cfa03", "format": "zst", "path": "buck2-x86_64-unknown-linux-musl", "providers": [ { - "url": "https://github.com/facebook/buck2/releases/download/2024-10-01/buck2-x86_64-unknown-linux-musl.zst" + "url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-x86_64-unknown-linux-musl.zst" } ] } diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 8363f70483563..fbe237ca75216 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 943f36701bb462e9e1fa8f693ac4a6965c5458c2 +Subproject commit 46fe97bd4e39aa594418c3bcdc4c148d9aed34e8 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 3ccd6761ea759..e0d5785c0767e 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit f2c4e6c61f8235d909f0af06ac0bb3043a2ce3a5 +Subproject commit 49dcc35b0d02cae84c7a2055a27e70639f4b8185 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index babd0cbb4b834..501d2d2c165da 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit b293f9eac370fe89d437a53c73d58ac575407245 +Subproject commit 2e079666a2992f4080d52c3e626c47d007575dc3 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index a9ccc4fc6f1d6..2cce7572ebb79 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 997ed56811317851126281e0fdf4cc0a998eb319 +Subproject commit 51ad7353af953a1be8dad0a56e307f07f36b58cc diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 72a4492190d27..f7bb5f7af852d 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 6bc89c741356c393fd800ae2b9df8a917769c804 +Subproject commit 58924b55cc777e898797c5ee039056bc349b62d2 From 628b8101df3a2c37ddaddc56e2ad5fc91d437b41 Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Tue, 15 Oct 2024 10:31:02 -0700 Subject: [PATCH 124/479] Enable hybrid-node UTs Summary: Enabling hybrid-node UTs so that we get on-diff coverage for any further changes to visitors. Reviewed By: wilsonwinhi Differential Revision: D64339850 fbshipit-source-id: f6c8dee51a6a3e8f7f0d3bf1354aebb31a8f6613 --- fboss/thrift_cow/nodes/tests/BUCK | 10 ++++++++-- fboss/thrift_cow/nodes/tests/test.thrift | 12 ++++++------ fboss/thrift_cow/visitors/tests/BUCK | 17 +++++++++++++---- .../visitors/tests/VisitorTestUtils.cpp | 3 ++- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/fboss/thrift_cow/nodes/tests/BUCK b/fboss/thrift_cow/nodes/tests/BUCK index 18fec9f2d474b..fde72687cb8e7 100644 --- a/fboss/thrift_cow/nodes/tests/BUCK +++ b/fboss/thrift_cow/nodes/tests/BUCK @@ -22,7 +22,10 @@ cpp_unittest( srcs = [ "ThriftHybridStructNodeTests.cpp", ], - preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], + preprocessor_flags = [ + "-DENABLE_DYNAMIC_APIS", + "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", + ], deps = [ ":test-cpp2-reflection", "//fboss/thrift_cow/nodes:nodes", @@ -45,7 +48,10 @@ cpp_unittest( "ThriftStructNodeTests.cpp", "ThriftUnionNodeTests.cpp", ], - preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], + preprocessor_flags = [ + "-DENABLE_DYNAMIC_APIS", + "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", + ], deps = [ ":test-cpp2-reflection", "//fboss/agent:switch_config-cpp2-reflection", diff --git a/fboss/thrift_cow/nodes/tests/test.thrift b/fboss/thrift_cow/nodes/tests/test.thrift index 8bafc48e719e9..18fc32a86db43 100644 --- a/fboss/thrift_cow/nodes/tests/test.thrift +++ b/fboss/thrift_cow/nodes/tests/test.thrift @@ -62,13 +62,13 @@ struct TestStruct { 24: map mapA; 25: map mapB; 26: map cowMap; - 27: map hybridMap; // (allow_skip_thrift_cow = true); - 28: list hybridList; // (allow_skip_thrift_cow = true); - 29: set hybridSet; // (allow_skip_thrift_cow = true); - 30: TestUnion hybridUnion; // (allow_skip_thrift_cow = true); - 31: ChildStruct hybridStruct; // (allow_skip_thrift_cow = true); + 27: map hybridMap (allow_skip_thrift_cow = true); + 28: list hybridList (allow_skip_thrift_cow = true); + 29: set hybridSet (allow_skip_thrift_cow = true); + 30: TestUnion hybridUnion (allow_skip_thrift_cow = true); + 31: ChildStruct hybridStruct (allow_skip_thrift_cow = true); 32: map hybridMapOfI32ToStruct; // (allow_skip_thrift_cow = true) -} // (allow_skip_thrift_cow = true) +} (allow_skip_thrift_cow = true) struct ParentTestStruct { 1: TestStruct childStruct; diff --git a/fboss/thrift_cow/visitors/tests/BUCK b/fboss/thrift_cow/visitors/tests/BUCK index 18c55eb64bc6f..44ece127d82aa 100644 --- a/fboss/thrift_cow/visitors/tests/BUCK +++ b/fboss/thrift_cow/visitors/tests/BUCK @@ -11,6 +11,7 @@ cpp_library( headers = [ "VisitorTestUtils.h", ], + preprocessor_flags = ["-D__ENABLE_HYBRID_THRIFT_COW_TESTS__"], exported_deps = [ "//fboss/agent:switch_config-cpp2-reflection", "//fboss/thrift_cow/nodes/tests:test-cpp2-reflection", @@ -27,7 +28,7 @@ cpp_unittest( ], preprocessor_flags = [ "-DENABLE_DYNAMIC_APIS", - # "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", + "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", ], deps = [ "fbsource//third-party/googletest:gmock", @@ -69,7 +70,10 @@ cpp_unittest( srcs = [ "DeltaVisitorTests.cpp", ], - preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], + preprocessor_flags = [ + "-DENABLE_DYNAMIC_APIS", + "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", + ], deps = [ "fbsource//third-party/googletest:gmock", ":visitor_test_utils", @@ -88,7 +92,10 @@ cpp_unittest( srcs = [ "RecurseVisitorTests.cpp", ], - preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], + preprocessor_flags = [ + "-DENABLE_DYNAMIC_APIS", + "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", + ], deps = [ "fbsource//third-party/googletest:gmock", "//fboss/thrift_cow/nodes:nodes", @@ -108,7 +115,9 @@ cpp_unittest( "PatchBuildApplyTests.cpp", "PatchBuilderTests.cpp", ], - preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], + preprocessor_flags = [ + "-DENABLE_DYNAMIC_APIS", + ], deps = [ ":visitor_test_utils", "//fboss/agent:switch_config-cpp2-reflection", diff --git a/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp b/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp index 11285755cc73a..30c8d7f1bb7bf 100644 --- a/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp +++ b/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp @@ -15,7 +15,8 @@ TestStruct createSimpleTestStruct() { "mapOfEnumToStruct", dynamic::object("3", dynamic::object("min", 100)("max", 200)))( "mapOfI32ToI32", dynamic::object(1, 1))( - "cowMap", dynamic::object(1, true)); + "cowMap", dynamic::object(1, true))( + "hybridMap", dynamic::object(1, true)); return facebook::thrift::from_dynamic( testDyn, facebook::thrift::dynamic_format::JSON_1); From b729ca773dccde022fff2f5cdb2264de90b04657 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Tue, 15 Oct 2024 10:52:31 -0700 Subject: [PATCH 125/479] Fix shadowed variable in fboss/lib/TimeSeriesWithMinMax-inl.h Summary: Our upcoming compiler upgrade will require us not to have shadowed variables. Such variables have a _high_ bug rate and reduce readability, so we would like to avoid them even if the compiler was not forcing us to do so. This codemod attempts to fix an instance of a shadowed variable. Please review with care: if it's failed the result will be a silent bug. **What's a shadowed variable?** Shadowed variables are variables in an inner scope with the same name as another variable in an outer scope. Having the same name for both variables might be semantically correct, but it can make the code confusing to read! It can also hide subtle bugs. This diff fixes such an issue by renaming the variable. - If you approve of this diff, please use the "Accept & Ship" button :-) Differential Revision: D64398722 fbshipit-source-id: cbf9b0fae4c5ea73667289ac8dd6404e75aec6f8 --- fboss/lib/TimeSeriesWithMinMax-inl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fboss/lib/TimeSeriesWithMinMax-inl.h b/fboss/lib/TimeSeriesWithMinMax-inl.h index b63e6e8aee43a..e01a98f15c21b 100644 --- a/fboss/lib/TimeSeriesWithMinMax-inl.h +++ b/fboss/lib/TimeSeriesWithMinMax-inl.h @@ -90,9 +90,9 @@ void TimeSeriesWithMinMax::addValue( } else if (i + 1 < locked_buf->size()) { if (t < locked_buf->at(i + 1).getInstantiatedTime() && t > b->getInstantiatedTime()) { - Bucket b(t, bucketInterval_); - b.addValue(value); - locked_buf->insert(locked_buf->begin() + i, std::move(b)); + Bucket b_2(t, bucketInterval_); + b_2.addValue(value); + locked_buf->insert(locked_buf->begin() + i, std::move(b_2)); return; } } From e899f7ff9b84bb52f415f852f63e8ffb26e1dda3 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Tue, 15 Oct 2024 11:45:39 -0700 Subject: [PATCH 126/479] add AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue to catch S422033 Summary: Add new test case to capture asic parity error issues in S422033, see https://docs.google.com/presentation/d/1Q1Ww49QQYKRCDHEIcc44kMWj43yCmYBH_Q4pWN4d1Nk/edit?usp=sharing for details Differential Revision: D64257811 fbshipit-source-id: 7a70b0690ec8f41828a3a1e1d4b54be6429cb465 --- .../AgentSendPacketToQueueTests.cpp | 85 ++++++++++++++++++- 1 file changed, 83 insertions(+), 2 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentSendPacketToQueueTests.cpp b/fboss/agent/test/agent_hw_tests/AgentSendPacketToQueueTests.cpp index c1e7380ba6e51..beae61185ad99 100644 --- a/fboss/agent/test/agent_hw_tests/AgentSendPacketToQueueTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentSendPacketToQueueTests.cpp @@ -7,18 +7,21 @@ * of patent rights can be found in the PATENTS file in the same directory. * */ +#include #include "fboss/agent/TxPacket.h" #include "fboss/agent/gen-cpp2/switch_config_types.h" +#include "fboss/agent/hw/test/ConfigFactory.h" #include "fboss/agent/packet/PktFactory.h" #include "fboss/agent/test/AgentHwTest.h" #include "fboss/agent/test/EcmpSetupHelper.h" +#include "fboss/agent/test/utils/AsicUtils.h" +#include "fboss/agent/test/utils/TrafficPolicyTestUtils.h" #include "fboss/lib/CommonUtils.h" -#include - namespace { constexpr uint8_t kDefaultQueue = 0; constexpr uint8_t kTestingQueue = 7; +constexpr uint32_t kDscp = 0x24; } // namespace namespace facebook::fboss { @@ -108,4 +111,82 @@ TEST_F(AgentSendPacketToQueueTest, SendPacketSwitchedToDefaultUCQueue) { checkSendPacket(std::nullopt, false); } +TEST_F(AgentSendPacketToQueueTest, SendPacketOutOfPortToMCQueue) { + auto ensemble = getAgentEnsemble(); + auto l3Asics = ensemble->getSw()->getHwAsicTable()->getL3Asics(); + auto asic = utility::checkSameAndGetAsic(l3Asics); + auto masterLogicalPortIds = ensemble->masterLogicalPortIds(); + auto port = masterLogicalPortIds[0]; + + auto setup = [=, this]() { + // put all ports in the same vlan + auto newCfg = utility::oneL3IntfNPortConfig( + ensemble->getSw()->getPlatformMapping(), + asic, + masterLogicalPortIds, + ensemble->getSw()->getPlatformSupportsAddRemovePort(), + asic->desiredLoopbackModes()); + applyNewConfig(newCfg); + }; + + auto verifyFlooding = [=, this]() { + auto beforeOutPkts = *getLatestPortStats(port).outMulticastPkts_(); + WITH_RETRIES({ + auto afterOutPkts = *getLatestPortStats(port).outMulticastPkts_(); + XLOG(DBG2) << "afterOutPkts " << afterOutPkts << ", beforeOutPkts " + << beforeOutPkts; + EXPECT_EVENTUALLY_GT(afterOutPkts - beforeOutPkts, 10000); + }); + }; + + auto verify = [=, this]() { + if (getSw()->getBootType() == BootType::WARM_BOOT) { + return; + } + auto vlanId = utility::firstVlanID(getProgrammedState()); + auto intfMac = utility::getFirstInterfaceMac(getProgrammedState()); + auto randomMac = folly::MacAddress("01:02:03:04:05:06"); + // send packets with random dst mac to flood the vlan + for (int i = 0; i < 100; i++) { + auto pkt = utility::makeUDPTxPacket( + getSw(), + vlanId, + intfMac, + randomMac, + folly::IPAddressV6("2620:0:1cfe:face:b00c::3"), + folly::IPAddressV6("2620:0:1cfe:face:b00c::4"), + 8000, + 8001, + kDscp << 2); + ensemble->sendPacketAsync( + std::move(pkt), + PortDescriptor(masterLogicalPortIds[0]), + std::nullopt); + } + + XLOG(DBG2) << "Verify multicast traffic is flooding"; + verifyFlooding(); + + XLOG(DBG2) + << "Add ACL to send packet to queue 7. This should only affect unicast traffic but not multicast traffic here"; + // In S422033, multicast traffic was also send to multicast queue 7, which + // does not exist on TH4 and corrupted the asic. This caused parity error + // later. All packets are also dropped and no traffic flooding any more. + auto newCfg = ensemble->getCurrentConfig(); + utility::addDscpAclToCfg(asic, &newCfg, "acl1", kDscp); + utility::addQueueMatcher(&newCfg, "acl1", kTestingQueue, ensemble->isSai()); + applyNewConfig(newCfg); + + XLOG(DBG2) << "Wait 10 seconds and verify multicast traffic still flooding"; + sleep(10); + verifyFlooding(); + }; + + auto verifyPostWb = [&]() { + XLOG(DBG2) << "Verify multicast traffic still flooding after warmboot"; + verifyFlooding(); + }; + verifyAcrossWarmBoots(setup, verify, []() {}, verifyPostWb); +} + } // namespace facebook::fboss From 30f0ea805dc3a9689b01e8d0cd3173f5252f5564 Mon Sep 17 00:00:00 2001 From: Harshit Gulati Date: Tue, 15 Oct 2024 13:52:08 -0700 Subject: [PATCH 127/479] Consider switch drain state when computing the blink state of LEDs Summary: Today we only look at the portDrainState which will only be set when specific ports are drained. This doesn't indicate if the entire switch is drained. We need to account for switch drain state also so that we can blink LEDs indicating that the port is safe to operate or not. Overall we blink the LED when 1. port is inactive (other side, either port or the entire switch, is drained) 2. local port state is drained (local port is drained) 3. local switch state is drained (local switch is drained) Reviewed By: shri-khare Differential Revision: D64372511 Privacy Context Container: L1125642 fbshipit-source-id: 97707b5ba40a246af58673f05e9775b719077a20 --- fboss/led_service/FsdbSwitchStateSubscriber.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/fboss/led_service/FsdbSwitchStateSubscriber.cpp b/fboss/led_service/FsdbSwitchStateSubscriber.cpp index e2c11e3a06466..b9dedaa116883 100644 --- a/fboss/led_service/FsdbSwitchStateSubscriber.cpp +++ b/fboss/led_service/FsdbSwitchStateSubscriber.cpp @@ -52,11 +52,18 @@ void FsdbSwitchStateSubscriber::subscribeToState( // used by LED manager thread later auto newSwitchStateData = apache::thrift::BinarySerializer::deserialize< fboss::state::SwitchState>(*contents); + auto& swSettings = newSwitchStateData.switchSettingsMap().value(); auto swPortMaps = newSwitchStateData.portMaps().value(); std::map ledSwitchStateUpdate; for (auto& [switchStr, oneSwPortMap] : swPortMaps) { + bool switchDrained = false; + if (swSettings.find(switchStr) != swSettings.end()) { + switchDrained = + swSettings[switchStr].actualSwitchDrainState().value() == + cfg::SwitchDrainState::DRAINED; + } for (auto& [onePortId, onePortInfo] : oneSwPortMap) { ledSwitchStateUpdate[onePortId].swPortId = onePortId; ledSwitchStateUpdate[onePortId].portName = @@ -72,8 +79,15 @@ void FsdbSwitchStateSubscriber::subscribeToState( if (auto activeState = onePortInfo.portActiveState()) { ledSwitchStateUpdate[onePortId].activeState = *activeState; } + // We consider the port drained if either the individual port is + // drained or the entire switch is drained. This status is used to set + // blink pattern on the LEDs. We blink the LED when + // 1) port is inactive (other side, either port or the entire switch, + // is drained) 2) local port state is drained (local port is drained) + // 3) local switch state is drained (local switch is drained) ledSwitchStateUpdate[onePortId].drained = - onePortInfo.get_drainState() == cfg::PortDrainState::DRAINED; + onePortInfo.get_drainState() == cfg::PortDrainState::DRAINED || + switchDrained; } } From c2373a1e5cce5f81623f9f3ea6c0942963acbbc0 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Tue, 15 Oct 2024 14:35:38 -0700 Subject: [PATCH 128/479] do not set L3 intf mty if PORT_MTU_ERROR_TRAP is supported Summary: As titled, we will only set port mtu and port mtu error trap on J3 asic, l3 mtu would be only programmed to fboss tun interface in kernel, see CS00012371071 for more details. Reviewed By: jasmeetbagga Differential Revision: D64334620 Privacy Context Container: L1125642 fbshipit-source-id: 91e3a3a4f481a284660fac7b8e53aae1f5082b82 --- .../sai/switch/SaiRouterInterfaceManager.cpp | 21 +++++++++++++------ fboss/agent/hw/switch_asics/EbroAsic.cpp | 1 + fboss/agent/hw/switch_asics/FakeAsic.h | 1 + fboss/agent/hw/switch_asics/HwAsic.h | 1 + fboss/agent/hw/switch_asics/Jericho2Asic.cpp | 1 + fboss/agent/hw/switch_asics/Jericho3Asic.cpp | 3 ++- fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp | 1 + fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp | 1 + fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp | 1 + fboss/agent/hw/switch_asics/TomahawkAsic.cpp | 1 + fboss/agent/hw/switch_asics/Trident2Asic.cpp | 1 + fboss/agent/hw/switch_asics/YubaAsic.cpp | 1 + 12 files changed, 27 insertions(+), 7 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiRouterInterfaceManager.cpp b/fboss/agent/hw/sai/switch/SaiRouterInterfaceManager.cpp index c0d67e194e8cb..609afb838fb23 100644 --- a/fboss/agent/hw/sai/switch/SaiRouterInterfaceManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiRouterInterfaceManager.cpp @@ -10,6 +10,7 @@ #include "fboss/agent/hw/sai/switch/SaiRouterInterfaceManager.h" +#include #include "fboss/agent/FbossError.h" #include "fboss/agent/hw/sai/store/SaiStore.h" #include "fboss/agent/hw/sai/switch/SaiManagerTable.h" @@ -17,8 +18,8 @@ #include "fboss/agent/hw/sai/switch/SaiSystemPortManager.h" #include "fboss/agent/hw/sai/switch/SaiVirtualRouterManager.h" #include "fboss/agent/hw/sai/switch/SaiVlanManager.h" - -#include +#include "fboss/agent/hw/switch_asics/HwAsic.h" +#include "fboss/agent/platforms/sai/SaiPlatform.h" namespace facebook::fboss { @@ -63,8 +64,12 @@ RouterInterfaceSaiId SaiRouterInterfaceManager::addOrUpdateVlanRouterInterface( SaiVlanRouterInterfaceTraits::Attributes::SrcMac srcMacAttribute{srcMac}; // get MTU - SaiVlanRouterInterfaceTraits::Attributes::Mtu mtuAttribute{ - static_cast(swInterface->getMtu())}; + std::optional mtuAttribute = + std::nullopt; + if (platform_->getAsic()->isSupported(HwAsic::Feature::L3_INTF_MTU)) { + mtuAttribute = SaiVlanRouterInterfaceTraits::Attributes::Mtu( + static_cast(swInterface->getMtu())); + } // create the router interface SaiVlanRouterInterfaceTraits::CreateAttributes attributes{ @@ -131,8 +136,12 @@ RouterInterfaceSaiId SaiRouterInterfaceManager::addOrUpdatePortRouterInterface( SaiPortRouterInterfaceTraits::Attributes::SrcMac srcMacAttribute{srcMac}; // get MTU - SaiPortRouterInterfaceTraits::Attributes::Mtu mtuAttribute{ - static_cast(swInterface->getMtu())}; + std::optional mtuAttribute = + std::nullopt; + if (platform_->getAsic()->isSupported(HwAsic::Feature::L3_INTF_MTU)) { + mtuAttribute = SaiVlanRouterInterfaceTraits::Attributes::Mtu( + static_cast(swInterface->getMtu())); + } // create the router interface SaiPortRouterInterfaceTraits::CreateAttributes attributes{ diff --git a/fboss/agent/hw/switch_asics/EbroAsic.cpp b/fboss/agent/hw/switch_asics/EbroAsic.cpp index ef87871d7a0b2..53500369fe53d 100644 --- a/fboss/agent/hw/switch_asics/EbroAsic.cpp +++ b/fboss/agent/hw/switch_asics/EbroAsic.cpp @@ -85,6 +85,7 @@ bool EbroAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS: case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::L3_INTF_MTU: return true; case HwAsic::Feature::ACL_BYTE_COUNTER: case HwAsic::Feature::RESERVED_ENCAP_INDEX_RANGE: diff --git a/fboss/agent/hw/switch_asics/FakeAsic.h b/fboss/agent/hw/switch_asics/FakeAsic.h index 8b1b51ee64681..9b77e7563f564 100644 --- a/fboss/agent/hw/switch_asics/FakeAsic.h +++ b/fboss/agent/hw/switch_asics/FakeAsic.h @@ -52,6 +52,7 @@ class FakeAsic : public HwAsic { case HwAsic::Feature::LINK_INACTIVE_BASED_ISOLATE: case HwAsic::Feature::ANY_TRAP_DROP_COUNTER: case HwAsic::Feature::LINK_ACTIVE_INACTIVE_NOTIFY: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return false; default: diff --git a/fboss/agent/hw/switch_asics/HwAsic.h b/fboss/agent/hw/switch_asics/HwAsic.h index 47ff2f2983adf..cd1844439c912 100644 --- a/fboss/agent/hw/switch_asics/HwAsic.h +++ b/fboss/agent/hw/switch_asics/HwAsic.h @@ -197,6 +197,7 @@ class HwAsic { MULTIPLE_EGRESS_BUFFER_POOL, ENABLE_DELAY_DROP_CONGESTION_THRESHOLD, PORT_MTU_ERROR_TRAP, + L3_INTF_MTU, }; enum class AsicMode { diff --git a/fboss/agent/hw/switch_asics/Jericho2Asic.cpp b/fboss/agent/hw/switch_asics/Jericho2Asic.cpp index 963ddc9fffa6d..37653c46c3ef8 100644 --- a/fboss/agent/hw/switch_asics/Jericho2Asic.cpp +++ b/fboss/agent/hw/switch_asics/Jericho2Asic.cpp @@ -86,6 +86,7 @@ bool Jericho2Asic::isSupported(Feature feature) const { case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ACL_BYTE_COUNTER: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: + case HwAsic::Feature::L3_INTF_MTU: return true; case HwAsic::Feature::UDF_HASH_FIELD_QUERY: case HwAsic::Feature::IN_PAUSE_INCREMENTS_DISCARDS: diff --git a/fboss/agent/hw/switch_asics/Jericho3Asic.cpp b/fboss/agent/hw/switch_asics/Jericho3Asic.cpp index 845a4ac238fe8..4581c7ccae2a2 100644 --- a/fboss/agent/hw/switch_asics/Jericho3Asic.cpp +++ b/fboss/agent/hw/switch_asics/Jericho3Asic.cpp @@ -71,7 +71,6 @@ bool Jericho3Asic::isSupported(Feature feature) const { case HwAsic::Feature::SAI_FEC_CODEWORDS_STATS: case HwAsic::Feature::CRC_ERROR_DETECT: case HwAsic::Feature::ACL_METADATA_QUALIFER: - case HwAsic::Feature::L3_MTU_ERROR_TRAP: case HwAsic::Feature::EVENTOR_PORT_FOR_SFLOW: case HwAsic::Feature::SFLOWv6: case HwAsic::Feature::ZERO_SDK_WRITE_WARMBOOT: @@ -191,6 +190,8 @@ bool Jericho3Asic::isSupported(Feature feature) const { case HwAsic::Feature::DATA_CELL_FILTER: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::L3_MTU_ERROR_TRAP: + case HwAsic::Feature::L3_INTF_MTU: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp index 3c85d554a0ce2..59991a0e0fe2c 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp @@ -93,6 +93,7 @@ bool Tomahawk3Asic::isSupported(Feature feature) const { case HwAsic::Feature::SAI_PRBS: case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ACL_BYTE_COUNTER: + case HwAsic::Feature::L3_INTF_MTU: return true; case HwAsic::Feature::QCM: case HwAsic::Feature::SMAC_EQUALS_DMAC_CHECK_ENABLED: diff --git a/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp index d3814abe8bcd7..487ad782e0c33 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp @@ -115,6 +115,7 @@ bool Tomahawk4Asic::isSupported(Feature feature) const { case HwAsic::Feature::SAI_PRBS: case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ACL_BYTE_COUNTER: + case HwAsic::Feature::L3_INTF_MTU: return true; // features not working well with bcmsim case HwAsic::Feature::MIRROR_PACKET_TRUNCATION: diff --git a/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp index 449c95fce17eb..38215da115e87 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp @@ -98,6 +98,7 @@ bool Tomahawk5Asic::isSupported(Feature feature) const { case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ACL_BYTE_COUNTER: case HwAsic::Feature::SAI_PRBS: + case HwAsic::Feature::L3_INTF_MTU: return true; // features not working well with bcmsim case HwAsic::Feature::MIRROR_PACKET_TRUNCATION: diff --git a/fboss/agent/hw/switch_asics/TomahawkAsic.cpp b/fboss/agent/hw/switch_asics/TomahawkAsic.cpp index a706065615b05..ff82d23398746 100644 --- a/fboss/agent/hw/switch_asics/TomahawkAsic.cpp +++ b/fboss/agent/hw/switch_asics/TomahawkAsic.cpp @@ -77,6 +77,7 @@ bool TomahawkAsic::isSupported(Feature feature) const { case HwAsic::Feature::SAI_PRBS: case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ACL_BYTE_COUNTER: + case HwAsic::Feature::L3_INTF_MTU: return true; case HwAsic::Feature::ERSPANv6: case HwAsic::Feature::SFLOWv6: diff --git a/fboss/agent/hw/switch_asics/Trident2Asic.cpp b/fboss/agent/hw/switch_asics/Trident2Asic.cpp index dc1cbed46ca0c..61d879eaefcdf 100644 --- a/fboss/agent/hw/switch_asics/Trident2Asic.cpp +++ b/fboss/agent/hw/switch_asics/Trident2Asic.cpp @@ -55,6 +55,7 @@ bool Trident2Asic::isSupported(Feature feature) const { case HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS: case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ACL_BYTE_COUNTER: + case HwAsic::Feature::L3_INTF_MTU: return true; case HwAsic::Feature::ERSPANv6: case HwAsic::Feature::SFLOWv4: diff --git a/fboss/agent/hw/switch_asics/YubaAsic.cpp b/fboss/agent/hw/switch_asics/YubaAsic.cpp index 21d420d30418b..0536950b64f46 100644 --- a/fboss/agent/hw/switch_asics/YubaAsic.cpp +++ b/fboss/agent/hw/switch_asics/YubaAsic.cpp @@ -87,6 +87,7 @@ bool YubaAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_HEADROOM_WATERMARK: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: + case HwAsic::Feature::L3_INTF_MTU: return true; case HwAsic::Feature::ACL_BYTE_COUNTER: case HwAsic::Feature::SAI_MPLS_LABEL_LOOKUP_FAIL_COUNTER: From 7bbddb38195024cc6bfb5b06503cd22eecfa8a94 Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Tue, 15 Oct 2024 16:31:21 -0700 Subject: [PATCH 129/479] Add handler for route util thrift api Summary: Adding handlers for the api Differential Revision: D61944627 fbshipit-source-id: 48337beaacbe610c086de5eca4499ed026accdb4 --- cmake/AgentHwSaiHwTest.cmake | 1 + fboss/agent/hw/bcm/tests/BUCK | 6 +- .../tests/HwTestRouteUtilsThriftHandler.cpp | 262 ++++++++++++++++++ .../hw_test/HwTestRouteUtilsThriftHandler.cpp | 250 +++++++++++++++++ fboss/agent/hw/sai/hw_test/hw_test.bzl | 1 + fboss/agent/hw/test/HwTestThriftHandler.h | 7 + 6 files changed, 525 insertions(+), 2 deletions(-) create mode 100644 fboss/agent/hw/bcm/tests/HwTestRouteUtilsThriftHandler.cpp create mode 100644 fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp diff --git a/cmake/AgentHwSaiHwTest.cmake b/cmake/AgentHwSaiHwTest.cmake index 19a4d2a06f91f..f376649a10a54 100644 --- a/cmake/AgentHwSaiHwTest.cmake +++ b/cmake/AgentHwSaiHwTest.cmake @@ -165,6 +165,7 @@ add_library(agent_hw_test_thrift_handler fboss/agent/hw/sai/hw_test/HwTestEcmpUtilsThriftHandler.cpp fboss/agent/hw/sai/hw_test/HwTestPortUtilsThriftHandler.cpp fboss/agent/hw/sai/hw_test/HwTestVoqSwitchUtilsThriftHandler.cpp + fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp ) target_link_libraries(agent_hw_test_thrift_handler diff --git a/fboss/agent/hw/bcm/tests/BUCK b/fboss/agent/hw/bcm/tests/BUCK index ce255237e2b47..f7cf222aadb17 100644 --- a/fboss/agent/hw/bcm/tests/BUCK +++ b/fboss/agent/hw/bcm/tests/BUCK @@ -611,16 +611,18 @@ cpp_library( "HwTestMirrorUtilsThriftHandler.cpp", "HwTestNeighborUtilsThriftHandler.cpp", "HwTestPortUtilsThriftHandler.cpp", + "HwTestRouteUtilsThriftHandler.cpp", "HwTestThriftHandler.cpp", "HwTestVoqSwitchUtilsThriftHandler.cpp", ], headers = [ ], + undefined_symbols = "True", # The sai/bcm implementations will define some functions exported_deps = [ + "//fboss/agent:fboss-types", "//fboss/agent:hw_switch", "//fboss/agent/hw/bcm:bcm", - "//fboss/agent/hw/bcm:bcmaddress_fb_convertors", - "//fboss/agent/hw/bcm/tests:bcm_ecmp_utils", # @manual + "//fboss/agent/hw/bcm:bcmaddress_fb_convertors", # @manual "//fboss/agent/hw/switch_asics:switch_asics", "//fboss/agent/hw/test:hw_test_ecmp_utils", "//fboss/agent/hw/test:hw_test_thrift_handler_h", diff --git a/fboss/agent/hw/bcm/tests/HwTestRouteUtilsThriftHandler.cpp b/fboss/agent/hw/bcm/tests/HwTestRouteUtilsThriftHandler.cpp new file mode 100644 index 0000000000000..f0603d812748d --- /dev/null +++ b/fboss/agent/hw/bcm/tests/HwTestRouteUtilsThriftHandler.cpp @@ -0,0 +1,262 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/agent/hw/test/HwTestThriftHandler.h" + +#include "fboss/agent/HwSwitch.h" +#include "fboss/agent/hw/bcm/BcmAddressFBConvertors.h" +#include "fboss/agent/hw/bcm/BcmError.h" +#include "fboss/agent/hw/bcm/BcmHost.h" +#include "fboss/agent/types.h" + +using facebook::fboss::bcmCheckError; +using facebook::fboss::BcmError; +using facebook::fboss::BcmSwitch; +using facebook::fboss::HwAsic; +using facebook::fboss::HwSwitch; +using facebook::fboss::InterfaceID; +using facebook::fboss::ipToBcmIp6; + +namespace { +void initBcmRoute( + bcm_l3_route_t& route, + const folly::CIDRNetwork& cidrNetwork) { + bcm_l3_route_t_init(&route); + + const auto& [networkIP, netmask] = cidrNetwork; + if (networkIP.isV4()) { + route.l3a_subnet = networkIP.asV4().toLongHBO(); + route.l3a_ip_mask = + folly::IPAddressV4(folly::IPAddressV4::fetchMask(netmask)).toLongHBO(); + } else { // IPv6 + ipToBcmIp6(networkIP, &route.l3a_ip6_net); + memcpy( + &route.l3a_ip6_mask, + folly::IPAddressV6::fetchMask(netmask).data(), + sizeof(route.l3a_ip6_mask)); + route.l3a_flags = BCM_L3_IP6; + } +} + +bcm_l3_route_t +getBcmRoute(int unit, const folly::CIDRNetwork& cidrNetwork, uint32_t flags) { + bcm_l3_route_t route; + initBcmRoute(route, cidrNetwork); + route.l3a_flags |= flags; + CHECK_EQ(bcm_l3_route_get(unit, &route), 0); + return route; +} + +bool isRoutePresent( + int unit, + facebook::fboss::RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + bcm_l3_route_t route; + initBcmRoute(route, cidrNetwork); + route.l3a_vrf = rid; + return (0 == bcm_l3_route_get(unit, &route)); +} + +std::optional getHwRouteClassID( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID /*rid*/, + const folly::CIDRNetwork& cidrNetwork) { + auto bcmSwitch = static_cast(hwSwitch); + + bcm_l3_route_t route = getBcmRoute(bcmSwitch->getUnit(), cidrNetwork, 0); + + return route.l3a_lookup_class == 0 ? std::nullopt + : std::optional(route.l3a_lookup_class); +} + +bool isHwRouteToCpu( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID /*rid*/, + const folly::CIDRNetwork& cidrNetwork) { + auto bcmSwitch = static_cast(hwSwitch); + + bcm_l3_route_t route = getBcmRoute(bcmSwitch->getUnit(), cidrNetwork, 0); + + if (route.l3a_flags & BCM_L3_MULTIPATH) { + return false; + } + bcm_l3_egress_t egress; + bcm_l3_egress_t_init(&egress); + CHECK_EQ(bcm_l3_egress_get(bcmSwitch->getUnit(), route.l3a_intf, &egress), 0); + + return (egress.flags & BCM_L3_L2TOCPU) && (egress.flags | BCM_L3_COPY_TO_CPU); +} + +bool isHwRouteMultiPath( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID /*rid*/, + const folly::CIDRNetwork& cidrNetwork) { + auto bcmSwitch = static_cast(hwSwitch); + + bcm_l3_route_t route = getBcmRoute(bcmSwitch->getUnit(), cidrNetwork, 0); + + return route.l3a_flags & BCM_L3_MULTIPATH; +} + +bool isRouteUnresolvedToCpuClassId( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + auto classId = getHwRouteClassID(hwSwitch, rid, cidrNetwork); + return classId.has_value() && + facebook::fboss::cfg::AclLookupClass(classId.value()) == + facebook::fboss::cfg::AclLookupClass::DST_CLASS_L3_LOCAL_2; +} + +bool isHwRouteHit( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID /*rid*/, + const folly::CIDRNetwork& cidrNetwork) { + auto bcmSwitch = static_cast(hwSwitch); + bcm_l3_route_t route = getBcmRoute(bcmSwitch->getUnit(), cidrNetwork, 0); + return (route.l3a_flags & BCM_L3_HIT); +} + +void clearHwRouteHit( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID /*rid*/, + const folly::CIDRNetwork& cidrNetwork) { + auto bcmSwitch = static_cast(hwSwitch); + getBcmRoute(bcmSwitch->getUnit(), cidrNetwork, BCM_L3_HIT_CLEAR); +} + +bool isEgressToIp( + const BcmSwitch* bcmSwitch, + facebook::fboss::RouterID rid, + folly::IPAddress addr, + bcm_if_t egress) { + if (!bcmSwitch->getPlatform()->getAsic()->isSupported( + HwAsic::Feature::HOSTTABLE)) { + bcm_l3_route_t route = getBcmRoute( + bcmSwitch->getUnit(), folly::CIDRNetwork(addr, addr.bitCount()), 0); + return egress == route.l3a_intf; + } + bcm_l3_host_t host; + bcm_l3_host_t_init(&host); + if (addr.isV4()) { + host.l3a_ip_addr = addr.asV4().toLongHBO(); + } else { + memcpy( + &host.l3a_ip6_addr, + addr.asV6().toByteArray().data(), + sizeof(host.l3a_ip6_addr)); + host.l3a_flags |= BCM_L3_IP6; + } + host.l3a_vrf = rid; + CHECK_EQ(bcm_l3_host_find(bcmSwitch->getUnit(), &host), 0); + return egress == host.l3a_intf; +} + +bool isHwRouteToNextHop( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID rid, + const folly::CIDRNetwork& cidrNetwork, + folly::IPAddress ip, + std::optional weight) { + auto bcmSwitch = static_cast(hwSwitch); + + bcm_l3_route_t route = getBcmRoute(bcmSwitch->getUnit(), cidrNetwork, 0); + + if (route.l3a_flags & BCM_L3_MULTIPATH) { + // check for member to ip, interface + bcm_l3_egress_ecmp_t ecmp; + bcm_l3_egress_ecmp_t_init(&ecmp); + ecmp.ecmp_intf = route.l3a_intf; + ecmp.flags = BCM_L3_WITH_ID; + int count = 0; + CHECK_EQ( + bcm_l3_ecmp_get(bcmSwitch->getUnit(), &ecmp, 0, nullptr, &count), 0); + std::vector members; + members.resize(count); + CHECK_EQ( + bcm_l3_ecmp_get( + bcmSwitch->getUnit(), + &ecmp, + members.size(), + members.data(), + &count), + 0); + bool found = false; + bcm_l3_ecmp_member_t foundMember; + bcm_l3_ecmp_member_t_init(&foundMember); + for (auto member : members) { + if (!isEgressToIp(bcmSwitch, rid, ip, member.egress_if)) { + continue; + } + found = true; + foundMember = member; + break; + } + + if (!weight) { + return found; + } + + return weight.value() == + std::count_if( + members.begin(), members.end(), [foundMember](auto member) { + return member.egress_if == foundMember.egress_if; + }); + } + // check for next hop + return isEgressToIp(bcmSwitch, rid, ip, route.l3a_intf); +} + +} // namespace + +namespace facebook { +namespace fboss { +namespace utility { + +void HwTestThriftHandler::getRouteInfo( + RouteInfo& routeInfo, + std::unique_ptr prefix) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + routeInfo.exists() = isRoutePresent(0, RouterID(0), routePrefix); + if (*routeInfo.exists()) { + auto classID = getHwRouteClassID(hwSwitch_, RouterID(0), routePrefix); + if (classID.has_value()) { + routeInfo.classId() = classID.value(); + } + routeInfo.isProgrammedToCpu() = + isHwRouteToCpu(hwSwitch_, RouterID(0), routePrefix); + routeInfo.isMultiPath() = + isHwRouteMultiPath(hwSwitch_, RouterID(0), routePrefix); + routeInfo.isRouteUnresolvedToClassId() = + isRouteUnresolvedToCpuClassId(hwSwitch_, RouterID(0), routePrefix); + } +} + +bool HwTestThriftHandler::isRouteHit(std::unique_ptr prefix) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + return isHwRouteHit(hwSwitch_, RouterID(0), routePrefix); +} + +void HwTestThriftHandler::clearRouteHit(std::unique_ptr prefix) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + clearHwRouteHit(hwSwitch_, RouterID(0), routePrefix); +} + +bool HwTestThriftHandler::isRouteToNexthop( + std::unique_ptr prefix, + std::unique_ptr nexthop) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + return isHwRouteToNextHop( + hwSwitch_, + RouterID(0), + routePrefix, + network::toIPAddress(*nexthop), + std::nullopt); +} + +} // namespace utility +} // namespace fboss +} // namespace facebook diff --git a/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp b/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp new file mode 100644 index 0000000000000..7db680db5c2a2 --- /dev/null +++ b/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp @@ -0,0 +1,250 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/agent/hw/test/HwTestThriftHandler.h" + +#include "fboss/agent/FbossError.h" +#include "fboss/agent/hw/sai/api/RouteApi.h" +#include "fboss/agent/hw/sai/api/SaiApiTable.h" +#include "fboss/agent/hw/sai/switch/SaiCounterManager.h" +#include "fboss/agent/hw/sai/switch/SaiManagerTable.h" +#include "fboss/agent/hw/sai/switch/SaiSwitch.h" +#include "fboss/agent/hw/sai/switch/SaiSwitchManager.h" +#include "fboss/agent/hw/sai/switch/SaiVirtualRouterManager.h" +#include "fboss/agent/types.h" + +using facebook::fboss::HwSwitch; +using facebook::fboss::RouterID; +using facebook::fboss::SaiApiTable; +using facebook::fboss::SaiNextHopTraitsT; +using facebook::fboss::SaiRouteTraits; +using facebook::fboss::SaiSwitch; +using facebook::fboss::SaiSwitchTraits; +using facebook::fboss::cfg::AclLookupClass; + +namespace { +bool isEgressToIp(folly::IPAddress addr, sai_object_id_t adapterKey) { + auto ipAttr = SaiApiTable::getInstance()->nextHopApi().getAttribute( + static_cast(adapterKey), + SaiNextHopTraitsT::Attributes::Ip()); + return ipAttr == addr; +} + +SaiRouteTraits::RouteEntry getSaiRouteAdapterKey( + const SaiSwitch* saiSwitch, + RouterID rid, + const folly::CIDRNetwork& prefix) { + auto virtualRouterHandle = + saiSwitch->managerTable()->virtualRouterManager().getVirtualRouterHandle( + rid); + if (!virtualRouterHandle) { + throw facebook::fboss::FbossError("No virtual router with id 0"); + } + + return SaiRouteTraits::RouteEntry( + saiSwitch->getSaiSwitchId(), + virtualRouterHandle->virtualRouter->adapterKey(), + prefix); +} + +std::optional getHwRouteClassID( + const HwSwitch* hw, + RouterID rid, + const folly::CIDRNetwork& prefix) { + const auto saiSwitch = static_cast(hw); + + try { + auto r = getSaiRouteAdapterKey(saiSwitch, rid, prefix); + auto metadata = SaiApiTable::getInstance()->routeApi().getAttribute( + r, SaiRouteTraits::Attributes::Metadata()); + return metadata == 0 ? std::nullopt : std::optional(metadata); + } catch (const std::exception& e) { + return std::nullopt; + } +} + +bool isHwRouteToCpu( + const HwSwitch* hwSwitch, + RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + const auto saiSwitch = static_cast(hwSwitch); + + auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); + sai_object_id_t nhop = SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); + + facebook::fboss::SwitchSaiId switchId = + saiSwitch->managerTable()->switchManager().getSwitchSaiId(); + sai_object_id_t cpuPortId{ + SaiApiTable::getInstance()->switchApi().getAttribute( + switchId, SaiSwitchTraits::Attributes::CpuPort{})}; + + return nhop == cpuPortId; +} + +bool isHwRouteHit( + [[maybe_unused]] const HwSwitch* hwSwitch, + [[maybe_unused]] RouterID /*rid*/, + [[maybe_unused]] const folly::CIDRNetwork& cidrNetwork) { + throw facebook::fboss::FbossError("L3 entry hitbit is unsupported for SAI"); +} + +void clearHwRouteHit( + [[maybe_unused]] const HwSwitch* hwSwitch, + [[maybe_unused]] RouterID /*rid*/, + [[maybe_unused]] const folly::CIDRNetwork& cidrNetwork) { + throw facebook::fboss::FbossError("L3 entry hitbit is unsupported for SAI"); +} + +bool isHwRouteMultiPath( + const HwSwitch* hwSwitch, + RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + const auto saiSwitch = static_cast(hwSwitch); + + auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); + sai_object_id_t nhop = SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); + + try { + SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( + static_cast(nhop), + facebook::fboss::SaiNextHopGroupTraits::Attributes:: + NextHopMemberList{}); + } catch (const facebook::fboss::SaiApiError&) { + // its not next hop group + return false; + } + return true; +} + +bool isHwRouteToNextHop( + const HwSwitch* hwSwitch, + RouterID rid, + const folly::CIDRNetwork& cidrNetwork, + folly::IPAddress ip, + std::optional weight) { + const auto saiSwitch = static_cast(hwSwitch); + auto classId = getHwRouteClassID(hwSwitch, rid, cidrNetwork); + if (classId.has_value() && + (AclLookupClass(classId.value()) == + AclLookupClass::DST_CLASS_L3_LOCAL_1 || + AclLookupClass(classId.value()) == + AclLookupClass::DST_CLASS_L3_LOCAL_2)) { + XLOG(DBG2) << "resolved route has class ID 1 or 2"; + return false; + } + + auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); + sai_object_id_t nhop = SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); + + try { + auto members = SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( + static_cast(nhop), + facebook::fboss::SaiNextHopGroupTraits::Attributes:: + NextHopMemberList{}); + for (auto member : members) { + sai_object_id_t nextHopId = + SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( + static_cast(member), + facebook::fboss::SaiNextHopGroupMemberTraits::Attributes:: + NextHopId{}); + if (!isEgressToIp(ip, nextHopId)) { + continue; + } + if (!weight) { + return true; + } + return weight.value() == + SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( + static_cast(member), + facebook::fboss::SaiNextHopGroupMemberTraits::Attributes:: + Weight{}); + } + } catch (const facebook::fboss::SaiApiError&) { + return isEgressToIp(ip, nhop); + } + return false; +} + +bool isRoutePresent( + const HwSwitch* hwSwitch, + RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + const auto saiSwitch = static_cast(hwSwitch); + + auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); + try { + SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); + } catch (const facebook::fboss::SaiApiError&) { + return false; + } + + return true; +} + +bool isRouteUnresolvedToCpuClassId( + const HwSwitch* hwSwitch, + RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + auto classId = getHwRouteClassID(hwSwitch, rid, cidrNetwork); + return classId.has_value() && + facebook::fboss::cfg::AclLookupClass(classId.value()) == + facebook::fboss::cfg::AclLookupClass::DST_CLASS_L3_LOCAL_2; +} + +} // namespace + +namespace facebook { +namespace fboss { +namespace utility { + +void HwTestThriftHandler::getRouteInfo( + RouteInfo& routeInfo, + std::unique_ptr prefix) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + routeInfo.exists() = isRoutePresent(hwSwitch_, RouterID(0), routePrefix); + if (*routeInfo.exists()) { + auto classID = getHwRouteClassID(hwSwitch_, RouterID(0), routePrefix); + if (classID.has_value()) { + routeInfo.classId() = classID.value(); + } + routeInfo.isProgrammedToCpu() = + isHwRouteToCpu(hwSwitch_, RouterID(0), routePrefix); + routeInfo.isMultiPath() = + isHwRouteMultiPath(hwSwitch_, RouterID(0), routePrefix); + routeInfo.isRouteUnresolvedToClassId() = + isRouteUnresolvedToCpuClassId(hwSwitch_, RouterID(0), routePrefix); + } +} + +bool HwTestThriftHandler::isRouteHit(std::unique_ptr prefix) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + return isHwRouteHit(hwSwitch_, RouterID(0), routePrefix); +} + +void HwTestThriftHandler::clearRouteHit(std::unique_ptr prefix) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + clearHwRouteHit(hwSwitch_, RouterID(0), routePrefix); +} + +bool HwTestThriftHandler::isRouteToNexthop( + std::unique_ptr prefix, + std::unique_ptr nexthop) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + return isHwRouteToNextHop( + hwSwitch_, + RouterID(0), + routePrefix, + network::toIPAddress(*nexthop), + std::nullopt); +} + +} // namespace utility +} // namespace fboss +} // namespace facebook diff --git a/fboss/agent/hw/sai/hw_test/hw_test.bzl b/fboss/agent/hw/sai/hw_test/hw_test.bzl index 4e4751e2e65d5..331993d17876a 100644 --- a/fboss/agent/hw/sai/hw_test/hw_test.bzl +++ b/fboss/agent/hw/sai/hw_test/hw_test.bzl @@ -438,6 +438,7 @@ def _test_thrift_handler(sai_impl, is_npu): "HwTestEcmpUtilsThriftHandler.cpp", "HwTestPortUtilsThriftHandler.cpp", "HwTestVoqSwitchUtilsThriftHandler.cpp", + "HwTestRouteUtilsThriftHandler.cpp", "HwTestThriftHandler.cpp", ], auto_headers = AutoHeaders.SOURCES, diff --git a/fboss/agent/hw/test/HwTestThriftHandler.h b/fboss/agent/hw/test/HwTestThriftHandler.h index 81a304eaff86f..5c9814b07d736 100644 --- a/fboss/agent/hw/test/HwTestThriftHandler.h +++ b/fboss/agent/hw/test/HwTestThriftHandler.h @@ -82,6 +82,13 @@ class HwTestThriftHandler : public AgentHwTestCtrlSvIf { bool injectCorrectable) override; void injectSwitchReachabilityChangeNotification() override; + void getRouteInfo(RouteInfo& routeInfo, std::unique_ptr prefix) + override; + bool isRouteHit(std::unique_ptr prefix) override; + void clearRouteHit(std::unique_ptr prefix) override; + bool isRouteToNexthop( + std::unique_ptr prefix, + std::unique_ptr nexthop) override; private: HwSwitch* hwSwitch_; From d87e0e41129d067a7c07cded9b81161456686941 Mon Sep 17 00:00:00 2001 From: Jeffrey Leung Date: Tue, 15 Oct 2024 16:58:12 -0700 Subject: [PATCH 130/479] Fix fabric port conditional check Summary: Fix conditional check implemented in D63735194 which mistakenly printed loopback IPs for fabric ports in the fboss2 show interface command. Reviewed By: shri-khare Differential Revision: D64424798 fbshipit-source-id: e0f54f244be4df1c333cd3f14d1c7699d1126d6d --- fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h b/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h index e8f871cf1c69a..c6637d95e181d 100644 --- a/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h +++ b/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h @@ -283,7 +283,9 @@ class CmdShowInterface std::string name = *interface.name(); std::vector prefixes; - if (interface.portType() == cfg::PortType::FABRIC_PORT || + // TODO (jycleung) portType is a new field addition to the interface. + // When D63407523 is rolled out to the fleet, remove the name check. + if (interface.portType() != cfg::PortType::FABRIC_PORT && !name.starts_with("fab")) { // Skip addresses for fabric ports for (const auto& prefix : *interface.prefixes()) { prefixes.push_back( From 0df7688ae928da32be0e11f6d8571cdc18add3e2 Mon Sep 17 00:00:00 2001 From: Tao Ren Date: Tue, 15 Oct 2024 17:16:45 -0700 Subject: [PATCH 131/479] fix get_version logic in montblanc/fw_util.json Summary: Update "getVersionCmd" in montblanc/fw_util.json to fetch firmware versions properly. Reviewed By: joancaneus, rationalis Differential Revision: D64428269 fbshipit-source-id: 6f75c920876c9e3b76756df2ba196b76906a5222 --- fboss/platform/configs/montblanc/fw_util.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fboss/platform/configs/montblanc/fw_util.json b/fboss/platform/configs/montblanc/fw_util.json index 05b775f740242..9a7b2f1de2bb4 100644 --- a/fboss/platform/configs/montblanc/fw_util.json +++ b/fboss/platform/configs/montblanc/fw_util.json @@ -8,7 +8,7 @@ "postUpgradeCmd": "echo -e '\\x16' | dd of=/dev/port bs=1 seek=$((0xb2)) count=1" }, "iob_fpga": { - "getVersionCmd": "iob_fpga_ver=$((`cat /run/devmap/fpgas/MCB_IOB_INFO_ROM/fpga_ver`));echo 0.$iob_fpga_ver", + "getVersionCmd": "cat /run/devmap/fpgas/MCB_IOB_INFO_ROM/fw_ver", "priority": 2, "upgradeCmd": "iob_fpga_filename=$(head -n 1 /home/iob_fpga_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1;flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1 -w $iob_fpga_filename -c N25Q128..3E", "verifyFwCmd": "iob_fpga_filename=$(head -n 1 /home/iob_fpga_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1;flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1 -v $iob_fpga_filename -c N25Q128..3E", @@ -16,7 +16,7 @@ }, "dom1_fpga": { "preUpgradeCmd": "gpioset $(gpiodetect | grep -E 'fboss_iob_pci.gpiochip.*' | awk '{print $1}') 9=1", - "getVersionCmd": "dom1_fpga_ver=$((`cat /run/devmap/fpgas/SMB_DOM1_INFO_ROM/fpga_ver`));echo 0.$dom1_fpga_ver", + "getVersionCmd": "cat /run/devmap/fpgas/SMB_DOM1_INFO_ROM/fw_ver", "priority": 3, "upgradeCmd": "dom1_fpga_filename=$(head -n 1 /home/dom1_fpga_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_2_DEVICE_1 -w $dom1_fpga_filename -c N25Q128..3E", "verifyFwCmd": "dom1_fpga_filename=$(head -n 1 /home/dom1_fpga_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_2_DEVICE_1 -v $dom1_fpga_filename -c N25Q128..3E", @@ -25,7 +25,7 @@ }, "dom2_fpga": { "preUpgradeCmd": "gpioset $(gpiodetect | grep -E 'fboss_iob_pci.gpiochip.*' | awk '{print $1}') 10=1", - "getVersionCmd": "dom2_fpga_ver=$((`cat /run/devmap/fpgas/SMB_DOM2_INFO_ROM/fpga_ver`));echo 0.$dom2_fpga_ver", + "getVersionCmd": "cat /run/devmap/fpgas/SMB_DOM2_INFO_ROM/fw_ver", "priority": 4, "upgradeCmd": "dom2_fpga_filename=$(head -n 1 /home/dom2_fpga_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_3_DEVICE_1 -w $dom2_fpga_filename -c N25Q128..3E", "verifyFwCmd": "dom2_fpga_filename=$(head -n 1 /home/dom2_fpga_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_3_DEVICE_1 -v $dom2_fpga_filename -c N25Q128..3E", @@ -34,7 +34,7 @@ }, "mcb_cpld": { "preUpgradeCmd": "gpioset $(gpiodetect | grep -E 'fboss_iob_pci.gpiochip.*' | awk '{print $1}') 3=1", - "getVersionCmd": "mcb_cpld_ver=$((`cat /run/devmap/cplds/MCB_CPLD/cpld_ver`));mcb_cpld_subver=$((`cat /run/devmap/cplds/MCB_CPLD/cpld_minor_ver`));echo $mcb_cpld_ver'.'$mcb_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/MCB_CPLD/fw_ver", "priority": 5, "upgradeCmd": "mcb_cpld_filename=$(head -n 1 /home/mcb_cpld_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_4_DEVICE_1 -w $mcb_cpld_filename -c W25X20", "verifyFwCmd": "mcb_cpld_filename=$(head -n 1 /home/mcb_cpld_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_4_DEVICE_1 -v $mcb_cpld_filename -c W25X20", @@ -43,7 +43,7 @@ }, "smb_cpld": { "preUpgradeCmd": "gpioset $(gpiodetect | grep -E 'fboss_iob_pci.gpiochip.*' | awk '{print $1}') 7=1", - "getVersionCmd": "smb_cpld_ver=$((`cat /run/devmap/cplds/SMB_CPLD/cpld_ver`));smb_cpld_subver=$((`cat /run/devmap/cplds/SMB_CPLD/cpld_minor_ver`));echo $smb_cpld_ver'.'$smb_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/SMB_CPLD/fw_ver", "priority": 6, "upgradeCmd": "smb_cpld_filename=$(head -n 1 /home/smb_cpld_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_5_DEVICE_1 -w $smb_cpld_filename -c W25X20", "verifyFwCmd": "smb_cpld_filename=$(head -n 1 /home/smb_cpld_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_5_DEVICE_1 -v $smb_cpld_filename -c W25X20", @@ -52,7 +52,7 @@ }, "scm_cpld": { "preUpgradeCmd": "gpioset $(gpiodetect | grep -E 'fboss_iob_pci.gpiochip.*' | awk '{print $1}') 1=1", - "getVersionCmd": "scm_cpld_ver=$((`cat /run/devmap/cplds/SCM_CPLD/cpld_ver`));scm_cpld_subver=$((`cat /run/devmap/cplds/SCM_CPLD/cpld_minor_ver`));echo $scm_cpld_ver'.'$scm_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/SCM_CPLD/fw_ver", "priority": 7, "upgradeCmd": "scm_cpld_filename=$(head -n 1 /home/scm_cpld_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_7_DEVICE_1 -w $scm_cpld_filename -c W25X20", "verifyFwCmd": "scm_cpld_filename=$(head -n 1 /home/scm_cpld_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_7_DEVICE_1 -v $scm_cpld_filename -c W25X20", From 8d283679e96d1b49186937482e4b9ca47f9ceb99 Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Tue, 15 Oct 2024 17:49:42 -0700 Subject: [PATCH 132/479] pass in thrift object to lambda visitor 4/n Summary: this diff makes it such that we are able to pass in thrift object into lambda visitor and invoke visitTyped on hybrid mode. Differential Revision: D64074338 Privacy Context Container: L1125642 fbshipit-source-id: 041e04fbaa27234ebaba40ecc2c5923137046363 --- .../nodes/tests/ThriftStructNodeTests.cpp | 30 +++++++++++-- fboss/thrift_cow/visitors/PathVisitor.h | 9 ++-- .../visitors/tests/PatchApplierTests.cpp | 13 +++--- .../visitors/tests/PathVisitorTests.cpp | 44 ++++++++++++++++--- 4 files changed, 79 insertions(+), 17 deletions(-) diff --git a/fboss/thrift_cow/nodes/tests/ThriftStructNodeTests.cpp b/fboss/thrift_cow/nodes/tests/ThriftStructNodeTests.cpp index 75dcf91621e5a..308baa8fcab30 100644 --- a/fboss/thrift_cow/nodes/tests/ThriftStructNodeTests.cpp +++ b/fboss/thrift_cow/nodes/tests/ThriftStructNodeTests.cpp @@ -228,7 +228,15 @@ TEST(ThriftStructNodeTests, ThriftStructNodeVisit) { ThriftStructNode node(data); folly::dynamic out; - auto f = [&out](auto& node) { out = node.toFollyDynamic(); }; + auto f = [&out](auto& node) { + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + out = node.toFollyDynamic(); + } else { + FAIL() << "unexpected non-cow visit"; + } + }; std::vector path = {"inlineBool"}; auto result = visitPath(node, path.begin(), path.end(), f); @@ -263,8 +271,24 @@ TEST(ThriftStructNodeTests, ThriftStructNodeVisitMutable) { ThriftStructNode node(data); folly::dynamic toWrite, out; - auto write = [&toWrite](auto& node) { node.fromFollyDynamic(toWrite); }; - auto read = [&out](auto& node) { out = node.toFollyDynamic(); }; + auto write = [&toWrite](auto& node) { + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + node.fromFollyDynamic(toWrite); + } else { + FAIL() << "unexpected non-cow visit"; + } + }; + auto read = [&out](auto& node) { + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + out = node.toFollyDynamic(); + } else { + FAIL() << "unexpected non-cow visit"; + } + }; std::vector path = {"inlineBool"}; toWrite = false; diff --git a/fboss/thrift_cow/visitors/PathVisitor.h b/fboss/thrift_cow/visitors/PathVisitor.h index 84757158de0c0..133fab8734b71 100644 --- a/fboss/thrift_cow/visitors/PathVisitor.h +++ b/fboss/thrift_cow/visitors/PathVisitor.h @@ -80,7 +80,7 @@ class BasePathVisitorOperator { template inline void visitTyped(Node& node, pv_detail::PathIter begin, pv_detail::PathIter end) - requires(apache::thrift::is_thrift_class_v) + requires(!is_cow_type_v) { // supporting only read-only visitation CHECK(visitReadOnly_); @@ -429,8 +429,11 @@ struct PathVisitorImpl< return ThriftTraverseResult::INVALID_MAP_KEY; } auto& val = tObj.at(key.value()); - // TODO: support operator - LOG(INFO) << val; + if (begin == end) { + op.visitTyped(val, begin, end); + } else { + // TODO: further recurse + } } return ThriftTraverseResult::OK; } catch (const std::exception& ex) { diff --git a/fboss/thrift_cow/visitors/tests/PatchApplierTests.cpp b/fboss/thrift_cow/visitors/tests/PatchApplierTests.cpp index 062e3ecc7c0e1..ba2409422be47 100644 --- a/fboss/thrift_cow/visitors/tests/PatchApplierTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PatchApplierTests.cpp @@ -350,11 +350,14 @@ TEST(PatchApplierTests, FailPatchingSetEntry) { auto process = [&](auto& node) { EXPECT_FALSE(visited); visited = true; - - using NodeT = typename folly::remove_cvref_t; - using TC = typename NodeT::TC; - auto ret = PatchApplier::apply(node, PatchNode(intPatch)); - EXPECT_EQ(ret, PatchApplyResult::PATCHING_IMMUTABLE_NODE); + if constexpr (is_cow_type_v) { + using NodeT = typename folly::remove_cvref_t; + using TC = typename NodeT::TC; + auto ret = PatchApplier::apply(node, PatchNode(intPatch)); + EXPECT_EQ(ret, PatchApplyResult::PATCHING_IMMUTABLE_NODE); + } else { + FAIL() << "unexpected non-cow visit"; + } }; visitPath(*nodeA, path.begin(), path.end(), process); EXPECT_TRUE(visited); diff --git a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp index f1e75f7387aa9..234f72cad6798 100644 --- a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp @@ -22,7 +22,13 @@ TEST(PathVisitorTests, AccessField) { folly::dynamic dyn; auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { EXPECT_EQ(begin, end); - dyn = node.toFollyDynamic(); + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + dyn = node.toFollyDynamic(); + } else { + FAIL() << "unexpected non-cow visit"; + } }); std::vector path{"inlineInt"}; auto result = RootPathVisitor::visit( @@ -60,7 +66,14 @@ TEST(PathVisitorTests, HybridMapAccess) { folly::dynamic dyn; auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { EXPECT_EQ(begin, end); - dyn = node.toFollyDynamic(); + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + dyn = node.toFollyDynamic(); + } else { + facebook::thrift::to_dynamic( + dyn, node, facebook::thrift::dynamic_format::JSON_1); + } }); // hybridMap @@ -77,7 +90,7 @@ TEST(PathVisitorTests, HybridMapAccess) { auto result = RootPathVisitor::visit( *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); EXPECT_EQ(result, ThriftTraverseResult::OK); - // EXPECT_TRUE(dyn.asBool()); + EXPECT_TRUE(dyn.asBool()); } } #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ @@ -89,7 +102,13 @@ TEST(PathVisitorTests, AccessFieldInContainer) { folly::dynamic dyn; auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { EXPECT_EQ(begin, end); - dyn = node.toFollyDynamic(); + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + dyn = node.toFollyDynamic(); + } else { + FAIL() << "unexpected non-cow visit"; + } }); std::vector path{"mapOfEnumToStruct", "3"}; auto result = RootPathVisitor::visit( @@ -125,6 +144,14 @@ struct GetVisitedPathsOperator : public BasePathVisitorOperator { "/" + folly::join('/', std::vector(begin, end))); } + template + void visit(Node& node, pv_detail::PathIter begin, pv_detail::PathIter end) + requires(!is_cow_type_v) + { + SerializableReader dummy(node); + visit(dummy, begin, end); + } + private: std::set visited; }; @@ -151,9 +178,14 @@ TEST(PathVisitorTests, AccessOptional) { std::string got; auto processPath = pvlambda([&got](auto& node, auto begin, auto end) { EXPECT_EQ(begin, end); - got = node.toFollyDynamic().asString(); + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + got = node.toFollyDynamic().asString(); + } else { + FAIL() << "unexpected non-cow visit"; + } }); - std::vector path{"optionalString"}; auto result = RootPathVisitor::visit( *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); From 9bd5c6645139f4a5dbdafd02196361dc283c08bf Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Tue, 15 Oct 2024 17:49:42 -0700 Subject: [PATCH 133/479] PathVisitor UT for hybrid map: accessing struct values 5/n Summary: create a map with struct as value. this is to add more test cases as more shape of maps. note that this does not work yet, i am just adding the data structure first Differential Revision: D64081029 Privacy Context Container: L1125642 fbshipit-source-id: ede7c4a40f1cb5e39e4159321818aecafc2a075e --- fboss/thrift_cow/nodes/tests/test.thrift | 4 +++- .../visitors/tests/PathVisitorTests.cpp | 16 +++++++++++++++- .../visitors/tests/RecurseVisitorTests.cpp | 2 ++ .../visitors/tests/VisitorTestUtils.cpp | 4 +++- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/fboss/thrift_cow/nodes/tests/test.thrift b/fboss/thrift_cow/nodes/tests/test.thrift index 18fc32a86db43..9a489a87c31ec 100644 --- a/fboss/thrift_cow/nodes/tests/test.thrift +++ b/fboss/thrift_cow/nodes/tests/test.thrift @@ -67,7 +67,9 @@ struct TestStruct { 29: set hybridSet (allow_skip_thrift_cow = true); 30: TestUnion hybridUnion (allow_skip_thrift_cow = true); 31: ChildStruct hybridStruct (allow_skip_thrift_cow = true); - 32: map hybridMapOfI32ToStruct; // (allow_skip_thrift_cow = true) + 32: map hybridMapOfI32ToStruct ( + allow_skip_thrift_cow = true, + ); } (allow_skip_thrift_cow = true) struct ParentTestStruct { diff --git a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp index 234f72cad6798..265b8e35f1657 100644 --- a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp @@ -84,14 +84,28 @@ TEST(PathVisitorTests, HybridMapAccess) { EXPECT_EQ(result, ThriftTraverseResult::OK); EXPECT_TRUE(dyn[1].asBool()); } + // hybridMap/1 { - // hybridMap/1 std::vector path = {"hybridMap", "1"}; auto result = RootPathVisitor::visit( *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); EXPECT_EQ(result, ThriftTraverseResult::OK); EXPECT_TRUE(dyn.asBool()); } + // hybridMapOfI32ToStruct + { + std::vector path = {"hybridMapOfI32ToStruct"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::OK); + EXPECT_NE(dyn.find(20), dyn.items().end()); + cfg::L4PortRange got; + + got = facebook::thrift::from_dynamic( + dyn[20], facebook::thrift::dynamic_format::JSON_1); + EXPECT_EQ(*got.min(), 400); + EXPECT_EQ(*got.max(), 600); + } } #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ diff --git a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp index 248a8ea9e9913..c5722416089f6 100644 --- a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp @@ -134,6 +134,7 @@ TEST(RecurseVisitorTests, TestLeafRecurse) { std::map, folly::dynamic> expected = { #ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ {{"hybridMap"}, testDyn["hybridMap"]}, + {{"hybridMapOfI32ToStruct"}, testDyn["hybridMapOfI32ToStruct"]}, {{"hybridList"}, testDyn["hybridList"]}, {{"hybridSet"}, testDyn["hybridSet"]}, {{"hybridUnion"}, testDyn["hybridUnion"]}, @@ -175,6 +176,7 @@ TEST(RecurseVisitorTests, TestLeafRecurse) { {{"29"}, testDyn["hybridSet"]}, {{"30"}, testDyn["hybridUnion"]}, {{"31"}, testDyn["hybridStruct"]}, + {{"32"}, testDyn["hybridMapOfI32ToStruct"]}, #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ {{"1"}, testDyn["inlineBool"]}, {{"2"}, testDyn["inlineInt"]}, diff --git a/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp b/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp index 30c8d7f1bb7bf..82735e4a520b6 100644 --- a/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp +++ b/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp @@ -32,7 +32,9 @@ TestStruct createHybridMapTestStruct() { dynamic::object("3", dynamic::object("min", 100)("max", 200)))( "mapOfI32ToI32", dynamic::object(1, 1))( "cowMap", dynamic::object(1, true))( - "hybridMap", dynamic::object(1, true)); + "hybridMap", dynamic::object(1, true))( + "hybridMapOfI32ToStruct", + dynamic::object(20, dynamic::object("min", 400)("max", 600))); return facebook::thrift::from_dynamic( testDyn, facebook::thrift::dynamic_format::JSON_1); From a2c4c75f899eaabd3b8cffccd0ee8f83d1f8a22c Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Tue, 15 Oct 2024 17:49:42 -0700 Subject: [PATCH 134/479] PathVisitor UT for hybrid map: key not present 6/n Summary: as title Differential Revision: D64083423 Privacy Context Container: L1125642 fbshipit-source-id: 693d8316f693dbcc861a4b1242412eb837d8c1a7 --- fboss/thrift_cow/visitors/PathVisitor.h | 2 +- fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fboss/thrift_cow/visitors/PathVisitor.h b/fboss/thrift_cow/visitors/PathVisitor.h index 133fab8734b71..dc9ec25bdcc48 100644 --- a/fboss/thrift_cow/visitors/PathVisitor.h +++ b/fboss/thrift_cow/visitors/PathVisitor.h @@ -425,7 +425,7 @@ struct PathVisitorImpl< // Get key auto token = *begin++; auto key = folly::tryTo(token); - if (!key.hasValue()) { + if (!key.hasValue() || tObj.find(key.value()) == tObj.end()) { return ThriftTraverseResult::INVALID_MAP_KEY; } auto& val = tObj.at(key.value()); diff --git a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp index 265b8e35f1657..f0911ed5d348b 100644 --- a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp @@ -92,6 +92,14 @@ TEST(PathVisitorTests, HybridMapAccess) { EXPECT_EQ(result, ThriftTraverseResult::OK); EXPECT_TRUE(dyn.asBool()); } + // Invalid path + // hybridMap/2 + { + std::vector path = {"hybridMap", "2"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::INVALID_MAP_KEY); + } // hybridMapOfI32ToStruct { std::vector path = {"hybridMapOfI32ToStruct"}; From 8f392314f7be94981ca1c5f6ca5d52c0451d8c30 Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Tue, 15 Oct 2024 17:49:42 -0700 Subject: [PATCH 135/479] PathVisitor: more test case on map of struct 7/n Summary: complete UTs with 1. invalid path and 2. value access Differential Revision: D64124200 fbshipit-source-id: 4659fca9e2e0d41e6c672d7d728d85520406f9df --- .../visitors/tests/PathVisitorTests.cpp | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp index f0911ed5d348b..72ed5b159b37f 100644 --- a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp @@ -59,7 +59,7 @@ TEST(PathVisitorTests, AccessField) { } #ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ -TEST(PathVisitorTests, HybridMapAccess) { +TEST(PathVisitorTests, HybridMapPrimitiveAccess) { auto structA = createHybridMapTestStruct(); auto nodeA = std::make_shared>(structA); @@ -114,6 +114,27 @@ TEST(PathVisitorTests, HybridMapAccess) { EXPECT_EQ(*got.min(), 400); EXPECT_EQ(*got.max(), 600); } + // hybridMapOfI32ToStruct/20 + { + std::vector path = {"hybridMapOfI32ToStruct", "20"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::OK); + cfg::L4PortRange got; + + got = facebook::thrift::from_dynamic( + dyn, facebook::thrift::dynamic_format::JSON_1); + EXPECT_EQ(*got.min(), 400); + EXPECT_EQ(*got.max(), 600); + } + // Invalid path + // hybridMapOfI32ToStruct/30 + { + std::vector path = {"hybridMapOfI32ToStruct", "30"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::INVALID_MAP_KEY); + } } #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ From 58e1976098ee1f1b36fd7274e3cdad7cb498feba Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Tue, 15 Oct 2024 17:49:42 -0700 Subject: [PATCH 136/479] PathVisitor: add a new data field - hybridMap of map Summary: Like we discussed in meeting, i want to test recursively call into a hybrid node into a c++ map class Differential Revision: D64246986 Privacy Context Container: L1125642 fbshipit-source-id: 671260be00b0fcc94a27a826a53db21515453310 --- fboss/thrift_cow/nodes/tests/test.thrift | 1 + fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp | 6 +++++- fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fboss/thrift_cow/nodes/tests/test.thrift b/fboss/thrift_cow/nodes/tests/test.thrift index 9a489a87c31ec..b2a3f971324d9 100644 --- a/fboss/thrift_cow/nodes/tests/test.thrift +++ b/fboss/thrift_cow/nodes/tests/test.thrift @@ -70,6 +70,7 @@ struct TestStruct { 32: map hybridMapOfI32ToStruct ( allow_skip_thrift_cow = true, ); + 33: map> hybridMapOfMap (allow_skip_thrift_cow = true); } (allow_skip_thrift_cow = true) struct ParentTestStruct { diff --git a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp index c5722416089f6..eb80564497e63 100644 --- a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp @@ -40,7 +40,8 @@ folly::dynamic createTestDynamic() { "hybridMap", dynamic::object())("hybridList", dynamic::array())( "hybridSet", dynamic::array())("hybridUnion", dynamic::object())( "hybridStruct", dynamic::object("childMap", dynamic::object()))( - "hybridMapOfI32ToStruct", dynamic::object()); + "hybridMapOfI32ToStruct", dynamic::object())( + "hybridMapOfMap", dynamic::object()); } TestStruct createTestStruct(folly::dynamic testDyn) { @@ -69,6 +70,7 @@ TEST(RecurseVisitorTests, TestFullRecurse) { {{"cowMap"}, dynamic::object()}, {{"hybridMap"}, dynamic::object()}, {{"hybridMapOfI32ToStruct"}, dynamic::object()}, + {{"hybridMapOfMap"}, dynamic::object()}, {{"hybridList"}, dynamic::array()}, {{"hybridSet"}, dynamic::array()}, {{"hybridUnion"}, dynamic::object()}, @@ -135,6 +137,7 @@ TEST(RecurseVisitorTests, TestLeafRecurse) { #ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ {{"hybridMap"}, testDyn["hybridMap"]}, {{"hybridMapOfI32ToStruct"}, testDyn["hybridMapOfI32ToStruct"]}, + {{"hybridMapOfMap"}, testDyn["hybridMapOfMap"]}, {{"hybridList"}, testDyn["hybridList"]}, {{"hybridSet"}, testDyn["hybridSet"]}, {{"hybridUnion"}, testDyn["hybridUnion"]}, @@ -177,6 +180,7 @@ TEST(RecurseVisitorTests, TestLeafRecurse) { {{"30"}, testDyn["hybridUnion"]}, {{"31"}, testDyn["hybridStruct"]}, {{"32"}, testDyn["hybridMapOfI32ToStruct"]}, + {{"33"}, testDyn["hybridMapOfMap"]}, #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ {{"1"}, testDyn["inlineBool"]}, {{"2"}, testDyn["inlineInt"]}, diff --git a/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp b/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp index 82735e4a520b6..e9ea6fafd2bf9 100644 --- a/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp +++ b/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp @@ -34,7 +34,8 @@ TestStruct createHybridMapTestStruct() { "cowMap", dynamic::object(1, true))( "hybridMap", dynamic::object(1, true))( "hybridMapOfI32ToStruct", - dynamic::object(20, dynamic::object("min", 400)("max", 600))); + dynamic::object(20, dynamic::object("min", 400)("max", 600)))( + "hybridMapOfMap", dynamic::object(10, dynamic::object(20, 30))); return facebook::thrift::from_dynamic( testDyn, facebook::thrift::dynamic_format::JSON_1); From 6d9d39dbe8b274a66a7572acf09d490a34d94d36 Mon Sep 17 00:00:00 2001 From: Jeffrey Leung Date: Tue, 15 Oct 2024 19:18:58 -0700 Subject: [PATCH 137/479] Fix hostname not matching dsf node value Summary: Fix hostname not matching fully with the DSF node hostname equivalent (i.e. if one but the other does not end with .tfbnw.net) in the show interface command. Reviewed By: shri-khare Differential Revision: D64432051 fbshipit-source-id: 31e653bab2811b142493d6edb6b8c03f4cd971fc --- fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h b/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h index c6637d95e181d..c31dde38ceac0 100644 --- a/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h +++ b/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h @@ -118,8 +118,10 @@ class CmdShowInterface int32_t minSystemPort = 0; for (const auto& idAndNode : dsfNodes) { const auto& node = idAndNode.second; - if (hostInfo.getName() == *node.name()) { + if (utils::removeFbDomains(hostInfo.getName()) == + utils::removeFbDomains(*node.name())) { minSystemPort = *node.systemPortRange()->minimum(); + break; } } From 6e23c0c70e53c6fe38d66d2f403f1ed76bee8dad Mon Sep 17 00:00:00 2001 From: Ron He Date: Tue, 15 Oct 2024 20:04:58 -0700 Subject: [PATCH 138/479] Dump config for hw agent to consume Summary: Currently for multi switch agent tests, during coldboot the gflag and platform config overrides were not passed down to hw agent. This resulted in different behavior of mono and multi switch tests. To resolve this, sw agent will dump configs for hw agents to consume and initialize. Hw agent will consume and delete the file, and then initialize itself based on the provided config. This diff updates agent ensemble to dump config for hw agent to consume, in the case of multi switch tests. Reviewed By: msomasundaran, maxwindiff Differential Revision: D63414933 Privacy Context Container: L1125642 fbshipit-source-id: f6ef769b92e891b19aa63d8d03225183c0364a2b --- fboss/agent/test/AgentEnsemble.cpp | 43 ++++++++++++++++++++++++++---- fboss/agent/test/AgentEnsemble.h | 1 + 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/fboss/agent/test/AgentEnsemble.cpp b/fboss/agent/test/AgentEnsemble.cpp index b53be34935d16..f5f943fcd8e66 100644 --- a/fboss/agent/test/AgentEnsemble.cpp +++ b/fboss/agent/test/AgentEnsemble.cpp @@ -36,6 +36,8 @@ facebook::fboss::PlatformInitFn kPlatformInitFn; static std::string kInputConfigFile; std::optional kStreamTypeOpt{std::nullopt}; static const int kMsWaitForStatsRetry = 2000; +constexpr auto kConfig = "config"; +constexpr auto kMultiSwitch = "multi_switch"; } // namespace namespace facebook::fboss { @@ -53,18 +55,19 @@ void AgentEnsemble::setupEnsemble( FLAGS_verify_apply_oper_delta = true; if (bootType_ == BootType::COLD_BOOT) { - auto agentConf = + auto inputAgentConfig = AgentConfig::fromFile(AgentEnsemble::getInputConfigFile())->thrift; if (platformConfigFn) { - platformConfigFn(*(agentConf.platform())); + platformConfigFn(*(inputAgentConfig.platform())); } // some platform config may need cold boots. so overwrite the config before // creating a switch - writeConfig(agentConf, configFile_); + writeConfig(inputAgentConfig, configFile_); } + auto agentConf = AgentConfig::fromFile(configFile_); + dumpConfigForHwAgent(agentConf.get()); overrideConfigFlag(configFile_); - createSwitch( - AgentConfig::fromFile(configFile_), hwFeaturesDesired, kPlatformInitFn); + createSwitch(std::move(agentConf), hwFeaturesDesired, kPlatformInitFn); for (auto switchId : getSw()->getHwAsicTable()->getSwitchIDs()) { HwAsic* asic = getHwAsicTable()->getHwAsicIf(switchId); @@ -606,4 +609,34 @@ AgentEnsemble::getHwAgentTestClient(SwitchID switchId) { std::move(reconnectingChannel)); } +void AgentEnsemble::dumpConfigForHwAgent(AgentConfig* agentConf) { + if (FLAGS_multi_switch || + folly::get_default( + *agentConf->thrift.defaultCommandLineArgs(), kMultiSwitch, "") == + "true") { + cfg::AgentConfig newAgentConf; + std::map defaultCommandLineArgs = + *agentConf->thrift.defaultCommandLineArgs(); + std::vector flags; + gflags::GetAllFlags(&flags); + for (const auto& flag : flags) { + // Skip writing flags if 1) default value, and 2) config itself. + if (!flag.is_default && flag.name != kConfig) { + defaultCommandLineArgs[flag.name] = flag.current_value; + } + } + + newAgentConf.defaultCommandLineArgs() = defaultCommandLineArgs; + newAgentConf.sw() = *agentConf->thrift.sw(); + newAgentConf.platform() = *agentConf->thrift.platform(); + auto agentConfig = AgentConfig(newAgentConf); + utilCreateDir(AgentDirectoryUtil().agentEnsembleConfigDir()); + for (const auto& [_, switchInfo] : + *newAgentConf.sw()->switchSettings()->switchIdToSwitchInfo()) { + agentConfig.dumpConfig(AgentDirectoryUtil().getTestHwAgentConfigFile( + *switchInfo.switchIndex())); + } + } +} + } // namespace facebook::fboss diff --git a/fboss/agent/test/AgentEnsemble.h b/fboss/agent/test/AgentEnsemble.h index d185fe65c6052..a4de220c135fb 100644 --- a/fboss/agent/test/AgentEnsemble.h +++ b/fboss/agent/test/AgentEnsemble.h @@ -292,6 +292,7 @@ class AgentEnsemble : public TestEnsembleIf { void setConfigFiles(const std::string& fileName); void setBootType(); void overrideConfigFlag(const std::string& fileName); + void dumpConfigForHwAgent(AgentConfig* agentConf); void writeConfig(const cfg::SwitchConfig& config); void writeConfig(const cfg::AgentConfig& config); From 5044d2afc9384b0493aa58ee5e9d83ac20c7daae Mon Sep 17 00:00:00 2001 From: Ron He Date: Tue, 15 Oct 2024 20:04:58 -0700 Subject: [PATCH 139/479] Consume config file for hw agent in testing Summary: Currently for multi switch agent tests, during coldboot the gflag and platform config overrides were not passed down to hw agent. This resulted in different behavior of mono and multi switch tests. To resolve this, sw agent will dump configs for hw agents to consume and initialize. Hw agent will consume and delete the file, and then initialize itself based on the provided config. 1) Create a new gflag `hw_agent_for_testing` - am looking to use this to replace thrift_test_utils_thrift_handler. 2) If flag is enabled, wait for config file to be ready and then initialize asic. Reviewed By: maxwindiff Differential Revision: D63417972 fbshipit-source-id: 97dab25ad2150ff61e9a271bd77aef6f932932f8 --- fboss/agent/BUCK | 59 +++++++++++++++++++------------------ fboss/agent/HwAgentMain.cpp | 7 ++++- fboss/agent/SetupThrift.cpp | 8 +++++ fboss/agent/SetupThrift.h | 2 ++ fboss/agent/Utils.cpp | 22 ++++++++++++++ fboss/agent/Utils.h | 3 ++ 6 files changed, 72 insertions(+), 29 deletions(-) diff --git a/fboss/agent/BUCK b/fboss/agent/BUCK index 2c621adf17bae..941e097e8892b 100644 --- a/fboss/agent/BUCK +++ b/fboss/agent/BUCK @@ -469,34 +469,37 @@ cpp_library( "facebook/Utils.cpp", ], exported_deps = [ - "fbcode//common/network:util", - "fbcode//fboss/agent:asic_utils", - "fbcode//fboss/agent:fboss-error", - "fbcode//fboss/agent:fboss-types", - "fbcode//fboss/agent:fsdb_helper", - "fbcode//fboss/agent:hwswitch_matcher", - "fbcode//fboss/agent:switch_config-cpp2-types", - "fbcode//fboss/agent:switch_state-cpp2-types", - "fbcode//fboss/agent:switchid_scope_resolver", - "fbcode//fboss/agent/if:ctrl-cpp2-types", - "fbcode//fboss/agent/platforms/common/janga800bic:janga800bic_platform_mapping", - "fbcode//fboss/agent/platforms/common/meru400bfu:meru400bfu_platform_mapping", - "fbcode//fboss/agent/platforms/common/meru400bia:meru400bia_platform_mapping", - "fbcode//fboss/agent/platforms/common/meru400biu:meru400biu_platform_mapping", - "fbcode//fboss/agent/platforms/common/meru800bfa:meru800bfa_platform_mapping", - "fbcode//fboss/agent/platforms/common/meru800bia:meru800bia_platform_mapping", - "fbcode//fboss/agent/state:state", - "fbcode//fboss/fsdb/if:fsdb_oper-cpp2-types", - "fbcode//folly:file_util", - "fbcode//folly:network_address", - "fbcode//folly:range", - "fbcode//folly:subprocess", - "fbcode//folly/json:dynamic", - "fbcode//folly/lang:bits", - "fbcode//folly/logging:logging", - "fbcode//folly/system:thread_name", - "fbcode//thrift/lib/cpp/util:enum_utils", - "fbcode//thrift/lib/cpp2/protocol:protocol", + ":agent_dir_util", + ":asic_utils", + ":fboss-error", + ":fboss-types", + ":fsdb_helper", + ":hwswitch_matcher", + ":load_agent_config", + ":switch_config-cpp2-types", + ":switch_state-cpp2-types", + ":switchid_scope_resolver", + "//common/network:util", + "//fboss/agent/if:ctrl-cpp2-types", + "//fboss/agent/platforms/common/janga800bic:janga800bic_platform_mapping", + "//fboss/agent/platforms/common/meru400bfu:meru400bfu_platform_mapping", + "//fboss/agent/platforms/common/meru400bia:meru400bia_platform_mapping", + "//fboss/agent/platforms/common/meru400biu:meru400biu_platform_mapping", + "//fboss/agent/platforms/common/meru800bfa:meru800bfa_platform_mapping", + "//fboss/agent/platforms/common/meru800bia:meru800bia_platform_mapping", + "//fboss/agent/state:state", + "//fboss/fsdb/if:fsdb_oper-cpp2-types", + "//fboss/lib:common_file_utils", + "//folly:file_util", + "//folly:network_address", + "//folly:range", + "//folly:subprocess", + "//folly/json:dynamic", + "//folly/lang:bits", + "//folly/logging:logging", + "//folly/system:thread_name", + "//thrift/lib/cpp/util:enum_utils", + "//thrift/lib/cpp2/protocol:protocol", ], exported_external_deps = [ "boost", diff --git a/fboss/agent/HwAgentMain.cpp b/fboss/agent/HwAgentMain.cpp index 919bb87f70291..8e6614fe430c7 100644 --- a/fboss/agent/HwAgentMain.cpp +++ b/fboss/agent/HwAgentMain.cpp @@ -22,6 +22,7 @@ #include "fboss/agent/HwSwitch.h" #include "fboss/agent/RestartTimeTracker.h" #include "fboss/agent/SetupThrift.h" +#include "fboss/agent/Utils.h" #include "fboss/agent/hw/switch_asics/HwAsic.h" #include "fboss/agent/mnpu/SplitAgentThriftSyncer.h" #include "fboss/agent/state/StateDelta.h" @@ -157,6 +158,10 @@ int hwAgentMain( fb303::fbData->setUseOptionsAsFlags(true); auto config = fbossCommonInit(argc, argv, true /*useBitsflowAclFileSuffix*/); + if (FLAGS_thrift_test_utils_thrift_handler || FLAGS_hw_agent_for_testing) { + config = getConfigFileForTesting(FLAGS_switchIndex); + } + auto hwAgent = std::make_unique( std::move(config), hwFeaturesDesired, initPlatformFn, FLAGS_switchIndex); @@ -202,7 +207,7 @@ int hwAgentMain( std::vector> handlers{}; handlers.push_back(hwAgent->getPlatform()->createHandler()); - if (FLAGS_thrift_test_utils_thrift_handler) { + if (FLAGS_thrift_test_utils_thrift_handler || FLAGS_hw_agent_for_testing) { // Add HwTestThriftHandler to the thrift server auto testUtilsHandler = utility::createHwTestThriftHandler( hwAgent->getPlatform()->getHwSwitch()); diff --git a/fboss/agent/SetupThrift.cpp b/fboss/agent/SetupThrift.cpp index 6b5e70357a51a..a5303953ec62a 100644 --- a/fboss/agent/SetupThrift.cpp +++ b/fboss/agent/SetupThrift.cpp @@ -21,11 +21,19 @@ DEFINE_int32( 30, "Thrift task expire timeout in seconds."); +// TODO: remove after netcastle changes are in place DEFINE_bool( thrift_test_utils_thrift_handler, false, "Enable thrift handler for HW tests"); +DEFINE_bool( + hw_agent_for_testing, + false, + "Whether to prepare hw agent for testing. This includes " + "1) Enable thrift handler for HW tests, " + "2) Consume config file created by sw agent with overrides."); + namespace facebook::fboss { std::unique_ptr setupThriftServer( folly::EventBase& eventBase, diff --git a/fboss/agent/SetupThrift.h b/fboss/agent/SetupThrift.h index e33dc0002a497..d87bfbe141d9d 100644 --- a/fboss/agent/SetupThrift.h +++ b/fboss/agent/SetupThrift.h @@ -21,7 +21,9 @@ DECLARE_int32(thrift_idle_timeout); DECLARE_int32(thrift_task_expire_timeout); +// TODO: remove after netcastle changes are in place DECLARE_bool(thrift_test_utils_thrift_handler); +DECLARE_bool(hw_agent_for_testing); namespace facebook::fboss { diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 853df90012e7b..e73b078207a0f 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -12,6 +12,8 @@ #include #include +#include "fboss/agent/AgentConfig.h" +#include "fboss/agent/AgentDirectoryUtil.h" #include "fboss/agent/AsicUtils.h" #include "fboss/agent/FbossError.h" #include "fboss/agent/FsdbHelper.h" @@ -25,6 +27,7 @@ #include "fboss/agent/state/NdpTable.h" #include "fboss/agent/state/SwitchState.h" #include "fboss/agent/state/Vlan.h" +#include "fboss/lib/CommonFileUtils.h" #include "fboss/agent/gen-cpp2/switch_config_types.h" @@ -1045,4 +1048,23 @@ int numFabricLevels(const std::map& dsfNodes) { }); return maxFabricLevel; } + +std::unique_ptr getConfigFileForTesting(int switchIndex) { + auto configFileName = + AgentDirectoryUtil().getTestHwAgentConfigFile(switchIndex); + std::condition_variable configFileCv; + std::mutex configFileMutex; + std::unique_lock lock(configFileMutex); + XLOG(INFO) << "Waiting on config file " << configFileName + << " to init hw agent"; + while (!checkFileExists(configFileName)) { + configFileCv.wait_for(lock, std::chrono::milliseconds(100), [&]() { + return checkFileExists(configFileName); + }); + } + XLOG(INFO) << "Using config file " << configFileName << " to init hw agent"; + auto config = AgentConfig::fromFile(configFileName); + removeFile(configFileName); + return config; +} } // namespace facebook::fboss diff --git a/fboss/agent/Utils.h b/fboss/agent/Utils.h index 177fee7ad040a..d04f7607ae8d8 100644 --- a/fboss/agent/Utils.h +++ b/fboss/agent/Utils.h @@ -86,6 +86,7 @@ class SwitchState; class Interface; class SwitchSettings; class SwitchIdScopeResolver; +struct AgentConfig; constexpr auto kRecyclePortIdOffset = 1; @@ -441,4 +442,6 @@ bool haveParallelLinksToInterfaceNodes( CpuCosQueueId hwQueueIdToCpuCosQueueId(uint8_t hwQueueId); int numFabricLevels(const std::map& dsfNodes); + +std::unique_ptr getConfigFileForTesting(int switchIndex); } // namespace facebook::fboss From f01437d0273fa1ae49ebd54ba87c90c3c0fbb9eb Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Tue, 15 Oct 2024 20:35:48 -0700 Subject: [PATCH 140/479] add default value for Mtu SaiAttribute of router interface Summary: SAI_ROUTER_INTERFACE_ATTR_MTU is no longer supported on J3 and brcm-sai would return unsupported error when attempting to get this attribute. Thus, provide a default value for this attribute. Note: regarding zero-sdk warmboot, I did not see additional mtu set after warmboot with replayer log enabled, since the new value nullopt means do nothing. Reviewed By: zechengh09 Differential Revision: D64438556 Privacy Context Container: L1125642 fbshipit-source-id: 6a05e1ab1d16e00efc963a7665d4891725c4ffa3 --- fboss/agent/hw/sai/api/RouterInterfaceApi.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fboss/agent/hw/sai/api/RouterInterfaceApi.h b/fboss/agent/hw/sai/api/RouterInterfaceApi.h index fa34eecbea91b..8338f9e4d0847 100644 --- a/fboss/agent/hw/sai/api/RouterInterfaceApi.h +++ b/fboss/agent/hw/sai/api/RouterInterfaceApi.h @@ -117,8 +117,11 @@ struct SaiRouterInterfaceTraitsT { typename detail::RouterInterfaceAttributesTypes::VlanId; using PortId = typename detail::RouterInterfaceAttributesTypes::PortId; - using Mtu = - SaiAttribute; + using Mtu = SaiAttribute< + EnumType, + SAI_ROUTER_INTERFACE_ATTR_MTU, + sai_uint32_t, + SaiIntDefault>; }; using AdapterKey = RouterInterfaceSaiId; using AdapterHostKey = typename detail:: From e64a964694f210926423367c5c390ffe8fc5b63e Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Tue, 15 Oct 2024 21:35:50 -0700 Subject: [PATCH 141/479] fbcode//fboss/lib/led/TARGETS Reviewed By: harshitgulati18 Differential Revision: D64412400 fbshipit-source-id: 92d1c1e8d7182a742b500721cb75f90e8d87b16d --- fboss/lib/led/BUCK | 1 - 1 file changed, 1 deletion(-) diff --git a/fboss/lib/led/BUCK b/fboss/lib/led/BUCK index 72815d22b3fe4..4c0fec08bab70 100644 --- a/fboss/lib/led/BUCK +++ b/fboss/lib/led/BUCK @@ -26,7 +26,6 @@ cpp_library( ], exported_deps = [ ":led_mapping-cpp2-types", - "//fboss/agent:fboss-error", "//fboss/led_service:led_utils", "//fboss/led_service/if:led_structs-cpp2-types", "//folly:format", From a0b7b6e8f6e58b12464b4ad38b375f0ca72136d6 Mon Sep 17 00:00:00 2001 From: Ron He Date: Tue, 15 Oct 2024 23:09:56 -0700 Subject: [PATCH 142/479] Flag to use single NPU platform mapping for testing Summary: As titled. For single-NPU janga testing (currently running in conveyor), the expected fabric connectivity would be different from multi NPU. This has caused test failures for VOQ tests with expected fabric reachability. Add a flag to use single-NPU platform mapping for janga when testing. Reviewed By: simuthus-fb Differential Revision: D64439021 Privacy Context Container: L1125642 fbshipit-source-id: f8ef9e6f5bc2552952ad8890f8313f1a9bfd0aac --- fboss/agent/FabricConnectivityManager.cpp | 8 +++++++- fboss/agent/FabricConnectivityManager.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fboss/agent/FabricConnectivityManager.cpp b/fboss/agent/FabricConnectivityManager.cpp index 5e64d986ae383..84813dfa1d222 100644 --- a/fboss/agent/FabricConnectivityManager.cpp +++ b/fboss/agent/FabricConnectivityManager.cpp @@ -23,6 +23,12 @@ #include "fboss/agent/hw/switch_asics/RamonAsic.h" #include + +DEFINE_bool( + janga_single_npu_for_testing, + false, + "Fabric connectivity manager to use single NPU janga platform for testing."); + using facebook::fboss::DeltaFunctions::forEachAdded; using facebook::fboss::DeltaFunctions::forEachChanged; using facebook::fboss::DeltaFunctions::forEachRemoved; @@ -62,7 +68,7 @@ getPlatformMappingForDsfNode(const PlatformType platformType) { } case PlatformType::PLATFORM_JANGA800BIC: { static Janga800bicPlatformMapping janga800bic{ - true /*multiNpuPlatformMapping*/}; + !FLAGS_janga_single_npu_for_testing /*multiNpuPlatformMapping*/}; return &janga800bic; } default: diff --git a/fboss/agent/FabricConnectivityManager.h b/fboss/agent/FabricConnectivityManager.h index 62a49db3e6e1c..c3f1e86545e94 100644 --- a/fboss/agent/FabricConnectivityManager.h +++ b/fboss/agent/FabricConnectivityManager.h @@ -11,6 +11,8 @@ #include "fboss/agent/state/StateDelta.h" #include "fboss/agent/types.h" +DECLARE_bool(janga_single_npu_for_testing); + namespace facebook::fboss { class HwAsic; class SwitchState; From 28e020642eb84fcf6f38b9dc619f2efe4f8f4974 Mon Sep 17 00:00:00 2001 From: Ron He Date: Tue, 15 Oct 2024 23:09:56 -0700 Subject: [PATCH 143/479] Set single npu janga flag for fabric connectivity setting Summary: Set the flag of janga single NPU, if not running mult switch tests. Reviewed By: simuthus-fb Differential Revision: D64439022 fbshipit-source-id: 2fd00c5febeea15e9b2cdadad3ef9f0d7a86a320 --- fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp index 806727376735e..91227c3fc958a 100644 --- a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp @@ -1,6 +1,7 @@ // (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. #include "fboss/agent/DsfStateUpdaterUtil.h" +#include "fboss/agent/FabricConnectivityManager.h" #include "fboss/agent/FbossHwUpdateError.h" #include "fboss/agent/TxPacket.h" #include "fboss/agent/hw/HwResourceStatsPublisher.h" @@ -495,6 +496,10 @@ class AgentVoqSwitchWithFabricPortsTest : public AgentVoqSwitchTest { // Allow disabling of looped ports. This should // be a noop for VOQ switches FLAGS_disable_looped_fabric_ports = true; + // Fabric connectivity manager to expect single NPU + if (!FLAGS_multi_switch) { + FLAGS_janga_single_npu_for_testing = true; + } } }; @@ -2165,6 +2170,10 @@ class AgentVoqSwitchFullScaleDsfNodesWithFabricPortsTest AgentVoqSwitchFullScaleDsfNodesTest::setCmdLineFlagOverrides(); // Unhide fabric ports FLAGS_hide_fabric_ports = false; + // Fabric connectivity manager to expect single NPU + if (!FLAGS_multi_switch) { + FLAGS_janga_single_npu_for_testing = true; + } } }; From f765a22c8f2f24c41ceff2b28188a08b3a460ed5 Mon Sep 17 00:00:00 2001 From: Ron He Date: Wed, 16 Oct 2024 09:31:08 -0700 Subject: [PATCH 144/479] Fix stats collection tests at wb Summary: After warmboot, expect no port flaps on fabric ports. Hence no increment of loadBearingFlaps Reviewed By: simuthus-fb Differential Revision: D64450685 fbshipit-source-id: d2f59ebdd23775490cbfa3a8c3461efb87bd449e --- fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp index 91227c3fc958a..33fd1533a6bb0 100644 --- a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp @@ -548,7 +548,12 @@ TEST_F(AgentVoqSwitchWithFabricPortsTest, collectStats) { if (port->getPortType() == cfg::PortType::FABRIC_PORT) { EXPECT_EVENTUALLY_TRUE(loadBearingInErrors.has_value()); EXPECT_EVENTUALLY_TRUE(loadBearingFecErrors.has_value()); - EXPECT_EVENTUALLY_TRUE(loadBearingFlaps.has_value()); + if (getAgentEnsemble()->getBootType() == BootType::COLD_BOOT) { + EXPECT_EVENTUALLY_TRUE(loadBearingFlaps.has_value()); + } else { + // No port flap after wb, hence there no stats being recorded + EXPECT_FALSE(loadBearingFlaps.has_value()); + } } else { EXPECT_FALSE(loadBearingInErrors.has_value()); EXPECT_FALSE(loadBearingFecErrors.has_value()); From ff1b354cce6944c487b15e01348d5d590e67f8d8 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Wed, 16 Oct 2024 09:34:19 -0700 Subject: [PATCH 145/479] Updating submodules Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/26e7c9af954ca262a36a3db362b0eabe2373c219 https://github.com/facebook/fb303/commit/75823600ded1798dbfdc35901c0785355fba53fe https://github.com/facebook/fbthrift/commit/b10cea26ae3009ccecda8d28450434962ab28344 https://github.com/facebook/folly/commit/a53e741eb3685b51c68eece133ca3a4c64e1465a https://github.com/facebook/mvfst/commit/599d410b01eb82222059d28a2a47c3303cc698fe https://github.com/facebook/proxygen/commit/c6292b74def047e71338520c2895c8e6119915de https://github.com/facebook/wangle/commit/e07efce5b192f104406d00ac65137bb5e8352a6e https://github.com/facebookexperimental/edencommon/commit/4f6bfdf8ea1aa5bac99b028c9ca3e4641ddc1320 https://github.com/facebookexperimental/rust-shed/commit/6a02e45b742060f0988201904a6626ee37fe2468 https://github.com/facebookincubator/fizz/commit/67bf31f595d1551818ec9002e4c48cb7d9f64318 Reviewed By: bigfootjon fbshipit-source-id: 162fe1fc52555e2121db3f09cac4bf6d0ad99339 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index fbe237ca75216..d899116cf9bcd 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 46fe97bd4e39aa594418c3bcdc4c148d9aed34e8 +Subproject commit 75823600ded1798dbfdc35901c0785355fba53fe diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index e0d5785c0767e..0fb7624a972e0 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 49dcc35b0d02cae84c7a2055a27e70639f4b8185 +Subproject commit b10cea26ae3009ccecda8d28450434962ab28344 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 501d2d2c165da..0865d28c3730e 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 2e079666a2992f4080d52c3e626c47d007575dc3 +Subproject commit a53e741eb3685b51c68eece133ca3a4c64e1465a diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 2cce7572ebb79..344381bf2f389 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 51ad7353af953a1be8dad0a56e307f07f36b58cc +Subproject commit e07efce5b192f104406d00ac65137bb5e8352a6e diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index f7bb5f7af852d..f33def54ef1b1 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 58924b55cc777e898797c5ee039056bc349b62d2 +Subproject commit 67bf31f595d1551818ec9002e4c48cb7d9f64318 From 68c5e2fdd7137763d1eda192535fd72ae41f76bc Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Wed, 16 Oct 2024 10:38:03 -0700 Subject: [PATCH 146/479] Catch and count subscription callback exceptions Summary: For visibility into fsdb subscriber client disconnect reasons, this change catches exceptions thrown by subscription data callback. Count for subscriber disconnects due to this reason is exported to ODS as a TimeSeries {clientStatsPrefix}.disconnectReason.dataCbError Differential Revision: D64203990 fbshipit-source-id: 3c11b1e85789ba731c7855fc9021259479a8e4b6 --- fboss/fsdb/client/FsdbDeltaSubscriber.cpp | 9 ++++++++- fboss/fsdb/client/FsdbPatchSubscriber.cpp | 9 ++++++++- fboss/fsdb/client/FsdbStateSubscriber.cpp | 9 ++++++++- fboss/fsdb/client/FsdbStreamClient.h | 15 +++++++++++++++ fboss/fsdb/if/fsdb_common.thrift | 1 + 5 files changed, 40 insertions(+), 3 deletions(-) diff --git a/fboss/fsdb/client/FsdbDeltaSubscriber.cpp b/fboss/fsdb/client/FsdbDeltaSubscriber.cpp index 455203970a683..76033dabc80a4 100644 --- a/fboss/fsdb/client/FsdbDeltaSubscriber.cpp +++ b/fboss/fsdb/client/FsdbDeltaSubscriber.cpp @@ -56,7 +56,14 @@ FsdbDeltaSubscriberImpl::serveStream(StreamT&& stream) { BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); } SubUnitT tmp(*delta); - this->operSubUnitUpdate_(std::move(tmp)); + try { + this->operSubUnitUpdate_(std::move(tmp)); + } catch (const std::exception& ex) { + FsdbException e; + e.message() = folly::exceptionStr(ex); + e.errorCode() = FsdbErrorCode::SUBSCRIPTION_DATA_CALLBACK_ERROR; + throw e; + } } co_return; } diff --git a/fboss/fsdb/client/FsdbPatchSubscriber.cpp b/fboss/fsdb/client/FsdbPatchSubscriber.cpp index a5d648e5f35c9..f94b121cf6cbe 100644 --- a/fboss/fsdb/client/FsdbPatchSubscriber.cpp +++ b/fboss/fsdb/client/FsdbPatchSubscriber.cpp @@ -58,7 +58,14 @@ FsdbPatchSubscriberImpl::serveStream( this->getSubscriptionState() != SubscriptionState::CONNECTED) { BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); } - this->operSubUnitUpdate_(message->move_chunk()); + try { + this->operSubUnitUpdate_(message->move_chunk()); + } catch (const std::exception& ex) { + FsdbException e; + e.message() = folly::exceptionStr(ex); + e.errorCode() = FsdbErrorCode::SUBSCRIPTION_DATA_CALLBACK_ERROR; + throw e; + } break; case SubscriberMessage::Type::heartbeat: case SubscriberMessage::Type::__EMPTY__: diff --git a/fboss/fsdb/client/FsdbStateSubscriber.cpp b/fboss/fsdb/client/FsdbStateSubscriber.cpp index 88c647fbbc657..c9861c52c58d8 100644 --- a/fboss/fsdb/client/FsdbStateSubscriber.cpp +++ b/fboss/fsdb/client/FsdbStateSubscriber.cpp @@ -63,7 +63,14 @@ FsdbStateSubscriberImpl::serveStream(StreamT&& stream) { BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); } SubUnitT tmp(*state); - this->operSubUnitUpdate_(std::move(tmp)); + try { + this->operSubUnitUpdate_(std::move(tmp)); + } catch (const std::exception& ex) { + FsdbException e; + e.message() = folly::exceptionStr(ex); + e.errorCode() = FsdbErrorCode::SUBSCRIPTION_DATA_CALLBACK_ERROR; + throw e; + } } co_return; } diff --git a/fboss/fsdb/client/FsdbStreamClient.h b/fboss/fsdb/client/FsdbStreamClient.h index 648637350e5d0..9c79765fbb026 100644 --- a/fboss/fsdb/client/FsdbStreamClient.h +++ b/fboss/fsdb/client/FsdbStreamClient.h @@ -126,6 +126,7 @@ class FsdbStreamClient : public ReconnectingThriftClient { void setStateDisconnectedWithReason(fsdb::FsdbErrorCode reason) { setDisconnectReason(reason); setState(State::DISCONNECTED); + updateDisconnectReasonCounter(reason); } std::unique_ptr> client_; @@ -135,10 +136,24 @@ class FsdbStreamClient : public ReconnectingThriftClient { folly::Synchronized disconnectReason_{FsdbErrorCode::NONE}; private: + void updateDisconnectReasonCounter(fsdb::FsdbErrorCode reason) { + switch (reason) { + case fsdb::FsdbErrorCode::SUBSCRIPTION_DATA_CALLBACK_ERROR: + disconnectReasonDataCbError_.add(1); + break; + default: + break; + }; + } + folly::EventBase* streamEvb_; std::atomic serviceLoopRunning_{false}; const bool isStats_; apache::thrift::RpcOptions rpcOptions_; + fb303::TimeseriesWrapper disconnectReasonDataCbError_{ + getCounterPrefix() + ".disconnectReason.dataCbError", + fb303::SUM, + fb303::RATE}; }; } // namespace facebook::fboss::fsdb diff --git a/fboss/fsdb/if/fsdb_common.thrift b/fboss/fsdb/if/fsdb_common.thrift index 8457ab3d2b5c4..2447a72b9b4cb 100644 --- a/fboss/fsdb/if/fsdb_common.thrift +++ b/fboss/fsdb/if/fsdb_common.thrift @@ -45,6 +45,7 @@ enum FsdbErrorCode { PUBLISHER_NOT_READY = 15, PUBLISHER_GR_DISCONNECT = 16, SUBSCRIPTION_NOT_PERMITTED = 17, + SUBSCRIPTION_DATA_CALLBACK_ERROR = 18, } exception FsdbException { From acdaa0bdb981a5a2672877b6a271e9eec53cc59d Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Wed, 16 Oct 2024 10:38:03 -0700 Subject: [PATCH 147/479] FsdbPubSubManager API to get subscriber counter prefix Summary: Add API to get prefix for subscriber counters from FsdbPubSubManager. Return subscriber key string from current PubSubManager APIs when adding subscriptions so that clients can use the key to get counter prefix for specific subscriptions. Differential Revision: D64352527 fbshipit-source-id: 8557c5c12e1e4c18792f617919d3dc335615b1eb --- fboss/fsdb/client/FsdbPubSubManager.cpp | 68 ++++++++++++++----------- fboss/fsdb/client/FsdbPubSubManager.h | 46 ++++++++++------- 2 files changed, 65 insertions(+), 49 deletions(-) diff --git a/fboss/fsdb/client/FsdbPubSubManager.cpp b/fboss/fsdb/client/FsdbPubSubManager.cpp index 992b1038a7e74..48eadae5f4b79 100644 --- a/fboss/fsdb/client/FsdbPubSubManager.cpp +++ b/fboss/fsdb/client/FsdbPubSubManager.cpp @@ -311,12 +311,12 @@ void FsdbPubSubManager::publishStat(Patch&& pubUnit) { publishImpl(statPatchPublisher_.get(), std::move(pubUnit)); } -void FsdbPubSubManager::addStatDeltaSubscription( +std::string FsdbPubSubManager::addStatDeltaSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( subscribePath, stateChangeCb, operDeltaCb, @@ -324,12 +324,12 @@ void FsdbPubSubManager::addStatDeltaSubscription( std::move(serverOptions)); } -void FsdbPubSubManager::addStatPathSubscription( +std::string FsdbPubSubManager::addStatPathSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( subscribePath, stateChangeCb, operStateCb, @@ -337,12 +337,12 @@ void FsdbPubSubManager::addStatPathSubscription( std::move(serverOptions)); } /* multi path subscriptions */ -void FsdbPubSubManager::addStateDeltaSubscription( +std::string FsdbPubSubManager::addStateDeltaSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( PathHelpers::toExtendedOperPath(subscribePaths), stateChangeCb, operDeltaCb, @@ -350,12 +350,12 @@ void FsdbPubSubManager::addStateDeltaSubscription( std::move(serverOptions)); } -void FsdbPubSubManager::addStatPathSubscription( +std::string FsdbPubSubManager::addStatPathSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( PathHelpers::toExtendedOperPath(subscribePaths), stateChangeCb, operStateCb, @@ -363,12 +363,12 @@ void FsdbPubSubManager::addStatPathSubscription( std::move(serverOptions)); } -void FsdbPubSubManager::addStateDeltaSubscription( +std::string FsdbPubSubManager::addStateDeltaSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( subscribePath, stateChangeCb, operDeltaCb, @@ -376,12 +376,12 @@ void FsdbPubSubManager::addStateDeltaSubscription( std::move(serverOptions)); } -void FsdbPubSubManager::addStatePatchSubscription( +std::string FsdbPubSubManager::addStatePatchSubscription( const PatchPath& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbPatchSubscriber::FsdbOperPatchUpdateCb patchCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( subscribePath, stateChangeCb, patchCb, @@ -389,12 +389,12 @@ void FsdbPubSubManager::addStatePatchSubscription( std::move(serverOptions)); } -void FsdbPubSubManager::addStatePathSubscription( +std::string FsdbPubSubManager::addStatePathSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( subscribePath, stateChangeCb, operStateCb, @@ -402,13 +402,13 @@ void FsdbPubSubManager::addStatePathSubscription( std::move(serverOptions)); } -void FsdbPubSubManager::addStatePathSubscription( +std::string FsdbPubSubManager::addStatePathSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions, const std::optional& clientIdSuffix) { - addSubscriptionImpl( + return addSubscriptionImpl( PathHelpers::toExtendedOperPath(subscribePaths), stateChangeCb, operStateCb, @@ -417,13 +417,13 @@ void FsdbPubSubManager::addStatePathSubscription( clientIdSuffix); } -void FsdbPubSubManager::addStatePathSubscription( +std::string FsdbPubSubManager::addStatePathSubscription( SubscriptionOptions&& subscriptionOptions, const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( std::move(subscriptionOptions), subscribePath, stateChangeCb, @@ -431,13 +431,13 @@ void FsdbPubSubManager::addStatePathSubscription( std::move(serverOptions)); } -void FsdbPubSubManager::addStatePathSubscription( +std::string FsdbPubSubManager::addStatePathSubscription( SubscriptionOptions&& subscriptionOptions, const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( std::move(subscriptionOptions), PathHelpers::toExtendedOperPath(subscribePaths), stateChangeCb, @@ -445,12 +445,12 @@ void FsdbPubSubManager::addStatePathSubscription( std::move(serverOptions)); } -void FsdbPubSubManager::addStateExtPathSubscription( +std::string FsdbPubSubManager::addStateExtPathSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( subscribePaths, stateChangeCb, operStateCb, @@ -458,12 +458,12 @@ void FsdbPubSubManager::addStateExtPathSubscription( std::move(serverOptions)); } -void FsdbPubSubManager::addStatExtPathSubscription( +std::string FsdbPubSubManager::addStatExtPathSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( subscribePaths, stateChangeCb, operStateCb, @@ -471,12 +471,12 @@ void FsdbPubSubManager::addStatExtPathSubscription( std::move(serverOptions)); } -void FsdbPubSubManager::addStateExtDeltaSubscription( +std::string FsdbPubSubManager::addStateExtDeltaSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( subscribePaths, stateChangeCb, operDeltaCb, @@ -484,12 +484,12 @@ void FsdbPubSubManager::addStateExtDeltaSubscription( std::move(serverOptions)); } -void FsdbPubSubManager::addStatExtDeltaSubscription( +std::string FsdbPubSubManager::addStatExtDeltaSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + return addSubscriptionImpl( subscribePaths, stateChangeCb, operDeltaCb, @@ -498,7 +498,7 @@ void FsdbPubSubManager::addStatExtDeltaSubscription( } template -void FsdbPubSubManager::addSubscriptionImpl( +std::string FsdbPubSubManager::addSubscriptionImpl( const std::map& subscribePath, SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, @@ -537,10 +537,12 @@ void FsdbPubSubManager::addSubscriptionImpl( } XLOG(DBG2) << "Added subscription for: " << subsStr; itr->second->setServerOptions(std::move(serverOptions)); + + return subsStr; } template -void FsdbPubSubManager::addSubscriptionImpl( +std::string FsdbPubSubManager::addSubscriptionImpl( const std::vector& subscribePath, SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, @@ -579,10 +581,12 @@ void FsdbPubSubManager::addSubscriptionImpl( } XLOG(DBG2) << " Added subscription for: " << subsStr; itr->second->setServerOptions(std::move(serverOptions)); + + return subsStr; } template -void FsdbPubSubManager::addSubscriptionImpl( +std::string FsdbPubSubManager::addSubscriptionImpl( SubscriptionOptions&& subscriptionOptions, const std::vector& subscribePath, SubscriptionStateChangeCb stateChangeCb, @@ -615,6 +619,8 @@ void FsdbPubSubManager::addSubscriptionImpl( } XLOG(DBG2) << " Added subscription for: " << subsStr; itr->second->setServerOptions(std::move(serverOptions)); + + return subsStr; } const std::vector FsdbPubSubManager::getSubscriptionInfo() diff --git a/fboss/fsdb/client/FsdbPubSubManager.h b/fboss/fsdb/client/FsdbPubSubManager.h index e0fd61e12a816..059bdaf1f11d3 100644 --- a/fboss/fsdb/client/FsdbPubSubManager.h +++ b/fboss/fsdb/client/FsdbPubSubManager.h @@ -76,32 +76,32 @@ class FsdbPubSubManager { void publishStat(Patch&& pubUnit); /* Subscriber add APIs */ - void addStatDeltaSubscription( + std::string addStatDeltaSubscription( const Path& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, FsdbStreamClient::ServerOptions&& serverOptions = kDefaultServerOptions()); - void addStatPathSubscription( + std::string addStatPathSubscription( const Path& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operDeltaCb, FsdbStreamClient::ServerOptions&& serverOptions = kDefaultServerOptions()); /* multi path subscription */ - void addStateDeltaSubscription( + std::string addStateDeltaSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, FsdbStreamClient::ServerOptions&& serverOptions = kDefaultServerOptions()); - void addStatDeltaSubscription( + std::string addStatDeltaSubscription( const MultiPath& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, FsdbStreamClient::ServerOptions&& serverOptions = kDefaultServerOptions()); - void addStatPathSubscription( + std::string addStatPathSubscription( const MultiPath& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operDeltaCb, @@ -110,57 +110,57 @@ class FsdbPubSubManager { /* Apis that use ServerOptions */ // TODO: change all above apis to use server options - void addStatePathSubscription( + std::string addStatePathSubscription( const Path& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions = kDefaultServerOptions()); - void addStatePathSubscription( + std::string addStatePathSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions = kDefaultServerOptions(), const std::optional& clientIdSuffix = std::nullopt); - void addStateDeltaSubscription( + std::string addStateDeltaSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, FsdbStreamClient::ServerOptions&& serverOptions = kDefaultServerOptions()); - void addStatePatchSubscription( + std::string addStatePatchSubscription( const PatchPath& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbPatchSubscriber::FsdbOperPatchUpdateCb patchCb, FsdbStreamClient::ServerOptions&& serverOptions); - void addStatePathSubscription( + std::string addStatePathSubscription( SubscriptionOptions&& subscriptionOptions, const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions); - void addStatePathSubscription( + std::string addStatePathSubscription( SubscriptionOptions&& subscriptionOptions, const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions); - void addStateExtPathSubscription( + std::string addStateExtPathSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions); - void addStatExtPathSubscription( + std::string addStatExtPathSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, FsdbStreamClient::ServerOptions&& serverOptions); - void addStateExtDeltaSubscription( + std::string addStateExtDeltaSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, FsdbStreamClient::ServerOptions&& serverOptions); - void addStatExtDeltaSubscription( + std::string addStatExtDeltaSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, @@ -231,6 +231,16 @@ class FsdbPubSubManager { return stats ? statPatchPublisher_.get() : statePatchPublisher_.get(); } + std::string getSubscriberStatsPrefix(bool stats, std::string& key) { + auto& path2Subscriber = + stats ? statPath2Subscriber_ : statePath2Subscriber_; + auto path2SubscriberR = path2Subscriber.rlock(); + if (path2SubscriberR->find(key) != path2SubscriberR->end()) { + return path2SubscriberR->find(key)->second->getCounterPrefix(); + } + return ""; + } + std::string getClientId() const { return clientId_; } @@ -264,7 +274,7 @@ class FsdbPubSubManager { bool subscribeStats); template - void addSubscriptionImpl( + std::string addSubscriptionImpl( const std::vector& subscribePath, SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, @@ -272,7 +282,7 @@ class FsdbPubSubManager { FsdbStreamClient::ServerOptions&& serverOptions, const std::optional& clientIdSuffix = std::nullopt); template - void addSubscriptionImpl( + std::string addSubscriptionImpl( const std::map& subscribePath, SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, @@ -280,7 +290,7 @@ class FsdbPubSubManager { FsdbStreamClient::ServerOptions&& serverOptions, const std::optional& clientIdSuffix = std::nullopt); template - void addSubscriptionImpl( + std::string addSubscriptionImpl( SubscriptionOptions&& subscriptionOptions, const std::vector& subscribePath, SubscriptionStateChangeCb stateChangeCb, From a5160e9b736830975162f58cb3d553cca22d823b Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Wed, 16 Oct 2024 10:38:03 -0700 Subject: [PATCH 148/479] Add test for disconnectReason: subscription data cb exception Summary: Adding test case for checking disconnectReason.dataCbError counter when subscription data callback throws exceptions. Differential Revision: D64438958 fbshipit-source-id: 332be155935d012f8a9ae22f720603e97800b26d --- .../tests/client/FsdbPubSubManagerTest.cpp | 102 ++++++++++++++++-- 1 file changed, 92 insertions(+), 10 deletions(-) diff --git a/fboss/fsdb/tests/client/FsdbPubSubManagerTest.cpp b/fboss/fsdb/tests/client/FsdbPubSubManagerTest.cpp index 1979b2e91388e..241ee2cdec502 100644 --- a/fboss/fsdb/tests/client/FsdbPubSubManagerTest.cpp +++ b/fboss/fsdb/tests/client/FsdbPubSubManagerTest.cpp @@ -255,19 +255,19 @@ class FsdbPubSubManagerTest : public ::testing::Test { return {std::move(path)}; } - void addStatDeltaSubscription( + std::string addStatDeltaSubscription( FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaUpdate, SubscriptionStateChangeCb stChangeCb) { - pubSubManager_->addStatDeltaSubscription( + return pubSubManager_->addStatDeltaSubscription( subscriptionPath(), stChangeCb, operDeltaUpdate, FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); } - void addStateDeltaSubscription( + std::string addStateDeltaSubscription( FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaUpdate, SubscriptionStateChangeCb stChangeCb) { - pubSubManager_->addStateDeltaSubscription( + return pubSubManager_->addStateDeltaSubscription( subscriptionPath(), stChangeCb, operDeltaUpdate, @@ -278,19 +278,19 @@ class FsdbPubSubManagerTest : public ::testing::Test { addStatDeltaSubscription(operDeltaUpdate, subscrStateChangeCb()); addStateDeltaSubscription(operDeltaUpdate, subscrStateChangeCb()); } - void addStatPathSubscription( + std::string addStatPathSubscription( FsdbStateSubscriber::FsdbOperStateUpdateCb operPathUpdate, SubscriptionStateChangeCb stChangeCb) { - pubSubManager_->addStatPathSubscription( + return pubSubManager_->addStatPathSubscription( subscriptionPath(), stChangeCb, operPathUpdate, FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); } - void addStatePathSubscription( + std::string addStatePathSubscription( FsdbStateSubscriber::FsdbOperStateUpdateCb operPathUpdate, SubscriptionStateChangeCb stChangeCb) { - pubSubManager_->addStatePathSubscription( + return pubSubManager_->addStatePathSubscription( subscriptionPath(), stChangeCb, operPathUpdate, @@ -312,12 +312,12 @@ class FsdbPubSubManagerTest : public ::testing::Test { operPathUpdate, std::move(serverOpts)); } - void addStateExtDeltaSubscription( + std::string addStateExtDeltaSubscription( FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, SubscriptionStateChangeCb stChangeCb) { ReconnectingThriftClient::ServerOptions serverOpts{ "::1", fsdbTestServer_->getFsdbPort()}; - pubSubManager_->addStateExtDeltaSubscription( + return pubSubManager_->addStateExtDeltaSubscription( extSubscriptionPaths(), stChangeCb, operDeltaCb, std::move(serverOpts)); } void addSubscriptions( @@ -471,6 +471,88 @@ TYPED_TEST(FsdbPubSubManagerTest, publishMultipleSubscribersPruneSome) { this->assertQueue(states, 4); } +TYPED_TEST(FsdbPubSubManagerTest, subscriberAppError) { + this->createPublishers(); + folly::Synchronized> statDeltas, stateDeltas; + folly::Synchronized> statPaths, statePaths; + std::map, std::string> subKeys; + std::map exceptionThrown; + + exceptionThrown["StatDelta"] = false; + subKeys[std::make_tuple(true, "StatDelta")] = this->addStatDeltaSubscription( + [&exceptionThrown](OperDelta&&) { + if (!exceptionThrown["StatDelta"]) { + exceptionThrown["StatDelta"] = true; + throw std::runtime_error("test app exception"); + } + }, + this->subscrStateChangeCb(statDeltas)); + exceptionThrown["StateDelta"] = false; + subKeys[std::make_tuple(false, "StateDelta")] = + this->addStateDeltaSubscription( + [&exceptionThrown](OperDelta&&) { + if (!exceptionThrown["StateDelta"]) { + exceptionThrown["StateDelta"] = true; + throw std::runtime_error("test app exception"); + } + }, + this->subscrStateChangeCb(stateDeltas)); + exceptionThrown["StatPath"] = false; + subKeys[std::make_tuple(true, "StatPath")] = this->addStatPathSubscription( + [&exceptionThrown](OperState&&) { + if (!exceptionThrown["StatPath"]) { + exceptionThrown["StatPath"] = true; + throw std::runtime_error("test app exception"); + } + }, + this->subscrStateChangeCb(statPaths)); + exceptionThrown["StatePath"] = false; + subKeys[std::make_tuple(false, "StatePath")] = this->addStatePathSubscription( + [&exceptionThrown](OperState&&) { + if (!exceptionThrown["StatePath"]) { + exceptionThrown["StatePath"] = true; + throw std::runtime_error("test app exception"); + } + }, + this->subscrStateChangeCb(statePaths)); + + // check: no dataCbErrors till publish + WITH_RETRIES_N(this->kRetries, { + // In tests, we don't start the publisher threads + fb303::ThreadCachedServiceData::get()->publishStats(); + for (auto [sub, key] : subKeys) { + auto counterPrefix = + this->pubSubManager_->getSubscriberStatsPrefix(std::get<0>(sub), key); + EXPECT_EVENTUALLY_EQ( + fb303::ServiceData::get()->getCounter( + counterPrefix + ".disconnectReason.dataCbError.sum.60"), + 0); + } + }); + + // Publish + this->publish(makePortStats(1)); + this->publish(makeAgentConfig({{"foo", "bar"}})); + + // check: disconnectReason.dataCbError for all subscription types + WITH_RETRIES_N(this->kRetries, { + // In tests, we don't start the publisher threads + fb303::ThreadCachedServiceData::get()->publishStats(); + for (auto [sub, key] : subKeys) { + auto counterPrefix = + this->pubSubManager_->getSubscriberStatsPrefix(std::get<0>(sub), key); + EXPECT_EVENTUALLY_EQ( + fb303::ServiceData::get()->getCounter( + counterPrefix + ".disconnectReason.dataCbError.sum.60"), + 1); + } + }); + + // Reset pubsub manager while local vector objects are in scope, since + // we reference them in state change callbacks + this->pubSubManager_.reset(); +} + template class FsdbPubSubManagerGRTest : public FsdbPubSubManagerTest {}; From 3a79cc4f712342f454dcf8ae49f3327f074f13f7 Mon Sep 17 00:00:00 2001 From: Jimmy Ye Date: Wed, 16 Oct 2024 11:14:50 -0700 Subject: [PATCH 149/479] Move updates of platform name BIOS read counters Summary: This change ensures PM will also have the counters, since PM calls `getPlatformNameFromBios` rather than `getPlatormName`. No changes otherwise. Reviewed By: kimdo8736 Differential Revision: D64415597 fbshipit-source-id: 463d1740380c3194e88c3d8d666a67481602bfff --- fboss/platform/helpers/PlatformNameLib.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fboss/platform/helpers/PlatformNameLib.cpp b/fboss/platform/helpers/PlatformNameLib.cpp index 6b5f301781676..faedb3d548320 100644 --- a/fboss/platform/helpers/PlatformNameLib.cpp +++ b/fboss/platform/helpers/PlatformNameLib.cpp @@ -52,6 +52,7 @@ std::string PlatformNameLib::getPlatformNameFromBios(bool writeToCache) const { platformUtils_->execCommand(dmidecodeCommand); if (exitStatus != 0) { XLOG(ERR) << "Failed to get platform name from bios: " << stdout; + fb303::fbData->setCounter(kPlatformNameBiosReadFailures, 1); throw std::runtime_error("Failed to get platform name from bios"); } standardOut = folly::trimWhitespace(standardOut).str(); @@ -61,6 +62,7 @@ std::string PlatformNameLib::getPlatformNameFromBios(bool writeToCache) const { if (writeToCache) { platformFsUtils_->writeStringToFile(result, kCachePath, true); } + fb303::fbData->setCounter(kPlatformNameBiosReadFailures, 0); return result; } @@ -73,11 +75,8 @@ std::optional PlatformNameLib::getPlatformName() const { return result; } try { - auto nameFromBios = getPlatformNameFromBios(); - fb303::fbData->setCounter(kPlatformNameBiosReadFailures, 0); - return nameFromBios; + return getPlatformNameFromBios(); } catch (const std::exception& e) { - fb303::fbData->setCounter(kPlatformNameBiosReadFailures, 1); return std::nullopt; } } From bb09861b5cd554dd902d9f1ec8e32a34d1c6dd29 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Wed, 16 Oct 2024 11:19:30 -0700 Subject: [PATCH 150/479] Refactor platform config interface in AgentHwTest Summary: Refactor `setupPlatformConfig` to be easier for tests to override. Also passed the `SwitchConfig` since the switch config is needed by some tests. Split from D62979749 Reviewed By: zechengh09 Differential Revision: D63928762 fbshipit-source-id: 893c68b9e024f3e95ef99a80d2f61701f9c10453 --- .../benchmarks/AgentTeFlowStatsExportBenchmark.cpp | 2 +- .../hw/benchmarks/HwTeFlowScaleBenchmarkHelper.cpp | 2 +- .../benchmarks/HwTeFlowStatsCollectionBenchmark.cpp | 2 +- fboss/agent/test/AgentEnsemble.cpp | 3 ++- fboss/agent/test/AgentEnsemble.h | 3 ++- fboss/agent/test/AgentHwTest.cpp | 4 +++- fboss/agent/test/AgentHwTest.h | 13 ++++++++----- 7 files changed, 18 insertions(+), 11 deletions(-) diff --git a/fboss/agent/hw/benchmarks/AgentTeFlowStatsExportBenchmark.cpp b/fboss/agent/hw/benchmarks/AgentTeFlowStatsExportBenchmark.cpp index 01b6fc66550a7..9b753bbf02a37 100644 --- a/fboss/agent/hw/benchmarks/AgentTeFlowStatsExportBenchmark.cpp +++ b/fboss/agent/hw/benchmarks/AgentTeFlowStatsExportBenchmark.cpp @@ -48,7 +48,7 @@ BENCHMARK(AgentTeFlowStatsPublishToFsdb) { }; AgentEnsemblePlatformConfigFn platformConfigFn = - [](cfg::PlatformConfig& config) { + [](const cfg::SwitchConfig&, cfg::PlatformConfig& config) { if (!(config.chip()->getType() == config.chip()->bcm)) { return; } diff --git a/fboss/agent/hw/benchmarks/HwTeFlowScaleBenchmarkHelper.cpp b/fboss/agent/hw/benchmarks/HwTeFlowScaleBenchmarkHelper.cpp index 791029aec57d7..b589c32fe9a85 100644 --- a/fboss/agent/hw/benchmarks/HwTeFlowScaleBenchmarkHelper.cpp +++ b/fboss/agent/hw/benchmarks/HwTeFlowScaleBenchmarkHelper.cpp @@ -48,7 +48,7 @@ void teFlowAddDelEntriesBenchmarkHelper(bool measureAdd) { ensemble.getSw(), {ports[0], ports[1]}); }; AgentEnsemblePlatformConfigFn platformConfigFn = - [](cfg::PlatformConfig& config) { + [](const cfg::SwitchConfig&, cfg::PlatformConfig& config) { if (!(config.chip()->getType() == config.chip()->bcm)) { return; } diff --git a/fboss/agent/hw/benchmarks/HwTeFlowStatsCollectionBenchmark.cpp b/fboss/agent/hw/benchmarks/HwTeFlowStatsCollectionBenchmark.cpp index 47d2b4d0d7ac5..9ba81e5bd1879 100644 --- a/fboss/agent/hw/benchmarks/HwTeFlowStatsCollectionBenchmark.cpp +++ b/fboss/agent/hw/benchmarks/HwTeFlowStatsCollectionBenchmark.cpp @@ -49,7 +49,7 @@ BENCHMARK(HwTeFlowStatsCollection) { }; AgentEnsemblePlatformConfigFn platformConfigFn = - [](cfg::PlatformConfig& config) { + [](const cfg::SwitchConfig&, cfg::PlatformConfig& config) { if (!(config.chip()->getType() == config.chip()->bcm)) { return; } diff --git a/fboss/agent/test/AgentEnsemble.cpp b/fboss/agent/test/AgentEnsemble.cpp index f5f943fcd8e66..8dc3793fe84d0 100644 --- a/fboss/agent/test/AgentEnsemble.cpp +++ b/fboss/agent/test/AgentEnsemble.cpp @@ -58,7 +58,8 @@ void AgentEnsemble::setupEnsemble( auto inputAgentConfig = AgentConfig::fromFile(AgentEnsemble::getInputConfigFile())->thrift; if (platformConfigFn) { - platformConfigFn(*(inputAgentConfig.platform())); + platformConfigFn( + *(inputAgentConfig.sw()), *(inputAgentConfig.platform())); } // some platform config may need cold boots. so overwrite the config before // creating a switch diff --git a/fboss/agent/test/AgentEnsemble.h b/fboss/agent/test/AgentEnsemble.h index a4de220c135fb..7390cc83c87f3 100644 --- a/fboss/agent/test/AgentEnsemble.h +++ b/fboss/agent/test/AgentEnsemble.h @@ -32,7 +32,8 @@ class HwSwitch; using AgentEnsembleSwitchConfigFn = std::function; -using AgentEnsemblePlatformConfigFn = std::function; +using AgentEnsemblePlatformConfigFn = + std::function; class AgentEnsemble : public TestEnsembleIf { public: diff --git a/fboss/agent/test/AgentHwTest.cpp b/fboss/agent/test/AgentHwTest.cpp index 607b1badba0d3..f2ab6b7ab004f 100644 --- a/fboss/agent/test/AgentHwTest.cpp +++ b/fboss/agent/test/AgentHwTest.cpp @@ -51,7 +51,9 @@ void AgentHwTest::SetUp() { agentEnsemble_ = createAgentEnsemble( initialConfigFn, FLAGS_disable_link_toggler /*disableLinkStateToggler*/, - platformConfigFn_, + [this](const cfg::SwitchConfig& sw, cfg::PlatformConfig& cfg) { + applyPlatformConfigOverrides(sw, cfg); + }, (HwSwitch::FeaturesDesired::PACKET_RX_DESIRED | HwSwitch::FeaturesDesired::LINKSCAN_DESIRED | HwSwitch::FeaturesDesired::TAM_EVENT_NOTIFY_DESIRED), diff --git a/fboss/agent/test/AgentHwTest.h b/fboss/agent/test/AgentHwTest.h index 253b77a8e2c8f..f7a0edd58b266 100644 --- a/fboss/agent/test/AgentHwTest.h +++ b/fboss/agent/test/AgentHwTest.h @@ -91,10 +91,6 @@ class AgentHwTest : public ::testing::Test { verifyAcrossWarmBoots([]() {}, verify, []() {}, []() {}); } - void setupPlatformConfig(AgentEnsemblePlatformConfigFn platformConfigFn) { - platformConfigFn_ = std::move(platformConfigFn); - } - void runForever() const; std::shared_ptr applyNewConfig(const cfg::SwitchConfig& config); void applyNewState(StateUpdateFn fn, const std::string& name = "agent-test") { @@ -206,6 +202,14 @@ class AgentHwTest : public ::testing::Test { */ virtual void setCmdLineFlagOverrides() const; + /* + * For tests to override the platform config. A read-only SwitchConfig is + * also provided for the implementation to use. + */ + virtual void applyPlatformConfigOverrides( + const cfg::SwitchConfig&, + cfg::PlatformConfig&) const {} + SwitchID switchIdForPort(PortID port) const; const HwAsic* hwAsicForPort(PortID port) const; const HwAsic* hwAsicForSwitch(SwitchID switchID) const; @@ -236,7 +240,6 @@ class AgentHwTest : public ::testing::Test { return true; } - AgentEnsemblePlatformConfigFn platformConfigFn_ = nullptr; std::unique_ptr agentEnsemble_; }; From dbc6030479bafb63ebb07faae234b228c4a90b43 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Wed, 16 Oct 2024 11:19:30 -0700 Subject: [PATCH 151/479] Move some MMU flags to AgentFeatures Summary: Moved qgroup_guarantee_enable and skip_buffer_reservation to AgentFeatures so that they can be accessed by agent test setup code. Reviewed By: zechengh09 Differential Revision: D63987854 Privacy Context Container: L1125642 fbshipit-source-id: 286da8a6e49e46b2e2afcc52fcd32e311bf1e00d --- fboss/agent/AgentFeatures.cpp | 7 +++++++ fboss/agent/AgentFeatures.h | 2 ++ fboss/agent/hw/bcm/tests/BUCK | 1 + fboss/agent/hw/bcm/tests/BcmSwitchEnsemble.cpp | 1 + fboss/agent/hw/test/HwSwitchEnsemble.cpp | 5 ----- fboss/agent/hw/test/HwSwitchEnsemble.h | 2 -- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/fboss/agent/AgentFeatures.cpp b/fboss/agent/AgentFeatures.cpp index d5b5dc2d63064..7cb29ac3b0917 100644 --- a/fboss/agent/AgentFeatures.cpp +++ b/fboss/agent/AgentFeatures.cpp @@ -140,3 +140,10 @@ DEFINE_int32( 0, "Time to wait for HwSwitch to connect before SwSwitch exits. " "By default, SwSwitch waits forever and hence default value is 0."); + +DEFINE_bool( + qgroup_guarantee_enable, + false, + "Enable setting of unicast and multicast queue guaranteed buffer sizes"); + +DEFINE_bool(skip_buffer_reservation, false, "Enable skip reservation"); diff --git a/fboss/agent/AgentFeatures.h b/fboss/agent/AgentFeatures.h index 78c840e14ec6b..720357079bcf6 100644 --- a/fboss/agent/AgentFeatures.h +++ b/fboss/agent/AgentFeatures.h @@ -60,3 +60,5 @@ DECLARE_bool(dsf_edsw_platform_mapping); DECLARE_bool(exit_for_any_hw_disconnect); DECLARE_bool(enable_balanced_intput_mode); DECLARE_int32(hw_agent_connection_timeout_ms); +DECLARE_bool(qgroup_guarantee_enable); +DECLARE_bool(skip_buffer_reservation); diff --git a/fboss/agent/hw/bcm/tests/BUCK b/fboss/agent/hw/bcm/tests/BUCK index f7cf222aadb17..5c738d5d5b33d 100644 --- a/fboss/agent/hw/bcm/tests/BUCK +++ b/fboss/agent/hw/bcm/tests/BUCK @@ -53,6 +53,7 @@ cpp_library( link_whole = True, exported_deps = [ ":bcm_test_handler", + "//fboss/agent:agent_features", "//fboss/agent:fboss-error", "//fboss/agent:load_agent_config", "//fboss/agent:setup_thrift", diff --git a/fboss/agent/hw/bcm/tests/BcmSwitchEnsemble.cpp b/fboss/agent/hw/bcm/tests/BcmSwitchEnsemble.cpp index b107bbc5104e9..aff3a6f735ee4 100644 --- a/fboss/agent/hw/bcm/tests/BcmSwitchEnsemble.cpp +++ b/fboss/agent/hw/bcm/tests/BcmSwitchEnsemble.cpp @@ -12,6 +12,7 @@ #include #include #include "fboss/agent/AgentConfig.h" +#include "fboss/agent/AgentFeatures.h" #include "fboss/agent/FbossError.h" #include "fboss/agent/Utils.h" #include "fboss/agent/hw/bcm/BcmAPI.h" diff --git a/fboss/agent/hw/test/HwSwitchEnsemble.cpp b/fboss/agent/hw/test/HwSwitchEnsemble.cpp index 35a19b8286369..edfedc1d5fba9 100644 --- a/fboss/agent/hw/test/HwSwitchEnsemble.cpp +++ b/fboss/agent/hw/test/HwSwitchEnsemble.cpp @@ -52,12 +52,7 @@ DEFINE_int32( "Port for thrift server to use (use with --setup_thrift"); DEFINE_bool(mmu_lossless_mode, false, "Enable mmu lossless mode"); -DEFINE_bool( - qgroup_guarantee_enable, - false, - "Enable setting of unicast and multicast queue guaranteed buffer sizes"); DEFINE_bool(enable_exact_match, false, "enable init of exact match table"); -DEFINE_bool(skip_buffer_reservation, false, "Enable skip reservation"); using namespace std::chrono_literals; diff --git a/fboss/agent/hw/test/HwSwitchEnsemble.h b/fboss/agent/hw/test/HwSwitchEnsemble.h index 709c8b0b1dbdd..2643b1fe190e2 100644 --- a/fboss/agent/hw/test/HwSwitchEnsemble.h +++ b/fboss/agent/hw/test/HwSwitchEnsemble.h @@ -32,10 +32,8 @@ #include DECLARE_bool(mmu_lossless_mode); -DECLARE_bool(qgroup_guarantee_enable); DECLARE_bool(enable_exact_match); DECLARE_bool(flowletSwitchingEnable); -DECLARE_bool(skip_buffer_reservation); namespace folly { class FunctionScheduler; From f26b92bea92d654c0f22898154e320fa4a7d9b08 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Wed, 16 Oct 2024 11:19:30 -0700 Subject: [PATCH 152/479] Migrate mmu_loseless_mode flag to AgentTrafficPfcTest Summary: Migrate the behavior of [mmu_lossless_mode](https://www.internalfb.com/code/fbsource/[793e11867967]/fbcode/fboss/agent/hw/test/dataplane_tests/HwTrafficPfcTests.cpp?lines=210) to agent test. Logic is copied from https://www.internalfb.com/code/fbsource/[24b5cfafd888]/fbcode/fboss/agent/hw/bcm/tests/BcmSwitchEnsemble.cpp?lines=91-123 Added some utilities for modifying platform configs. Reviewed By: zechengh09 Differential Revision: D62979749 fbshipit-source-id: 69caf9c174aa2d2fd96b8d9c78ddb6492ae4dc5b --- .../agent_hw_tests/AgentTrafficPfcTests.cpp | 43 ++++++++++++++++++- fboss/agent/test/utils/ConfigUtils.cpp | 31 +++++++++++++ fboss/agent/test/utils/ConfigUtils.h | 9 ++++ 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp b/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp index c5b64882ab696..15de7b7960186 100644 --- a/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp @@ -2,6 +2,7 @@ #include +#include "fboss/agent/AgentFeatures.h" #include "fboss/agent/TxPacket.h" #include "fboss/agent/packet/PktFactory.h" #include "fboss/agent/test/AgentHwTest.h" @@ -174,7 +175,6 @@ class AgentTrafficPfcTest : public AgentHwTest { public: void setCmdLineFlagOverrides() const override { AgentHwTest::setCmdLineFlagOverrides(); - // TODO: do the equivalent of FLAGS_mmu_lossless_mode = true; /* * Makes this flag available so that it can be used in early * stages of init to setup common buffer pool for specific @@ -183,6 +183,47 @@ class AgentTrafficPfcTest : public AgentHwTest { FLAGS_ingress_egress_buffer_pool_size = kGlobalIngressEgressBufferPoolSize; } + void applyPlatformConfigOverrides( + const cfg::SwitchConfig& sw, + cfg::PlatformConfig& config) const override { + // These configs only work for Broadcom SDK. + if (utility::isSaiConfig(sw)) { + return; + } + + // Equivalent to FLAGS_mmu_lossless_mode=true in hw tests. + utility::modifyPlatformConfig( + config, + [](std::string& yamlCfg) { + std::string toReplace("LOSSY"); + std::size_t pos = yamlCfg.find(toReplace); + if (pos != std::string::npos) { + // for TH4 we skip buffer reservation in prod + // but it doesn't seem to work for pfc tests which + // play around with other variables. For unblocking + // skip it for now + if (FLAGS_skip_buffer_reservation) { + yamlCfg.replace( + pos, + toReplace.length(), + "LOSSY_AND_LOSSLESS\n SKIP_BUFFER_RESERVATION: 1"); + } else { + yamlCfg.replace(pos, toReplace.length(), "LOSSY_AND_LOSSLESS"); + } + } + }, + [](std::map& cfg) { + cfg["mmu_lossless"] = "0x2"; + cfg["buf.mqueue.guarantee.0"] = "0C"; + cfg["mmu_config_override"] = "0"; + cfg["buf.prigroup7.guarantee"] = "0C"; + if (FLAGS_qgroup_guarantee_enable) { + cfg["buf.qgroup.guarantee_mc"] = "0"; + cfg["buf.qgroup.guarantee"] = "0"; + } + }); + } + cfg::SwitchConfig initialConfig( const AgentEnsemble& ensemble) const override { auto config = utility::onePortPerInterfaceConfig( diff --git a/fboss/agent/test/utils/ConfigUtils.cpp b/fboss/agent/test/utils/ConfigUtils.cpp index 0e0aa3b37dee7..312293f63a629 100644 --- a/fboss/agent/test/utils/ConfigUtils.cpp +++ b/fboss/agent/test/utils/ConfigUtils.cpp @@ -1365,4 +1365,35 @@ void setupMultipleEgressPoolAndQueueConfigs( } } +bool isSaiConfig(const cfg::SwitchConfig& config) { + return config.sdkVersion().has_value() && + config.sdkVersion()->saiSdk().has_value() && + !config.sdkVersion()->saiSdk()->empty(); +} + +void modifyPlatformConfig( + cfg::PlatformConfig& config, + const std::function& modifyYamlFunc, + const std::function&)>& + modifyMapFunc) { + auto& chip = *config.chip(); + if (chip.getType() == chip.bcm) { + auto& bcm = chip.mutable_bcm(); + if (!bcm.yamlConfig().value_or("").empty()) { + // yamlConfig used for TH4 + modifyYamlFunc(*bcm.yamlConfig()); + } else { + modifyMapFunc(*bcm.config()); + } + } else if (chip.getType() == chip.asicConfig) { + auto& common = *(chip.mutable_asicConfig().common()); + if (common.getType() == common.yamlConfig) { + // yamlConfig used for TH4 + modifyYamlFunc(common.mutable_yamlConfig()); + } else if (common.getType() == common.config) { + modifyMapFunc(common.mutable_config()); + } + } +} + } // namespace facebook::fboss::utility diff --git a/fboss/agent/test/utils/ConfigUtils.h b/fboss/agent/test/utils/ConfigUtils.h index 9b42d43db368c..66016d739eb58 100644 --- a/fboss/agent/test/utils/ConfigUtils.h +++ b/fboss/agent/test/utils/ConfigUtils.h @@ -277,4 +277,13 @@ void configurePortProfile( void setupMultipleEgressPoolAndQueueConfigs( cfg::SwitchConfig& config, const std::vector& losslessQueueIds); + +bool isSaiConfig(const cfg::SwitchConfig& config); + +void modifyPlatformConfig( + cfg::PlatformConfig& config, + const std::function& modifyYamlFunc, + const std::function&)>& + modifyMapFunc); + } // namespace facebook::fboss::utility From fb87597218ae2f1fa83e9da1b2c2e1004ca5c1e9 Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Wed, 16 Oct 2024 11:21:36 -0700 Subject: [PATCH 153/479] Expose counter for disconnects due to chunk timeout Summary: Add counter for FSDB stream client disconnect due to chunk timeout with suffix: disconnectReason.chunkTimeout Differential Revision: D64444138 fbshipit-source-id: 34a9751262e349d6c2ef2fe728d8722695b4ea9a --- fboss/fsdb/client/FsdbStreamClient.cpp | 8 ++++++++ fboss/fsdb/client/FsdbStreamClient.h | 8 ++++++++ fboss/fsdb/if/fsdb_common.thrift | 2 ++ 3 files changed, 18 insertions(+) diff --git a/fboss/fsdb/client/FsdbStreamClient.cpp b/fboss/fsdb/client/FsdbStreamClient.cpp index db76213d90f8f..2f01e7b28ef4c 100644 --- a/fboss/fsdb/client/FsdbStreamClient.cpp +++ b/fboss/fsdb/client/FsdbStreamClient.cpp @@ -124,6 +124,14 @@ folly::coro::Task FsdbStreamClient::serviceLoopWrapper() { << apache::thrift::util::enumNameSafe(ef.get_errorCode()) << ": " << ef.get_message(); setStateDisconnectedWithReason(ef.get_errorCode()); + } catch (const apache::thrift::transport::TTransportException& et) { + FsdbErrorCode disconnectReason = FsdbErrorCode::CLIENT_TRANSPORT_EXCEPTION; + if (et.getType() == + apache::thrift::transport::TTransportException:: + TTransportExceptionType::TIMED_OUT) { + disconnectReason = FsdbErrorCode::CLIENT_CHUNK_TIMEOUT; + } + setStateDisconnectedWithReason(disconnectReason); } catch (const std::exception& ex) { STREAM_XLOG(ERR) << "Unknown error: " << folly::exceptionStr(ex); setStateDisconnectedWithReason(FsdbErrorCode::DISCONNECTED); diff --git a/fboss/fsdb/client/FsdbStreamClient.h b/fboss/fsdb/client/FsdbStreamClient.h index 9c79765fbb026..b397136ebef91 100644 --- a/fboss/fsdb/client/FsdbStreamClient.h +++ b/fboss/fsdb/client/FsdbStreamClient.h @@ -138,6 +138,9 @@ class FsdbStreamClient : public ReconnectingThriftClient { private: void updateDisconnectReasonCounter(fsdb::FsdbErrorCode reason) { switch (reason) { + case fsdb::FsdbErrorCode::CLIENT_CHUNK_TIMEOUT: + disconnectReasonChunkTimeout_.add(1); + break; case fsdb::FsdbErrorCode::SUBSCRIPTION_DATA_CALLBACK_ERROR: disconnectReasonDataCbError_.add(1); break; @@ -150,6 +153,11 @@ class FsdbStreamClient : public ReconnectingThriftClient { std::atomic serviceLoopRunning_{false}; const bool isStats_; apache::thrift::RpcOptions rpcOptions_; + // counters for various disconnect reasons + fb303::TimeseriesWrapper disconnectReasonChunkTimeout_{ + getCounterPrefix() + ".disconnectReason.chunkTimeout", + fb303::SUM, + fb303::RATE}; fb303::TimeseriesWrapper disconnectReasonDataCbError_{ getCounterPrefix() + ".disconnectReason.dataCbError", fb303::SUM, diff --git a/fboss/fsdb/if/fsdb_common.thrift b/fboss/fsdb/if/fsdb_common.thrift index 2447a72b9b4cb..5f4f11599944c 100644 --- a/fboss/fsdb/if/fsdb_common.thrift +++ b/fboss/fsdb/if/fsdb_common.thrift @@ -46,6 +46,8 @@ enum FsdbErrorCode { PUBLISHER_GR_DISCONNECT = 16, SUBSCRIPTION_NOT_PERMITTED = 17, SUBSCRIPTION_DATA_CALLBACK_ERROR = 18, + CLIENT_CHUNK_TIMEOUT = 19, + CLIENT_TRANSPORT_EXCEPTION = 20, } exception FsdbException { From ee510da3b2c2cfb0717df3b303c87599f26a720f Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Wed, 16 Oct 2024 11:54:42 -0700 Subject: [PATCH 154/479] Fix undefined reference to `facebook::fboss::AgentDirectoryUtil::AgentDirectoryUtil()' Summary: Example of recent failure in OSS on-diff builds: https://www.internalfb.com/sandcastle/workflow/743093938520840018/ Reviewed By: harshitgulati18 Differential Revision: D64476497 fbshipit-source-id: 599e0e885ec387ebc26763d435fe31e445c9e72a --- cmake/Agent.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/Agent.cmake b/cmake/Agent.cmake index fc012a5e067f2..71ebed7be88d0 100644 --- a/cmake/Agent.cmake +++ b/cmake/Agent.cmake @@ -118,9 +118,11 @@ add_library(utils ) target_link_libraries(utils + agent_dir_util asic_utils error ctrl_cpp2 + load_agent_config state switchid_scope_resolver Folly::folly From b1c6f0e52519a546822b87452a1ccb4c95df496b Mon Sep 17 00:00:00 2001 From: phshaikh Date: Wed, 16 Oct 2024 12:01:50 -0700 Subject: [PATCH 155/479] fbshipit-source-id: fdffd6ee0181563b919f0ccb7598af8173690f52 --- fboss/BUILD_MODE.bzl | 108 ---- fboss/THIRD-PARTY-VERSIONS.bzl | 69 --- fboss/agent/benchmarks/benchmarks.bzl | 96 --- fboss/agent/fbpkg/agent.bzl | 135 ----- fboss/agent/fbpkg/common.bzl | 15 - fboss/agent/fbpkg/test_artifacts.bzl | 84 --- fboss/agent/hw/bcm/bcm.bzl | 29 - .../hw/bcm/benchmarks/bcm_benchmarks.bzl | 21 - fboss/agent/hw/bcm/wrapped_symbols.bzl | 549 ------------------ .../hw/benchmarks/agent_hw_benchmarks.bzl | 28 - fboss/agent/hw/sai/api/api.bzl | 151 ----- fboss/agent/hw/sai/api/tests/api_test.bzl | 18 - fboss/agent/hw/sai/benchmarks/benchmarks.bzl | 56 -- fboss/agent/hw/sai/diag/diag.bzl | 109 ---- fboss/agent/hw/sai/hw_test/hw_test.bzl | 469 --------------- fboss/agent/hw/sai/impl/impl.bzl | 210 ------- fboss/agent/hw/sai/store/store.bzl | 39 -- fboss/agent/hw/sai/store/tests/store_test.bzl | 19 - fboss/agent/hw/sai/switch/switch.bzl | 192 ------ .../agent/hw/sai/switch/tests/switch_test.bzl | 66 --- fboss/agent/hw/sai/tracer/run/run.bzl | 28 - fboss/agent/hw/sai/tracer/tracer.bzl | 77 --- fboss/agent/platforms/sai/platform.bzl | 303 ---------- fboss/agent/platforms/wedge/utils/utils.bzl | 52 -- fboss/agent/sai.bzl | 20 - .../integration_tests/integration_tests.bzl | 58 -- fboss/agent/test/link_tests/link_tests.bzl | 62 -- fboss/build/fbpkg.bzl | 22 - fboss/build/sdk.bzl | 302 ---------- fboss/build/sdk.thrift.bzl | 58 -- fboss/lib/phy/sai_phy_management.bzl | 34 -- fboss/lib/test/benchmarks/hw_benchmarks.bzl | 30 - fboss/platform/BUILD_MODE.bzl | 24 - .../qsfp_service/platforms/wedge/platform.bzl | 109 ---- fboss/qsfp_service/qsfp_service.bzl | 71 --- .../test/benchmarks/bench_test.bzl | 91 --- fboss/qsfp_service/test/hw_test/hw_test.bzl | 117 ---- 37 files changed, 3921 deletions(-) delete mode 100644 fboss/BUILD_MODE.bzl delete mode 100644 fboss/THIRD-PARTY-VERSIONS.bzl delete mode 100644 fboss/agent/benchmarks/benchmarks.bzl delete mode 100644 fboss/agent/fbpkg/agent.bzl delete mode 100644 fboss/agent/fbpkg/common.bzl delete mode 100644 fboss/agent/fbpkg/test_artifacts.bzl delete mode 100644 fboss/agent/hw/bcm/bcm.bzl delete mode 100644 fboss/agent/hw/bcm/benchmarks/bcm_benchmarks.bzl delete mode 100644 fboss/agent/hw/bcm/wrapped_symbols.bzl delete mode 100644 fboss/agent/hw/benchmarks/agent_hw_benchmarks.bzl delete mode 100644 fboss/agent/hw/sai/api/api.bzl delete mode 100644 fboss/agent/hw/sai/api/tests/api_test.bzl delete mode 100644 fboss/agent/hw/sai/benchmarks/benchmarks.bzl delete mode 100644 fboss/agent/hw/sai/diag/diag.bzl delete mode 100644 fboss/agent/hw/sai/hw_test/hw_test.bzl delete mode 100644 fboss/agent/hw/sai/impl/impl.bzl delete mode 100644 fboss/agent/hw/sai/store/store.bzl delete mode 100644 fboss/agent/hw/sai/store/tests/store_test.bzl delete mode 100644 fboss/agent/hw/sai/switch/switch.bzl delete mode 100644 fboss/agent/hw/sai/switch/tests/switch_test.bzl delete mode 100644 fboss/agent/hw/sai/tracer/run/run.bzl delete mode 100644 fboss/agent/hw/sai/tracer/tracer.bzl delete mode 100644 fboss/agent/platforms/sai/platform.bzl delete mode 100644 fboss/agent/platforms/wedge/utils/utils.bzl delete mode 100644 fboss/agent/sai.bzl delete mode 100644 fboss/agent/test/integration_tests/integration_tests.bzl delete mode 100644 fboss/agent/test/link_tests/link_tests.bzl delete mode 100644 fboss/build/fbpkg.bzl delete mode 100644 fboss/build/sdk.bzl delete mode 100644 fboss/build/sdk.thrift.bzl delete mode 100644 fboss/lib/phy/sai_phy_management.bzl delete mode 100644 fboss/lib/test/benchmarks/hw_benchmarks.bzl delete mode 100644 fboss/platform/BUILD_MODE.bzl delete mode 100644 fboss/qsfp_service/platforms/wedge/platform.bzl delete mode 100644 fboss/qsfp_service/qsfp_service.bzl delete mode 100644 fboss/qsfp_service/test/benchmarks/bench_test.bzl delete mode 100644 fboss/qsfp_service/test/hw_test/hw_test.bzl diff --git a/fboss/BUILD_MODE.bzl b/fboss/BUILD_MODE.bzl deleted file mode 100644 index 7fce6b122c461..0000000000000 --- a/fboss/BUILD_MODE.bzl +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (c) 2004-present, Facebook, Inc. - -load("@fbcode_macros//build_defs:create_build_mode.bzl", "create_build_mode") - -_extra_asan_options = { - "detect_leaks": "1", -} - -_lsan_suppressions = [ - # Suppress leaks in third-party BRCM libraries for now. - # TODO: work with BRCM to fix these leaks in their code. - "bcm_switch_event_register", - "_bcm_attach", - "soc_attach", - "soc_do_init", - "soc_misc_init", - "sal_appl_init", - # field_group_sync gets called during warm boot exit - # Practically this leak is not a big deal since we are - # going to exit the process anyways - "_field_group_sync", - # CSP CS9371557 tracks this leak with Broadcom - "bcm_trunk_member_add", - "bcm_trunk_member_delete", - # CSP CS9690891 tracks this leak with Broadcom - "bcm_mpls_tunnel_initiator_set", - # CS9737327 - "_brcm_sai_switch_flex_counter_init", - # CS10319636 - "syncdbUtilSchemaCreate", - # On exit, bcm sdk code asks rx thread - # to stop and waits 0.5s for thread to - # stop. If it does not, exit continues - # anyways. This then causes memory allocated - # in rx_start to be leaked causing test - # failures - "_bcm_common_rx_start", - # CS00010980235 - "_brcm_sai_add_port_to_default_vlan", - "_brcm_sai_vlan_init", - "_brcm_sai_list_init_end", - "la_acl_delegate", - # CS00011422528 - "sai_driver_shell", - # CS00011825929 - "_bcm_esw_stat_flex_update_ingress_flex_info", - # CS00012268611 - "_bcm_esw_stat_group_mode_id_config_create", - # TODO Remove the below as part of T143911621 - # Disable asan warning till DLB warmboot support implemented - "bcm_th2_l3_egress_dlb_attr_set", - "CRYPTO_zalloc", - # Suppress EDK init memleaks until BRCM fixes the leak - # CSP CS00012369114 - "devicemgr_open", - "devicemgr_alloc_resources", - "sharedheap_open", - "rpc_open", -] - -_tsan_suppressions = [ - # Benign lock-order-inversion warning. Rib is constructed from HwSwitch::init - # while holding the HwSwitch lock. During construction we acquire the rib lock. - # During state updates we hold the RIB lock and acquire HwSwitch lock. TSAN - # now (rightly) complains about lock order inversion. However this inversion - # is benign since the first lock sequence is during init where no state updates - # are allowed - "deadlock:fboss::RoutingInformationBase::fromFollyDynamic", - - # libnss_flare.so is dynamically linked (and isn't built with tsan), - # so it doesn't seem that the in-code suppressions work for it. - # This causes us to have TSAN failures, even when the offending line is - # supposed to have a TSAN suppression: https://fburl.com/code/jye4t32e - "race:libnss_flare.so", -] -_extra_warnings = [ - "-Winconsistent-missing-override", - "-Wsuggest-override", -] - -_extra_cflags = [ - "-fno-stack-protector", -] - -_extra_cxxflags = [ - "-fno-stack-protector", -] - -_mode = create_build_mode( - asan_options = _extra_asan_options, - lsan_suppressions = _lsan_suppressions, - tsan_suppressions = _tsan_suppressions, - gcc_flags = _extra_warnings, - clang_flags = _extra_warnings, - c_flags = _extra_cflags, - cxx_flags = _extra_cxxflags, -) - -_modes = { - "dbg": _mode, - "dbgo": _mode, - "dev": _mode, - "opt": _mode, -} - -def get_modes(): - """ Return modes for this hierarchy """ - return _modes diff --git a/fboss/THIRD-PARTY-VERSIONS.bzl b/fboss/THIRD-PARTY-VERSIONS.bzl deleted file mode 100644 index a0de55001c0c6..0000000000000 --- a/fboss/THIRD-PARTY-VERSIONS.bzl +++ /dev/null @@ -1,69 +0,0 @@ -# -# The fboss project interacts with three third-party libraries -# (broadcom-xgs-robo, bf and opennsl). -# We build against multiple versions of each library, in various combinations. -# See https://fb.quip.com/aaiqAo5OAkia for a complete explanation. -# - -load("//fboss/build:sdk.bzl", "get_buildable_sdks") -load("//fboss/build:sdk.thrift.bzl", "ProductLine") - -# mapping from sdk_name -> extra version to append to versions map -EXTRA_VERSION_DEPS = { - "broadcom-plp-barchetta2": { - "5.2": { - "broadcom-plp-epdm": "4.1.2", - }, - }, - "broadcom-plp-millenio": { - "5.5": { - "broadcom-plp-epdm": "4.1.2", - }, - }, -} - -def to_versions(sdk): - if sdk.name == "fake": - return None - versions = {sdk.sdk_name: sdk.major_version} - versions.update(EXTRA_VERSION_DEPS.get(sdk.sdk_name, {}).get(sdk.major_version, {})) - return versions - -def to_impl_suffix(sdk): - if sdk.name == "fake": - return "-{}".format(sdk.name) - if sdk.name == "native_bcm": - # historically our native bcm targets just have the major_version in the name - return "-{}".format(sdk.major_version) - else: - return "-{}-{}".format( - sdk.name, - sdk.major_version, - ) - -BCM_SDKS = get_buildable_sdks(product_lines = [ProductLine.BCM_NATIVE_SDK]) -SAI_FAKE_IMPLS = get_buildable_sdks(product_lines = [ProductLine.FAKE_SDK]) -SAI_BRCM_HW_IMPLS = get_buildable_sdks(product_lines = [ProductLine.SAI_SDK_BCM]) -SAI_BRCM_SIM_IMPLS = get_buildable_sdks(product_lines = [ProductLine.SAI_SDK_BCM], is_sim = True) -SAI_BRCM_DNX_SIM_IMPLS = get_buildable_sdks(product_lines = [ProductLine.BCM_DSF_SDK], is_sim = True) -SAI_BRCM_DNX_IMPLS = get_buildable_sdks(product_lines = [ProductLine.BCM_DSF_SDK]) -SAI_BRCM_IMPLS = SAI_BRCM_HW_IMPLS + SAI_BRCM_SIM_IMPLS + SAI_BRCM_DNX_IMPLS + SAI_BRCM_DNX_SIM_IMPLS -SAI_LEABA_IMPLS = get_buildable_sdks(product_lines = [ProductLine.LEABA]) - -# NOTE: Before deleting any of these, we must verify that they are not -# referenced in configerator/source/neteng/fboss/fbpkg/qsfp_service.cinc as our -# conveyor attempts to build qsfp_service binaries against each SDK referenced -# in that config -SAI_CREDO_IMPLS = get_buildable_sdks(product_lines = [ProductLine.CREDO_SAI_SDK]) - -SAI_PHY_IMPLS = SAI_CREDO_IMPLS -SAI_VENDOR_IMPLS = SAI_BRCM_IMPLS + SAI_LEABA_IMPLS + SAI_CREDO_IMPLS - -SAI_IMPLS = SAI_VENDOR_IMPLS + SAI_FAKE_IMPLS - -# Certain native SDKs have version dependencies. For example, for version 5.2 -# of the barchetta2 driver, we need to use version 4.1.2+ of the epdm library, -# otherwise we'll have header mismatches. -# NOTE: Similar to the SAI comment above, any version referenced in -# qsfp_service.cinc must be present here -NATIVE_IMPLS = get_buildable_sdks(product_lines = [ProductLine.MILLENIO_SDK, ProductLine.BARCHETTA2_SDK]) diff --git a/fboss/agent/benchmarks/benchmarks.bzl b/fboss/agent/benchmarks/benchmarks.bzl deleted file mode 100644 index ee381218de1e6..0000000000000 --- a/fboss/agent/benchmarks/benchmarks.bzl +++ /dev/null @@ -1,96 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss:THIRD-PARTY-VERSIONS.bzl", "BCM_SDKS", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_npu_impls", "to_impl_lib_name") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name") - -def bcm_agent_benchmark_libs(srcs): - return [ - cpp_library( - name = "bcm_agent_benchmarks_main{}".format(to_impl_suffix(sdk)), - srcs = srcs, - headers = [ - "AgentBenchmarksMain.h", - ], - versions = to_versions(sdk), - exported_deps = [ - ":mono_agent_benchmarks", - "//fboss/agent:main-bcm", - "//fboss/agent/platforms/wedge:platform", - "//folly:benchmark", - "//folly:dynamic", - "//folly/init:init", - "//folly/logging:init", - ], - ) - for sdk in BCM_SDKS - ] - -def sai_agent_mono_benchmark_libs(srcs): - libs = [] - prefix = "mono_sai_agent_benchmarks_main" - benchmarks_dep = ":mono_agent_benchmarks" - for sai_impl in get_all_npu_impls(): - name = sai_switch_dependent_name(prefix, sai_impl, True) - platform = sai_switch_dependent_name("sai_platform", sai_impl, True) - libs += [ - cpp_library( - name = name, - srcs = srcs, - headers = [ - "AgentBenchmarksMain.h", - ], - versions = to_versions(sai_impl), - exported_deps = [ - benchmarks_dep, - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/platforms/sai:{}".format(platform), - "//folly:benchmark", - "//folly:dynamic", - "//folly/init:init", - "//folly/logging:init", - ], - ), - ] - - return libs - -def sai_agent_multi_switch_benchmark_lib(srcs): - name = "multi_switch_sai_agent_benchmarks_main" - benchmarks_dep = ":multi_switch_agent_benchmarks" - return cpp_library( - name = name, - srcs = srcs, - headers = [ - "AgentBenchmarksMain.h", - ], - exported_deps = [ - benchmarks_dep, - "//folly:benchmark", - "//folly:dynamic", - "//folly/init:init", - "//folly/logging:init", - ], - ) - -def agent_benchmark_lib(mono): - name = "mono_agent_benchmarks" if mono else "multi_switch_agent_benchmarks" - ensemble_lib = "//fboss/agent/test:mono_agent_ensemble" if mono else "//fboss/agent/test:multi_switch_agent_ensemble" - return cpp_library( - name = name, - srcs = [ - "AgentBenchmarks.cpp", - ], - headers = [ - "AgentBenchmarks.h", - ], - exported_deps = [ - "fbsource//third-party/googletest:gtest", - ensemble_lib, - ], - ) - -def agent_benchmark_libs(): - return [ - agent_benchmark_lib(True), - agent_benchmark_lib(False), - ] diff --git a/fboss/agent/fbpkg/agent.bzl b/fboss/agent/fbpkg/agent.bzl deleted file mode 100644 index 74bcd0abcdf73..0000000000000 --- a/fboss/agent/fbpkg/agent.bzl +++ /dev/null @@ -1,135 +0,0 @@ -load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native") -load("//fboss:THIRD-PARTY-VERSIONS.bzl", "to_impl_suffix") -load("//fboss/agent/fbpkg:common.bzl", "BRCM_SAI_PLATFORM_FMT", "get_agent_sdk_libraries_target") -load("//fboss/build:sdk.bzl", "get_fbpkg_sdks") -load("//fboss/build:sdk.thrift.bzl", "ProductLine") - -_SAI_BCM_AGENT_ALIAS_PREFIX = "brcm_sai_wedge_agent" -_SAI_BCM_HW_AGENT_ALIAS_PREFIX = "brcm_sai_hw_agent" - -def _get_agent_target(sdk): - if sdk.product_line == ProductLine.BCM_NATIVE_SDK: - return "//fboss/agent/platforms/wedge:wedge_agent_{}".format(sdk.major_version) - elif sdk.product_line in (ProductLine.SAI_SDK_BCM, ProductLine.BCM_DSF_SDK): - return ":{}{}".format(_SAI_BCM_AGENT_ALIAS_PREFIX, to_impl_suffix(sdk)) - elif sdk.product_line in (ProductLine.BCM_DSF_SDK, ProductLine.LEABA): - return "//fboss/agent/platforms/sai:wedge_agent{}".format(to_impl_suffix(sdk)) - else: - fail("Unsupported product line {}".format(sdk.product_line)) - -def _get_hw_agent_target(sdk): - if sdk.product_line in (ProductLine.SAI_SDK_BCM, ProductLine.BCM_DSF_SDK): - return ":{}{}".format(_SAI_BCM_HW_AGENT_ALIAS_PREFIX, to_impl_suffix(sdk)) - elif sdk.product_line == ProductLine.LEABA: - return "//fboss/agent/platforms/sai:fboss_hw_agent{}".format(to_impl_suffix(sdk)) - else: - fail("Unsupported product line {}".format(sdk.product_line)) - -def _get_wedge_agent_path_actions(sdks, include_split_bins = True): - actions = {} - - for sdk in sdks: - base_dir = "sdk-{}".format(sdk.major_version) - actions[base_dir] = {} - actions[base_dir]["wedge_agent"] = _get_agent_target(sdk) - actions[base_dir]["lib"] = get_agent_sdk_libraries_target(sdk) - if include_split_bins: - actions[base_dir]["fboss_hw_agent"] = _get_hw_agent_target(sdk) - return actions - -def get_scripts_path_actions(): - return { - "agent_executor_runner": "//fboss/agent/facebook:agent_executor_runner", - "agent_pre_start_exec_runner": "//fboss/agent:agent_pre_start_exec_runner", - "fboss_sw_agent": "//fboss/agent:fboss_sw_agent", - "pre_wedge_agent_shut_runner.par": "//neteng/fboss/tools/wrapper_scripts:pre_wedge_agent_shut_runner", - "wedge_agent.service": "//neteng/fboss/scripts:wedge_agent.service", - "wedge_agent.sh": "//neteng/fboss/scripts:wedge_agent.sh", - "wedge_agent_wrapper.par": "//neteng/fboss/tools/wrapper_scripts:wedge_agent_wrapper", - } - -def _gen_brcm_sai_constraint_aliases(sdks): - for sdk in sdks: - fb_native.configured_alias( - name = "{}{}".format(_SAI_BCM_AGENT_ALIAS_PREFIX, to_impl_suffix(sdk)), - actual = "//fboss/agent/platforms/sai:wedge_agent{}".format(to_impl_suffix(sdk)), - platform = BRCM_SAI_PLATFORM_FMT.format(brcm_sai_version = sdk.major_version, native_sdk_version = sdk.native_bcm_sdk_version), - visibility = ["//fboss/agent/fbpkg/...", "//netos/..."], - ) - fb_native.configured_alias( - name = "{}{}".format(_SAI_BCM_HW_AGENT_ALIAS_PREFIX, to_impl_suffix(sdk)), - actual = "//fboss/agent/platforms/sai:fboss_hw_agent{}".format(to_impl_suffix(sdk)), - platform = BRCM_SAI_PLATFORM_FMT.format(brcm_sai_version = sdk.major_version, native_sdk_version = sdk.native_bcm_sdk_version), - visibility = ["//fboss/agent/fbpkg/...", "//netos/..."], - ) - -def _gen_dnx_sai_constraint_aliases(sdks): - for sdk in sdks: - fb_native.configured_alias( - name = "{}{}".format(_SAI_BCM_AGENT_ALIAS_PREFIX, to_impl_suffix(sdk)), - actual = "//fboss/agent/platforms/sai:wedge_agent{}".format(to_impl_suffix(sdk)), - platform = BRCM_SAI_PLATFORM_FMT.format(brcm_sai_version = sdk.major_version, native_sdk_version = sdk.native_bcm_sdk_version), - visibility = ["//fboss/agent/fbpkg/...", "//netos/..."], - ) - fb_native.configured_alias( - name = "{}{}".format(_SAI_BCM_HW_AGENT_ALIAS_PREFIX, to_impl_suffix(sdk)), - actual = "//fboss/agent/platforms/sai:fboss_hw_agent{}".format(to_impl_suffix(sdk)), - platform = BRCM_SAI_PLATFORM_FMT.format(brcm_sai_version = sdk.major_version, native_sdk_version = sdk.native_bcm_sdk_version), - visibility = ["//fboss/agent/fbpkg/...", "//netos/..."], - ) - -def get_all_wedge_agent_brcm_native_path_actions(): - bcm_sdks = get_fbpkg_sdks([ProductLine.BCM_NATIVE_SDK]) - path_actions = {} - path_actions.update(_get_wedge_agent_path_actions(bcm_sdks, include_split_bins = False)) - return path_actions - -def get_all_wedge_agent_brcm_sai_path_actions(flatten_path_actions = True): - sai_sdks = get_fbpkg_sdks([ProductLine.SAI_SDK_BCM]) - _gen_brcm_sai_constraint_aliases(sai_sdks) - - path_actions = _get_wedge_agent_path_actions(sai_sdks) - if flatten_path_actions: - path_actions = _flatten_path_actions(path_actions) - return path_actions - -def _flatten_path_actions(current_actions): - path_actions = {} - for target, target_info in current_actions.items(): - for target_name, target_value in target_info.items(): - path_actions["{}/{}".format(target, target_name)] = target_value - return path_actions - -def get_all_wedge_agent_path_actions(include_scripts = True, flatten_path_actions = True): - sai_path_actions = get_all_wedge_agent_brcm_sai_path_actions(flatten_path_actions = False) - native_path_actions = get_all_wedge_agent_brcm_native_path_actions() - native_path_actions.update(sai_path_actions) - path_actions = native_path_actions - if flatten_path_actions: - path_actions = _flatten_path_actions(native_path_actions) - if include_scripts: - path_actions.update(get_scripts_path_actions()) - return path_actions - -def get_all_wedge_agent_csco_path_actions(flatten_path_actions = True, include_scripts = True): - csco_sdks = get_fbpkg_sdks([ProductLine.LEABA]) - - path_actions = {} - path_actions.update(_get_wedge_agent_path_actions(csco_sdks)) - if flatten_path_actions: - path_actions = _flatten_path_actions(path_actions) - if include_scripts: - path_actions.update(get_scripts_path_actions()) - return path_actions - -def get_all_wedge_agent_dnx_path_actions(flatten_path_actions = True, include_scripts = True): - dnx_sdks = get_fbpkg_sdks([ProductLine.BCM_DSF_SDK]) - _gen_dnx_sai_constraint_aliases(dnx_sdks) - - path_actions = {} - path_actions.update(_get_wedge_agent_path_actions(dnx_sdks)) - if flatten_path_actions: - path_actions = _flatten_path_actions(path_actions) - if include_scripts: - path_actions.update(get_scripts_path_actions()) - return path_actions diff --git a/fboss/agent/fbpkg/common.bzl b/fboss/agent/fbpkg/common.bzl deleted file mode 100644 index 52017f441a9ba..0000000000000 --- a/fboss/agent/fbpkg/common.bzl +++ /dev/null @@ -1,15 +0,0 @@ -load("//fboss/build:sdk.thrift.bzl", "ProductLine") - -BRCM_SAI_PLATFORM_FMT = "ovr_config//platform/linux:x86_64-fbcode-platform010-compat-clang15-FBOSS-projects-brcm-sai-{brcm_sai_version}-brcm-sai-{brcm_sai_version}-broadcom-xgs-robo-{native_sdk_version}" - -def get_agent_sdk_libraries_target(sdk): - if sdk.product_line == ProductLine.BCM_NATIVE_SDK: - return "//third-party-buck/platform010-compat/build/broadcom-xgs-robo/{}:libraries".format(sdk.major_version) - elif sdk.product_line == ProductLine.BCM_DSF_SDK: - return "//third-party-buck/platform010-compat/build/broadcom-xgs-robo/{}:libraries".format(sdk.native_bcm_sdk_version) - elif sdk.product_line == ProductLine.SAI_SDK_BCM: - return "//third-party-buck/platform010-compat/build/brcm-sai/{}:libraries".format(sdk.major_version) - elif sdk.product_line == ProductLine.LEABA: - return "//third-party-buck/platform010-compat/build/leaba-sdk/{}:libraries".format(sdk.major_version) - else: - fail("Unsupported product line {}".format(sdk.product_line)) diff --git a/fboss/agent/fbpkg/test_artifacts.bzl b/fboss/agent/fbpkg/test_artifacts.bzl deleted file mode 100644 index 28e4c5c054353..0000000000000 --- a/fboss/agent/fbpkg/test_artifacts.bzl +++ /dev/null @@ -1,84 +0,0 @@ -load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native") -load("//fboss:THIRD-PARTY-VERSIONS.bzl", "to_impl_suffix") -load("//fboss/agent/fbpkg:common.bzl", "BRCM_SAI_PLATFORM_FMT", "get_agent_sdk_libraries_target") -load("//fboss/build:sdk.bzl", "get_fbpkg_sdks") -load("//fboss/build:sdk.thrift.bzl", "ProductLine") - -# Add a target to path actions in the base_dir with the name of the target -# i.e. //fboss/agent/hw/sai/hw_test:sai_test-8.2.0.0_odp will result in -# path_actions[/sai_test-8.2.0.0_odp] = //fboss/agent/hw/sai/hw_test:sai_test-8.2.0.0_odp -def _add_named_target(path_actions, base_dir, target): - [_, name] = target.split(":") - path_actions["{}/{}".format(base_dir, name)] = target - -# Due to some version universe issues, brcm-sai targets need to be configured with a hardcoded platform -def _brcm_sai_configured_target(target_fmt, sdk): - [_, test_name_fmt] = target_fmt.split(":") - configured_test_name = test_name_fmt.format(to_impl_suffix(sdk)) - fb_native.configured_alias( - name = configured_test_name, - actual = target_fmt.format(to_impl_suffix(sdk)), - platform = BRCM_SAI_PLATFORM_FMT.format(brcm_sai_version = sdk.major_version, native_sdk_version = sdk.native_bcm_sdk_version), - visibility = ["//fboss/agent/fbpkg/..."], - ) - return ":{}".format(configured_test_name) - -# Output path_actions map in the form -# { -# "sdk-": { -# "lib": "", -# "target_name": "target_fmt-", -# } -# } -def _produce_standard_test_artifacts_pkg(sdks, bcm_target_fmt, sai_target_fmt): - path_actions = {} - for sdk in sdks: - base_dir = "sdk{}".format(to_impl_suffix(sdk)) - if sdk.product_line == ProductLine.BCM_NATIVE_SDK: - # some tests don't have the bcm target but still need the libraries - if bcm_target_fmt: - target = bcm_target_fmt.format(to_impl_suffix(sdk)) - _add_named_target(path_actions, base_dir, target) - path_actions["{}/lib".format(base_dir)] = get_agent_sdk_libraries_target(sdk) - elif sdk.product_line == ProductLine.SAI_SDK_BCM: - target = _brcm_sai_configured_target(sai_target_fmt, sdk) - _add_named_target(path_actions, base_dir, target) - path_actions["{}/lib".format(base_dir)] = get_agent_sdk_libraries_target(sdk) - elif sdk.product_line == ProductLine.LEABA: - target = sai_target_fmt.format(to_impl_suffix(sdk)) - _add_named_target(path_actions, base_dir, target) - else: - fail("Unsupported sdk for tests in test_artifacts: {}".format(sdk.product_line)) - return path_actions - -def get_all_hw_test_path_actions(): - all_sdks = get_fbpkg_sdks([ProductLine.BCM_NATIVE_SDK, ProductLine.SAI_SDK_BCM, ProductLine.LEABA]) - bcm_target_fmt = "//fboss/agent/hw/bcm/tests:bcm_test{}" - sai_target_fmt = "//fboss/agent/hw/sai/hw_test:sai_test{}" - return _produce_standard_test_artifacts_pkg(all_sdks, bcm_target_fmt, sai_target_fmt) - -def get_all_agent_test_path_actions(): - all_sdks = get_fbpkg_sdks([ProductLine.BCM_NATIVE_SDK, ProductLine.SAI_SDK_BCM, ProductLine.LEABA]) - bcm_target_fmt = "//fboss/agent/test/agent_hw_tests:bcm_agent_hw_test{}" - sai_target_fmt = "//fboss/agent/test/agent_hw_tests:sai_agent_hw_test{}" - return _produce_standard_test_artifacts_pkg(all_sdks, bcm_target_fmt, sai_target_fmt) - -def get_all_link_test_path_actions(): - all_sdks = get_fbpkg_sdks([ProductLine.BCM_NATIVE_SDK, ProductLine.SAI_SDK_BCM, ProductLine.LEABA]) - bcm_target_fmt = "//fboss/agent/test/link_tests:bcm_link_test{}" - sai_target_fmt = "//fboss/agent/test/link_tests:sai_link_test{}" - return _produce_standard_test_artifacts_pkg(all_sdks, bcm_target_fmt, sai_target_fmt) - -def get_all_fsdb_integration_test_path_actions(): - all_sdks = get_fbpkg_sdks([ProductLine.BCM_NATIVE_SDK, ProductLine.SAI_SDK_BCM, ProductLine.LEABA]) - bcm_target_fmt = "//fboss/agent/test/fsdb_integration_tests/facebook:bcm_fsdb_test{}" - sai_target_fmt = "//fboss/agent/test/fsdb_integration_tests/facebook:sai_fsdb_integration_test{}" - return _produce_standard_test_artifacts_pkg(all_sdks, bcm_target_fmt, sai_target_fmt) - -def get_all_invariant_test_path_actions(): - all_sdks = get_fbpkg_sdks([ProductLine.BCM_NATIVE_SDK, ProductLine.SAI_SDK_BCM, ProductLine.LEABA]) - - # We don't include invariant test for bcm native - bcm_target_fmt = None - sai_target_fmt = "//fboss/agent/test/prod_invariant_tests:sai_invariant_agent_test{}" - return _produce_standard_test_artifacts_pkg(all_sdks, bcm_target_fmt, sai_target_fmt) diff --git a/fboss/agent/hw/bcm/bcm.bzl b/fboss/agent/hw/bcm/bcm.bzl deleted file mode 100644 index aefd13120cd01..0000000000000 --- a/fboss/agent/hw/bcm/bcm.bzl +++ /dev/null @@ -1,29 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/bcm:wrapped_symbols.bzl", "wrapped_bcm_sdk_symbols", "wrapped_bcm_symbols", "wrapped_soc_symbols_tmp") - -def sdk_tracer_lib(link_whole): - link_whole_suffix = "_link_whole" if link_whole else "" - - return cpp_library( - name = "sdk_tracer{}".format(link_whole_suffix), - srcs = [ - "SdkTracer.cpp", - ], - compiler_flags = [ - "-DSOC_PCI_DEBUG", - ], - link_whole = link_whole, - linker_flags = ( - wrapped_bcm_sdk_symbols + wrapped_bcm_symbols + wrapped_soc_symbols_tmp - ), - exported_deps = [ - ":sdk_wrap_settings", - "//fboss/agent/hw/bcm:bcm_cinter", - "//fboss/lib:function_call_time_reporter", - "//folly/io/async:async_base", - ], - exported_external_deps = [ - "glog", - "gflags", - ], - ) diff --git a/fboss/agent/hw/bcm/benchmarks/bcm_benchmarks.bzl b/fboss/agent/hw/bcm/benchmarks/bcm_benchmarks.bzl deleted file mode 100644 index 49ab6b6eda4f4..0000000000000 --- a/fboss/agent/hw/bcm/benchmarks/bcm_benchmarks.bzl +++ /dev/null @@ -1,21 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("//fboss:THIRD-PARTY-VERSIONS.bzl", "BCM_SDKS", "to_impl_suffix", "to_versions") - -def bcm_agent_benchmark(name, srcs, extra_deps): - return [ - cpp_binary( - name = "{}{}".format(name, to_impl_suffix(sdk)), - srcs = srcs, - versions = to_versions(sdk), - deps = [ - "//fboss/agent/benchmarks:bcm_agent_benchmarks_main{}".format(to_impl_suffix(sdk)), - "//fboss/agent/hw/bcm/tests:bcm_linkstate_toggler", - "//fboss/agent/hw/bcm/tests:agent_hw_test_thrift_handler", - "//fboss/agent/hw/bcm/tests:bcm_ecmp_utils", - ] + extra_deps, - external_deps = [ - ("broadcom-xgs-robo", None, "xgs_robo"), - ], - ) - for sdk in BCM_SDKS - ] diff --git a/fboss/agent/hw/bcm/wrapped_symbols.bzl b/fboss/agent/hw/bcm/wrapped_symbols.bzl deleted file mode 100644 index 8d5adf9889ee8..0000000000000 --- a/fboss/agent/hw/bcm/wrapped_symbols.bzl +++ /dev/null @@ -1,549 +0,0 @@ -# -# Linker flags to wrap BCM symbols -# -wrapped_bcm_sdk_symbols = [ - # - # BCM - # - "--wrap=bcm_field_entry_prio_set", - "--wrap=bcm_field_entry_enable_set", - "--wrap=bcm_switch_object_count_multi_get", - "--wrap=bcm_switch_object_count_get", - "--wrap=bcm_field_group_create_id", - "--wrap=bcm_field_group_config_create", - "--wrap=bcm_field_group_destroy", - "--wrap=bcm_rx_cosq_mapping_set", - "--wrap=bcm_rx_cosq_mapping_get", - "--wrap=bcm_rx_cosq_mapping_delete", - "--wrap=bcm_rx_cosq_mapping_extended_add", - "--wrap=bcm_rx_cosq_mapping_extended_delete", - "--wrap=bcm_rx_cosq_mapping_extended_set", - "--wrap=bcm_cosq_init", - "--wrap=bcm_rx_queue_max_get", - "--wrap=bcm_field_action_add", - "--wrap=bcm_field_action_remove", - "--wrap=bcm_field_action_delete", - "--wrap=bcm_field_init", - "--wrap=bcm_field_entry_destroy", - "--wrap=bcm_field_entry_install", - "--wrap=bcm_field_qualify_DstIp", - "--wrap=bcm_field_qualify_IpProtocol", - "--wrap=bcm_field_entry_multi_get", - "--wrap=bcm_field_range_create", - "--wrap=bcm_cosq_bst_stat_sync", - "--wrap=bcm_rx_cosq_mapping_size_get", - "--wrap=bcm_l3_egress_ecmp_delete", - "--wrap=bcm_l3_egress_ecmp_t_init", - "--wrap=bcm_field_range_get", - "--wrap=bcm_field_entry_create_id", - "--wrap=bcm_field_qualify_L4SrcPort", - "--wrap=bcm_port_autoneg_set", - "--wrap=bcm_field_range_destroy", - "--wrap=bcm_l3_alpm_resource_get", - "--wrap=bcm_l3_egress_get", - "--wrap=bcm_l3_egress_create", - "--wrap=bcm_l3_egress_find", - "--wrap=bcm_l3_egress_traverse", - "--wrap=bcm_l3_egress_ecmp_add", - "--wrap=bcm_field_entry_create", - "--wrap=bcm_field_qualify_TcpControl", - "--wrap=bcm_field_qualify_IpFrag", - "--wrap=bcm_rx_active", - "--wrap=bcm_l3_egress_ecmp_get", - "--wrap=bcm_l3_enable_set", - "--wrap=bcm_field_qualify_DstIp6", - "--wrap=bcm_field_group_enable_get", - "--wrap=bcm_cosq_gport_traverse", - "--wrap=bcm_cosq_control_get", - "--wrap=bcm_cosq_control_set", - "--wrap=bcm_cosq_port_profile_set", - "--wrap=bcm_cosq_port_profile_get", - "--wrap=bcm_cosq_gport_bandwidth_set", - "--wrap=bcm_cosq_gport_bandwidth_get", - "--wrap=bcm_cosq_gport_discard_t_init", - "--wrap=bcm_cosq_gport_discard_get", - "--wrap=bcm_cosq_gport_discard_set", - "--wrap=bcm_cosq_gport_mapping_set", - "--wrap=bcm_cosq_gport_mapping_get", - "--wrap=bcm_cosq_gport_sched_get", - "--wrap=bcm_cosq_gport_sched_set", - "--wrap=bcm_cosq_bst_stat_get", - "--wrap=bcm_cosq_bst_stat_extended_get", - "--wrap=bcm_cosq_control_get", - "--wrap=bcm_field_qualify_L4DstPort", - "--wrap=bcm_cosq_bst_stat_clear", - "--wrap=bcm_port_pause_sym_set", - "--wrap=bcm_port_phy_control_get", - "--wrap=bcm_port_phy_tx_set", - "--wrap=bcm_port_phy_tx_get", - "--wrap=bcm_qos_map_create", - "--wrap=bcm_qos_map_destroy", - "--wrap=bcm_qos_map_add", - "--wrap=bcm_qos_map_delete", - "--wrap=bcm_qos_map_multi_get", - "--wrap=bcm_qos_multi_get", - "--wrap=bcm_qos_port_map_set", - "--wrap=bcm_qos_port_map_get", - "--wrap=bcm_qos_port_map_type_get", - "--wrap=bcm_port_dscp_map_mode_get", - "--wrap=bcm_port_dscp_map_mode_set", - "--wrap=bcm_field_group_get", - "--wrap=bcm_field_qset_id_multi_get", - "--wrap=bcm_field_group_status_get", - "--wrap=bcm_field_stat_create", - "--wrap=bcm_field_entry_stat_attach", - "--wrap=bcm_field_entry_stat_detach", - "--wrap=bcm_field_entry_stat_get", - "--wrap=bcm_field_stat_destroy", - "--wrap=bcm_field_stat_get", - "--wrap=bcm_field_stat_size", - "--wrap=bcm_field_stat_config_get", - "--wrap=bcm_field_entry_reinstall", - "--wrap=bcm_field_qualify_RangeCheck_get", - "--wrap=bcm_field_entry_prio_get", - "--wrap=bcm_field_group_traverse", - "--wrap=bcm_port_phy_control_set", - "--wrap=bcm_field_qualify_SrcPort", - "--wrap=bcm_field_qualify_InPorts", - "--wrap=bcm_field_qualify_SrcIp6_get", - "--wrap=bcm_field_qualify_DstIp6_get", - "--wrap=bcm_field_qualify_L4SrcPort_get", - "--wrap=bcm_field_qualify_L4DstPort_get", - "--wrap=bcm_field_qualify_TcpControl_get", - "--wrap=bcm_field_qualify_SrcPort_get", - "--wrap=bcm_field_qualify_DstPort_get", - "--wrap=bcm_field_qualify_IpFrag_get", - "--wrap=bcm_field_qualify_DSCP_get", - "--wrap=bcm_field_qualify_IpType_get", - "--wrap=bcm_field_qualify_EtherType_get", - "--wrap=bcm_field_qualify_IpProtocol_get", - "--wrap=bcm_field_qualify_Ttl_get", - "--wrap=bcm_field_entry_enable_get", - "--wrap=bcm_field_qualify_DstMac_get", - "--wrap=bcm_field_qualify_SrcMac_get", - "--wrap=bcm_field_qualify_Ttl", - "--wrap=bcm_field_qualify_IpType", - "--wrap=bcm_field_qualify_EtherType", - "--wrap=bcm_field_qualify_DSCP", - "--wrap=bcm_port_ability_advert_set", - "--wrap=bcm_switch_control_set", - "--wrap=bcm_switch_control_get", - "--wrap=bcm_cosq_bst_profile_get", - "--wrap=bcm_l2_traverse", - "--wrap=bcm_field_action_get", - "--wrap=bcm_field_qualify_RangeCheck", - "--wrap=bcm_field_qualify_IcmpTypeCode", - "--wrap=bcm_port_subsidiary_ports_get", - "--wrap=bcm_field_qualify_SrcIp6", - "--wrap=bcm_l3_info", - "--wrap=bcm_switch_pkt_trace_info_get", - "--wrap=bcm_field_qualify_DstPort", - "--wrap=bcm_field_qualify_DstMac", - "--wrap=bcm_field_qualify_SrcMac", - "--wrap=bcm_field_qualify_DstClassL2_get", - "--wrap=bcm_field_qualify_DstClassL2", - "--wrap=bcm_field_qualify_DstClassL3_get", - "--wrap=bcm_field_qualify_DstClassL3", - "--wrap=bcm_field_qualify_PacketRes", - "--wrap=bcm_field_qualify_PacketRes_get", - "--wrap=bcm_field_qualify_OuterVlanId", - "--wrap=bcm_field_qualify_OuterVlanId_get", - "--wrap=bcm_cosq_bst_profile_set", - "--wrap=bcm_port_pause_set", - "--wrap=bcm_port_pause_get", - "--wrap=bcm_port_sample_rate_set", - "--wrap=bcm_port_sample_rate_get", - "--wrap=bcm_port_control_set", - "--wrap=bcm_port_control_get", - "--wrap=bcm_info_get", - "--wrap=bcm_linkscan_update", - "--wrap=bcm_trunk_bitmap_expand", - "--wrap=bcm_port_loopback_get", - "--wrap=bcm_port_loopback_set", - "--wrap=bcm_stat_custom_add", - "--wrap=bcm_mirror_init", - "--wrap=bcm_mirror_mode_set", - "--wrap=bcm_mirror_destination_create", - "--wrap=bcm_mirror_destination_get", - "--wrap=bcm_mirror_destination_destroy", - "--wrap=bcm_mirror_port_dest_add", - "--wrap=bcm_mirror_port_dest_delete", - "--wrap=bcm_mirror_port_dest_delete_all", - "--wrap=bcm_mirror_port_dest_get", - "--wrap=bcm_mirror_destination_traverse", - "--wrap=bcm_mpls_init", - "--wrap=bcm_mpls_tunnel_switch_add", - "--wrap=bcm_mpls_tunnel_switch_delete", - "--wrap=bcm_mpls_tunnel_switch_get", - "--wrap=bcm_mpls_tunnel_switch_traverse", - "--wrap=bcm_mpls_tunnel_initiator_set", - "--wrap=bcm_mpls_tunnel_initiator_clear", - "--wrap=bcm_mpls_tunnel_initiator_get", - "--wrap=bcm_port_resource_speed_get", - "--wrap=bcm_port_resource_speed_set", - "--wrap=bcm_port_resource_multi_set", - "--wrap=sh_process_command", - "--wrap=bcm_l2_addr_delete_by_port", - "--wrap=bcm_cosq_priority_group_mapping_profile_get", - "--wrap=bcm_cosq_priority_group_mapping_profile_set", - "--wrap=bcm_cosq_priority_group_pfc_priority_mapping_profile_get", - "--wrap=bcm_cosq_priority_group_pfc_priority_mapping_profile_set", - "--wrap=bcm_cosq_pfc_class_config_profile_set", - "--wrap=bcm_cosq_pfc_class_config_profile_get", - "--wrap=bcm_port_priority_group_config_set", - "--wrap=bcm_port_priority_group_config_get", - "--wrap=bcm_cosq_port_priority_group_property_set", - "--wrap=bcm_cosq_port_priority_group_property_get", - "--wrap=bcm_port_stat_attach", - "--wrap=bcm_port_stat_detach_with_id", - # Since QCM is not supported after 6.5.16, we only wrap these collector API - # but not log them in Bcm Cinter - "--wrap=bcm_collector_create", - "--wrap=bcm_collector_destroy", - "--wrap=bcm_collector_export_profile_create", - "--wrap=bcm_collector_export_profile_destroy", - "--wrap=bcm_collector_export_profile_t_init", - "--wrap=bcm_collector_info_t_init", - "--wrap=bcm_port_phy_timesync_config_set", - "--wrap=bcm_port_phy_timesync_config_t_init", - "--wrap=bcm_port_timesync_config_set", - "--wrap=bcm_port_timesync_config_t_init", - "--wrap=bcm_time_interface_add", - "--wrap=bcm_time_interface_delete_all", - "--wrap=bcm_time_interface_t_init", - "--wrap=bcm_field_entry_flexctr_attach", - "--wrap=bcm_field_entry_flexctr_detach", - "--wrap=bcm_field_entry_remove", - "--wrap=bcm_cosq_pfc_deadlock_control_set", - "--wrap=bcm_cosq_pfc_deadlock_control_get", - "--wrap=bcm_cosq_pfc_deadlock_recovery_event_register", - "--wrap=bcm_cosq_pfc_deadlock_recovery_event_unregister", - "--wrap=bcm_flexctr_action_create", - "--wrap=bcm_flexctr_action_destroy", - "--wrap=bcm_l3_route_stat_attach", - "--wrap=bcm_l3_route_stat_detach", - "--wrap=bcm_l3_route_flexctr_object_set", - "--wrap=bcm_stat_custom_group_create", - "--wrap=bcm_stat_group_destroy", - "--wrap=bcm_stat_group_mode_id_create", - "--wrap=bcm_stat_group_mode_id_destroy", - "--wrap=bcm_port_ifg_get", - "--wrap=bcm_port_ifg_set", - "--wrap=bcm_stat_group_create", - "--wrap=bcm_l3_ingress_stat_attach", - "--wrap=bcm_l3_egress_stat_attach", - "--wrap=bcm_field_hint_t_init", - "--wrap=bcm_field_hints_create", - "--wrap=bcm_field_hints_add", - "--wrap=bcm_field_hints_destroy", - "--wrap=bcm_field_hints_get", - "--wrap=bcm_port_control_phy_timesync_set", -] - -wrapped_soc_symbols = [ - # - # SOC - # - "--wrap=soc_reset_init", - "--wrap=soc_init", - "--wrap=soc_stable_set", - "--wrap=soc_stable_size_set", - "--wrap=soc_property_get", - "--wrap=soc_cm_device_supported", - "--wrap=soc_misc_init", - "--wrap=soc_cm_device_init", - "--wrap=soc_switch_stable_register", - "--wrap=soc_detach", - "--wrap=soc_anyreg_read", - "--wrap=soc_miim_write", - "--wrap=soc_pci_read", - "--wrap=soc_pci_write", - "--wrap=soc_cm_init", - "--wrap=soc_cm_sfree", - "--wrap=soc_cm_device_create", - "--wrap=soc_cm_salloc", - "--wrap=soc_cm_device_destroy", - "--wrap=soc_mmu_init", -] - -# This is to be merged to wrapped_soc_symbols. For now, it has to be separate -# because all the other entries in wrapped_soc_symbols[] lack the implementation -# SdkTracer.cpp. Directly using that list would break the build for many -# builds such as bcm_tests. -# Adding the implementations for those entries will be done in a separate -# diff. After that is in, these two lists can be merged. -wrapped_soc_symbols_tmp = [ - "--wrap=soc_shutdown", -] - -wrapped_sai_symbols = [ - "--wrap=sai_api_query", - "--wrap=sai_api_initialize", - "--wrap=sai_api_uninitialize", - "--wrap=sai_get_object_key", -] - -wrapped_sal_symbols = [ - # - # SAL - # - "--wrap=sal_thread_name", - "--wrap=sal_vprintf", - "--wrap=sal_free", - "--wrap=sal_config_init_defaults", - "--wrap=sal_thread_main_get", - "--wrap=sal_core_init", - "--wrap=sal_config_refresh", - "--wrap=sal_thread_self", - "--wrap=sal_mutex_create", - "--wrap=sal_mutex_destroy", - "--wrap=sal_mutex_take", - "--wrap=sal_mutex_give", -] - -wrapped_bde_symbols = [ - # - # BDE - # - "--wrap=linux_bde_create", - "--wrap=linux_bde_destroy", -] - -wrapped_bcm_soc_sal_bde_symbols = ( - wrapped_bcm_sdk_symbols + - wrapped_soc_symbols + - wrapped_soc_symbols_tmp + - wrapped_sal_symbols + - wrapped_bde_symbols -) - -wrapped_combined_sdk_symbols = [ - "--wrap=soc_control", - "--wrap=soc_cm_get_id", -] - -# -# Linker flags to wrap Bcm symbols -# -wrapped_bcm_symbols = [ - "--wrap=bcm_pkt_flags_init", - "--wrap=bcm_linkscan_enable_set", - "--wrap=bcm_l3_egress_ecmp_find", - "--wrap=bcm_l3_egress_multipath_add", - "--wrap=bcm_l2_station_add", - "--wrap=bcm_stg_stp_get", - "--wrap=bcm_l2_addr_add", - "--wrap=bcm_l3_intf_delete", - "--wrap=bcm_switch_control_set", - "--wrap=bcm_l3_egress_t_init", - "--wrap=bcm_ip_mask_create", - "--wrap=bcm_knet_filter_traverse", - "--wrap=bcm_port_control_set", - "--wrap=bcm_cosq_mapping_get", - "--wrap=bcm_cosq_bst_profile_get", - "--wrap=bcm_l3_ecmp_member_add", - "--wrap=bcm_l3_egress_ecmp_add", - "--wrap=bcm_knet_netif_create", - "--wrap=bcm_vlan_list_destroy", - "--wrap=bcm_l2_age_timer_set", - "--wrap=bcm_stat_multi_get", - "--wrap=bcm_stat_get", - "--wrap=bcm_stat_sync_multi_get", - "--wrap=bcm_l3_egress_get", - "--wrap=bcm_rx_unregister", - "--wrap=bcm_port_ability_advert_get", - "--wrap=bcm_l3_ecmp_get", - "--wrap=bcm_l3_egress_ecmp_get", - "--wrap=bcm_l3_host_delete_by_interface", - "--wrap=bcm_vlan_destroy", - "--wrap=bcm_port_interface_get", - "--wrap=bcm_l3_egress_multipath_get", - "--wrap=bcm_knet_filter_create", - "--wrap=bcm_switch_event_unregister", - "--wrap=bcm_port_ability_local_get", - "--wrap=bcm_port_learn_set", - "--wrap=bcm_port_enable_set", - "--wrap=bcm_port_stat_enable_set", - "--wrap=bcm_port_fdr_config_set", - "--wrap=bcm_port_fdr_config_get", - "--wrap=bcm_port_fdr_stats_get", - "--wrap=bcm_rx_free", - "--wrap=bcm_port_phy_modify", - "--wrap=bcm_l3_route_delete", - "--wrap=bcm_port_speed_max", - "--wrap=bcm_l3_init", - "--wrap=bcm_knet_init", - "--wrap=bcm_port_queued_count_get", - "--wrap=bcm_cosq_bst_profile_set", - "--wrap=bcm_l3_route_delete_by_interface", - "--wrap=bcm_rx_control_get", - "--wrap=bcm_port_control_get", - "--wrap=bcm_cosq_mapping_set", - "--wrap=bcm_pkt_alloc", - "--wrap=bcm_attach", - "--wrap=bcm_attach_max", - "--wrap=bcm_port_speed_get", - "--wrap=bcm_l3_egress_ecmp_t_init", - "--wrap=bcm_knet_filter_t_init", - "--wrap=bcm_l3_egress_multipath_create", - "--wrap=bcm_linkscan_register", - "--wrap=bcm_stg_stp_set", - "--wrap=bcm_knet_filter_destroy", - "--wrap=bcm_cosq_bst_stat_multi_get", - "--wrap=bcm_l3_route_traverse", - "--wrap=bcm_l3_egress_ecmp_destroy", - "--wrap=bcm_cosq_bst_stat_multi_get", - "--wrap=bcm_l3_route_traverse", - "--wrap=bcm_l3_ecmp_destroy", - "--wrap=bcm_l3_egress_ecmp_destroy", - "--wrap=bcm_l3_route_delete_all", - "--wrap=bcm_switch_pkt_trace_info_get", - "--wrap=bcm_port_enable_get", - "--wrap=bcm_port_vlan_member_set", - "--wrap=bcm_switch_control_port_set", - "--wrap=bcm_port_selective_get", - "--wrap=bcm_port_speed_set", - "--wrap=bcm_port_interface_set", - "--wrap=bcm_l3_host_find", - "--wrap=bcm_l3_host_add", - "--wrap=bcm_l2_age_timer_get", - "--wrap=bcm_cosq_bst_stat_get", - "--wrap=bcm_cosq_bst_stat_extended_get", - "--wrap=bcm_udf_hash_config_add", - "--wrap=bcm_udf_hash_config_delete", - "--wrap=bcm_udf_create", - "--wrap=bcm_udf_destroy", - "--wrap=bcm_udf_pkt_format_create", - "--wrap=bcm_udf_pkt_format_destroy", - "--wrap=bcm_port_pause_addr_set", - "--wrap=bcm_udf_pkt_format_add", - "--wrap=bcm_udf_pkt_format_delete", - "--wrap=bcm_udf_pkt_format_get", - "--wrap=bcm_udf_hash_config_get", - "--wrap=bcm_udf_pkt_format_info_get", - "--wrap=bcm_udf_pkt_format_info_t_init", - "--wrap=bcm_udf_alloc_hints_t_init", - "--wrap=bcm_udf_t_init", - "--wrap=bcm_udf_hash_config_t_init", - "--wrap=bcm_udf_init", - "--wrap=bcm_udf_get", - "--wrap=bcm_field_qset_id_multi_set", - "--wrap=bcm_field_qualify_UdfClass", - "--wrap=bcm_field_group_config_t_init", - "--wrap=bcm_field_qualify_udf", - "--wrap=bcm_field_qualify_udf_get", - "--wrap=bcm_stg_list", - "--wrap=bcm_port_untagged_vlan_get", - "--wrap=bcm_l3_egress_traverse", - "--wrap=bcm_port_frame_max_get", - "--wrap=bcm_port_untagged_vlan_set", - "--wrap=bcm_linkscan_mode_set_pbm", - "--wrap=bcm_port_dtag_mode_get", - "--wrap=bcm_cosq_bst_stat_sync", - "--wrap=bcm_port_gport_get", - "--wrap=bcm_l3_ecmp_create", - "--wrap=bcm_l3_egress_ecmp_create", - "--wrap=bcm_cosq_bst_stat_clear", - "--wrap=bcm_vlan_gport_delete_all", - "--wrap=bcm_l3_egress_multipath_find", - "--wrap=bcm_vlan_list", - "--wrap=bcm_vlan_default_set", - "--wrap=bcm_l3_route_add", - "--wrap=bcm_vlan_control_port_set", - "--wrap=bcm_stg_default_get", - "--wrap=bcm_attach_check", - "--wrap=bcm_l2_addr_delete", - "--wrap=bcm_vlan_port_remove", - "--wrap=bcm_l3_egress_destroy", - "--wrap=bcm_stg_vlan_add", - "--wrap=bcm_l3_intf_find", - "--wrap=bcm_l3_egress_create", - "--wrap=bcm_port_local_get", - "--wrap=bcm_l3_host_delete_all", - "--wrap=bcm_l3_intf_create", - "--wrap=bcm_l2_addr_get", - "--wrap=bcm_l3_egress_multipath_traverse", - "--wrap=bcm_rx_register", - "--wrap=bcm_knet_netif_t_init", - "--wrap=bcm_rx_start", - "--wrap=bcm_l3_route_max_ecmp_get", - "--wrap=bcm_l3_ecmp_member_delete", - "--wrap=bcm_l3_egress_ecmp_delete", - "--wrap=bcm_stg_destroy", - "--wrap=bcm_stg_list_destroy", - "--wrap=bcm_linkscan_enable_get", - "--wrap=bcm_l3_intf_get", - "--wrap=bcm_knet_netif_destroy", - "--wrap=bcm_stg_default_set", - "--wrap=bcm_switch_control_port_get", - "--wrap=bcm_linkscan_unregister", - "--wrap=bcm_pkt_free", - "--wrap=bcm_l3_egress_find", - "--wrap=bcm_vlan_port_add", - "--wrap=bcm_switch_event_register", - "--wrap=bcm_port_selective_set", - "--wrap=bcm_l2_traverse", - "--wrap=bcm_l3_host_delete", - "--wrap=bcm_l2_station_delete", - "--wrap=bcm_l3_egress_ecmp_traverse", - "--wrap=bcm_port_link_status_get", - "--wrap=bcm_vlan_create", - "--wrap=bcm_l3_info", - "--wrap=bcm_rx_stop", - "--wrap=bcm_switch_control_get", - "--wrap=bcm_info_get", - "--wrap=bcm_linkscan_detach", - "--wrap=bcm_l3_egress_multipath_destroy", - "--wrap=bcm_port_dtag_mode_set", - "--wrap=bcm_port_vlan_member_get", - "--wrap=bcm_vlan_default_get", - "--wrap=bcm_linkscan_mode_get", - "--wrap=bcm_stk_my_modid_get", - "--wrap=bcm_stat_clear", - "--wrap=bcm_l3_egress_multipath_delete", - "--wrap=bcm_port_config_t_init", - "--wrap=bcm_port_config_get", - "--wrap=bcm_linkscan_mode_set", - "--wrap=bcm_vlan_destroy_all", - "--wrap=bcm_detach", - "--wrap=_bcm_shutdown", - "--wrap=bcm_stg_create", - "--wrap=bcm_port_learn_get", - "--wrap=bcm_knet_netif_traverse", - "--wrap=bcm_rx_cfg_get", - "--wrap=bcm_tx", - "--wrap=bcm_pktio_tx", - "--wrap=bcm_pktio_txpmd_stat_attach", - "--wrap=bcm_pktio_txpmd_stat_detach", - "--wrap=bcm_l3_intf_find_vlan", - "--wrap=bcm_l3_route_get", - "--wrap=bcm_port_name", - "--wrap=bcm_l3_host_traverse", - "--wrap=bcm_port_frame_max_set", - "--wrap=bcm_l2_station_get", - "--wrap=bcm_rx_control_set", - "--wrap=bcm_l3_route_max_ecmp_set", - "--wrap=bcm_l3_route_multipath_get", - "--wrap=bcm_port_ability_advert_set", - "--wrap=bcm_ip6_mask_create", - "--wrap=bcm_trunk_init", - "--wrap=bcm_trunk_get", - "--wrap=bcm_trunk_set", - "--wrap=bcm_trunk_create", - "--wrap=bcm_trunk_destroy", - "--wrap=bcm_trunk_member_add", - "--wrap=bcm_trunk_member_delete", - "--wrap=bcm_trunk_find", - "--wrap=bcm_l3_ingress_create", - "--wrap=bcm_l3_ingress_destroy", - "--wrap=bcm_vlan_control_vlan_set", - "--wrap=bcm_vlan_control_vlan_get", - "--wrap=bcm_l3_egress_ecmp_ethertype_set", - "--wrap=bcm_l3_egress_ecmp_ethertype_get", - "--wrap=bcm_l3_egress_ecmp_member_status_set", - "--wrap=bcm_l3_egress_ecmp_member_status_get", - "--wrap=bcm_l3_ecmp_dlb_port_quality_attr_t_init", - "--wrap=bcm_l3_ecmp_dlb_port_quality_attr_set", - "--wrap=bcm_l3_ecmp_dlb_port_quality_attr_get", - "--wrap=bcm_port_control_phy_timesync_set", -] diff --git a/fboss/agent/hw/benchmarks/agent_hw_benchmarks.bzl b/fboss/agent/hw/benchmarks/agent_hw_benchmarks.bzl deleted file mode 100644 index aeca39a73d3c0..0000000000000 --- a/fboss/agent/hw/benchmarks/agent_hw_benchmarks.bzl +++ /dev/null @@ -1,28 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") - -def agent_benchmark_lib(name, srcs, extra_deps = None): - extra_deps = extra_deps if extra_deps else [] - extra_deps += [ - ":hw_route_scale_benchmark_helpers", - "//folly:benchmark", - "//folly:dynamic", - "//folly:json", - "//fboss/agent/hw/test:config_factory", - "//fboss/agent/hw/test:hw_packet_utils", - "//fboss/agent/test/utils:voq_test_utils", - "//fboss/agent/test:ecmp_helper", - "//fboss/lib:function_call_time_reporter", - "//fboss/agent/benchmarks:agent_benchmarks_h", - ] - - return cpp_library( - name = name, - srcs = srcs, - # Don't drop the benchmark functions they will be needed - # in the final benchmark run - link_whole = True, - # Ensemble will be linked in by particular HwSwitch - # implementations - undefined_symbols = True, - exported_deps = extra_deps, - ) diff --git a/fboss/agent/hw/sai/api/api.bzl b/fboss/agent/hw/sai/api/api.bzl deleted file mode 100644 index 007f387da38f1..0000000000000 --- a/fboss/agent/hw/sai/api/api.bzl +++ /dev/null @@ -1,151 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_IMPLS", "to_impl_lib_name", "to_impl_suffix", "to_versions") - -# The SAI API library depends on a specific SAI Adapter's implementation -# of SAI for the definitions of symbols declared in the header only "sai" -# library. We can try to make the whole implementation of sai api and sai -# switch a huge header only library, but it seems preferable to solve this -# in TARGETS and parameterize building the library by the library that provides -# the crucial sai symbols. - -common_srcs = [ - "AddressUtil.cpp", - "FdbApi.cpp", - "HashApi.cpp", - "LoggingUtil.cpp", - "MplsApi.cpp", - "NeighborApi.cpp", - "NextHopGroupApi.cpp", - "PortApi.cpp", - "QosMapApi.cpp", - "RouteApi.cpp", - "SaiApiLock.cpp", - "SaiApiTable.cpp", - "SwitchApi.cpp", - "SystemPortApi.cpp", - "Types.cpp", -] - -fake_srcs = common_srcs + [ - "fake/FakeSaiExtensions.cpp", -] - -brcm_srcs = common_srcs + [ - "bcm/DebugCounterApi.cpp", - "bcm/PortApi.cpp", - "bcm/SwitchApi.cpp", - "bcm/TamApi.cpp", - "bcm/BufferApi.cpp", - "bcm/QueueApi.cpp", -] - -tajo_srcs = common_srcs + [ - "tajo/DebugCounterApi.cpp", - "tajo/PortApi.cpp", - "tajo/TamApi.cpp", - "tajo/SwitchApi.cpp", - "tajo/BufferApi.cpp", - "tajo/QueueApi.cpp", -] - -credo_srcs = common_srcs + [ - "oss/DebugCounterApi.cpp", - "oss/PortApi.cpp", - "oss/SwitchApi.cpp", - "oss/TamApi.cpp", - "oss/BufferApi.cpp", - "oss/QueueApi.cpp", -] - -common_headers = [ - "AclApi.h", - "AdapterKeySerializers.h", - "ArsApi.h", - "ArsProfileApi.h", - "BridgeApi.h", - "BufferApi.h", - "CounterApi.h", - "DebugCounterApi.h", - "FdbApi.h", - "HashApi.h", - "HostifApi.h", - "LagApi.h", - "MacsecApi.h", - "MirrorApi.h", - "MplsApi.h", - "NextHopApi.h", - "NextHopGroupApi.h", - "PortApi.h", - "QueueApi.h", - "RouteApi.h", - "RouterInterfaceApi.h", - "SaiApi.h", - "SaiApiError.h", - "SaiAttribute.h", - "SaiAttributeDataTypes.h", - "SaiDefaultAttributeValues.h", - "SaiObjectApi.h", - "SaiVersion.h", - "SamplePacketApi.h", - "SchedulerApi.h", - "SwitchApi.h", - "TamApi.h", - "Traits.h", - "TunnelApi.h", - "Types.h", - "UdfApi.h", - "VirtualRouterApi.h", - "VlanApi.h", - "WredApi.h", -] - -common_deps = [ - "fbsource//third-party/fmt:fmt", - "//fboss/agent:constants", - "//fboss/agent:fboss-error", - "//fboss/agent:fboss-types", - "//fboss/lib:hw_write_behavior", - "//fboss/lib:function_call_time_reporter", - "//fboss/lib:tuple_utils", - "//folly:format", - "//folly:network_address", - "//folly:singleton", - "//folly/logging:logging", -] - -common_external_deps = [ - ("boost", None), - ("boost", None, "boost_variant"), -] - -def sai_api_libs(): - all_api_libs = [] - api_srcs = { - "brcm": brcm_srcs, - "credo": credo_srcs, - "fake": fake_srcs, - "leaba": tajo_srcs, - } - for sai_impl in SAI_IMPLS: - deps = common_deps + [ - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - ] - major, minor, release = sai_impl.sai_version.split(".") - pp_flags = [ - "-DSAI_API_VERSION=(100000 * ({}) + 1000 * ({}) + ({}))".format(major, minor, release), - ] - - impl_suffix = to_impl_suffix(sai_impl) - all_api_libs.extend([cpp_library( - name = "sai_api{}".format(impl_suffix), - propagated_pp_flags = pp_flags, - srcs = api_srcs.get(sai_impl.name), - auto_headers = AutoHeaders.SOURCES, - headers = common_headers, - exported_deps = deps, - exported_external_deps = common_external_deps, - versions = to_versions(sai_impl), - )]) - - return all_api_libs diff --git a/fboss/agent/hw/sai/api/tests/api_test.bzl b/fboss/agent/hw/sai/api/tests/api_test.bzl deleted file mode 100644 index 7f55c81969db8..0000000000000 --- a/fboss/agent/hw/sai/api/tests/api_test.bzl +++ /dev/null @@ -1,18 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_FAKE_IMPLS", "to_impl_lib_name", "to_impl_suffix") - -def api_unittest(name, srcs, deps = None, supports_static_listing = True): - if deps == None: - deps = [] - for sai_impl in SAI_FAKE_IMPLS: - api_suffix = to_impl_suffix(sai_impl) - cpp_unittest( - name = "{}-{}".format(name, sai_impl.name), - srcs = srcs, - supports_static_listing = supports_static_listing, - deps = [ - "fbsource//third-party/googletest:gtest", - "//fboss/agent/hw/sai/api:sai_api{}".format(api_suffix), - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - ] + deps, - ) diff --git a/fboss/agent/hw/sai/benchmarks/benchmarks.bzl b/fboss/agent/hw/sai/benchmarks/benchmarks.bzl deleted file mode 100644 index 3eb2208a918d4..0000000000000 --- a/fboss/agent/hw/sai/benchmarks/benchmarks.bzl +++ /dev/null @@ -1,56 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_npu_impls", "to_impl_lib_name", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name") - -def _mono_sai_agent_benchmark_binary(name, srcs, sai_impl, **kwargs): - impl_suffix = to_impl_suffix(sai_impl) - name = "{}-{}-{}".format(name, sai_impl.name, sai_impl.version) - main_name = "mono_sai_agent_benchmarks_main" - sai_agent_benchmarks_main = sai_switch_dependent_name(main_name, sai_impl, True) - agent_hw_test_thrift_handler = sai_switch_dependent_name("agent_hw_test_thrift_handler", sai_impl, True) - deps = list(kwargs.get("deps", [])) - deps += [ - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/hw/sai/hw_test:sai_acl_utils{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_copp_utils{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_ecmp_utils{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_packet_trap_helper{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_port_utils{}".format(impl_suffix), - "//fboss/agent/benchmarks:{}".format(sai_agent_benchmarks_main), - "//fboss/agent/hw/sai/hw_test:{}".format(agent_hw_test_thrift_handler), - "//fboss/agent/test:linkstate_toggler", - ] - kwargs["deps"] = deps - return cpp_binary( - name = name, - srcs = srcs, - versions = to_versions(sai_impl), - **kwargs - ) - -def _multi_switch_agent_benchmark_binary(name, srcs, **kwargs): - name = "multi_switch-{}".format(name) - main_name = "multi_switch_sai_agent_benchmarks_main" - sai_agent_benchmarks_main = main_name - deps = list(kwargs.get("deps", [])) - deps += [ - "//fboss/agent/benchmarks:{}".format(sai_agent_benchmarks_main), - "//fboss/agent/test:linkstate_toggler", - ] - kwargs["deps"] = deps - return cpp_binary( - name = name, - srcs = srcs, - **kwargs - ) - -def sai_mono_agent_benchmark(name, srcs, **kwargs): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - if sai_impl.name == "fake": - continue - _mono_sai_agent_benchmark_binary(name, srcs, sai_impl, **kwargs) - -def sai_multi_switch_agent_benchmark(name, srcs, **kwargs): - _multi_switch_agent_benchmark_binary(name, srcs, **kwargs) diff --git a/fboss/agent/hw/sai/diag/diag.bzl b/fboss/agent/hw/sai/diag/diag.bzl deleted file mode 100644 index 03d680abca4f0..0000000000000 --- a/fboss/agent/hw/sai/diag/diag.bzl +++ /dev/null @@ -1,109 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_impls", "get_all_npu_impls", "get_all_phy_impls", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name", "sai_switch_lib_name") - -def _py_repl_lib(sai_impl): - impl_suffix = to_impl_suffix(sai_impl) - subdir = "oss" - if sai_impl.name == "leaba": - subdir = "facebook/tajo" - - cpp_library( - name = "python_repl{}".format(impl_suffix), - srcs = [ - "PythonRepl.cpp", - "{}/PythonRepl.cpp".format(subdir), - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - ":diag_lib", - "//folly:file", - "//folly:format", - "//folly/logging:logging", - ], - exported_external_deps = [ - ("python", None, "python"), - ], - ) - -def _diag_lib(sai_impl, is_npu): - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, is_npu) - return cpp_library( - name = "{}".format(sai_switch_dependent_name("diag_shell", sai_impl, is_npu)), - srcs = [ - "DiagShell.cpp", - "facebook/DiagShell.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - exported_deps = [ - "//fboss/agent/hw/sai/switch:if-cpp2-services", - "//fboss/agent/hw/sai/switch:if-cpp2-types", - ":sai_repl{}".format(impl_suffix), - ":python_repl{}".format(impl_suffix), - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//folly:file", - "//folly:file_util", - "//folly/logging:logging", - "//thrift/lib/cpp2/async:server_stream", - ], - exported_external_deps = [("boost", None, "boost_uuid")], - ) - -def _sai_repl(sai_impl): - impl_suffix = to_impl_suffix(sai_impl) - return cpp_library( - name = "sai_repl{}".format(impl_suffix), - srcs = [ - "SaiRepl.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - exported_deps = [ - ":diag_lib", - "//fboss/agent/hw/sai/api:sai_api{}".format(impl_suffix), - "//folly:file", - "//folly/logging:logging", - ], - ) - -def all_diag_libs(): - for sai_impl in get_all_impls(): - _py_repl_lib(sai_impl) - - for sai_impl in get_all_npu_impls(): - _diag_lib(sai_impl, True) - - for sai_impl in get_all_phy_impls(): - _diag_lib(sai_impl, False) - -def all_repl_libs(): - all_impls = get_all_impls() - for sai_impl in all_impls: - _sai_repl(sai_impl) - -def _diag_shell_client_bins(): - return cpp_binary( - name = "diag_shell_client", - srcs = [ - "DiagShellClient.cpp", - "facebook/DiagShellClient.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - deps = [ - "//fboss/agent:fboss-event-base", - "//fboss/agent/hw/sai/switch:if-cpp2-clients", - "//folly/init:init", - "//folly/io/async:async_base", - "//folly/io/async:async_signal_handler", - "//folly/logging:init", - "//folly/logging:logging", - "//servicerouter/client/cpp2:cpp2", - ], - ) - -def all_diag_bins(): - _diag_shell_client_bins() diff --git a/fboss/agent/hw/sai/hw_test/hw_test.bzl b/fboss/agent/hw/sai/hw_test/hw_test.bzl deleted file mode 100644 index 331993d17876a..0000000000000 --- a/fboss/agent/hw/sai/hw_test/hw_test.bzl +++ /dev/null @@ -1,469 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_impls_for", "get_all_npu_impls", "get_link_group_map", "impl_category_suffix", "to_impl_lib_name", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name", "sai_switch_lib_name") - -def _sai_switch_ensemble(sai_impl, is_npu): - switch_lib_name = sai_switch_lib_name(sai_impl, is_npu) - thrift_test_handler = sai_switch_dependent_name("thrift_test_handler", sai_impl, is_npu) - return cpp_library( - name = "{}".format(get_switch_ensemble_name(sai_impl, is_npu)), - srcs = [ - "HwSwitchEnsembleFactory.cpp", - "SaiSwitchEnsemble.cpp", - ], - # Link whole (--whole_archive), since ensemble may get used - # in contexts where we are just combining libs - e.g. a h/w - # switch agnostic benchmark lib and a sai_switch_ensemble to - # plugin the right ensemble. Without whole_archive, depending - # on the linking order symbols from sai_switch_ensemble which - # are needed by the hw switch agnostic benchmark lib maybe - # dropped. - link_whole = True, - exported_deps = [ - "//fboss/agent:core", - "//fboss/agent:setup_thrift", - "//fboss/agent/hw/test:hw_switch_ensemble_factory", - "//fboss/agent/test:linkstate_toggler", - "//fboss/agent/hw/sai/switch:{}".format( - switch_lib_name, - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - thrift_test_handler, - ), - "//fboss/agent/hw/test:config_factory", - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, is_npu), - ), - "//folly/io/async:async_signal_handler", - ], - versions = to_versions(sai_impl), - ) - -def _sai_phy_capabilities(sai_impl, is_npu): - switch_lib_name = sai_switch_lib_name(sai_impl, is_npu) - return cpp_library( - name = "{}".format(get_switch_phy_capabilities_name(sai_impl, is_npu)), - srcs = [ - "PhyCapabilities.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/test:phy_capabilities", - "//fboss/agent/hw/sai/switch:{}".format( - switch_lib_name, - ), - ], - versions = to_versions(sai_impl), - ) - -def get_switch_ensemble_name(sai_impl, is_npu): - return sai_switch_dependent_name("sai_switch_ensemble", sai_impl, is_npu) - -def _switch_ensembles(is_npu): - all_impls = get_all_impls_for(is_npu) - for sai_impl in all_impls: - _sai_switch_ensemble(sai_impl, is_npu) - -def get_switch_phy_capabilities_name(sai_impl, is_npu): - return sai_switch_dependent_name("sai_switch_phy_capabilities", sai_impl, is_npu) - -def _switch_phy_capabilities(is_npu): - all_impls = get_all_impls_for(is_npu) - for sai_impl in all_impls: - _sai_phy_capabilities(sai_impl, is_npu) - -def all_switch_ensembles(): - _switch_ensembles(is_npu = True) - _switch_ensembles(is_npu = False) - -def all_phy_capabilities(): - _switch_phy_capabilities(is_npu = True) - _switch_phy_capabilities(is_npu = False) - -def all_acl_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_acl_utils{}".format(impl_suffix), - srcs = [ - "HwTestAclUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/test/utils:queue_per_host_test_utils", - "//fboss/agent/hw/test:hw_test_acl_utils", - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - ], - versions = to_versions(sai_impl), - ) - -def all_port_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_port_utils{}".format(impl_suffix), - srcs = [ - "HwTestPortUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_port_utils", - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, True), - ), - ], - versions = to_versions(sai_impl), - ) - -def all_ecmp_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_ecmp_utils{}".format(impl_suffix), - srcs = [ - "HwTestEcmpUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_ecmp_utils", - ], - versions = to_versions(sai_impl), - ) - -def all_fabric_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_fabric_utils{}".format(impl_suffix), - srcs = [ - "HwTestFabricUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_fabric_utils", - ], - versions = to_versions(sai_impl), - ) - -def all_teflow_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_teflow_utils{}".format(impl_suffix), - srcs = [ - "HwTestTeFlowUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_te_flow_utils", - ], - versions = to_versions(sai_impl), - ) - -def all_trunk_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_trunk_utils{}".format(impl_suffix), - srcs = [ - "HwTestTrunkUtils.cpp", - ], - headers = [ - "SaiSwitchEnsemble.h", - ], - exported_deps = [ - "//fboss/agent/hw/sai/diag:diag_lib", - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/sai/switch:if-cpp2-types", - "//fboss/agent/hw/test:hw_test_trunk_utils", - "//fboss/agent/hw/test:config_factory", - "//fboss/agent/hw/sai/switch:if-cpp2-services", - ], - versions = to_versions(sai_impl), - ) - -def all_ptp_tc_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_ptp_tc_utils{}".format(impl_suffix), - srcs = [ - "HwTestPtpTcUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_ptp_tc_utils", - ], - versions = to_versions(sai_impl), - ) - -def all_udf_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_udf_utils{}".format(impl_suffix), - srcs = [ - "HwTestUdfUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_udf_utils", - ], - versions = to_versions(sai_impl), - ) - -def all_packet_trap_helper(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_packet_trap_helper{}".format(impl_suffix), - srcs = [ - "HwTestPacketTrapEntry.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_packet_trap_entry", - ], - versions = to_versions(sai_impl), - ) - -def all_copp_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_copp_utils{}".format(impl_suffix), - srcs = [ - "HwTestCoppUtils.cpp", - ], - link_whole = True, # T76171234 - exported_deps = [ - "//fboss/agent/hw/test:hw_copp_utils", - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - ], - versions = to_versions(sai_impl), - ) - -def _sai_test_binary(sai_impl, is_npu): - test_deps = [ - "//fboss/agent/hw/sai/hw_test:{}".format(get_switch_ensemble_name(sai_impl, is_npu)), - "//fboss/agent/hw/test:hw_switch_test", - "//fboss/agent/hw/test:hw_test_main", - "//fboss/lib:ref_map", - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/hw/sai/hw_test:{}".format(get_switch_phy_capabilities_name(sai_impl, is_npu)), - ] - binary_name = "sai_test{}-{}-{}".format(impl_category_suffix(is_npu), sai_impl.name, sai_impl.version) - return cpp_binary( - name = binary_name, - srcs = [ - "dataplane_tests/SaiAclTableGroupTrafficTests.cpp", - "HwTestEcmpUtils.cpp", - "HwTestFabricUtils.cpp", - "HwTestNeighborUtils.cpp", - "HwTestPtpTcUtils.cpp", - "HwVlanUtils.cpp", - "HwTestTamUtils.cpp", - "HwTestAclUtils.cpp", - "HwTestPfcUtils.cpp", - "HwTestAqmUtils.cpp", - "HwTestCoppUtils.cpp", - "HwTestUdfUtils.cpp", - "HwTestFlowletSwitchingUtils.cpp", - "HwTestMirrorUtils.cpp", - "HwTestMplsUtils.cpp", - "HwTestPortUtils.cpp", - "HwTestPacketTrapEntry.cpp", - "HwTestRouteUtils.cpp", - "HwTestTeFlowUtils.cpp", - "HwTestTrunkUtils.cpp", - "SaiAclTableTests.cpp", - "SaiAclTableGroupTests.cpp", - "SaiLinkStateRollbackTests.cpp", - "SaiNeighborRollbackTests.cpp", - "SaiNextHopGroupTest.cpp", - "SaiPortUtils.cpp", - "SaiPortAdminStateTests.cpp", - "SaiRollbackTest.cpp", - "SaiRouteRollbackTests.cpp", - "SaiQPHRollbackTests.cpp", - ], - linker_flags = [ - "--export-dynamic", - "--unresolved-symbols=ignore-all", - ], - deps = test_deps, - link_group_map = get_link_group_map(binary_name, sai_impl), - headers = [ - "SaiLinkStateDependentTests.h", - ], - versions = to_versions(sai_impl), - ) - -def _sai_multinode_test_binary(sai_impl): - test_deps = [ - "//fboss/agent/test:multinode_tests", - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_ecmp_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_trunk_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_copp_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_acl_utils", sai_impl, True), - ), - ] - if sai_impl.name == "fake" or sai_impl.name == "leaba": - test_deps.append("//fboss/agent/platforms/sai:bcm-required-symbols") - binary_name = "sai_multinode_test-{}-{}".format(sai_impl.name, sai_impl.version) - return cpp_binary( - name = binary_name, - srcs = [ - "SaiMultiNodeTest.cpp", - ], - link_group_map = get_link_group_map(binary_name, sai_impl), - deps = test_deps, - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - ) - -def _sai_macsec_multinode_test_binary(sai_impl): - test_deps = [ - "//fboss/agent/test:macsec_multinode_tests", - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_ecmp_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_trunk_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_copp_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_acl_utils", sai_impl, True), - ), - ] - if sai_impl.name == "fake" or sai_impl.name == "leaba": - test_deps.append("//fboss/agent/platforms/sai:bcm-required-symbols") - binary_name = "sai_macsec_multinode_test-{}-{}".format(sai_impl.name, sai_impl.version) - return cpp_binary( - name = binary_name, - srcs = [ - "SaiMultiNodeTest.cpp", - ], - link_group_map = get_link_group_map(binary_name, sai_impl), - deps = test_deps, - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - ) - -def all_test_binaries(): - for sai_impl in get_all_impls_for(True): - _sai_test_binary(sai_impl, True) - _sai_multinode_test_binary(sai_impl) - _sai_macsec_multinode_test_binary(sai_impl) - - for sai_impl in get_all_impls_for(False): - _sai_test_binary(sai_impl, False) - -def _test_handlers(is_npu): - all_impls = get_all_impls_for(is_npu) - for sai_impl in all_impls: - _test_handler(sai_impl, is_npu) - -def all_test_handlers(): - _test_handlers(is_npu = True) - _test_handlers(is_npu = False) - -def _test_handler(sai_impl, is_npu): - return cpp_library( - name = "{}".format(sai_switch_dependent_name("thrift_test_handler", sai_impl, is_npu)), - srcs = [ - "SaiTestHandler.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - ":if-cpp2-services", - "//fboss/agent/hw/sai/diag:{}".format(sai_switch_dependent_name("diag_shell", sai_impl, is_npu)), - ], - versions = to_versions(sai_impl), - ) - -def _test_thrift_handlers(is_npu): - all_impls = get_all_impls_for(is_npu) - for sai_impl in all_impls: - _test_thrift_handler(sai_impl, is_npu) - -def all_test_thrift_handlers(): - _test_thrift_handlers(is_npu = True) - -def _test_thrift_handler(sai_impl, is_npu): - switch_lib_name = sai_switch_lib_name(sai_impl, is_npu) - return cpp_library( - name = "{}".format(sai_switch_dependent_name("agent_hw_test_thrift_handler", sai_impl, is_npu)), - srcs = [ - "HwTestAclUtilsThriftHandler.cpp", - "HwTestMirrorUtilsThriftHandler.cpp", - "HwTestNeighborUtilsThriftHandler.cpp", - "HwTestEcmpUtilsThriftHandler.cpp", - "HwTestPortUtilsThriftHandler.cpp", - "HwTestVoqSwitchUtilsThriftHandler.cpp", - "HwTestRouteUtilsThriftHandler.cpp", - "HwTestThriftHandler.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - "//fboss/agent/test/utils:acl_test_utils", - "//fboss/agent/hw/test:hw_test_thrift_handler_h", - "//fboss/agent/if:agent_hw_test_ctrl-cpp2-services", - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_ecmp_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/diag:{}".format(sai_switch_dependent_name("diag_shell", sai_impl, is_npu)), - ], - versions = to_versions(sai_impl), - ) - -def all_test_libs(): - all_acl_utils() - all_ecmp_utils() - all_fabric_utils() - all_port_utils() - all_packet_trap_helper() - all_copp_utils() - all_ptp_tc_utils() - all_trunk_utils() - all_udf_utils() - all_teflow_utils() - all_test_thrift_handlers() diff --git a/fboss/agent/hw/sai/impl/impl.bzl b/fboss/agent/hw/sai/impl/impl.bzl deleted file mode 100644 index b7f25776b5d06..0000000000000 --- a/fboss/agent/hw/sai/impl/impl.bzl +++ /dev/null @@ -1,210 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load( - "//fboss:THIRD-PARTY-VERSIONS.bzl", - "NATIVE_IMPLS", - "SAI_BRCM_IMPLS", - "SAI_CREDO_IMPLS", - "SAI_FAKE_IMPLS", - "SAI_IMPLS", - "SAI_LEABA_IMPLS", - "SAI_PHY_IMPLS", - "SAI_VENDOR_IMPLS", - "to_impl_suffix", - "to_versions", -) - -# TODO: re-exporting since this lib has a bunch of deps. Will remove deps and directly ref THIRD-PARTY-VERSIONS -NATIVE_IMPLS = NATIVE_IMPLS -SAI_BRCM_IMPLS = SAI_BRCM_IMPLS -SAI_CREDO_IMPLS = SAI_CREDO_IMPLS -SAI_FAKE_IMPLS = SAI_FAKE_IMPLS -SAI_IMPLS = SAI_IMPLS -SAI_LEABA_IMPLS = SAI_LEABA_IMPLS -SAI_VENDOR_IMPLS = SAI_VENDOR_IMPLS -SAI_PHY_IMPLS = SAI_PHY_IMPLS -to_versions = to_versions -to_sai_versions = to_versions -to_impl_suffix = to_impl_suffix -to_sdk_suffix = to_impl_suffix - -# TODO: reuse to_impl_suffix here as well (missing a dash) -def to_impl_lib_name(sai_impl): - return "{}-{}".format( - sai_impl.name, - sai_impl.version, - ) - -def to_impl_bin_name(sai_impl, prefix): - return "{}-{}-{}".format( - prefix, - sai_impl.name, - sai_impl.version, - ) - -def impl_category_suffix(is_npu): - return "" if is_npu else "-phy" - -def to_impl_external_deps(sai_impl): - _external_deps_map = { - ("brcm-sai", "8.2.0.0_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "8.2.0.0_sim_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "9.2.0.0_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "9.0_ea_sim_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "10.0_ea_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "10.0_ea_sim_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "10.0_ea_dnx_sim_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "10.2.0.0_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "11.0_ea_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "11.3.0.0_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "11.3.0.0_dnx_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "12.0_ea_dnx_odp"): [("brcm-sai", None, "sai")], - ("CredoB52SAI", "0.7.2"): [("CredoB52SAI", None, "saiowl")], - ("CredoB52SAI", "0.8.4"): [("CredoB52SAI", None, "saiowl")], - ("fake", "1.14.0"): [("sai", None)], - ("leaba-sdk", "1.42.8"): [("leaba-sdk", None, "sai-sdk")], - ("leaba-sdk", "24.4.90"): [("leaba-sdk", None, "dyn-sai"), ("leaba-sdk", None, "dyn-sdk")], - ("leaba-sdk", "24.4.90_yuba"): [("leaba-sdk", None, "sai-sdk")], - ("leaba-sdk", "24.7.0_yuba"): [("leaba-sdk", None, "sai-sdk")], - ("leaba-sdk", "24.8.3001"): [("leaba-sdk", None, "dyn-sai"), ("leaba-sdk", None, "dyn-sdk")], - } - return _external_deps_map[(sai_impl.sdk_name, sai_impl.version)] - -def _get_fake_impls(): - fake_impls = [] - for fake_impl in SAI_FAKE_IMPLS: - fake_impls.extend([fake_impl]) - return fake_impls - -def get_all_impls(): - all_impls = [] - all_impls.extend(_get_fake_impls()) - for sai_impl in SAI_VENDOR_IMPLS: - all_impls.extend([sai_impl]) - return all_impls - -def get_all_npu_impls(): - return _get_fake_impls() + [ - sai_impl - for sai_impl in SAI_BRCM_IMPLS + SAI_LEABA_IMPLS - ] - -def get_all_phy_impls(): - return [sai_impl for sai_impl in SAI_PHY_IMPLS] + _get_fake_impls() - -def get_all_native_phy_impls(): - return [impl for impl in NATIVE_IMPLS] - -def get_all_impls_for(npu): - return get_all_npu_impls() if npu else get_all_phy_impls() - -def sai_fake_impl_lib(): - return [cpp_library( - name = to_impl_lib_name(sai_impl), - srcs = [ - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - "//fboss/agent/hw/sai/fake:fake_sai", - ], - ) for sai_impl in SAI_FAKE_IMPLS] - -def sai_leaba_impl_lib(): - return [cpp_library( - name = to_impl_lib_name(sai_impl), - srcs = [ - ], - auto_headers = AutoHeaders.SOURCES, - linker_flags = [ - # When we use the leaba python debug shell, it will dynamically - # load a shared library built with SWIG. We need that library - # to consider the symbols it depends on resolved so that it - # doesn't load them again. - # see: - # https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html - # for more details - "--export-dynamic", - ], - exported_deps = [ - "//fboss/agent/hw/sai/tracer:sai_tracer{}".format(to_impl_suffix(sai_impl)), - ], - ) for sai_impl in SAI_LEABA_IMPLS] - -def get_link_group_map(binary_name, sai_impl): - if sai_impl.is_dyn: - shared_libs = [] - for (_, _, libname) in to_impl_external_deps(sai_impl): - shared_libs.append(("fbcode//third-party-buck/platform010-compat/build/{}/{}:{}".format(sai_impl.name, sai_impl.version, libname), "node", None, "shared")) - return [ - ( - binary_name, - shared_libs, - ), - ] - else: - return [] - -def sai_brcm_impl_lib(): - return [cpp_library( - name = to_impl_lib_name(sai_impl), - srcs = [ - ], - linker_flags = [ - # Brcm SDK ISSU needs these flags when linking with DLL library - "--export-dynamic", - ], - exported_deps = [ - "//fboss/agent/hw/sai/tracer:sai_tracer{}".format(to_impl_suffix(sai_impl)), - ], - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - ) for sai_impl in SAI_BRCM_IMPLS] - -def sai_credo_impl_lib(): - return [cpp_library( - name = to_impl_lib_name(sai_impl), - srcs = [ - ], - link_whole = True, - exported_deps = [ - "//fboss/agent/hw/sai/tracer:sai_tracer{}".format(to_impl_suffix(sai_impl)), - ], - auto_headers = AutoHeaders.SOURCES, - ) for sai_impl in SAI_CREDO_IMPLS] - -def sai_impl_libs(): - sai_fake_impl_lib() - sai_leaba_impl_lib() - sai_brcm_impl_lib() - sai_credo_impl_lib() - -def _sai_impl_version_lib(sai_impl, srcs = []): - external_deps = to_impl_external_deps(sai_impl) - if not srcs: - srcs = ["util.cpp", "facebook/{}/version.cpp".format(sai_impl.name)] - return cpp_library( - name = "{}-version".format(to_impl_lib_name(sai_impl)), - srcs = srcs, - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - "fbsource//third-party/fmt:fmt", - ":impl-version", - ], - exported_external_deps = external_deps + ["re2", "glog"], - ) - -def sai_impl_version_libs(): - cpp_library( - name = "impl-version", - srcs = [ - ], - headers = [ - "util.h", - "version.h", - ], - ) - for sai_impl in SAI_IMPLS: - if (sai_impl.name == "fake"): - _sai_impl_version_lib(sai_impl, ["version.cpp"]) - else: - _sai_impl_version_lib(sai_impl, []) diff --git a/fboss/agent/hw/sai/store/store.bzl b/fboss/agent/hw/sai/store/store.bzl deleted file mode 100644 index 5cbb8d80ec922..0000000000000 --- a/fboss/agent/hw/sai/store/store.bzl +++ /dev/null @@ -1,39 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_impls", "to_impl_suffix", "to_versions") - -def _sai_store_lib(sai_impl): - impl_suffix = to_impl_suffix(sai_impl) - return cpp_library( - name = "sai_store{}".format(impl_suffix), - srcs = [ - "SaiObjectEventPublisher.cpp", - "SaiObject.cpp", - "SaiStore.cpp", - ], - undefined_symbols = True, - headers = [ - "LoggingUtil.h", - "SaiObject.h", - "SaiObjectEventPublisher.h", - "SaiObjectEventSubscriber.h", - "SaiObjectEventSubscriber-defs.h", - "SaiObjectWithCounters.h", - "SaiStore.h", - "Traits.h", - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - "fbsource//third-party/fmt:fmt", - "//fboss/agent/hw/sai/api:sai_api{}".format(impl_suffix), - "//fboss/lib:ref_map", - "//fboss/lib:tuple_utils", - "//folly:singleton", - ], - versions = to_versions(sai_impl), - ) - -def sai_store_lib(): - all_impls = get_all_impls() - for sai_impl in all_impls: - _sai_store_lib(sai_impl) diff --git a/fboss/agent/hw/sai/store/tests/store_test.bzl b/fboss/agent/hw/sai/store/tests/store_test.bzl deleted file mode 100644 index 90fc6d1e95ac3..0000000000000 --- a/fboss/agent/hw/sai/store/tests/store_test.bzl +++ /dev/null @@ -1,19 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_FAKE_IMPLS", "to_impl_lib_name", "to_impl_suffix") - -def store_unittest(name, srcs, supports_static_listing = True, deps = []): - for sai_impl in SAI_FAKE_IMPLS: - impl_suffix = to_impl_suffix(sai_impl) - cpp_unittest( - name = "{}-{}".format(name, sai_impl.name), - srcs = srcs, - supports_static_listing = supports_static_listing, - headers = [ - "SaiStoreTest.h", - ], - deps = [ - "fbsource//third-party/googletest:gtest", - "//fboss/agent/hw/sai/store:sai_store{}".format(impl_suffix), - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - ] + deps, - ) diff --git a/fboss/agent/hw/sai/switch/switch.bzl b/fboss/agent/hw/sai/switch/switch.bzl deleted file mode 100644 index 4d7db2b929491..0000000000000 --- a/fboss/agent/hw/sai/switch/switch.bzl +++ /dev/null @@ -1,192 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_npu_impls", "get_all_phy_impls", "to_impl_suffix", "to_versions") - -_COMMON_SRCS = [ - "ConcurrentIndices.cpp", - "SaiAclTableGroupManager.cpp", - "SaiAclTableManager.cpp", - "SaiArsManager.cpp", - "SaiArsProfileManager.cpp", - "SaiBridgeManager.cpp", - "SaiBufferManager.cpp", - "SaiCounterManager.cpp", - "SaiDebugCounterManager.cpp", - "SaiInSegEntryManager.cpp", - "SaiFdbManager.cpp", - "SaiHashManager.cpp", - "SaiHostifManager.cpp", - "SaiLagManager.cpp", - "SaiMacsecManager.cpp", - "SaiManagerTable.cpp", - "SaiMirrorManager.cpp", - "SaiNeighborManager.cpp", - "SaiNextHopManager.cpp", - "SaiNextHopGroupManager.cpp", - "SaiPortManager.cpp", - "SaiPortUtils.cpp", - "SaiQosMapManager.cpp", - "SaiQueueManager.cpp", - "SaiRouteManager.cpp", - "SaiRouterInterfaceManager.cpp", - "SaiRxPacket.cpp", - "SaiSamplePacketManager.cpp", - "SaiSchedulerManager.cpp", - "SaiSwitch.cpp", - "SaiSwitchManager.cpp", - "SaiSystemPortManager.cpp", - "SaiUdfManager.cpp", - "SaiVlanManager.cpp", - "SaiVirtualRouterManager.cpp", - "SaiWredManager.cpp", - "SaiTunnelManager.cpp", -] - -_NPU_COMMON_SRCS = _COMMON_SRCS + [ - "npu/SaiAclTableManager.cpp", - "npu/SaiPortManager.cpp", - "npu/SaiSwitch.cpp", -] - -_NPU_BRCM_SRCS = _NPU_COMMON_SRCS + [ - "facebook/SaiBufferManager.cpp", - "facebook/SaiHostifManager.cpp", - "facebook/SaiSwitchManager.cpp", - "npu/bcm/SaiQueueManager.cpp", - "npu/bcm/SaiSwitch.cpp", - "npu/bcm/SaiSwitchManager.cpp", - "npu/bcm/SaiPortManager.cpp", - "npu/bcm/SaiTamManager.cpp", - "oss/SaiAclTableManager.cpp", -] - -_NPU_TAJO_SRCS = _NPU_COMMON_SRCS + [ - "facebook/SaiBufferManager.cpp", - "facebook/SaiHostifManager.cpp", - "facebook/SaiSwitchManager.cpp", - "npu/tajo/SaiPortManager.cpp", - "npu/tajo/SaiSwitch.cpp", - "npu/tajo/SaiTamManager.cpp", - "npu/tajo/SaiAclTableManager.cpp", - "npu/tajo/SaiSwitchManager.cpp", - "oss/SaiQueueManager.cpp", -] - -_NPU_FAKE_SRCS = _NPU_COMMON_SRCS + [ - "oss/SaiBufferManager.cpp", - "oss/SaiHostifManager.cpp", - "oss/SaiSwitch.cpp", - "oss/SaiTamManager.cpp", - "oss/SaiPortManager.cpp", - "oss/SaiAclTableManager.cpp", - "oss/SaiSwitchManager.cpp", - "oss/SaiQueueManager.cpp", -] - -_PHY_COMMON_SRCS = _COMMON_SRCS + [ - "phy/SaiAclTableManager.cpp", - "phy/SaiPortManager.cpp", - "phy/SaiSwitch.cpp", - "oss/SaiSwitch.cpp", - "oss/SaiTamManager.cpp", - "oss/SaiBufferManager.cpp", - "oss/SaiHostifManager.cpp", - "oss/SaiPortManager.cpp", - "oss/SaiAclTableManager.cpp", - "oss/SaiSwitchManager.cpp", - "oss/SaiQueueManager.cpp", -] - -_PHY_FAKE_SRCS = _PHY_COMMON_SRCS - -_PHY_ELBERT_8DD_SRCS = _PHY_COMMON_SRCS - -def _sai_switch_srcs(sai_impl, is_npu): - if is_npu: - if sai_impl.name == "fake": - return _NPU_FAKE_SRCS - if sai_impl.name == "leaba": - return _NPU_TAJO_SRCS - if sai_impl.name == "brcm": - return _NPU_BRCM_SRCS - else: - if sai_impl.name == "fake": - return _PHY_FAKE_SRCS - if sai_impl.name == "credo": - return _PHY_ELBERT_8DD_SRCS - return [] - -def sai_switch_lib_name(sai_impl, is_npu): - impl_suffix = to_impl_suffix(sai_impl) - name_suffix = "switch" if is_npu else "phy" - return "sai_{}{}".format(name_suffix, impl_suffix) - -def sai_switch_dependent_name(name, sai_impl, is_npu): - impl_suffix = to_impl_suffix(sai_impl) - switch_type = "" if is_npu else "-phy" - return "{}{}{}".format(name, switch_type, impl_suffix) - -def _sai_switch_lib(sai_impl, is_npu): - impl_suffix = to_impl_suffix(sai_impl) - srcs = _sai_switch_srcs(sai_impl, is_npu) - name = sai_switch_lib_name(sai_impl, is_npu) - return cpp_library( - name = name, - srcs = srcs, - undefined_symbols = True, - headers = [ - "SaiTamManager.h", - "SaiTxPacket.h", - ], - exported_deps = [ - "//fboss/agent:core", - "//fboss/agent/hw:hw_switch_fb303_stats", - "//fboss/agent/hw:hw_cpu_fb303_stats", - "//fboss/agent/hw:hw_port_fb303_stats", - "//fboss/agent/hw:hw_resource_stats_publisher", - "//fboss/agent/hw:unsupported_feature_manager", - "//fboss/agent/hw:hw_trunk_counters", - "//fboss/agent/hw:prbs_stats_entry", - "//fboss/agent/hw/sai/api:sai_api{}".format(impl_suffix), - "//fboss/agent/hw/sai/store:sai_store{}".format(impl_suffix), - "//fboss/agent/platforms/sai:sai_platform_h", - "//fboss/lib:ref_map", - "//folly/concurrency:concurrent_hash_map", - "//folly/container:f14_hash", - "//thrift/lib/cpp/util:enum_utils", - "//fboss/lib/phy:phy_utils", - "//fboss/mka_service/if:mka_structs-cpp2-types", - ], - versions = to_versions(sai_impl), - ) - -def _handler_lib(sai_impl, is_npu): - return cpp_library( - name = "{}".format(sai_switch_dependent_name("thrift_handler", sai_impl, is_npu)), - srcs = [ - "SaiHandler.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - ":if-cpp2-types", - ":if-cpp2-services", - "//fboss/agent/hw/sai/diag:{}".format(sai_switch_dependent_name("diag_shell", sai_impl, is_npu)), - "//fboss/agent:handler", - ], - versions = to_versions(sai_impl), - ) - -def all_handler_libs(): - for sai_impl in get_all_npu_impls(): - _handler_lib(sai_impl, True) - - for sai_impl in get_all_phy_impls(): - _handler_lib(sai_impl, False) - -def all_npu_libs(): - for sai_impl in get_all_npu_impls(): - _sai_switch_lib(sai_impl, True) - -def all_phy_libs(): - for sai_impl in get_all_phy_impls(): - _sai_switch_lib(sai_impl, False) diff --git a/fboss/agent/hw/sai/switch/tests/switch_test.bzl b/fboss/agent/hw/sai/switch/tests/switch_test.bzl deleted file mode 100644 index 19e58c6626b01..0000000000000 --- a/fboss/agent/hw/sai/switch/tests/switch_test.bzl +++ /dev/null @@ -1,66 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_impls_for", "to_impl_lib_name", "to_impl_suffix") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name", "sai_switch_lib_name") - -def _manager_test_lib(sai_impl, is_npu): - switch_lib_name = sai_switch_lib_name(sai_impl, is_npu) - impl_suffix = to_impl_suffix(sai_impl) - name = sai_switch_dependent_name("manager_test_base", sai_impl, is_npu) - return cpp_library( - name = name, - srcs = [ - "ManagerTestBase.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - "fbsource//third-party/googletest:gtest", - "//fboss/agent/hw/sai/fake:fake_sai", - "//fboss/agent:switchid_scope_resolver", - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/platforms/sai:{}".format(sai_switch_dependent_name("sai_platform", sai_impl, is_npu)), - ], - ) - -def _manager_test_libs(is_npu): - all_impls = get_all_impls_for(is_npu) - for sai_impl in all_impls: - if sai_impl.name != "fake": - continue - _manager_test_lib(sai_impl, is_npu) - -def manager_test_libs(): - _manager_test_libs(is_npu = True) - -def phy_manager_test_libs(): - _manager_test_libs(is_npu = False) - -def _switch_manager_unittest_impl(name, srcs, sai_impl, is_npu, **kwargs): - ut_name = sai_switch_dependent_name(name, sai_impl, is_npu) - supports_static_listing = kwargs.pop("supports_static_listing", True) - cpp_unittest( - name = ut_name, - srcs = srcs, - supports_static_listing = supports_static_listing, - deps = [ - ":{}".format(sai_switch_dependent_name("manager_test_base", sai_impl, is_npu)), - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/state:state_utils", - "//fboss/agent/test:utils", - "//fboss/mka_service/if:mka_structs-cpp2-types", - ], - ) - -def _switch_manager_unittest(name, srcs, is_npu, **kwargs): - all_impls = get_all_impls_for(is_npu) - for sai_impl in all_impls: - if sai_impl.name != "fake": - continue - _switch_manager_unittest_impl(name, srcs, sai_impl, is_npu, **kwargs) - -def switch_manager_unittest(name, srcs, **kwargs): - _switch_manager_unittest(name, srcs, is_npu = True, **kwargs) - -def phy_switch_manager_unittest(name, srcs): - _switch_manager_unittest(name, srcs, is_npu = False) diff --git a/fboss/agent/hw/sai/tracer/run/run.bzl b/fboss/agent/hw/sai/tracer/run/run.bzl deleted file mode 100644 index a7fe0074a1d6d..0000000000000 --- a/fboss/agent/hw/sai/tracer/run/run.bzl +++ /dev/null @@ -1,28 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_IMPLS", "to_versions") - -def _sai_replayer_binary(sai_impl): - sai_impl_external_deps = [] - if sai_impl.name == "brcm": - sai_impl_external_deps = [("brcm-sai", None, "sai")] - elif sai_impl.name == "leaba": - sai_impl_external_deps = [("leaba-sdk", None, "sai-sdk")] - - return cpp_binary( - name = "sai_replayer-{}-{}".format(sai_impl.name, sai_impl.version), - srcs = [ - "Main.cpp", - "SaiLog.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - external_deps = [ - ("sai", None), - ("glibc", None, "rt"), - ] + sai_impl_external_deps, - ) - -def all_replayer_binaries(): - for sai_impl in SAI_IMPLS: - _sai_replayer_binary(sai_impl) diff --git a/fboss/agent/hw/sai/tracer/tracer.bzl b/fboss/agent/hw/sai/tracer/tracer.bzl deleted file mode 100644 index c9d8d1b087b88..0000000000000 --- a/fboss/agent/hw/sai/tracer/tracer.bzl +++ /dev/null @@ -1,77 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/bcm:wrapped_symbols.bzl", "wrapped_sai_symbols") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_IMPLS", "to_impl_external_deps", "to_impl_suffix", "to_versions") - -def _sai_api_tracer_impl(sai_impl): - sai_external_deps = to_impl_external_deps(sai_impl) - major, minor, release = sai_impl.sai_version.split(".") - pp_flags = [] if sai_impl.name == "fake" else [ - "-DSAI_API_VERSION=(100000 * ({}) + 1000 * ({}) + ({}))".format(major, minor, release), - ] - - cpp_library( - name = "sai_tracer{}".format(to_impl_suffix(sai_impl)), - srcs = [ - "AclApiTracer.cpp", - "ArsApiTracer.cpp", - "ArsProfileApiTracer.cpp", - "BridgeApiTracer.cpp", - "BufferApiTracer.cpp", - "CounterApiTracer.cpp", - "DebugCounterApiTracer.cpp", - "FdbApiTracer.cpp", - "HashApiTracer.cpp", - "HostifApiTracer.cpp", - "LagApiTracer.cpp", - "MacsecApiTracer.cpp", - "MirrorApiTracer.cpp", - "MplsApiTracer.cpp", - "NeighborApiTracer.cpp", - "NextHopApiTracer.cpp", - "NextHopGroupApiTracer.cpp", - "PortApiTracer.cpp", - "QosMapApiTracer.cpp", - "QueueApiTracer.cpp", - "RouteApiTracer.cpp", - "RouterInterfaceApiTracer.cpp", - "SaiTracer.cpp", - "SamplePacketApiTracer.cpp", - "SchedulerApiTracer.cpp", - "SwitchApiTracer.cpp", - "SystemPortApiTracer.cpp", - "TamApiTracer.cpp", - "TunnelApiTracer.cpp", - "UdfApiTracer.cpp", - "Utils.cpp", - "VirtualRouterApiTracer.cpp", - "VlanApiTracer.cpp", - "WredApiTracer.cpp", - ], - propagated_pp_flags = pp_flags, - linker_flags = ( - wrapped_sai_symbols - ), - undefined_symbols = True, - exported_deps = [ - "//fboss/agent:async_logger", - "//fboss/agent:fboss-error", - "//fboss/agent:fboss-types", - "//fboss/agent/hw/sai/api:sai_version", - "//fboss/agent/hw/sai/api:recursive_glob_headers", - "//fboss/agent/hw/sai/tracer/run:recursive_glob_headers", - "//fboss/lib:function_call_time_reporter", - "//fboss/lib:hw_write_behavior", - "//fboss/lib:tuple_utils", - "//folly:singleton", - ], - exported_external_deps = sai_external_deps + [ - ("boost", None, "boost_serialization"), - "glog", - "gflags", - ], - versions = to_versions(sai_impl), - ) - -def sai_tracer_apis(): - for sai_impls in SAI_IMPLS: - _sai_api_tracer_impl(sai_impls) diff --git a/fboss/agent/platforms/sai/platform.bzl b/fboss/agent/platforms/sai/platform.bzl deleted file mode 100644 index 0d7f7fcd1c9a7..0000000000000 --- a/fboss/agent/platforms/sai/platform.bzl +++ /dev/null @@ -1,303 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("@fbcode_macros//build_defs:custom_unittest.bzl", "custom_unittest") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_npu_impls", "get_all_phy_impls", "get_link_group_map", "to_impl_lib_name", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name", "sai_switch_lib_name") - -headers = [ - "SaiBcmDarwinPlatformPort.h", - "SaiBcmElbertPlatformPort.h", - "SaiBcmFujiPlatformPort.h", - "SaiBcmMinipackPlatformPort.h", - "SaiBcmWedge100PlatformPort.h", - "SaiBcmYampPlatformPort.h", - "SaiJanga800bicPlatformPort.h", - "SaiMeru400bfuPlatformPort.h", - "SaiMeru400biuPlatformPort.h", - "SaiMeru800biaPlatformPort.h", - "SaiMeru800bfaPlatformPort.h", - "SaiBcmMontblancPlatformPort.h", - "SaiMeru400biaPlatformPort.h", - "SaiMorgan800ccPlatformPort.h", - "SaiTahan800bcPlatformPort.h", -] - -common_srcs = [ - "SaiPlatform.cpp", - "SaiBcmPlatform.cpp", - "SaiBcmPlatformPort.cpp", - "SaiBcmWedge100Platform.cpp", - "SaiBcmWedge400Platform.cpp", - "SaiBcmWedge400PlatformPort.cpp", - "SaiBcmDarwinPlatform.cpp", - "SaiBcmElbertPlatform.cpp", - "SaiBcmMinipackPlatform.cpp", - "SaiBcmYampPlatform.cpp", - "SaiBcmFujiPlatform.cpp", - "SaiElbert8DDPhyPlatformPort.cpp", - "SaiFakePlatform.cpp", - "SaiFakePlatformPort.cpp", - "SaiJanga800bicPlatform.cpp", - "SaiJanga800bicPlatformPort.cpp", - "SaiPlatformPort.cpp", - "SaiPlatformInit.cpp", - "SaiWedge400CPlatform.cpp", - "SaiWedge400CPlatformPort.cpp", - "SaiTajoPlatform.cpp", - "SaiTajoPlatformPort.cpp", - "SaiCloudRipperPlatform.cpp", - "SaiCloudRipperPlatformPort.cpp", - "SaiMeru400biuPlatform.cpp", - "SaiMeru800biaPlatform.cpp", - "SaiMeru800bfaPlatform.cpp", - "SaiMeru400bfuPlatform.cpp", - "SaiMeru400biaPlatformPort.cpp", - "SaiMeru400biaPlatform.cpp", - "SaiBcmMontblancPlatform.cpp", - "SaiBcmMontblancPlatformPort.cpp", - "SaiMorgan800ccPlatformPort.cpp", - "SaiMorgan800ccPlatform.cpp", - "SaiTahan800bcPlatform.cpp", - "SaiTahan800bcPlatformPort.cpp", -] - -bcm_srcs = common_srcs + [ - "bcm/SaiBcmMinipackPlatform.cpp", - "bcm/SaiBcmPlatform.cpp", - "bcm/SaiBcmWedge100PlatformPort.cpp", - "facebook/SaiBcmMinipackPlatformPort.cpp", - "facebook/SaiBcmFujiPlatformPort.cpp", - "facebook/SaiBcmWedge400PlatformPort.cpp", - "facebook/SaiBcmDarwinPlatform.cpp", - "facebook/SaiBcmDarwinPlatformPort.cpp", - "facebook/SaiBcmYampPlatformPort.cpp", - "facebook/SaiBcmElbertPlatformPort.cpp", - "facebook/SaiMeru400biuPlatform.cpp", - "facebook/SaiMeru800biaPlatform.cpp", - "facebook/SaiMeru400bfuPlatform.cpp", - "facebook/SaiMeru800bfaPlatform.cpp", - "oss/SaiWedge400CPlatformPort.cpp", - "facebook/SaiMeru400biuPlatformPort.cpp", - "facebook/SaiMeru800biaPlatformPort.cpp", - "facebook/SaiMeru400bfuPlatformPort.cpp", - "facebook/SaiMeru800bfaPlatformPort.cpp", - "oss/SaiTajoPlatform.cpp", - "oss/SaiMeru400biaPlatform.cpp", - "oss/SaiMorgan800ccPlatformPort.cpp", -] - -fake_srcs = common_srcs + [ - "oss/SaiBcmMinipackPlatform.cpp", - "oss/SaiBcmPlatform.cpp", - "oss/SaiBcmMinipackPlatformPort.cpp", - "oss/SaiBcmFujiPlatformPort.cpp", - "oss/SaiBcmWedge100PlatformPort.cpp", - "oss/SaiBcmWedge400PlatformPort.cpp", - "oss/SaiBcmDarwinPlatform.cpp", - "oss/SaiBcmDarwinPlatformPort.cpp", - "oss/SaiBcmYampPlatformPort.cpp", - "oss/SaiBcmElbertPlatformPort.cpp", - "oss/SaiWedge400CPlatformPort.cpp", - "oss/SaiMeru400biuPlatform.cpp", - "oss/SaiMeru800biaPlatform.cpp", - "oss/SaiMeru400biuPlatformPort.cpp", - "oss/SaiMeru800biaPlatformPort.cpp", - "oss/SaiMeru400bfuPlatform.cpp", - "oss/SaiMeru800bfaPlatform.cpp", - "oss/SaiMeru400bfuPlatformPort.cpp", - "oss/SaiMeru800bfaPlatformPort.cpp", - "oss/SaiTajoPlatform.cpp", - "oss/SaiMeru400biaPlatform.cpp", - "oss/SaiMorgan800ccPlatformPort.cpp", -] - -tajo_srcs = common_srcs + [ - "oss/SaiBcmMinipackPlatform.cpp", - "facebook/SaiWedge400CPlatformPort.cpp", - "oss/SaiBcmPlatform.cpp", - "oss/SaiBcmMinipackPlatformPort.cpp", - "oss/SaiBcmFujiPlatformPort.cpp", - "oss/SaiBcmWedge100PlatformPort.cpp", - "oss/SaiBcmWedge400PlatformPort.cpp", - "oss/SaiBcmDarwinPlatform.cpp", - "oss/SaiBcmDarwinPlatformPort.cpp", - "oss/SaiBcmYampPlatformPort.cpp", - "oss/SaiBcmElbertPlatformPort.cpp", - "oss/SaiMeru400biuPlatform.cpp", - "oss/SaiMeru800biaPlatform.cpp", - "oss/SaiMeru800bfaPlatform.cpp", - "oss/SaiMeru400biuPlatformPort.cpp", - "oss/SaiMeru800biaPlatformPort.cpp", - "oss/SaiMeru800bfaPlatformPort.cpp", - "oss/SaiMeru400bfuPlatform.cpp", - "oss/SaiMeru400bfuPlatformPort.cpp", - "tajo/SaiTajoPlatform.cpp", - "oss/SaiMeru400biaPlatform.cpp", - "oss/SaiMorgan800ccPlatformPort.cpp", -] - -credo_srcs = [ - "elbert/SaiElbert8DDPhyPlatform.cpp", - "cloudripper/SaiCloudRipperPhyPlatform.cpp", -] - -# TODO(ccpowers): Eventually we should be able to split up phy platform -# sources based on the sai impl rather than including all phy sources -phy_srcs = bcm_srcs + credo_srcs - -def _get_srcs(sai_impl): - if not sai_impl: - return fake_srcs - if sai_impl.name == "brcm": - return bcm_srcs - if sai_impl.name == "leaba": - return tajo_srcs - if sai_impl.name == "credo": - return phy_srcs - return fake_srcs - -# sai_impl should match one of the names defined in sai/api/TARGETS -# Note: that TARGETS file has a comment explaining the design for the SAI -# library TARGETS. -def _sai_platform_lib(sai_impl, is_npu = True): - netwhoami_deps = [ - "//neteng/netwhoami/lib/cpp:recover", - ] - - return cpp_library( - name = "{}".format(sai_switch_dependent_name("sai_platform", sai_impl, is_npu)), - srcs = _get_srcs(sai_impl), - headers = headers, - versions = to_versions(sai_impl), - exported_deps = netwhoami_deps + [ - "//fboss/agent:handler", - "//fboss/agent/state:state", - "//fboss/lib/platforms:platform_mode", - "//fboss/lib/platforms:product-info", - "//fboss/agent/hw/sai/switch:{}".format(sai_switch_lib_name(sai_impl, is_npu)), - "//fboss/agent/hw/sai/switch:{}".format(sai_switch_dependent_name("thrift_handler", sai_impl, is_npu)), - "//fboss/agent/hw:hw_switch_warmboot_helper", - "//fboss/agent/hw/switch_asics:switch_asics", - "//fboss/agent/platforms/common/elbert:elbert_platform_mapping", - "//fboss/agent/platforms/common/fake_test:fake_test_platform_mapping", - "//fboss/agent/platforms/common/galaxy:galaxy_platform_mapping", - "//fboss/agent/platforms/common/wedge100:wedge100_platform_mapping", - "//fboss/agent/platforms/common/wedge40:wedge40_platform_mapping", - "//fboss/agent/platforms/common/wedge400c:wedge400c_platform_mapping", - "//fboss/agent/platforms/common/wedge400:wedge400_platform_mapping", - "//fboss/agent/platforms/common/wedge400:wedge400_platform_utils", - "//fboss/agent/platforms/common/darwin:darwin_platform_mapping", - "//fboss/agent/platforms/common/wedge400:wedge400_platform_utils", - "//fboss/agent/platforms/common/minipack:minipack_platform_mapping", - "//fboss/agent/platforms/common/yamp:yamp_platform_mapping", - "//fboss/agent/platforms/common/fuji:fuji_platform_mapping", - "//fboss/agent/platforms/common/elbert:elbert_platform_mapping", - "//fboss/agent/platforms/common/meru400biu:meru400biu_platform_mapping", - "//fboss/agent/platforms/common/meru400bfu:meru400bfu_platform_mapping", - "//fboss/agent/platforms/common/meru400bia:meru400bia_platform_mapping", - "//fboss/agent/platforms/common/montblanc:montblanc_platform_mapping", - "//fboss/agent/platforms/common/morgan800cc:morgan800cc_platform_mapping", - "//fboss/agent/hw/test:config_factory", - "//fboss/qsfp_service/lib:qsfp-service-client", - "//fboss/lib/config:fboss_config_utils", - "//fboss/agent/platforms/common/utils:wedge-led-utils", - "//fboss/agent/platforms/common/utils:bcm_yaml_config", - "//fboss/lib/fpga:wedge400_fpga", - "//fboss/lib/fpga/facebook/darwin:darwin_fpga", - "//fboss/lib/fpga/facebook/cloudripper:cloudripper_fpga", - "//fboss/lib/fpga/facebook/yamp:yamp_fpga", - "//fboss/agent/platforms/common/cloud_ripper:cloud_ripper_platform_mapping", - ], - ) - -def _versions(sai_impl): - versions = to_versions(sai_impl) - return versions - -def _wedge_agent_bin(sai_impl, is_npu): - wedge_agent_name = "wedge_agent{}".format(to_impl_suffix(sai_impl)) - sai_platform_name = sai_switch_dependent_name("sai_platform", sai_impl, is_npu) - return cpp_binary( - name = "{}".format(wedge_agent_name), - srcs = [ - "wedge_agent.cpp", - ], - linker_flags = [ - "--export-dynamic", - "--unresolved-symbols=ignore-all", - ], - link_group_map = get_link_group_map(wedge_agent_name, sai_impl), - auto_headers = AutoHeaders.SOURCES, - versions = _versions(sai_impl), - deps = [ - "//fboss/agent:monolithic_agent_initializer", - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - ":{}".format(sai_platform_name), - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - ], - ) - -def get_version_info_test_env(sai_impl): - test_env = {} - if sai_impl.is_dyn: - test_env["LD_LIBRARY_PATH"] = "third-party-buck/platform010-compat/build/{}/{}/lib/dyn".format(sai_impl.sdk_name, sai_impl.version) - return test_env - -def _wedge_agent_version_info_test(sai_impl, wedge_agent_name_prefix): - wedge_agent_name = "{}{}".format(wedge_agent_name_prefix, to_impl_suffix(sai_impl)) - sai_platform_name = sai_switch_dependent_name("sai_platform", sai_impl, True) - return custom_unittest( - name = "test-{}-version".format(wedge_agent_name), - command = [ - "fboss/lib/test/test_version.sh", - "$(exe_target :{})".format(wedge_agent_name), - ], - type = "simple", - versions = _versions(sai_impl) if sai_impl.name != "fake" else {}, - deps = [ - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - ":{}".format(sai_platform_name), - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - ], - env = get_version_info_test_env(sai_impl), - ) - -def _wedge_hwagent_bin(sai_impl, hwagent_prefix): - wedge_agent_name = "{}{}".format(hwagent_prefix, to_impl_suffix(sai_impl)) - sai_platform_name = sai_switch_dependent_name("sai_platform", sai_impl, True) - hw_bin_deps = [ - "//fboss/agent:hwagent-main", - "//fboss/agent/facebook:sai_version_{}".format(to_impl_lib_name(sai_impl)), - ":{}".format(sai_platform_name), - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/hw/sai/hw_test:{}".format(sai_switch_dependent_name("agent_hw_test_thrift_handler", sai_impl, True)), - ] - if sai_impl.name == "fake" or sai_impl.name == "leaba": - hw_bin_deps.append("//fboss/agent/platforms/sai:bcm-required-symbols") - return cpp_binary( - name = "{}".format(wedge_agent_name), - srcs = [ - "WedgeHwAgent.cpp", - "facebook/WedgeHwAgent.cpp", - ], - linker_flags = [ - "--export-dynamic", - "--unresolved-symbols=ignore-all", - ], - link_group_map = get_link_group_map(wedge_agent_name, sai_impl), - auto_headers = AutoHeaders.SOURCES, - versions = _versions(sai_impl), - deps = hw_bin_deps, - ) - -def all_wedge_agent_bins(): - for sai_impl in get_all_npu_impls(): - _sai_platform_lib(sai_impl, True) - _wedge_agent_bin(sai_impl, True) - _wedge_agent_version_info_test(sai_impl, "wedge_agent") - _wedge_agent_version_info_test(sai_impl, "fboss_hw_agent") - _wedge_hwagent_bin(sai_impl, "fboss_hw_agent") - - for sai_impl in get_all_phy_impls(): - _sai_platform_lib(sai_impl, False) diff --git a/fboss/agent/platforms/wedge/utils/utils.bzl b/fboss/agent/platforms/wedge/utils/utils.bzl deleted file mode 100644 index c25041c572fc6..0000000000000 --- a/fboss/agent/platforms/wedge/utils/utils.bzl +++ /dev/null @@ -1,52 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") - -def _get_oss_suffix(oss): - return "-oss" if oss else "" - -common_srcs = [] - -oss_srcs = [ - "oss/BcmLedUtils.cpp", -] - -facebook_srcs = [ - "facebook/BcmLedUtils.cpp", -] - -def _bcm_led_utils(oss): - srcs = [] - deps = [ - "//fboss/agent:fboss-error", - "//folly:range", - ] - external_deps = [] - if oss: - srcs = common_srcs + oss_srcs - external_deps = [ - "glog", - ] - else: - srcs = common_srcs + facebook_srcs - external_deps = [ - "glog", - ("broadcom-xgs-robo", None, "xgs_robo"), - ] - deps = deps + [ - "//fboss/agent/platforms/common/utils:wedge-led-utils", - ] - oss_suffix = _get_oss_suffix(oss) - return cpp_library( - name = "bcm-led-utils{}".format(oss_suffix), - srcs = srcs, - auto_headers = AutoHeaders.SOURCES, - headers = [ - "BcmLedUtils.h", - ], - exported_deps = deps, - exported_external_deps = external_deps, - ) - -def bcm_led_utils(): - for oss in [True, False]: - _bcm_led_utils(oss) diff --git a/fboss/agent/sai.bzl b/fboss/agent/sai.bzl deleted file mode 100644 index 2138f202216bf..0000000000000 --- a/fboss/agent/sai.bzl +++ /dev/null @@ -1,20 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_IMPLS", "to_impl_lib_name") - -def sai_main_all(): - for sai_impls in SAI_IMPLS: - cpp_library( - name = "main-sai-{}".format(to_impl_lib_name(sai_impls)), - srcs = [ - "Main.cpp", - "facebook/Main.cpp", - ], - exported_deps = [ - ":agent_initializer_h", - ":fboss_common_init", - ":fboss_init", - "//common/init:init", - "//fboss/agent/facebook:sai_version_{}".format(to_impl_lib_name(sai_impls)), - "//folly/logging:init", - ], - ) diff --git a/fboss/agent/test/integration_tests/integration_tests.bzl b/fboss/agent/test/integration_tests/integration_tests.bzl deleted file mode 100644 index 233612d54f886..0000000000000 --- a/fboss/agent/test/integration_tests/integration_tests.bzl +++ /dev/null @@ -1,58 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_impls_for", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name") - -def _sai_integration_test_binary(sai_impl): - impl_suffix = to_impl_suffix(sai_impl) - test_deps = [ - "//fboss/agent/test/integration_tests:agent_integration_test", - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:sai_ecmp_utils{}".format(impl_suffix), - "//fboss/agent:main-bcm", - "//folly/io/async:async_signal_handler", - "//fboss/agent/test:agent_integration_test_base", - ] - if sai_impl.name == "fake" or sai_impl.name == "leaba": - test_deps.append("//fboss/agent/platforms/sai:bcm-required-symbols") - return cpp_binary( - name = "sai_agent_integration_test-{}-{}".format(sai_impl.name, sai_impl.version), - srcs = [ - "SaiAgentIntegrationTests.cpp", - ], - deps = test_deps, - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - ) - -def _sai_te_integration_test_binary(sai_impl): - impl_suffix = to_impl_suffix(sai_impl) - test_deps = [ - "//fboss/agent/test/integration_tests:te_agent_integration_test", - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:sai_ecmp_utils{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_teflow_utils{}".format(impl_suffix), - "//fboss/agent:main-bcm", - "//folly/io/async:async_signal_handler", - "//fboss/agent/test:agent_integration_test_base", - ] - if sai_impl.name == "fake" or sai_impl.name == "leaba": - test_deps.append("//fboss/agent/platforms/sai:bcm-required-symbols") - return cpp_binary( - name = "sai_te_agent_integration_test-{}-{}".format(sai_impl.name, sai_impl.version), - srcs = [ - "SaiAgentIntegrationTests.cpp", - ], - deps = test_deps, - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - ) - -def all_sai_integration_test_binaries(): - for sai_impl in get_all_impls_for(True): - _sai_integration_test_binary(sai_impl) - _sai_te_integration_test_binary(sai_impl) diff --git a/fboss/agent/test/link_tests/link_tests.bzl b/fboss/agent/test/link_tests/link_tests.bzl deleted file mode 100644 index dec4e018b1453..0000000000000 --- a/fboss/agent/test/link_tests/link_tests.bzl +++ /dev/null @@ -1,62 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_impls_for", "get_link_group_map", "to_impl_lib_name", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name") - -TEST_BINARY_MODES = ["legacy", "mono", "multi"] - -def _sai_link_test_binary(sai_impl, mode): - impl_suffix = to_impl_suffix(sai_impl) - test_deps = [ - "//folly/logging:init", - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:sai_port_utils{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_ecmp_utils{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_fabric_utils{}".format(impl_suffix), - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/hw/sai/hw_test:sai_packet_trap_helper{}".format(impl_suffix), - ] - if sai_impl.name == "fake" or sai_impl.name == "leaba": - test_deps.append("//fboss/agent/platforms/sai:bcm-required-symbols") - - if mode == "mono": - agent_hw_test_thrift_handler = sai_switch_dependent_name("agent_hw_test_thrift_handler", sai_impl, True) - test_deps.append("//fboss/agent/test/link_tests:agent_ensemble_link_tests") - test_deps.append("//fboss/agent/hw/sai/hw_test:{}".format(agent_hw_test_thrift_handler)) - test_deps.append("//fboss/agent/test:mono_agent_ensemble") - name = "sai_mono_link_test-{}-{}".format(sai_impl.name, sai_impl.version) - srcs = [ - "SaiMonoLinkTest.cpp", - ] - elif mode == "multi": - test_deps.append("//fboss/agent/test/link_tests:agent_ensemble_link_tests") - test_deps.append("//fboss/agent/test:multi_switch_agent_ensemble") - name = "sai_multi_switch_link_test-{}-{}".format(sai_impl.name, sai_impl.version) - srcs = ["SaiMultiSwitchLinkTest.cpp"] - else: - # default case from before - test_deps.append("//fboss/agent/test/link_tests:link_tests") - name = "sai_link_test-{}-{}".format(sai_impl.name, sai_impl.version) - srcs = [ - "SaiLinkTest.cpp", - ] - - return cpp_binary( - name = name, - srcs = srcs, - linker_flags = [ - "--export-dynamic", - "--unresolved-symbols=ignore-all", - ] if sai_impl.name == "leaba" else [], - link_group_map = get_link_group_map(name, sai_impl), - deps = test_deps, - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - ) - -def all_sai_link_test_binaries(): - for mode in TEST_BINARY_MODES: - for sai_impl in get_all_impls_for(True): - _sai_link_test_binary(sai_impl, mode) diff --git a/fboss/build/fbpkg.bzl b/fboss/build/fbpkg.bzl deleted file mode 100644 index b9674346b1272..0000000000000 --- a/fboss/build/fbpkg.bzl +++ /dev/null @@ -1,22 +0,0 @@ -load("//antlir/bzl:structs.bzl", "structs") -load("//fbpkg:fbpkg.bzl", "fbpkg") - -# Helpers to standardize our fbpkg structures - -# For each buck mode, creates an fbpkg target .. Opt packages will not have the mode appended, -# as they are assumed default. Restricting to add debuginfo only for opt packages to save on build times -def fboss_fbpkg_builder(name, buck_modes = None, split_debuginfo = True, buck_opts = None, **kwargs): - kwargs.setdefault("expire_days", 20) - buck_opts_dict = structs.to_dict(buck_opts) if buck_opts else {} - if not buck_modes: - buck_modes = ["opt"] - for mode in buck_modes: - buck_opts_dict["mode"] = mode - is_opt = mode == "opt" - full_name = name if is_opt else "{}.{}".format(name, mode) - fbpkg.builder( - name = full_name, - buck_opts = struct(**buck_opts_dict), - split_debuginfo = split_debuginfo, - **kwargs - ) diff --git a/fboss/build/sdk.bzl b/fboss/build/sdk.bzl deleted file mode 100644 index 9b8361c5ad9f8..0000000000000 --- a/fboss/build/sdk.bzl +++ /dev/null @@ -1,302 +0,0 @@ -load("//fboss/build:sdk.thrift.bzl", "FbossSdk", "ProductLine", "SdkStage") - -# All definitions in this file should be kept in sync with configerator/source/neteng/fboss/fbcode_sdk.cinc - -def FakeSdk(version, sai_version): - return FbossSdk( - name = "fake", - product_line = ProductLine.FAKE_SDK, - product_name = "fake", - sai_version = sai_version, - stage = SdkStage.DEV, - version = version, - ) - -def NativeBcmSdk(version, stage): - return FbossSdk( - name = "broadcom-xgs-robo", - is_sai = False, - product_line = ProductLine.BCM_NATIVE_SDK, - product_name = "native_bcm", - sai_version = None, - stage = stage, - version = version, - ) - -def SaiBrcmSdk(version, sai_version, stage, native_bcm_sdk_version): - return FbossSdk( - name = "brcm-sai", - native_bcm_sdk_version = native_bcm_sdk_version, - product_line = ProductLine.SAI_SDK_BCM, - product_name = "brcm", - sai_version = sai_version, - stage = stage, - version = version, - ) - -def SaiBrcmSimSdk(version, sai_version): - return FbossSdk( - name = "brcm-sai", - is_sim = True, - product_line = ProductLine.SAI_SDK_BCM, - product_name = "brcm", - sai_version = sai_version, - stage = SdkStage.TEST, - version = version, - ) - -def SaiBrcmDsfSdk(version, sai_version, stage, fw_path, native_bcm_sdk_version): - return FbossSdk( - name = "brcm-sai", - fw_path = fw_path, - native_bcm_sdk_version = native_bcm_sdk_version, - product_line = ProductLine.BCM_DSF_SDK, - product_name = "brcm", - sai_version = sai_version, - stage = stage, - version = version, - ) - -def SaiBrcmDsfSimSdk(version, sai_version): - return FbossSdk( - name = "brcm-sai", - is_sim = True, - product_line = ProductLine.BCM_DSF_SDK, - product_name = "brcm", - sai_version = sai_version, - stage = SdkStage.TEST, - version = version, - ) - -def SaiLeabaSdk(version, sai_version, stage, fw_path, is_dyn = False): - return FbossSdk( - name = "leaba-sdk", - fw_path = fw_path, - is_dyn = is_dyn, - product_line = ProductLine.LEABA, - product_name = "leaba", - sai_version = sai_version, - stage = stage, - version = version, - ) - -def SaiCredoSdk(version, sai_version, stage): - return FbossSdk( - name = "CredoB52SAI", - is_npu = False, - product_line = ProductLine.CREDO_SAI_SDK, - product_name = "credo", - sai_version = sai_version, - stage = stage, - version = version, - ) - -def NativeMillenioSdk(version, stage): - return FbossSdk( - name = "broadcom-plp-millenio", - is_npu = False, - is_sai = False, - product_line = ProductLine.MILLENIO_SDK, - product_name = "millenio", - sai_version = None, - stage = stage, - version = version, - ) - -def NativeBarchettaSdk(version, stage): - return FbossSdk( - name = "broadcom-plp-barchetta2", - is_npu = False, - is_sai = False, - product_line = ProductLine.BARCHETTA2_SDK, - product_name = "barchetta2", - sai_version = None, - stage = stage, - version = version, - ) - -def filter(f, arr): - return [v for v in arr if f(v)] - -def filter_sdks_by_name(sdks: list, names: list[str]) -> list: - return filter(lambda sdk: sdk.name in names, sdks) - -def filter_sdks_by_stage(sdks: list, stages: list) -> list: - return filter(lambda sdk: sdk.stage in stages, sdks) - -def filter_sdks_by_product_line(sdks: list, product_lines: list) -> list: - return filter(lambda sdk: sdk.product_line in product_lines, sdks) - -def filter_sdks_by_sim(sdks: list, is_sim: bool) -> list: - return filter(lambda sdk: sdk.is_sim == is_sim, sdks) - -def filter_sdks( - names: list[str] | None = None, - stages: list | None = None, - product_lines: list | None = None, - is_sim: bool = False) -> list: - sdks = ALL_SDKS - if names: - sdks = filter_sdks_by_name(sdks, names) - if product_lines: - sdks = filter_sdks_by_product_line(sdks, product_lines) - if stages: - sdks = filter_sdks_by_stage(sdks, stages) - - # Majority of the time we want to filter sim sdks out, so default to that - sdks = filter_sdks_by_sim(sdks, is_sim) - return list(sdks) - -def get_buildable_sdks(product_lines: list, is_sim: bool = False): - stages = [SdkStage.DEV, SdkStage.TEST, SdkStage.CANARY, SdkStage.COLDBOOT_CANARY, SdkStage.PRODUCTION, SdkStage.PRODUCTION_END] - return filter_sdks(product_lines = product_lines, stages = stages, is_sim = is_sim) - -def get_fbpkg_sdks(product_lines): - FBPKG_STAGES = [SdkStage.TEST, SdkStage.COLDBOOT_CANARY, SdkStage.CANARY, SdkStage.PRODUCTION, SdkStage.PRODUCTION_END] - return filter_sdks(is_sim = False, product_lines = product_lines, stages = FBPKG_STAGES) - -ALL_SDKS = [ - # Native Bcm - NativeBcmSdk( - stage = SdkStage.PRODUCTION, - version = "6.5.26-1", - ), - NativeBcmSdk( - stage = SdkStage.TEST, - version = "6.5.28-1", - ), - NativeBcmSdk( - stage = SdkStage.DEV, - version = "6.5.29-1", - ), - NativeBcmSdk( - stage = SdkStage.NO_STAGE, - version = "6.5.30-3", - ), - # Fake - FakeSdk( - sai_version = "1.14.0", - version = "1.14.0", - ), - # Brcm sai - SaiBrcmSdk( - native_bcm_sdk_version = "6.5.26", - sai_version = "1.11.0", - stage = SdkStage.PRODUCTION, - version = "8.2.0.0_odp", - ), - SaiBrcmSdk( - native_bcm_sdk_version = "6.5.28", - sai_version = "1.12.0", - stage = SdkStage.CANARY, - version = "9.2.0.0_odp", - ), - SaiBrcmSdk( - native_bcm_sdk_version = "6.5.29", - sai_version = "1.12.0", - stage = SdkStage.DEV, - version = "10.0_ea_odp", - ), - SaiBrcmSdk( - native_bcm_sdk_version = "6.5.29", - sai_version = "1.13.2", - stage = SdkStage.COLDBOOT_CANARY, - version = "10.2.0.0_odp", - ), - SaiBrcmSdk( - native_bcm_sdk_version = "6.5.30", - sai_version = "1.14.0", - stage = SdkStage.DEV, - version = "11.0_ea_odp", - ), - SaiBrcmSdk( - native_bcm_sdk_version = "6.5.30", - sai_version = "1.14.0", - stage = SdkStage.DEV, - version = "11.3.0.0_odp", - ), - # Brcm sai sim - SaiBrcmSimSdk( - sai_version = "1.11.0", - version = "8.2.0.0_sim_odp", - ), - SaiBrcmSimSdk( - sai_version = "1.12.0", - version = "9.0_ea_sim_odp", - ), - SaiBrcmSimSdk( - sai_version = "1.12.0", - version = "10.0_ea_sim_odp", - ), - SaiBrcmDsfSimSdk( - sai_version = "1.12.0", - version = "10.0_ea_dnx_sim_odp", - ), - # DNX - SaiBrcmDsfSdk( - fw_path = "../third-party/tp2/broadcom-xgs-robo/6.5.30_dnx/hsdk-all-6.5.30/tools/sand/db/", - native_bcm_sdk_version = "6.5.30_dnx", - sai_version = "1.14.0", - stage = SdkStage.TEST, - version = "11.3.0.0_dnx_odp", - ), - SaiBrcmDsfSdk( - fw_path = "../third-party/tp2/broadcom-xgs-robo/6.5.31_dnx/hsdk-all-6.5.31/tools/sand/db/", - native_bcm_sdk_version = "6.5.31_dnx", - sai_version = "1.14.0", - stage = SdkStage.TEST, - version = "12.0_ea_dnx_odp", - ), - # Leaba - SaiLeabaSdk( - fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/1.42.8/res", - sai_version = "1.7.4", - stage = SdkStage.PRODUCTION, - version = "1.42.8", - ), - SaiLeabaSdk( - fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/24.4.90/res", - is_dyn = True, - sai_version = "1.13.0", - stage = SdkStage.DEV, - version = "24.4.90", - ), - SaiLeabaSdk( - fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/24.4.90_yuba/res", - sai_version = "1.13.0", - stage = SdkStage.DEV, - version = "24.4.90_yuba", - ), - SaiLeabaSdk( - fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/24.7.0_yuba/res", - sai_version = "1.13.0", - stage = SdkStage.DEV, - version = "24.7.0_yuba", - ), - SaiLeabaSdk( - fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/24.8.3001/res", - is_dyn = True, - sai_version = "1.13.0", - stage = SdkStage.DEV, - version = "24.8.3001", - ), - # Phy - SaiCredoSdk( - sai_version = "1.8.1", - stage = SdkStage.PRODUCTION, - version = "0.7.2", - ), - SaiCredoSdk( - sai_version = "1.11.0", - stage = SdkStage.TEST, - version = "0.8.4", - ), - NativeMillenioSdk( - stage = SdkStage.PRODUCTION, - version = "5.5", - ), - NativeBarchettaSdk( - stage = SdkStage.PRODUCTION, - version = "5.2", - ), -] diff --git a/fboss/build/sdk.thrift.bzl b/fboss/build/sdk.thrift.bzl deleted file mode 100644 index 55bb59d06bbd9..0000000000000 --- a/fboss/build/sdk.thrift.bzl +++ /dev/null @@ -1,58 +0,0 @@ -# Mirror of defs in configerator/source/neteng/fboss/thrift/sdk.thrift -SdkStage = struct( - NO_STAGE = 0, - DEV = 1, - TEST = 2, - CANARY = 3, - PRODUCTION = 4, - PRODUCTION_END = 5, - COLDBOOT_CANARY = 6, -) - -ProductLine = struct( - PRODUCT_LINE_NONE = 0, - BCM_NATIVE_SDK = 1, - BCM_SDK_FOR_SAI = 2, # The BCM SDK to support SAI, - SAI_SDK_BCM = 3, # The SAI SDK from Broadcom - LEABA = 4, # The Leaba SDK from Cisco - BCM_NATIVE_SDK_TH4 = 5, # The Bcm SDK for TH4 - LEABA_DSF_SDK = 6, # DSF SDK from Cisco - BCM_DSF_SDK = 7, # DSF SDK Bcm - CREDO_SAI_SDK = 8, # Credo SAI SDK - MILLENIO_SDK = 9, # Millenio native SDK - BARCHETTA2_SDK = 10, # Barchetta2 native SDK - FAKE_SDK = 11, # Fake SDK - MRVL_SAI_SDK = 12, -) - -def FbossSdk( - product_name, - product_line, - name, - version, - sai_version, - stage, - is_npu = True, - is_sai = True, - is_sim = False, - is_dyn = False, - fw_path = None, - native_bcm_sdk_version = None): - return struct( - # name in sdk.cconf is the sdk_name, so renaming fields here for now - name = product_name, - sdk_name = name, - version = version, - sai_version = sai_version, - is_sai = is_sai, - is_npu = is_npu, - stage = stage, - is_sim = is_sim, - is_dyn = is_dyn, - product_line = product_line, - fw_path = fw_path, - native_bcm_sdk_version = native_bcm_sdk_version, - - # fields only used in fbcode and not mirrored in thrift - major_version = version.split("-")[0], - ) diff --git a/fboss/lib/phy/sai_phy_management.bzl b/fboss/lib/phy/sai_phy_management.bzl deleted file mode 100644 index 3b75deb874204..0000000000000 --- a/fboss/lib/phy/sai_phy_management.bzl +++ /dev/null @@ -1,34 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_PHY_IMPLS", "to_sdk_suffix", "to_versions") - -_CREDO_SRCS = [ - "facebook/credo/cloudripper/CloudRipperPhyManager.cpp", - "facebook/credo/elbert/ElbertPhyManager.cpp", -] - -_ALL_SRCS = _CREDO_SRCS - -def _get_srcs(): - # TODO: actually split up sources once we support doing so - return _ALL_SRCS - -def _sai_phy_management_lib(sai_impl): - impl_suffix = to_sdk_suffix(sai_impl) - return cpp_library( - name = "sai-phy-management{}".format(impl_suffix), - srcs = _get_srcs() + [ - "SaiPhyManager.cpp", - ], - headers = [ - "SaiPhyManager.h", - ], - versions = to_versions(sai_impl), - exported_deps = [ - "//fboss/lib/phy/facebook:sai_xphy{}".format(impl_suffix), - "//fboss/lib/phy/facebook/credo:recursive_glob_headers", # @manual - ], - ) - -def all_sai_phy_management_libs(): - for sai_impl in SAI_PHY_IMPLS: - _sai_phy_management_lib(sai_impl) diff --git a/fboss/lib/test/benchmarks/hw_benchmarks.bzl b/fboss/lib/test/benchmarks/hw_benchmarks.bzl deleted file mode 100644 index 6b4e03e9c5c54..0000000000000 --- a/fboss/lib/test/benchmarks/hw_benchmarks.bzl +++ /dev/null @@ -1,30 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") - -def hw_benchmark_lib(name, srcs, extra_deps = None): - extra_deps = extra_deps if extra_deps else [] - return cpp_library( - name = name, - srcs = srcs, - # Don't drop the benchmark functions they will be needed - # in the final benchmark run - link_whole = True, - # Ensemble will be linked in by particular HwSwitch - # implementations - undefined_symbols = True, - exported_deps = extra_deps + [ - "//fboss/lib/test/benchmarks:hw_benchmark_main", - "//folly:dynamic", - "//folly:json", - ], - ) - -def hw_benchmark_binary(name, srcs, extra_deps = None): - extra_deps = extra_deps if extra_deps else [] - return cpp_binary( - name = name, - srcs = srcs, - deps = extra_deps + [ - "//fboss/lib/test/benchmarks:hw_benchmark_main", - ], - ) diff --git a/fboss/platform/BUILD_MODE.bzl b/fboss/platform/BUILD_MODE.bzl deleted file mode 100644 index 09b603dc92448..0000000000000 --- a/fboss/platform/BUILD_MODE.bzl +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2004-present, Facebook, Inc. - -""" build mode definitions for fboss/platform """ - -load("@fbcode_macros//build_defs:create_build_mode.bzl", "create_build_mode") - -_extra_asan_options = { - "detect_leaks": "1", -} - -_mode = create_build_mode( - asan_options = _extra_asan_options, -) - -_modes = { - "dbg": _mode, - "dbgo": _mode, - "dev": _mode, - "opt": _mode, -} - -def get_modes(): - """ Return modes for this hierarchy """ - return _modes diff --git a/fboss/qsfp_service/platforms/wedge/platform.bzl b/fboss/qsfp_service/platforms/wedge/platform.bzl deleted file mode 100644 index eaf03de5cc81b..0000000000000 --- a/fboss/qsfp_service/platforms/wedge/platform.bzl +++ /dev/null @@ -1,109 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_PHY_IMPLS", "to_sdk_suffix", "to_versions") - -COMMON_SRCS = [ - "GalaxyManager.cpp", - "QsfpRestClient.cpp", - "Wedge100Manager.cpp", - "Wedge40Manager.cpp", - "WedgeManager.cpp", - "WedgeManagerInit.cpp", - "BspWedgeManager.cpp", -] - -OSS_SRCS = COMMON_SRCS + [ - "oss/WedgeManagerInit.cpp", - "oss/Wedge400CManager.cpp", -] - -CLOSED_SRCS = COMMON_SRCS + [ - "facebook/DarwinManager.cpp", - "facebook/FujiManager.cpp", - "facebook/Minipack16QManager.cpp", - "facebook/Wedge400CManager.cpp", - "facebook/Wedge400Manager.cpp", - "facebook/WedgeManagerInit.cpp", - "facebook/YampManager.cpp", -] - -CREDO_SRCS = CLOSED_SRCS + [ - "facebook/CloudRipperManager.cpp", - "facebook/ElbertMacsecHandler.cpp", - "facebook/ElbertManager.cpp", -] - -COMMON_DEPS = [ - "//fboss/agent/platforms/common/galaxy:galaxy_platform_mapping", - "//fboss/agent/platforms/common/wedge100:wedge100_platform_mapping", - "//fboss/agent/platforms/common/wedge40:wedge40_platform_mapping", - "//fboss/lib/bsp:bsp_core", - "//fboss/lib/platforms:product-info", - "//fboss/mka_service/handlers:macsec_handler", - "//fboss/qsfp_service:qsfp-config", - "//folly/gen:base", - "//fboss/lib/bsp/meru400bfu:meru400bfu_bsp", - "//fboss/lib/bsp/meru400bia:meru400bia_bsp", - "//fboss/lib/bsp/meru400biu:meru400biu_bsp", - "//fboss/lib/bsp/montblanc:montblanc_bsp", - "//fboss/lib/bsp/morgan800cc:morgan800cc_bsp", -] - -CLOSED_DEPS = COMMON_DEPS + [ - "//fboss/agent/platforms/common/darwin:darwin_platform_mapping", - "//fboss/agent/platforms/common/elbert:elbert_platform_mapping", - "//fboss/agent/platforms/common/fuji:fuji_platform_mapping", - "//fboss/agent/platforms/common/minipack:minipack_platform_mapping", - "//fboss/agent/platforms/common/wedge400:wedge400_platform_mapping", - "//fboss/agent/platforms/common/wedge400:wedge400_platform_utils", - "//fboss/agent/platforms/common/wedge400c:wedge400c_platform_mapping", - "//fboss/agent/platforms/common/yamp:yamp_platform_mapping", - "//fboss/lib/fpga/facebook/fuji:fuji_container", - "//fboss/lib/phy:phy-management", - "//fboss/qsfp_service/fsdb:fsdb-syncer", -] - -def _get_srcs(sai_impl): - if sai_impl.name == "credo": - return CREDO_SRCS - else: - # TODO: split up srcs based on sai impl - return CREDO_SRCS - -def _sai_platform_lib(sai_impl): - impl_suffix = to_sdk_suffix(sai_impl) - - return cpp_library( - name = "wedge-platform{}".format(impl_suffix), - srcs = _get_srcs(sai_impl), - headers = [ - "FbossMacsecHandler.h", - "QsfpRestClient.h", - "WedgeManager.h", - "Wedge400CManager.h", - "facebook/credo_stub.h", - ], - versions = to_versions(sai_impl), - exported_deps = CLOSED_DEPS + [ - ":wedge-transceiver", - "//fboss/agent:core", - "//fboss/lib/phy:sai-phy-management{}".format(impl_suffix), - "//fboss/qsfp_service:transceiver-manager", - "//fboss/qsfp_service/module:qsfp-module", - "//fboss/lib/fpga/facebook/cloudripper:cloudripper_i2c", - "//fboss/lib/fpga/facebook/darwin:darwin_i2c", - "//fboss/lib/fpga/facebook/elbert:elbert_i2c", - "//fboss/lib/fpga:wedge400_i2c", - "//fboss/lib/fpga/facebook/yamp:yamp_i2c", - "//fboss/lib/i2c/facebook/fuji:fuji_i2c", - "//fboss/lib:rest-client", - "//folly:network_address", - ], - exported_external_deps = [ - "boost", - ("boost", None, "boost_container"), - ], - ) - -def all_platform_libs(): - for sai_impl in SAI_PHY_IMPLS: - _sai_platform_lib(sai_impl) diff --git a/fboss/qsfp_service/qsfp_service.bzl b/fboss/qsfp_service/qsfp_service.bzl deleted file mode 100644 index 9c3ee42318fd7..0000000000000 --- a/fboss/qsfp_service/qsfp_service.bzl +++ /dev/null @@ -1,71 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss:THIRD-PARTY-VERSIONS.bzl", "to_versions") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_PHY_IMPLS", "get_all_native_phy_impls", "to_impl_lib_name", "to_sdk_suffix") - -def _qsfp_core_lib(impl): - impl_suffix = to_sdk_suffix(impl) - deps = [ - ":handler", - ":stats", - "//common/services/cpp:acl_checker_module", - "//common/services/cpp:build_module", - "//common/services/cpp:fb303_module", - "//common/services/cpp:thrift_stats_module", - "//fb303:logging", - "//folly/experimental:function_scheduler", - "//folly/io/async:async_signal_handler", - "//fboss/qsfp_service/platforms/wedge:wedge-platform{}".format(impl_suffix), - ] - - if impl in SAI_PHY_IMPLS: - deps.extend(["//fboss/agent/facebook:sai_version_{}".format(to_impl_lib_name(impl))]) - return cpp_library( - name = "core{}".format(impl_suffix), - srcs = [ - "facebook/QsfpServer.cpp", - "QsfpServer.cpp", - "QsfpServiceSignalHandler.cpp", - ], - headers = [ - "QsfpServer.h", - ], - undefined_symbols = True, # TODO(T23121628): fix deps and remove - versions = to_versions(impl), - exported_deps = deps, - ) - -def _qsfp_service_binary(impl, versions): - impl_suffix = to_sdk_suffix(impl) - - # for now, use default SAI impl for core if using native SDK - core_suffix = impl_suffix if impl in SAI_PHY_IMPLS else "-default" - deps = [ - ":core{}".format(core_suffix), - "//fboss/qsfp_service/fsdb:fsdb-syncer", - "//fboss/fsdb/common:flags", - ] - return cpp_binary( - name = "qsfp_service{}".format(impl_suffix), - srcs = [ - "Main.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - versions = versions, - preprocessor_flags = [], - deps = deps, - ) - -def all_qsfp_core_libs(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _qsfp_core_lib(sai_impl) - -def all_qsfp_service_binaries(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _qsfp_service_binary(sai_impl, to_versions(sai_impl)) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _qsfp_service_binary(impl, to_versions(impl)) diff --git a/fboss/qsfp_service/test/benchmarks/bench_test.bzl b/fboss/qsfp_service/test/benchmarks/bench_test.bzl deleted file mode 100644 index d36ae17346e80..0000000000000 --- a/fboss/qsfp_service/test/benchmarks/bench_test.bzl +++ /dev/null @@ -1,91 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_PHY_IMPLS", "get_all_native_phy_impls", "to_sdk_suffix", "to_versions") - -def _hw_bench_utils_lib(sai_impl): - impl_suffix = to_sdk_suffix(sai_impl) - - # for now, use default SAI impl for core if using native SDK - core_suffix = impl_suffix if (sai_impl.sai_version != None) else "-default" - return cpp_library( - name = "hw_bench_utils{}".format(impl_suffix), - srcs = [ - "HwBenchmarkUtils.cpp", - ], - headers = [ - "HwBenchmarkUtils.h", - ], - versions = to_versions(sai_impl), - exported_deps = [ - "//fboss/lib:common_utils", - "//folly:benchmark", - "//fboss/qsfp_service:core{}".format(core_suffix), - "//fboss/qsfp_service/platforms/wedge:wedge-platform{}".format(core_suffix), - ], - ) - -def _qsfp_bench_test_lib(impl): - impl_suffix = to_sdk_suffix(impl) - - # for now, use default SAI impl for core if using native SDK - core_suffix = impl_suffix if (impl.sai_version != None) else "-default" - return cpp_library( - name = "qsfp_bench_test_lib-{}-{}".format(impl.name, impl.version), - srcs = [ - "PhyInitBenchmark.cpp", - "ReadWriteRegisterBenchmark.cpp", - "RefreshTcvrBenchmark.cpp", - "UpdateXphyStatsBenchmark.cpp", - ], - link_whole = True, - undefined_symbols = True, - versions = to_versions(impl), - exported_deps = [ - "//folly:benchmark", - ":hw_bench_utils{}".format(impl_suffix), - "//fboss/qsfp_service/platforms/wedge:wedge-platform{}".format(core_suffix), - ], - ) - -def _hw_qsfp_bench_test(impl, versions): - impl_suffix = to_sdk_suffix(impl) - - # for now, use default SAI impl for core if using native SDK - core_suffix = impl_suffix if (impl.sai_version != None) else "-default" - return cpp_binary( - name = "qsfp_bench_test-{}-{}".format(impl.name, impl.version), - srcs = [ - ], - auto_headers = AutoHeaders.SOURCES, - versions = versions, - deps = [ - "//fboss/lib/test/benchmarks:hw_benchmark_main", - "//fboss/qsfp_service/platforms/wedge:wedge-platform{}".format(core_suffix), - "//fboss/qsfp_service/test/benchmarks:qsfp_bench_test_lib-{}-{}".format(impl.name, impl.version), - ], - ) - -def all_hw_bench_utils_libs(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _hw_bench_utils_lib(sai_impl) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _hw_bench_utils_lib(impl) - -def all_qsfp_bench_test_libs(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _qsfp_bench_test_lib(sai_impl) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _qsfp_bench_test_lib(impl) - -def all_hw_qsfp_bench_test_binaries(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _hw_qsfp_bench_test(sai_impl, to_versions(sai_impl)) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _hw_qsfp_bench_test(impl, to_versions(impl)) diff --git a/fboss/qsfp_service/test/hw_test/hw_test.bzl b/fboss/qsfp_service/test/hw_test/hw_test.bzl deleted file mode 100644 index 4b25ef989a1e7..0000000000000 --- a/fboss/qsfp_service/test/hw_test/hw_test.bzl +++ /dev/null @@ -1,117 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_PHY_IMPLS", "get_all_native_phy_impls", "to_sdk_suffix", "to_versions") - -def _hw_qsfp_ensemble_lib(sai_impl): - impl_suffix = to_sdk_suffix(sai_impl) - - # for now, use default SAI impl for core if using native SDK - core_suffix = impl_suffix if (sai_impl.sai_version != None) else "-default" - return cpp_library( - name = "hw_qsfp_ensemble{}".format(impl_suffix), - srcs = [ - "HwQsfpEnsemble.cpp", - ], - headers = [ - "HwQsfpEnsemble.h", - ], - versions = to_versions(sai_impl), - exported_deps = [ - "//fboss/agent/platforms/common:platform_mapping", - "//fboss/agent/test:resourcelibutil", - "//fboss/lib/fpga:multi_pim_container", - "//fboss/lib/phy:phy_management_base", - "//fboss/qsfp_service:core{}".format(core_suffix), - "//fboss/qsfp_service/platforms/wedge:wedge-platform{}".format(core_suffix), - ], - ) - -def _qsfp_hw_test_lib(sai_impl): - impl_suffix = to_sdk_suffix(sai_impl) - return cpp_library( - name = "hw_qsfp_test_lib-{}-{}".format(sai_impl.name, sai_impl.version), - srcs = [ - "EmptyHwTest.cpp", - "HwXphyFirmwareTest.cpp", - "HwMacsecTest.cpp", - "HwPimTest.cpp", - "HwPortProfileTest.cpp", - "HwPortUtils.cpp", - "HwTransceiverConfigTest.cpp", - "HwStatsCollectionTest.cpp", - "HwTest.cpp", - "HwTransceiverResetTest.cpp", - "facebook/HwTransceiverThermalDataTest.cpp", - "HwExternalPhyPortTest.cpp", - "HwPortPrbsTest.cpp", - "HwI2CStressTest.cpp", - "HwI2cSelectTest.cpp", - "HwStateMachineTest.cpp", - "HwTransceiverTest.cpp", - "OpticsFwUpgradeTest.cpp", - "HwTransceiverConfigValidationTest.cpp", - ], - headers = [ - "HwPortUtils.h", - ], - link_whole = True, - undefined_symbols = True, - versions = to_versions(sai_impl), - exported_deps = [ - "fbsource//third-party/googletest:gtest", - ":hw_qsfp_ensemble{}".format(impl_suffix), - ":hw_transceiver_utils", - ":qsfp_production_features-cpp2-types", - "//fboss/agent/platforms/common:platform_mapping", - "//fboss/lib:common_utils", - "//fboss/lib/fpga:multi_pim_container", - "//fboss/agent:platform_config-cpp2-types", - "//fboss/agent:switch_state-cpp2-types", - "//fboss/lib/phy:phy-cpp2-types", - "//fboss/mka_service/if:mka_structs-cpp2-types", - "//fboss/qsfp_service/lib:qsfp-config-parser-helper", - "//fboss/qsfp_service/module:qsfp-module", - "//folly/portability:filesystem", - "//thrift/lib/cpp/util:enum_utils", - ], - ) - -def all_hw_qsfp_ensemble_libs(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _hw_qsfp_ensemble_lib(sai_impl) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _hw_qsfp_ensemble_lib(impl) - -def all_qsfp_test_libs(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _qsfp_hw_test_lib(sai_impl) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _qsfp_hw_test_lib(impl) - -def _qsfp_hw_test(impl, versions): - impl_suffix = to_sdk_suffix(impl) - return cpp_binary( - name = "qsfp_hw_test-{}-{}".format(impl.name, impl.version), - srcs = [ - ], - auto_headers = AutoHeaders.SOURCES, - versions = versions, - deps = [ - "//fboss/agent/hw/test:hw_test_main", - "//fboss/qsfp_service/test/hw_test:hw_qsfp_ensemble{}".format(impl_suffix), - "//fboss/qsfp_service/test/hw_test:hw_qsfp_test_lib-{}-{}".format(impl.name, impl.version), - ], - ) - -def all_qsfp_test_binaries(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _qsfp_hw_test(sai_impl, to_versions(sai_impl)) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _qsfp_hw_test(impl, to_versions(impl)) From a9f64a49bd467b8510e4a50fbe6fb2cc2c6cf389 Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Wed, 16 Oct 2024 13:56:07 -0700 Subject: [PATCH 156/479] Random Annotation: add UT for "any" annotation should work Summary: rework of: D63428747 this is to add UT coverage for any annotation should not break hybrid_cow Differential Revision: D64433851 Privacy Context Container: L1125642 fbshipit-source-id: 69d656832a29f01345ee52276107c7cc5aa3e00c --- .../tests/ThriftHybridStructNodeTests.cpp | 22 +++++++++++++------ fboss/thrift_cow/nodes/tests/test.thrift | 4 +++- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp b/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp index 18234eed58e0a..1981513bcf0f7 100644 --- a/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp +++ b/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp @@ -40,19 +40,27 @@ TEST(ThriftHybridStructNodeTests, ReadThriftStructAnnotation) { } TEST(ThriftHybridStructNodeTests, ThriftStructNodeAnnotations) { - ThriftStructFields fields; + { + ThriftStructFields fields; #ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - static_assert(fields.isSkipThriftCowEnabled() == true); + static_assert(fields.isSkipThriftCowEnabled() == true); #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ - static_assert(fields.isSkipThriftCowEnabled() == false); - - ThriftStructNode node; + static_assert(fields.isSkipThriftCowEnabled() == false); + } + { + ThriftStructNode node; #ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - ASSERT_EQ(node.isSkipThriftCowEnabled(), true); + ASSERT_EQ(node.isSkipThriftCowEnabled(), true); #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ - ASSERT_EQ(node.isSkipThriftCowEnabled(), false); + ASSERT_EQ(node.isSkipThriftCowEnabled(), false); + } + // annotation that is other than `allow_skip_thrift_cow` + { + ThriftStructNode node; + ASSERT_EQ(node.isSkipThriftCowEnabled(), false); + } } TEST(ThriftHybridStructNodeTests, TestHybridNodeTypes) { diff --git a/fboss/thrift_cow/nodes/tests/test.thrift b/fboss/thrift_cow/nodes/tests/test.thrift index b2a3f971324d9..57ac7efe3b869 100644 --- a/fboss/thrift_cow/nodes/tests/test.thrift +++ b/fboss/thrift_cow/nodes/tests/test.thrift @@ -77,4 +77,6 @@ struct ParentTestStruct { 1: TestStruct childStruct; } (random_annotation) -struct TestStruct2 {} (deprecated, allow_skip_thrift_cow = false) +struct TestStruct2 { + 10: i32 deprecatedField (deprecated); +} (deprecated, allow_skip_thrift_cow = false) From 7d4785440d4285855bab1202346f4f4f47faa3a5 Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Wed, 16 Oct 2024 14:27:22 -0700 Subject: [PATCH 157/479] Fix undefined reference to `facebook::fboss::utility::setupEcmpDataplaneLoopOnAllPorts(facebook::fboss::AgentEnsemble*)' Summary: Example of a recent failure: https://www.internalfb.com/sandcastle/workflow/743093938520839118 ``` FAILED: multi_switch_agent_hw_test : && /bin/c++ -Wall -Werror -Wno-sign-compare -Wno-maybe-uninitialized -Wno-deprecated-declarations -Os -DNDEBUG CMakeFiles/multi_switch_agent_hw_test.dir/fboss/agent/test/agent_hw_tests/MultiSwitchAgentHwTest.cpp.o -o multi_switch_agent_hw_test -Wl,-rpath,/usr/local/fbcode/platform010/lib:/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/libyaml-TY3Te3S5ejn-jjt3UP2vfLUbjC90dc6PD7psoP2Mts8/lib:/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/gflags-FHGtz15ipgdtBy8VDWwU07RNW_0yBukAYrcBYzpi1g8/lib:/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/glog-kCh757cr82SAdy4c1gcwKKJY2dg-eTnUsnnFYmqPNS4/lib64 -Wl,--whole-archive libacl_test_utils.a libagent_test_utils.a libcopp_test_utils.a libpkt_test_utils.a libagent_hw_test_src.a libagent_hw_test.a libmulti_switch_agent_ensemble.a libolympic_qos_utils.a libtrunk_utils.a libtraffic_policy_utils.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/lib/libfolly.a libhw_packet_utils.a -Wl,--no-whole-archive /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/googletest-7JnJT5CgY1LVTPmQfwvncdoArZXAShZsSsQa9C0lCU4/lib64/libgmock_main.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/googletest-7JnJT5CgY1LVTPmQfwvncdoArZXAShZsSsQa9C0lCU4/lib64/libgmock.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/googletest-7JnJT5CgY1LVTPmQfwvncdoArZXAShZsSsQa9C0lCU4/lib64/libgtest.a libagent_test_utils.a liblabel_forwarding_utils.a libhw_mock.a libagent_hw_test_constants.a libmono_agent_ensemble.a libmonolithic_agent_initializer.a libagent_hw_test_thrift_handler.a libsai_ecmp_utils.a libsai_switch.a libdiag_shell.a libsai_platform.a libthrift_handler.a libsai_switch.a libdiag_shell.a libsai_platform.a libthrift_handler.a -Wl,--unresolved-symbols=ignore-all libhw_trunk_counters.a libhw_port_fb303_stats.a libprbs_stats_entry.a libsai_store.a libref_map.a -Wl,--unresolved-symbols=report-all libsai_repl.a libsai_api.a libaddress_util.a liblogging_util.a libfunction_call_time_reporter.a libpython_repl.a /usr/local/fbcode/platform010/lib/libpython3.8.so -lutil libwedge_led_utils.a libfboss_i2c_lib.a libi2c_controller_stats_cpp2.a /usr/lib64/libusb-1.0.so /usr/lib64/libcurl.so libbcm_yaml_config.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/yaml-cpp-qO3lWZVT4UgBNn_iIPaAGXVLKmz02GwHst9pmDKpm0o/lib/libyaml-cpp.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/libyaml-TY3Te3S5ejn-jjt3UP2vfLUbjC90dc6PD7psoP2Mts8/lib/libyaml.so libled_structs_types_cpp2.a libled_mapping_cpp2.a libsai_ctrl_cpp2.a libproduction_features_cpp2.a libstats_test_utils.a libaqm_test_utils.a libport_stats_test_utils.a libhw_resource_stats_publisher.a libecmp_dataplane_test_util.a libfabric_test_utils.a libpfc_test_utils.a libqueue_test_utils.a libinvariant_test_utils.a libqos_test_utils.a libvalidated_shell_commands_cpp2.a libprod_config_factory.a libdscp_marking_utils.a libolympic_qos_utils.a libqueue_per_host_test_utils.a libcopp_test_utils.a libtraffic_policy_utils.a libload_balancer_test_utils.a libhw_copp_utils.a libhw_test_acl_utils.a libacl_test_utils.a libload_balancer_utils.a libhw_pfc_utils.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/googletest-7JnJT5CgY1LVTPmQfwvncdoArZXAShZsSsQa9C0lCU4/lib64/libgmock_main.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/googletest-7JnJT5CgY1LVTPmQfwvncdoArZXAShZsSsQa9C0lCU4/lib64/libgmock.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/googletest-7JnJT5CgY1LVTPmQfwvncdoArZXAShZsSsQa9C0lCU4/lib64/libgtest.a libroute_scale_gen.a libroute_test_utils.a libl2learn_observer_util.a libmac_test_utils.a libsflow_shim_utils.a libmirror_test_utils.a libtrap_packet_utils.a libvoq_test_utils.a libdsf_config_utils.a libagent_ensemble.a libroute_distribution_gen.a libecmp_helper.a libmain.a libfboss_common_init.a libagent_hw_test_ctrl_cpp2.a libsplit_agent_initializer.a libmulti_switch_hw_switch_handler.a libsw_agent_initializer.a libsetup_thrift.a libresourcelibutil.a libpacket_snooper.a libpacket_factory.a libhw_switch_ensemble.a libpkt_test_utils.a libconfig_factory.a libconfig_utils.a libasic_test_utils.a libport_test_utils.a libhwagent.a libfboss_init.a liblinkstate_toggler.a libtest_ensemble_if.a libhw_link_state_toggler.a libmultiswitch_test_server.a libhandler.a libpkt.a liblog_thrift_call.a libthrifthandler_utils.a libsplit_agent_thrift_syncer.a libmultiswitch_service.a libcore.a libmonolithic_switch_handler.a libhw_switch.a libhw_switch_warmboot_helper.a libhw_switch_handler.a libhw_switch_fb303_stats.a libcommon_utils.a libplatform_base.a libagent_dir_util.a libload_agent_config.a libroute_update_wrapper.a libfib_updater.a libhw_write_behavior.a libswitchinfo_utils.a libcapture.a libpacket_observer.a libdiag_cmd_filter.a libhw_cpu_fb303_stats.a libhw_fb303_stats.a libcounter_utils.a liblldp.a liblldp_structs_cpp2.a librestart_time_tracker.a libexponential_back_off.a libphy_utils.a libbidirectional_packet_stream.a libasync_packet_transport.a libpacket_stream_cpp2.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/iproute2-uZlREBVTwro6XgcS1k92RX1WsnBeZ-bwcHp9vBd4xeQ/lib/libnetlink.a /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so libthread_heartbeat.a libsw_switch_warmboot_helper.a libhw_asic_table.a libplatform_mapping_utils.a libminipack_platform_mapping.a libelbert_platform_mapping.a libyamp_platform_mapping.a libfake_test_platform_mapping.a libfuji_platform_mapping.a libgalaxy_platform_mapping.a libwedge100_platform_mapping.a libwedge40_platform_mapping.a libwedge400_platform_utils.a libwedge400c_platform_utils.a libdarwin_platform_mapping.a libwedge400_platform_mapping.a libwedge400c_platform_mapping.a libmorgan_platform_mapping.a libcloud_ripper_platform_mapping.a libmontblanc_platform_mapping.a libtahan800bc_platform_mapping.a libstandalone_rib.a libaddress_utils.a libnetwork_to_route_map.a libasync_logger.a libcommon_file_utils.a libhw_ctrl_cpp2.a libloadbalancer_utils.a libl2learn_event_observer.a libagent_fsdb_sync_manager.a libfsdb_syncer.a libfsdb_pub_sub.a libfsdb_stream_client.a libcommon_thrift_utils.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fb303/lib/libfb303.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fb303/lib/libfb303_thrift_cpp.a libfsdb_client.a libthrift_service_client.a libqsfp_cpp2.a libfsdb_cpp2.a libfsdb_flags.a libcow_storage_mgr.a libtuple_utils.a libfboss_event_base.a libphy_snapshot_manager.a libsnapshot_manager.a libalert_logger.a libbuild_info_wrapper.a libpacket.a libstats.a libutils.a libasic_utils.a libswitch_asics.a libversion_util.a libswitchid_scope_resolver.a libmeru400biu_platform_mapping.a libmeru400bia_platform_mapping.a libmeru400bfu_platform_mapping.a libmeru800bia_platform_mapping.a libmeru800bfa_platform_mapping.a libproduct_info.a libjanga800bic_platform_mapping.a libplatform_mapping.a libfboss_config_utils.a libexternal_phy.a libagent_features.a libpktutil.a libstate.a libfsdb_helper.a libstate.a libfsdb_helper.a libstate_utils.a liblabel_forwarding_action.a liberror.a libhwswitch_matcher.a libradix_tree.a liblacp_types.a libfsdb_model.a libfsdb_model_thriftpath_cpp2.a libfsdb_model_cpp2.a libswitch_state_cpp2.a libagent_config_cpp2.a libswitch_reachability_cpp2.a libqsfp_state_cpp2.a libqsfp_config_cpp2.a libtransceiver_validation_cpp2.a libqsfp_stats_cpp2.a libsensor_service_stats_cpp2.a libsensor_service_cpp2.a libsensor_config_cpp2.a libthriftpath_lib.a libfsdb_utils.a libcow_storage.a libthrift_cow_nodes.a libnodebase.a libfboss_error.a libfboss_types.a libthrift_cow_serializer.a libthrift_cow_visitors.a /usr/lib64/libre2.so libcow_visitor_results_cpp2.a libstorage.a libmultiswitch_ctrl_cpp2.a libctrl_cpp2.a libplatform_config_cpp2.a libbcm_config_cpp2.a libasic_config_cpp2.a libasic_config_v2_cpp2.a libagent_stats_cpp2.a libhardware_stats_cpp2.a libmka_structs_cpp2.a liboptic_cpp2.a libproduct_info_cpp2.a libphy_cpp2.a libswitch_config_cpp2.a libcommon_cpp2.a libnetwork_address_cpp2.a libfboss_common_cpp2.a libmpls_cpp2.a libfboss_cpp2.a libtransceiver_cpp2.a liblink_cpp2.a libprbs_cpp2.a libfb303_cpp2.a libio_stats_cpp2.a libfsdb_oper_cpp2.a libfsdb_common_cpp2.a libpatch_cpp2.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftcpp2.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftfrozen2.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftmetadata.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftanyrep.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthrifttype.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftprotocol.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftprotocol.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libasync.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libruntime.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libtransport.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/librpcmetadata.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libconcurrency.a /lib64/libzstd.so /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/wangle/lib/libwangle.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthrift-core.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthrifttyperep.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftannotation.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libserverdbginfo.a /usr/lib64/libxxhash.so /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_server_async_tran.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_server.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_server_state.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_dsr_frontend.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_dsr_types.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_fizz_handshake.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_transport.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_buf_accessor.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_datagram_handler.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_batch_writer.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_cc_algo.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_codec_pktrebuilder.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_happyeyeballs.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_async_udp_socket.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_events.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_looper.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_observer.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_ack_handler.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_loss.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_pacing_functions.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_simple_frame_functions.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_functions.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_codec_pktbuilder.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_stream.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_flowcontrol.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_qlogger.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_stream_functions.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_machine.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_codec.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_handshake.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_codec_packet_number_cipher.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_codec_decode.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_codec_types.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_exception.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fizz/lib/libfizz.a /usr/lib64/libsodium.so /usr/lib64/libz.so /usr/lib64/librt.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/liboqs-3qvQ3i20HCLbfm8kc-LU2vU0Z_kU9bieLj_ujQsF6-w/lib64/liboqs.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_bufutil.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_transport_knobs.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_constants.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_transport_settings_functions.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/lib/libfolly.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/lib64/libfmt.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-ekzv3-LMUT7ciCQTZ8O6VgxUmubclRMMSvqk1pfNRpU/lib/libboost_context.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-ekzv3-LMUT7ciCQTZ8O6VgxUmubclRMMSvqk1pfNRpU/lib/libboost_filesystem.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-ekzv3-LMUT7ciCQTZ8O6VgxUmubclRMMSvqk1pfNRpU/lib/libboost_atomic.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-ekzv3-LMUT7ciCQTZ8O6VgxUmubclRMMSvqk1pfNRpU/lib/libboost_program_options.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-ekzv3-LMUT7ciCQTZ8O6VgxUmubclRMMSvqk1pfNRpU/lib/libboost_regex.a -licudata -licui18n -licuuc /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-ekzv3-LMUT7ciCQTZ8O6VgxUmubclRMMSvqk1pfNRpU/lib/libboost_system.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-ekzv3-LMUT7ciCQTZ8O6VgxUmubclRMMSvqk1pfNRpU/lib/libboost_thread.a /usr/lib64/libdouble-conversion.so /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/gflags-FHGtz15ipgdtBy8VDWwU07RNW_0yBukAYrcBYzpi1g8/lib/libgflags.so.2.2.2 /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/glog-kCh757cr82SAdy4c1gcwKKJY2dg-eTnUsnnFYmqPNS4/lib64/libglog.so /usr/lib64/libevent.so /usr/lib64/libz.so /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libbz2.so /usr/lib64/liblzma.so /usr/lib64/liblz4.so /usr/lib64/libzstd.so /usr/lib64/libsnappy.so /usr/lib64/libdwarf.so /usr/lib64/libiberty.a /usr/lib64/libaio.so /usr/lib64/libsodium.so -ldl /usr/lib64/libunwind.so && : /bin/ld: libagent_hw_test_src.a(AgentSflowMirrorTest.cpp.o): in function `facebook::fboss::AgentSflowMirrorWithLineRateTrafficTest::testSflowEgressCongestion()::{lambda()#2}::operator()() const': AgentSflowMirrorTest.cpp:(.text._ZZN8facebook5fboss39AgentSflowMirrorWithLineRateTrafficTest25testSflowEgressCongestionEvENKUlvE0_clEv[_ZZN8facebook5fboss39AgentSflowMirrorWithLineRateTrafficTest25testSflowEgressCongestionEvENKUlvE0_clEv]+0x54): undefined reference to `facebook::fboss::utility::setupEcmpDataplaneLoopOnAllPorts(facebook::fboss::AgentEnsemble*)' /bin/ld: AgentSflowMirrorTest.cpp:(.text._ZZN8facebook5fboss39AgentSflowMirrorWithLineRateTrafficTest25testSflowEgressCongestionEvENKUlvE0_clEv[_ZZN8facebook5fboss39AgentSflowMirrorWithLineRateTrafficTest25testSflowEgressCongestionEvENKUlvE0_clEv]+0x9a): undefined reference to `facebook::fboss::utility::createTrafficOnMultiplePorts(facebook::fboss::AgentEnsemble*, int, std::function, double)' collect2: error: ld returned 1 exit status ``` Reviewed By: harshitgulati18 Differential Revision: D64489537 fbshipit-source-id: 4b0b536da3f081a9f68e7eba54181853968c84c7 --- cmake/AgentTestAgentHwTests.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/AgentTestAgentHwTests.cmake b/cmake/AgentTestAgentHwTests.cmake index 84d1f19aa1d7c..e849a84e3d320 100644 --- a/cmake/AgentTestAgentHwTests.cmake +++ b/cmake/AgentTestAgentHwTests.cmake @@ -65,6 +65,7 @@ target_link_libraries(agent_hw_test_src packet packet_snooper queue_per_host_test_utils + multi_port_traffic_test_utils trap_packet_utils core hw_asic_table From a2760ac98e0736deb235a87894a649dbbd8898f8 Mon Sep 17 00:00:00 2001 From: Stiopa Koltsov Date: Wed, 16 Oct 2024 15:32:49 -0700 Subject: [PATCH 158/479] Deprecation warnings Summary: After D64305791. Reviewed By: Will-MingLun-Li Differential Revision: D64476974 fbshipit-source-id: 4f2f027c840e81168765b3c954592469d7fcc45d --- shim/third-party/rust/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shim/third-party/rust/Cargo.toml b/shim/third-party/rust/Cargo.toml index 84ec27d4c2bed..b569ecfaaa4d1 100644 --- a/shim/third-party/rust/Cargo.toml +++ b/shim/third-party/rust/Cargo.toml @@ -115,7 +115,7 @@ internment = { version = "0.7", features = ["arc"] } inventory = "0.3.8" ipnetwork = "0.20.0" is_proc_translated = "0.1.1" -itertools = "0.10.3" +itertools = "0.13.0" jemallocator = { version = "0.5.0", features = ["profiling"] } lalrpop = { version = "0.19.7", artifact = "bin", features = ["pico-args"] } lalrpop-util = "0.19.7" From 4df6dcaea7b599f8eef2eccbd44ea4c324b62e9a Mon Sep 17 00:00:00 2001 From: Ron He Date: Wed, 16 Oct 2024 16:29:21 -0700 Subject: [PATCH 159/479] Add port attributes for conditional entropy rehash Summary: As titled. Towards supporting conditional entropy rehash. Reviewed By: jasmeetbagga Differential Revision: D64273012 fbshipit-source-id: 81f29fe12c581743f6459a8f6e120a1265e60104 --- fboss/agent/hw/sai/api/PortApi.h | 29 ++++++++++++++++++- fboss/agent/hw/sai/api/bcm/PortApi.cpp | 29 +++++++++++++++++++ .../hw/sai/api/fake/FakeSaiExtensions.cpp | 14 +++++++++ fboss/agent/hw/sai/api/oss/PortApi.cpp | 14 +++++++++ fboss/agent/hw/sai/api/tajo/PortApi.cpp | 15 ++++++++++ fboss/agent/hw/sai/api/tests/PortApiTest.cpp | 3 ++ .../hw/sai/store/tests/PortStoreTest.cpp | 3 ++ .../hw/sai/switch/npu/SaiPortManager.cpp | 6 ++++ .../hw/sai/switch/phy/SaiPortManager.cpp | 3 ++ .../hw/sai/switch/tests/PortManagerTest.cpp | 3 ++ fboss/agent/hw/sai/tracer/PortApiTracer.cpp | 3 ++ 11 files changed, 121 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/api/PortApi.h b/fboss/agent/hw/sai/api/PortApi.h index e1c46fff1b485..bf046ae57b243 100644 --- a/fboss/agent/hw/sai/api/PortApi.h +++ b/fboss/agent/hw/sai/api/PortApi.h @@ -419,6 +419,27 @@ struct SaiPortTraits { sai_uint32_t, AttributeReachabilityGroup, SaiIntDefault>; + struct AttributeCondEntropyRehashEnable { + std::optional operator()(); + }; + using CondEntropyRehashEnable = SaiExtensionAttribute< + bool, + AttributeCondEntropyRehashEnable, + SaiBoolDefaultFalse>; + struct AttributeCondEntropyRehashPeriodUS { + std::optional operator()(); + }; + using CondEntropyRehashPeriodUS = SaiExtensionAttribute< + sai_uint32_t, + AttributeCondEntropyRehashPeriodUS, + SaiIntDefault>; + struct AttributeCondEntropyRehashSeed { + std::optional operator()(); + }; + using CondEntropyRehashSeed = SaiExtensionAttribute< + sai_uint32_t, + AttributeCondEntropyRehashSeed, + SaiIntDefault>; }; using AdapterKey = PortSaiId; @@ -523,7 +544,10 @@ struct SaiPortTraits { std::optional, std::optional, #endif - std::optional>; + std::optional, + std::optional, + std::optional, + std::optional>; static constexpr std::array CounterIdsToRead = { SAI_PORT_STAT_IF_IN_OCTETS, SAI_PORT_STAT_IF_IN_UCAST_PKTS, @@ -674,6 +698,9 @@ SAI_ATTRIBUTE_NAME(Port, ArsPortLoadPastWeight) SAI_ATTRIBUTE_NAME(Port, ArsPortLoadFutureWeight) #endif SAI_ATTRIBUTE_NAME(Port, ReachabilityGroup) +SAI_ATTRIBUTE_NAME(Port, CondEntropyRehashEnable) +SAI_ATTRIBUTE_NAME(Port, CondEntropyRehashPeriodUS) +SAI_ATTRIBUTE_NAME(Port, CondEntropyRehashSeed) template <> struct SaiObjectHasStats : public std::true_type {}; diff --git a/fboss/agent/hw/sai/api/bcm/PortApi.cpp b/fboss/agent/hw/sai/api/bcm/PortApi.cpp index 788e62a1af233..98e58efe2246f 100644 --- a/fboss/agent/hw/sai/api/bcm/PortApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/PortApi.cpp @@ -237,4 +237,33 @@ std::optional SaiPortSerdesTraits::Attributes:: return std::nullopt; } +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashEnable::operator()() { +// TODO(zecheng): Update flag when new 12.0 release has the attribute +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_PORT_ATTR_COND_ENTROPY_REHASH_ENABLE; +#else + return std::nullopt; +#endif +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashPeriodUS::operator()() { +// TODO(zecheng): Update flag when new 12.0 release has the attribute +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_PORT_ATTR_COND_ENTROPY_REHASH_PERIOD_US; +#else + return std::nullopt; +#endif +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashSeed::operator()() { +// TODO(zecheng): Update flag when new 12.0 release has the attribute +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_PORT_ATTR_COND_ENTROPY_REHASH_SEED; +#else + return std::nullopt; +#endif +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp index 0abc4c6390e26..7ce36a6cf4f01 100644 --- a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp +++ b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp @@ -387,4 +387,18 @@ std::optional SaiPortSerdesTraits::Attributes:: return SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_FINE_STEP_OV_VAL; } +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashEnable::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashPeriodUS::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashSeed::operator()() { + return std::nullopt; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/oss/PortApi.cpp b/fboss/agent/hw/sai/api/oss/PortApi.cpp index d4e256957740e..769eba114bff1 100644 --- a/fboss/agent/hw/sai/api/oss/PortApi.cpp +++ b/fboss/agent/hw/sai/api/oss/PortApi.cpp @@ -193,4 +193,18 @@ std::optional SaiPortSerdesTraits::Attributes:: return std::nullopt; } +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashEnable::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashPeriodUS::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashSeed::operator()() { + return std::nullopt; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tajo/PortApi.cpp b/fboss/agent/hw/sai/api/tajo/PortApi.cpp index 7520e1579b5aa..28e50027cdc91 100644 --- a/fboss/agent/hw/sai/api/tajo/PortApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/PortApi.cpp @@ -206,4 +206,19 @@ std::optional SaiPortSerdesTraits::Attributes:: RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_FINE_STEP_OV_VAL); } +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashEnable::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashPeriodUS::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashSeed::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tests/PortApiTest.cpp b/fboss/agent/hw/sai/api/tests/PortApiTest.cpp index f4ccfb909ee9a..d477254a8eb4d 100644 --- a/fboss/agent/hw/sai/api/tests/PortApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/PortApiTest.cpp @@ -78,6 +78,9 @@ class PortApiTest : public ::testing::Test { std::nullopt, // ARS port load future weight #endif std::nullopt, // Reachability Group + std::nullopt, // CondEntropyRehashEnable + std::nullopt, // CondEntropyRehashPeriodUS + std::nullopt, // CondEntropyRehashSeed }; return portApi->create(a, 0); } diff --git a/fboss/agent/hw/sai/store/tests/PortStoreTest.cpp b/fboss/agent/hw/sai/store/tests/PortStoreTest.cpp index f80cdd9e062b6..5d3b308351fbb 100644 --- a/fboss/agent/hw/sai/store/tests/PortStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/PortStoreTest.cpp @@ -72,6 +72,9 @@ class PortStoreTest : public SaiStoreTest { std::nullopt, // ARS port load future weight #endif std::nullopt, // Reachability Group + std::nullopt, // CondEntropyRehashEnable + std::nullopt, // CondEntropyRehashPeriodUS + std::nullopt, // CondEntropyRehashSeed }; } diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index 02d6a8cda0223..e70e5647de998 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -702,6 +702,9 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( std::nullopt, // ARS port load future weight #endif std::nullopt, // Reachability Group + std::nullopt, // CondEntropyRehashEnable + std::nullopt, // CondEntropyRehashPeriodUS + std::nullopt, // CondEntropyRehashSeed }; } return SaiPortTraits::CreateAttributes{ @@ -770,6 +773,9 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( arsPortLoadFutureWeight, // ARS port load future weight #endif reachabilityGroup, + std::nullopt, // CondEntropyRehashEnable + std::nullopt, // CondEntropyRehashPeriodUS + std::nullopt, // CondEntropyRehashSeed }; } diff --git a/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp index c4b8e7751b327..75846fc1b9f4c 100644 --- a/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp @@ -286,6 +286,9 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( std::nullopt, // ARS port load future weight #endif std::nullopt, // Reachability Group + std::nullopt, // CondEntropyRehashEnable + std::nullopt, // CondEntropyRehashPeriodUS + std::nullopt, // CondEntropyRehashSeed }; } diff --git a/fboss/agent/hw/sai/switch/tests/PortManagerTest.cpp b/fboss/agent/hw/sai/switch/tests/PortManagerTest.cpp index 80945a666a5d6..f6232c43a28d0 100644 --- a/fboss/agent/hw/sai/switch/tests/PortManagerTest.cpp +++ b/fboss/agent/hw/sai/switch/tests/PortManagerTest.cpp @@ -168,6 +168,9 @@ class PortManagerTest : public ManagerTestBase { std::nullopt, // ARS port load future weight #endif std::nullopt, // Reachability Group + std::nullopt, // CondEntropyRehashEnable + std::nullopt, // CondEntropyRehashPeriodUS + std::nullopt, // CondEntropyRehashSeed }; return portApi.create(a, 0); } diff --git a/fboss/agent/hw/sai/tracer/PortApiTracer.cpp b/fboss/agent/hw/sai/tracer/PortApiTracer.cpp index ba5e0728b60dc..0298e5dd4349e 100644 --- a/fboss/agent/hw/sai/tracer/PortApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/PortApiTracer.cpp @@ -171,6 +171,9 @@ void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(PortSerdes, RxCdrTdet1stOrdStepOvVal) SAI_EXT_ATTR_MAP(PortSerdes, RxCdrTdet2ndOrdStepOvVal) SAI_EXT_ATTR_MAP(PortSerdes, RxCdrTdetFineStepOvVal) + SAI_EXT_ATTR_MAP(Port, CondEntropyRehashEnable) + SAI_EXT_ATTR_MAP(Port, CondEntropyRehashPeriodUS) + SAI_EXT_ATTR_MAP(Port, CondEntropyRehashSeed) } } // namespace From 431f7d47887be8aa96eeee21528a642fefce9c64 Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Wed, 16 Oct 2024 16:32:47 -0700 Subject: [PATCH 160/479] Fix crash during subscription unregister Summary: Calling cancelAndJoinAsync can cause a crash. Our thread has calls to a virtual method (serveSubscriptions), but by this point the subclass is destroyed so trying to join ends up resulting in a dump because of "pure virtual method called". Noticed this in DSF at high session scale when remote agent is restarting and unsubscribing Differential Revision: D64362881 Privacy Context Container: L1125642 fbshipit-source-id: f792ea82e9bce083873c08d6e8be0746228b47cd --- fboss/fsdb/oper/Subscription.cpp | 8 +++- fboss/fsdb/oper/Subscription.h | 38 +++++++++++++------ .../oper/tests/SubscriptionPathStoreTests.cpp | 12 ++++++ 3 files changed, 46 insertions(+), 12 deletions(-) diff --git a/fboss/fsdb/oper/Subscription.cpp b/fboss/fsdb/oper/Subscription.cpp index cbd307cad73f6..779814cabe737 100644 --- a/fboss/fsdb/oper/Subscription.cpp +++ b/fboss/fsdb/oper/Subscription.cpp @@ -44,11 +44,17 @@ BaseSubscription::BaseSubscription( } BaseSubscription::~BaseSubscription() { + // subclasses need to call stop since we have virtual method calls queued + CHECK(backgroundScope_.isScopeCancellationRequested()); +} + +void BaseSubscription::stop() { folly::coro::blockingWait(backgroundScope_.cancelAndJoinAsync()); } folly::coro::Task BaseSubscription::heartbeatLoop() { - while (true) { + // make sure to stop loop when we're cancelled + while (!backgroundScope_.isScopeCancellationRequested()) { co_await folly::coro::sleep(heartbeatInterval_); serveHeartbeat(); } diff --git a/fboss/fsdb/oper/Subscription.h b/fboss/fsdb/oper/Subscription.h index 9f4e14092b200..51475d8610c96 100644 --- a/fboss/fsdb/oper/Subscription.h +++ b/fboss/fsdb/oper/Subscription.h @@ -73,6 +73,8 @@ class BaseSubscription { return heartbeatInterval_; } + void stop(); + protected: BaseSubscription( SubscriberId subscriber, @@ -181,8 +183,6 @@ class ExtendedSubscription : public BaseSubscription { class BasePathSubscription : public Subscription { public: - virtual ~BasePathSubscription() override = default; - using Subscription::Subscription; virtual void offer(DeltaValue newVal) = 0; @@ -197,7 +197,9 @@ class PathSubscription : public BasePathSubscription, public: using value_type = DeltaValue; - virtual ~PathSubscription() override = default; + virtual ~PathSubscription() override { + stop(); + } using PathIter = std::vector::const_iterator; void offer(DeltaValue newVal) override { @@ -277,8 +279,6 @@ class PathSubscription : public BasePathSubscription, class BaseDeltaSubscription : public Subscription { public: - virtual ~BaseDeltaSubscription() override = default; - PubSubType type() const override { return PubSubType::DELTA; } @@ -314,6 +314,10 @@ class BaseDeltaSubscription : public Subscription { class DeltaSubscription : public BaseDeltaSubscription, private boost::noncopyable { public: + virtual ~DeltaSubscription() override { + stop(); + } + using PathIter = std::vector::const_iterator; void flush(const SubscriptionMetadataServer& metadataServer) override; @@ -363,7 +367,9 @@ class ExtendedPathSubscription; class FullyResolvedExtendedPathSubscription : public BasePathSubscription, private boost::noncopyable { public: - virtual ~FullyResolvedExtendedPathSubscription() override = default; + virtual ~FullyResolvedExtendedPathSubscription() override { + stop(); + } FullyResolvedExtendedPathSubscription( const std::vector& path, @@ -390,7 +396,9 @@ class FullyResolvedExtendedPathSubscription : public BasePathSubscription, class ExtendedPathSubscription : public ExtendedSubscription, private boost::noncopyable { public: - virtual ~ExtendedPathSubscription() override = default; + virtual ~ExtendedPathSubscription() override { + stop(); + } // we only support encoded extended subscriptions using value_type = TaggedOperState; using gen_type = std::vector>; @@ -458,7 +466,9 @@ class ExtendedDeltaSubscription; class FullyResolvedExtendedDeltaSubscription : public BaseDeltaSubscription, private boost::noncopyable { public: - virtual ~FullyResolvedExtendedDeltaSubscription() override = default; + virtual ~FullyResolvedExtendedDeltaSubscription() override { + stop(); + } FullyResolvedExtendedDeltaSubscription( const std::vector& path, @@ -483,7 +493,9 @@ class FullyResolvedExtendedDeltaSubscription : public BaseDeltaSubscription, class ExtendedDeltaSubscription : public ExtendedSubscription, private boost::noncopyable { public: - virtual ~ExtendedDeltaSubscription() override = default; + virtual ~ExtendedDeltaSubscription() override { + stop(); + } // we only support encoded extended subscriptions using value_type = std::vector; @@ -556,7 +568,9 @@ class PatchSubscription : public Subscription, private boost::noncopyable { std::vector path, ExtendedPatchSubscription& subscription); - virtual ~PatchSubscription() override = default; + virtual ~PatchSubscription() override { + stop(); + } PubSubType type() const override { return PubSubType::PATCH; @@ -585,7 +599,9 @@ class ExtendedPatchSubscription : public ExtendedSubscription, public: using gen_type = SubscriberMessage; - virtual ~ExtendedPatchSubscription() override = default; + virtual ~ExtendedPatchSubscription() override { + stop(); + } // Single path static std::pair< diff --git a/fboss/fsdb/oper/tests/SubscriptionPathStoreTests.cpp b/fboss/fsdb/oper/tests/SubscriptionPathStoreTests.cpp index 9bb5bb6f871e6..30eee3377ccd8 100644 --- a/fboss/fsdb/oper/tests/SubscriptionPathStoreTests.cpp +++ b/fboss/fsdb/oper/tests/SubscriptionPathStoreTests.cpp @@ -16,6 +16,10 @@ using namespace facebook::fboss::fsdb; class TestSubscription : public Subscription { public: + ~TestSubscription() override { + stop(); + } + PubSubType type() const override { return PubSubType::PATH; } @@ -43,6 +47,10 @@ class TestSubscription : public Subscription { class TestDeltaSubscription : public Subscription { public: + ~TestDeltaSubscription() override { + stop(); + } + PubSubType type() const override { return PubSubType::DELTA; } @@ -79,6 +87,10 @@ class TestExtendedSubscription : public ExtendedSubscription { nullptr, std::chrono::milliseconds(0)) {} + ~TestExtendedSubscription() override { + stop(); + } + PubSubType type() const override { return PubSubType::PATH; } From d1f8cb95d797142a09de995445701f63447d7f00 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Wed, 16 Oct 2024 18:49:19 -0700 Subject: [PATCH 161/479] Fix wrong naming in 3_V_3_R_CARD for Montblanc sensor configs Summary: They were named with "_L_" which are duplicates in 3_V_3_L_CARD Reviewed By: alandau Differential Revision: D64476016 fbshipit-source-id: db7bd9cd38365440381295aa6db1612f8aeb7f0c --- .../configs/montblanc/sensor_service.json | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/fboss/platform/configs/montblanc/sensor_service.json b/fboss/platform/configs/montblanc/sensor_service.json index 93788da5b0856..0075b79a277c3 100644 --- a/fboss/platform/configs/montblanc/sensor_service.json +++ b/fboss/platform/configs/montblanc/sensor_service.json @@ -3863,7 +3863,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_PIN", + "name": "SMB_3V3_R_VRM_PIN", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/power1_input", "type": 0, "thresholds": { @@ -3873,7 +3873,7 @@ "compute": "@/1000000" }, { - "name": "SMB_3V3_L_VRM_VIN", + "name": "SMB_3V3_R_VRM_VIN", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/in1_input", "type": 1, "thresholds": { @@ -3885,7 +3885,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_VOUT", + "name": "SMB_3V3_R_VRM_VOUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/in2_input", "type": 1, "thresholds": { @@ -3897,7 +3897,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_TEMP", + "name": "SMB_3V3_R_VRM_TEMP", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/temp1_input", "type": 3, "compute": "@/1000" @@ -3907,7 +3907,7 @@ { "sensors": [ { - "name": "SMB_3V3_L_VRM_IOUT", + "name": "SMB_3V3_R_VRM_IOUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/curr3_input", "type": 2, "thresholds": { @@ -3917,7 +3917,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_POUT", + "name": "SMB_3V3_R_VRM_POUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/power3_input", "type": 0, "thresholds": { @@ -3934,7 +3934,7 @@ { "sensors": [ { - "name": "SMB_3V3_L_VRM_IOUT", + "name": "SMB_3V3_R_VRM_IOUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/curr3_input", "type": 2, "thresholds": { @@ -3944,7 +3944,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_POUT", + "name": "SMB_3V3_R_VRM_POUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/power3_input", "type": 0, "thresholds": { @@ -3961,7 +3961,7 @@ { "sensors": [ { - "name": "SMB_3V3_L_VRM_IOUT", + "name": "SMB_3V3_R_VRM_IOUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/curr3_input", "type": 2, "thresholds": { @@ -3971,7 +3971,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_POUT", + "name": "SMB_3V3_R_VRM_POUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/power3_input", "type": 0, "thresholds": { @@ -3988,7 +3988,7 @@ { "sensors": [ { - "name": "SMB_3V3_L_VRM_IOUT", + "name": "SMB_3V3_R_VRM_IOUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/curr3_input", "type": 2, "thresholds": { @@ -3998,7 +3998,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_POUT", + "name": "SMB_3V3_R_VRM_POUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/power3_input", "type": 0, "thresholds": { @@ -4015,7 +4015,7 @@ { "sensors": [ { - "name": "SMB_3V3_L_VRM_IOUT", + "name": "SMB_3V3_R_VRM_IOUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/curr3_input", "type": 2, "thresholds": { @@ -4025,7 +4025,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_POUT", + "name": "SMB_3V3_R_VRM_POUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/power3_input", "type": 0, "thresholds": { From 1357ecc146e902bcb3cfd5bec4cb31f27d85af03 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Wed, 16 Oct 2024 18:49:19 -0700 Subject: [PATCH 162/479] Support respin sensors checking in HwTest Summary: We were only checking for base sensors. As respin sensors can be used in our platforms in basset pool, adding the support Reviewed By: alandau Differential Revision: D64476042 fbshipit-source-id: 95f24de09ea9cf901b0cbc8e5ca14dd01bd27a6d --- .../sensor_service/SensorServiceImpl.h | 2 +- .../hw_test/SensorServiceHwTest.cpp | 61 ++++++++++--------- .../hw_test/SensorServiceHwTest.h | 2 + 3 files changed, 36 insertions(+), 29 deletions(-) diff --git a/fboss/platform/sensor_service/SensorServiceImpl.h b/fboss/platform/sensor_service/SensorServiceImpl.h index dfa6758f2bf3d..39f31dfcb427d 100644 --- a/fboss/platform/sensor_service/SensorServiceImpl.h +++ b/fboss/platform/sensor_service/SensorServiceImpl.h @@ -41,13 +41,13 @@ class SensorServiceImpl { const std::vector& sensorNames); std::map getAllSensorData(); void fetchSensorData(); + std::vector resolveSensors(const PmUnitSensors& pmUnitSensors); FsdbSyncer* fsdbSyncer() { return fsdbSyncer_.get(); } private: - std::vector resolveSensors(const PmUnitSensors& pmUnitSensors); SensorData fetchSensorDataImpl( const std::string& name, const std::string& sysfsPath, diff --git a/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp b/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp index dcbe9c2e066a0..170212487b67e 100644 --- a/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp +++ b/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp @@ -49,21 +49,37 @@ bool sensorReadOk(const std::string& sensorName) { return false; } -TEST_F(SensorServiceHwTest, GetAllSensors) { - auto res = getSensors(std::vector{}); - std::vector sensorNames; +std::vector SensorServiceHwTest::allSensorNamesFromConfig() { + std::vector sensors; for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { - for (const auto& sensor : *pmUnitSensors.sensors()) { - sensorNames.push_back(*sensor.name()); + for (const auto& sensor : + sensorServiceImpl_->resolveSensors(pmUnitSensors)) { + sensors.push_back(*sensor.name()); } } - EXPECT_EQ(sensorNames.size(), res.sensorData()->size()); - for (const auto& sensorName : sensorNames) { + return sensors; +} + +std::vector SensorServiceHwTest::someSensorNamesFromConfig() { + std::vector sensors; + for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { + auto resolvedSensors = sensorServiceImpl_->resolveSensors(pmUnitSensors); + sensors.push_back( + *resolvedSensors[folly::Random::rand32(resolvedSensors.size())].name()); + } + return sensors; +} + +TEST_F(SensorServiceHwTest, GetAllSensors) { + auto res = getSensors(std::vector{}); + std::vector allSensorNames = allSensorNamesFromConfig(); + EXPECT_EQ(allSensorNames.size(), res.sensorData()->size()); + for (const auto& sensorName : allSensorNames) { auto it = std::find_if( res.sensorData()->begin(), res.sensorData()->end(), - [sensorNameCopy = sensorName](auto sensorData) { - return *sensorData.name() == sensorNameCopy; + [&](const auto& sensorData) { + return *sensorData.name() == sensorName; }); EXPECT_NE(it, std::end(*res.sensorData())); // only non-failed sensors will have value @@ -78,15 +94,9 @@ TEST_F(SensorServiceHwTest, GetBogusSensor) { } TEST_F(SensorServiceHwTest, GetSomeSensors) { - std::vector sensorNames; - for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { - if (pmUnitSensors.sensors()->size() > 0) { - sensorNames.push_back(*pmUnitSensors.sensors()->front().name()); - } - } - - auto response1 = getSensors(sensorNames); - EXPECT_EQ(response1.sensorData()->size(), sensorNames.size()); + std::vector someSensorNames = someSensorNamesFromConfig(); + auto response1 = getSensors(someSensorNames); + EXPECT_EQ(response1.sensorData()->size(), someSensorNames.size()); for (const auto& sensorData : *response1.sensorData()) { if (sensorReadOk(*sensorData.name())) { EXPECT_TRUE(sensorData.value().has_value()); @@ -96,8 +106,8 @@ TEST_F(SensorServiceHwTest, GetSomeSensors) { // Burn a second std::this_thread::sleep_for(std::chrono::seconds(1)); - auto response2 = getSensors(sensorNames); - EXPECT_EQ(response2.sensorData()->size(), sensorNames.size()); + auto response2 = getSensors(someSensorNames); + EXPECT_EQ(response2.sensorData()->size(), someSensorNames.size()); for (const auto& sensorData : *response2.sensorData()) { if (sensorReadOk(*sensorData.name())) { EXPECT_TRUE(sensorData.value().has_value()); @@ -129,19 +139,14 @@ TEST_F(SensorServiceHwTest, GetSomeSensors) { } TEST_F(SensorServiceHwTest, GetSomeSensorsViaThrift) { - std::vector sensorNames; - for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { - if (pmUnitSensors.sensors()->size() > 0) { - sensorNames.push_back(*pmUnitSensors.sensors()->front().name()); - } - } + std::vector someSensorNames = someSensorNamesFromConfig(); // Trigger a fetch before the thrift request hits the server. sensorServiceImpl_->fetchSensorData(); apache::thrift::ScopedServerInterfaceThread server(sensorServiceHandler_); auto client = server.newClient>(); SensorReadResponse response; - client->sync_getSensorValuesByNames(response, sensorNames); - EXPECT_EQ(response.sensorData()->size(), sensorNames.size()); + client->sync_getSensorValuesByNames(response, someSensorNames); + EXPECT_EQ(response.sensorData()->size(), someSensorNames.size()); for (const auto& sensorData : *response.sensorData()) { if (sensorReadOk(*sensorData.name())) { EXPECT_TRUE(sensorData.value().has_value()); diff --git a/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.h b/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.h index b36b3a7de16d8..557ec83815ca5 100644 --- a/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.h +++ b/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.h @@ -23,6 +23,8 @@ class SensorServiceHwTest : public ::testing::Test { protected: SensorReadResponse getSensors(const std::vector& sensors); + std::vector allSensorNamesFromConfig(); + std::vector someSensorNamesFromConfig(); std::shared_ptr sensorServiceImpl_; std::shared_ptr sensorServiceHandler_; SensorConfig sensorConfig_; From d2367f34bd6ead91ca76d1d703925a7ae2d82f2f Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Wed, 16 Oct 2024 20:18:58 -0700 Subject: [PATCH 163/479] build fboss binaries with chenab_sdk Summary: as titled Reviewed By: srikrishnagopu Differential Revision: D64381003 Privacy Context Container: L1125642 fbshipit-source-id: 314b9f947a085ff297a008a05606289b0690c781 --- fboss/lib/test/test_version.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fboss/lib/test/test_version.sh b/fboss/lib/test/test_version.sh index f9df7e04eaca7..dfd2e03f35bfb 100755 --- a/fboss/lib/test/test_version.sh +++ b/fboss/lib/test/test_version.sh @@ -1,3 +1,4 @@ #!/bin/bash - -$1 --version | grep "Package Version" +if [[ "$2" == "no" ]]; then + $1 --version | grep "Package Version" +fi From c7904377852b9397c337ceaecef706d5f8a181d1 Mon Sep 17 00:00:00 2001 From: Ron He Date: Wed, 16 Oct 2024 22:17:07 -0700 Subject: [PATCH 164/479] Move helper to wait hw config file to TestUtils Summary: As titled. Move this helper of hw agent waiting for config file to TestUtils. OpenR seeing compilation issue with AgentConfig linking with Utils. Reviewed By: msomasundaran Differential Revision: D64499446 fbshipit-source-id: d18c8c8c5e79bab137d6f98fa0e548b32d56111d --- cmake/Agent.cmake | 13 +++++++++++ fboss/agent/BUCK | 17 ++++++++++++--- fboss/agent/HwAgentMain.cpp | 2 +- fboss/agent/TestUtils.cpp | 43 +++++++++++++++++++++++++++++++++++++ fboss/agent/TestUtils.h | 18 ++++++++++++++++ fboss/agent/Utils.cpp | 22 ------------------- fboss/agent/Utils.h | 2 -- 7 files changed, 89 insertions(+), 28 deletions(-) create mode 100644 fboss/agent/TestUtils.cpp create mode 100644 fboss/agent/TestUtils.h diff --git a/cmake/Agent.cmake b/cmake/Agent.cmake index 71ebed7be88d0..0a0f5c022ff53 100644 --- a/cmake/Agent.cmake +++ b/cmake/Agent.cmake @@ -484,6 +484,8 @@ target_link_libraries(hwagent-main split_agent_thrift_syncer Folly::folly agent_hw_test_thrift_handler + utils + test_utils ) add_library(restart_time_tracker @@ -690,3 +692,14 @@ target_link_libraries(hw_asic_table switch_asics utils ) + +add_library(test_utils + fboss/agent/TestUtils.cpp +) + +target_link_libraries(test_utils + agent_dir_util + load_agent_config + common_file_utils + Folly::folly +) diff --git a/fboss/agent/BUCK b/fboss/agent/BUCK index 941e097e8892b..99f101389ae94 100644 --- a/fboss/agent/BUCK +++ b/fboss/agent/BUCK @@ -469,13 +469,11 @@ cpp_library( "facebook/Utils.cpp", ], exported_deps = [ - ":agent_dir_util", ":asic_utils", ":fboss-error", ":fboss-types", ":fsdb_helper", ":hwswitch_matcher", - ":load_agent_config", ":switch_config-cpp2-types", ":switch_state-cpp2-types", ":switchid_scope_resolver", @@ -489,7 +487,6 @@ cpp_library( "//fboss/agent/platforms/common/meru800bia:meru800bia_platform_mapping", "//fboss/agent/state:state", "//fboss/fsdb/if:fsdb_oper-cpp2-types", - "//fboss/lib:common_file_utils", "//folly:file_util", "//folly:network_address", "//folly:range", @@ -1354,6 +1351,7 @@ cpp_library( ":restart_time_tracker", ":setup_thrift", ":split_agent_thrift_syncer", + ":test_utils", ":utils", "//common/fb303/cpp:default_control", "//fb303:logging", @@ -1731,6 +1729,19 @@ cpp_library( ], ) +cpp_library( + name = "test_utils", + srcs = [ + "TestUtils.cpp", + ], + exported_deps = [ + ":agent_dir_util", + ":load_agent_config", + "//fboss/lib:common_file_utils", + "//folly/logging:logging", + ], +) + export_file(name = "Main.cpp") sai_main_all() diff --git a/fboss/agent/HwAgentMain.cpp b/fboss/agent/HwAgentMain.cpp index 8e6614fe430c7..43ba953fe7aa8 100644 --- a/fboss/agent/HwAgentMain.cpp +++ b/fboss/agent/HwAgentMain.cpp @@ -22,7 +22,7 @@ #include "fboss/agent/HwSwitch.h" #include "fboss/agent/RestartTimeTracker.h" #include "fboss/agent/SetupThrift.h" -#include "fboss/agent/Utils.h" +#include "fboss/agent/TestUtils.h" #include "fboss/agent/hw/switch_asics/HwAsic.h" #include "fboss/agent/mnpu/SplitAgentThriftSyncer.h" #include "fboss/agent/state/StateDelta.h" diff --git a/fboss/agent/TestUtils.cpp b/fboss/agent/TestUtils.cpp new file mode 100644 index 0000000000000..932e10f60ccda --- /dev/null +++ b/fboss/agent/TestUtils.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#include "fboss/agent/TestUtils.h" +#include "fboss/agent/AgentConfig.h" +#include "fboss/agent/AgentDirectoryUtil.h" +#include "fboss/lib/CommonFileUtils.h" + +#include +#include +#include +#include + +namespace { +auto constexpr kConfigFileWaitPeriod = std::chrono::milliseconds{100}; +} + +namespace facebook::fboss { +std::unique_ptr getConfigFileForTesting(int switchIndex) { + auto configFileName = + AgentDirectoryUtil().getTestHwAgentConfigFile(switchIndex); + std::condition_variable configFileCv; + std::mutex configFileMutex; + std::unique_lock lock(configFileMutex); + XLOG(INFO) << "Waiting on config file " << configFileName + << " to init hw agent"; + while (!checkFileExists(configFileName)) { + configFileCv.wait_for(lock, kConfigFileWaitPeriod, [&]() { + return checkFileExists(configFileName); + }); + } + XLOG(INFO) << "Using config file " << configFileName << " to init hw agent"; + auto config = AgentConfig::fromFile(configFileName); + removeFile(configFileName); + return config; +} +} // namespace facebook::fboss diff --git a/fboss/agent/TestUtils.h b/fboss/agent/TestUtils.h new file mode 100644 index 0000000000000..69e4b79f56d82 --- /dev/null +++ b/fboss/agent/TestUtils.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#pragma once + +#include + +namespace facebook::fboss { +struct AgentConfig; + +std::unique_ptr getConfigFileForTesting(int switchIndex); +} // namespace facebook::fboss diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index e73b078207a0f..853df90012e7b 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -12,8 +12,6 @@ #include #include -#include "fboss/agent/AgentConfig.h" -#include "fboss/agent/AgentDirectoryUtil.h" #include "fboss/agent/AsicUtils.h" #include "fboss/agent/FbossError.h" #include "fboss/agent/FsdbHelper.h" @@ -27,7 +25,6 @@ #include "fboss/agent/state/NdpTable.h" #include "fboss/agent/state/SwitchState.h" #include "fboss/agent/state/Vlan.h" -#include "fboss/lib/CommonFileUtils.h" #include "fboss/agent/gen-cpp2/switch_config_types.h" @@ -1048,23 +1045,4 @@ int numFabricLevels(const std::map& dsfNodes) { }); return maxFabricLevel; } - -std::unique_ptr getConfigFileForTesting(int switchIndex) { - auto configFileName = - AgentDirectoryUtil().getTestHwAgentConfigFile(switchIndex); - std::condition_variable configFileCv; - std::mutex configFileMutex; - std::unique_lock lock(configFileMutex); - XLOG(INFO) << "Waiting on config file " << configFileName - << " to init hw agent"; - while (!checkFileExists(configFileName)) { - configFileCv.wait_for(lock, std::chrono::milliseconds(100), [&]() { - return checkFileExists(configFileName); - }); - } - XLOG(INFO) << "Using config file " << configFileName << " to init hw agent"; - auto config = AgentConfig::fromFile(configFileName); - removeFile(configFileName); - return config; -} } // namespace facebook::fboss diff --git a/fboss/agent/Utils.h b/fboss/agent/Utils.h index d04f7607ae8d8..676c5a803bce3 100644 --- a/fboss/agent/Utils.h +++ b/fboss/agent/Utils.h @@ -442,6 +442,4 @@ bool haveParallelLinksToInterfaceNodes( CpuCosQueueId hwQueueIdToCpuCosQueueId(uint8_t hwQueueId); int numFabricLevels(const std::map& dsfNodes); - -std::unique_ptr getConfigFileForTesting(int switchIndex); } // namespace facebook::fboss From bcc0107bc80108da0dca72ca7b8a6f369a00bfd3 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Thu, 17 Oct 2024 09:05:43 -0700 Subject: [PATCH 165/479] use ethertype to decide matching against SAI_ACL_ENTRY_ATTR_FIELD_ICMP_TYPE or SAI_ACL_ENTRY_ATTR_FIELD_ICMPV6_TYPE Summary: Currently, ACL icmp type/code match would be ignored if proto is not specified. On J3, proto does not work together with icmp type/code right now, see CS00012373216. Before we got brcm-sai enhancement, use ethertype to decide matching against SAI_ACL_ENTRY_ATTR_FIELD_ICMP_TYPE or SAI_ACL_ENTRY_ATTR_FIELD_ICMPV6_TYPE Reviewed By: shri-khare Differential Revision: D64490281 Privacy Context Container: L1125642 fbshipit-source-id: c1e17725c6b7833752009f7f92800677ed3d3a1f --- .../hw/sai/switch/SaiAclTableManager.cpp | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiAclTableManager.cpp b/fboss/agent/hw/sai/switch/SaiAclTableManager.cpp index 120e12260677d..49e9137a42092 100644 --- a/fboss/agent/hw/sai/switch/SaiAclTableManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiAclTableManager.cpp @@ -743,26 +743,34 @@ AclEntrySaiId SaiAclTableManager::addAclEntry( std::optional fieldIcmpV6Code{ std::nullopt}; if (addedAclEntry->getIcmpType()) { - if (addedAclEntry->getProto()) { - if (addedAclEntry->getProto().value() == AclEntry::kProtoIcmp) { - fieldIcmpV4Type = SaiAclEntryTraits::Attributes::FieldIcmpV4Type{ + if ((addedAclEntry->getProto() && + addedAclEntry->getProto().value() == AclEntry::kProtoIcmp) || + (addedAclEntry->getEtherType() && + addedAclEntry->getEtherType().value() == cfg::EtherType::IPv4)) { + fieldIcmpV4Type = SaiAclEntryTraits::Attributes::FieldIcmpV4Type{ + AclEntryFieldU8(std::make_pair( + addedAclEntry->getIcmpType().value(), kIcmpTypeMask))}; + if (addedAclEntry->getIcmpCode()) { + fieldIcmpV4Code = SaiAclEntryTraits::Attributes::FieldIcmpV4Code{ AclEntryFieldU8(std::make_pair( - addedAclEntry->getIcmpType().value(), kIcmpTypeMask))}; - if (addedAclEntry->getIcmpCode()) { - fieldIcmpV4Code = SaiAclEntryTraits::Attributes::FieldIcmpV4Code{ - AclEntryFieldU8(std::make_pair( - addedAclEntry->getIcmpCode().value(), kIcmpCodeMask))}; - } - } else if (addedAclEntry->getProto().value() == AclEntry::kProtoIcmpv6) { - fieldIcmpV6Type = SaiAclEntryTraits::Attributes::FieldIcmpV6Type{ + addedAclEntry->getIcmpCode().value(), kIcmpCodeMask))}; + } + } else if ( + (addedAclEntry->getProto() && + addedAclEntry->getProto().value() == AclEntry::kProtoIcmpv6) || + (addedAclEntry->getEtherType() && + addedAclEntry->getEtherType().value() == cfg::EtherType::IPv6)) { + fieldIcmpV6Type = SaiAclEntryTraits::Attributes::FieldIcmpV6Type{ + AclEntryFieldU8(std::make_pair( + addedAclEntry->getIcmpType().value(), kIcmpTypeMask))}; + if (addedAclEntry->getIcmpCode()) { + fieldIcmpV6Code = SaiAclEntryTraits::Attributes::FieldIcmpV6Code{ AclEntryFieldU8(std::make_pair( - addedAclEntry->getIcmpType().value(), kIcmpTypeMask))}; - if (addedAclEntry->getIcmpCode()) { - fieldIcmpV6Code = SaiAclEntryTraits::Attributes::FieldIcmpV6Code{ - AclEntryFieldU8(std::make_pair( - addedAclEntry->getIcmpCode().value(), kIcmpCodeMask))}; - } + addedAclEntry->getIcmpCode().value(), kIcmpCodeMask))}; } + } else { + throw FbossError( + "proto or etherType not sepcified in ACL when matching icmp type/code"); } } From 026fd1e552d100b8f8adea50f476963238f25116 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Thu, 17 Oct 2024 09:32:14 -0700 Subject: [PATCH 166/479] Updating submodules Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/e273e1330c34dc931b1583516110b7ab74406fdf https://github.com/facebook/buck2-shims-meta/commit/4dbe21665d7ae92b49377b849838c30027668842 https://github.com/facebook/fb303/commit/0394cff4a265b515de139c3e01eefd63ae36a978 https://github.com/facebook/fbthrift/commit/b747cc17021da104c4f8ebf5ae99b307f0eae2d3 https://github.com/facebook/folly/commit/6e300f3a7e540e2ac52ee1546dc125a3cb70d7c3 https://github.com/facebook/mvfst/commit/5f84352adbb956288f454eada1610ba1c5a6148c https://github.com/facebook/proxygen/commit/712b6cd26b2d5250fbca3c77a7b24235d6a90909 https://github.com/facebook/wangle/commit/c7b899a8756d097973e5fb7b6c0eaff1f5a51d91 https://github.com/facebookexperimental/edencommon/commit/79367a4236d4fbc204d57d85aaa8c51b453e2c55 https://github.com/facebookexperimental/rust-shed/commit/2e7315568f5be64b09d77c3f95e079e5e19418d8 https://github.com/facebookincubator/fizz/commit/82e58215d24d4c2c8e166b0171ae68ff18f25449 Reviewed By: bigfootjon fbshipit-source-id: 1270c56f351b151a273fd4285b92ef425bda6a6c --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index d899116cf9bcd..427f62ec575bc 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 75823600ded1798dbfdc35901c0785355fba53fe +Subproject commit 0394cff4a265b515de139c3e01eefd63ae36a978 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 0fb7624a972e0..7602dcce4af1d 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit b10cea26ae3009ccecda8d28450434962ab28344 +Subproject commit b747cc17021da104c4f8ebf5ae99b307f0eae2d3 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 0865d28c3730e..0fe2df71f502a 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit a53e741eb3685b51c68eece133ca3a4c64e1465a +Subproject commit 6e300f3a7e540e2ac52ee1546dc125a3cb70d7c3 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 344381bf2f389..163109af23171 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit e07efce5b192f104406d00ac65137bb5e8352a6e +Subproject commit c7b899a8756d097973e5fb7b6c0eaff1f5a51d91 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index f33def54ef1b1..5a0523fe6e8b5 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 67bf31f595d1551818ec9002e4c48cb7d9f64318 +Subproject commit 82e58215d24d4c2c8e166b0171ae68ff18f25449 From eb835f3f2376796eb21a9394a6591da80e428b52 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Thu, 17 Oct 2024 10:07:02 -0700 Subject: [PATCH 167/479] Add SAI Port TAM Object attribute Summary: Add SAI_PORT_ATTR_TAM_OBJECT attribute to support Mirror on Drop. Reviewed By: nivinl Differential Revision: D64218968 fbshipit-source-id: 9012f96d1cfba1881281c4fe7d839159e7acb744 --- fboss/agent/hw/sai/api/PortApi.h | 7 ++++++ fboss/agent/hw/sai/api/tests/PortApiTest.cpp | 1 + fboss/agent/hw/sai/fake/FakeSaiPort.cpp | 24 +++++++++++++++++++ fboss/agent/hw/sai/fake/FakeSaiPort.h | 1 + .../hw/sai/store/tests/PortStoreTest.cpp | 1 + .../hw/sai/switch/npu/SaiPortManager.cpp | 2 ++ .../hw/sai/switch/phy/SaiPortManager.cpp | 1 + .../hw/sai/switch/tests/PortManagerTest.cpp | 1 + fboss/agent/hw/sai/tracer/PortApiTracer.cpp | 1 + 9 files changed, 39 insertions(+) diff --git a/fboss/agent/hw/sai/api/PortApi.h b/fboss/agent/hw/sai/api/PortApi.h index bf046ae57b243..88dde6c95cfd8 100644 --- a/fboss/agent/hw/sai/api/PortApi.h +++ b/fboss/agent/hw/sai/api/PortApi.h @@ -152,6 +152,11 @@ struct SaiPortTraits { SAI_PORT_ATTR_PKT_TX_ENABLE, bool, SaiBoolDefaultTrue>; + using TamObject = SaiAttribute< + EnumType, + SAI_PORT_ATTR_TAM_OBJECT, + std::vector, + SaiObjectIdListDefault>; using SerdesId = SaiAttribute< EnumType, SAI_PORT_ATTR_PORT_SERDES_ID, @@ -508,6 +513,7 @@ struct SaiPortTraits { std::optional, std::optional, std::optional, + std::optional, std::optional, std::optional, std::optional, @@ -624,6 +630,7 @@ SAI_ATTRIBUTE_NAME(Port, QosQueueList) SAI_ATTRIBUTE_NAME(Port, Type) SAI_ATTRIBUTE_NAME(Port, InterfaceType) SAI_ATTRIBUTE_NAME(Port, PktTxEnable) +SAI_ATTRIBUTE_NAME(Port, TamObject) SAI_ATTRIBUTE_NAME(Port, SerdesId) SAI_ATTRIBUTE_NAME(Port, IngressMirrorSession) SAI_ATTRIBUTE_NAME(Port, EgressMirrorSession) diff --git a/fboss/agent/hw/sai/api/tests/PortApiTest.cpp b/fboss/agent/hw/sai/api/tests/PortApiTest.cpp index d477254a8eb4d..eea55e665d8f5 100644 --- a/fboss/agent/hw/sai/api/tests/PortApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/PortApiTest.cpp @@ -41,6 +41,7 @@ class PortApiTest : public ::testing::Test { #endif std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, + std::nullopt, // TAM object std::nullopt, // Ingress Mirror Session std::nullopt, // Egress Mirror Session std::nullopt, // Ingress Sample Packet diff --git a/fboss/agent/hw/sai/fake/FakeSaiPort.cpp b/fboss/agent/hw/sai/fake/FakeSaiPort.cpp index f3f00dce9482d..c861c8d70d36e 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiPort.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiPort.cpp @@ -54,6 +54,7 @@ sai_status_t create_port_fn( bool disableTtlDecrement{false}; sai_port_interface_type_t interface_type{SAI_PORT_INTERFACE_TYPE_NONE}; bool txEnable{true}; + std::vector tamObjectList; std::optional prbsPolynomial; std::optional prbsConfig; std::optional ingressMacsecAcl; @@ -156,6 +157,11 @@ sai_status_t create_port_fn( case SAI_PORT_ATTR_PKT_TX_ENABLE: txEnable = attr_list[i].value.booldata; break; + case SAI_PORT_ATTR_TAM_OBJECT: + for (int j = 0; j < attr_list[i].value.objlist.count; ++j) { + tamObjectList.push_back(attr_list[i].value.objlist.list[j]); + } + break; case SAI_PORT_ATTR_INGRESS_MIRROR_SESSION: { for (int j = 0; j < attr_list[i].value.objlist.count; ++j) { ingressMirrorList.push_back(attr_list[i].value.objlist.list[j]); @@ -349,6 +355,7 @@ sai_status_t create_port_fn( port.egressSamplePacket = egressSamplePacket; port.disableTtlDecrement = disableTtlDecrement; port.txEnable = txEnable; + port.tamObjectList = tamObjectList; // TODO: Use number of queues by querying SAI_SWITCH_ATTR_NUMBER_OF_QUEUES for (uint8_t queueId = 0; queueId < 8; queueId++) { auto saiQueueId = fs->queueManager.create( @@ -514,6 +521,13 @@ sai_status_t set_port_attribute_fn( case SAI_PORT_ATTR_PKT_TX_ENABLE: port.txEnable = attr->value.booldata; break; + case SAI_PORT_ATTR_TAM_OBJECT: { + auto& tamObjectList = port.tamObjectList; + tamObjectList.clear(); + for (int j = 0; j < attr->value.objlist.count; ++j) { + tamObjectList.push_back(attr->value.objlist.list[j]); + } + } break; case SAI_PORT_ATTR_INGRESS_MIRROR_SESSION: { auto& ingressMirrorList = port.ingressMirrorList; ingressMirrorList.clear(); @@ -860,6 +874,16 @@ sai_status_t get_port_attribute_fn( case SAI_PORT_ATTR_PKT_TX_ENABLE: attr->value.booldata = port.txEnable; break; + case SAI_PORT_ATTR_TAM_OBJECT: + if (port.tamObjectList.size() > attr[i].value.objlist.count) { + attr[i].value.objlist.count = port.tamObjectList.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + for (int j = 0; j < port.tamObjectList.size(); ++j) { + attr[i].value.objlist.list[j] = port.tamObjectList[j]; + } + attr[i].value.objlist.count = port.tamObjectList.size(); + break; case SAI_PORT_ATTR_INGRESS_MIRROR_SESSION: if (port.ingressMirrorList.size() > attr[i].value.objlist.count) { attr[i].value.objlist.count = port.ingressMirrorList.size(); diff --git a/fboss/agent/hw/sai/fake/FakeSaiPort.h b/fboss/agent/hw/sai/fake/FakeSaiPort.h index dbf3e47f17dff..0a7c2a81cea4a 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiPort.h +++ b/fboss/agent/hw/sai/fake/FakeSaiPort.h @@ -53,6 +53,7 @@ struct FakePort { bool disableTtlDecrement{false}; sai_port_interface_type_t interface_type{SAI_PORT_INTERFACE_TYPE_NONE}; bool txEnable{true}; + std::vector tamObjectList; std::vector ingressMirrorList; std::vector egressMirrorList; sai_object_id_t ingressSamplePacket{SAI_NULL_OBJECT_ID}; diff --git a/fboss/agent/hw/sai/store/tests/PortStoreTest.cpp b/fboss/agent/hw/sai/store/tests/PortStoreTest.cpp index 5d3b308351fbb..1babf7f64c2ed 100644 --- a/fboss/agent/hw/sai/store/tests/PortStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/PortStoreTest.cpp @@ -35,6 +35,7 @@ class PortStoreTest : public SaiStoreTest { #endif std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, + std::nullopt, // TAM object std::nullopt, // Ingress Mirror Session std::nullopt, // Egress Mirror Session std::nullopt, // Ingress Sample Packet diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index e70e5647de998..193b6ec20551e 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -665,6 +665,7 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( disableTtl, std::nullopt, pktTxEnable, /* PktTxEnable */ + std::nullopt, // TAM Object std::nullopt, std::nullopt, std::nullopt, @@ -736,6 +737,7 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( disableTtl, interfaceType, std::nullopt, + std::nullopt, // TAM Object std::nullopt, // Ingress Mirror Session std::nullopt, // Egress Mirror Session std::nullopt, // Ingress Sample Packet diff --git a/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp index 75846fc1b9f4c..4ed292be266e3 100644 --- a/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp @@ -258,6 +258,7 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( std::nullopt, std::nullopt, std::nullopt, std::nullopt, intfType, std::nullopt, + std::nullopt, // TAM Object std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, diff --git a/fboss/agent/hw/sai/switch/tests/PortManagerTest.cpp b/fboss/agent/hw/sai/switch/tests/PortManagerTest.cpp index f6232c43a28d0..c0b8434ac8fc0 100644 --- a/fboss/agent/hw/sai/switch/tests/PortManagerTest.cpp +++ b/fboss/agent/hw/sai/switch/tests/PortManagerTest.cpp @@ -131,6 +131,7 @@ class PortManagerTest : public ManagerTestBase { #endif std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, + std::nullopt, // TAM object std::nullopt, // Ingress Mirror Session std::nullopt, // Egress Mirror Session std::nullopt, // Ingress Sample Packet diff --git a/fboss/agent/hw/sai/tracer/PortApiTracer.cpp b/fboss/agent/hw/sai/tracer/PortApiTracer.cpp index 0298e5dd4349e..a62ac487d3305 100644 --- a/fboss/agent/hw/sai/tracer/PortApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/PortApiTracer.cpp @@ -37,6 +37,7 @@ std::map> _PortMap{ SAI_ATTR_MAP(Port, Type), SAI_ATTR_MAP(Port, InterfaceType), SAI_ATTR_MAP(Port, PktTxEnable), + SAI_ATTR_MAP(Port, TamObject), SAI_ATTR_MAP(Port, SerdesId), SAI_ATTR_MAP(Port, IngressMirrorSession), SAI_ATTR_MAP(Port, EgressMirrorSession), From 9eb3cdfbbc92c28c8ace4ed54d0138dd91ee22f1 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Thu, 17 Oct 2024 10:07:02 -0700 Subject: [PATCH 168/479] SaiPortManager APIs to set TamObject Summary: Add APIs to associate TamObject with a port. Reviewed By: nivinl Differential Revision: D64345715 fbshipit-source-id: 25a5bc1170c067bddd642e56e499ab528a3598ec --- fboss/agent/hw/sai/switch/SaiPortManager.cpp | 13 +++++++++++++ fboss/agent/hw/sai/switch/SaiPortManager.h | 3 +++ 2 files changed, 16 insertions(+) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index d4bc533ea40b9..4175d862bab16 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -2194,6 +2194,19 @@ void SaiPortManager::changeQosPolicy( setQosPolicy(newPort->getID(), newPort->getQosPolicy()); } +void SaiPortManager::setTamObject( + PortID portId, + std::vector tamObjects) { + getPortHandle(portId)->port->setOptionalAttribute( + SaiPortTraits::Attributes::TamObject{std::move(tamObjects)}); +} + +void SaiPortManager::resetTamObject(PortID portId) { + getPortHandle(portId)->port->setOptionalAttribute( + SaiPortTraits::Attributes::TamObject{ + std::vector{SAI_NULL_OBJECT_ID}}); +} + void SaiPortManager::programSampling( PortID portId, SamplePacketDirection direction, diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.h b/fboss/agent/hw/sai/switch/SaiPortManager.h index 4b38a2d0c8643..cb85fde890433 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.h +++ b/fboss/agent/hw/sai/switch/SaiPortManager.h @@ -200,6 +200,9 @@ class SaiPortManager { void clearQosPolicy(const std::shared_ptr& qosPolicy); void clearQosPolicy(); + void setTamObject(PortID portId, std::vector tamObject); + void resetTamObject(PortID portId); + std::shared_ptr reconstructPortsFromStore( cfg::SwitchType switchType) const; From c4f6f8b82df83a620cc00bf7330276eea9c3d21a Mon Sep 17 00:00:00 2001 From: Max Ng Date: Thu, 17 Oct 2024 10:07:02 -0700 Subject: [PATCH 169/479] Add SAI TAM Transport src/dst mac extension attributes Summary: Add the following attributes required for Mirror on Drop: - SAI_TAM_TRANSPORT_ATTR_SRC_MAC_ADDRESS - SAI_TAM_TRANSPORT_ATTR_DST_MAC_ADDRESS Reviewed By: nivinl Differential Revision: D64058084 fbshipit-source-id: e47980b781dddaddc1553c57dde759916bf4d526 --- fboss/agent/hw/sai/api/TamApi.h | 42 ++++++++++++++++++- fboss/agent/hw/sai/api/bcm/TamApi.cpp | 10 +++++ .../hw/sai/api/fake/FakeSaiExtensions.cpp | 10 +++++ .../agent/hw/sai/api/fake/saifakeextensions.h | 2 + fboss/agent/hw/sai/api/oss/TamApi.cpp | 10 +++++ fboss/agent/hw/sai/api/tajo/TamApi.cpp | 10 +++++ fboss/agent/hw/sai/api/tests/TamApiTest.cpp | 14 ++++--- fboss/agent/hw/sai/fake/FakeSaiTam.cpp | 31 +++++++++++++- fboss/agent/hw/sai/fake/FakeSaiTam.h | 11 ++++- .../agent/hw/sai/store/tests/TamStoreTest.cpp | 35 ++++++++++++++-- fboss/agent/hw/sai/tracer/TamApiTracer.cpp | 2 + 11 files changed, 165 insertions(+), 12 deletions(-) diff --git a/fboss/agent/hw/sai/api/TamApi.h b/fboss/agent/hw/sai/api/TamApi.h index 6ba89db27d465..e7960afacb219 100644 --- a/fboss/agent/hw/sai/api/TamApi.h +++ b/fboss/agent/hw/sai/api/TamApi.h @@ -2,6 +2,9 @@ #pragma once +#include +#include + #include "fboss/agent/hw/sai/api/SaiApi.h" #include "fboss/agent/hw/sai/api/SaiAttribute.h" #include "fboss/agent/hw/sai/api/SaiAttributeDataTypes.h" @@ -67,13 +70,26 @@ struct SaiTamTransportTraits { SaiAttribute; using Mtu = SaiAttribute; + /* extension attributes */ + struct AttributeSrcMacAddress { + std::optional operator()(); + }; + using SrcMacAddress = + SaiExtensionAttribute; + struct AttributeDstMacAddress { + std::optional operator()(); + }; + using DstMacAddress = + SaiExtensionAttribute; }; using AdapterKey = TamTransportSaiId; using AdapterHostKey = std::tuple< Attributes::Type, Attributes::SrcPort, Attributes::DstPort, - Attributes::Mtu>; + Attributes::Mtu, + std::optional, + std::optional>; using CreateAttributes = AdapterHostKey; }; @@ -81,6 +97,8 @@ SAI_ATTRIBUTE_NAME(TamTransport, Type) SAI_ATTRIBUTE_NAME(TamTransport, SrcPort) SAI_ATTRIBUTE_NAME(TamTransport, DstPort) SAI_ATTRIBUTE_NAME(TamTransport, Mtu) +SAI_ATTRIBUTE_NAME(TamTransport, SrcMacAddress) +SAI_ATTRIBUTE_NAME(TamTransport, DstMacAddress) struct SaiTamReportTraits { static constexpr sai_object_type_t ObjectType = SAI_OBJECT_TYPE_TAM_REPORT; @@ -331,3 +349,25 @@ class TamApi : public SaiApi { }; } // namespace facebook::fboss + +namespace std { + +template <> +struct hash { + size_t operator()( + const facebook::fboss::SaiTamTransportTraits::Attributes::SrcMacAddress& + key) const { + return std::hash()(key.value()); + } +}; + +template <> +struct hash { + size_t operator()( + const facebook::fboss::SaiTamTransportTraits::Attributes::DstMacAddress& + key) const { + return std::hash()(key.value()); + } +}; + +} // namespace std diff --git a/fboss/agent/hw/sai/api/bcm/TamApi.cpp b/fboss/agent/hw/sai/api/bcm/TamApi.cpp index c7d70df74bc1a..d82f829415e67 100644 --- a/fboss/agent/hw/sai/api/bcm/TamApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/TamApi.cpp @@ -22,4 +22,14 @@ SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return std::nullopt; } +std::optional +SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { + return SAI_TAM_TRANSPORT_ATTR_SRC_MAC_ADDRESS; +} + +std::optional +SaiTamTransportTraits::Attributes::AttributeDstMacAddress::operator()() { + return SAI_TAM_TRANSPORT_ATTR_DST_MAC_ADDRESS; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp index 7ce36a6cf4f01..26060b785f183 100644 --- a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp +++ b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp @@ -58,6 +58,16 @@ SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID; } +std::optional +SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { + return SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS; +} + +std::optional +SaiTamTransportTraits::Attributes::AttributeDstMacAddress::operator()() { + return SAI_TAM_TRANSPORT_ATTR_FAKE_DST_MAC_ADDRESS; +} + std::optional SaiSwitchTraits::Attributes::AttributeAclFieldListWrapper::operator()() { return SAI_SWITCH_ATTR_EXT_FAKE_ACL_FIELD_LIST; diff --git a/fboss/agent/hw/sai/api/fake/saifakeextensions.h b/fboss/agent/hw/sai/api/fake/saifakeextensions.h index 5be04dede7339..6bd4906b34d09 100644 --- a/fboss/agent/hw/sai/api/fake/saifakeextensions.h +++ b/fboss/agent/hw/sai/api/fake/saifakeextensions.h @@ -79,6 +79,8 @@ typedef enum _sai_switch_extensions_attr_t { typedef enum _sai_tam_event_extensions_attr_t { SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE = SAI_TAM_EVENT_ATTR_END, SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID, + SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS = SAI_TAM_TRANSPORT_ATTR_END, + SAI_TAM_TRANSPORT_ATTR_FAKE_DST_MAC_ADDRESS, } sai_tam_event_extensions_attr_t; typedef enum _sai_port_extensions_attr_t { diff --git a/fboss/agent/hw/sai/api/oss/TamApi.cpp b/fboss/agent/hw/sai/api/oss/TamApi.cpp index 695754203903c..b83968e6395b8 100644 --- a/fboss/agent/hw/sai/api/oss/TamApi.cpp +++ b/fboss/agent/hw/sai/api/oss/TamApi.cpp @@ -14,4 +14,14 @@ SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return std::nullopt; } +std::optional +SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { + return std::nullopt; +} + +std::optional +SaiTamTransportTraits::Attributes::AttributeDstMacAddress::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tajo/TamApi.cpp b/fboss/agent/hw/sai/api/tajo/TamApi.cpp index c9f672464149a..8955959fbe2ea 100644 --- a/fboss/agent/hw/sai/api/tajo/TamApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/TamApi.cpp @@ -18,4 +18,14 @@ SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return std::nullopt; } +std::optional +SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { + return std::nullopt; +} + +std::optional +SaiTamTransportTraits::Attributes::AttributeDstMacAddress::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp index cf32a004e52f7..affebfc7db44b 100644 --- a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp @@ -1,13 +1,13 @@ // Copyright 2004-present Facebook. All Rights Reserved. -#include "fboss/agent/hw/sai/api/TamApi.h" -#include "fboss/agent/hw/sai/api/SaiObjectApi.h" -#include "fboss/agent/hw/sai/fake/FakeSai.h" - +#include #include - #include +#include "fboss/agent/hw/sai/api/SaiObjectApi.h" +#include "fboss/agent/hw/sai/api/TamApi.h" +#include "fboss/agent/hw/sai/fake/FakeSai.h" + using namespace facebook::fboss; class TamApiTest : public ::testing::Test { @@ -87,6 +87,10 @@ TEST_F(TamApiTest, TamTransport) { std::get(transportAttr) = 10001; std::get(transportAttr) = 10002; std::get(transportAttr) = 1500; + std::get>( + transportAttr) = folly::MacAddress("00:00:00:00:00:01"); + std::get>( + transportAttr) = folly::MacAddress("00:00:00:00:00:02"); auto transportSaiId = tamApi->create(transportAttr, switchId); diff --git a/fboss/agent/hw/sai/fake/FakeSaiTam.cpp b/fboss/agent/hw/sai/fake/FakeSaiTam.cpp index 96e1bdfbca55a..18471137cc06b 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiTam.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiTam.cpp @@ -407,6 +407,8 @@ sai_status_t create_tam_transport( sai_uint32_t srcPort{}; sai_uint32_t dstPort{}; sai_uint32_t mtu{}; + std::optional srcMac; + std::optional dstMac; for (auto i = 0; i < attr_count; i++) { switch (attr_list[i].id) { @@ -426,12 +428,21 @@ sai_status_t create_tam_transport( mtu = attr_list[i].value.u32; break; + case SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS: + srcMac = facebook::fboss::fromSaiMacAddress(attr_list[i].value.mac); + break; + + case SAI_TAM_TRANSPORT_ATTR_FAKE_DST_MAC_ADDRESS: + dstMac = facebook::fboss::fromSaiMacAddress(attr_list[i].value.mac); + break; + default: return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; } } auto fs = FakeSai::getInstance(); - *id = fs->tamTransportManager.create(transportType, srcPort, dstPort, mtu); + *id = fs->tamTransportManager.create( + transportType, srcPort, dstPort, mtu, srcMac, dstMac); return SAI_STATUS_SUCCESS; } @@ -465,6 +476,16 @@ sai_status_t get_tam_transport_attribute( attr_list[i].value.u32 = transport.mtu_; break; + case SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS: + facebook::fboss::toSaiMacAddress( + transport.srcMac_.value(), attr_list[i].value.mac); + break; + + case SAI_TAM_TRANSPORT_ATTR_FAKE_DST_MAC_ADDRESS: + facebook::fboss::toSaiMacAddress( + transport.dstMac_.value(), attr_list[i].value.mac); + break; + default: return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; } @@ -495,6 +516,14 @@ sai_status_t set_tam_transport_attribute( transport.mtu_ = attr->value.u32; break; + case SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS: + transport.srcMac_ = facebook::fboss::fromSaiMacAddress(attr->value.mac); + break; + + case SAI_TAM_TRANSPORT_ATTR_FAKE_DST_MAC_ADDRESS: + transport.dstMac_ = facebook::fboss::fromSaiMacAddress(attr->value.mac); + break; + default: return SAI_STATUS_ATTR_NOT_SUPPORTED_0; } diff --git a/fboss/agent/hw/sai/fake/FakeSaiTam.h b/fboss/agent/hw/sai/fake/FakeSaiTam.h index 86386ae768562..b3a2d640e13f1 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiTam.h +++ b/fboss/agent/hw/sai/fake/FakeSaiTam.h @@ -5,6 +5,7 @@ #include "fboss/agent/hw/sai/fake/FakeManager.h" #include +#include extern "C" { #include @@ -62,16 +63,22 @@ class FakeSaiTamTransport { sai_int32_t transportType, sai_uint32_t srcPort, sai_uint32_t dstPort, - sai_uint32_t mtu) + sai_uint32_t mtu, + std::optional srcMac, + std::optional dstMac) : transportType_(transportType), srcPort_(srcPort), dstPort_(dstPort), - mtu_(mtu) {} + mtu_(mtu), + srcMac_(srcMac), + dstMac_(dstMac) {} sai_object_id_t id; sai_int32_t transportType_; sai_uint32_t srcPort_; sai_uint32_t dstPort_; sai_uint32_t mtu_; + std::optional srcMac_; + std::optional dstMac_; }; class FakeSaiTamCollector { diff --git a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp index 832051dfda57f..7e3ef2dbed989 100644 --- a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp @@ -1,5 +1,7 @@ // Copyright 2004-present Facebook. All Rights Reserved. +#include + #include "fboss/agent/hw/sai/api/TamApi.h" #include "fboss/agent/hw/sai/fake/FakeSai.h" #include "fboss/agent/hw/sai/store/SaiObject.h" @@ -36,14 +38,17 @@ class TamStoreTest : public SaiStoreTest { return result; } - facebook::fboss::SaiTamTransportTraits::CreateAttributes - tamTransportTraits() { - SaiTamTransportTraits::CreateAttributes result; + facebook::fboss::SaiTamTransportTraits::AdapterHostKey tamTransportTraits() { + SaiTamTransportTraits::AdapterHostKey result; std::get(result) = SAI_TAM_TRANSPORT_TYPE_UDP; std::get(result) = 10001; std::get(result) = 10002; std::get(result) = 1500; + std::get>( + result) = folly::MacAddress("00:00:00:00:00:01"); + std::get>( + result) = folly::MacAddress("00:00:00:00:00:02"); return result; } @@ -182,6 +187,18 @@ TEST_F(TamStoreTest, tamCtors) { GET_ATTR(TamTransport, Mtu, transportObj.attributes()), std::get(tamTransportAhk) .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamTransport, SrcMacAddress, transportObj.attributes()), + std::get>( + tamTransportAhk) + .value() + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamTransport, DstMacAddress, transportObj.attributes()), + std::get>( + tamTransportAhk) + .value() + .value()); auto collectorObjV4 = createObj(collectorV4); auto tamCollectorAhkV4 = tamCollectorTraits(transport, true /* ipV4 */); @@ -294,6 +311,18 @@ TEST_F(TamStoreTest, setObject) { EXPECT_EQ( GET_ATTR(TamTransport, Mtu, transport->attributes()), std::get(transportAhk).value()); + EXPECT_EQ( + GET_OPT_ATTR(TamTransport, SrcMacAddress, transport->attributes()), + std::get>( + transportAhk) + .value() + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamTransport, DstMacAddress, transport->attributes()), + std::get>( + transportAhk) + .value() + .value()); auto collectorAhkV4 = tamCollectorTraits(transport->adapterKey(), true /* ipV4 */); diff --git a/fboss/agent/hw/sai/tracer/TamApiTracer.cpp b/fboss/agent/hw/sai/tracer/TamApiTracer.cpp index b19942978d263..320d3582912a3 100644 --- a/fboss/agent/hw/sai/tracer/TamApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/TamApiTracer.cpp @@ -55,6 +55,8 @@ std::map> _TamCollectorMap{ void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(TamEvent, SwitchEventType) SAI_EXT_ATTR_MAP(TamEvent, SwitchEventId) + SAI_EXT_ATTR_MAP(TamTransport, SrcMacAddress) + SAI_EXT_ATTR_MAP(TamTransport, DstMacAddress) } } // namespace From 7af70f78803cba3270770cf43438a0d6b39a1497 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Thu, 17 Oct 2024 10:07:02 -0700 Subject: [PATCH 170/479] Add SAI TAM Event extension attributes Summary: Add attributes required for Mirror on Drop on J3: - SAI_TAM_EVENT_ATTR_EXTENSIONS_COLLECTOR_LIST - SAI_TAM_EVENT_ATTR_PACKET_DROP_TYPE_MMU - SAI_TAM_EVENT_ATTR_AGING_GROUP Reviewed By: nivinl Differential Revision: D64201667 fbshipit-source-id: f73c57436f37656120f4c6d617a49b50383d4cfa --- fboss/agent/hw/sai/api/TamApi.h | 34 +++- fboss/agent/hw/sai/api/bcm/TamApi.cpp | 35 ++++ .../hw/sai/api/fake/FakeSaiExtensions.cpp | 20 ++ .../agent/hw/sai/api/fake/saifakeextensions.h | 4 + fboss/agent/hw/sai/api/oss/TamApi.cpp | 20 ++ fboss/agent/hw/sai/api/tajo/TamApi.cpp | 20 ++ fboss/agent/hw/sai/api/tests/TamApiTest.cpp | 17 ++ fboss/agent/hw/sai/fake/FakeSaiTam.cpp | 178 ++++++++++++++---- fboss/agent/hw/sai/fake/FakeSaiTam.h | 19 +- .../agent/hw/sai/store/tests/TamStoreTest.cpp | 17 ++ fboss/agent/hw/sai/tracer/TamApiTracer.cpp | 4 + 11 files changed, 325 insertions(+), 43 deletions(-) diff --git a/fboss/agent/hw/sai/api/TamApi.h b/fboss/agent/hw/sai/api/TamApi.h index e7960afacb219..a1292fd896718 100644 --- a/fboss/agent/hw/sai/api/TamApi.h +++ b/fboss/agent/hw/sai/api/TamApi.h @@ -153,18 +153,43 @@ struct SaiTamEventTraits { using SwitchEventType = SaiExtensionAttribute< std::vector, AttributeSwitchEventType>; - + struct AttributeDeviceId { + std::optional operator()(); + }; + using DeviceId = SaiExtensionAttribute; struct AttributeEventId { std::optional operator()(); }; using SwitchEventId = SaiExtensionAttribute; + struct AttributeExtensionsCollectorList { + std::optional operator()(); + }; + using ExtensionsCollectorList = SaiExtensionAttribute< + std::vector, + AttributeExtensionsCollectorList>; + struct AttributePacketDropTypeMmu { + std::optional operator()(); + }; + using PacketDropTypeMmu = SaiExtensionAttribute< + std::vector, + AttributePacketDropTypeMmu>; + struct AttributeAgingGroup { + std::optional operator()(); + }; + using AgingGroup = + SaiExtensionAttribute; }; using AdapterKey = TamEventSaiId; using AdapterHostKey = std::tuple< Attributes::Type, Attributes::ActionList, Attributes::CollectorList, - Attributes::SwitchEventType>; + Attributes::SwitchEventType, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional>; using CreateAttributes = AdapterHostKey; }; @@ -172,6 +197,11 @@ SAI_ATTRIBUTE_NAME(TamEvent, Type) SAI_ATTRIBUTE_NAME(TamEvent, ActionList) SAI_ATTRIBUTE_NAME(TamEvent, CollectorList) SAI_ATTRIBUTE_NAME(TamEvent, SwitchEventType) +SAI_ATTRIBUTE_NAME(TamEvent, DeviceId) +SAI_ATTRIBUTE_NAME(TamEvent, SwitchEventId) +SAI_ATTRIBUTE_NAME(TamEvent, ExtensionsCollectorList) +SAI_ATTRIBUTE_NAME(TamEvent, PacketDropTypeMmu) +SAI_ATTRIBUTE_NAME(TamEvent, AgingGroup) struct SaiTamTraits { static constexpr sai_object_type_t ObjectType = SAI_OBJECT_TYPE_TAM; diff --git a/fboss/agent/hw/sai/api/bcm/TamApi.cpp b/fboss/agent/hw/sai/api/bcm/TamApi.cpp index d82f829415e67..a2addb6b82605 100644 --- a/fboss/agent/hw/sai/api/bcm/TamApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/TamApi.cpp @@ -17,8 +17,43 @@ SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { return std::nullopt; } +std::optional +SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_TAM_EVENT_ATTR_DEVICE_ID; +#endif + return std::nullopt; +} + std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_TAM_EVENT_ATTR_EVENT_ID; +#endif + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_TAM_EVENT_ATTR_EXTENSIONS_COLLECTOR_LIST; +#endif + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_TAM_EVENT_ATTR_PACKET_DROP_TYPE_MMU; +#endif + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_TAM_EVENT_ATTR_AGING_GROUP; +#endif return std::nullopt; } diff --git a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp index 26060b785f183..2d4d3fe895789 100644 --- a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp +++ b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp @@ -53,11 +53,31 @@ SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { return SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE; } +std::optional +SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { + return SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID; +} + std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID; } +std::optional +SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { + return SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST; +} + +std::optional +SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { + return SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { + return SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP; +} + std::optional SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { return SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS; diff --git a/fboss/agent/hw/sai/api/fake/saifakeextensions.h b/fboss/agent/hw/sai/api/fake/saifakeextensions.h index 6bd4906b34d09..877d7afc683e9 100644 --- a/fboss/agent/hw/sai/api/fake/saifakeextensions.h +++ b/fboss/agent/hw/sai/api/fake/saifakeextensions.h @@ -78,7 +78,11 @@ typedef enum _sai_switch_extensions_attr_t { typedef enum _sai_tam_event_extensions_attr_t { SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE = SAI_TAM_EVENT_ATTR_END, + SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID, SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID, + SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST, + SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU, + SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP, SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS = SAI_TAM_TRANSPORT_ATTR_END, SAI_TAM_TRANSPORT_ATTR_FAKE_DST_MAC_ADDRESS, } sai_tam_event_extensions_attr_t; diff --git a/fboss/agent/hw/sai/api/oss/TamApi.cpp b/fboss/agent/hw/sai/api/oss/TamApi.cpp index b83968e6395b8..d3e406f73d2cc 100644 --- a/fboss/agent/hw/sai/api/oss/TamApi.cpp +++ b/fboss/agent/hw/sai/api/oss/TamApi.cpp @@ -9,11 +9,31 @@ SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { return std::nullopt; } +std::optional +SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { + return std::nullopt; +} + std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return std::nullopt; } +std::optional +SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { + return std::nullopt; +} + std::optional SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { return std::nullopt; diff --git a/fboss/agent/hw/sai/api/tajo/TamApi.cpp b/fboss/agent/hw/sai/api/tajo/TamApi.cpp index 8955959fbe2ea..d72d802183b02 100644 --- a/fboss/agent/hw/sai/api/tajo/TamApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/TamApi.cpp @@ -13,11 +13,31 @@ SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { return SAI_TAM_EVENT_ATTR_SWITCH_EVENT_TYPE; } +std::optional +SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { + return std::nullopt; +} + std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return std::nullopt; } +std::optional +SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { + return std::nullopt; +} + std::optional SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { return std::nullopt; diff --git a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp index affebfc7db44b..cc45aabc0f1a0 100644 --- a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp @@ -142,6 +142,12 @@ TEST_F(TamApiTest, TamEvent) { std::vector eventCollectors{SAI_NULL_OBJECT_ID}; std::vector eventTypes{1, 2, 3, 4}; // parity error e.g. + sai_int32_t deviceId = 0; + sai_int32_t eventId = 1; + std::vector extensionsCollectorList{10}; + std::vector packetDropTypeMmu = {3, 4}; + sai_object_id_t agingGroup = 20; + SaiTamEventTraits::CreateAttributes eventAttr; std::get(eventAttr) = SAI_TAM_EVENT_TYPE_PACKET_DROP; // type of Event @@ -150,6 +156,17 @@ TEST_F(TamApiTest, TamEvent) { eventCollectors; std::get(eventAttr) = eventTypes; + std::get>(eventAttr) = + deviceId; + std::get>( + eventAttr) = eventId; + std::get< + std::optional>( + eventAttr) = extensionsCollectorList; + std::get>( + eventAttr) = packetDropTypeMmu; + std::get>( + eventAttr) = agingGroup; auto eventSaiId = tamApi->create(eventAttr, switchId); EXPECT_EQ( diff --git a/fboss/agent/hw/sai/fake/FakeSaiTam.cpp b/fboss/agent/hw/sai/fake/FakeSaiTam.cpp index 18471137cc06b..c23b3e72a9c31 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiTam.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiTam.cpp @@ -125,6 +125,12 @@ sai_status_t create_tam_event( std::vector collectors{}; std::vector switchEvents{}; + sai_int32_t deviceId{}; + sai_int32_t eventId{}; + std::vector extensionsCollectorList{}; + std::vector packetDropTypeMmu{}; + sai_object_id_t agingGroup{}; + for (auto i = 0; i < attr_count; i++) { switch (attr_list[i].id) { case SAI_TAM_EVENT_ATTR_TYPE: @@ -152,13 +158,47 @@ sai_status_t create_tam_event( std::back_inserter(switchEvents)); break; + case SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID: + deviceId = attr_list[i].value.s32; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID: + eventId = attr_list[i].value.s32; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST: + std::copy( + attr_list[i].value.objlist.list, + attr_list[i].value.objlist.list + attr_list[i].value.objlist.count, + std::back_inserter(extensionsCollectorList)); + break; + + case SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU: + std::copy( + attr_list[i].value.s32list.list, + attr_list[i].value.s32list.list + attr_list[i].value.s32list.count, + std::back_inserter(packetDropTypeMmu)); + break; + + case SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP: + agingGroup = attr_list[i].value.oid; + break; + default: return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; } } auto fs = FakeSai::getInstance(); - *id = - fs->tamEventManager.create(eventType, actions, collectors, switchEvents); + *id = fs->tamEventManager.create( + eventType, + actions, + collectors, + switchEvents, + deviceId, + eventId, + extensionsCollectorList, + packetDropTypeMmu, + agingGroup); return SAI_STATUS_SUCCESS; } @@ -211,6 +251,44 @@ sai_status_t get_tam_event_attribute( } break; + case SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID: + attr_list[i].value.s32 = eventAction.deviceId_; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID: + attr_list[i].value.s32 = eventAction.eventId_; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST: + if (attr_list[i].value.objlist.count < + eventAction.extensionsCollectorList_.size()) { + attr_list[i].value.objlist.count = + eventAction.extensionsCollectorList_.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + for (auto j = 0; j < attr_list[i].value.objlist.count; j++) { + attr_list[i].value.objlist.list[j] = + eventAction.extensionsCollectorList_[j]; + } + break; + + case SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU: + if (attr_list[i].value.s32list.count < + eventAction.packetDropTypeMmu_.size()) { + attr_list[i].value.s32list.count = + eventAction.packetDropTypeMmu_.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + for (auto j = 0; j < attr_list[i].value.s32list.count; j++) { + attr_list[i].value.s32list.list[j] = + eventAction.packetDropTypeMmu_[j]; + } + break; + + case SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP: + attr_list[i].value.oid = eventAction.agingGroup_; + break; + default: return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; } @@ -220,48 +298,70 @@ sai_status_t get_tam_event_attribute( sai_status_t set_tam_event_attribute( sai_object_id_t id, - const sai_attribute_t* attr_list) { - sai_int32_t eventType{}; - std::vector actions{}; - std::vector collectors{}; - std::vector switchEvents{}; + const sai_attribute_t* attr) { + try { + auto fs = FakeSai::getInstance(); + auto& tamEvent = fs->tamEventManager.get(id); + switch (attr->id) { + case SAI_TAM_EVENT_ATTR_TYPE: + tamEvent.eventType_ = attr->value.s32; + break; - switch (attr_list[0].id) { - case SAI_TAM_EVENT_ATTR_TYPE: - eventType = attr_list[0].value.s32; - break; + case SAI_TAM_EVENT_ATTR_ACTION_LIST: + tamEvent.actions_.clear(); + std::copy( + attr->value.objlist.list, + attr->value.objlist.list + attr->value.objlist.count, + std::back_inserter(tamEvent.actions_)); + break; - case SAI_TAM_EVENT_ATTR_ACTION_LIST: - std::copy( - attr_list[0].value.objlist.list, - attr_list[0].value.objlist.list + attr_list[0].value.objlist.count, - std::back_inserter(actions)); - break; + case SAI_TAM_EVENT_ATTR_COLLECTOR_LIST: + tamEvent.collectors_.clear(); + std::copy( + attr->value.objlist.list, + attr->value.objlist.list + attr->value.objlist.count, + std::back_inserter(tamEvent.collectors_)); + break; - case SAI_TAM_EVENT_ATTR_COLLECTOR_LIST: - std::copy( - attr_list[0].value.objlist.list, - attr_list[0].value.objlist.list + attr_list[0].value.objlist.count, - std::back_inserter(collectors)); - break; + case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE: + tamEvent.switchEvents_.clear(); + std::copy( + attr->value.s32list.list, + attr->value.s32list.list + attr->value.s32list.count, + std::back_inserter(tamEvent.switchEvents_)); + break; - case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE: - std::copy( - attr_list[0].value.s32list.list, - attr_list[0].value.s32list.list + attr_list[0].value.s32list.count, - std::back_inserter(switchEvents)); - break; + case SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID: + tamEvent.deviceId_ = attr->value.s32; + break; - default: - return SAI_STATUS_ATTR_NOT_SUPPORTED_0; - } - try { - auto fs = FakeSai::getInstance(); - auto& tamEvent = fs->tamEventManager.get(id); - tamEvent.eventType_ = eventType; - tamEvent.actions_ = actions; - tamEvent.collectors_ = collectors; - tamEvent.switchEvents_ = switchEvents; + case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID: + tamEvent.eventId_ = attr->value.s32; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST: + tamEvent.extensionsCollectorList_.clear(); + std::copy( + attr->value.objlist.list, + attr->value.objlist.list + attr->value.objlist.count, + std::back_inserter(tamEvent.extensionsCollectorList_)); + break; + + case SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU: + tamEvent.packetDropTypeMmu_.clear(); + std::copy( + attr->value.s32list.list, + attr->value.s32list.list + attr->value.s32list.count, + std::back_inserter(tamEvent.packetDropTypeMmu_)); + break; + + case SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP: + tamEvent.agingGroup_ = attr->value.oid; + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0; + } } catch (...) { return SAI_STATUS_ITEM_NOT_FOUND; } diff --git a/fboss/agent/hw/sai/fake/FakeSaiTam.h b/fboss/agent/hw/sai/fake/FakeSaiTam.h index b3a2d640e13f1..c480a096ce307 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiTam.h +++ b/fboss/agent/hw/sai/fake/FakeSaiTam.h @@ -31,16 +31,31 @@ class FakeSaiTamEvent { sai_int32_t eventType, const std::vector& actions, const std::vector& collectors, - const std::vector& switchEvents) + const std::vector& switchEvents, + sai_int32_t deviceId, + sai_int32_t eventId, + std::vector extensionsCollectorList, + std::vector packetDropTypeMmu, + sai_object_id_t agingGroup) : eventType_(eventType), actions_(actions), collectors_(collectors), - switchEvents_(switchEvents) {} + switchEvents_(switchEvents), + deviceId_(deviceId), + eventId_(eventId), + extensionsCollectorList_(std::move(extensionsCollectorList)), + packetDropTypeMmu_(std::move(packetDropTypeMmu)), + agingGroup_(agingGroup) {} sai_object_id_t id; sai_int32_t eventType_; std::vector actions_; std::vector collectors_; std::vector switchEvents_; + sai_int32_t deviceId_; + sai_int32_t eventId_; + std::vector extensionsCollectorList_; + std::vector packetDropTypeMmu_; + sai_object_id_t agingGroup_; }; class FakeSaiTamEventAction { diff --git a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp index 7e3ef2dbed989..ef570028b3f83 100644 --- a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp @@ -68,6 +68,12 @@ class TamStoreTest : public SaiStoreTest { std::vector collectors{SAI_NULL_OBJECT_ID}; std::vector eventTypes{1, 2, 3, 4}; + sai_int32_t deviceId = 0; + sai_int32_t eventId = 1; + std::vector extensionsCollectorList{10}; + std::vector packetDropTypeMmu = {3, 4}; + sai_object_id_t agingGroup = 20; + SaiTamEventTraits::CreateAttributes result; std::get(result) = SAI_TAM_EVENT_TYPE_PACKET_DROP; @@ -75,6 +81,17 @@ class TamStoreTest : public SaiStoreTest { std::get(result) = collectors; std::get(result) = eventTypes; + std::get>(result) = + deviceId; + std::get>( + result) = eventId; + std::get< + std::optional>( + result) = extensionsCollectorList; + std::get>( + result) = packetDropTypeMmu; + std::get>(result) = + agingGroup; return result; } diff --git a/fboss/agent/hw/sai/tracer/TamApiTracer.cpp b/fboss/agent/hw/sai/tracer/TamApiTracer.cpp index 320d3582912a3..5ac31ca4158e1 100644 --- a/fboss/agent/hw/sai/tracer/TamApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/TamApiTracer.cpp @@ -54,7 +54,11 @@ std::map> _TamCollectorMap{ void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(TamEvent, SwitchEventType) + SAI_EXT_ATTR_MAP(TamEvent, DeviceId) SAI_EXT_ATTR_MAP(TamEvent, SwitchEventId) + SAI_EXT_ATTR_MAP(TamEvent, ExtensionsCollectorList) + SAI_EXT_ATTR_MAP(TamEvent, PacketDropTypeMmu) + SAI_EXT_ATTR_MAP(TamEvent, AgingGroup) SAI_EXT_ATTR_MAP(TamTransport, SrcMacAddress) SAI_EXT_ATTR_MAP(TamTransport, DstMacAddress) } From 27740436fc5a6c4a8aa1826d6c32aca4bbd353cf Mon Sep 17 00:00:00 2001 From: Max Ng Date: Thu, 17 Oct 2024 10:07:02 -0700 Subject: [PATCH 171/479] Make TamEvent::SwitchEventType optional Summary: TamEvent::SwitchEventType is currently a non-optional part of TamEvent::CreateAttribute. However it's not supported by [broadcom SDK](https://www.internalfb.com/code/fbsource/[3fe38940ae02]/fbcode/fboss/agent/hw/sai/api/bcm/TamApi.cpp?lines=17), and attempting to create a TamEvent causes the following error: ``` F1016 16:00:58.424264 603833 SaiAttribute.h:906] Check failed: id.has_value() unknown id *** Check failure stack trace: *** *** Aborted at 1729119658 (Unix time, try 'date -d 1729119658') *** *** Signal 6 (SIGABRT) (0x925a2) received by PID 599458 (pthread TID 0x7fdd1adb7640) (linux TID 603833) (maybe from PID 599458, UID 0) (code: -6), stack trace: *** @ 0000000027b40ebb (unknown) @ 00000000000442df (unknown) @ 0000000000099783 pthread_kill @ 000000000004422c raise @ 000000000002c432 abort @ 000000001a2fc3c9 google::LogMessage::Fail() @ 000000001a300604 google::LogMessage::SendToLog() @ 000000001a2fc042 google::LogMessage::Flush() @ 000000001a2fcd18 google::LogMessageFatal::~LogMessageFatal() @ 0000000029098a0b facebook::fboss::SaiExtensionAttribute >, facebook::fboss::SaiTamEventTraits::Attributes::AttributeSwitchEventType, void>::kExtensionAttributeId() @ 000000002e525b13 facebook::fboss::SaiTamManager::setupMirrorOnDrop(folly::IPAddress, facebook::fboss::PortID) ``` This commit makes the attribute optional so that the invalid access is avoided. There is no functional impact to either bcm or tajo code paths. Reviewed By: nivinl Differential Revision: D64337375 fbshipit-source-id: 423f673f7076d5ae19f985d82a78e1cee675f863 --- fboss/agent/hw/sai/api/TamApi.h | 2 +- fboss/agent/hw/sai/api/tests/TamApiTest.cpp | 4 ++-- .../agent/hw/sai/store/tests/TamStoreTest.cpp | 22 +++++++++++-------- .../hw/sai/switch/npu/tajo/SaiTamManager.cpp | 4 ++-- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/fboss/agent/hw/sai/api/TamApi.h b/fboss/agent/hw/sai/api/TamApi.h index a1292fd896718..e53161f722d49 100644 --- a/fboss/agent/hw/sai/api/TamApi.h +++ b/fboss/agent/hw/sai/api/TamApi.h @@ -184,7 +184,7 @@ struct SaiTamEventTraits { Attributes::Type, Attributes::ActionList, Attributes::CollectorList, - Attributes::SwitchEventType, + std::optional, std::optional, std::optional, std::optional, diff --git a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp index cc45aabc0f1a0..a8f75303da3b1 100644 --- a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp @@ -154,8 +154,8 @@ TEST_F(TamApiTest, TamEvent) { std::get(eventAttr) = eventActions; std::get(eventAttr) = eventCollectors; - std::get(eventAttr) = - eventTypes; + std::get>( + eventAttr) = eventTypes; std::get>(eventAttr) = deviceId; std::get>( diff --git a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp index ef570028b3f83..67ddb9bef67df 100644 --- a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp @@ -79,8 +79,8 @@ class TamStoreTest : public SaiStoreTest { SAI_TAM_EVENT_TYPE_PACKET_DROP; std::get(result) = actions; std::get(result) = collectors; - std::get(result) = - eventTypes; + std::get>( + result) = eventTypes; std::get>(result) = deviceId; std::get>( @@ -293,8 +293,10 @@ TEST_F(TamStoreTest, tamCtors) { std::get(tamEventAhk) .value()); EXPECT_EQ( - GET_ATTR(TamEvent, SwitchEventType, eventObj.attributes()), - std::get(tamEventAhk) + GET_OPT_ATTR(TamEvent, SwitchEventType, eventObj.attributes()), + std::get>( + tamEventAhk) + .value() .value()); auto tamObj = createObj(tam); @@ -425,8 +427,10 @@ TEST_F(TamStoreTest, setObject) { GET_ATTR(TamEvent, CollectorList, event->attributes()), std::get(eventAhk).value()); EXPECT_EQ( - GET_ATTR(TamEvent, SwitchEventType, event->attributes()), - std::get(eventAhk) + GET_OPT_ATTR(TamEvent, SwitchEventType, event->attributes()), + std::get>( + eventAhk) + .value() .value()); auto tamAhk = tamTraits(event->adapterKey()); @@ -470,11 +474,11 @@ TEST_F(TamStoreTest, updateObject) { auto tam = s.get().setObject(tamAhk, tamAhk); std::vector newEvents = {4, 5, 6}; - std::get(eventAhk) = - newEvents; + std::get>( + eventAhk) = newEvents; auto updatedEvent = s.get().setObject(eventAhk, eventAhk); EXPECT_EQ( - GET_ATTR(TamEvent, SwitchEventType, updatedEvent->attributes()), + GET_OPT_ATTR(TamEvent, SwitchEventType, updatedEvent->attributes()), newEvents); std::get(transportAhk) = 10003; diff --git a/fboss/agent/hw/sai/switch/npu/tajo/SaiTamManager.cpp b/fboss/agent/hw/sai/switch/npu/tajo/SaiTamManager.cpp index 516e449752de4..7d2e7a49ff80f 100644 --- a/fboss/agent/hw/sai/switch/npu/tajo/SaiTamManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/tajo/SaiTamManager.cpp @@ -76,8 +76,8 @@ SaiTamManager::SaiTamManager( std::get(eventTraits) = actions; std::get(eventTraits) = collectors; - std::get(eventTraits) = - eventTypes; + std::get>( + eventTraits) = eventTypes; auto& eventStore = saiStore_->get(); auto event = eventStore.setObject(eventTraits, eventTraits); From 0b63e4b39dc4de96059063732f1713af261e2805 Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Thu, 17 Oct 2024 10:34:41 -0700 Subject: [PATCH 172/479] PathVisitor[map]: Recurse into types that is not "Node"(e.g. std::map) Summary: Make visit also work with non-node type so that we could do recursion. Right now we implement type map but not other types. so we could only recurse into map types and primitive types Note: struct would not work now since we move the operator operation into recursive mode. We will then need to implement structure part to make it work Differential Revision: D64247531 Privacy Context Container: L1125642 fbshipit-source-id: 061da3d6add39a35574a150094b57dc9c27600d4 --- fboss/thrift_cow/nodes/Serializer.h | 7 ++ fboss/thrift_cow/nodes/ThriftListNode-inl.h | 2 +- fboss/thrift_cow/nodes/ThriftMapNode-inl.h | 2 +- fboss/thrift_cow/nodes/ThriftSetNode-inl.h | 2 +- fboss/thrift_cow/nodes/ThriftStructNode-inl.h | 2 +- fboss/thrift_cow/nodes/ThriftUnionNode-inl.h | 2 +- fboss/thrift_cow/visitors/PathVisitor.h | 102 ++++++++++++++---- .../visitors/tests/PathVisitorTests.cpp | 63 +++++++++++ 8 files changed, 157 insertions(+), 25 deletions(-) diff --git a/fboss/thrift_cow/nodes/Serializer.h b/fboss/thrift_cow/nodes/Serializer.h index c837ca2924ff8..d7e344865ec07 100644 --- a/fboss/thrift_cow/nodes/Serializer.h +++ b/fboss/thrift_cow/nodes/Serializer.h @@ -18,6 +18,13 @@ namespace facebook::fboss::thrift_cow { +struct FieldBaseType {}; + +template +using is_field_type = std::is_base_of>; +template +constexpr bool is_field_type_v = is_field_type::value; + namespace detail { template diff --git a/fboss/thrift_cow/nodes/ThriftListNode-inl.h b/fboss/thrift_cow/nodes/ThriftListNode-inl.h index a0c4d294863f8..a7edf06c9292e 100644 --- a/fboss/thrift_cow/nodes/ThriftListNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftListNode-inl.h @@ -35,7 +35,7 @@ struct ExtractValueTypeClass> { } // namespace list_helpers template -struct ThriftListFields { +struct ThriftListFields : public FieldBaseType { using Self = ThriftListFields; using CowType = FieldsType; using ThriftType = TType; diff --git a/fboss/thrift_cow/nodes/ThriftMapNode-inl.h b/fboss/thrift_cow/nodes/ThriftMapNode-inl.h index 20437cc34d0bf..e8739927a0b94 100644 --- a/fboss/thrift_cow/nodes/ThriftMapNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftMapNode-inl.h @@ -41,7 +41,7 @@ struct ExtractTypeClass< } // namespace map_helpers template -struct ThriftMapFields { +struct ThriftMapFields : public FieldBaseType { using TypeClass = typename Traits::TC; using TType = typename Traits::Type; using Self = ThriftMapFields; diff --git a/fboss/thrift_cow/nodes/ThriftSetNode-inl.h b/fboss/thrift_cow/nodes/ThriftSetNode-inl.h index bac718c5dc275..bc724c678de78 100644 --- a/fboss/thrift_cow/nodes/ThriftSetNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftSetNode-inl.h @@ -37,7 +37,7 @@ struct ExtractTypeClass> { } // namespace set_helpers template -struct ThriftSetFields { +struct ThriftSetFields : public FieldBaseType { using Self = ThriftSetFields; using CowType = FieldsType; using ThriftType = TType; diff --git a/fboss/thrift_cow/nodes/ThriftStructNode-inl.h b/fboss/thrift_cow/nodes/ThriftStructNode-inl.h index 4f73e393e8bfa..f1853a851fb69 100644 --- a/fboss/thrift_cow/nodes/ThriftStructNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftStructNode-inl.h @@ -155,7 +155,7 @@ struct ChildInvoke { } // namespace struct_helpers template > -struct ThriftStructFields { +struct ThriftStructFields : public FieldBaseType { using Self = ThriftStructFields; using Info = apache::thrift::reflect_struct; using CowType = FieldsType; diff --git a/fboss/thrift_cow/nodes/ThriftUnionNode-inl.h b/fboss/thrift_cow/nodes/ThriftUnionNode-inl.h index 24440a79a9139..4bcd759c23046 100644 --- a/fboss/thrift_cow/nodes/ThriftUnionNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftUnionNode-inl.h @@ -216,7 +216,7 @@ struct ThriftUnionStorage { }; template -struct ThriftUnionFields { +struct ThriftUnionFields : public FieldBaseType { using Self = ThriftUnionFields; // reflected union metadata diff --git a/fboss/thrift_cow/visitors/PathVisitor.h b/fboss/thrift_cow/visitors/PathVisitor.h index dc9ec25bdcc48..8eb21f1aef41f 100644 --- a/fboss/thrift_cow/visitors/PathVisitor.h +++ b/fboss/thrift_cow/visitors/PathVisitor.h @@ -301,7 +301,9 @@ struct PathVisitorImpl> { const PathVisitMode& mode, Op& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { using ValueTType = typename Fields::ValueTType; @@ -365,7 +367,9 @@ struct PathVisitorImpl> { const PathVisitMode& mode, Op& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { // Parse and pop token. Also check for index bound auto index = folly::tryTo(*begin++); @@ -405,22 +409,20 @@ struct PathVisitorImpl< return pv_detail::visitNode(node, begin, end, mode, op); } - template - static ThriftTraverseResult visit( - Node& node, + template + static inline ThriftTraverseResult visit( + Obj& tObj, pv_detail::PathIter begin, pv_detail::PathIter end, const PathVisitMode& mode, Op& op) - // only enable for HybridNode types - requires(std::is_same_v) + requires(!is_cow_type_v && !is_field_type_v) { try { if (begin == end) { - op.visitTyped(node, begin, end); + op.visitTyped(tObj, begin, end); } else { // get the value based on the key - auto& tObj = node.ref(); using KeyT = typename folly::remove_cvref_t::key_type; // Get key auto token = *begin++; @@ -428,12 +430,8 @@ struct PathVisitorImpl< if (!key.hasValue() || tObj.find(key.value()) == tObj.end()) { return ThriftTraverseResult::INVALID_MAP_KEY; } - auto& val = tObj.at(key.value()); - if (begin == end) { - op.visitTyped(val, begin, end); - } else { - // TODO: further recurse - } + return PathVisitorImpl::visit( + tObj.at(*key), begin, end, mode, op); } return ThriftTraverseResult::OK; } catch (const std::exception& ex) { @@ -442,6 +440,38 @@ struct PathVisitorImpl< } } + template + static ThriftTraverseResult visit( + Node& node, + pv_detail::PathIter begin, + pv_detail::PathIter end, + const PathVisitMode& mode, + Op& op) + // only enable for HybridNode types + requires(std::is_same_v) + { + try { + if (begin == end) { + op.visitTyped(node, begin, end); + return ThriftTraverseResult::OK; + } + // get the value based on the key + auto& tObj = node.ref(); + using KeyT = typename folly::remove_cvref_t::key_type; + // Get key + auto token = *begin++; + auto key = folly::tryTo(token); + if (!key.hasValue() || tObj.find(key.value()) == tObj.end()) { + return ThriftTraverseResult::INVALID_MAP_KEY; + } + return PathVisitorImpl::visit( + tObj.at(*key), begin, end, mode, op); + } catch (const std::exception& ex) { + XLOG(ERR) << "Exception while traversing path: " << ex.what(); + return ThriftTraverseResult::VISITOR_EXCEPTION; + } + } + template static ThriftTraverseResult visit( Fields& fields, @@ -450,7 +480,9 @@ struct PathVisitorImpl< const PathVisitMode& mode, Op& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { using key_type = typename Fields::key_type; @@ -519,7 +551,9 @@ struct PathVisitorImpl { const PathVisitMode& mode, Op& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { using MemberTypes = typename Fields::MemberTypes; @@ -588,6 +622,28 @@ struct PathVisitorImpl { return ThriftTraverseResult::VISITOR_EXCEPTION; } + template + static inline ThriftTraverseResult visit( + Obj& tObj, + pv_detail::PathIter begin, + pv_detail::PathIter end, + const PathVisitMode& mode, + Op& op) + requires(!is_cow_type_v && !is_field_type_v) + { + try { + if (begin == end) { + op.visitTyped(tObj, begin, end); + } else { + throw std::runtime_error("not implemented yet"); + } + return ThriftTraverseResult::OK; + } catch (const std::exception& ex) { + XLOG(ERR) << "Exception while traversing path: " << ex.what(); + return ThriftTraverseResult::VISITOR_EXCEPTION; + } + } + template static ThriftTraverseResult visit( Fields& fields, @@ -596,7 +652,9 @@ struct PathVisitorImpl { const PathVisitMode& mode, Op& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { using Members = typename Fields::Members; @@ -720,7 +778,9 @@ struct PathVisitor { const PathVisitMode& mode, pv_detail::LambdaPathVisitorOperator& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { return pv_detail::PathVisitorImpl::visit(fields, begin, end, mode, op); } @@ -733,7 +793,9 @@ struct PathVisitor { const PathVisitMode& mode, BasePathVisitorOperator& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { return pv_detail::PathVisitorImpl::visit(fields, begin, end, mode, op); } diff --git a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp index 72ed5b159b37f..4c55b24c8213b 100644 --- a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp @@ -100,6 +100,23 @@ TEST(PathVisitorTests, HybridMapPrimitiveAccess) { *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); EXPECT_EQ(result, ThriftTraverseResult::INVALID_MAP_KEY); } +} +TEST(PathVisitorTests, HybridMapStructAccess) { + auto structA = createHybridMapTestStruct(); + + auto nodeA = std::make_shared>(structA); + folly::dynamic dyn; + auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { + EXPECT_EQ(begin, end); + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + dyn = node.toFollyDynamic(); + } else { + facebook::thrift::to_dynamic( + dyn, node, facebook::thrift::dynamic_format::JSON_1); + } + }); // hybridMapOfI32ToStruct { std::vector path = {"hybridMapOfI32ToStruct"}; @@ -136,6 +153,52 @@ TEST(PathVisitorTests, HybridMapPrimitiveAccess) { EXPECT_EQ(result, ThriftTraverseResult::INVALID_MAP_KEY); } } + +TEST(PathVisitorTests, HybridMapOfMapAccess) { + auto structA = createHybridMapTestStruct(); + + auto nodeA = std::make_shared>(structA); + folly::dynamic dyn; + auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { + EXPECT_EQ(begin, end); + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + dyn = node.toFollyDynamic(); + } else { + facebook::thrift::to_dynamic( + dyn, node, facebook::thrift::dynamic_format::JSON_1); + } + }); + + // hybridMapOfMap/10 + { + std::vector path = {"hybridMapOfMap", "10"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::OK); + EXPECT_NE(dyn.find(20), dyn.items().end()); + EXPECT_EQ(dyn[20].asInt(), 30); + } + + // hybridMapOfMap/10/20 + { + std::vector path = {"hybridMapOfMap", "10", "20"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::OK); + EXPECT_EQ(dyn.asInt(), 30); + } + + // Invalid path + // hybridMapOfMap/10/30 + { + std::vector path = {"hybridMapOfMap", "10", "30"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::INVALID_MAP_KEY); + } +} #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ TEST(PathVisitorTests, AccessFieldInContainer) { From 145eead8ad69ea9bb80d092e359315184978a0cd Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Thu, 17 Oct 2024 10:34:41 -0700 Subject: [PATCH 173/479] PathVisitor (map): add test case to cover full visitation mode Summary: add test case for FULL visit mode. and leaf visit to all node from hybridnode to thrift object node Differential Revision: D64490030 Privacy Context Container: L1125642 fbshipit-source-id: d9f21631723cb59faeeb7a6ac766ab217c97ea08 --- fboss/thrift_cow/visitors/PathVisitor.h | 32 ++++---- .../visitors/tests/PathVisitorTests.cpp | 76 ++++++++++++------- 2 files changed, 67 insertions(+), 41 deletions(-) diff --git a/fboss/thrift_cow/visitors/PathVisitor.h b/fboss/thrift_cow/visitors/PathVisitor.h index 8eb21f1aef41f..fef29a4d7c8ad 100644 --- a/fboss/thrift_cow/visitors/PathVisitor.h +++ b/fboss/thrift_cow/visitors/PathVisitor.h @@ -419,21 +419,23 @@ struct PathVisitorImpl< requires(!is_cow_type_v && !is_field_type_v) { try { - if (begin == end) { + if (mode == PathVisitMode::FULL || begin == end) { op.visitTyped(tObj, begin, end); - } else { - // get the value based on the key - using KeyT = typename folly::remove_cvref_t::key_type; - // Get key - auto token = *begin++; - auto key = folly::tryTo(token); - if (!key.hasValue() || tObj.find(key.value()) == tObj.end()) { - return ThriftTraverseResult::INVALID_MAP_KEY; + if (begin == end) { + return ThriftTraverseResult::OK; } - return PathVisitorImpl::visit( - tObj.at(*key), begin, end, mode, op); } - return ThriftTraverseResult::OK; + // get the value based on the key + using KeyT = typename folly::remove_cvref_t::key_type; + // Get key + auto token = *begin++; + auto key = folly::tryTo(token); + if (!key.hasValue() || tObj.find(key.value()) == tObj.end()) { + return ThriftTraverseResult::INVALID_MAP_KEY; + } + return PathVisitorImpl::visit( + tObj.at(*key), begin, end, mode, op); + } catch (const std::exception& ex) { XLOG(ERR) << "Exception while traversing path: " << ex.what(); return ThriftTraverseResult::VISITOR_EXCEPTION; @@ -451,9 +453,11 @@ struct PathVisitorImpl< requires(std::is_same_v) { try { - if (begin == end) { + if (mode == PathVisitMode::FULL || begin == end) { op.visitTyped(node, begin, end); - return ThriftTraverseResult::OK; + if (begin == end) { + return ThriftTraverseResult::OK; + } } // get the value based on the key auto& tObj = node.ref(); diff --git a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp index 4c55b24c8213b..dddbf5d84935c 100644 --- a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp @@ -15,6 +15,33 @@ namespace facebook::fboss::thrift_cow::test { +struct GetVisitedPathsOperator : public BasePathVisitorOperator { + public: + const std::set& getVisited() { + return visited; + } + + protected: + void visit( + Serializable& /* node */, + pv_detail::PathIter begin, + pv_detail::PathIter end) override { + visited.insert( + "/" + folly::join('/', std::vector(begin, end))); + } + + template + void visit(Node& node, pv_detail::PathIter begin, pv_detail::PathIter end) + requires(!is_cow_type_v) + { + SerializableReader dummy(node); + visit(dummy, begin, end); + } + + private: + std::set visited; +}; + TEST(PathVisitorTests, AccessField) { auto structA = createSimpleTestStruct(); @@ -170,6 +197,16 @@ TEST(PathVisitorTests, HybridMapOfMapAccess) { dyn, node, facebook::thrift::dynamic_format::JSON_1); } }); + // hybridMapOfMap + { + std::vector path = {"hybridMapOfMap"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::OK); + EXPECT_NE(dyn.find(10), dyn.items().end()); + EXPECT_NE(dyn[10].find(20), dyn[10].items().end()); + EXPECT_EQ(dyn[10][20].asInt(), 30); + } // hybridMapOfMap/10 { @@ -198,6 +235,18 @@ TEST(PathVisitorTests, HybridMapOfMapAccess) { *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); EXPECT_EQ(result, ThriftTraverseResult::INVALID_MAP_KEY); } + // full visit mode + { + auto op = GetVisitedPathsOperator(); + std::vector path{"hybridMapOfMap", "10", "20"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::FULL, op); + EXPECT_EQ(result, ThriftTraverseResult::OK); + EXPECT_THAT( + op.getVisited(), + ::testing::ContainerEq(std::set{ + "/", "/10/20", "/20", "/hybridMapOfMap/10/20"})); + } } #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ @@ -235,33 +284,6 @@ TEST(PathVisitorTests, AccessFieldInContainer) { EXPECT_EQ(*got.max(), 200); } -struct GetVisitedPathsOperator : public BasePathVisitorOperator { - public: - const std::set& getVisited() { - return visited; - } - - protected: - void visit( - Serializable& /* node */, - pv_detail::PathIter begin, - pv_detail::PathIter end) override { - visited.insert( - "/" + folly::join('/', std::vector(begin, end))); - } - - template - void visit(Node& node, pv_detail::PathIter begin, pv_detail::PathIter end) - requires(!is_cow_type_v) - { - SerializableReader dummy(node); - visit(dummy, begin, end); - } - - private: - std::set visited; -}; - TEST(PathVisitorTests, TraversalModeFull) { auto structA = createSimpleTestStruct(); auto nodeA = std::make_shared>(structA); From f019c49d94bf1e0b3aaa714603d6ed591b3d0548 Mon Sep 17 00:00:00 2001 From: Adam Calabrigo Date: Thu, 17 Oct 2024 12:01:27 -0700 Subject: [PATCH 174/479] Meru800bfa: fix SMB_VRM_R3R1_ANLG1_VOUT_1V8 threshold (#274) Summary: # Description Corrects sensor threshold for `SMB_VRM_R3R1_ANLG1_VOUT_1V8` sensor in `sensor_service.json` config. Pull Request resolved: https://github.com/facebook/fboss/pull/274 Test Plan: Verified on Meru800bfa. Reviewed By: kimdo8736 Differential Revision: D64501982 Pulled By: joancaneus fbshipit-source-id: 690390718d5c5d1c165bb362b61c4279d377facb --- fboss/platform/configs/meru800bfa/sensor_service.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fboss/platform/configs/meru800bfa/sensor_service.json b/fboss/platform/configs/meru800bfa/sensor_service.json index 59366363b3d22..7117f80eae5db 100644 --- a/fboss/platform/configs/meru800bfa/sensor_service.json +++ b/fboss/platform/configs/meru800bfa/sensor_service.json @@ -671,8 +671,8 @@ "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in5_input", "type": 1, "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 }, "compute": "@/1000.0" }, From b7fbbd5cadf0d94854e4bd092d9901133979d5af Mon Sep 17 00:00:00 2001 From: aalamsi22 Date: Thu, 17 Oct 2024 12:11:29 -0700 Subject: [PATCH 175/479] meru800biab: Add PM support (#253) Summary: # Description This is part of a series of PRs to add support for meru800biab This PR adds platform support and platform manager support. #### Changes summary - Bsp mapping; maps to the same file as meru800bia. - Product mapping added. - fruid.json on `fboss/oss/scripts/run_configs/j3b/fruid.json`. Although moslty identical to that of meru800bia, the product name is different and requires a new file. - Platform manager config and eeprom fix addressed in `https://github.com/facebookexternal/fboss.bsp.arista/pull/31/files` is applied to meru800biab # Test #### platform Manager ``` platform_manager[5660]: I1004 19:14:04.914047 5660 PlatformExplorer.cpp:734] Reporting firmware version for FAN_CPLD - version string:1.0 ODS value:1000 platform_manager[5660]: I1004 19:14:04.914086 5660 PlatformExplorer.cpp:734] Reporting firmware version for MERU800BIA_SMB_FPGA - version string:4.14 ODS value:4014 platform_manager[5660]: I1004 19:14:04.914118 5660 PlatformExplorer.cpp:734] Reporting firmware version for MERU_SCM_CPLD - version string:4.13 ODS value:4013 platform_manager[5660]: I1004 19:14:04.914132 5660 PlatformExplorer.cpp:657] Concluding meru800biab exploration... systemd[1]: Started FBOSS Platform Manager. platform_manager[5660]: I1004 19:14:04.920422 5660 Main.cpp:40] Sent sd_notify ready by running command (systemd-notify --ready) platform_manager[5660]: I1004 19:14:04.920429 5660 Main.cpp:75] Running PlatformManager thrift service... platform_manager[5660]: I1004 19:14:04.921137 5660 ThriftServer.cpp:836] Using thread manager (resource pools not enabled) on address/port 5975: runtime: thriftFlagNotSet, , thrift flag: false, enable gflag: false, disable gflag: false ``` Pull Request resolved: https://github.com/facebook/fboss/pull/253 Reviewed By: kimdo8736 Differential Revision: D64088064 Pulled By: joancaneus fbshipit-source-id: cdcfc4cbf79201e10bcf4bf1b433f7a16964479b --- fboss/oss/scripts/run_configs/j3b/fruid.json | 28 + .../configs/meru800biab/platform_manager.json | 1599 +++++++++++++++++ .../platform_manager/PlatformExplorer.cpp | 3 +- 3 files changed, 1629 insertions(+), 1 deletion(-) create mode 100644 fboss/oss/scripts/run_configs/j3b/fruid.json create mode 100644 fboss/platform/configs/meru800biab/platform_manager.json diff --git a/fboss/oss/scripts/run_configs/j3b/fruid.json b/fboss/oss/scripts/run_configs/j3b/fruid.json new file mode 100644 index 0000000000000..3ae1a335499df --- /dev/null +++ b/fboss/oss/scripts/run_configs/j3b/fruid.json @@ -0,0 +1,28 @@ +{ + "Resources": [], + "Actions": [], + "Information": { + "CRC8": "0x0", + "Product Part Number": "", + "PCB Manufacturer": "", + "Product Sub-Version": "3", + "Facebook PCB Part Number": "", + "Product Name": "Meru800biab", + "Local MAC": "80:A2:35:F4:FE:5B", + "Facebook PCBA Part Number": "", + "Extended MAC Address Size": "138", + "Location on Fabric": "", + "ODM PCBA Part Number": "", + "Assembled At": "", + "System Assembly Part Number": "", + "Version": "3", + "Product Version": "6", + "System Manufacturing Date": "06-21-19", + "Product Serial Number": "", + "ODM PCBA Serial Number": "", + "Extended MAC Base": "80:A2:35:F4:FE:5C", + "System Manufacturer": "", + "Product Production State": "4", + "Product Asset Tag": "" + } +} diff --git a/fboss/platform/configs/meru800biab/platform_manager.json b/fboss/platform/configs/meru800biab/platform_manager.json new file mode 100644 index 0000000000000..34be9158862bc --- /dev/null +++ b/fboss/platform/configs/meru800biab/platform_manager.json @@ -0,0 +1,1599 @@ +{ + "platformName": "meru800biab", + "rootPmUnitName": "SCM", + "rootSlotType": "SCM_SLOT", + "slotTypeConfigs": { + "SCM_SLOT": { + "numOutgoingI2cBuses": 0, + "idpromConfig": { + "busName": "SMBus I801 adapter at 1000", + "address": "0x50", + "kernelDeviceName": "24c512", + "offset": 15360 + }, + "pmUnitName": "SCM" + }, + "SMB_SLOT": { + "numOutgoingI2cBuses": 3, + "idpromConfig": { + "busName": "INCOMING@0", + "address": "0x50", + "kernelDeviceName": "24c512", + "offset": 15360 + }, + "pmUnitName": "SMB" + }, + "PSU_SLOT": { + "numOutgoingI2cBuses": 1, + "pmUnitName": "PSU" + }, + "FAN_SLOT": { + "numOutgoingI2cBuses": 0, + "pmUnitName": "FAN" + } + }, + "pmUnitConfigs": { + "SCM": { + "pluggedInSlotType": "SCM_SLOT", + "i2cDeviceConfigs": [ + { + "busName": "SCM_I2C_MASTER0@0", + "address": "0x40", + "kernelDeviceName": "pmbus", + "pmUnitScopedName": "SCM_MPS_PMBUS" + } + ], + "outgoingSlotConfigs": { + "SMB_SLOT@0": { + "slotType": "SMB_SLOT", + "outgoingI2cBusNames": [ + "SCM_I2C_MASTER1@0", + "SCM_I2C_MASTER1@2", + "SCM_I2C_MASTER1@3" + ] + } + }, + "pciDeviceConfigs": [ + { + "pmUnitScopedName": "SCM_FPGA", + "vendorId": "0x3475", + "deviceId": "0x0001", + "subSystemVendorId": "0x3475", + "subSystemDeviceId": "0x0008", + "i2cAdapterConfigs": [ + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SCM_I2C_MASTER0", + "deviceName": "i2c_master", + "csrOffset": "0x8000" + }, + "numberOfAdapters": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SCM_I2C_MASTER1", + "deviceName": "i2c_master", + "csrOffset": "0x8080" + }, + "numberOfAdapters": 8 + } + ], + "spiMasterConfigs": [], + "ledCtrlConfigs": [], + "xcvrCtrlConfigs": [] + } + ], + "embeddedSensorConfigs": [ + { + "pmUnitScopedName": "CPU_CORE_TEMP", + "sysfsPath": "/sys/bus/platform/devices/coretemp.0" + }, + { + "pmUnitScopedName": "NVME_TEMP", + "sysfsPath": "/sys/class/nvme/nvme0" + } + ] + }, + "SMB": { + "pluggedInSlotType": "SMB_SLOT", + "i2cDeviceConfigs": [ + { + "busName": "INCOMING@0", + "address": "0x74", + "kernelDeviceName": "pca9539", + "pmUnitScopedName": "SMB_PCA", + "isGpioChip": true + }, + { + "busName": "INCOMING@1", + "address": "0x49", + "kernelDeviceName": "lm75", + "pmUnitScopedName": "SMB_TMP75_FRONT", + "initRegSettings": [ + { + "regOffset": 3, + "ioBuf": [95] + } + ] + }, + { + "busName": "INCOMING@1", + "address": "0x4a", + "kernelDeviceName": "lm75", + "pmUnitScopedName": "SMB_TMP75_REAR", + "initRegSettings": [ + { + "regOffset": 3, + "ioBuf": [95] + } + ] + }, + { + "busName": "INCOMING@1", + "address": "0x4d", + "kernelDeviceName": "max6581", + "pmUnitScopedName": "SMB_MAX6581", + "initRegSettings": [ + { + "regOffset": 32, + "ioBuf": [110] + }, + { + "regOffset": 33, + "ioBuf": [-121] + }, + { + "regOffset": 34, + "ioBuf": [-121] + }, + { + "regOffset": 35, + "ioBuf": [-121] + }, + { + "regOffset": 36, + "ioBuf": [-121] + }, + { + "regOffset": 37, + "ioBuf": [-121] + }, + { + "regOffset": 38, + "ioBuf": [-121] + }, + { + "regOffset": 39, + "ioBuf": [-121] + } + ] + }, + { + "busName": "INCOMING@2", + "address": "0x48", + "kernelDeviceName": "lm75", + "pmUnitScopedName": "FAN_TMP75", + "initRegSettings": [ + { + "regOffset": 3, + "ioBuf": [95] + } + ] + }, + { + "busName": "INCOMING@2", + "address": "0x60", + "kernelDeviceName": "pali2_cpld", + "pmUnitScopedName": "FAN_CPLD" + }, + { + "busName": "SMB_I2C_MASTER0@0", + "address": "0x45", + "kernelDeviceName": "raa228228", + "pmUnitScopedName": "SMB_RAA228926_J3" + }, + { + "busName": "SMB_I2C_MASTER0@0", + "address": "0x54", + "kernelDeviceName": "isl68226", + "pmUnitScopedName": "SMB_ISL68226_J3" + }, + { + "busName": "SMB_I2C_MASTER0@0", + "address": "0x55", + "kernelDeviceName": "isl68226", + "pmUnitScopedName": "SMB_ISL68226_OPTICS" + }, + { + "busName": "SMB_I2C_MASTER0@2", + "address": "0x48", + "kernelDeviceName": "lm75", + "pmUnitScopedName": "SMB_MGMT_TMP75" + } + ], + "outgoingSlotConfigs": { + "PSU_SLOT@0": { + "slotType": "PSU_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/SMB_SLOT@0/[SMB_FPGA]", + "presenceFileName": "psu1_present", + "desiredValue": 1 + } + }, + "outgoingI2cBusNames": [ + "SMB_I2C_MASTER0@5" + ] + }, + "PSU_SLOT@1": { + "slotType": "PSU_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/SMB_SLOT@0/[SMB_FPGA]", + "presenceFileName": "psu2_present", + "desiredValue": 1 + } + }, + "outgoingI2cBusNames": [ + "SMB_I2C_MASTER0@6" + ] + }, + "FAN_SLOT@0": { + "slotType": "FAN_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/SMB_SLOT@0/[FAN_CPLD]", + "presenceFileName": "fan1_present", + "desiredValue": 1 + } + }, + "outgoingI2cBusNames": [] + }, + "FAN_SLOT@1": { + "slotType": "FAN_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/SMB_SLOT@0/[FAN_CPLD]", + "presenceFileName": "fan2_present", + "desiredValue": 1 + } + }, + "outgoingI2cBusNames": [] + }, + "FAN_SLOT@2": { + "slotType": "FAN_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/SMB_SLOT@0/[FAN_CPLD]", + "presenceFileName": "fan3_present", + "desiredValue": 1 + } + }, + "outgoingI2cBusNames": [] + }, + "FAN_SLOT@3": { + "slotType": "FAN_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/SMB_SLOT@0/[FAN_CPLD]", + "presenceFileName": "fan4_present", + "desiredValue": 1 + } + }, + "outgoingI2cBusNames": [] + } + }, + "pciDeviceConfigs": [ + { + "pmUnitScopedName": "SMB_FPGA", + "vendorId": "0x3475", + "deviceId": "0x0001", + "subSystemVendorId": "0x3475", + "subSystemDeviceId": "0x0003", + "i2cAdapterConfigs": [ + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_I2C_MASTER0", + "deviceName": "i2c_master", + "csrOffset": "0x8000" + }, + "numberOfAdapters": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_I2C_MASTER1", + "deviceName": "i2c_master", + "csrOffset": "0x8080" + }, + "numberOfAdapters": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_I2C_MASTER2", + "deviceName": "i2c_master", + "csrOffset": "0x8100" + }, + "numberOfAdapters": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_I2C_MASTER3", + "deviceName": "i2c_master", + "csrOffset": "0x8180" + }, + "numberOfAdapters": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_I2C_MASTER4", + "deviceName": "i2c_master", + "csrOffset": "0x8200" + }, + "numberOfAdapters": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_I2C_MASTER5", + "deviceName": "i2c_master", + "csrOffset": "0x8280" + }, + "numberOfAdapters": 8 + } + ], + "spiMasterConfigs": [ + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_SPI_MASTER0", + "deviceName": "spi_master", + "csrOffset": "0x7900" + }, + "spiDeviceConfigs": [ + { + "pmUnitScopedName": "SMB_SPI_MASTER0_DEVICE1", + "chipSelect": 0, + "modalias": "spidev", + "maxSpeedHz": 25000000 + } + ] + } + ], + "ledCtrlConfigs": [ + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT1_LED1", + "deviceName": "port_led", + "csrOffset": "0x6100" + }, + "portNumber": 1, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT1_LED2", + "deviceName": "port_led", + "csrOffset": "0x6110" + }, + "portNumber": 1, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT2_LED1", + "deviceName": "port_led", + "csrOffset": "0x6120" + }, + "portNumber": 2, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT2_LED2", + "deviceName": "port_led", + "csrOffset": "0x6130" + }, + "portNumber": 2, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT3_LED1", + "deviceName": "port_led", + "csrOffset": "0x6140" + }, + "portNumber": 3, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT3_LED2", + "deviceName": "port_led", + "csrOffset": "0x6150" + }, + "portNumber": 3, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT4_LED1", + "deviceName": "port_led", + "csrOffset": "0x6160" + }, + "portNumber": 4, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT4_LED2", + "deviceName": "port_led", + "csrOffset": "0x6170" + }, + "portNumber": 4, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT5_LED1", + "deviceName": "port_led", + "csrOffset": "0x6180" + }, + "portNumber": 5, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT5_LED2", + "deviceName": "port_led", + "csrOffset": "0x6190" + }, + "portNumber": 5, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT6_LED1", + "deviceName": "port_led", + "csrOffset": "0x61a0" + }, + "portNumber": 6, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT6_LED2", + "deviceName": "port_led", + "csrOffset": "0x61b0" + }, + "portNumber": 6, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT7_LED1", + "deviceName": "port_led", + "csrOffset": "0x61c0" + }, + "portNumber": 7, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT7_LED2", + "deviceName": "port_led", + "csrOffset": "0x61d0" + }, + "portNumber": 7, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT8_LED1", + "deviceName": "port_led", + "csrOffset": "0x61e0" + }, + "portNumber": 8, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT8_LED2", + "deviceName": "port_led", + "csrOffset": "0x61f0" + }, + "portNumber": 8, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT9_LED1", + "deviceName": "port_led", + "csrOffset": "0x6200" + }, + "portNumber": 9, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT9_LED2", + "deviceName": "port_led", + "csrOffset": "0x6210" + }, + "portNumber": 9, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT10_LED1", + "deviceName": "port_led", + "csrOffset": "0x6220" + }, + "portNumber": 10, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT10_LED2", + "deviceName": "port_led", + "csrOffset": "0x6230" + }, + "portNumber": 10, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT11_LED1", + "deviceName": "port_led", + "csrOffset": "0x6240" + }, + "portNumber": 11, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT11_LED2", + "deviceName": "port_led", + "csrOffset": "0x6250" + }, + "portNumber": 11, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT12_LED1", + "deviceName": "port_led", + "csrOffset": "0x6260" + }, + "portNumber": 12, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT12_LED2", + "deviceName": "port_led", + "csrOffset": "0x6270" + }, + "portNumber": 12, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT13_LED1", + "deviceName": "port_led", + "csrOffset": "0x6280" + }, + "portNumber": 13, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT13_LED2", + "deviceName": "port_led", + "csrOffset": "0x6290" + }, + "portNumber": 13, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT14_LED1", + "deviceName": "port_led", + "csrOffset": "0x62a0" + }, + "portNumber": 14, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT14_LED2", + "deviceName": "port_led", + "csrOffset": "0x62b0" + }, + "portNumber": 14, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT15_LED1", + "deviceName": "port_led", + "csrOffset": "0x62c0" + }, + "portNumber": 15, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT15_LED2", + "deviceName": "port_led", + "csrOffset": "0x62d0" + }, + "portNumber": 15, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT16_LED1", + "deviceName": "port_led", + "csrOffset": "0x62e0" + }, + "portNumber": 16, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT16_LED2", + "deviceName": "port_led", + "csrOffset": "0x62f0" + }, + "portNumber": 16, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT17_LED1", + "deviceName": "port_led", + "csrOffset": "0x6300" + }, + "portNumber": 17, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT17_LED2", + "deviceName": "port_led", + "csrOffset": "0x6310" + }, + "portNumber": 17, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT18_LED1", + "deviceName": "port_led", + "csrOffset": "0x6320" + }, + "portNumber": 18, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT18_LED2", + "deviceName": "port_led", + "csrOffset": "0x6330" + }, + "portNumber": 18, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT19_LED1", + "deviceName": "port_led", + "csrOffset": "0x6340" + }, + "portNumber": 19, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT19_LED2", + "deviceName": "port_led", + "csrOffset": "0x6350" + }, + "portNumber": 19, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT20_LED1", + "deviceName": "port_led", + "csrOffset": "0x6360" + }, + "portNumber": 20, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT20_LED2", + "deviceName": "port_led", + "csrOffset": "0x6370" + }, + "portNumber": 20, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT21_LED1", + "deviceName": "port_led", + "csrOffset": "0x6380" + }, + "portNumber": 21, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT21_LED2", + "deviceName": "port_led", + "csrOffset": "0x6390" + }, + "portNumber": 21, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT22_LED1", + "deviceName": "port_led", + "csrOffset": "0x63a0" + }, + "portNumber": 22, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT22_LED2", + "deviceName": "port_led", + "csrOffset": "0x63b0" + }, + "portNumber": 22, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT23_LED1", + "deviceName": "port_led", + "csrOffset": "0x63c0" + }, + "portNumber": 23, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT23_LED2", + "deviceName": "port_led", + "csrOffset": "0x63d0" + }, + "portNumber": 23, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT24_LED1", + "deviceName": "port_led", + "csrOffset": "0x63e0" + }, + "portNumber": 24, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT24_LED2", + "deviceName": "port_led", + "csrOffset": "0x63f0" + }, + "portNumber": 24, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT25_LED1", + "deviceName": "port_led", + "csrOffset": "0x6400" + }, + "portNumber": 25, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT25_LED2", + "deviceName": "port_led", + "csrOffset": "0x6410" + }, + "portNumber": 25, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT26_LED1", + "deviceName": "port_led", + "csrOffset": "0x6420" + }, + "portNumber": 26, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT26_LED2", + "deviceName": "port_led", + "csrOffset": "0x6430" + }, + "portNumber": 26, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT27_LED1", + "deviceName": "port_led", + "csrOffset": "0x6440" + }, + "portNumber": 27, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT27_LED2", + "deviceName": "port_led", + "csrOffset": "0x6450" + }, + "portNumber": 27, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT28_LED1", + "deviceName": "port_led", + "csrOffset": "0x6460" + }, + "portNumber": 28, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT28_LED2", + "deviceName": "port_led", + "csrOffset": "0x6470" + }, + "portNumber": 28, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT29_LED1", + "deviceName": "port_led", + "csrOffset": "0x6480" + }, + "portNumber": 29, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT29_LED2", + "deviceName": "port_led", + "csrOffset": "0x6490" + }, + "portNumber": 29, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT30_LED1", + "deviceName": "port_led", + "csrOffset": "0x64a0" + }, + "portNumber": 30, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT30_LED2", + "deviceName": "port_led", + "csrOffset": "0x64b0" + }, + "portNumber": 30, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT31_LED1", + "deviceName": "port_led", + "csrOffset": "0x64c0" + }, + "portNumber": 31, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT31_LED2", + "deviceName": "port_led", + "csrOffset": "0x64d0" + }, + "portNumber": 31, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT32_LED1", + "deviceName": "port_led", + "csrOffset": "0x64e0" + }, + "portNumber": 32, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT32_LED2", + "deviceName": "port_led", + "csrOffset": "0x64f0" + }, + "portNumber": 32, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT33_LED1", + "deviceName": "port_led", + "csrOffset": "0x6500" + }, + "portNumber": 33, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT33_LED2", + "deviceName": "port_led", + "csrOffset": "0x6510" + }, + "portNumber": 33, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT34_LED1", + "deviceName": "port_led", + "csrOffset": "0x6520" + }, + "portNumber": 34, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT34_LED2", + "deviceName": "port_led", + "csrOffset": "0x6530" + }, + "portNumber": 34, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT35_LED1", + "deviceName": "port_led", + "csrOffset": "0x6540" + }, + "portNumber": 35, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT35_LED2", + "deviceName": "port_led", + "csrOffset": "0x6550" + }, + "portNumber": 35, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT36_LED1", + "deviceName": "port_led", + "csrOffset": "0x6560" + }, + "portNumber": 36, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT36_LED2", + "deviceName": "port_led", + "csrOffset": "0x6570" + }, + "portNumber": 36, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT37_LED1", + "deviceName": "port_led", + "csrOffset": "0x6580" + }, + "portNumber": 37, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT37_LED2", + "deviceName": "port_led", + "csrOffset": "0x6590" + }, + "portNumber": 37, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT38_LED1", + "deviceName": "port_led", + "csrOffset": "0x65a0" + }, + "portNumber": 38, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT38_LED2", + "deviceName": "port_led", + "csrOffset": "0x65b0" + }, + "portNumber": 38, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "QSFP_PORT39_LED1", + "deviceName": "port_led", + "csrOffset": "0x65c0" + }, + "portNumber": 39, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "QSFP_PORT39_LED2", + "deviceName": "port_led", + "csrOffset": "0x65d0" + }, + "portNumber": 39, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "QSFP_PORT39_LED3", + "deviceName": "port_led", + "csrOffset": "0x65e0" + }, + "portNumber": 39, + "ledId": 3 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "QSFP_PORT39_LED4", + "deviceName": "port_led", + "csrOffset": "0x65f0" + }, + "portNumber": 39, + "ledId": 4 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SYSTEM_STATUS_LED", + "deviceName": "sys_led", + "csrOffset": "0x6050" + }, + "portNumber": -1, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "FAN_STATUS_LED", + "deviceName": "fan_led", + "csrOffset": "0x6060" + }, + "portNumber": -1, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "PSU_STATUS_LED", + "deviceName": "psu_led", + "csrOffset": "0x6070" + }, + "portNumber": -1, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_STATUS_LED", + "deviceName": "smb_led", + "csrOffset": "0x6090" + }, + "portNumber": -1, + "ledId": 1 + } + ], + "xcvrCtrlConfigs": [ + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT1_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa010" + }, + "portNumber": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT2_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa020" + }, + "portNumber": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT3_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa030" + }, + "portNumber": 3 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT4_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa040" + }, + "portNumber": 4 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT5_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa050" + }, + "portNumber": 5 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT6_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa060" + }, + "portNumber": 6 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT7_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa070" + }, + "portNumber": 7 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT8_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa080" + }, + "portNumber": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT9_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa090" + }, + "portNumber": 9 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT10_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa0a0" + }, + "portNumber": 10 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT11_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa0b0" + }, + "portNumber": 11 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT12_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa0c0" + }, + "portNumber": 12 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT13_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa0d0" + }, + "portNumber": 13 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT14_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa0e0" + }, + "portNumber": 14 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT15_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa0f0" + }, + "portNumber": 15 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT16_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa100" + }, + "portNumber": 16 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT17_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa110" + }, + "portNumber": 17 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT18_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa120" + }, + "portNumber": 18 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT19_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa130" + }, + "portNumber": 19 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT20_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa140" + }, + "portNumber": 20 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT21_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa150" + }, + "portNumber": 21 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT22_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa160" + }, + "portNumber": 22 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT23_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa170" + }, + "portNumber": 23 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT24_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa180" + }, + "portNumber": 24 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT25_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa190" + }, + "portNumber": 25 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT26_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa1a0" + }, + "portNumber": 26 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT27_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa1b0" + }, + "portNumber": 27 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT28_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa1c0" + }, + "portNumber": 28 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT29_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa1d0" + }, + "portNumber": 29 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT30_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa1e0" + }, + "portNumber": 30 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT31_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa1f0" + }, + "portNumber": 31 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT32_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa200" + }, + "portNumber": 32 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT33_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa210" + }, + "portNumber": 33 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT34_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa220" + }, + "portNumber": 34 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT35_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa230" + }, + "portNumber": 35 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT36_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa240" + }, + "portNumber": 36 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT37_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa250" + }, + "portNumber": 37 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT38_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa260" + }, + "portNumber": 38 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "QSFP_PORT39_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa290" + }, + "portNumber": 39 + } + ] + } + ] + }, + "PSU": { + "pluggedInSlotType": "PSU_SLOT", + "i2cDeviceConfigs": [ + { + "busName": "INCOMING@0", + "address": "0x58", + "kernelDeviceName": "pmbus", + "pmUnitScopedName": "PSU_PMBUS" + } + ], + "outgoingSlotConfigs": {}, + "pciDeviceConfigs": [] + }, + "FAN": { + "pluggedInSlotType": "FAN_SLOT", + "i2cDeviceConfigs": [], + "outgoingSlotConfigs": {}, + "pciDeviceConfigs": [] + } + }, + "i2cAdaptersFromCpu": [ + "SMBus I801 adapter at 1000" + ], + "symbolicLinkToDevicePath": { + "/run/devmap/fpgas/MERU_SCM_CPLD": "/[SCM_FPGA]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH0": "/[SCM_I2C_MASTER0@0]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH1": "/[SCM_I2C_MASTER0@1]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH2": "/[SCM_I2C_MASTER0@2]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH3": "/[SCM_I2C_MASTER0@3]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH4": "/[SCM_I2C_MASTER0@4]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH5": "/[SCM_I2C_MASTER0@5]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH6": "/[SCM_I2C_MASTER0@6]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH7": "/[SCM_I2C_MASTER0@7]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH0": "/[SCM_I2C_MASTER1@0]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH1": "/[SCM_I2C_MASTER1@1]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH2": "/[SCM_I2C_MASTER1@2]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH3": "/[SCM_I2C_MASTER1@3]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH4": "/[SCM_I2C_MASTER1@4]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH5": "/[SCM_I2C_MASTER1@5]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH6": "/[SCM_I2C_MASTER1@6]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH7": "/[SCM_I2C_MASTER1@7]", + "/run/devmap/eeproms/MERU800BIA_SMB_EEPROM": "/SMB_SLOT@0/[IDPROM]", + "/run/devmap/sensors/CPU_MPS_PMBUS": "/[SCM_MPS_PMBUS]", + "/run/devmap/sensors/CPU_CORE_TEMP": "/[CPU_CORE_TEMP]", + "/run/devmap/sensors/NVME_TEMP": "/[NVME_TEMP]", + "/run/devmap/fpgas/MERU800BIA_SMB_FPGA": "/SMB_SLOT@0/[SMB_FPGA]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH0": "/SMB_SLOT@0/[SMB_I2C_MASTER0@0]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH1": "/SMB_SLOT@0/[SMB_I2C_MASTER0@1]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH2": "/SMB_SLOT@0/[SMB_I2C_MASTER0@2]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH3": "/SMB_SLOT@0/[SMB_I2C_MASTER0@3]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH4": "/SMB_SLOT@0/[SMB_I2C_MASTER0@4]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH5": "/SMB_SLOT@0/[SMB_I2C_MASTER0@5]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH6": "/SMB_SLOT@0/[SMB_I2C_MASTER0@6]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH7": "/SMB_SLOT@0/[SMB_I2C_MASTER0@7]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH0": "/SMB_SLOT@0/[SMB_I2C_MASTER1@0]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH1": "/SMB_SLOT@0/[SMB_I2C_MASTER1@1]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH2": "/SMB_SLOT@0/[SMB_I2C_MASTER1@2]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH3": "/SMB_SLOT@0/[SMB_I2C_MASTER1@3]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH4": "/SMB_SLOT@0/[SMB_I2C_MASTER1@4]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH5": "/SMB_SLOT@0/[SMB_I2C_MASTER1@5]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH6": "/SMB_SLOT@0/[SMB_I2C_MASTER1@6]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH7": "/SMB_SLOT@0/[SMB_I2C_MASTER1@7]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH0": "/SMB_SLOT@0/[SMB_I2C_MASTER2@0]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH1": "/SMB_SLOT@0/[SMB_I2C_MASTER2@1]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH2": "/SMB_SLOT@0/[SMB_I2C_MASTER2@2]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH3": "/SMB_SLOT@0/[SMB_I2C_MASTER2@3]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH4": "/SMB_SLOT@0/[SMB_I2C_MASTER2@4]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH5": "/SMB_SLOT@0/[SMB_I2C_MASTER2@5]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH6": "/SMB_SLOT@0/[SMB_I2C_MASTER2@6]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH7": "/SMB_SLOT@0/[SMB_I2C_MASTER2@7]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH0": "/SMB_SLOT@0/[SMB_I2C_MASTER3@0]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH1": "/SMB_SLOT@0/[SMB_I2C_MASTER3@1]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH2": "/SMB_SLOT@0/[SMB_I2C_MASTER3@2]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH3": "/SMB_SLOT@0/[SMB_I2C_MASTER3@3]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH4": "/SMB_SLOT@0/[SMB_I2C_MASTER3@4]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH5": "/SMB_SLOT@0/[SMB_I2C_MASTER3@5]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH6": "/SMB_SLOT@0/[SMB_I2C_MASTER3@6]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH7": "/SMB_SLOT@0/[SMB_I2C_MASTER3@7]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH0": "/SMB_SLOT@0/[SMB_I2C_MASTER4@0]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH1": "/SMB_SLOT@0/[SMB_I2C_MASTER4@1]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH2": "/SMB_SLOT@0/[SMB_I2C_MASTER4@2]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH3": "/SMB_SLOT@0/[SMB_I2C_MASTER4@3]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH4": "/SMB_SLOT@0/[SMB_I2C_MASTER4@4]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH5": "/SMB_SLOT@0/[SMB_I2C_MASTER4@5]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH6": "/SMB_SLOT@0/[SMB_I2C_MASTER4@6]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH7": "/SMB_SLOT@0/[SMB_I2C_MASTER4@7]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH0": "/SMB_SLOT@0/[SMB_I2C_MASTER5@0]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH1": "/SMB_SLOT@0/[SMB_I2C_MASTER5@1]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH2": "/SMB_SLOT@0/[SMB_I2C_MASTER5@2]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH3": "/SMB_SLOT@0/[SMB_I2C_MASTER5@3]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH4": "/SMB_SLOT@0/[SMB_I2C_MASTER5@4]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH5": "/SMB_SLOT@0/[SMB_I2C_MASTER5@5]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH6": "/SMB_SLOT@0/[SMB_I2C_MASTER5@6]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH7": "/SMB_SLOT@0/[SMB_I2C_MASTER5@7]", + "/run/devmap/gpiochips/SMB_PCA": "/SMB_SLOT@0/[SMB_PCA]", + "/run/devmap/sensors/SMB_TMP75_FRONT": "/SMB_SLOT@0/[SMB_TMP75_FRONT]", + "/run/devmap/sensors/SMB_TMP75_REAR": "/SMB_SLOT@0/[SMB_TMP75_REAR]", + "/run/devmap/sensors/SMB_MAX6581": "/SMB_SLOT@0/[SMB_MAX6581]", + "/run/devmap/sensors/FAN_TMP75": "/SMB_SLOT@0/[FAN_TMP75]", + "/run/devmap/cplds/FAN_CPLD": "/SMB_SLOT@0/[FAN_CPLD]", + "/run/devmap/sensors/FAN_CPLD": "/SMB_SLOT@0/[FAN_CPLD]", + "/run/devmap/sensors/SMB_RAA228926_J3": "/SMB_SLOT@0/[SMB_RAA228926_J3]", + "/run/devmap/sensors/SMB_ISL68226_J3": "/SMB_SLOT@0/[SMB_ISL68226_J3]", + "/run/devmap/sensors/SMB_ISL68226_OPTICS": "/SMB_SLOT@0/[SMB_ISL68226_OPTICS]", + "/run/devmap/sensors/SMB_MGMT_TMP75": "/SMB_SLOT@0/[SMB_MGMT_TMP75]", + "/run/devmap/xcvrs/xcvr_1": "/SMB_SLOT@0/[OSFP_PORT1_XCVR]", + "/run/devmap/xcvrs/xcvr_2": "/SMB_SLOT@0/[OSFP_PORT2_XCVR]", + "/run/devmap/xcvrs/xcvr_3": "/SMB_SLOT@0/[OSFP_PORT3_XCVR]", + "/run/devmap/xcvrs/xcvr_4": "/SMB_SLOT@0/[OSFP_PORT4_XCVR]", + "/run/devmap/xcvrs/xcvr_5": "/SMB_SLOT@0/[OSFP_PORT5_XCVR]", + "/run/devmap/xcvrs/xcvr_6": "/SMB_SLOT@0/[OSFP_PORT6_XCVR]", + "/run/devmap/xcvrs/xcvr_7": "/SMB_SLOT@0/[OSFP_PORT7_XCVR]", + "/run/devmap/xcvrs/xcvr_8": "/SMB_SLOT@0/[OSFP_PORT8_XCVR]", + "/run/devmap/xcvrs/xcvr_9": "/SMB_SLOT@0/[OSFP_PORT9_XCVR]", + "/run/devmap/xcvrs/xcvr_10": "/SMB_SLOT@0/[OSFP_PORT10_XCVR]", + "/run/devmap/xcvrs/xcvr_11": "/SMB_SLOT@0/[OSFP_PORT11_XCVR]", + "/run/devmap/xcvrs/xcvr_12": "/SMB_SLOT@0/[OSFP_PORT12_XCVR]", + "/run/devmap/xcvrs/xcvr_13": "/SMB_SLOT@0/[OSFP_PORT13_XCVR]", + "/run/devmap/xcvrs/xcvr_14": "/SMB_SLOT@0/[OSFP_PORT14_XCVR]", + "/run/devmap/xcvrs/xcvr_15": "/SMB_SLOT@0/[OSFP_PORT15_XCVR]", + "/run/devmap/xcvrs/xcvr_16": "/SMB_SLOT@0/[OSFP_PORT16_XCVR]", + "/run/devmap/xcvrs/xcvr_17": "/SMB_SLOT@0/[OSFP_PORT17_XCVR]", + "/run/devmap/xcvrs/xcvr_18": "/SMB_SLOT@0/[OSFP_PORT18_XCVR]", + "/run/devmap/xcvrs/xcvr_19": "/SMB_SLOT@0/[OSFP_PORT19_XCVR]", + "/run/devmap/xcvrs/xcvr_20": "/SMB_SLOT@0/[OSFP_PORT20_XCVR]", + "/run/devmap/xcvrs/xcvr_21": "/SMB_SLOT@0/[OSFP_PORT21_XCVR]", + "/run/devmap/xcvrs/xcvr_22": "/SMB_SLOT@0/[OSFP_PORT22_XCVR]", + "/run/devmap/xcvrs/xcvr_23": "/SMB_SLOT@0/[OSFP_PORT23_XCVR]", + "/run/devmap/xcvrs/xcvr_24": "/SMB_SLOT@0/[OSFP_PORT24_XCVR]", + "/run/devmap/xcvrs/xcvr_25": "/SMB_SLOT@0/[OSFP_PORT25_XCVR]", + "/run/devmap/xcvrs/xcvr_26": "/SMB_SLOT@0/[OSFP_PORT26_XCVR]", + "/run/devmap/xcvrs/xcvr_27": "/SMB_SLOT@0/[OSFP_PORT27_XCVR]", + "/run/devmap/xcvrs/xcvr_28": "/SMB_SLOT@0/[OSFP_PORT28_XCVR]", + "/run/devmap/xcvrs/xcvr_29": "/SMB_SLOT@0/[OSFP_PORT29_XCVR]", + "/run/devmap/xcvrs/xcvr_30": "/SMB_SLOT@0/[OSFP_PORT30_XCVR]", + "/run/devmap/xcvrs/xcvr_31": "/SMB_SLOT@0/[OSFP_PORT31_XCVR]", + "/run/devmap/xcvrs/xcvr_32": "/SMB_SLOT@0/[OSFP_PORT32_XCVR]", + "/run/devmap/xcvrs/xcvr_33": "/SMB_SLOT@0/[OSFP_PORT33_XCVR]", + "/run/devmap/xcvrs/xcvr_34": "/SMB_SLOT@0/[OSFP_PORT34_XCVR]", + "/run/devmap/xcvrs/xcvr_35": "/SMB_SLOT@0/[OSFP_PORT35_XCVR]", + "/run/devmap/xcvrs/xcvr_36": "/SMB_SLOT@0/[OSFP_PORT36_XCVR]", + "/run/devmap/xcvrs/xcvr_37": "/SMB_SLOT@0/[OSFP_PORT37_XCVR]", + "/run/devmap/xcvrs/xcvr_38": "/SMB_SLOT@0/[OSFP_PORT38_XCVR]", + "/run/devmap/xcvrs/xcvr_39": "/SMB_SLOT@0/[QSFP_PORT39_XCVR]", + "/run/devmap/flashes/SMB_SPI_MASTER0_DEVICE1": "/SMB_SLOT@0/[SMB_SPI_MASTER0_DEVICE1]", + "/run/devmap/sensors/PSU1_PMBUS": "/SMB_SLOT@0/PSU_SLOT@0/[PSU_PMBUS]", + "/run/devmap/sensors/PSU2_PMBUS": "/SMB_SLOT@0/PSU_SLOT@1/[PSU_PMBUS]" + }, + "bspKmodsRpmName": "arista_bsp_kmods", + "bspKmodsRpmVersion": "0.7.5-1", + "bspKmodsToReload": [ + "scd-xcvr", + "scd-spi", + "scd-leds", + "scd-smbus", + "dsf-fan-cpld" + ], + "sharedKmodsToReload": [ + "scd" + ], + "upstreamKmodsToLoad": [ + "spidev", + "i2c-i801" + ] +} diff --git a/fboss/platform/platform_manager/PlatformExplorer.cpp b/fboss/platform/platform_manager/PlatformExplorer.cpp index 07c5bc7eb442b..61ab9161e7fd4 100644 --- a/fboss/platform/platform_manager/PlatformExplorer.cpp +++ b/fboss/platform/platform_manager/PlatformExplorer.cpp @@ -306,7 +306,8 @@ std::optional PlatformExplorer::getPmUnitNameFromSlot( See: https://github.com/facebookexternal/fboss.bsp.arista/pull/31/files */ if ((platformConfig_.platformName().value() == "meru800bfa" || - platformConfig_.platformName().value() == "meru800bia") && + platformConfig_.platformName().value() == "meru800bia" || + platformConfig_.platformName().value() == "meru800biab") && (!(idpromConfig.busName()->starts_with("INCOMING")) && *idpromConfig.address() == "0x50")) { try { From d94980d383e0cd5e348f1bfc614077ea6738f4b5 Mon Sep 17 00:00:00 2001 From: lucas liu Date: Thu, 17 Oct 2024 12:12:09 -0700 Subject: [PATCH 176/479] montblanc: config: Update sensor config based on the latest sensors list (#272) Summary: **Description** Updated sensors config files based on the latest sensors list. **Motivation** 1. Sync up sensor config from fboss repo. 2. Updated sensor config file based on the latest sensors list. - Added two PSU standby voltage sesnors. - Added two COMe temp sesnors. - Updated some COMe sensors threshold date with list data. https://docs.google.com/spreadsheets/d/1V_JFLw2m0Zu1DUgVeVPKSGsQrPkRYgCh/edit?gid=1703809973#gid=1703809973 **Test Plan** - Run the jq to format json file. - build the latest fboss bsp kmod. - build the latest fboss platform manager binary. - Run the platform manager with the changed config files on DVT and 2nd source DVT device normally: LD_LIBRARY_PATH=./lib/ ./bin/platform_manager --config_file ./platform_manager.json --run_once=false --noenable_pkg_mgmnt - Run sensor_service with the new config file: LD_LIBRARY_PATH=./lib/ ./bin/sensor_service --config_file ./sensor_service.json --logging=DBG1 Current tested the new config file on two tpye board normal. [montblanc_sensor_config_IFX_test_log_20241015.txt](https://github.com/user-attachments/files/17374775/montblanc_sensor_config_IFX_test_log_20241015.txt) [montblanc_sensor_config_MP_test_log_20241015.txt](https://github.com/user-attachments/files/17374776/montblanc_sensor_config_MP_test_log_20241015.txt) _Limitation:_ Due to the firmware problem of the PSU, the standby voltage cannot be found, so it is necessary to upgrade to the latest firmware. ![image](https://github.com/user-attachments/assets/c3490528-2bdc-48ee-b78d-8b597022a205) Pull Request resolved: https://github.com/facebook/fboss/pull/272 Reviewed By: mikechoifb Differential Revision: D64545236 Pulled By: kimdo8736 fbshipit-source-id: d9cbefcfb70d6c718fcd7ee4d82fc1c6912444dd --- .../configs/montblanc/sensor_service.json | 180 +++++++++++------- 1 file changed, 112 insertions(+), 68 deletions(-) diff --git a/fboss/platform/configs/montblanc/sensor_service.json b/fboss/platform/configs/montblanc/sensor_service.json index 0075b79a277c3..90edbb3be68a4 100644 --- a/fboss/platform/configs/montblanc/sensor_service.json +++ b/fboss/platform/configs/montblanc/sensor_service.json @@ -599,7 +599,27 @@ "pmUnitName": "NETLAKE", "sensors": [ { - "name": "COMe_PU31_TDA38640_PVNN_PCH_VIN", + "name": "COME_U18_INLET_SENSOR_TMP75_TEMP", + "sysfsPath": "/run/devmap/sensors/COME_TSENSOR1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 60, + "upperCriticalVal": 65 + }, + "compute": "@/1000" + }, + { + "name": "COME_U39_OUTLET_SENSOR_TMP75_TEMP", + "sysfsPath": "/run/devmap/sensors/COME_TSENSOR2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 60, + "upperCriticalVal": 65 + }, + "compute": "@/1000" + }, + { + "name": "COME_PU31_TDA38640_PVNN_PCH_VIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/in1_input", "type": 1, "thresholds": { @@ -608,7 +628,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU31_TDA38640_PVNN_PCH_VOUT", + "name": "COME_PU31_TDA38640_PVNN_PCH_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/in2_input", "type": 1, "thresholds": { @@ -618,7 +638,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU31_TDA38640_PVNN_PCH_TEMP", + "name": "COME_PU31_TDA38640_PVNN_PCH_TEMP", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/temp1_input", "type": 3, "thresholds": { @@ -628,25 +648,25 @@ "compute": "@/1000" }, { - "name": "COMe_PU31_TDA38640_PVNN_PCH_PIN", + "name": "COME_PU31_TDA38640_PVNN_PCH_PIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/power1_input", "type": 0, "compute": "@/1000000" }, { - "name": "COMe_PU31_TDA38640_PVNN_PCH_POUT", + "name": "COME_PU31_TDA38640_PVNN_PCH_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/power2_input", "type": 0, "compute": "@/1000000" }, { - "name": "COMe_PU31_TDA38640_PVNN_PCH_IIN", + "name": "COME_PU31_TDA38640_PVNN_PCH_IIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/curr1_input", "type": 2, "compute": "@/1000" }, { - "name": "COMe_PU31_TDA38640_PVNN_PCH_IOUT", + "name": "COME_PU31_TDA38640_PVNN_PCH_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/curr2_input", "type": 2, "thresholds": { @@ -655,7 +675,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_VIN", + "name": "COME_PU32_TDA38640_P1V05_STBY_VIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/in1_input", "type": 1, "thresholds": { @@ -664,7 +684,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_VOUT", + "name": "COME_PU32_TDA38640_P1V05_STBY_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/in2_input", "type": 1, "thresholds": { @@ -674,7 +694,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_TEMP", + "name": "COME_PU32_TDA38640_P1V05_STBY_TEMP", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/temp1_input", "type": 3, "thresholds": { @@ -684,25 +704,25 @@ "compute": "@/1000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_PIN", + "name": "COME_PU32_TDA38640_P1V05_STBY_PIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/power1_input", "type": 0, "compute": "@/1000000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_POUT", + "name": "COME_PU32_TDA38640_P1V05_STBY_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/power2_input", "type": 0, "compute": "@/1000000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_IIN", + "name": "COME_PU32_TDA38640_P1V05_STBY_IIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/curr1_input", "type": 2, "compute": "@/1000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_IOUT", + "name": "COME_PU32_TDA38640_P1V05_STBY_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/curr2_input", "type": 2, "thresholds": { @@ -711,7 +731,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_VIN", + "name": "COME_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_VIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/in1_input", "type": 1, "thresholds": { @@ -720,7 +740,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_VOUT", + "name": "COME_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/in2_input", "type": 1, "thresholds": { @@ -730,7 +750,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_TEMP", + "name": "COME_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_TEMP", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/temp1_input", "type": 3, "thresholds": { @@ -740,25 +760,25 @@ "compute": "@/1000" }, { - "name": "COMe_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_PIN", + "name": "COME_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_PIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/power1_input", "type": 0, "compute": "@/1000" }, { - "name": "COMe_PU41_TDA38640_P1V05_STBY_POUT", + "name": "COME_PU41_TDA38640_P1V05_STBY_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/power2_input", "type": 0, "compute": "@/1000000" }, { - "name": "COMe_PU41_TDA38640_P1V05_STBY_IIN", + "name": "COME_PU41_TDA38640_P1V05_STBY_IIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/curr1_input", "type": 2, "compute": "@/1000" }, { - "name": "COMe_PU41_TDA38640_P1V05_STBY_IOUT", + "name": "COME_PU41_TDA38640_P1V05_STBY_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/curr2_input", "type": 2, "thresholds": { @@ -767,7 +787,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_VIN", + "name": "COME_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_VIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/in1_input", "type": 1, "thresholds": { @@ -776,7 +796,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_VOUT", + "name": "COME_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/in2_input", "type": 1, "thresholds": { @@ -786,7 +806,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_TEMP", + "name": "COME_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_TEMP", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/temp1_input", "type": 3, "thresholds": { @@ -796,25 +816,25 @@ "compute": "@/1000" }, { - "name": "COMe_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_PIN", + "name": "COME_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_PIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/power1_input", "type": 0, "compute": "@/1000" }, { - "name": "COMe_PU42_TDA38640_P1V05_STBY_POUT", + "name": "COME_PU42_TDA38640_P1V05_STBY_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/power2_input", "type": 0, "compute": "@/1000000" }, { - "name": "COMe_PU42_TDA38640_P1V05_STBY_IIN", + "name": "COME_PU42_TDA38640_P1V05_STBY_IIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/curr1_input", "type": 2, "compute": "@/1000" }, { - "name": "COMe_PU42_TDA38640_P1V05_STBY_IOUT", + "name": "COME_PU42_TDA38640_P1V05_STBY_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/curr2_input", "type": 2, "thresholds": { @@ -823,7 +843,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_VIN", + "name": "COME_PU4_XDPE15284_PVCCIN_VIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/in1_input", "type": 1, "thresholds": { @@ -834,7 +854,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_TEMP", + "name": "COME_PU4_XDPE15284_PVCCIN_TEMP", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/temp1_input", "type": 3, "thresholds": { @@ -844,7 +864,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_TEMP", + "name": "COME_PU4_XDPE15284_P1V8_TEMP", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/temp2_input", "type": 3, "thresholds": { @@ -854,16 +874,16 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_PIN", + "name": "COME_PU4_XDPE15284_PVCCIN_PIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/power1_input", "type": 0, "thresholds": { - "maxAlarmVal": 1024 + "maxAlarmVal": 225 }, "compute": "@/1000000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_IIN", + "name": "COME_PU4_XDPE15284_PVCCIN_IIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/curr1_input", "type": 2, "thresholds": { @@ -877,7 +897,7 @@ { "sensors": [ { - "name": "COMe_PU4_XDPE15284_P1V8_VIN", + "name": "COME_PU4_XDPE15284_P1V8_VIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/in2_input", "type": 1, "thresholds": { @@ -888,7 +908,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_VOUT", + "name": "COME_PU4_XDPE15284_PVCCIN_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/in3_input", "type": 1, "thresholds": { @@ -899,7 +919,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_VOUT", + "name": "COME_PU4_XDPE15284_P1V8_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/in4_input", "type": 1, "thresholds": { @@ -910,34 +930,34 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_PIN", + "name": "COME_PU4_XDPE15284_P1V8_PIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/power2_input", "type": 0, "thresholds": { - "maxAlarmVal": 4096 + "maxAlarmVal": 52.5 }, "compute": "@/1000000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_POUT", + "name": "COME_PU4_XDPE15284_PVCCIN_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/power3_input", "type": 0, "thresholds": { - "maxAlarmVal": 1024 + "maxAlarmVal": 318.5 }, "compute": "@/1000000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_POUT", + "name": "COME_PU4_XDPE15284_P1V8_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/power4_input", "type": 0, "thresholds": { - "maxAlarmVal": 125 + "maxAlarmVal": 15 }, "compute": "@/1000000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_IIN", + "name": "COME_PU4_XDPE15284_P1V8_IIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/curr2_input", "type": 2, "thresholds": { @@ -947,7 +967,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_IOUT", + "name": "COME_PU4_XDPE15284_PVCCIN_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/curr3_input", "type": 2, "thresholds": { @@ -957,7 +977,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_IOUT", + "name": "COME_PU4_XDPE15284_P1V8_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/curr4_input", "type": 2, "thresholds": { @@ -974,7 +994,7 @@ { "sensors": [ { - "name": "COMe_PU4_XDPE15284_PVCCIN_VOUT", + "name": "COME_PU4_XDPE15284_PVCCIN_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/in2_input", "type": 1, "thresholds": { @@ -985,7 +1005,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_VOUT", + "name": "COME_PU4_XDPE15284_P1V8_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/in3_input", "type": 1, "thresholds": { @@ -996,7 +1016,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_POUT", + "name": "COME_PU4_XDPE15284_PVCCIN_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/power2_input", "type": 0, "thresholds": { @@ -1005,7 +1025,7 @@ "compute": "@/1000000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_POUT", + "name": "COME_PU4_XDPE15284_P1V8_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/power3_input", "type": 0, "thresholds": { @@ -1014,7 +1034,7 @@ "compute": "@/1000000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_IOUT", + "name": "COME_PU4_XDPE15284_PVCCIN_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/curr2_input", "type": 2, "thresholds": { @@ -1024,7 +1044,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_IOUT", + "name": "COME_PU4_XDPE15284_P1V8_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/curr3_input", "type": 2, "thresholds": { @@ -1119,7 +1139,7 @@ "compute": "@/1000" }, { - "name": "PSU1_L_12V_VOUT", + "name": "PSU1_L_12V_MAIN_VOUT", "sysfsPath": "/run/devmap/sensors/PDB_L_PMBUS/in2_input", "type": 1, "thresholds": { @@ -1130,6 +1150,18 @@ }, "compute": "@/1000" }, + { + "name": "PSU1_L_12V_STBY_VOUT", + "sysfsPath": "/run/devmap/sensors/PDB_L_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 13.2, + "maxAlarmVal": 12.6, + "minAlarmVal": 11.4, + "lowerCriticalVal": 10.8 + }, + "compute": "@/1000" + }, { "name": "PSU1_L_IIN", "sysfsPath": "/run/devmap/sensors/PDB_L_PMBUS/curr1_input", @@ -1243,7 +1275,7 @@ "compute": "@/1000" }, { - "name": "PSU2_R_12V_VOUT", + "name": "PSU2_R_12V_MAIN_VOUT", "sysfsPath": "/run/devmap/sensors/PDB_R_PMBUS/in2_input", "type": 1, "thresholds": { @@ -1254,6 +1286,18 @@ }, "compute": "@/1000" }, + { + "name": "PSU2_L_12V_STBY_VOUT", + "sysfsPath": "/run/devmap/sensors/PDB_R_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 13.2, + "maxAlarmVal": 12.6, + "minAlarmVal": 11.4, + "lowerCriticalVal": 10.8 + }, + "compute": "@/1000" + }, { "name": "PSU2_R_IIN", "sysfsPath": "/run/devmap/sensors/PDB_R_PMBUS/curr1_input", @@ -1627,7 +1671,7 @@ "sensors": [ { "name": "SMB_LEFT_U51_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR1/temp1_input", + "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR5/temp1_input", "type": 3, "thresholds": { "upperCriticalVal": 85, @@ -1657,7 +1701,7 @@ }, { "name": "SMB_RIGHT_U182_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR4/temp1_input", + "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR6/temp1_input", "type": 3, "thresholds": { "upperCriticalVal": 85, @@ -1768,7 +1812,7 @@ "thresholds": { "upperCriticalVal": 1.98, "maxAlarmVal": 1.89, - "minAlarmVal": 1.7955, + "minAlarmVal": 1.71, "lowerCriticalVal": 1.62 }, "compute": "@/1000" @@ -1780,7 +1824,7 @@ "thresholds": { "upperCriticalVal": 1.21, "maxAlarmVal": 1.155, - "minAlarmVal": 1.09725, + "minAlarmVal": 1.045, "lowerCriticalVal": 0.99 }, "compute": "@/1000" @@ -1792,7 +1836,7 @@ "thresholds": { "upperCriticalVal": 0.99, "maxAlarmVal": 0.945, - "minAlarmVal": 0.89775, + "minAlarmVal": 0.855, "lowerCriticalVal": 0.81 }, "compute": "@/1000" @@ -1804,7 +1848,7 @@ "thresholds": { "upperCriticalVal": 2.75, "maxAlarmVal": 2.625, - "minAlarmVal": 2.49375, + "minAlarmVal": 2.375, "lowerCriticalVal": 2.25 }, "compute": "@/1000" @@ -1816,7 +1860,7 @@ "thresholds": { "upperCriticalVal": 0.88, "maxAlarmVal": 0.84, - "minAlarmVal": 0.798, + "minAlarmVal": 0.76, "lowerCriticalVal": 0.72 }, "compute": "@/1000" @@ -1828,7 +1872,7 @@ "thresholds": { "upperCriticalVal": 1.65, "maxAlarmVal": 1.575, - "minAlarmVal": 1.49625, + "minAlarmVal": 1.425, "lowerCriticalVal": 1.35 }, "compute": "@/1000" @@ -1840,7 +1884,7 @@ "thresholds": { "upperCriticalVal": 1.32, "maxAlarmVal": 1.26, - "minAlarmVal": 1.197, + "minAlarmVal": 1.14, "lowerCriticalVal": 1.08 }, "compute": "@/1000" @@ -1852,7 +1896,7 @@ "thresholds": { "upperCriticalVal": 0.99, "maxAlarmVal": 0.945, - "minAlarmVal": 0.89775, + "minAlarmVal": 0.855, "lowerCriticalVal": 0.81 }, "compute": "@/1000" @@ -3526,7 +3570,7 @@ "sensors": [ { "name": "SMB_3V3_L_U8_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR5/temp1_input", + "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR1/temp1_input", "type": 3, "thresholds": { "upperCriticalVal": 85, @@ -3566,7 +3610,7 @@ "minAlarmVal": 3.135, "lowerCriticalVal": 2.97 }, - "compute": "@/1000" + "compute": "3*@/1000" }, { "name": "SMB_3V3_L_VRM_TEMP", @@ -3854,7 +3898,7 @@ "sensors": [ { "name": "SMB_3V3_R_U8_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR6/temp1_input", + "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR4/temp1_input", "type": 3, "thresholds": { "upperCriticalVal": 85, @@ -3894,7 +3938,7 @@ "minAlarmVal": 3.135, "lowerCriticalVal": 2.97 }, - "compute": "@/1000" + "compute": "3*@/1000" }, { "name": "SMB_3V3_R_VRM_TEMP", From a715823860df4c79579a0ec13a259d796fe44640 Mon Sep 17 00:00:00 2001 From: edward Date: Thu, 17 Oct 2024 12:15:30 -0700 Subject: [PATCH 177/479] janga: config: modify pmUnitName and adjust SMB_U337_PMBUS_1 & SMB_U177_PMBUS_2 (#266) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Description This PR is for janga 2nd source sensor service. Motivation 1.In platform such common sensors: “SMB_E1S_SSD_TEMP”, “SMB_U104_OUTER_LM75_TEMP”, “SMB_U15_OSFP_OUTER_LM75_TEMP” we put them in pmUnitName JANGA, SMB only exist versioned sensors to avoid redundancy. image 2.We have checked the email info and found we do not need to change platform config just change sensor config. image 3.So I moved common SMB sensors to pmUnitName JANGA according to platform config(In this PR i did not change platform config,just following the platform config structure). 4.Added SMB_U337_PMBUS_1 and SMB_U177_PMBUS_2 configs for every SMB main source and SMB 2nd source,because they are versioned sensors missed it before. 5.Adjusted "RUNBMC" pmUnitName to "MINERVA_BMC". Pull Request resolved: https://github.com/facebook/fboss/pull/266 Test Plan: 1.The correctness of the format has been verified on this website https://jsonlint.com/ 2.Used jq cmd to pretty the format. 3.Test log as follows: Tested both in janga dvt main source & janga dvt 2nd source machine. janga 2nd source tested log: ![image](https://github.com/user-attachments/assets/63a205c9-16e3-4ee6-9068-b4e06a2f0b1a) janga main source tested log: ![image](https://github.com/user-attachments/assets/fe9fdc94-671f-4bad-849c-be91857bfc19) [janga_dvt_2nd_platform_10_12_test.txt](https://github.com/user-attachments/files/17359632/janga_dvt_2nd_platform_10_12_test.txt) [janga_dvt_2nd_sensor_10_12_test.txt](https://github.com/user-attachments/files/17359633/janga_dvt_2nd_sensor_10_12_test.txt) [janga_dvt_main_source_platform_10_12_test.txt](https://github.com/user-attachments/files/17359634/janga_dvt_main_source_platform_10_12_test.txt) [janga_dvt_main_source_sensor_10_12_test.txt](https://github.com/user-attachments/files/17359635/janga_dvt_main_source_sensor_10_12_test.txt) Reviewed By: mikechoifb Differential Revision: D64483310 Pulled By: kimdo8736 fbshipit-source-id: 9a9993340e0b517135e67b2f71561c9c14661f15 --- .../configs/janga800bic/sensor_service.json | 925 ++++++++++++++---- 1 file changed, 720 insertions(+), 205 deletions(-) diff --git a/fboss/platform/configs/janga800bic/sensor_service.json b/fboss/platform/configs/janga800bic/sensor_service.json index 9bb82aecaec5b..d03314e4ce6ee 100644 --- a/fboss/platform/configs/janga800bic/sensor_service.json +++ b/fboss/platform/configs/janga800bic/sensor_service.json @@ -93,93 +93,7 @@ "upperCriticalVal": 100 }, "compute": "@/1000" - } - ] - }, - { - "slotPath": "/PDB_SLOT@0", - "pmUnitName": "PDB", - "sensors": [ - { - "name": "PDB_PS1_12V_IOUT", - "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_1/curr1_input", - "type": 2, - "thresholds": { - "maxAlarmVal": 120, - "upperCriticalVal": 130 - }, - "compute": "@/1000.0" }, - { - "name": "PDB_PS1_12V_VOUT", - "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_1/in2_input", - "type": 1, - "thresholds": { - "maxAlarmVal": 13.5, - "minAlarmVal": 10.5, - "upperCriticalVal": 14, - "lowerCriticalVal": 10 - }, - "compute": "@/1000.0" - }, - { - "name": "PDB_PS1_12V_TEMP", - "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_1/temp1_input", - "type": 3, - "thresholds": { - "maxAlarmVal": 115, - "upperCriticalVal": 125 - }, - "compute": "@/1000.0" - }, - { - "name": "PDB_PS2_12V_IOUT", - "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_2/curr1_input", - "type": 2, - "thresholds": { - "maxAlarmVal": 120, - "upperCriticalVal": 130 - }, - "compute": "@/1000.0" - }, - { - "name": "PDB_PS2_12V_VOUT", - "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_2/in2_input", - "type": 1, - "thresholds": { - "maxAlarmVal": 13.2, - "minAlarmVal": 10.8, - "upperCriticalVal": 14, - "lowerCriticalVal": 10 - }, - "compute": "@/1000.0" - }, - { - "name": "PDB_PS2_12V_TEMP", - "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_2/temp1_input", - "type": 3, - "thresholds": { - "maxAlarmVal": 115, - "upperCriticalVal": 125 - }, - "compute": "@/1000.0" - }, - { - "name": "PDB_U1_LM75_TEMP", - "sysfsPath": "/run/devmap/sensors/PDB_U1_LM75B/temp1_input", - "type": 3, - "thresholds": { - "maxAlarmVal": 55, - "upperCriticalVal": 60 - }, - "compute": "@/1000.0" - } - ] - }, - { - "slotPath": "/", - "pmUnitName": "SMB", - "sensors": [ { "name": "SMB_E1S_SSD_TEMP", "sysfsPath": "/run/devmap/sensors/SMB_E1S_SSD_TEMP/temp1_input", @@ -220,48 +134,6 @@ }, "compute": "@/1000.0" }, - { - "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_IOUT_", - "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/curr1_input", - "type": 2, - "thresholds": { - "maxAlarmVal": 850, - "upperCriticalVal": 870 - }, - "compute": "@/1000.0" - }, - { - "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VOUT", - "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in2_input", - "type": 1, - "thresholds": { - "maxAlarmVal": 0.814, - "minAlarmVal": 0.736, - "upperCriticalVal": 0.95, - "lowerCriticalVal": 0.7 - }, - "compute": "@/1000.0" - }, - { - "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_POUT", - "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power2_input", - "type": 0, - "thresholds": { - "maxAlarmVal": 660, - "upperCriticalVal": 680 - }, - "compute": "@/1000000.0" - }, - { - "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/temp1_input", - "type": 3, - "thresholds": { - "maxAlarmVal": 115, - "upperCriticalVal": 125 - }, - "compute": "@/1000.0" - }, { "name": "SMB_U17_INNER_RIGHT_LM75_TEMP", "sysfsPath": "/run/devmap/sensors/SMB_U17_LM75B_1/temp1_input", @@ -394,48 +266,6 @@ }, "compute": "@/1000.0" }, - { - "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_IOUT", - "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/curr1_input", - "type": 2, - "thresholds": { - "maxAlarmVal": 850, - "upperCriticalVal": 870 - }, - "compute": "@/1000.0" - }, - { - "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VOUT", - "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in2_input", - "type": 1, - "thresholds": { - "maxAlarmVal": 0.814, - "minAlarmVal": 0.736, - "upperCriticalVal": 0.95, - "lowerCriticalVal": 0.7 - }, - "compute": "@/1000.0" - }, - { - "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_POUT", - "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power2_input", - "type": 0, - "thresholds": { - "maxAlarmVal": 660, - "upperCriticalVal": 680 - }, - "compute": "@/1000000.0" - }, - { - "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/temp1_input", - "type": 3, - "thresholds": { - "maxAlarmVal": 115, - "upperCriticalVal": 125 - }, - "compute": "@/1000.0" - }, { "name": "SMB_U353_XP12R0V_VOLT", "sysfsPath": "/run/devmap/sensors/SMB_U353_ADC128D818_3/in0_input", @@ -1176,7 +1006,92 @@ }, "compute": "(1000/3650)*@/1000.0" } - ], + ] + }, + { + "slotPath": "/PDB_SLOT@0", + "pmUnitName": "PDB", + "sensors": [ + { + "name": "PDB_PS1_12V_IOUT", + "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_1/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 120, + "upperCriticalVal": 130 + }, + "compute": "@/1000.0" + }, + { + "name": "PDB_PS1_12V_VOUT", + "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_1/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "PDB_PS1_12V_TEMP", + "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "PDB_PS2_12V_IOUT", + "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_2/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 120, + "upperCriticalVal": 130 + }, + "compute": "@/1000.0" + }, + { + "name": "PDB_PS2_12V_VOUT", + "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_2/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.2, + "minAlarmVal": 10.8, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "PDB_PS2_12V_TEMP", + "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "PDB_U1_LM75_TEMP", + "sysfsPath": "/run/devmap/sensors/PDB_U1_LM75B/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 55, + "upperCriticalVal": 60 + }, + "compute": "@/1000.0" + } + ] + }, + { + "slotPath": "/SMB_FRU_SLOT@0", + "pmUnitName": "SMB", + "sensors": [], "versionedSensors": [ { "sensors": [ @@ -1771,6 +1686,126 @@ "upperCriticalVal": 125 }, "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_IOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_IOUT_", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power1_input", + "type": 0, + "compute": "@/1000000.0" } ], "productProductionState": 2, @@ -2298,62 +2333,174 @@ "compute": "@/1000.0" }, { - "name": "SMB_U347_J3B_1V2_HBM_1_2_VOUT", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/in3_input", + "name": "SMB_U347_J3B_1V2_HBM_1_2_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/in3_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 1.26, + "minAlarmVal": 1.14, + "upperCriticalVal": 1.3, + "lowerCriticalVal": 1.1 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U347_J3B_1V2_HBM_1_2_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/power3_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 50, + "upperCriticalVal": 55 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_IOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/curr4_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 51, + "upperCriticalVal": 55 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/in4_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.95, + "minAlarmVal": 0.85, + "upperCriticalVal": 1, + "lowerCriticalVal": 0.8 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/power4_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 63, + "upperCriticalVal": 68 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U347_J3B_1V2_HBM1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/temp2_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_IOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in1_input", "type": 1, "thresholds": { - "maxAlarmVal": 1.26, - "minAlarmVal": 1.14, - "upperCriticalVal": 1.3, - "lowerCriticalVal": 1.1 + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 }, "compute": "@/1000.0" }, { - "name": "SMB_U347_J3B_1V2_HBM_1_2_POUT", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/power3_input", + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power1_input", "type": 0, - "thresholds": { - "maxAlarmVal": 50, - "upperCriticalVal": 55 - }, "compute": "@/1000000.0" }, { - "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_IOUT", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/curr4_input", + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_IOUT_", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/curr1_input", "type": 2, "thresholds": { - "maxAlarmVal": 51, - "upperCriticalVal": 55 + "maxAlarmVal": 850, + "upperCriticalVal": 870 }, "compute": "@/1000.0" }, { - "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_VOUT", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/in4_input", + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in2_input", "type": 1, "thresholds": { - "maxAlarmVal": 0.95, - "minAlarmVal": 0.85, - "upperCriticalVal": 1, - "lowerCriticalVal": 0.8 + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 }, "compute": "@/1000.0" }, { - "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_POUT", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/power4_input", + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power2_input", "type": 0, "thresholds": { - "maxAlarmVal": 63, - "upperCriticalVal": 68 + "maxAlarmVal": 660, + "upperCriticalVal": 680 }, "compute": "@/1000000.0" }, { - "name": "SMB_U347_J3B_1V2_HBM1_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/temp1_input", + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/temp1_input", "type": 3, "thresholds": { "maxAlarmVal": 115, @@ -2362,14 +2509,22 @@ "compute": "@/1000.0" }, { - "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/temp2_input", - "type": 3, + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in1_input", + "type": 1, "thresholds": { - "maxAlarmVal": 115, - "upperCriticalVal": 125 + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 }, "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power1_input", + "type": 0, + "compute": "@/1000000.0" } ], "productProductionState": 2, @@ -2969,6 +3124,126 @@ "upperCriticalVal": 125 }, "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_IOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_IOUT_", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power1_input", + "type": 0, + "compute": "@/1000000.0" } ], "productProductionState": 2, @@ -3568,6 +3843,126 @@ "upperCriticalVal": 125 }, "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_IOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_IOUT_", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power1_input", + "type": 0, + "compute": "@/1000000.0" } ], "productProductionState": 2, @@ -4107,6 +4502,126 @@ "upperCriticalVal": 125 }, "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_IOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_IOUT_", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power1_input", + "type": 0, + "compute": "@/1000000.0" } ], "productProductionState": 2, @@ -5052,7 +5567,7 @@ }, { "slotPath": "/RUNBMC_SLOT@0", - "pmUnitName": "RUNBMC", + "pmUnitName": "MINERVA_BMC", "sensors": [ { "name": "BMC_U9_Thermal_Sensor_TMP1075_TEMP", From 96fe4c07c956a8cb66eaa9846e0e443ca18fd5b8 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Thu, 17 Oct 2024 12:15:30 -0700 Subject: [PATCH 178/479] Morgan sensor config fixes Summary: We should use the path starting with /run/devmap. SSD and CPU_CORE_TEMP is using different path. So fixing it. Reviewed By: alandau Differential Revision: D64482771 fbshipit-source-id: f219bbf4281995e3fe19468de8140c6c5f024643 --- fboss/platform/configs/morgan800cc/sensor_service.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fboss/platform/configs/morgan800cc/sensor_service.json b/fboss/platform/configs/morgan800cc/sensor_service.json index 487f724b9258a..f74bb75612a91 100644 --- a/fboss/platform/configs/morgan800cc/sensor_service.json +++ b/fboss/platform/configs/morgan800cc/sensor_service.json @@ -433,7 +433,7 @@ }, { "name": "CPU_CORE_TEMP_0", - "sysfsPath": "/sys/bus/platform/devices/coretemp.0/hwmon/hwmon1/temp1_input", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", "type": 3, "thresholds": { "upperCriticalVal": 105, @@ -443,7 +443,7 @@ }, { "name": "SSD", - "sysfsPath": "/sys/block/nvme0n1/device/hwmon0/temp1_input", + "sysfsPath": "/run/devmap/sensors/NVME/temp1_input", "type": 3, "thresholds": { "upperCriticalVal": 83, From 96bf14c76bb41f2f11935bff6674f2747ea3164b Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Thu, 17 Oct 2024 13:12:31 -0700 Subject: [PATCH 179/479] static flag to disable/enable hybrid cow feature Summary: add a flag to disable/enable hybrid cow feature. add UT to cover both cases RFC on callsite changes. since there's a lot of callers depend on this Differential Revision: D64436421 Privacy Context Container: L1125642 fbshipit-source-id: 1bd5c44c867507b1d8508dcba66f7323af7f971b --- fboss/thrift_cow/nodes/ThriftStructNode-inl.h | 37 ++-- fboss/thrift_cow/nodes/Traits.h | 5 +- fboss/thrift_cow/nodes/Types.h | 4 +- fboss/thrift_cow/nodes/tests/BUCK | 2 + .../tests/ThriftHybridStructNodeTests.cpp | 201 ++++++++++++++---- 5 files changed, 192 insertions(+), 57 deletions(-) diff --git a/fboss/thrift_cow/nodes/ThriftStructNode-inl.h b/fboss/thrift_cow/nodes/ThriftStructNode-inl.h index f1853a851fb69..27785442ccae7 100644 --- a/fboss/thrift_cow/nodes/ThriftStructNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftStructNode-inl.h @@ -154,9 +154,12 @@ struct ChildInvoke { } // namespace struct_helpers -template > +template < + typename TType, + typename Derived = ThriftStructResolver, + bool EnableHybridStorage = false> struct ThriftStructFields : public FieldBaseType { - using Self = ThriftStructFields; + using Self = ThriftStructFields; using Info = apache::thrift::reflect_struct; using CowType = FieldsType; using ThriftType = TType; @@ -178,11 +181,12 @@ struct ThriftStructFields : public FieldBaseType { template constexpr bool isSkipThriftCowEnabled() const { - if constexpr (HasSkipThriftCow::value) { - return true; - } else { - return false; + if constexpr (EnableHybridStorage) { + if constexpr (HasSkipThriftCow::value) { + return true; + } } + return false; } // This is our ultimate storage type, which is effectively a @@ -416,16 +420,21 @@ struct ThriftStructFields : public FieldBaseType { NamedMemberTypes storage_; }; -template > -class ThriftStructNode - : public NodeBaseT< - typename Resolver::type, - ThriftStructFields>, - public thrift_cow::Serializable { +template < + typename TType, + typename Resolver = ThriftStructResolver, + bool EnableHybridStorage = false> +class ThriftStructNode : public NodeBaseT< + typename Resolver::type, + ThriftStructFields< + TType, + typename Resolver::type, + EnableHybridStorage>>, + public thrift_cow::Serializable { public: - using Self = ThriftStructNode; + using Self = ThriftStructNode; using Derived = typename Resolver::type; - using Fields = ThriftStructFields; + using Fields = ThriftStructFields; using ThriftType = typename Fields::ThriftType; using BaseT = NodeBaseT; using CowType = NodeType; diff --git a/fboss/thrift_cow/nodes/Traits.h b/fboss/thrift_cow/nodes/Traits.h index db08dc59c8157..aa124dcccb286 100644 --- a/fboss/thrift_cow/nodes/Traits.h +++ b/fboss/thrift_cow/nodes/Traits.h @@ -20,7 +20,7 @@ template struct ThriftStructResolver { // if resolver is not specialized for given thrift type, default to // ThriftStructNode - using type = ThriftStructNode>; + using type = ThriftStructNode, false>; }; template @@ -65,7 +65,8 @@ struct ConvertToNodeTraits { template struct ConvertToNodeTraits { - using default_type = ThriftStructNode>; + using default_type = + ThriftStructNode, false>; using struct_type = ResolvedType; static_assert( std::is_base_of_v, diff --git a/fboss/thrift_cow/nodes/Types.h b/fboss/thrift_cow/nodes/Types.h index bc48beb07a2e0..3bc78023aa88e 100644 --- a/fboss/thrift_cow/nodes/Types.h +++ b/fboss/thrift_cow/nodes/Types.h @@ -97,13 +97,13 @@ struct FieldsType {}; // used to differentiate from COW NodeType struct HybridNodeType {}; -template +template struct ThriftStructFields; template struct ThriftHybridNode; -template +template class ThriftStructNode; template diff --git a/fboss/thrift_cow/nodes/tests/BUCK b/fboss/thrift_cow/nodes/tests/BUCK index fde72687cb8e7..c094910403968 100644 --- a/fboss/thrift_cow/nodes/tests/BUCK +++ b/fboss/thrift_cow/nodes/tests/BUCK @@ -26,6 +26,7 @@ cpp_unittest( "-DENABLE_DYNAMIC_APIS", "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", ], + supports_static_listing = False, deps = [ ":test-cpp2-reflection", "//fboss/thrift_cow/nodes:nodes", @@ -52,6 +53,7 @@ cpp_unittest( "-DENABLE_DYNAMIC_APIS", "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", ], + supports_static_listing = False, deps = [ ":test-cpp2-reflection", "//fboss/agent:switch_config-cpp2-reflection", diff --git a/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp b/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp index 1981513bcf0f7..b807eaba4eddb 100644 --- a/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp +++ b/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp @@ -21,40 +21,76 @@ using namespace facebook::fboss; using namespace facebook::fboss::thrift_cow; +using namespace ::testing; using k = test_tags::strings; -template +template struct is_allow_skip_thrift_cow { using annotations = apache::thrift::reflect_struct::annotations; static constexpr bool value = - read_annotation_allow_skip_thrift_cow::value; + read_annotation_allow_skip_thrift_cow::value && + EnableHybridStorage; }; -TEST(ThriftHybridStructNodeTests, ReadThriftStructAnnotation) { +struct TestParams { + bool enableHybridStorage; +}; + +template +class ThriftHybridStructNodeTestSuite : public ::testing::Test {}; + +TYPED_TEST_SUITE_P(ThriftHybridStructNodeTestSuite); + +template +void readThriftStructAnnotation() { #ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - static_assert(is_allow_skip_thrift_cow::value == true); + static_assert( + is_allow_skip_thrift_cow::value == + EnableHybridStorage); #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ - static_assert(is_allow_skip_thrift_cow::value == false); - static_assert(is_allow_skip_thrift_cow::value == false); + static_assert( + is_allow_skip_thrift_cow::value == + false); + static_assert( + is_allow_skip_thrift_cow::value == + false); +} + +TYPED_TEST_P(ThriftHybridStructNodeTestSuite, ReadThriftStructAnnotation) { + readThriftStructAnnotation(); + readThriftStructAnnotation(); } -TEST(ThriftHybridStructNodeTests, ThriftStructNodeAnnotations) { +template +void thriftStructNodeAnnotations() { { - ThriftStructFields fields; + ThriftStructFields< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + fields; #ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - static_assert(fields.isSkipThriftCowEnabled() == true); + static_assert( + fields.template isSkipThriftCowEnabled() == + EnableHybridStorage); #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ - static_assert(fields.isSkipThriftCowEnabled() == false); + static_assert(fields.template isSkipThriftCowEnabled() == false); } { - ThriftStructNode node; + ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + node; #ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - ASSERT_EQ(node.isSkipThriftCowEnabled(), true); + ASSERT_EQ( + node.template isSkipThriftCowEnabled(), + EnableHybridStorage); #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ - ASSERT_EQ(node.isSkipThriftCowEnabled(), false); + ASSERT_EQ(node.template isSkipThriftCowEnabled(), false); } // annotation that is other than `allow_skip_thrift_cow` { @@ -63,15 +99,25 @@ TEST(ThriftHybridStructNodeTests, ThriftStructNodeAnnotations) { } } -TEST(ThriftHybridStructNodeTests, TestHybridNodeTypes) { - ThriftStructNode node; +TYPED_TEST_P(ThriftHybridStructNodeTestSuite, ThriftStructNodeAnnotations) { + thriftStructNodeAnnotations(); + thriftStructNodeAnnotations(); +} + +template +void testHybridNodeTypes() { + ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + node; // cow member - auto val = node.get(); + auto val = node.template get(); using underlying_type = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v>); // hybrid member #ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - auto valHybrid = node.get(); + auto valHybrid = node.template get(); using underlying_type = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v>); @@ -80,39 +126,62 @@ TEST(ThriftHybridStructNodeTests, TestHybridNodeTypes) { #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ } -TEST(ThriftHybridStructNodeTests, ThriftStructFieldsHybridMemberGetSet) { - ThriftStructFields fields; +TYPED_TEST_P(ThriftHybridStructNodeTestSuite, TestHybridNodeTypes) { + testHybridNodeTypes(); + testHybridNodeTypes(); +} + +template +void thriftStructFieldsHybridMemberGetSet() { + ThriftStructFields< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + fields; auto data = std::make_shared>(); data->insert({1, false}); data->insert({2, true}); // cow member - fields.set(*data); - auto val = fields.get(); + fields.template set(*data); + auto val = fields.template get(); ASSERT_EQ(val->size(), 2); ASSERT_EQ(val->at(1), false); ASSERT_EQ(val->at(2), true); // hybrid member #ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - fields.set(*data); - auto valHybrid = fields.get(); + fields.template set(*data); + auto valHybrid = fields.template get(); ASSERT_EQ(valHybrid->cref().size(), 2); ASSERT_EQ(valHybrid->cref().at(1), false); ASSERT_EQ(valHybrid->cref().at(2), true); #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ } +TYPED_TEST_P( + ThriftHybridStructNodeTestSuite, + ThriftStructFieldsHybridMemberGetSet) { + thriftStructFieldsHybridMemberGetSet(); + thriftStructFieldsHybridMemberGetSet(); +} + #ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ -TEST(ThriftHybridStructNodeTests, ThriftStructFieldsHybridMemberToFromThrift) { - ThriftStructFields fields; + +template +void thriftStructFieldsHybridMemberToFromThrift() { + ThriftStructFields< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + fields; auto data = std::make_shared>(); data->insert({1, false}); data->insert({2, true}); // fromThrift - auto val = fields.get(); + auto val = fields.template get(); val->fromThrift(*data); // toThrift @@ -120,15 +189,27 @@ TEST(ThriftHybridStructNodeTests, ThriftStructFieldsHybridMemberToFromThrift) { ASSERT_EQ(thrift, *data); } -TEST(ThriftHybridStructNodeTests, ThriftStructNodeHybridMemberToFromThrift) { - ThriftStructNode node; +TYPED_TEST_P( + ThriftHybridStructNodeTestSuite, + ThriftStructFieldsHybridMemberToFromThrift) { + thriftStructFieldsHybridMemberToFromThrift(); + thriftStructFieldsHybridMemberToFromThrift(); +} + +template +void thriftStructNodeHybridMemberToFromThrift() { + ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + node; auto data = std::make_shared>(); data->insert({1, false}); data->insert({2, true}); // fromThrift - auto val = node.get(); + auto val = node.template get(); val->fromThrift(*data); // toThrift @@ -136,12 +217,26 @@ TEST(ThriftHybridStructNodeTests, ThriftStructNodeHybridMemberToFromThrift) { ASSERT_EQ(thrift, *data); } -TEST(ThriftHybridStructNodeTests, TestHybridNodeMemberTypes) { - ThriftStructNode node; +TYPED_TEST_P( + ThriftHybridStructNodeTestSuite, + ThriftStructNodeHybridMemberToFromThrift) { + thriftStructNodeHybridMemberToFromThrift(); + thriftStructNodeHybridMemberToFromThrift(); +} + +template +void testHybridNodeMemberTypes() { + ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + node; // list - ASSERT_EQ(node.isSkipThriftCowEnabled(), true); - auto v_list = node.get(); + ASSERT_EQ( + node.template isSkipThriftCowEnabled(), + EnableHybridStorage); + auto v_list = node.template get(); using underlying_type_l = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v>); @@ -149,16 +244,20 @@ TEST(ThriftHybridStructNodeTests, TestHybridNodeMemberTypes) { static_assert(std::is_same_v>); // set - ASSERT_EQ(node.isSkipThriftCowEnabled(), true); - auto v_set = node.get(); + ASSERT_EQ( + node.template isSkipThriftCowEnabled(), + EnableHybridStorage); + auto v_set = node.template get(); using underlying_type_s = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v>); using ref_type_s = folly::remove_cvref_tref())>; static_assert(std::is_same_v>); // union - ASSERT_EQ(node.isSkipThriftCowEnabled(), true); - auto v_union = node.get(); + ASSERT_EQ( + node.template isSkipThriftCowEnabled(), + EnableHybridStorage); + auto v_union = node.template get(); using underlying_type_u = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v); @@ -166,8 +265,10 @@ TEST(ThriftHybridStructNodeTests, TestHybridNodeMemberTypes) { static_assert(std::is_same_v); // child struct - ASSERT_EQ(node.isSkipThriftCowEnabled(), true); - auto v_struct = node.get(); + ASSERT_EQ( + node.template isSkipThriftCowEnabled(), + EnableHybridStorage); + auto v_struct = node.template get(); using underlying_type_c = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v); @@ -175,8 +276,30 @@ TEST(ThriftHybridStructNodeTests, TestHybridNodeMemberTypes) { static_assert(std::is_same_v); } +TYPED_TEST_P(ThriftHybridStructNodeTestSuite, TestHybridNodeMemberTypes) { + testHybridNodeMemberTypes(); + testHybridNodeMemberTypes(); +} + #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ +using EnableHybridStorageTypes = testing::Types; + +REGISTER_TYPED_TEST_SUITE_P( + ThriftHybridStructNodeTestSuite, + ReadThriftStructAnnotation, + ThriftStructNodeAnnotations, + TestHybridNodeTypes, + ThriftStructFieldsHybridMemberGetSet, + ThriftStructFieldsHybridMemberToFromThrift, + ThriftStructNodeHybridMemberToFromThrift, + TestHybridNodeMemberTypes); + +INSTANTIATE_TYPED_TEST_SUITE_P( + ThriftHybridStructNodeTests, + ThriftHybridStructNodeTestSuite, + EnableHybridStorageTypes); + #ifdef ENABLE_DYNAMIC_APIS TEST(ThriftHybridStructNodeTests, FollyDynamicTest) { // toFollyDynamic From 84f5a00d00d51393b84209358e3a57046ddb307e Mon Sep 17 00:00:00 2001 From: aalamsi22 Date: Thu, 17 Oct 2024 16:17:20 -0700 Subject: [PATCH 180/479] meru800biab: services support (#254) Summary: # Description This is part of a series of PRs to add support for meru800biab This PR adds support for various services. #### Changes summary - fan_service config (identical to meru800bia) - sensor_service config (identical to meru800bia) - fw_util config (identical to meru800bia) - weutil config (identical to meru800bia) # Test #### sensor_service ``` run_sensor_service.sh[5887]: I1004 19:25:10.118188 6111 SensorServiceImpl.cpp:113] Fetching using legacy sensor structs... run_sensor_service.sh[5887]: I1004 19:25:10.231551 6111 SensorServiceImpl.cpp:124] In Total, Processed 64 Sensors. 0 Failures. run_sensor_service.sh[5887]: I1004 19:25:15.118253 6111 SensorServiceImpl.cpp:113] Fetching using legacy sensor structs... run_sensor_service.sh[5887]: I1004 19:25:15.231505 6111 SensorServiceImpl.cpp:124] In Total, Processed 64 Sensors. 0 Failures. ``` #### fan_service ``` run_fan_service.sh[5947]: I1004 19:14:05.031261 5961 ControlLogic.cpp:443] fan_1: Programmed with PWM 47 (raw value 120) run_fan_service.sh[5947]: I1004 19:14:05.034254 5961 ControlLogic.cpp:443] fan_2: Programmed with PWM 47 (raw value 120) run_fan_service.sh[5947]: I1004 19:14:05.037244 5961 ControlLogic.cpp:443] fan_3: Programmed with PWM 47 (raw value 120) run_fan_service.sh[5947]: I1004 19:14:05.040243 5961 ControlLogic.cpp:443] fan_4: Programmed with PWM 47 (raw value 120) run_fan_service.sh[5947]: I1004 19:14:05.044249 5961 ControlLogic.cpp:463] fan_1: Setting LED to Good (value: 1) run_fan_service.sh[5947]: I1004 19:14:05.047146 5961 ControlLogic.cpp:463] fan_2: Setting LED to Good (value: 1) run_fan_service.sh[5947]: I1004 19:14:05.051142 5961 ControlLogic.cpp:463] fan_3: Setting LED to Good (value: 1) run_fan_service.sh[5947]: I1004 19:14:05.055146 5961 ControlLogic.cpp:463] fan_4: Setting LED to Good (value: 1) run_fan_service.sh[5947]: I1004 19:14:42.272579 5961 Bsp.cpp:303] Got sensor data from sensor_service. Item count: 64 run_fan_service.sh[5947]: I1004 19:14:42.272600 5961 ControlLogic.cpp:99] Successfully fetched sensor data. ``` Pull Request resolved: https://github.com/facebook/fboss/pull/254 Reviewed By: kimdo8736 Differential Revision: D64088053 Pulled By: joancaneus fbshipit-source-id: 6633d6096c4a28d3544e39fecba6e90bd9c4db4f --- .../configs/meru800biab/fan_service.json | 124 ++++ .../platform/configs/meru800biab/fw_util.json | 34 + .../configs/meru800biab/sensor_service.json | 615 ++++++++++++++++++ .../platform/configs/meru800biab/weutil.json | 13 + 4 files changed, 786 insertions(+) create mode 100644 fboss/platform/configs/meru800biab/fan_service.json create mode 100644 fboss/platform/configs/meru800biab/fw_util.json create mode 100644 fboss/platform/configs/meru800biab/sensor_service.json create mode 100644 fboss/platform/configs/meru800biab/weutil.json diff --git a/fboss/platform/configs/meru800biab/fan_service.json b/fboss/platform/configs/meru800biab/fan_service.json new file mode 100644 index 0000000000000..aea2824093afc --- /dev/null +++ b/fboss/platform/configs/meru800biab/fan_service.json @@ -0,0 +1,124 @@ +{ + "pwmBoostOnNumDeadFan": 1, + "pwmBoostOnNumDeadSensor": 0, + "pwmBoostOnNoQsfpAfterInSec": 0, + "pwmBoostValue": 60, + "pwmTransitionValue": 50, + "pwmLowerThreshold": 30, + "pwmUpperThreshold": 100, + "optics" : [ + { + "opticName" : "osfp_group_1", + "access" : { + "accessType" : "ACCESS_TYPE_QSFP" + }, + "portList" : [], + "aggregationType" : "OPTIC_AGGREGATION_TYPE_MAX", + "tempToPwmMaps" : { + "OPTIC_TYPE_800_GENERIC" : { + "5": 43, + "69": 56, + "70": 73, + "71": 100 + } + } + } + ], + "sensors": [ + { + "sensorName": "SMB_BOARD_FRONT_TEMP", + "access": { + "accessType": "ACCESS_TYPE_THRIFT" + }, + "pwmCalcType": "SENSOR_PWM_CALC_TYPE_FOUR_LINEAR_TABLE", + "scale": 1, + "normalUpTable": { + "15": 30, + "110": 100 + }, + "normalDownTable": { + "15": 30, + "110": 100 + }, + "failUpTable": { + "15": 30, + "110": 100 + }, + "failDownTable": { + "15": 30, + "110": 100 + } + } + ], + "fans": [ + { + "fanName": "fan_1", + "rpmSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_input", + "pwmSysfsPath": "/run/devmap/sensors/FAN_CPLD/pwm1", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_present", + "ledSysfsPath": "/sys/class/leds/fan1::status/brightness", + "pwmMin": 1, + "pwmMax": 255, + "fanPresentVal": 1, + "fanMissingVal": 0, + "fanGoodLedVal": 1, + "fanFailLedVal": 2 + }, + { + "fanName": "fan_2", + "rpmSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_input", + "pwmSysfsPath": "/run/devmap/sensors/FAN_CPLD/pwm2", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_present", + "ledSysfsPath": "/sys/class/leds/fan2::status/brightness", + "pwmMin": 1, + "pwmMax": 255, + "fanPresentVal": 1, + "fanMissingVal": 0, + "fanGoodLedVal": 1, + "fanFailLedVal": 2 + }, + { + "fanName": "fan_3", + "rpmSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_input", + "pwmSysfsPath": "/run/devmap/sensors/FAN_CPLD/pwm3", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_present", + "ledSysfsPath": "/sys/class/leds/fan3::status/brightness", + "pwmMin": 1, + "pwmMax": 255, + "fanPresentVal": 1, + "fanMissingVal": 0, + "fanGoodLedVal": 1, + "fanFailLedVal": 2 + }, + { + "fanName": "fan_4", + "rpmSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_input", + "pwmSysfsPath": "/run/devmap/sensors/FAN_CPLD/pwm4", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_present", + "ledSysfsPath": "/sys/class/leds/fan4::status/brightness", + "pwmMin": 1, + "pwmMax": 255, + "fanPresentVal": 1, + "fanMissingVal": 0, + "fanGoodLedVal": 1, + "fanFailLedVal": 2 + } + ], + "zones": [ + { + "zoneType": "ZONE_TYPE_MAX", + "zoneName": "zone1", + "sensorNames": [ + "SMB_BOARD_FRONT_TEMP", + "osfp_group_1" + ], + "fanNames": [ + "fan_1", + "fan_2", + "fan_3", + "fan_4" + ], + "slope": 3 + } + ] +} diff --git a/fboss/platform/configs/meru800biab/fw_util.json b/fboss/platform/configs/meru800biab/fw_util.json new file mode 100644 index 0000000000000..09bce8a2de335 --- /dev/null +++ b/fboss/platform/configs/meru800biab/fw_util.json @@ -0,0 +1,34 @@ +{ + "fwConfigs": { + "bios": { + "preUpgradeCmd": "printf '3000000:3FFFFFF image' > /home/bios_spi_layout", + "getVersionCmd": "cat /sys/devices/virtual/dmi/id/bios_version", + "priority": 4, + "upgradeCmd": "bios_filename=$(head -n 1 /home/bios_filename.txt); flashrom -p internal -l /home/bios_spi_layout -i image --noverify-all -w $bios_filename", + "postUpgradeCmd": "bios_filename=$(head -n 1 /home/bios_filename.txt); flashrom -p internal -l /home/bios_spi_layout -i image --noverify-all -v $bios_filename;rm /home/bios_spi_layout", + "verifyFwCmd": "bios_filename=$(head -n 1 /home/bios_filename.txt); flashrom -p internal -l /home/bios_spi_layout -i image --noverify-all -v $bios_filename;rm /home/bios_spi_layout", + "readFwCmd": "bios_filename=$(head -n 1 /home/bios_filename.txt); flashrom -p internal -l /home/bios_spi_layout -i image --noverify-all -r $bios_filename;rm /home/bios_spi_layout" + }, + "scm_cpld": { + "preUpgradeCmd": "", + "getVersionCmd": "cpu_cpld_ver=$((`cat /run/devmap/fpgas/MERU_SCM_CPLD/fpga_ver`));cpu_cpld_subver=$((`cat /run/devmap/fpgas/MERU_SCM_CPLD/fpga_sub_ver`));echo $cpu_cpld_ver'.'$cpu_cpld_subver", + "priority": 3, + "upgradeCmd": "cpu_cpld_filename=$(head -n 1 /home/scm_cpld_filename.txt);jam -aprogram -fmeru_cpu_cpld -v $cpu_cpld_filename", + "postUpgradeCmd": "" + }, + "smb_fpga": { + "preUpgradeCmd": "printf '0:3FFFFF image' > /home/smb_fpga_layout;modprobe spidev;fpga_spidev=$(echo $(ls /run/devmap/fpgas/MERU800BIA_SMB_FPGA/*spi*/spi_master/spi* | grep spi*.*) | cut -c 4-);echo 'spidev' > /sys/bus/spi/devices/spi$fpga_spidev/driver_override;echo spi$fpga_spidev > /sys/bus/spi/drivers/spidev/bind;flashrom -p linux_spi:dev=/dev/spidev$fpga_spidev > /home/flashrom_output;(grep 'MT25QL256' /home/flashrom_output && echo 'MT25QL256' > /home/flash_chip_name) || (grep 'MX25L25635F' /home/flashrom_output && echo 'MX25L25635F/MX25L25645G' > /home/flash_chip_name) || echo 'NONE' > /home/flash_chip_name", + "getVersionCmd": "smb_fpga_ver=$((`cat /run/devmap/fpgas/MERU800BIA_SMB_FPGA/fpga_ver`));smb_fpga_subver=$((`cat /run/devmap/fpgas/MERU800BIA_SMB_FPGA/fpga_sub_ver`));echo $smb_fpga_ver'.'$smb_fpga_subver", + "priority": 2, + "upgradeCmd": "smb_fpga_binary_name=$(head -n 1 /home/smb_fpga_filename.txt);fpga_spidev=$(echo $(ls /run/devmap/fpgas/MERU800BIA_SMB_FPGA/*spi*/spi_master/spi* | grep spi*.*) | cut -c 4-);chip=$(head -n 1 /home/flash_chip_name);if [ $chip = 'NONE' ];then cmd_chip_option='' cmd_chip_name='';else cmd_chip_option='-c' cmd_chip_name=$chip;fi;flashrom -p linux_spi:dev=/dev/spidev$fpga_spidev $cmd_chip_option $cmd_chip_name -l /home/smb_fpga_layout -i image -w $smb_fpga_binary_name", + "postUpgradeCmd": "rm /home/smb_fpga_layout; rm /home/flash_chip_name" + }, + "fan_cpld": { + "preUpgradeCmd": "echo 1 > /run/devmap/fpgas/MERU_SCM_CPLD/switch_jtag_enable", + "getVersionCmd": "fan_cpld_ver=$((10#`cat /run/devmap/cplds/FAN_CPLD/hwmon/hwmon*/cpld_ver`));fan_cpld_subver=$((10#`cat /run/devmap/cplds/FAN_CPLD/hwmon/hwmon*/cpld_sub_ver`));echo $fan_cpld_ver'.'$fan_cpld_subver", + "priority": 1, + "upgradeCmd": "fan_cpld_filename=$(head -n 1 /home/fan_cpld_filename.txt);jam -aprogram -fmeru_fan_cpld -v $fan_cpld_filename", + "postUpgradeCmd": "" + } + } +} diff --git a/fboss/platform/configs/meru800biab/sensor_service.json b/fboss/platform/configs/meru800biab/sensor_service.json new file mode 100644 index 0000000000000..650fd657af768 --- /dev/null +++ b/fboss/platform/configs/meru800biab/sensor_service.json @@ -0,0 +1,615 @@ +{ + "pmUnitSensorsList": [ + { + "slotPath": "/", + "pmUnitName": "SCM", + "sensors": [ + { + "name": "CPU_PACKAGE_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE0_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE1_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE2_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE3_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE4_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE5_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE6_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE7_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "NVME_COMPOSITE_TEMP", + "sysfsPath": "/run/devmap/sensors/NVME_TEMP/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_ECB_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/32000.0" + }, + { + "name": "SCM_ECB_VOUT", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/in2_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/32000.0" + }, + { + "name": "SCM_ECB_IOUT", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + } + ] + }, + { + "slotPath": "/SMB_SLOT@0", + "pmUnitName": "SMB", + "sensors": [ + { + "name": "SMB_BOARD_FRONT_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_TMP75_FRONT/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 85.0, + "maxAlarmVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_BOARD_REAR_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_TMP75_REAR/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 85.0, + "maxAlarmVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_BOARD_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 90.0, + "maxAlarmVal": 85.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_FAB0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_FAB1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp4_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_NIF0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_NIF1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_HBM0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_HBM1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN_BOARD_TEMP", + "sysfsPath": "/run/devmap/sensors/FAN_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 85.0, + "maxAlarmVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM1_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_J3/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM1_VOUT_J3_0V85_CORE", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_J3/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.93, + "lowerCriticalVal": 0.62 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_J3/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VOUT_J3_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.08, + "lowerCriticalVal": 0.72 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VOUT_J3_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.9, + "lowerCriticalVal": 0.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VOUT_J3_1V2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_TEMP1", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_TEMP2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_TEMP3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM3_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OPTICS/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM3_VOUT_OPTICS_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OPTICS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM3_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OPTICS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_MGMT_INLET_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MGMT_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 75.0, + "maxAlarmVal": 70.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN3_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN4_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + } + ] + }, + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@0", + "pmUnitName": "PSU1", + "sensors": [ + { + "name": "PSU1_VIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU1_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU1_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU1_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_IIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU1_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU1_PIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU1_POUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] + }, + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@1", + "pmUnitName": "PSU2", + "sensors": [ + { + "name": "PSU2_VIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU2_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU2_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU2_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_IIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU2_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU2_PIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU2_POUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] + } + ] +} diff --git a/fboss/platform/configs/meru800biab/weutil.json b/fboss/platform/configs/meru800biab/weutil.json new file mode 100644 index 0000000000000..fa77f00222efe --- /dev/null +++ b/fboss/platform/configs/meru800biab/weutil.json @@ -0,0 +1,13 @@ +{ + "chassisEepromName": "SMB", + "fruEepromList": { + "SCM": { + "path": "/run/devmap/eeproms/MERU_SCM_EEPROM", + "offset": 15360 + }, + "SMB": { + "path": "/run/devmap/eeproms/MERU800BIA_SMB_EEPROM", + "offset": 15360 + } + } +} From f7fd1712254c7862f5eaf3ff4435f5e9918be9b5 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Thu, 17 Oct 2024 16:36:44 -0700 Subject: [PATCH 181/479] Updating submodules Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/640258b1e53027bc4af385629aac3e229aecc819 https://github.com/facebook/fb303/commit/132a667f3705e4accf9843ebb3a625cfd304f915 https://github.com/facebook/fbthrift/commit/97518207214e89d6db73da63837f4e1dc2b57acf https://github.com/facebook/folly/commit/ab576d641d9ae77662e6e54a5db7fbe6d215fa6d https://github.com/facebook/mvfst/commit/54c1905f0ca859becb213f76f8e32cc6607a842f https://github.com/facebook/proxygen/commit/7fe5c7cfedd42538778dbeced501900ea493dd7e https://github.com/facebook/wangle/commit/dd5f918c13d1f4c89519cc76edec50e39c0fdc2b https://github.com/facebookexperimental/edencommon/commit/1a728c784248730eda3eaa06bf1f6c57d05766eb https://github.com/facebookexperimental/rust-shed/commit/b9df206a5012cb271e12715d9cebe89660e13db9 https://github.com/facebookincubator/fizz/commit/dc3b522ec9eabcd37f690c7939125b32309b4242 Reviewed By: bigfootjon fbshipit-source-id: e75984068312614653a1115d7ed287c5468589dd --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 427f62ec575bc..86852d10a7060 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 0394cff4a265b515de139c3e01eefd63ae36a978 +Subproject commit 132a667f3705e4accf9843ebb3a625cfd304f915 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 7602dcce4af1d..0bae81d110fcf 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit b747cc17021da104c4f8ebf5ae99b307f0eae2d3 +Subproject commit 97518207214e89d6db73da63837f4e1dc2b57acf diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 0fe2df71f502a..1c314a7909c2f 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 6e300f3a7e540e2ac52ee1546dc125a3cb70d7c3 +Subproject commit ab576d641d9ae77662e6e54a5db7fbe6d215fa6d diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 163109af23171..6c13ab940e45b 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit c7b899a8756d097973e5fb7b6c0eaff1f5a51d91 +Subproject commit dd5f918c13d1f4c89519cc76edec50e39c0fdc2b diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 5a0523fe6e8b5..b6d36d9f621b8 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 82e58215d24d4c2c8e166b0171ae68ff18f25449 +Subproject commit dc3b522ec9eabcd37f690c7939125b32309b4242 From 66b0e3d5d1280f8683bfb2185b2a281dc93d65f7 Mon Sep 17 00:00:00 2001 From: Tianyu Du Date: Thu, 17 Oct 2024 17:13:21 -0700 Subject: [PATCH 182/479] Update Max label stack size Summary: For new leaba sdk https://www.internalfb.com/code/fbsource/[5d3d0159ac579fc9edeca7ea6ff1618f41562b71]/third-party/tp2/leaba-sdk/24.8.3001/sdk-24.8.3001/sai/src/sai_device_params.h?lines=227 Max label stack size is 9. Update FBOSS constant to match the ASIC vender. This fix the sai test "HwLabelEdgeRouteTest/0.ExceedMaxLabels" for new sdk. Reviewed By: srikrishnagopu Differential Revision: D64446624 Privacy Context Container: L1125642 fbshipit-source-id: 207e9b237346869f459f65c225a6a148c2aa3425 --- fboss/agent/hw/switch_asics/EbroAsic.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fboss/agent/hw/switch_asics/EbroAsic.h b/fboss/agent/hw/switch_asics/EbroAsic.h index 9a9ed0144fa2b..dad07c1cc7e56 100644 --- a/fboss/agent/hw/switch_asics/EbroAsic.h +++ b/fboss/agent/hw/switch_asics/EbroAsic.h @@ -2,7 +2,6 @@ #pragma once -#include "fboss/agent/FbossError.h" #include "fboss/agent/hw/sai/impl/util.h" #include "fboss/agent/hw/switch_asics/TajoAsic.h" @@ -57,7 +56,9 @@ class EbroAsic : public TajoAsic { cfg::StreamType streamType, cfg::PortType /*portType*/) const override; uint32_t getMaxLabelStackDepth() const override { - return 3; + // sdk > 1.42.8 MAX_LABEL_STACK_SIZE = 9 sai/src/sai_device_params.h + // Remove this once new SDK rolls out + return isP4WarmbootEnabled() ? 9 : 3; } uint64_t getMMUSizeBytes() const override { return 108 * 1024 * 1024; From e84cfca5279d901aa04f6e8695a421b2e9fae1ea Mon Sep 17 00:00:00 2001 From: Ron He Date: Thu, 17 Oct 2024 17:33:12 -0700 Subject: [PATCH 183/479] Variable minLink support on Port Channels Summary: This diff is originally created by msomasundaran In order to support variable minLink, we need to update selector machine to bring up the aggregate port, as long as number of standby ports is greater than minLink. Two updates are needed - 1. To count the targetMember, we need to count no only STANDBY ports, but also SELECTED ports. (e.g. going from 5 member ports to 6 member ports from an already UP aggregate port). 2. On port down, no need to bringdown all members in the LAG if UP members are still above or equal to minLink. Reviewed By: msomasundaran Differential Revision: D24910176 fbshipit-source-id: 03de3382df800dc54e7ff08e28843cc45caa03c1 --- fboss/agent/LacpMachines.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fboss/agent/LacpMachines.cpp b/fboss/agent/LacpMachines.cpp index 15560b2d2d942..6d61dcf702ef6 100644 --- a/fboss/agent/LacpMachines.cpp +++ b/fboss/agent/LacpMachines.cpp @@ -857,10 +857,10 @@ void Selector::select() { portToSelection().end(), [targetLagID](PortIDToSelection::value_type el) { Selection s = el.second; - return s.lagID == targetLagID && s.state == SelectionState::STANDBY; + return s.lagID == targetLagID; }); - if (targetLagMemberCount == minLinkCount_) { + if (targetLagMemberCount >= minLinkCount_) { auto portsToSignal = getPortsWithSelection( Selection(targetLagID, SelectionState::STANDBY)); controller_.selected( @@ -944,7 +944,11 @@ void Selector::unselected() { auto ports = getPortsWithSelection(Selection(myLagID, SelectionState::SELECTED)); - controller_.standby(folly::range(ports.begin(), ports.end())); + if (ports.size() < minLinkCount_) { + controller_.standby(folly::range(ports.begin(), ports.end())); + } else { + controller_.standby(); + } } void Selector::selected() { From 1db55458169f537744058a9827ecbf14b350a18a Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Thu, 17 Oct 2024 17:36:10 -0700 Subject: [PATCH 184/479] Remove asicPreInitSequence introduced in D63743097 Summary: The preInitSequence is not needed anymore as the fixes for these are in testing and will land soon. Also, the sequence is flaky, so getting rid of it sooner. Cfgr side changes: D64549630 Reviewed By: zechengh09 Differential Revision: D64548724 fbshipit-source-id: a1230b6183c6f7de25df246e78d0c38989d7e70f --- .../agent/hw/sai/switch/SaiSwitchManager.cpp | 1 - fboss/agent/hw/sai/switch/SaiSwitchManager.h | 1 - .../sai/switch/npu/bcm/SaiSwitchManager.cpp | 27 +------------------ .../sai/switch/npu/tajo/SaiSwitchManager.cpp | 2 -- .../hw/sai/switch/oss/SaiSwitchManager.cpp | 2 -- 5 files changed, 1 insertion(+), 32 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp index bef495b485184..30721221137a7 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp @@ -185,7 +185,6 @@ SaiSwitchManager::SaiSwitchManager( std::optional switchId) : managerTable_(managerTable), platform_(platform) { int64_t swId = switchId.value_or(0); - switchPreInitSequence(platform->getAsic()->getAsicType()); if (bootType == BootType::WARM_BOOT) { // Extract switch adapter key and create switch only with the mandatory // init attribute (warm boot path) diff --git a/fboss/agent/hw/sai/switch/SaiSwitchManager.h b/fboss/agent/hw/sai/switch/SaiSwitchManager.h index 8cdab7f9cc388..c77dfe668422b 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitchManager.h +++ b/fboss/agent/hw/sai/switch/SaiSwitchManager.h @@ -163,5 +163,4 @@ void fillHwSwitchCreditStats( const folly::F14FastMap& counterId2Value, HwSwitchCreditStats& hwSwitchCreditStats); void publishSwitchWatermarks(HwSwitchWatermarkStats& watermarkStats); -void switchPreInitSequence(cfg::AsicType asicType); } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitchManager.cpp index c9fd12581d29c..f47afca769236 100644 --- a/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitchManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitchManager.cpp @@ -1,10 +1,8 @@ // Copyright 2004-present Facebook. All Rights Reserved. #include "fboss/agent/hw/sai/switch/SaiSwitchManager.h" -#include "fboss/agent/hw/HwSwitchFb303Stats.h" -#include -#include +#include "fboss/agent/hw/HwSwitchFb303Stats.h" extern "C" { #ifndef IS_OSS_BRCM_SAI @@ -84,27 +82,4 @@ void fillHwSwitchCreditStats( } } } - -void switchPreInitSequence(cfg::AsicType asicType) { - if (asicType != cfg::AsicType::ASIC_TYPE_JERICHO3) { - return; - } -#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) - // Generate SOC file with register/table settings to enable PFC based on OBM - // usage at per port level and to enable FC between EGQ / FDR-FDA blocks, - // which will help avoid drops at ingress and egress respectively with higher - // GPU NCCL collective runs. - // TODO: Remove these once the patch for CS00012371269 and CS00012370885 are - // available. - const std::string kSaiPostInitCmdFileContent{ - "w CGM_VSQE_RJCT_PRMS 0 128 -1 -1 -1 -1\n" - "mod CGM_PB_VSQ_RJCT_MASK 0 16 VSQ_RJCT_MASK=0x0\n" - "mod CGM_VSQF_FC_PRMS 0 16 WORDS_MIN_TH=60000 WORDS_MAX_TH=60000 WORDS_OFFSET=20000 SRAM_BUFFERS_MAX_TH=2048 SRAM_BUFFERS_MIN_TH=256 SRAM_BUFFERS_OFFSET=128\n" - "m ECGM_CONGESTION_MANAGEMENT_GLOBAL_THRESHOLDS TOTAL_DB_STOP_TH=29000\n"}; - const std::string kSaiPostInitCmdFilePath{"/tmp/sai_postinit_cmd_file.soc"}; - std::filesystem::create_directories( - std::filesystem::path(kSaiPostInitCmdFilePath).parent_path().u8string()); - folly::writeFile(kSaiPostInitCmdFileContent, kSaiPostInitCmdFilePath.c_str()); -#endif -} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/npu/tajo/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/npu/tajo/SaiSwitchManager.cpp index 6f0f6bd7e0603..e53e5f991515c 100644 --- a/fboss/agent/hw/sai/switch/npu/tajo/SaiSwitchManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/tajo/SaiSwitchManager.cpp @@ -24,6 +24,4 @@ void fillHwSwitchCreditStats( CHECK_EQ(counterId2Value.size(), 0); } -void switchPreInitSequence(cfg::AsicType /*asicType*/) {} - } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp index 79c1859217c6f..6f00e19ef9355 100644 --- a/fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp +++ b/fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp @@ -26,6 +26,4 @@ void fillHwSwitchCreditStats( void publishSwitchWatermarks(HwSwitchWatermarkStats& /*watermarkStats*/) {} -void switchPreInitSequence(cfg::AsicType /*asicType*/) {} - } // namespace facebook::fboss From 826b2f62eeaa765ff3962b8f837fa12a560e95c3 Mon Sep 17 00:00:00 2001 From: genkzgnluxbjeyb Date: Thu, 17 Oct 2024 19:49:41 -0700 Subject: [PATCH 185/479] fboss_asic_production_features_sync Differential Revision: D64578054 fbshipit-source-id: 89ca65d62589631254243c972e109f7429026674 --- .../asic_production_features.materialized_JSON | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fboss/oss/production_features/asic_production_features.materialized_JSON b/fboss/oss/production_features/asic_production_features.materialized_JSON index 3c035e9cb782e..892ad4c64dc8b 100644 --- a/fboss/oss/production_features/asic_production_features.materialized_JSON +++ b/fboss/oss/production_features/asic_production_features.materialized_JSON @@ -83,7 +83,8 @@ 39, 41, 40, - 42 + 42, + 45 ], "ramon": [ 1 @@ -339,7 +340,8 @@ "HGRID_UU_ROUTE_SCALE", "TH_ALPM_ROUTE_SCALE", "HUNDRED_THOUSAND_ROUTE_SCALE", - "PFC" + "PFC", + "PORT_MTU_ERROR_TRAP" ], "ramon": [ "FABRIC" From 3c787c0e759ed069f64d80de45a1cbcdd7af346f Mon Sep 17 00:00:00 2001 From: Max Ng Date: Thu, 17 Oct 2024 20:09:55 -0700 Subject: [PATCH 186/479] Add SAI TAM EventAgingGroup API Summary: Add SAI TAM event aging group API. No fakes support since this is a vendor extension. SAI replayer support is not available yet, since the framework currently doesn't support object type extensions. I'll explore add it back in a later diff, for now I'll exclude it from replayer audit. Reviewed By: nivinl Differential Revision: D64137580 fbshipit-source-id: 2200b7fc43d7d9c8697a35a580ab08c23bf73cfc --- cmake/AgentHwSaiApi.cmake | 1 + fboss/agent/hw/sai/api/BUCK | 1 + fboss/agent/hw/sai/api/LoggingUtil.cpp | 33 +++++++ fboss/agent/hw/sai/api/SaiApiTable.cpp | 6 ++ fboss/agent/hw/sai/api/SaiApiTable.h | 8 ++ .../agent/hw/sai/api/TamEventAgingGroupApi.h | 98 +++++++++++++++++++ fboss/agent/hw/sai/api/Types.h | 1 + .../util/run_sai_replayer_attribute_audit.py | 6 +- 8 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 fboss/agent/hw/sai/api/TamEventAgingGroupApi.h diff --git a/cmake/AgentHwSaiApi.cmake b/cmake/AgentHwSaiApi.cmake index 1238c54f3dd69..04023df9a3f79 100644 --- a/cmake/AgentHwSaiApi.cmake +++ b/cmake/AgentHwSaiApi.cmake @@ -73,6 +73,7 @@ set(SAI_API_SRC fboss/agent/hw/sai/api/SystemPortApi.h fboss/agent/hw/sai/api/SystemPortApi.cpp fboss/agent/hw/sai/api/TamApi.h + fboss/agent/hw/sai/api/TamEventAgingGroupApi.h fboss/agent/hw/sai/api/Traits.h fboss/agent/hw/sai/api/TunnelApi.h fboss/agent/hw/sai/api/Types.h diff --git a/fboss/agent/hw/sai/api/BUCK b/fboss/agent/hw/sai/api/BUCK index e8d701942767c..d89bad082f259 100644 --- a/fboss/agent/hw/sai/api/BUCK +++ b/fboss/agent/hw/sai/api/BUCK @@ -94,6 +94,7 @@ cpp_library( "SwitchApi.h", "SystemPortApi.h", "TamApi.h", + "TamEventAgingGroupApi.h", "Traits.h", "TunnelApi.h", "Types.h", diff --git a/fboss/agent/hw/sai/api/LoggingUtil.cpp b/fboss/agent/hw/sai/api/LoggingUtil.cpp index 289553b79c751..af143db40ce0b 100644 --- a/fboss/agent/hw/sai/api/LoggingUtil.cpp +++ b/fboss/agent/hw/sai/api/LoggingUtil.cpp @@ -16,9 +16,31 @@ #include +extern "C" { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#include +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +#endif +} + namespace facebook::fboss { folly::StringPiece saiApiTypeToString(sai_api_t apiType) { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + if (UNLIKELY(apiType >= SAI_API_MAX)) { + switch (static_cast(apiType)) { + case SAI_API_TAM_EVENT_AGING_GROUP: + return "tam-event-aging-group"; + default: + break; + } + } +#endif + switch (apiType) { case SAI_API_UNSPECIFIED: return "unspecified"; @@ -127,6 +149,17 @@ folly::StringPiece saiApiTypeToString(sai_api_t apiType) { } folly::StringPiece saiObjectTypeToString(sai_object_type_t objectType) { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + if (UNLIKELY(objectType >= SAI_OBJECT_TYPE_MAX)) { + switch (static_cast(objectType)) { + case SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP: + return "event-aging-group"; + default: + throw FbossError("object type extension invalid: ", objectType); + } + } +#endif + switch (objectType) { case SAI_OBJECT_TYPE_NULL: return "null"; diff --git a/fboss/agent/hw/sai/api/SaiApiTable.cpp b/fboss/agent/hw/sai/api/SaiApiTable.cpp index 4089357bbee24..a6405bd3ee36c 100644 --- a/fboss/agent/hw/sai/api/SaiApiTable.cpp +++ b/fboss/agent/hw/sai/api/SaiApiTable.cpp @@ -197,6 +197,12 @@ const TamApi& SaiApiTable::tamApi() const { return getApi(); } +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +const TamEventAgingGroupApi& SaiApiTable::tamEventAgingGroupApi() const { + return getApi(); +} +#endif + const TunnelApi& SaiApiTable::tunnelApi() const { return getApi(); } diff --git a/fboss/agent/hw/sai/api/SaiApiTable.h b/fboss/agent/hw/sai/api/SaiApiTable.h index 1f1c2ecd02bb7..fdd73f425027d 100644 --- a/fboss/agent/hw/sai/api/SaiApiTable.h +++ b/fboss/agent/hw/sai/api/SaiApiTable.h @@ -36,6 +36,7 @@ #include "fboss/agent/hw/sai/api/SwitchApi.h" #include "fboss/agent/hw/sai/api/SystemPortApi.h" #include "fboss/agent/hw/sai/api/TamApi.h" +#include "fboss/agent/hw/sai/api/TamEventAgingGroupApi.h" #include "fboss/agent/hw/sai/api/TunnelApi.h" #include "fboss/agent/hw/sai/api/UdfApi.h" #include "fboss/agent/hw/sai/api/VirtualRouterApi.h" @@ -127,6 +128,10 @@ class SaiApiTable { const TamApi& tamApi() const; +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + const TamEventAgingGroupApi& tamEventAgingGroupApi() const; +#endif + const TunnelApi& tunnelApi() const; const LagApi& lagApi() const; @@ -185,6 +190,9 @@ class SaiApiTable { std::unique_ptr, std::unique_ptr, std::unique_ptr, +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + std::unique_ptr, +#endif std::unique_ptr, std::unique_ptr, std::unique_ptr> diff --git a/fboss/agent/hw/sai/api/TamEventAgingGroupApi.h b/fboss/agent/hw/sai/api/TamEventAgingGroupApi.h new file mode 100644 index 0000000000000..ffe341ffad1e8 --- /dev/null +++ b/fboss/agent/hw/sai/api/TamEventAgingGroupApi.h @@ -0,0 +1,98 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#pragma once + +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + +#include "fboss/agent/hw/sai/api/SaiApi.h" +#include "fboss/agent/hw/sai/api/SaiAttribute.h" +#include "fboss/agent/hw/sai/api/SaiAttributeDataTypes.h" +#include "fboss/agent/hw/sai/api/SaiVersion.h" +#include "fboss/agent/hw/sai/api/Types.h" + +extern "C" { +#include +#include +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +} + +namespace facebook::fboss { + +class TamEventAgingGroupApi; + +struct SaiTamEventAgingGroupTraits { + // IMPORTANT: Cast to sai_object_type_t so that all our infrastructure works. + static constexpr sai_object_type_t ObjectType = + static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP); + + using SaiApiT = TamEventAgingGroupApi; + struct Attributes { + using EnumType = sai_tam_event_aging_group_attr_t; + using Type = SaiAttribute< + EnumType, + SAI_TAM_EVENT_AGING_GROUP_ATTR_TYPE, + sai_int32_t>; + using AgingTime = SaiAttribute< + EnumType, + SAI_TAM_EVENT_AGING_GROUP_ATTR_AGING_TIME, + sai_uint16_t>; // in microseconds + }; + using AdapterKey = TamEventAgingGroupSaiId; + using AdapterHostKey = std::tuple; + using CreateAttributes = AdapterHostKey; +}; +// Workaround for CS00012373477: sai_get_object_count() INVALID_PARAMETER +template <> +struct GetObjectKeySupported : std::false_type {}; + +SAI_ATTRIBUTE_NAME(TamEventAgingGroup, Type) +SAI_ATTRIBUTE_NAME(TamEventAgingGroup, AgingTime) + +class TamEventAgingGroupApi : public SaiApi { + public: + static constexpr sai_api_t ApiType = + static_cast(SAI_API_TAM_EVENT_AGING_GROUP); + TamEventAgingGroupApi() { + sai_status_t status = + sai_api_query(ApiType, reinterpret_cast(&api_)); + saiApiCheckError( + status, ApiType, "Failed to query for TAM event aging group api"); + } + + private: + // TAM Event Aging Group + sai_status_t _create( + TamEventAgingGroupSaiId* id, + sai_object_id_t switch_id, + size_t count, + sai_attribute_t* attr_list) const { + return api_->create_tam_event_aging_group( + rawSaiId(id), switch_id, count, attr_list); + } + + sai_status_t _remove(TamEventAgingGroupSaiId id) const { + return api_->remove_tam_event_aging_group(id); + } + + sai_status_t _getAttribute(TamEventAgingGroupSaiId id, sai_attribute_t* attr) + const { + return api_->get_tam_event_aging_group_attribute(id, 1, attr); + } + + sai_status_t _setAttribute( + TamEventAgingGroupSaiId id, + const sai_attribute_t* attr) const { + return api_->set_tam_event_aging_group_attribute(id, attr); + } + + sai_tam_event_aging_group_api_t* api_; + friend class SaiApi; +}; + +} // namespace facebook::fboss + +#endif diff --git a/fboss/agent/hw/sai/api/Types.h b/fboss/agent/hw/sai/api/Types.h index aa79134811bce..e8cc9456dde73 100644 --- a/fboss/agent/hw/sai/api/Types.h +++ b/fboss/agent/hw/sai/api/Types.h @@ -62,6 +62,7 @@ FBOSS_STRONG_TYPE(sai_object_id_t, TamCollectorSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamTransportSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamReportSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamEventActionSaiId); +FBOSS_STRONG_TYPE(sai_object_id_t, TamEventAgingGroupSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamEventSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TunnelSaiId); diff --git a/fboss/util/run_sai_replayer_attribute_audit.py b/fboss/util/run_sai_replayer_attribute_audit.py index 12501e99864d1..7e7da9b1583f5 100644 --- a/fboss/util/run_sai_replayer_attribute_audit.py +++ b/fboss/util/run_sai_replayer_attribute_audit.py @@ -17,7 +17,11 @@ # There are certain calls replayer don't wrap (e.g. RxPacket as it's callback from SDK). # Exclude these patterns when we audit the attributes. -PATTERN_TO_EXCLUDE = ["RxPacket"] +PATTERN_TO_EXCLUDE = [ + "RxPacket", + # Will be supported in a later diff. + "TamEventAgingGroup", +] def get_used_attributes(): From 4a0568547fb830741095517da8a1b02a0216f84e Mon Sep 17 00:00:00 2001 From: Max Ng Date: Thu, 17 Oct 2024 20:09:55 -0700 Subject: [PATCH 187/479] Add SAI TAM EventAgingGroup Tracer support Summary: Add SAI TAM EventAgingGroup Tracer support Reviewed By: nivinl Differential Revision: D64435296 fbshipit-source-id: 2e380f3450286e35800d367493b4c65da6515e41 --- cmake/AgentHwSaiTracer.cmake | 1 + fboss/agent/hw/sai/tracer/SaiTracer.cpp | 36 ++++++++++ fboss/agent/hw/sai/tracer/SaiTracer.h | 20 ++++++ .../tracer/TamEventAgingGroupApiTracer.cpp | 72 +++++++++++++++++++ .../sai/tracer/TamEventAgingGroupApiTracer.h | 27 +++++++ .../util/run_sai_replayer_attribute_audit.py | 6 +- 6 files changed, 157 insertions(+), 5 deletions(-) create mode 100644 fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp create mode 100644 fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h diff --git a/cmake/AgentHwSaiTracer.cmake b/cmake/AgentHwSaiTracer.cmake index 6d7453038fb16..510d3d63c6785 100644 --- a/cmake/AgentHwSaiTracer.cmake +++ b/cmake/AgentHwSaiTracer.cmake @@ -32,6 +32,7 @@ add_library(sai_tracer fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp fboss/agent/hw/sai/tracer/SystemPortApiTracer.cpp fboss/agent/hw/sai/tracer/TamApiTracer.cpp + fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp fboss/agent/hw/sai/tracer/TunnelApiTracer.cpp fboss/agent/hw/sai/tracer/UdfApiTracer.cpp fboss/agent/hw/sai/tracer/Utils.cpp diff --git a/fboss/agent/hw/sai/tracer/SaiTracer.cpp b/fboss/agent/hw/sai/tracer/SaiTracer.cpp index 62b0883d74aa0..05a1d3de07e07 100644 --- a/fboss/agent/hw/sai/tracer/SaiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/SaiTracer.cpp @@ -43,6 +43,7 @@ #include "fboss/agent/hw/sai/tracer/SwitchApiTracer.h" #include "fboss/agent/hw/sai/tracer/SystemPortApiTracer.h" #include "fboss/agent/hw/sai/tracer/TamApiTracer.h" +#include "fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h" // NOLINT(facebook-unused-include-check) #include "fboss/agent/hw/sai/tracer/TunnelApiTracer.h" #include "fboss/agent/hw/sai/tracer/UdfApiTracer.h" #include "fboss/agent/hw/sai/tracer/VirtualRouterApiTracer.h" @@ -195,6 +196,23 @@ sai_status_t __wrap_sai_api_query( return rv; } +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + if (UNLIKELY(sai_api_id >= SAI_API_MAX)) { + switch (static_cast(sai_api_id)) { + case SAI_API_TAM_EVENT_AGING_GROUP: + SaiTracer::getInstance()->tamEventAgingGroupApi_ = + static_cast(*api_method_table); + *api_method_table = facebook::fboss::wrappedTamEventAgingGroupApi(); + SaiTracer::getInstance()->logApiQuery( + sai_api_id, "tam_event_aging_group_api"); + break; + default: + break; + } + return rv; + } +#endif + switch (sai_api_id) { case SAI_API_ACL: SaiTracer::getInstance()->aclApi_ = @@ -395,6 +413,7 @@ sai_status_t __wrap_sai_api_query( // funtion here break; } + return rv; } @@ -1326,6 +1345,19 @@ vector SaiTracer::setAttrList( to(sai_attribute, "[", i, "].id=", attr_list[i].id)); } +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + if (UNLIKELY(object_type >= SAI_OBJECT_TYPE_MAX)) { + switch (static_cast(object_type)) { + case SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP: + setTamEventAgingGroupAttributes(attr_list, attr_count, attrLines, rv); + break; + default: + break; + } + return attrLines; + } +#endif + // Call functions defined in *ApiTracer.h to serialize attributes // that are specific to each Sai object type switch (object_type) { @@ -1846,6 +1878,10 @@ void SaiTracer::initVarCounts() { varCounts_.emplace(SAI_OBJECT_TYPE_TAM_TRANSPORT, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM_REPORT, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM_EVENT_ACTION, 0); +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + varCounts_.emplace( + static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), 0); +#endif varCounts_.emplace(SAI_OBJECT_TYPE_TAM_EVENT, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TUNNEL, 0); diff --git a/fboss/agent/hw/sai/tracer/SaiTracer.h b/fboss/agent/hw/sai/tracer/SaiTracer.h index e729abdcb5aeb..292e377741e62 100644 --- a/fboss/agent/hw/sai/tracer/SaiTracer.h +++ b/fboss/agent/hw/sai/tracer/SaiTracer.h @@ -27,6 +27,15 @@ extern "C" { #include + +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#include +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +#endif } DECLARE_bool(enable_replayer); @@ -237,6 +246,9 @@ class SaiTracer { sai_switch_api_t* switchApi_; sai_system_port_api_t* systemPortApi_; sai_tam_api_t* tamApi_; +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + sai_tam_event_aging_group_api_t* tamEventAgingGroupApi_; +#endif sai_tunnel_api_t* tunnelApi_; sai_udf_api_t* udfApi_; sai_virtual_router_api_t* virtualRouterApi_; @@ -412,6 +424,10 @@ class SaiTracer { {SAI_OBJECT_TYPE_TAM_TRANSPORT, "tamTransport_"}, {SAI_OBJECT_TYPE_TAM_REPORT, "tamReport_"}, {SAI_OBJECT_TYPE_TAM_EVENT_ACTION, "tamEventAction_"}, +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + {static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), + "tamEventAgingGroup_"}, +#endif {SAI_OBJECT_TYPE_TAM_EVENT, "tamEvent_"}, {SAI_OBJECT_TYPE_TAM, "tam_"}, {SAI_OBJECT_TYPE_TUNNEL, "tunnel_"}, @@ -477,6 +493,10 @@ class SaiTracer { {SAI_OBJECT_TYPE_TAM_TRANSPORT, "tam_api->"}, {SAI_OBJECT_TYPE_TAM_REPORT, "tam_api->"}, {SAI_OBJECT_TYPE_TAM_EVENT_ACTION, "tam_api->"}, +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + {static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), + "tam_event_aging_group_api->"}, +#endif {SAI_OBJECT_TYPE_TAM_EVENT, "tam_api->"}, {SAI_OBJECT_TYPE_TAM, "tam_api->"}, {SAI_OBJECT_TYPE_TUNNEL, "tunnel_api->"}, diff --git a/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp b/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp new file mode 100644 index 0000000000000..d6228cde623b9 --- /dev/null +++ b/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + +#include "fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h" +#include +#include + +#include "fboss/agent/hw/sai/api/TamEventAgingGroupApi.h" +#include "fboss/agent/hw/sai/tracer/Utils.h" + +using folly::to; + +namespace { + +std::map> _TamEventAgingGroupMap{ + SAI_ATTR_MAP(TamEventAgingGroup, Type), + SAI_ATTR_MAP(TamEventAgingGroup, AgingTime), +}; + +void handleExtensionAttributes() {} + +} // namespace + +namespace facebook::fboss { + +WRAP_CREATE_FUNC( + tam_event_aging_group, + static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), + tamEventAgingGroup); +WRAP_REMOVE_FUNC( + tam_event_aging_group, + static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), + tamEventAgingGroup); +WRAP_SET_ATTR_FUNC( + tam_event_aging_group, + static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), + tamEventAgingGroup); +WRAP_GET_ATTR_FUNC( + tam_event_aging_group, + static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), + tamEventAgingGroup); + +sai_tam_event_aging_group_api_t* wrappedTamEventAgingGroupApi() { + handleExtensionAttributes(); + static sai_tam_event_aging_group_api_t tamEventAgingGroupWrappers; + + tamEventAgingGroupWrappers.create_tam_event_aging_group = + &wrap_create_tam_event_aging_group; + tamEventAgingGroupWrappers.remove_tam_event_aging_group = + &wrap_remove_tam_event_aging_group; + tamEventAgingGroupWrappers.set_tam_event_aging_group_attribute = + &wrap_set_tam_event_aging_group_attribute; + tamEventAgingGroupWrappers.get_tam_event_aging_group_attribute = + &wrap_get_tam_event_aging_group_attribute; + + return &tamEventAgingGroupWrappers; +} + +SET_SAI_ATTRIBUTES(TamEventAgingGroup) + +} // namespace facebook::fboss + +#endif diff --git a/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h b/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h new file mode 100644 index 0000000000000..1011b43d69605 --- /dev/null +++ b/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h @@ -0,0 +1,27 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#pragma once + +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + +#include "fboss/agent/hw/sai/tracer/SaiTracer.h" + +extern "C" { +#include +#include +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +} + +namespace facebook::fboss { + +sai_tam_event_aging_group_api_t* wrappedTamEventAgingGroupApi(); + +SET_ATTRIBUTE_FUNC_DECLARATION(TamEventAgingGroup); + +} // namespace facebook::fboss + +#endif diff --git a/fboss/util/run_sai_replayer_attribute_audit.py b/fboss/util/run_sai_replayer_attribute_audit.py index 7e7da9b1583f5..12501e99864d1 100644 --- a/fboss/util/run_sai_replayer_attribute_audit.py +++ b/fboss/util/run_sai_replayer_attribute_audit.py @@ -17,11 +17,7 @@ # There are certain calls replayer don't wrap (e.g. RxPacket as it's callback from SDK). # Exclude these patterns when we audit the attributes. -PATTERN_TO_EXCLUDE = [ - "RxPacket", - # Will be supported in a later diff. - "TamEventAgingGroup", -] +PATTERN_TO_EXCLUDE = ["RxPacket"] def get_used_attributes(): From 0696212090580fca92901626a8f667cea861fc63 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Thu, 17 Oct 2024 20:09:55 -0700 Subject: [PATCH 188/479] Add SAI TAM EventAgingGroup to SaiStore, SaiSwitch, SaiTamManager Summary: Add SAI TAM EventAgingGroup to SaiStore, SaiSwitch, SaiTamManager Since there's no fakes support (this is a vendor extension), there is no TamEventAgingGroupTest. Reviewed By: nivinl Differential Revision: D64435312 fbshipit-source-id: c732e9d68aa633c7141d37e5de926b1bd41cc20d --- fboss/agent/hw/sai/store/SaiStore.h | 3 +++ fboss/agent/hw/sai/switch/SaiSwitch.cpp | 13 +++++++++++++ fboss/agent/hw/sai/switch/SaiTamManager.h | 7 +++++++ 3 files changed, 23 insertions(+) diff --git a/fboss/agent/hw/sai/store/SaiStore.h b/fboss/agent/hw/sai/store/SaiStore.h index 31f529c809f9b..61fc951f121d5 100644 --- a/fboss/agent/hw/sai/store/SaiStore.h +++ b/fboss/agent/hw/sai/store/SaiStore.h @@ -627,6 +627,9 @@ class SaiStore { SaiObjectStore, SaiObjectStore, SaiObjectStore, +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + SaiObjectStore, +#endif SaiObjectStore, SaiObjectStore, SaiObjectStore, diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 372d1109bd6d5..0c3bc5928c78e 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -85,6 +85,15 @@ extern "C" { #include + +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#include +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +#endif } using std::chrono::duration_cast; @@ -3697,6 +3706,10 @@ std::string SaiSwitch::listObjects( objTypes.push_back(SAI_OBJECT_TYPE_TAM_TRANSPORT); objTypes.push_back(SAI_OBJECT_TYPE_TAM_REPORT); objTypes.push_back(SAI_OBJECT_TYPE_TAM_EVENT_ACTION); +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + objTypes.push_back(static_cast( + SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP)); +#endif objTypes.push_back(SAI_OBJECT_TYPE_TAM_EVENT); objTypes.push_back(SAI_OBJECT_TYPE_TAM); break; diff --git a/fboss/agent/hw/sai/switch/SaiTamManager.h b/fboss/agent/hw/sai/switch/SaiTamManager.h index a040962065eda..adae1ce1a21de 100644 --- a/fboss/agent/hw/sai/switch/SaiTamManager.h +++ b/fboss/agent/hw/sai/switch/SaiTamManager.h @@ -3,6 +3,7 @@ #pragma once #include "fboss/agent/hw/sai/api/TamApi.h" +#include "fboss/agent/hw/sai/api/TamEventAgingGroupApi.h" #include "fboss/agent/hw/sai/store/SaiObject.h" namespace facebook::fboss { @@ -15,6 +16,9 @@ using SaiTamCollector = SaiObject; using SaiTamTransport = SaiObject; using SaiTamReport = SaiObject; using SaiTamEventAction = SaiObject; +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +using SaiTamEventAgingGroup = SaiObject; +#endif using SaiTamEvent = SaiObject; using SaiTam = SaiObject; @@ -23,6 +27,9 @@ struct SaiTamHandle { std::shared_ptr transport; std::shared_ptr report; std::shared_ptr action; +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + std::shared_ptr agingGroup; +#endif std::shared_ptr event; std::shared_ptr tam; SaiManagerTable* managerTable; From c37138abef054afa8971e191b6cd6f78de7be391 Mon Sep 17 00:00:00 2001 From: aalamsi22 Date: Thu, 17 Oct 2024 20:29:44 -0700 Subject: [PATCH 189/479] meru800biab: fboss agent & led_manager support (#255) Summary: # Description This PR adds support to the new meru800biab platform. Changes include: - Identical mappings to meru800bia. - wedge_qsfp_util support - Data_corral/led_manager init support. Config added (identical to meru800bia) # Testing #### Ports link up ``` # fboss2 show port ID Name AdminState LinkState ActiveState Transceiver TcvrID Speed ProfileID HwLogicalPortId Drained Errors --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 20 eth1/11/1 Enabled Up -- Present 10 400G PROFILE_400G_4_PAM4_RS544X2N_OPTICAL 20 No -- 21 eth1/11/5 Enabled Up -- Present 10 400G PROFILE_400G_4_PAM4_RS544X2N_OPTICAL 21 No -- 14 eth1/15/1 Enabled Up -- Present 14 400G PROFILE_400G_4_PAM4_RS544X2N_OPTICAL 14 No -- 15 eth1/15/5 Enabled Up -- Present 14 400G PROFILE_400G_4_PAM4_RS544X2N_OPTICAL 15 No -- 26 eth1/20/1 Enabled Up -- Present 19 400G PROFILE_400G_4_PAM4_RS544X2N_OPTICAL 26 No -- 27 eth1/20/5 Enabled Up -- Present 19 400G PROFILE_400G_4_PAM4_RS544X2N_OPTICAL 27 No -- 36 eth1/28/1 Enabled Up -- Present 27 400G PROFILE_400G_4_PAM4_RS544X2N_OPTICAL 36 No -- 37 eth1/28/5 Enabled Up -- Present 27 400G PROFILE_400G_4_PAM4_RS544X2N_OPTICAL 37 No -- 6 evt1/1/506 Enabled Up -- 0 100G PROFILE_100G_1_PAM4_NOFEC_COPPER No -- 1 rcy1/1/441 Enabled Up -- 0 100G PROFILE_100G_1_PAM4_NOFEC_COPPER 1 No -- 2 rcy1/1/442 Enabled Up -- 0 100G PROFILE_100G_1_PAM4_NOFEC_COPPER 2 No -- 3 rcy1/1/443 Enabled Up -- 0 100G PROFILE_100G_1_PAM4_NOFEC_COPPER 3 No -- 4 rcy1/1/444 Enabled Up -- 0 100G PROFILE_100G_1_PAM4_NOFEC_COPPER 4 No -- 5 rcy1/1/445 Enabled Up -- 0 100G PROFILE_100G_1_PAM4_NOFEC_COPPER 5 No -- ``` #### data_corral ``` run_data_corral_service.sh[5886]: I1004 19:27:04.973449 5890 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/psu_led:red:status/brightness run_data_corral_service.sh[5886]: I1004 19:27:04.973453 5890 LedManager.cpp:55] Programmed PSU LED with presence true run_data_corral_service.sh[5886]: I1004 19:27:04.973458 5890 LedManager.cpp:45] Programming FAN LED with true run_data_corral_service.sh[5886]: I1004 19:27:04.973473 5890 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/fan_led:green:status/brightness run_data_corral_service.sh[5886]: I1004 19:27:04.973487 5890 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/fan_led:red:status/brightness run_data_corral_service.sh[5886]: I1004 19:27:04.973491 5890 LedManager.cpp:55] Programmed FAN LED with presence true run_data_corral_service.sh[5886]: I1004 19:27:04.973495 5890 LedManager.cpp:25] Programming system LED with true run_data_corral_service.sh[5886]: I1004 19:27:04.973510 5890 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/sys_led:green:status/brightness run_data_corral_service.sh[5886]: I1004 19:27:04.973525 5890 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/sys_led:red:status/brightness run_data_corral_service.sh[5886]: I1004 19:27:04.973530 5890 LedManager.cpp:34] Programmed system LED with true ``` Pull Request resolved: https://github.com/facebook/fboss/pull/255 Reviewed By: mikechoifb Differential Revision: D64087992 Pulled By: joancaneus fbshipit-source-id: 342e5dfe5a5d9c5a719aff1856670e51bf625f45 --- fboss/agent/FabricConnectivityManager.cpp | 3 +- fboss/agent/Utils.cpp | 1 + fboss/agent/hw/sai/diag/DiagShell.cpp | 3 ++ .../platforms/common/PlatformMappingUtils.cpp | 1 + fboss/agent/platforms/sai/SaiPlatform.cpp | 4 +- fboss/agent/platforms/sai/SaiPlatformInit.cpp | 4 +- .../AgentRouteOverflowTests.cpp | 1 + fboss/led_service/LedManagerInit.cpp | 4 +- fboss/lib/bsp/bspmapping/Main.cpp | 2 + fboss/lib/bsp/bspmapping/test/ParserTest.cpp | 4 ++ fboss/lib/if/fboss_common.thrift | 1 + fboss/lib/platforms/PlatformMode.h | 2 + fboss/lib/platforms/PlatformProductInfo.cpp | 10 ++++ .../configs/meru800biab/led_manager.json | 54 +++++++++++++++++++ .../platforms/wedge/WedgeManagerInit.cpp | 4 +- .../test/hw_test/HwXphyFirmwareTest.cpp | 1 + fboss/util/oss/wedge_qsfp_util.cpp | 13 +++-- 17 files changed, 104 insertions(+), 8 deletions(-) create mode 100644 fboss/platform/configs/meru800biab/led_manager.json diff --git a/fboss/agent/FabricConnectivityManager.cpp b/fboss/agent/FabricConnectivityManager.cpp index 84813dfa1d222..9ae3af35d2368 100644 --- a/fboss/agent/FabricConnectivityManager.cpp +++ b/fboss/agent/FabricConnectivityManager.cpp @@ -62,7 +62,8 @@ getPlatformMappingForDsfNode(const PlatformType platformType) { true /*multiNpuPlatformMapping*/}; return &meru800bfa; } - case PlatformType::PLATFORM_MERU800BIA: { + case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: { static Meru800biaPlatformMapping meru800bia; return &meru800bia; } diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 853df90012e7b..47fdc3e6b332f 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -890,6 +890,7 @@ uint32_t getRemotePortOffset(const PlatformType platformType) { case PlatformType::PLATFORM_MERU800BFA_P1: return 0; case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: case PlatformType::PLATFORM_JANGA800BIC: return 1024; diff --git a/fboss/agent/hw/sai/diag/DiagShell.cpp b/fboss/agent/hw/sai/diag/DiagShell.cpp index d272c6ac9f72b..efb715cd9b5f7 100644 --- a/fboss/agent/hw/sai/diag/DiagShell.cpp +++ b/fboss/agent/hw/sai/diag/DiagShell.cpp @@ -163,6 +163,7 @@ std::unique_ptr DiagShell::makeRepl() const { case PlatformType::PLATFORM_DARWIN: case PlatformType::PLATFORM_MERU400BIU: case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: case PlatformType::PLATFORM_MERU800BFA: case PlatformType::PLATFORM_MERU800BFA_P1: case PlatformType::PLATFORM_MERU400BIA: @@ -395,6 +396,7 @@ std::string DiagCmdServer::getDelimiterDiagCmd(const std::string& UUID) const { case PlatformType::PLATFORM_DARWIN: case PlatformType::PLATFORM_MERU400BIU: case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: case PlatformType::PLATFORM_MERU800BFA: case PlatformType::PLATFORM_MERU800BFA_P1: case PlatformType::PLATFORM_MERU400BIA: @@ -442,6 +444,7 @@ std::string& DiagCmdServer::cleanUpOutput( case PlatformType::PLATFORM_DARWIN: case PlatformType::PLATFORM_MERU400BIU: case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: case PlatformType::PLATFORM_MERU800BFA: case PlatformType::PLATFORM_MERU800BFA_P1: case PlatformType::PLATFORM_MERU400BIA: diff --git a/fboss/agent/platforms/common/PlatformMappingUtils.cpp b/fboss/agent/platforms/common/PlatformMappingUtils.cpp index d8067c4068548..ec5a8a7c80b0f 100644 --- a/fboss/agent/platforms/common/PlatformMappingUtils.cpp +++ b/fboss/agent/platforms/common/PlatformMappingUtils.cpp @@ -148,6 +148,7 @@ std::unique_ptr initPlatformMapping(PlatformType type) { ? std::make_unique() : std::make_unique(platformMappingStr); case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: return platformMappingStr.empty() ? std::make_unique() : std::make_unique(platformMappingStr); diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index a261573a27b7d..17852c377a28b 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -362,7 +362,9 @@ void SaiPlatform::initPorts() { } } else if (platformMode == PlatformType::PLATFORM_MERU400BIU) { saiPort = std::make_unique(portId, this); - } else if (platformMode == PlatformType::PLATFORM_MERU800BIA) { + } else if ( + platformMode == PlatformType::PLATFORM_MERU800BIA || + platformMode == PlatformType::PLATFORM_MERU800BIAB) { saiPort = std::make_unique(portId, this); } else if (platformMode == PlatformType::PLATFORM_MERU400BIA) { saiPort = std::make_unique(portId, this); diff --git a/fboss/agent/platforms/sai/SaiPlatformInit.cpp b/fboss/agent/platforms/sai/SaiPlatformInit.cpp index 0f3d59d5d7905..3a66c0dcecfd1 100644 --- a/fboss/agent/platforms/sai/SaiPlatformInit.cpp +++ b/fboss/agent/platforms/sai/SaiPlatformInit.cpp @@ -74,7 +74,9 @@ std::unique_ptr chooseSaiPlatform( } else if (productInfo->getType() == PlatformType::PLATFORM_MERU400BIU) { return std::make_unique( std::move(productInfo), localMac, platformMappingStr); - } else if (productInfo->getType() == PlatformType::PLATFORM_MERU800BIA) { + } else if ( + productInfo->getType() == PlatformType::PLATFORM_MERU800BIA || + productInfo->getType() == PlatformType::PLATFORM_MERU800BIAB) { return std::make_unique( std::move(productInfo), localMac, platformMappingStr); } else if (productInfo->getType() == PlatformType::PLATFORM_MERU800BFA) { diff --git a/fboss/agent/test/agent_hw_tests/AgentRouteOverflowTests.cpp b/fboss/agent/test/agent_hw_tests/AgentRouteOverflowTests.cpp index ce3317d6328aa..079dcddea340b 100644 --- a/fboss/agent/test/agent_hw_tests/AgentRouteOverflowTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentRouteOverflowTests.cpp @@ -87,6 +87,7 @@ TEST_F(AgentRouteOverflowTest, overflowRoutes) { break; case PlatformType::PLATFORM_MERU400BIU: case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: case PlatformType::PLATFORM_MERU800BFA: case PlatformType::PLATFORM_MERU800BFA_P1: // No overflow test for MERU400BIU yet diff --git a/fboss/led_service/LedManagerInit.cpp b/fboss/led_service/LedManagerInit.cpp index 1c4edc411a2da..aa0abde7b7baa 100644 --- a/fboss/led_service/LedManagerInit.cpp +++ b/fboss/led_service/LedManagerInit.cpp @@ -44,7 +44,9 @@ std::unique_ptr createLedManager() { mode == PlatformType::PLATFORM_MERU800BFA || mode == PlatformType::PLATFORM_MERU800BFA_P1) { return std::make_unique(); - } else if (mode == PlatformType::PLATFORM_MERU800BIA) { + } else if ( + mode == PlatformType::PLATFORM_MERU800BIA || + mode == PlatformType::PLATFORM_MERU800BIAB) { return std::make_unique(); } else if (mode == PlatformType::PLATFORM_MORGAN800CC) { return std::make_unique(); diff --git a/fboss/lib/bsp/bspmapping/Main.cpp b/fboss/lib/bsp/bspmapping/Main.cpp index 6d9f8a2d4726e..a8b8731097a2c 100644 --- a/fboss/lib/bsp/bspmapping/Main.cpp +++ b/fboss/lib/bsp/bspmapping/Main.cpp @@ -27,6 +27,8 @@ const std::map kHardwareNameMap = { kPortMappingMeru400biuCsv}, {facebook::fboss::PlatformType::PLATFORM_MERU800BIA, kPortMappingMeru800biaCsv}, + {facebook::fboss::PlatformType::PLATFORM_MERU800BIAB, + kPortMappingMeru800biaCsv}, {facebook::fboss::PlatformType::PLATFORM_MERU800BFA, kPortMappingMeru800bfaCsv}, {facebook::fboss::PlatformType::PLATFORM_JANGA800BIC, diff --git a/fboss/lib/bsp/bspmapping/test/ParserTest.cpp b/fboss/lib/bsp/bspmapping/test/ParserTest.cpp index d021a2bef077e..aa38694421dad 100644 --- a/fboss/lib/bsp/bspmapping/test/ParserTest.cpp +++ b/fboss/lib/bsp/bspmapping/test/ParserTest.cpp @@ -24,6 +24,10 @@ TEST(ParserTest, GetNameForTests) { facebook::fboss::Parser::getNameFor( facebook::fboss::PlatformType::PLATFORM_MERU800BIA), "meru800bia"); + EXPECT_EQ( + facebook::fboss::Parser::getNameFor( + facebook::fboss::PlatformType::PLATFORM_MERU800BIAB), + "meru800biab"); EXPECT_EQ( facebook::fboss::Parser::getNameFor( facebook::fboss::PlatformType::PLATFORM_MERU800BFA), diff --git a/fboss/lib/if/fboss_common.thrift b/fboss/lib/if/fboss_common.thrift index a42ab5dddad91..784553771ad39 100644 --- a/fboss/lib/if/fboss_common.thrift +++ b/fboss/lib/if/fboss_common.thrift @@ -40,4 +40,5 @@ enum PlatformType { PLATFORM_JANGA800BIC = 32, PLATFORM_TAHAN800BC = 33, PLATFORM_MERU800BFA_P1 = 34, + PLATFORM_MERU800BIAB = 35, } diff --git a/fboss/lib/platforms/PlatformMode.h b/fboss/lib/platforms/PlatformMode.h index a7a29dd821aab..20c784b352624 100644 --- a/fboss/lib/platforms/PlatformMode.h +++ b/fboss/lib/platforms/PlatformMode.h @@ -76,6 +76,8 @@ inline std::string toString(PlatformType mode) { return "MONTBLANC"; case PlatformType::PLATFORM_MERU800BIA: return "MERU800BIA"; + case PlatformType::PLATFORM_MERU800BIAB: + return "MERU800BIAB"; case PlatformType::PLATFORM_MERU800BFA: return "MERU800BFA"; case PlatformType::PLATFORM_MERU800BFA_P1: diff --git a/fboss/lib/platforms/PlatformProductInfo.cpp b/fboss/lib/platforms/PlatformProductInfo.cpp index 0f0de84c30137..9a89c9952b1ac 100644 --- a/fboss/lib/platforms/PlatformProductInfo.cpp +++ b/fboss/lib/platforms/PlatformProductInfo.cpp @@ -131,6 +131,14 @@ void PlatformProductInfo::initMode() { modelName.find("DCS-DL-7700R4C-38PE-AC-F") == 0 || modelName.find("DCS-DL-7700R4C-38PE-DC-F") == 0) { type_ = PlatformType::PLATFORM_MERU800BIA; + } else if ( + modelName.find("Meru800biab") == 0 || + modelName.find("MERU800BIAB") == 0 || + modelName.find("ASY-92459-109") == 0 || + modelName.find("ASY-08999-09") == 0 || + modelName.find("DCS-DL-7700R4C-38PE-B-AC-F") == 0 || + modelName.find("DCS-DL-7700R4C-38PE-B-DC-F") == 0) { + type_ = PlatformType::PLATFORM_MERU800BIAB; } else if ( modelName.find("Meru800bfa") == 0 || modelName.find("MERU800BFA") == 0 || @@ -182,6 +190,8 @@ void PlatformProductInfo::initMode() { type_ = PlatformType::PLATFORM_MERU400BIU; } else if (FLAGS_mode == "meru800bia") { type_ = PlatformType::PLATFORM_MERU800BIA; + } else if (FLAGS_mode == "meru800biab") { + type_ = PlatformType::PLATFORM_MERU800BIAB; } else if (FLAGS_mode == "meru800bfa") { type_ = PlatformType::PLATFORM_MERU800BFA; } else if (FLAGS_mode == "meru800bfa_p1") { diff --git a/fboss/platform/configs/meru800biab/led_manager.json b/fboss/platform/configs/meru800biab/led_manager.json new file mode 100644 index 0000000000000..168f6746fd5d5 --- /dev/null +++ b/fboss/platform/configs/meru800biab/led_manager.json @@ -0,0 +1,54 @@ +{ + "systemLedConfig": { + "presentLedColor": 1, + "presentLedSysfsPath": "/sys/class/leds/sys_led:green:status/brightness", + "absentLedColor": 2, + "absentLedSysfsPath": "/sys/class/leds/sys_led:red:status/brightness" + }, + "fruTypeLedConfigs": { + "FAN": { + "presentLedColor": 1, + "presentLedSysfsPath": "/sys/class/leds/fan_led:green:status/brightness", + "absentLedColor": 2, + "absentLedSysfsPath": "/sys/class/leds/fan_led:red:status/brightness" + }, + "PSU": { + "presentLedColor": 1, + "presentLedSysfsPath": "/sys/class/leds/psu_led:green:status/brightness", + "absentLedColor": 2, + "absentLedSysfsPath": "/sys/class/leds/psu_led:red:status/brightness" + } + }, + "fruConfigs": [ + { + "fruName": "FAN1", + "fruType": "FAN", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_present" + }, + { + "fruName": "FAN2", + "fruType": "FAN", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_present" + }, + { + "fruName": "FAN3", + "fruType": "FAN", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_present" + }, + { + "fruName": "FAN4", + "fruType": "FAN", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_present" + }, + { + "fruName": "PSU1", + "fruType": "PSU", + "presenceSysfsPath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu1_present" + }, + { + "fruName": "PSU2", + "fruType": "PSU", + "presenceSysfsPath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu2_present" + } + ] + } \ No newline at end of file diff --git a/fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp b/fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp index 5370db6286b8c..d16aaaac5fbbc 100644 --- a/fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp +++ b/fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp @@ -75,7 +75,9 @@ std::unique_ptr createWedgeManager() { return createMeru400biaWedgeManager(platformMappingStr); } else if (mode == PlatformType::PLATFORM_MERU400BIU) { return createMeru400biuWedgeManager(platformMappingStr); - } else if (mode == PlatformType::PLATFORM_MERU800BIA) { + } else if ( + mode == PlatformType::PLATFORM_MERU800BIA || + mode == PlatformType::PLATFORM_MERU800BIAB) { return createMeru800biaWedgeManager(platformMappingStr); } else if ( mode == PlatformType::PLATFORM_MERU800BFA || diff --git a/fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp b/fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp index 9440ef17db6b3..b3d6c262d7d95 100644 --- a/fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp +++ b/fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp @@ -49,6 +49,7 @@ TEST_F(HwXphyFirmwareTest, CheckDefaultXphyFirmwareVersion) { case PlatformType::PLATFORM_LASSEN_DEPRECATED: case PlatformType::PLATFORM_MERU400BIU: case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: case PlatformType::PLATFORM_MERU800BFA: case PlatformType::PLATFORM_MERU800BFA_P1: case PlatformType::PLATFORM_MERU400BIA: diff --git a/fboss/util/oss/wedge_qsfp_util.cpp b/fboss/util/oss/wedge_qsfp_util.cpp index 777d21d742eab..c1afa2c356e1a 100644 --- a/fboss/util/oss/wedge_qsfp_util.cpp +++ b/fboss/util/oss/wedge_qsfp_util.cpp @@ -58,7 +58,8 @@ std::pair, int> getTransceiverAPI() { .get(); auto ioBus = std::make_unique(systemContainer); return std::make_pair(std::move(ioBus), 0); - } else if (FLAGS_platform == "meru800bia") { + } else if ( + FLAGS_platform == "meru800bia" || FLAGS_platform == "meru800biab") { auto systemContainer = BspGenericSystemContainer::getInstance() .get(); @@ -117,7 +118,9 @@ std::pair, int> getTransceiverAPI() { .get(); auto ioBus = std::make_unique(systemContainer); return std::make_pair(std::move(ioBus), 0); - } else if (mode == PlatformType::PLATFORM_MERU800BIA) { + } else if ( + mode == PlatformType::PLATFORM_MERU800BIA || + mode == PlatformType::PLATFORM_MERU800BIAB) { auto systemContainer = BspGenericSystemContainer::getInstance() .get(); @@ -167,6 +170,8 @@ getTransceiverPlatformAPI(TransceiverI2CApi* i2cBus) { mode = PlatformType::PLATFORM_MERU400BIU; } else if (FLAGS_platform == "meru800bia") { mode = PlatformType::PLATFORM_MERU800BIA; + } else if (FLAGS_platform == "meru800biab") { + mode = PlatformType::PLATFORM_MERU800BIAB; } else if (FLAGS_platform == "meru800bfa") { mode = PlatformType::PLATFORM_MERU800BFA; } else if (FLAGS_platform == "meru800bfa_p1") { @@ -208,7 +213,9 @@ getTransceiverPlatformAPI(TransceiverI2CApi* i2cBus) { .get(); return std::make_pair( std::make_unique(systemContainer), 0); - } else if (mode == PlatformType::PLATFORM_MERU800BIA) { + } else if ( + mode == PlatformType::PLATFORM_MERU800BIA || + mode == PlatformType::PLATFORM_MERU800BIAB) { auto systemContainer = BspGenericSystemContainer::getInstance() .get(); From 5165770a6971d07751426cb36468a8e812569980 Mon Sep 17 00:00:00 2001 From: Jeffrey Leung Date: Thu, 17 Oct 2024 21:11:56 -0700 Subject: [PATCH 190/479] Tablefy show NDP Summary: Tablefy show ndp results to avoid hardcoding column sizes. The output would often spill to the next line due to unnecessary spacing. Reviewed By: shri-khare Differential Revision: D64265005 fbshipit-source-id: 02ed246b89d93b8e9f77a4f82ba4d44049cce263 --- .../cli/fboss2/commands/show/ndp/CmdShowNdp.h | 52 +++++++++---------- fboss/cli/fboss2/test/CmdShowNdpTest.cpp | 7 +-- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/fboss/cli/fboss2/commands/show/ndp/CmdShowNdp.h b/fboss/cli/fboss2/commands/show/ndp/CmdShowNdp.h index ce7790094cd79..6f86156240841 100644 --- a/fboss/cli/fboss2/commands/show/ndp/CmdShowNdp.h +++ b/fboss/cli/fboss2/commands/show/ndp/CmdShowNdp.h @@ -16,9 +16,12 @@ #include "fboss/cli/fboss2/CmdHandler.h" #include "fboss/cli/fboss2/commands/show/ndp/gen-cpp2/model_types.h" #include "fboss/cli/fboss2/utils/CmdClientUtils.h" +#include "fboss/cli/fboss2/utils/Table.h" namespace facebook::fboss { +using utils::Table; + struct CmdShowNdpTraits : public BaseCommandTraits { static constexpr utils::ObjectArgTypeId ObjectArgTypeId = utils::ObjectArgTypeId::OBJECT_ARG_TYPE_ID_IPV6_LIST; @@ -54,40 +57,35 @@ class CmdShowNdp : public CmdHandler { } void printOutput(const RetType& model, std::ostream& out = std::cout) { - constexpr auto fmtString = - "{:<45}{:<19}{:<12}{:<30}{:<14}{:<9}{:<12}{:<45}{:<21}\n"; - - out << fmt::format( - fmtString, - "IP Address", - "MAC Address", - "Interface", - "VLAN/InterfaceID", - "State", - "TTL", - "CLASSID", - "Voq Switch", - "Resolved Since"); + Table table; + table.setHeader( + {"IP Address", + "MAC Address", + "Interface", + "VLAN/InterfaceID", + "State", + "TTL", + "CLASSID", + "Voq Switch", + "Resolved Since"}); for (const auto& entry : model.get_ndpEntries()) { auto vlan = entry.get_vlanName(); if (entry.get_vlanID() != ctrl_constants::NO_VLAN()) { vlan += folly::to(" (", entry.get_vlanID(), ")"); } - - out << fmt::format( - fmtString, - entry.get_ip(), - entry.get_mac(), - entry.get_port(), - vlan, - entry.get_state(), - entry.get_ttl(), - entry.get_classID(), - entry.get_switchName(), - entry.get_resolvedSince()); + table.addRow( + {entry.get_ip(), + entry.get_mac(), + entry.get_port(), + vlan, + entry.get_state(), + std::to_string(entry.get_ttl()), + std::to_string(entry.get_classID()), + entry.get_switchName(), + entry.get_resolvedSince()}); } - out << std::endl; + out << table << std::endl; } RetType createModel( diff --git a/fboss/cli/fboss2/test/CmdShowNdpTest.cpp b/fboss/cli/fboss2/test/CmdShowNdpTest.cpp index 7efaa5c167c34..760c9895409cb 100644 --- a/fboss/cli/fboss2/test/CmdShowNdpTest.cpp +++ b/fboss/cli/fboss2/test/CmdShowNdpTest.cpp @@ -123,9 +123,10 @@ TEST_F(CmdShowNdpTestFixture, printOutput) { std::string output = ss.str(); std::string expectOutput = - "IP Address MAC Address Interface VLAN/InterfaceID State TTL CLASSID Voq Switch Resolved Since \n" - "fe80::526b:4bff:fe28:8fb0 50:6b:4b:28:8f:b0 eth1/1/1 downlinks (2000) REACHABLE 45013 0 -- 1969-12-31 16:00:00 \n" - "fe80::464c:a8ff:fee4:1c3f 44:4c:a8:e4:1c:3f eth2/1/1 uplink_1 (4001) REACHABLE 21045 0 -- -- \n\n"; + " IP Address MAC Address Interface VLAN/InterfaceID State TTL CLASSID Voq Switch Resolved Since \n" + "-------------------------------------------------------------------------------------------------------------------------------------------------\n" + " fe80::526b:4bff:fe28:8fb0 50:6b:4b:28:8f:b0 eth1/1/1 downlinks (2000) REACHABLE 45013 0 -- 1969-12-31 16:00:00 \n" + " fe80::464c:a8ff:fee4:1c3f 44:4c:a8:e4:1c:3f eth2/1/1 uplink_1 (4001) REACHABLE 21045 0 -- -- \n\n"; EXPECT_EQ(output, expectOutput); } From ce578bcda008f14c19ce369774714c468b361e51 Mon Sep 17 00:00:00 2001 From: Ron He Date: Thu, 17 Oct 2024 21:54:25 -0700 Subject: [PATCH 191/479] Update trunk util to create agg port with <100% minLink Summary: As titled. This towards testing aggregate ports with min link less than 100%. Update util to take in min link percentage Reviewed By: msomasundaran Differential Revision: D63807275 fbshipit-source-id: b5c506f859f477dc6dae694b42b9373d05efa601 --- fboss/agent/test/TrunkUtils.cpp | 8 +++++--- fboss/agent/test/TrunkUtils.h | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fboss/agent/test/TrunkUtils.cpp b/fboss/agent/test/TrunkUtils.cpp index 519468b6ce041..eaeb6f49c4be1 100644 --- a/fboss/agent/test/TrunkUtils.cpp +++ b/fboss/agent/test/TrunkUtils.cpp @@ -29,13 +29,15 @@ void addAggPort( int key, const std::vector& ports, cfg::SwitchConfig* config, - cfg::LacpPortRate rate) { + cfg::LacpPortRate rate, + double minLinkPercentage) { // Create agg port with requisite members static constexpr auto kAggPortName = "AGG"; cfg::AggregatePort aggPort; - *aggPort.key() = key; + aggPort.key() = key; aggPort.name() = folly::to(kAggPortName, "-", key); - *aggPort.description() = kAggPortName; + aggPort.description() = kAggPortName; + aggPort.minimumCapacity()->set_linkPercentage(minLinkPercentage); for (auto port : ports) { aggPort.memberPorts()->push_back(makePortMember(port, rate)); } diff --git a/fboss/agent/test/TrunkUtils.h b/fboss/agent/test/TrunkUtils.h index 1313719a22ab9..a868c597eac03 100644 --- a/fboss/agent/test/TrunkUtils.h +++ b/fboss/agent/test/TrunkUtils.h @@ -28,7 +28,8 @@ void addAggPort( int key, const std::vector& ports, cfg::SwitchConfig* config, - cfg::LacpPortRate rate = cfg::LacpPortRate::FAST); + cfg::LacpPortRate rate = cfg::LacpPortRate::FAST, + double minLinkPercentage = 1.0); std::shared_ptr enableTrunkPorts( std::shared_ptr curState); std::shared_ptr setTrunkMinLinkCount( From 3584f7b394258534f58ec72cabe6585df64c2701 Mon Sep 17 00:00:00 2001 From: Ron He Date: Thu, 17 Oct 2024 21:54:25 -0700 Subject: [PATCH 192/479] Refactor test utils for minLink <100% tests Summary: As titled. Refactor test utils to 1. Validate expected number of members to be UP in aggregate port. 2. Start passing in min link percentage. This is in preparation of adding new multi-node tests with <100% min link. Reviewed By: msomasundaran Differential Revision: D63808506 fbshipit-source-id: 2730b36fbfd9799b45da5e0736d94463135ee650 --- fboss/agent/test/MultiNodeLacpTests.cpp | 59 ++++++++++++++++--------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/fboss/agent/test/MultiNodeLacpTests.cpp b/fboss/agent/test/MultiNodeLacpTests.cpp index 33ef76694195b..782f98756a5d0 100644 --- a/fboss/agent/test/MultiNodeLacpTests.cpp +++ b/fboss/agent/test/MultiNodeLacpTests.cpp @@ -70,7 +70,8 @@ class MultiNodeLacpTest : public MultiNodeTest { } cfg::SwitchConfig getConfigWithAggPort( - cfg::LacpPortRate rate = cfg::LacpPortRate::SLOW) const { + cfg::LacpPortRate rate = cfg::LacpPortRate::SLOW, + double minLinkPercentage = 1.0) const { auto config = utility::multiplePortsPerIntfConfig( platform()->getPlatformMapping(), platform()->getAsic(), @@ -84,7 +85,12 @@ class MultiNodeLacpTest : public MultiNodeTest { auto idx = 0; auto portList = testPorts(); for (const auto& aggId : getAggPorts()) { - addAggPort(aggId, {portList[idx++], portList[idx++]}, &config, rate); + addAggPort( + aggId, + {portList[idx++], portList[idx++]}, + &config, + rate, + minLinkPercentage); } config.loadBalancers() = utility::getEcmpFullTrunkHalfHashConfig({platform()->getAsic()}); @@ -161,22 +167,25 @@ class MultiNodeLacpTest : public MultiNodeTest { aggPortUp, isDUT() ? kMaxRetries : kRemoteSwitchMaxRetries)); } - // Verify that LACP converged on all member ports - void verifyLacpState() const { - for (const auto& aggId : getAggPorts()) { - const auto& aggPort = - sw()->getState()->getAggregatePorts()->getNode(aggId); - EXPECT_NE(aggPort, nullptr); - EXPECT_EQ(aggPort->forwardingSubportCount(), aggPort->subportsCount()); - for (const auto& memberAndState : aggPort->subportAndFwdState()) { - // Verify that member port is enabled - EXPECT_EQ(memberAndState.second, AggregatePort::Forwarding::ENABLED); - // Verify that partner has synced - EXPECT_TRUE( - aggPort->getPartnerState(memberAndState.first).state & - LacpState::IN_SYNC); - } + // Verify that LACP converged on expected number of member ports + void verifyLacpState(AggregatePortID aggId, int expectedUpMemberPort) const { + const auto& aggPort = sw()->getState()->getAggregatePorts()->getNode(aggId); + EXPECT_NE(aggPort, nullptr); + CHECK_LE(expectedUpMemberPort, aggPort->subportsCount()); + EXPECT_EQ(aggPort->forwardingSubportCount(), expectedUpMemberPort); + int enabledCount = 0; + int syncedPartnerStateCount = 0; + for (const auto& memberAndState : aggPort->subportAndFwdState()) { + // Verify that member port is enabled + enabledCount += + memberAndState.second == AggregatePort::Forwarding::ENABLED; + // Verify that partner has synced + syncedPartnerStateCount += + (aggPort->getPartnerState(memberAndState.first).state & + LacpState::IN_SYNC) > 0; } + EXPECT_EQ(enabledCount, expectedUpMemberPort); + EXPECT_EQ(syncedPartnerStateCount, expectedUpMemberPort); } void verifyReachability( @@ -256,7 +265,9 @@ class MultiNodeLacpTest : public MultiNodeTest { } // verify lacp state information - verifyLacpState(); + for (const auto& aggId : getAggPorts()) { + verifyLacpState(aggId, getSubPorts(aggId).size()); + } verifyReachability(); } @@ -308,7 +319,9 @@ TEST_F(MultiNodeLacpTest, Bringup) { // ensure that lacp session can stay up post timeout XLOG(DBG2) << "Waiting for LACP timeout period"; std::this_thread::sleep_for(period); - verifyLacpState(); + for (const auto& aggId : getAggPorts()) { + verifyLacpState(aggId, getSubPorts(aggId).size()); + } }; verifyAcrossWarmBoots(verify); @@ -331,7 +344,7 @@ TEST_F(MultiNodeLacpTest, LinkDown) { setPortStatus(testPort, true); waitForAggPortStatus(aggPort, true); - verifyLacpState(); + verifyLacpState(aggPort, getSubPorts(aggPort).size()); // Remote port flap XLOG(DBG2) << "Disable an Agg member port on remote switch"; @@ -345,7 +358,7 @@ TEST_F(MultiNodeLacpTest, LinkDown) { XLOG(DBG2) << "Enable Agg member port on remote switch"; client->sync_setPortState(remotePortID, true); waitForAggPortStatus(aggPort, true); - verifyLacpState(); + verifyLacpState(aggPort, getSubPorts(aggPort).size()); }; verifyAcrossWarmBoots(verify); } @@ -366,7 +379,9 @@ TEST_F(MultiNodeLacpTest, LacpSlowFastInterop) { waitForAggPortStatus(aggPort, true); // verify lacp state information - verifyLacpState(); + for (const auto& aggId : getAggPorts()) { + verifyLacpState(aggId, getSubPorts(aggId).size()); + } }; verifyAcrossWarmBoots(setup, verify); } From e836c87ee11ec7578953050bb80c7153bc5ffe24 Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Thu, 17 Oct 2024 22:51:21 -0700 Subject: [PATCH 193/479] Fix fmt library error for logging `sai_object_type_t` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: This hopefully 🤞 fixes the last of the errors plaguing the on-diff testing. Example failure from `fboss_fake_agent_targets`: https://www.internalfb.com/sandcastle/workflow/229683581000493149 Error: ``` FAILED: CMakeFiles/sai_tracer.dir/fboss/agent/hw/sai/tracer/SaiTracer.cpp.o /bin/c++ -DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_NO_LIB -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_NO_LIB -DGFLAGS_IS_A_DLL=0 -DIS_OSS=true -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fatal -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/nlohmann-json-V_y40AM2bw1iyK-EuS5vDcCNIvuQeSUE4e5YoBr-lB0/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/libsai-yESaIdbzrehcCGRJKe38Qag38dWOc6AfdCHIhidG9-w/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/libsai-yESaIdbzrehcCGRJKe38Qag38dWOc6AfdCHIhidG9-w/experimental -I/usr/include/libnl3 -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/iproute2-uZlREBVTwro6XgcS1k92RX1WsnBeZ-bwcHp9vBd4xeQ/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/yaml-cpp-qO3lWZVT4UgBNn_iIPaAGXVLKmz02GwHst9pmDKpm0o/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/libyaml-TY3Te3S5ejn-jjt3UP2vfLUbjC90dc6PD7psoP2Mts8/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/exprtk-hcCQcft-6V9VbQ8DMWtwvqa_bH2--mA2nUsf5WTabhA -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/libgpiod-OPLQYQVN3BoqYmnUWicqoIvh3LPVN0chmpoMHdVTED8/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/googletest-7JnJT5CgY1LVTPmQfwvncdoArZXAShZsSsQa9C0lCU4/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/build/fboss -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/gflags-FHGtz15ipgdtBy8VDWwU07RNW_0yBukAYrcBYzpi1g8/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/glog-kCh757cr82SAdy4c1gcwKKJY2dg-eTnUsnnFYmqPNS4/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-ekzv3-LMUT7ciCQTZ8O6VgxUmubclRMMSvqk1pfNRpU/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fb303/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fast_float-hCKLOe4pzx88oAL9hVCAcLxBNK9i35cyIBeUAB-HrkE/include -isystem /usr/include/libdwarf-0 -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/wangle/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fizz/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/include -Wall -Werror -Wno-sign-compare -Wno-maybe-uninitialized -Wno-deprecated-declarations -Os -DNDEBUG -std=gnu++20 -DSAI_VER_MAJOR=1 -DSAI_VER_MINOR=14 -DSAI_VER_RELEASE=0 -fsized-deallocation -MD -MT CMakeFiles/sai_tracer.dir/fboss/agent/hw/sai/tracer/SaiTracer.cpp.o -MF CMakeFiles/sai_tracer.dir/fboss/agent/hw/sai/tracer/SaiTracer.cpp.o.d -o CMakeFiles/sai_tracer.dir/fboss/agent/hw/sai/tracer/SaiTracer.cpp.o -c /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/agent/hw/sai/tracer/SaiTracer.cpp In file included from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/format.h:41, from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/include/folly/Range.h:60, from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/include/folly/logging/xlog.h:23, from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/agent/SysError.h:12, from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/agent/hw/sai/tracer/SaiTracer.cpp:16: /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h: In instantiation of ‘constexpr decltype (ctx.begin()) fmt::v11::detail::parse_format_specs(ParseContext&) [with T = _sai_object_type_t; ParseContext = fmt::v11::detail::compile_parse_context; decltype (ctx.begin()) = const char*]’: /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2735:9: required from ‘constexpr fmt::v11::detail::format_string_checker::format_string_checker(fmt::v11::basic_string_view) [with Char = char; Args = {folly::Range, _sai_object_type_t}]’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/include/folly/container/MapUtil.h:105:33: required from ‘typename Map::mapped_type& folly::get_or_throw(Map&, const Key&, const StringPiece&) [with E = std::out_of_range; Map = std::map<_sai_object_type_t, std::__cxx11::basic_string >; Key = _sai_object_type_t; typename Map::mapped_type = std::__cxx11::basic_string; folly::StringPiece = folly::Range]’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/agent/hw/sai/tracer/SaiTracer.cpp:596:26: required from here /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/include/folly/container/MapUtil.h:105:33: in ‘constexpr’ expansion of ‘fmt::v11::basic_format_string&, const _sai_object_type_t&>("{}{}")’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2673:45: error: ‘fmt::v11::detail::type_is_unformattable_for<_sai_object_type_t, char> _’ has incomplete type 2673 | type_is_unformattable_for _; | ^ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/include/folly/container/MapUtil.h: In instantiation of ‘typename Map::mapped_type& folly::get_or_throw(Map&, const Key&, const StringPiece&) [with E = std::out_of_range; Map = std::map<_sai_object_type_t, std::__cxx11::basic_string >; Key = _sai_object_type_t; typename Map::mapped_type = std::__cxx11::basic_string; folly::StringPiece = folly::Range]’: /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/agent/hw/sai/tracer/SaiTracer.cpp:596:26: required from here /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/include/folly/container/MapUtil.h:105:33: in ‘constexpr’ expansion of ‘fmt::v11::basic_format_string&, const _sai_object_type_t&>("{}{}")’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2884:40: in ‘constexpr’ expansion of ‘fmt::v11::detail::parse_format_string, _sai_object_type_t> >(((fmt::v11::basic_format_string&, const _sai_object_type_t&>*)this)->fmt::v11::basic_format_string&, const _sai_object_type_t&>::str_, fmt::v11::detail::format_string_checker, _sai_object_type_t>(fmt::v11::basic_string_view(((const char*)s))))’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2613:44: in ‘constexpr’ expansion of ‘fmt::v11::detail::parse_replacement_field, _sai_object_type_t>&>((p + -1), end, (* & handler))’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2581:33: in ‘constexpr’ expansion of ‘(& handler)->fmt::v11::detail::format_string_checker, _sai_object_type_t>::on_replacement_field((& handler)->fmt::v11::detail::format_string_checker, _sai_object_type_t>::on_arg_id(), begin)’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2756:20: in ‘constexpr’ expansion of ‘((fmt::v11::detail::format_string_checker, _sai_object_type_t>*)this)->fmt::v11::detail::format_string_checker, _sai_object_type_t>::on_format_specs(id, begin, begin)’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2763:51: error: ‘constexpr decltype (ctx.begin()) fmt::v11::detail::parse_format_specs(ParseContext&) [with T = _sai_object_type_t; ParseContext = fmt::v11::detail::compile_parse_context; decltype (ctx.begin()) = const char*]’ called in a constant expression 2763 | return id >= 0 && id < num_args ? parse_funcs_[id](context_) : begin; | ~~~~~~~~~~~~^ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2660:20: note: ‘constexpr decltype (ctx.begin()) fmt::v11::detail::parse_format_specs(ParseContext&) [with T = _sai_object_type_t; ParseContext = fmt::v11::detail::compile_parse_context; decltype (ctx.begin()) = const char*]’ is not usable as a ‘constexpr’ function because: 2660 | FMT_CONSTEXPR auto parse_format_specs(ParseContext& ctx) | ^~~~~~~~~~~~~~~~~~ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/include/folly/container/MapUtil.h: In instantiation of ‘typename Map::mapped_type& folly::get_or_throw(Map&, const Key&, const StringPiece&) [with E = std::out_of_range; Map = std::map<_sai_object_type_t, std::atomic >; Key = _sai_object_type_t; typename Map::mapped_type = std::atomic; folly::StringPiece = folly::Range]’: /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/agent/hw/sai/tracer/SaiTracer.cpp:1285:33: required from here /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/include/folly/container/MapUtil.h:105:33: in ‘constexpr’ expansion of ‘fmt::v11::basic_format_string&, const _sai_object_type_t&>("{}{}")’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2884:40: in ‘constexpr’ expansion of ‘fmt::v11::detail::parse_format_string, _sai_object_type_t> >(((fmt::v11::basic_format_string&, const _sai_object_type_t&>*)this)->fmt::v11::basic_format_string&, const _sai_object_type_t&>::str_, fmt::v11::detail::format_string_checker, _sai_object_type_t>(fmt::v11::basic_string_view(((const char*)s))))’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2613:44: in ‘constexpr’ expansion of ‘fmt::v11::detail::parse_replacement_field, _sai_object_type_t>&>((p + -1), end, (* & handler))’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2581:33: in ‘constexpr’ expansion of ‘(& handler)->fmt::v11::detail::format_string_checker, _sai_object_type_t>::on_replacement_field((& handler)->fmt::v11::detail::format_string_checker, _sai_object_type_t>::on_arg_id(), begin)’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2756:20: in ‘constexpr’ expansion of ‘((fmt::v11::detail::format_string_checker, _sai_object_type_t>*)this)->fmt::v11::detail::format_string_checker, _sai_object_type_t>::on_format_specs(id, begin, begin)’ /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-r9NMexE5zOSTPootfGu7cmU9U5mIr4-9ibtXGRGuVwU/include/fmt/base.h:2763:51: error: ‘constexpr decltype (ctx.begin()) fmt::v11::detail::parse_format_specs(ParseContext&) [with T = _sai_object_type_t; ParseContext = fmt::v11::detail::compile_parse_context; decltype (ctx.begin()) = const char*]’ called in a constant expression 2763 | return id >= 0 && id < num_args ? parse_funcs_[id](context_) : begin; | ``` **Context**: The issue is that `fmt` lib requires some scaffolding in order to appropriately log "complex" types (being any type that is not defined in the standard library for C++). In this case, some code is formatting `sai_object_type_t`, so we need to add appropriate stubs for the default beahvior. Reviewed By: harshitgulati18 Differential Revision: D64550065 fbshipit-source-id: 17f352e5bd9a1c2a14ed873389e95065ef984db0 --- fboss/agent/hw/sai/api/LoggingUtil.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fboss/agent/hw/sai/api/LoggingUtil.h b/fboss/agent/hw/sai/api/LoggingUtil.h index b3674603481fc..e3d49473c5b62 100644 --- a/fboss/agent/hw/sai/api/LoggingUtil.h +++ b/fboss/agent/hw/sai/api/LoggingUtil.h @@ -269,6 +269,19 @@ struct formatter { prbsStats.error_count); } }; +// Formatting for sai_object_type_t +template <> +struct formatter { + template + constexpr auto parse(ParseContext& ctx) const { + return ctx.begin(); + } + + template + auto format(const sai_object_type_t& type, FormatContext& ctx) const { + return format_to(ctx.out(), "{}", static_cast(type)); + } +}; #endif // Formatting for sai_port_err_status_list_t From c65f1b9de8e38b4146b1a383f38d3150eebbfb94 Mon Sep 17 00:00:00 2001 From: Ron He Date: Fri, 18 Oct 2024 00:01:27 -0700 Subject: [PATCH 194/479] Add conditionalEntropyRehash to switch config and switch state Summary: As titled. Default to false. Reviewed By: nivinl Differential Revision: D64451786 fbshipit-source-id: f263c734b98c8b4e4289a43d4eaf6f6a38535201 --- fboss/agent/switch_config.thrift | 1 + fboss/agent/switch_state.thrift | 1 + fboss/fsdb/if/oss/fsdb_model_thriftpath.h | 22 ++++++++++++++++------ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/fboss/agent/switch_config.thrift b/fboss/agent/switch_config.thrift index ee8ce7c3dd773..0408388cacda1 100644 --- a/fboss/agent/switch_config.thrift +++ b/fboss/agent/switch_config.thrift @@ -1154,6 +1154,7 @@ struct Port { 31: Scope scope = Scope.LOCAL; 32: optional PortQueueConfigName portVoqConfigName; + 33: bool conditionalEntropyRehash = false; } enum LacpPortRate { diff --git a/fboss/agent/switch_state.thrift b/fboss/agent/switch_state.thrift index aa1fbc75c6310..273ad90aac6ca 100644 --- a/fboss/agent/switch_state.thrift +++ b/fboss/agent/switch_state.thrift @@ -129,6 +129,7 @@ struct PortFields { 52: list activeErrors; 53: switch_config.Scope scope = switch_config.Scope.LOCAL; 54: optional i32 reachabilityGroupId; + 55: bool conditionalEntropyRehash = false; } typedef ctrl.SystemPortThrift SystemPortFields diff --git a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h index 4f847e1c75815..f22c7bbccb438 100755 --- a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h +++ b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h @@ -14831,7 +14831,8 @@ std::pair>>, std::pair>, std::pair>>, -std::pair>>; +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::facebook::fboss::cfg::PortState, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PortState>>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, @@ -14861,7 +14862,8 @@ std::pair, Child<::facebook::fboss::cfg::PortDrainState, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PortDrainState>>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::facebook::fboss::cfg::Scope, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::Scope>>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child>>; template using NameToId = fatal::tuple>, std::pair>, @@ -14892,7 +14894,8 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -14928,6 +14931,7 @@ std::pair auto operator()(const std::integral_constant&) { @@ -14961,6 +14965,7 @@ std::pair @@ -16034,7 +16039,8 @@ std::pair>, std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair>>, -std::pair>>; +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, @@ -16086,7 +16092,8 @@ std::pair, Child>, std::pair, ChildThriftPath<::std::vector<::facebook::fboss::PortError>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, Child<::facebook::fboss::cfg::Scope, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::Scope>>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>>; template using NameToId = fatal::tuple>, std::pair>, @@ -16139,7 +16146,8 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -16197,6 +16205,7 @@ std::pair auto operator()(const std::integral_constant&) { @@ -16252,6 +16261,7 @@ std::pair From fbb6853834770d9f3367ab2b8f72c1ddd109bce7 Mon Sep 17 00:00:00 2001 From: Ron He Date: Fri, 18 Oct 2024 00:01:27 -0700 Subject: [PATCH 195/479] Getter/setter for conditionalEntropyRehash Summary: As titled. Reviewed By: nivinl Differential Revision: D64451940 fbshipit-source-id: f29e883d3e7777dd3a7c266459cf752a19ac897b --- fboss/agent/state/Port.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fboss/agent/state/Port.h b/fboss/agent/state/Port.h index f9e0bb189dec8..83f0e490985f8 100644 --- a/fboss/agent/state/Port.h +++ b/fboss/agent/state/Port.h @@ -738,6 +738,13 @@ class Port : public ThriftStructNode { } } + bool getConditionalEntropyRehash() const { + return cref()->cref(); + } + void setConditionalEntropyRehash(bool conditionalEntropyRehash) { + set(conditionalEntropyRehash); + } + private: auto getRxSaks() const { return safe_cref(); From 2b8b9a4800beff2982157be758e1f022c2b52394 Mon Sep 17 00:00:00 2001 From: Ron He Date: Fri, 18 Oct 2024 00:01:27 -0700 Subject: [PATCH 196/479] ApplyThriftConfig to handle conditionalEntropyRehash Summary: As titled. Reviewed By: nivinl Differential Revision: D64451949 fbshipit-source-id: f978846512215244887404b6c8305da4cb44b54b --- fboss/agent/ApplyThriftConfig.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 22d3781b84aec..f5fecc7078c0c 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -2387,7 +2387,9 @@ shared_ptr ThriftConfigApplier::updatePort( *portConf->portType() == orig->getPortType() && *portConf->drainState() == orig->getPortDrainState() && portFlowletConfigUnchanged && - newFlowletConfigName == orig->getFlowletConfigName()) { + newFlowletConfigName == orig->getFlowletConfigName() && + *portConf->conditionalEntropyRehash() == + orig->getConditionalEntropyRehash()) { return nullptr; } @@ -2430,6 +2432,7 @@ shared_ptr ThriftConfigApplier::updatePort( newPort->setFlowletConfigName(newFlowletConfigName); newPort->setPortFlowletConfig(portFlowletCfg); newPort->setScope(*portConf->scope()); + newPort->setConditionalEntropyRehash(*portConf->conditionalEntropyRehash()); return newPort; } From a5cd3d265c5c746ca2b1c0a11732e8428bb8fa1b Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Fri, 18 Oct 2024 01:43:05 -0700 Subject: [PATCH 197/479] extension api stubs for chenab sdk api Summary: as titled Differential Revision: D63572642 fbshipit-source-id: fefd4a9049f4ea8fd5ebfb75a300f47535db0155 --- cmake/AgentHwSaiApi.cmake | 14 ++ fboss/agent/hw/sai/api/AclApi.h | 4 +- fboss/agent/hw/sai/api/SaiVersion.h | 4 + fboss/agent/hw/sai/api/chenab/BufferApi.cpp | 12 ++ .../hw/sai/api/chenab/DebugCounterApi.cpp | 12 ++ fboss/agent/hw/sai/api/chenab/PortApi.cpp | 71 ++++++++ fboss/agent/hw/sai/api/chenab/QueueApi.cpp | 12 ++ fboss/agent/hw/sai/api/chenab/SwitchApi.cpp | 155 ++++++++++++++++++ fboss/agent/hw/sai/api/chenab/TamApi.cpp | 17 ++ 9 files changed, 299 insertions(+), 2 deletions(-) create mode 100644 fboss/agent/hw/sai/api/chenab/BufferApi.cpp create mode 100644 fboss/agent/hw/sai/api/chenab/DebugCounterApi.cpp create mode 100644 fboss/agent/hw/sai/api/chenab/PortApi.cpp create mode 100644 fboss/agent/hw/sai/api/chenab/QueueApi.cpp create mode 100644 fboss/agent/hw/sai/api/chenab/SwitchApi.cpp create mode 100644 fboss/agent/hw/sai/api/chenab/TamApi.cpp diff --git a/cmake/AgentHwSaiApi.cmake b/cmake/AgentHwSaiApi.cmake index 04023df9a3f79..760778d9db446 100644 --- a/cmake/AgentHwSaiApi.cmake +++ b/cmake/AgentHwSaiApi.cmake @@ -110,6 +110,20 @@ elseif (SAI_BRCM_IMPL) find_path(SAI_IMPL_DIR NAMES lib/libsai_impl.a) include_directories(${SAI_IMPL_DIR}) message(STATUS "Found SAI_INCLUDE_DIR: ${SAI_INCLUDE_DIR}") +elseif (SAI_CHENAB_IMPL) + list(APPEND SAI_API_SRC + fboss/agent/hw/sai/api/chenab/PortApi.cpp + fboss/agent/hw/sai/api/chenab/TamApi.cpp + fboss/agent/hw/sai/api/chenab/SwitchApi.cpp + fboss/agent/hw/sai/api/chenab/DebugCounterApi.cpp + fboss/agent/hw/sai/api/chenab/BufferApi.cpp + fboss/agent/hw/sai/api/chenab/QueueApi.cpp + ) + + find_path(SAI_IMPL_DIR NAMES lib/libsai_impl.a) + include_directories(${SAI_IMPL_DIR}) + message(STATUS "Found SAI_INCLUDE_DIR: ${SAI_INCLUDE_DIR}") + else() list(APPEND SAI_API_SRC fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp diff --git a/fboss/agent/hw/sai/api/AclApi.h b/fboss/agent/hw/sai/api/AclApi.h index 8e661b05e7876..c210302625159 100644 --- a/fboss/agent/hw/sai/api/AclApi.h +++ b/fboss/agent/hw/sai/api/AclApi.h @@ -149,7 +149,7 @@ struct SaiAclTableTraits { SaiAttribute; using FieldTcpFlags = SaiAttribute; -#if defined(TAJO_SDK) +#if defined(TAJO_SDK) || defined(SAI_CHENAB_IMPL) using FieldSrcPort = SaiAttribute; #else @@ -311,7 +311,7 @@ struct SaiAclEntryTraits { EnumType, SAI_ACL_ENTRY_ATTR_FIELD_DST_IP, AclEntryFieldIpV4>; -#if defined(TAJO_SDK) +#if defined(TAJO_SDK) || defined(SAI_CHENAB_IMPL) using FieldSrcPort = SaiAttribute< EnumType, SAI_ACL_ENTRY_ATTR_FIELD_IN_PORT, diff --git a/fboss/agent/hw/sai/api/SaiVersion.h b/fboss/agent/hw/sai/api/SaiVersion.h index 61f68116a3c4b..fb79a6444b02c 100644 --- a/fboss/agent/hw/sai/api/SaiVersion.h +++ b/fboss/agent/hw/sai/api/SaiVersion.h @@ -128,3 +128,7 @@ #if defined(TAJO_SDK_EBRO) || defined(TAJO_SDK_MORGAN) #define TAJO_SAI_SDK #endif + +#if defined(SAI_CHENAB_IMPL) +#define SAI_CHENAB_IMPL +#endif diff --git a/fboss/agent/hw/sai/api/chenab/BufferApi.cpp b/fboss/agent/hw/sai/api/chenab/BufferApi.cpp new file mode 100644 index 0000000000000..5aeb313135b2c --- /dev/null +++ b/fboss/agent/hw/sai/api/chenab/BufferApi.cpp @@ -0,0 +1,12 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/api/BufferApi.h" + +namespace facebook::fboss { + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSharedFadtMaxTh::operator()() { + return std::nullopt; +} + +} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/chenab/DebugCounterApi.cpp b/fboss/agent/hw/sai/api/chenab/DebugCounterApi.cpp new file mode 100644 index 0000000000000..ea970bfe02fc6 --- /dev/null +++ b/fboss/agent/hw/sai/api/chenab/DebugCounterApi.cpp @@ -0,0 +1,12 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/api/DebugCounterApi.h" + +#include + +namespace facebook::fboss::detail { + +std::optional trapDrops() { + return std::nullopt; +} +} // namespace facebook::fboss::detail diff --git a/fboss/agent/hw/sai/api/chenab/PortApi.cpp b/fboss/agent/hw/sai/api/chenab/PortApi.cpp new file mode 100644 index 0000000000000..cb942624d1db9 --- /dev/null +++ b/fboss/agent/hw/sai/api/chenab/PortApi.cpp @@ -0,0 +1,71 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/api/PortApi.h" + +namespace facebook::fboss { +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxLutModeIdWrapper::operator()() { + return std::nullopt; +} +std::optional +SaiPortSerdesTraits::Attributes::AttributeRxCtleCodeIdWrapper::operator()() { + return std::nullopt; +} +std::optional +SaiPortSerdesTraits::Attributes::AttributeRxDspModeIdWrapper::operator()() { + return std::nullopt; +} +std::optional +SaiPortSerdesTraits::Attributes::AttributeRxAfeTrimIdWrapper::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxAcCouplingBypassIdWrapper::operator()() { + return std::nullopt; +} +std::optional +SaiPortTraits::Attributes::AttributeSystemPortId::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxAfeAdaptiveEnableWrapper::operator()() { + return std::nullopt; +} +std::optional +SaiPortTraits::Attributes::AttributeSerdesLaneList::operator()() { + return std::nullopt; +} +std::optional +SaiPortTraits::Attributes::AttributeDiagModeEnable::operator()() { + return std::nullopt; +} +std::optional +SaiPortTraits::Attributes::AttributeRxLaneSquelchEnable::operator()() { + return std::nullopt; +} +std::optional +SaiPortTraits::Attributes::AttributeFdrEnable::operator()() { + return std::nullopt; +} +#if SAI_API_VERSION >= SAI_VERSION(1, 10, 3) +std::optional +SaiPortTraits::Attributes::AttributeCrcErrorDetect::operator()() { + return std::nullopt; +} +#endif + +std::optional +SaiPortTraits::Attributes::AttributeCablePropogationDelayNS::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeFabricDataCellsFilterStatus::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeReachabilityGroup::operator()() { + return std::nullopt; +} +} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/chenab/QueueApi.cpp b/fboss/agent/hw/sai/api/chenab/QueueApi.cpp new file mode 100644 index 0000000000000..453a462fc295c --- /dev/null +++ b/fboss/agent/hw/sai/api/chenab/QueueApi.cpp @@ -0,0 +1,12 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/api/QueueApi.h" + +namespace facebook::fboss { + +const std::vector& SaiQueueTraits::egressGvoqWatermarkBytes() { + static const std::vector stats; + return stats; +} + +} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/chenab/SwitchApi.cpp b/fboss/agent/hw/sai/api/chenab/SwitchApi.cpp new file mode 100644 index 0000000000000..214fa555b2e62 --- /dev/null +++ b/fboss/agent/hw/sai/api/chenab/SwitchApi.cpp @@ -0,0 +1,155 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/api/SwitchApi.h" + +namespace facebook::fboss { + +std::optional +SaiSwitchTraits::Attributes::AttributeLedIdWrapper::operator()() { + return std::nullopt; +} +std::optional +SaiSwitchTraits::Attributes::AttributeLedResetIdWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeAclFieldListWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeEgressPoolAvaialableSizeIdWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::HwEccErrorInitiateWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeDllPathWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeRestartIssuWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeForceTrafficOverFabricWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeWarmBootTargetVersionWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeSwitchIsolateWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeMaxCoresWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeFabricRemoteReachablePortList::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeSdkBootTimeWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeRouteNoImplicitMetaDataWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeRouteAllowImplicitMetaDataWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeMultiStageLocalSwitchIdsWrapper::operator()() { + return std::nullopt; +} + +const std::vector& SaiSwitchTraits::dramStats() { + static const std::vector stats; + return stats; +} + +const std::vector& SaiSwitchTraits::rciWatermarkStats() { + static const std::vector stats; + return stats; +} + +const std::vector& SaiSwitchTraits::dtlWatermarkStats() { + static const std::vector stats; + return stats; +} + +const std::vector& SaiSwitchTraits::dramBlockTime() { + static const std::vector stats; + return stats; +} + +const std::vector& SaiSwitchTraits::deletedCredits() { + static const std::vector stats; + return stats; +} + +const std::vector& +SaiSwitchTraits::egressCoreBufferWatermarkBytes() { + static const std::vector stats; + return stats; +} + +void SwitchApi::registerSwitchEventCallback( + SwitchSaiId /*id*/, + void* /*switch_event_cb*/) const {} + +std::optional +SaiSwitchTraits::Attributes::AttributeVoqLatencyMinLocalNs::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeVoqLatencyMaxLocalNs::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeVoqLatencyMinLevel1Ns::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeVoqLatencyMaxLevel1Ns::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeVoqLatencyMinLevel2Ns::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeVoqLatencyMaxLevel2Ns::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeReachabilityGroupList::operator()() { + return std::nullopt; +} +} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/chenab/TamApi.cpp b/fboss/agent/hw/sai/api/chenab/TamApi.cpp new file mode 100644 index 0000000000000..695754203903c --- /dev/null +++ b/fboss/agent/hw/sai/api/chenab/TamApi.cpp @@ -0,0 +1,17 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/api/TamApi.h" + +namespace facebook::fboss { + +std::optional +SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeEventId::operator()() { + return std::nullopt; +} + +} // namespace facebook::fboss From 8006a41a39974d767c9d0bdfebba293016a893d9 Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Fri, 18 Oct 2024 01:43:05 -0700 Subject: [PATCH 198/479] chenab asic class Summary: as titled Reviewed By: shri-khare Differential Revision: D63654055 fbshipit-source-id: fbd17094591ea6c23471375afc90d3becfa96e77 --- cmake/AgentHwSwitchAsics.cmake | 1 + fboss/agent/ApplyThriftConfig.cpp | 1 + fboss/agent/AsicUtils.cpp | 2 + fboss/agent/hw/bcm/BcmFieldProcessorUtils.cpp | 1 + fboss/agent/hw/bcm/BcmSwitch.cpp | 1 + fboss/agent/hw/bcm/tests/HwTestTamUtils.cpp | 1 + fboss/agent/hw/sai/hw_test/HwTestTamUtils.cpp | 1 + .../agent/hw/sai/switch/SaiBufferManager.cpp | 2 + .../hw/sai/switch/SaiVirtualRouterManager.cpp | 1 + fboss/agent/hw/switch_asics/BUCK | 2 + fboss/agent/hw/switch_asics/ChenabAsic.cpp | 345 ++++++++++++++++++ fboss/agent/hw/switch_asics/ChenabAsic.h | 79 ++++ fboss/agent/hw/switch_asics/HwAsic.cpp | 4 + fboss/agent/hw/switch_asics/HwAsic.h | 1 + .../hw/test/HwHashPolarizationTestUtils.cpp | 2 + fboss/agent/hw/test/HwPortProfileTests.cpp | 2 + .../dataplane_tests/HwProdInvariantHelper.cpp | 1 + fboss/agent/switch_config.thrift | 1 + .../AgentDiagShellStressTests.cpp | 1 + .../prod_agent_tests/ProdInvariantTests.cpp | 1 + fboss/agent/test/utils/ConfigUtils.cpp | 1 + fboss/agent/test/utils/ConfigUtils.h | 1 + fboss/agent/test/utils/CoppTestUtils.cpp | 5 +- fboss/agent/test/utils/InvariantTestUtils.cpp | 1 + 24 files changed, 457 insertions(+), 1 deletion(-) create mode 100644 fboss/agent/hw/switch_asics/ChenabAsic.cpp create mode 100644 fboss/agent/hw/switch_asics/ChenabAsic.h diff --git a/cmake/AgentHwSwitchAsics.cmake b/cmake/AgentHwSwitchAsics.cmake index 29bec67cc3894..d27d32b791614 100644 --- a/cmake/AgentHwSwitchAsics.cmake +++ b/cmake/AgentHwSwitchAsics.cmake @@ -23,6 +23,7 @@ add_library(switch_asics fboss/agent/hw/switch_asics/Jericho3Asic.cpp fboss/agent/hw/switch_asics/RamonAsic.cpp fboss/agent/hw/switch_asics/Ramon3Asic.cpp + fboss/agent/hw/switch_asics/ChenabAsic.cpp fboss/agent/hw/switch_asics/BroadcomXgsAsic.cpp ) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index f5fecc7078c0c..170cbd21de0aa 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -948,6 +948,7 @@ void ThriftConfigApplier::processUpdatedDsfNodes() { case cfg::AsicType::ASIC_TYPE_JERICHO3: asicCore = 441; break; + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_TRIDENT2: case cfg::AsicType::ASIC_TYPE_TOMAHAWK: case cfg::AsicType::ASIC_TYPE_TOMAHAWK3: diff --git a/fboss/agent/AsicUtils.cpp b/fboss/agent/AsicUtils.cpp index db48149711210..44a5f7877cb40 100644 --- a/fboss/agent/AsicUtils.cpp +++ b/fboss/agent/AsicUtils.cpp @@ -79,6 +79,7 @@ const HwAsic& getHwAsicForAsicType(const cfg::AsicType& asicType) { case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: case cfg::AsicType::ASIC_TYPE_TOMAHAWK5: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: break; } @@ -108,6 +109,7 @@ uint32_t getFabricPortsPerVirtualDevice(const cfg::AsicType asicType) { case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: case cfg::AsicType::ASIC_TYPE_TOMAHAWK5: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: throw FbossError( "Fabric ports are not applicable for: ", apache::thrift::util::enumNameSafe(asicType)); diff --git a/fboss/agent/hw/bcm/BcmFieldProcessorUtils.cpp b/fboss/agent/hw/bcm/BcmFieldProcessorUtils.cpp index 2a1b1df0ecaa8..71d8cc0746812 100644 --- a/fboss/agent/hw/bcm/BcmFieldProcessorUtils.cpp +++ b/fboss/agent/hw/bcm/BcmFieldProcessorUtils.cpp @@ -518,6 +518,7 @@ bool needsExtraFPQsetQualifiers(cfg::AsicType asicType) { case cfg::AsicType::ASIC_TYPE_EBRO: case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: case cfg::AsicType::ASIC_TYPE_JERICHO2: diff --git a/fboss/agent/hw/bcm/BcmSwitch.cpp b/fboss/agent/hw/bcm/BcmSwitch.cpp index 765aac484742c..4823c9dc5cecb 100644 --- a/fboss/agent/hw/bcm/BcmSwitch.cpp +++ b/fboss/agent/hw/bcm/BcmSwitch.cpp @@ -4105,6 +4105,7 @@ void BcmSwitch::disableHotSwap() const { case cfg::AsicType::ASIC_TYPE_EBRO: case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_MOCK: case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: diff --git a/fboss/agent/hw/bcm/tests/HwTestTamUtils.cpp b/fboss/agent/hw/bcm/tests/HwTestTamUtils.cpp index 0051782087435..30cdd4cd26aab 100644 --- a/fboss/agent/hw/bcm/tests/HwTestTamUtils.cpp +++ b/fboss/agent/hw/bcm/tests/HwTestTamUtils.cpp @@ -24,6 +24,7 @@ void triggerParityError(HwSwitchEnsemble* ensemble) { case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: case cfg::AsicType::ASIC_TYPE_TOMAHAWK5: + case cfg::AsicType::ASIC_TYPE_CHENAB: XLOG(FATAL) << "Unsupported HwAsic: " << ensemble->getPlatform()->getAsic()->getAsicTypeStr(); break; diff --git a/fboss/agent/hw/sai/hw_test/HwTestTamUtils.cpp b/fboss/agent/hw/sai/hw_test/HwTestTamUtils.cpp index ada7fe4bb2ec3..0cd4f49e7c94c 100644 --- a/fboss/agent/hw/sai/hw_test/HwTestTamUtils.cpp +++ b/fboss/agent/hw/sai/hw_test/HwTestTamUtils.cpp @@ -100,6 +100,7 @@ void triggerParityError(HwSwitchEnsemble* ensemble) { case cfg::AsicType::ASIC_TYPE_MOCK: case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: + case cfg::AsicType::ASIC_TYPE_CHENAB: XLOG(FATAL) << "Unsupported HwAsic: " << ensemble->getPlatform()->getAsic()->getAsicTypeStr(); case cfg::AsicType::ASIC_TYPE_RAMON: diff --git a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp index dfb5237ab6282..38a9c280429a2 100644 --- a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp @@ -61,6 +61,7 @@ void assertMaxBufferPoolSize(const SaiPlatform* platform) { case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: case cfg::AsicType::ASIC_TYPE_RAMON: case cfg::AsicType::ASIC_TYPE_RAMON3: + case cfg::AsicType::ASIC_TYPE_CHENAB: XLOG(FATAL) << " Not supported"; break; case cfg::AsicType::ASIC_TYPE_FAKE: @@ -101,6 +102,7 @@ uint64_t SaiBufferManager::getMaxEgressPoolBytes(const SaiPlatform* platform) { case cfg::AsicType::ASIC_TYPE_EBRO: case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: return asic->getMMUSizeBytes(); case cfg::AsicType::ASIC_TYPE_TOMAHAWK: { auto constexpr kNumXpes = 4; diff --git a/fboss/agent/hw/sai/switch/SaiVirtualRouterManager.cpp b/fboss/agent/hw/sai/switch/SaiVirtualRouterManager.cpp index 81b054b777006..bc293ed8f8241 100644 --- a/fboss/agent/hw/sai/switch/SaiVirtualRouterManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiVirtualRouterManager.cpp @@ -97,6 +97,7 @@ SaiVirtualRouterManager::createMplsRouterInterface(VirtualRouterSaiId vrId) { case cfg::AsicType::ASIC_TYPE_JERICHO3: case cfg::AsicType::ASIC_TYPE_RAMON: case cfg::AsicType::ASIC_TYPE_RAMON3: + case cfg::AsicType::ASIC_TYPE_CHENAB: // TODO(pshaikh): mpls support required break; } diff --git a/fboss/agent/hw/switch_asics/BUCK b/fboss/agent/hw/switch_asics/BUCK index 4d6653c3d3e0a..0af67ca9830ab 100644 --- a/fboss/agent/hw/switch_asics/BUCK +++ b/fboss/agent/hw/switch_asics/BUCK @@ -6,6 +6,7 @@ cpp_library( name = "switch_asics", srcs = [ "BroadcomXgsAsic.cpp", + "ChenabAsic.cpp", "CredoPhyAsic.cpp", "EbroAsic.cpp", "HwAsic.cpp", @@ -22,6 +23,7 @@ cpp_library( ], headers = [ "BroadcomAsic.h", + "ChenabAsic.h", "FakeAsic.h", "MockAsic.h", "TajoAsic.h", diff --git a/fboss/agent/hw/switch_asics/ChenabAsic.cpp b/fboss/agent/hw/switch_asics/ChenabAsic.cpp new file mode 100644 index 0000000000000..0d05a21740858 --- /dev/null +++ b/fboss/agent/hw/switch_asics/ChenabAsic.cpp @@ -0,0 +1,345 @@ +// Copyright 2023-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/switch_asics/ChenabAsic.h" +#include + +namespace facebook::fboss { + +bool ChenabAsic::isSupportedNonFabric(Feature feature) const { + switch (feature) { + /* + * None of the features are verified on the asic. + * Marking them as true for now but need to revisit + * this as we verify the features. + */ + case HwAsic::Feature::SPAN: + case HwAsic::Feature::ERSPANv4: + case HwAsic::Feature::SFLOWv4: + case HwAsic::Feature::ERSPANv6: + case HwAsic::Feature::SFLOWv6: + case HwAsic::Feature::ECN: + case HwAsic::Feature::QOS_MAP_GLOBAL: + case HwAsic::Feature::SMAC_EQUALS_DMAC_CHECK_ENABLED: + case HwAsic::Feature::WEIGHTED_NEXTHOPGROUP_MEMBER: + case HwAsic::Feature::SAI_WEIGHTED_NEXTHOPGROUP_MEMBER: + case HwAsic::Feature::BUFFER_POOL: + case HwAsic::Feature::MIRROR_PACKET_TRUNCATION: + case HwAsic::Feature::SFLOW_SAMPLING: + case HwAsic::Feature::SAI_ECN_WRED: + case HwAsic::Feature::MAC_AGING: + case HwAsic::Feature::TELEMETRY_AND_MONITORING: + case HwAsic::Feature::REMOVE_PORTS_FOR_COLDBOOT: + case HwAsic::Feature::DEFAULT_VLAN: + case HwAsic::Feature::ACL_COPY_TO_CPU: + case HwAsic::Feature::MULTIPLE_ACL_TABLES: + case HwAsic::Feature::SAI_ACL_TABLE_UPDATE: + case HwAsic::Feature::SAI_ACL_ENTRY_SRC_PORT_QUALIFIER: + case HwAsic::Feature::VRF: + case HwAsic::Feature::SAI_PORT_SERDES_FIELDS_RESET: + case HwAsic::Feature::PTP_TC: + case HwAsic::Feature::PTP_TC_PCS: + case HwAsic::Feature::ROUTE_PROGRAMMING: + case HwAsic::Feature::FEC: + case HwAsic::Feature::FABRIC_PORT_MTU: + case HwAsic::Feature::FABRIC_PORTS: + case HwAsic::Feature::SAI_PORT_SPEED_CHANGE: + case HwAsic::Feature::ROUTE_COUNTERS: + case HwAsic::Feature::UDF_HASH_FIELD_QUERY: + case HwAsic::Feature::SAI_SAMPLEPACKET_TRAP: + case HwAsic::Feature::QUEUE_ECN_COUNTER: + case HwAsic::Feature::SAI_CONFIGURE_SEVEN_TAP: + case HwAsic::Feature::SAI_CONFIGURE_SIX_TAP: + case HwAsic::Feature::SEPARATE_BYTE_AND_PACKET_ACL_COUNTER: + case HwAsic::Feature::L3_QOS: + case HwAsic::Feature::L3_MTU_ERROR_TRAP: + case HwAsic::Feature::SAI_PORT_SERDES_PROGRAMMING: + case HwAsic::Feature::PORT_WRED_COUNTER: + case HwAsic::Feature::BRIDGE_PORT_8021Q: + case HwAsic::Feature::WARMBOOT: + case HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS: + case HwAsic::Feature::SAI_UDF_HASH: + case HwAsic::Feature::IN_PAUSE_INCREMENTS_DISCARDS: + case HwAsic::Feature::SAI_FEC_COUNTERS: + case HwAsic::Feature::SAI_FEC_CODEWORDS_STATS: + case HwAsic::Feature::PFC: + case HwAsic::Feature::HASH_FIELDS_CUSTOMIZATION: + case HwAsic::Feature::ECMP_HASH_V4: + case HwAsic::Feature::ECMP_HASH_V6: + case HwAsic::Feature::CPU_PORT: + case HwAsic::Feature::ACL_TABLE_GROUP: + case HwAsic::Feature::RESOURCE_USAGE_STATS: + case HwAsic::Feature::SAI_TTL0_PACKET_FORWARD_ENABLE: + return true; + case HwAsic::Feature::EVENTOR_PORT_FOR_SFLOW: + case HwAsic::Feature::CPU_VOQ_BUFFER_PROFILE: + case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: + case HwAsic::Feature::SWITCH_REACHABILITY_CHANGE_NOTIFY: + case HwAsic::Feature::CABLE_PROPOGATION_DELAY: + case HwAsic::Feature::DRAM_BLOCK_TIME: + case HwAsic::Feature::VOQ_LATENCY_WATERMARK_BIN: + case HwAsic::Feature::ACL_ENTRY_ETHER_TYPE: + case HwAsic::Feature::ACL_BYTE_COUNTER: + case HwAsic::Feature::DATA_CELL_FILTER: + case HwAsic::Feature::EGRESS_CORE_BUFFER_WATERMARK: + case HwAsic::Feature::DELETED_CREDITS_STAT: + case HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS: + case HwAsic::Feature::ACL_METADATA_QUALIFER: + case HwAsic::Feature::PENDING_L2_ENTRY: + case HwAsic::Feature::PMD_RX_LOCK_STATUS: + case HwAsic::Feature::PMD_RX_SIGNAL_DETECT: + case HwAsic::Feature::FEC_AM_LOCK_STATUS: + case HwAsic::Feature::PCS_RX_LINK_STATUS: + case HwAsic::Feature::ACL_COUNTER_LABEL: + case HwAsic::Feature::ROUTE_METADATA: + case HwAsic::Feature::MEDIA_TYPE: + case HwAsic::Feature::PORT_TTL_DECREMENT_DISABLE: + case HwAsic::Feature::COUNTER_REFRESH_INTERVAL: + case HwAsic::Feature::BLACKHOLE_ROUTE_DROP_COUNTER: + case HwAsic::Feature::SWITCH_ATTR_INGRESS_ACL: + case HwAsic::Feature::ECMP_MEMBER_WIDTH_INTROSPECTION: + case HwAsic::Feature::SAI_MPLS_LABEL_LOOKUP_FAIL_COUNTER: + case HwAsic::Feature::SAI_MPLS_TTL_1_TRAP: + case HwAsic::Feature::SAI_MPLS_INSEGMENT: + case HwAsic::Feature::RESERVED_ENCAP_INDEX_RANGE: + case HwAsic::Feature::HOSTTABLE: + case HwAsic::Feature::QCM: + case HwAsic::Feature::SCHEDULER_PPS: + case HwAsic::Feature::NEXTHOP_TTL_DECREMENT_DISABLE: + case HwAsic::Feature::PORT_INTERFACE_TYPE: + case HwAsic::Feature::HSDK: + case HwAsic::Feature::OBJECT_KEY_CACHE: + case HwAsic::Feature::L3_EGRESS_MODE_AUTO_ENABLED: + case HwAsic::Feature::PKTIO: + case HwAsic::Feature::INGRESS_FIELD_PROCESSOR_FLEX_COUNTER: + case HwAsic::Feature::PORT_TX_DISABLE: + case HwAsic::Feature::ZERO_SDK_WRITE_WARMBOOT: + case HwAsic::Feature::OBM_COUNTERS: + case HwAsic::Feature::EGRESS_QUEUE_FLEX_COUNTER: + case HwAsic::Feature::PFC_XON_TO_XOFF_COUNTER: + case HwAsic::Feature::INGRESS_L3_INTERFACE: + case HwAsic::Feature::NON_UNICAST_HASH: + case HwAsic::Feature::DETAILED_L2_UPDATE: + case HwAsic::Feature::WIDE_ECMP: + case HwAsic::Feature::ALPM_ROUTE_PROJECTION: + case HwAsic::Feature::SFLOW_SHIM_VERSION_FIELD: + case HwAsic::Feature::EGRESS_MIRRORING: + case HwAsic::Feature::EGRESS_SFLOW: + case HwAsic::Feature::SAI_LAG_HASH: + case HwAsic::Feature::MACSEC: + case HwAsic::Feature::SAI_HASH_FIELDS_CLEAR_BEFORE_SET: + case HwAsic::Feature::EMPTY_ACL_MATCHER: + case HwAsic::Feature::ROUTE_FLEX_COUNTERS: + case HwAsic::Feature::FEC_DIAG_COUNTERS: + case HwAsic::Feature::PORT_EYE_VALUES: + case HwAsic::Feature::SAI_PORT_ERR_STATUS: + case HwAsic::Feature::EXACT_MATCH: + case HwAsic::Feature::FEC_CORRECTED_BITS: + case HwAsic::Feature::RX_FREQUENCY_PPM: + case HwAsic::Feature::SAI_FIRMWARE_PATH: + case HwAsic::Feature::EXTENDED_FEC: + case HwAsic::Feature::LINK_TRAINING: + case HwAsic::Feature::SAI_RX_REASON_COUNTER: + case HwAsic::Feature::VOQ: + case HwAsic::Feature::XPHY_PORT_STATE_TOGGLE: + case HwAsic::Feature::SAI_PORT_GET_PMD_LANES: + case HwAsic::Feature::FABRIC_TX_QUEUES: + case HwAsic::Feature::SAI_PORT_VCO_CHANGE: + case HwAsic::Feature::SHARED_INGRESS_EGRESS_BUFFER_POOL: + case HwAsic::Feature::FLOWLET: + case HwAsic::Feature::TC_TO_QUEUE_QOS_MAP_ON_SYSTEM_PORT: + case HwAsic::Feature::PORT_FABRIC_ISOLATE: + case HwAsic::Feature::CPU_TX_VIA_RECYCLE_PORT: + case HwAsic::Feature::SWITCH_DROP_STATS: + case HwAsic::Feature::PACKET_INTEGRITY_DROP_STATS: + case HwAsic::Feature::TRAFFIC_HASHING: + case HwAsic::Feature::SAI_MPLS_QOS: + case HwAsic::Feature::MPLS: + case HwAsic::Feature::MPLS_ECMP: + case HwAsic::Feature::INGRESS_PRIORITY_GROUP_HEADROOM_WATERMARK: + case HwAsic::Feature::SAI_PORT_ETHER_STATS: + case HwAsic::Feature::RX_LANE_SQUELCH_ENABLE: + case HwAsic::Feature::SLOW_STAT_UPDATE: + case HwAsic::Feature::VOQ_DELETE_COUNTER: + case HwAsic::Feature::DRAM_ENQUEUE_DEQUEUE_STATS: + case HwAsic::Feature::FLOWLET_PORT_ATTRIBUTES: + case HwAsic::Feature::P4_WARMBOOT: + case HwAsic::Feature::SAI_EAPOL_TRAP: + case HwAsic::Feature::SAI_USER_DEFINED_TRAP: + case HwAsic::Feature::CREDIT_WATCHDOG: + case HwAsic::Feature::ECMP_DLB_OFFSET: + case HwAsic::Feature::SAI_FEC_CORRECTED_BITS: + case HwAsic::Feature::LINK_INACTIVE_BASED_ISOLATE: + case HwAsic::Feature::RX_SNR: + case HwAsic::Feature::MANAGEMENT_PORT: + case HwAsic::Feature::ANY_ACL_DROP_COUNTER: + case HwAsic::Feature::EGRESS_FORWARDING_DROP_COUNTER: + case HwAsic::Feature::ANY_TRAP_DROP_COUNTER: + case HwAsic::Feature::SAI_PRBS: + case HwAsic::Feature::RCI_WATERMARK_COUNTER: + case HwAsic::Feature::DTL_WATERMARK_COUNTER: + case HwAsic::Feature::LINK_ACTIVE_INACTIVE_NOTIFY: + case HwAsic::Feature::PQP_ERROR_EGRESS_DROP_COUNTER: + case HwAsic::Feature::FABRIC_LINK_DOWN_CELL_DROP_COUNTER: + case HwAsic::Feature::CRC_ERROR_DETECT: + return false; + default: + return false; + } + return false; +} + +bool ChenabAsic::isSupportedFabric(Feature feature) const { + switch (feature) { + case HwAsic::Feature::REMOVE_PORTS_FOR_COLDBOOT: + case HwAsic::Feature::FABRIC_PORTS: + return true; + default: + return false; + } + return false; +} + +int ChenabAsic::getDefaultNumPortQueues( + cfg::StreamType streamType, + cfg::PortType portType) const { + switch (streamType) { + case cfg::StreamType::MULTICAST: + throw FbossError( + "no queue exist for stream type: ", + apache::thrift::util::enumNameSafe(streamType)); + case cfg::StreamType::FABRIC_TX: + return 1; + case cfg::StreamType::UNICAST: + case cfg::StreamType::ALL: + return 8; + } + + throw FbossError( + "Unexpected, stream: ", + apache::thrift::util::enumNameSafe(streamType), + " portType: ", + apache::thrift::util::enumNameSafe(portType), + " combination"); +} + +std::set ChenabAsic::getQueueStreamTypes( + cfg::PortType portType) const { + switch (portType) { + case cfg::PortType::CPU_PORT: + case cfg::PortType::INTERFACE_PORT: + case cfg::PortType::MANAGEMENT_PORT: + return {cfg::StreamType::UNICAST}; + // return {getDefaultStreamType()}; + case cfg::PortType::FABRIC_PORT: + return {cfg::StreamType::FABRIC_TX}; + case cfg::PortType::RECYCLE_PORT: + case cfg::PortType::EVENTOR_PORT: + // TODO: handle when we start modeling + // recycle port for Ebro ASIC + break; + } + throw FbossError( + "ASIC does not support:", apache::thrift::util::enumNameSafe(portType)); +} +cfg::Range64 ChenabAsic::getReservedEncapIndexRange() const { + if (getSwitchType() == cfg::SwitchType::VOQ) { + // Reserved range worked out with vendor. These ids + // are reserved in SAI-SDK implementation for use + // by NOS + return makeRange(100, 4093); + } + return HwAsic::getReservedEncapIndexRange(); +} +HwAsic::AsicVendor ChenabAsic::getAsicVendor() const { + return HwAsic::AsicVendor::ASIC_VENDOR_CHENAB; +} +std::string ChenabAsic::getVendor() const { + return "chenab_vendor"; +} +bool ChenabAsic::isSupported(Feature feature) const { + return getSwitchType() != cfg::SwitchType::FABRIC + ? isSupportedNonFabric(feature) + : isSupportedFabric(feature); +} +cfg::AsicType ChenabAsic::getAsicType() const { + return cfg::AsicType::ASIC_TYPE_CHENAB; +} +int ChenabAsic::getBufferDynThreshFromScalingFactor( + cfg::MMUScalingFactor /* scalingFactor */) const { + throw FbossError("Dynamic buffer threshold unsupported!"); +} +bool ChenabAsic::scalingFactorBasedDynamicThresholdSupported() const { + return false; +} +phy::DataPlanePhyChipType ChenabAsic::getDataPlanePhyChipType() const { + return phy::DataPlanePhyChipType::IPHY; +} +cfg::PortSpeed ChenabAsic::getMaxPortSpeed() const { + return cfg::PortSpeed::EIGHTHUNDREDG; +} +uint32_t ChenabAsic::getMaxLabelStackDepth() const { + return 3; +} +uint64_t ChenabAsic::getMMUSizeBytes() const { + return 420000; // return 108 * 1024 * 1024; +} +uint32_t ChenabAsic::getMaxMirrors() const { + // TODO - verify this + return 4; +} +uint64_t ChenabAsic::getDefaultReservedBytes( + cfg::StreamType /*streamType*/, + cfg::PortType /*portType*/) const { + // Concept of reserved bytes does not apply to GB + return 0; +} +cfg::MMUScalingFactor ChenabAsic::getDefaultScalingFactor( + cfg::StreamType /*streamType*/, + bool /*cpu*/) const { + // Concept of scaling factor does not apply returning the same value TH3 + return cfg::MMUScalingFactor::TWO; +} +int ChenabAsic::getMaxNumLogicalPorts() const { + // 256 physical lanes + cpu + return 257; +} +uint16_t ChenabAsic::getMirrorTruncateSize() const { + return 220; +} +uint32_t ChenabAsic::getMaxWideEcmpSize() const { + return 128; +} +uint32_t ChenabAsic::getMaxLagMemberSize() const { + return 512; +} +int ChenabAsic::getSystemPortIDOffset() const { + return 500; +} +uint32_t ChenabAsic::getSflowShimHeaderSize() const { + return 9; +} +std::optional ChenabAsic::getPortSerdesPreemphasis() const { + return 50; +} +uint32_t ChenabAsic::getPacketBufferUnitSize() const { + return 512; +} +uint32_t ChenabAsic::getPacketBufferDescriptorSize() const { + return 40; +} +uint32_t ChenabAsic::getMaxVariableWidthEcmpSize() const { + return 512; +} +uint32_t ChenabAsic::getMaxEcmpSize() const { + return 512; +} +uint32_t ChenabAsic::getNumCores() const { + return 12; +} +uint32_t ChenabAsic::getStaticQueueLimitBytes() const { + return 512 * 1024 * getPacketBufferUnitSize(); +} +uint32_t ChenabAsic::getNumMemoryBuffers() const { + return 1; +} +} // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/ChenabAsic.h b/fboss/agent/hw/switch_asics/ChenabAsic.h new file mode 100644 index 0000000000000..41e9c2eeba51c --- /dev/null +++ b/fboss/agent/hw/switch_asics/ChenabAsic.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#pragma once + +#include "fboss/agent/FbossError.h" +#include "fboss/agent/hw/switch_asics/HwAsic.h" + +namespace facebook::fboss { + +class ChenabAsic : public HwAsic { + public: + ChenabAsic( + cfg::SwitchType type, + std::optional id, + int16_t index, + std::optional systemPortRange, + const folly::MacAddress& mac, + std::optional sdkVersion = std::nullopt) + : HwAsic( + type, + id, + index, + systemPortRange, + mac, + sdkVersion, + {cfg::SwitchType::NPU}) {} + AsicVendor getAsicVendor() const override; + std::string getVendor() const override; + bool isSupported(Feature feature) const override; + cfg::AsicType getAsicType() const override; + int getBufferDynThreshFromScalingFactor( + cfg::MMUScalingFactor /* scalingFactor */) const override; + bool scalingFactorBasedDynamicThresholdSupported() const override; + phy::DataPlanePhyChipType getDataPlanePhyChipType() const override; + cfg::PortSpeed getMaxPortSpeed() const override; + std::set getQueueStreamTypes( + cfg::PortType portType) const override; + int getDefaultNumPortQueues( + cfg::StreamType streamType, + cfg::PortType /*portType*/) const override; + uint32_t getMaxLabelStackDepth() const override; + uint64_t getMMUSizeBytes() const override; + uint32_t getMaxMirrors() const override; + uint64_t getDefaultReservedBytes( + cfg::StreamType /*streamType*/, + cfg::PortType /*portType*/) const override; + cfg::MMUScalingFactor getDefaultScalingFactor( + cfg::StreamType /*streamType*/, + bool /*cpu*/) const override; + int getMaxNumLogicalPorts() const override; + uint16_t getMirrorTruncateSize() const override; + uint32_t getMaxWideEcmpSize() const override; + uint32_t getMaxLagMemberSize() const override; + int getSystemPortIDOffset() const override; + uint32_t getSflowShimHeaderSize() const override; + std::optional getPortSerdesPreemphasis() const override; + uint32_t getPacketBufferUnitSize() const override; + uint32_t getPacketBufferDescriptorSize() const override; + uint32_t getMaxVariableWidthEcmpSize() const override; + uint32_t getMaxEcmpSize() const override; + uint32_t getNumCores() const override; + uint32_t getStaticQueueLimitBytes() const override; + uint32_t getNumMemoryBuffers() const override; + cfg::Range64 getReservedEncapIndexRange() const override; + + private: + bool isSupportedFabric(Feature feature) const; + bool isSupportedNonFabric(Feature feature) const; +}; + +} // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/HwAsic.cpp b/fboss/agent/hw/switch_asics/HwAsic.cpp index e8c739bed872f..3f805c42e0879 100644 --- a/fboss/agent/hw/switch_asics/HwAsic.cpp +++ b/fboss/agent/hw/switch_asics/HwAsic.cpp @@ -10,6 +10,7 @@ #include "fboss/agent/hw/switch_asics/HwAsic.h" #include #include "fboss/agent/FbossError.h" +#include "fboss/agent/hw/switch_asics/ChenabAsic.h" #include "fboss/agent/hw/switch_asics/CredoPhyAsic.h" #include "fboss/agent/hw/switch_asics/EbroAsic.h" #include "fboss/agent/hw/switch_asics/FakeAsic.h" @@ -106,6 +107,9 @@ std::unique_ptr HwAsic::makeAsic( case cfg::AsicType::ASIC_TYPE_YUBA: return std::make_unique( switchType, switchId, switchIndex, systemPortRange, mac, sdkVersion); + case cfg::AsicType::ASIC_TYPE_CHENAB: + return std::make_unique( + switchType, switchId, switchIndex, systemPortRange, mac, sdkVersion); case cfg::AsicType::ASIC_TYPE_JERICHO2: return std::make_unique( switchType, switchId, switchIndex, systemPortRange, mac, sdkVersion); diff --git a/fboss/agent/hw/switch_asics/HwAsic.h b/fboss/agent/hw/switch_asics/HwAsic.h index cd1844439c912..c2fc8de673f14 100644 --- a/fboss/agent/hw/switch_asics/HwAsic.h +++ b/fboss/agent/hw/switch_asics/HwAsic.h @@ -210,6 +210,7 @@ class HwAsic { ASIC_VENDOR_TAJO, ASIC_VENDOR_CREDO, ASIC_VENDOR_MARVELL, + ASIC_VENDOR_CHENAB, ASIC_VENDOR_MOCK, ASIC_VENDOR_FAKE, }; diff --git a/fboss/agent/hw/test/HwHashPolarizationTestUtils.cpp b/fboss/agent/hw/test/HwHashPolarizationTestUtils.cpp index 04f31eacd9d09..6baf96c6092af 100644 --- a/fboss/agent/hw/test/HwHashPolarizationTestUtils.cpp +++ b/fboss/agent/hw/test/HwHashPolarizationTestUtils.cpp @@ -42,6 +42,7 @@ std::unique_ptr> getFullHashedPackets( case cfg::AsicType::ASIC_TYPE_FAKE: case cfg::AsicType::ASIC_TYPE_MOCK: + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_TOMAHAWK3: case cfg::AsicType::ASIC_TYPE_TOMAHAWK4: case cfg::AsicType::ASIC_TYPE_TOMAHAWK5: @@ -70,6 +71,7 @@ std::unique_ptr> getFullHashedPackets( case cfg::AsicType::ASIC_TYPE_TOMAHAWK5: case cfg::AsicType::ASIC_TYPE_FAKE: case cfg::AsicType::ASIC_TYPE_MOCK: + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_EBRO: case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: diff --git a/fboss/agent/hw/test/HwPortProfileTests.cpp b/fboss/agent/hw/test/HwPortProfileTests.cpp index a3cf34b1c50c4..24720e97dbfe2 100644 --- a/fboss/agent/hw/test/HwPortProfileTests.cpp +++ b/fboss/agent/hw/test/HwPortProfileTests.cpp @@ -94,6 +94,8 @@ class HwPortProfileTest : public HwTest { cfg::AsicType::ASIC_TYPE_TRIDENT2 || getPlatform()->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_FAKE || + getPlatform()->getAsic()->getAsicType() == + cfg::AsicType::ASIC_TYPE_CHENAB || getPlatform()->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_MOCK) { return; diff --git a/fboss/agent/hw/test/dataplane_tests/HwProdInvariantHelper.cpp b/fboss/agent/hw/test/dataplane_tests/HwProdInvariantHelper.cpp index a5fea99b13836..c77faf9e1df1f 100644 --- a/fboss/agent/hw/test/dataplane_tests/HwProdInvariantHelper.cpp +++ b/fboss/agent/hw/test/dataplane_tests/HwProdInvariantHelper.cpp @@ -166,6 +166,7 @@ void HwProdInvariantHelper::verifySafeDiagCmds() { case cfg::AsicType::ASIC_TYPE_EBRO: case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: case cfg::AsicType::ASIC_TYPE_JERICHO2: diff --git a/fboss/agent/switch_config.thrift b/fboss/agent/switch_config.thrift index 0408388cacda1..d38c899ff414b 100644 --- a/fboss/agent/switch_config.thrift +++ b/fboss/agent/switch_config.thrift @@ -1346,6 +1346,7 @@ enum AsicType { ASIC_TYPE_JERICHO3 = 14, ASIC_TYPE_YUBA = 15, ASIC_TYPE_RAMON3 = 16, + ASIC_TYPE_CHENAB = 17, } /** * The configuration for an interface diff --git a/fboss/agent/test/agent_hw_tests/AgentDiagShellStressTests.cpp b/fboss/agent/test/agent_hw_tests/AgentDiagShellStressTests.cpp index 9f428255614cf..3e97d4afefc24 100644 --- a/fboss/agent/test/agent_hw_tests/AgentDiagShellStressTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentDiagShellStressTests.cpp @@ -27,6 +27,7 @@ class AgentDiagShellStressTest : public AgentHwTest { case cfg::AsicType::ASIC_TYPE_JERICHO3: case cfg::AsicType::ASIC_TYPE_RAMON: case cfg::AsicType::ASIC_TYPE_RAMON3: + case cfg::AsicType::ASIC_TYPE_CHENAB: // No diag shell to test for these ASICs break; case cfg::AsicType::ASIC_TYPE_EBRO: diff --git a/fboss/agent/test/prod_agent_tests/ProdInvariantTests.cpp b/fboss/agent/test/prod_agent_tests/ProdInvariantTests.cpp index e3ea0be276d1a..655d325af5f79 100644 --- a/fboss/agent/test/prod_agent_tests/ProdInvariantTests.cpp +++ b/fboss/agent/test/prod_agent_tests/ProdInvariantTests.cpp @@ -326,6 +326,7 @@ void ProdInvariantTest::verifySafeDiagCommands() { case cfg::AsicType::ASIC_TYPE_RAMON3: case cfg::AsicType::ASIC_TYPE_TOMAHAWK5: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: break; case cfg::AsicType::ASIC_TYPE_TRIDENT2: diff --git a/fboss/agent/test/utils/ConfigUtils.cpp b/fboss/agent/test/utils/ConfigUtils.cpp index 312293f63a629..2d3ef5b50b28a 100644 --- a/fboss/agent/test/utils/ConfigUtils.cpp +++ b/fboss/agent/test/utils/ConfigUtils.cpp @@ -430,6 +430,7 @@ cfg::DsfNode dsfNodeConfig( std::nullopt, localMac), PlatformType::PLATFORM_MERU800BFA); + case cfg::AsicType::ASIC_TYPE_CHENAB: default: throw FbossError("Unexpected asic type: ", fromAsic.getAsicTypeStr()); } diff --git a/fboss/agent/test/utils/ConfigUtils.h b/fboss/agent/test/utils/ConfigUtils.h index 66016d739eb58..3e07d30401ebe 100644 --- a/fboss/agent/test/utils/ConfigUtils.h +++ b/fboss/agent/test/utils/ConfigUtils.h @@ -12,6 +12,7 @@ #include "fboss/agent/FbossError.h" #include "fboss/agent/gen-cpp2/switch_config_types.h" +#include "fboss/agent/hw/switch_asics/ChenabAsic.h" #include "fboss/agent/hw/switch_asics/EbroAsic.h" #include "fboss/agent/hw/switch_asics/HwAsic.h" #include "fboss/agent/hw/switch_asics/Jericho2Asic.h" diff --git a/fboss/agent/test/utils/CoppTestUtils.cpp b/fboss/agent/test/utils/CoppTestUtils.cpp index 731fb3f07b26d..46cbc536114e1 100644 --- a/fboss/agent/test/utils/CoppTestUtils.cpp +++ b/fboss/agent/test/utils/CoppTestUtils.cpp @@ -115,6 +115,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_CHENAB: return 7; case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: @@ -154,6 +155,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_CHENAB: return cfg::ToCpuAction::TRAP; case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: @@ -206,7 +208,8 @@ uint32_t getCoppQueuePps(const HwAsic* hwAsic, uint16_t queueId) { uint32_t getCoppQueueKbpsFromPps(const HwAsic* hwAsic, uint32_t pps) { uint32_t kbps; - if (hwAsic->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { + if (hwAsic->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_TAJO || + hwAsic->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_CHENAB) { kbps = (round(pps / 60) * 60) * (kAveragePacketSize + kCpuPacketOverheadBytes) * 8 / 1000; } else { diff --git a/fboss/agent/test/utils/InvariantTestUtils.cpp b/fboss/agent/test/utils/InvariantTestUtils.cpp index 7ce1be3546483..9d4820bb07cae 100644 --- a/fboss/agent/test/utils/InvariantTestUtils.cpp +++ b/fboss/agent/test/utils/InvariantTestUtils.cpp @@ -39,6 +39,7 @@ void verifySafeDiagCmds(TestEnsembleIf* ensemble) { case cfg::AsicType::ASIC_TYPE_EBRO: case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: case cfg::AsicType::ASIC_TYPE_JERICHO2: From 24205e64bdd56a8bc996a8e25a3078a90d6ee8eb Mon Sep 17 00:00:00 2001 From: Alex Hornby Date: Fri, 18 Oct 2024 03:30:23 -0700 Subject: [PATCH 199/479] getdeps: fix xxhash build on windows Summary: X-link: https://github.com/facebookincubator/zstrong/pull/1015 fbthrift needs xxhash but xxhash manifest had no builder defined on windows Add xxhash windows build support using cmake X-link: https://github.com/facebook/fbthrift/pull/624 Reviewed By: andreacampi Differential Revision: D64592635 Pulled By: ahornby fbshipit-source-id: 5dc558e8786fa1264ba0e89026ca750d1a285dea --- build/fbcode_builder/manifests/xxhash | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/fbcode_builder/manifests/xxhash b/build/fbcode_builder/manifests/xxhash index 557ded0ddd5e9..b06002f667e17 100644 --- a/build/fbcode_builder/manifests/xxhash +++ b/build/fbcode_builder/manifests/xxhash @@ -25,3 +25,6 @@ all [make.install_args] install +[build.os=windows] +builder = cmake +subdir = xxHash-0.8.2/cmake_unofficial From b950876ae40b31de78adc32a58a34113294e1db0 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Fri, 18 Oct 2024 09:33:43 -0700 Subject: [PATCH 200/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/3d0ddccf2b2fe311bc2c9873b831ea96832ab927 https://github.com/facebook/fb303/commit/80e3fb11397d3c04126250a8c5b0bcad48100303 https://github.com/facebook/fbthrift/commit/a81fe64b93329093639ff15a0eace7cb85fcba73 https://github.com/facebook/folly/commit/74e857c3773d3b125836fe78133a131db2f66fed https://github.com/facebook/mvfst/commit/48fb2aac88d867fa206b4a287ca1f77e6e9b6e66 https://github.com/facebook/proxygen/commit/4d1bbb0be7c9df99fa2dd0e6a1dd6b65815d1205 https://github.com/facebook/wangle/commit/d07f8672dcbc2cc7c76e9e414299c82a6a5dfdf2 https://github.com/facebookexperimental/edencommon/commit/c934d8994a62dcf55e209851d83cbb611d8501e8 https://github.com/facebookexperimental/rust-shed/commit/1630d1f59c72d0d5c2334bdaab4b6eea072a140b https://github.com/facebookincubator/fizz/commit/56482fd17b4f9a25cd1f2254ff4df1804aea879c Reviewed By: zpao fbshipit-source-id: 1dd4a025bd826edc2f1b6367d5a595239d94ebf5 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 86852d10a7060..48739bff481b7 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 132a667f3705e4accf9843ebb3a625cfd304f915 +Subproject commit 80e3fb11397d3c04126250a8c5b0bcad48100303 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 0bae81d110fcf..5fcea5a64258d 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 97518207214e89d6db73da63837f4e1dc2b57acf +Subproject commit a81fe64b93329093639ff15a0eace7cb85fcba73 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 1c314a7909c2f..92e44fd357d53 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit ab576d641d9ae77662e6e54a5db7fbe6d215fa6d +Subproject commit 74e857c3773d3b125836fe78133a131db2f66fed diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 6c13ab940e45b..0aa91b3f05e8d 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit dd5f918c13d1f4c89519cc76edec50e39c0fdc2b +Subproject commit d07f8672dcbc2cc7c76e9e414299c82a6a5dfdf2 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index b6d36d9f621b8..a2c4d6e5378dd 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit dc3b522ec9eabcd37f690c7939125b32309b4242 +Subproject commit 56482fd17b4f9a25cd1f2254ff4df1804aea879c From d7e38c4eac80fb90c5a8e05f9b8234d5a676e423 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Fri, 18 Oct 2024 12:36:36 -0700 Subject: [PATCH 201/479] add PORT_MTU_ERROR_TRAP production feature in fbcode Summary: as titled, sync from D64568874 Reviewed By: srikrishnagopu Differential Revision: D64599453 Privacy Context Container: L1125642 fbshipit-source-id: be2e182123ff42b581fca4030f34f61700137932 --- fboss/agent/test/production_features.thrift | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/agent/test/production_features.thrift b/fboss/agent/test/production_features.thrift index 05885a19a636a..1e8a1a68e27e0 100644 --- a/fboss/agent/test/production_features.thrift +++ b/fboss/agent/test/production_features.thrift @@ -55,6 +55,7 @@ enum ProductionFeature { PFC = 42, UDF_WR_IMMEDIATE_ACL = 43, VLAN = 44, + PORT_MTU_ERROR_TRAP = 45, # production feature which is present on all platforms, keep it at the end HW_SWITCH = 65536, } From a88b16fb5749300dce2a5bb1cd550afdd8819c0a Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Fri, 18 Oct 2024 12:42:23 -0700 Subject: [PATCH 202/479] Introduce ConnectionOptions Summary: We've collected a bit of of tech debt at low level thrift client. I'm trying to rework this to make it a bit easier to deal with. Mainly want to make it easier to pass new options down to this layer, since we need to make some of these timeouts tunable. Also want to make this stuff better unit testable Starting with formalizing a ConnectionOptions class. This will include everything we need to get a socket up. This will replace ServerOptions, which is not really well named Differential Revision: D64264977 fbshipit-source-id: 04719888fe4a6a8ff234ee334bbc892b52d336c7 --- cmake/LibThriftServiceClient.cmake | 1 + fboss/lib/thrift_service_client/BUCK | 5 + .../ConnectionOptions.cpp | 34 +++++ .../thrift_service_client/ConnectionOptions.h | 129 ++++++++++++++++++ fboss/lib/thrift_service_client/tests/BUCK | 12 ++ .../tests/ConnectionOptionsTests.cpp | 24 ++++ 6 files changed, 205 insertions(+) create mode 100644 fboss/lib/thrift_service_client/ConnectionOptions.cpp create mode 100644 fboss/lib/thrift_service_client/ConnectionOptions.h create mode 100644 fboss/lib/thrift_service_client/tests/BUCK create mode 100644 fboss/lib/thrift_service_client/tests/ConnectionOptionsTests.cpp diff --git a/cmake/LibThriftServiceClient.cmake b/cmake/LibThriftServiceClient.cmake index 4e8c4a6849246..9181ed7aff113 100644 --- a/cmake/LibThriftServiceClient.cmake +++ b/cmake/LibThriftServiceClient.cmake @@ -5,6 +5,7 @@ add_library(thrift_service_client fboss/lib/thrift_service_client/ThriftServiceClient.cpp + fboss/lib/thrift_service_client/ConnectionOptions.cpp fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp ) diff --git a/fboss/lib/thrift_service_client/BUCK b/fboss/lib/thrift_service_client/BUCK index 5611ee37d0db9..016a5c5f44689 100644 --- a/fboss/lib/thrift_service_client/BUCK +++ b/fboss/lib/thrift_service_client/BUCK @@ -5,10 +5,12 @@ oncall("fboss_agent_push") cpp_library( name = "thrift-service-client", srcs = [ + "ConnectionOptions.cpp", "ThriftServiceClient.cpp", "facebook/ThriftServiceClient.cpp", ], headers = [ + "ConnectionOptions.h", "ThriftServiceClient.h", ], exported_deps = [ @@ -17,10 +19,13 @@ cpp_library( "//common/services/cpp:tls_constants", "//configerator/structs/infrasec/if:acl-cpp2-types", "//fboss/agent/if:ctrl-cpp2-clients", + "//fboss/fsdb/common:flags", "//fboss/fsdb/if:fsdb-cpp2-services", "//fboss/qsfp_service/if:qsfp-cpp2-clients", "//folly:network_address", + "//folly/io:socket_option_map", "//folly/io/async:async_base", + "//folly/io/async:async_socket_transport", "//folly/io/async:async_ssl_socket", "//folly/io/async:ssl_context", "//infrasec/authorization:base_identity_util", diff --git a/fboss/lib/thrift_service_client/ConnectionOptions.cpp b/fboss/lib/thrift_service_client/ConnectionOptions.cpp new file mode 100644 index 0000000000000..d2f129004e27e --- /dev/null +++ b/fboss/lib/thrift_service_client/ConnectionOptions.cpp @@ -0,0 +1,34 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" +#include "fboss/agent/if/gen-cpp2/ctrl_clients.h" +#include "fboss/fsdb/common/Flags.h" +#include "fboss/fsdb/if/gen-cpp2/FsdbService.h" +#include "fboss/qsfp_service/if/gen-cpp2/qsfp_clients.h" + +namespace facebook::fboss::utils { + +template <> +ConnectionOptions ConnectionOptions::defaultOptions( + std::optional dstAddr) { + return ConnectionOptions(std::move(dstAddr).value_or( + folly::SocketAddress("::1", FLAGS_wedge_agent_port))); +} + +template <> +ConnectionOptions +ConnectionOptions::defaultOptions( + std::optional dstAddr) { + return ConnectionOptions(std::move(dstAddr).value_or( + folly::SocketAddress("::1", FLAGS_qsfp_service_port))); +} + +template <> +ConnectionOptions +ConnectionOptions::defaultOptions( + std::optional dstAddr) { + return ConnectionOptions( + std::move(dstAddr).value_or(folly::SocketAddress("::1", FLAGS_fsdbPort))); +} + +} // namespace facebook::fboss::utils diff --git a/fboss/lib/thrift_service_client/ConnectionOptions.h b/fboss/lib/thrift_service_client/ConnectionOptions.h new file mode 100644 index 0000000000000..cad989206f5e1 --- /dev/null +++ b/fboss/lib/thrift_service_client/ConnectionOptions.h @@ -0,0 +1,129 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#pragma once + +#include +#include +#include +#include +#include + +DECLARE_string(wedge_agent_host); +DECLARE_int32(wedge_agent_port); +DECLARE_string(qsfp_service_host); +DECLARE_int32(qsfp_service_port); +DECLARE_int32(bgp_service_port); + +namespace facebook::fboss::utils { + +class ConnectionOptions { + public: + explicit ConnectionOptions(folly::SocketAddress dstAddr) + : dstAddr_(std::move(dstAddr)) {} + ConnectionOptions(std::string dstIp, uint16_t dstPort) + : ConnectionOptions(folly::SocketAddress(std::move(dstIp), dstPort)) {} + ConnectionOptions(folly::IPAddress dstIp, uint16_t dstPort) + : ConnectionOptions(folly::SocketAddress(std::move(dstIp), dstPort)) {} + + enum class TrafficClass : uint8_t { NORMAL, NC }; + + folly::SocketAddress getDstAddr() const { + return dstAddr_; + } + + ConnectionOptions& setConnectionTimeout(std::chrono::milliseconds timeout) { + connTimeoutMs_ = timeout; + return *this; + } + + uint32_t getConnTimeoutMs() const { + return connTimeoutMs_.count(); + } + + ConnectionOptions& setSendTimeout(std::chrono::milliseconds timeout) { + sendTimeoutMs_ = timeout; + return *this; + } + + uint32_t getSendTimeoutMs() const { + return sendTimeoutMs_.count(); + } + + ConnectionOptions& setRecvTimeout(std::chrono::milliseconds timeout) { + recvTimeoutMs_ = timeout; + return *this; + } + + uint32_t getRecvTimeoutMs() const { + return recvTimeoutMs_.count(); + } + + ConnectionOptions& setSrcAddr(std::string srcIp, uint16_t srcPort = 0) { + srcAddr_ = folly::SocketAddress(std::move(srcIp), srcPort); + return *this; + } + + folly::SocketAddress getSrcAddr() const { + return srcAddr_ ? *srcAddr_ : folly::AsyncSocketTransport::anyAddress(); + } + + ConnectionOptions& setTrafficClass(TrafficClass tc) { + tc_ = tc; + return *this; + } + + ConnectionOptions& setHostname(std::string hostname) { + hostname_ = std::move(hostname); + return *this; + } + + std::string getHostname() const { + return hostname_.value_or(dstAddr_.getAddressStr()); + } + + ConnectionOptions& setPreferEncrypted(bool preferEncrypted) { + preferEncrypted_ = preferEncrypted; + return *this; + } + + bool getPreferEncrypted() const { + return preferEncrypted_; + } + + folly::SocketOptionMap getSocketOptionMap() const { + folly::SocketOptionMap sockOptsMap; + if (auto tos = getTos()) { + sockOptsMap.insert( + {folly::SocketOptionKey{IPPROTO_IPV6, IPV6_TCLASS}, *tos}); + } + return sockOptsMap; + } + + std::optional getTos() const { + if (tc_ == TrafficClass::NC) { + return kTosForClassOfServiceNC; + } + return std::nullopt; + } + + template + static ConnectionOptions defaultOptions( + std::optional dstAddr = std::nullopt); + + private: + static constexpr uint8_t kTosForClassOfServiceNC = 48 << 2; + static constexpr uint32_t kConnTimeout = 1000; + static constexpr uint32_t kSendTimeout = 5000; + static constexpr uint32_t kRecvTimeout = 45000; + + folly::SocketAddress dstAddr_; + std::chrono::milliseconds connTimeoutMs_{kConnTimeout}; + std::chrono::milliseconds sendTimeoutMs_{kSendTimeout}; + std::chrono::milliseconds recvTimeoutMs_{kRecvTimeout}; + std::optional srcAddr_; + std::optional tc_; + std::optional hostname_; + bool preferEncrypted_ = true; +}; + +} // namespace facebook::fboss::utils diff --git a/fboss/lib/thrift_service_client/tests/BUCK b/fboss/lib/thrift_service_client/tests/BUCK new file mode 100644 index 0000000000000..c59b13e1d97eb --- /dev/null +++ b/fboss/lib/thrift_service_client/tests/BUCK @@ -0,0 +1,12 @@ +load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") + +oncall("fboss_agent_push") + +cpp_unittest( + name = "connection_options_test", + srcs = ["ConnectionOptionsTests.cpp"], + deps = [ + "//fboss/fsdb/if:fsdb-cpp2-clients", + "//fboss/lib/thrift_service_client:thrift-service-client", + ], +) diff --git a/fboss/lib/thrift_service_client/tests/ConnectionOptionsTests.cpp b/fboss/lib/thrift_service_client/tests/ConnectionOptionsTests.cpp new file mode 100644 index 0000000000000..6c86891104a45 --- /dev/null +++ b/fboss/lib/thrift_service_client/tests/ConnectionOptionsTests.cpp @@ -0,0 +1,24 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/fsdb/if/gen-cpp2/fsdb_clients.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" + +#include + +namespace facebook::fboss::utils::test { + +TEST(ConnectionOptionsTests, defaultOptions) { + auto options = + ConnectionOptions::defaultOptions(); + EXPECT_EQ(options.getDstAddr().getAddressStr(), "::1"); + EXPECT_EQ(options.getDstAddr().getPort(), 5908); +} + +TEST(ConnectionOptionsTests, tos) { + auto options = + ConnectionOptions::defaultOptions() + .setTrafficClass(ConnectionOptions::TrafficClass::NC); + EXPECT_EQ(options.getTos(), 48 << 2); +} + +} // namespace facebook::fboss::utils::test From 66a2387075b738acaec7f36eeb57423ae1c87443 Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Fri, 18 Oct 2024 12:42:23 -0700 Subject: [PATCH 203/479] Add variations of client builders for ConnectionOptions Summary: Adding new versions of thrift client builders that take ConnectionOptions. These are wrapping the current functions, will migrate all callers and remove the old helpers in this stack Differential Revision: D64264974 fbshipit-source-id: b655d7a138d24c1d289594c5a0f4e79b0ae58cff --- .../thrift_service_client/ConnectionOptions.h | 5 +++++ .../ThriftServiceClient.h | 14 +++++++++++++ .../oss/ThriftServiceClient.cpp | 21 +++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/fboss/lib/thrift_service_client/ConnectionOptions.h b/fboss/lib/thrift_service_client/ConnectionOptions.h index cad989206f5e1..dd78cd9ba259f 100644 --- a/fboss/lib/thrift_service_client/ConnectionOptions.h +++ b/fboss/lib/thrift_service_client/ConnectionOptions.h @@ -63,6 +63,11 @@ class ConnectionOptions { return *this; } + ConnectionOptions& setSrcAddr(std::optional srcAddr) { + srcAddr_ = std::move(srcAddr); + return *this; + } + folly::SocketAddress getSrcAddr() const { return srcAddr_ ? *srcAddr_ : folly::AsyncSocketTransport::anyAddress(); } diff --git a/fboss/lib/thrift_service_client/ThriftServiceClient.h b/fboss/lib/thrift_service_client/ThriftServiceClient.h index 2cdf336515f72..bd0c7ab836764 100644 --- a/fboss/lib/thrift_service_client/ThriftServiceClient.h +++ b/fboss/lib/thrift_service_client/ThriftServiceClient.h @@ -10,6 +10,7 @@ #pragma once #include "fboss/agent/if/gen-cpp2/ctrl_clients.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include "fboss/qsfp_service/if/gen-cpp2/qsfp_clients.h" #include @@ -64,6 +65,14 @@ std::unique_ptr> createPlaintextClient( return std::make_unique>(std::move(channel)); } +template +std::unique_ptr> createPlaintextClient( + const ConnectionOptions& options, + folly::EventBase* eb = nullptr) { + return createPlaintextClient( + options.getDstAddr(), options.getSrcAddr(), eb, options.getTos()); +} + // Prefers encrypted client, creates plaintext client if certs are unavailble template std::unique_ptr> tryCreateEncryptedClient( @@ -72,6 +81,11 @@ std::unique_ptr> tryCreateEncryptedClient( folly::EventBase* eb = nullptr, std::optional tos = std::nullopt); +template +std::unique_ptr> tryCreateEncryptedClient( + const ConnectionOptions& options, + folly::EventBase* eb = nullptr); + std::unique_ptr> createWedgeAgentClient( const std::optional& dstAddr = std::nullopt, diff --git a/fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp b/fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp index d414ee9b6c233..487141aa09e35 100644 --- a/fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp +++ b/fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp @@ -23,6 +23,13 @@ std::unique_ptr> tryCreateEncryptedClient( return createPlaintextClient(dstAddr, srcAddr, eb); } +template +std::unique_ptr> tryCreateEncryptedClient( + const ConnectionOptions& options, + folly::EventBase* eb) { + return createPlaintextClient(std::move(options), eb); +} + template std::unique_ptr> tryCreateEncryptedClient( const folly::SocketAddress& dstAddr, @@ -42,4 +49,18 @@ tryCreateEncryptedClient( const std::optional& srcAddr, folly::EventBase* eb, std::optional tos); + +template std::unique_ptr> +tryCreateEncryptedClient( + const ConnectionOptions& options, + folly::EventBase* eb); +template std::unique_ptr> +tryCreateEncryptedClient( + const ConnectionOptions& options, + folly::EventBase* eb); +template std::unique_ptr< + apache::thrift::Client> +tryCreateEncryptedClient( + const ConnectionOptions& options, + folly::EventBase* eb); } // namespace facebook::fboss::utils From ad4d451e868f6421c795c61598396fa2409da479 Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Fri, 18 Oct 2024 12:42:23 -0700 Subject: [PATCH 204/479] Migrate agent/qsfp helpers to ConnectionOptions Summary: Move over these helpers to use ConnectionOptions Differential Revision: D64264976 Privacy Context Container: L1125642 fbshipit-source-id: 41ff5296ea61ef22a78834ddd9765ea2838cde74 --- .../lib/thrift_service_client/ThriftServiceClient.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/fboss/lib/thrift_service_client/ThriftServiceClient.cpp b/fboss/lib/thrift_service_client/ThriftServiceClient.cpp index 0a00c9374055f..72071276fa0ed 100644 --- a/fboss/lib/thrift_service_client/ThriftServiceClient.cpp +++ b/fboss/lib/thrift_service_client/ThriftServiceClient.cpp @@ -23,10 +23,7 @@ createWedgeAgentClient( const std::optional& dstAddr, folly::EventBase* eb) { return tryCreateEncryptedClient( - dstAddr ? *dstAddr - : folly::SocketAddress( - FLAGS_wedge_agent_host, FLAGS_wedge_agent_port), - std::nullopt /* srcAddr */, + ConnectionOptions::defaultOptions(dstAddr), eb); } @@ -35,10 +32,7 @@ createQsfpServiceClient( const std::optional& dstAddr, folly::EventBase* eb) { return tryCreateEncryptedClient( - dstAddr ? *dstAddr - : folly::SocketAddress( - FLAGS_qsfp_service_host, FLAGS_qsfp_service_port), - std::nullopt /* srcAddr */, + ConnectionOptions::defaultOptions(dstAddr), eb); } } // namespace facebook::fboss::utils From 5c3645f08a1bd599fa090ba2e99cff39346500d9 Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Fri, 18 Oct 2024 12:42:23 -0700 Subject: [PATCH 205/479] Migrate build info service caller Summary: Migrating over this FbossBuildInfoService caller to ConnectionOptions Reviewed By: jasmeetbagga Differential Revision: D64264978 Privacy Context Container: L1125642 fbshipit-source-id: c6dd2ee4cf4d213dc82882dee5bb9287541032f5 --- fboss/lib/thrift_service_client/BUCK | 2 ++ .../ThriftServiceClient.h | 28 ++++++++++++------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/fboss/lib/thrift_service_client/BUCK b/fboss/lib/thrift_service_client/BUCK index 016a5c5f44689..3f7fc2ba88dde 100644 --- a/fboss/lib/thrift_service_client/BUCK +++ b/fboss/lib/thrift_service_client/BUCK @@ -7,6 +7,7 @@ cpp_library( srcs = [ "ConnectionOptions.cpp", "ThriftServiceClient.cpp", + "facebook/ConnectionOptions.cpp", "facebook/ThriftServiceClient.cpp", ], headers = [ @@ -29,6 +30,7 @@ cpp_library( "//folly/io/async:async_ssl_socket", "//folly/io/async:ssl_context", "//infrasec/authorization:base_identity_util", + "//neteng/fboss/tools/build_info/server/if:fboss_build_info_if-cpp2-services", "//security/ca/lib:cert_path_picker", "//thrift/lib/cpp2/async:header_client_channel", "//thrift/lib/cpp2/async:rocket_client_channel", diff --git a/fboss/lib/thrift_service_client/ThriftServiceClient.h b/fboss/lib/thrift_service_client/ThriftServiceClient.h index bd0c7ab836764..aaef2516c5d0b 100644 --- a/fboss/lib/thrift_service_client/ThriftServiceClient.h +++ b/fboss/lib/thrift_service_client/ThriftServiceClient.h @@ -42,8 +42,8 @@ inline folly::SocketOptionMap getSocketOptionMap( } } -template -std::unique_ptr> createPlaintextClient( +template +std::unique_ptr> createPlaintextClient( const folly::SocketAddress& dstAddr, const std::optional& srcAddr = std::nullopt, folly::EventBase* eb = nullptr, @@ -62,27 +62,35 @@ std::unique_ptr> createPlaintextClient( auto channel = apache::thrift::RocketClientChannel::newChannel(std::move(socket)); channel->setTimeout(kRecvTimeout); - return std::make_unique>(std::move(channel)); + return std::make_unique>(std::move(channel)); } -template -std::unique_ptr> createPlaintextClient( +template +std::unique_ptr> createPlaintextClient( const ConnectionOptions& options, folly::EventBase* eb = nullptr) { - return createPlaintextClient( + return createPlaintextClient( options.getDstAddr(), options.getSrcAddr(), eb, options.getTos()); } +// client with default dst and options +template +std::unique_ptr> createPlaintextClient( + folly::EventBase* eb = nullptr) { + return createPlaintextClient( + ConnectionOptions::defaultOptions(), eb); +} + // Prefers encrypted client, creates plaintext client if certs are unavailble -template -std::unique_ptr> tryCreateEncryptedClient( +template +std::unique_ptr> tryCreateEncryptedClient( const folly::SocketAddress& dstAddr, const std::optional& srcAddr = std::nullopt, folly::EventBase* eb = nullptr, std::optional tos = std::nullopt); -template -std::unique_ptr> tryCreateEncryptedClient( +template +std::unique_ptr> tryCreateEncryptedClient( const ConnectionOptions& options, folly::EventBase* eb = nullptr); From 28e25e8157f77d4da9b27e349c878d93e59db61e Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Fri, 18 Oct 2024 12:42:23 -0700 Subject: [PATCH 206/479] migrate fsdb clients to ConnectionOptions Summary: Move over all FSDB usages to ConnectionOptions. Also got rid of Client.h and consolidated helper in ThriftServiceClient Differential Revision: D64264975 fbshipit-source-id: c4eeaabbad5d8a826d928fa516b3d049cf113043 --- cmake/fsdb/FsdbClient.cmake | 12 +------ fboss/fsdb/client/BUCK | 19 ++--------- fboss/fsdb/client/Client.cpp | 28 ---------------- fboss/fsdb/client/Client.h | 24 -------------- fboss/fsdb/client/FsdbDeltaPublisher.cpp | 2 -- fboss/fsdb/client/FsdbPatchPublisher.cpp | 1 - fboss/fsdb/client/FsdbStatePublisher.cpp | 2 -- fboss/fsdb/client/FsdbStreamClient.cpp | 33 +++++++------------ fboss/fsdb/client/FsdbStreamClient.h | 12 ++++--- fboss/fsdb/tests/client/BUCK | 3 +- fboss/fsdb/tests/client/FsdbPublisherTest.cpp | 10 ++---- fboss/fsdb/tests/client/FsdbTestClients.cpp | 1 - fboss/fsdb/tests/server/BUCK | 2 +- .../fsdb/tests/server/ServiceHandlerTest.cpp | 10 ++---- .../thrift_service_client/ConnectionOptions.h | 4 ++- .../ThriftServiceClient.cpp | 9 +++++ .../ThriftServiceClient.h | 7 ++++ 17 files changed, 48 insertions(+), 131 deletions(-) delete mode 100644 fboss/fsdb/client/Client.cpp delete mode 100644 fboss/fsdb/client/Client.h diff --git a/cmake/fsdb/FsdbClient.cmake b/cmake/fsdb/FsdbClient.cmake index 8acefababfceb..d394906014b42 100644 --- a/cmake/fsdb/FsdbClient.cmake +++ b/cmake/fsdb/FsdbClient.cmake @@ -8,16 +8,6 @@ include_directories( ${GTEST_INCLUDE_DIRS} ) -add_library(fsdb_client - fboss/fsdb/client/Client.cpp -) - -target_link_libraries(fsdb_client - fsdb_cpp2 - Folly::folly - thrift_service_client -) - add_library(fsdb_stream_client fboss/fsdb/client/FsdbStreamClient.cpp ) @@ -29,7 +19,7 @@ set(fsdb_stream_client_libs common_thrift_utils fsdb_oper_cpp2 fsdb_cpp2 - fsdb_client + thrift_service_client ) target_link_libraries(fsdb_stream_client ${fsdb_stream_client_libs}) diff --git a/fboss/fsdb/client/BUCK b/fboss/fsdb/client/BUCK index 0d58346776c7e..565ae0d8c8c0c 100644 --- a/fboss/fsdb/client/BUCK +++ b/fboss/fsdb/client/BUCK @@ -9,12 +9,13 @@ cpp_library( ], exported_deps = [ "fbsource//third-party/googletest:gtest_headers", - ":client", "//common/time:time", "//fb303:thread_cached_service_data", "//fboss/fsdb/common:utils", + "//fboss/fsdb/if:fsdb-cpp2-services", "//fboss/fsdb/if:fsdb_oper-cpp2-types", "//fboss/lib:common_thrift_utils", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly:network_address", "//folly/coro:async_scope", "//folly/io/async:async_socket_transport", @@ -50,7 +51,6 @@ cpp_library( ], exported_deps = [ "fbsource//third-party/googletest:gtest_headers", - ":client", ":fsdb_stream_client", "//fboss/fsdb/common:flags", "//fboss/fsdb/common:utils", @@ -88,21 +88,6 @@ cpp_library( ], ) -cpp_library( - name = "client", - srcs = [ - "Client.cpp", - ], - exported_deps = [ - "//fboss/fsdb/if:fsdb-cpp2-services", - "//fboss/lib/thrift_service_client:thrift-service-client", - "//folly:network_address", - "//folly/io/async:async_base", - "//folly/io/async:async_socket", - "//folly/logging:logging", - ], -) - # templated FsdbSubManager. Users should use one of the instantiations below cpp_library( name = "fsdb_sub_manager", diff --git a/fboss/fsdb/client/Client.cpp b/fboss/fsdb/client/Client.cpp deleted file mode 100644 index e1bd4f1575bc6..0000000000000 --- a/fboss/fsdb/client/Client.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - -#include "fboss/fsdb/client/Client.h" - -#include - -#include -#include -#include -#include "fboss/lib/thrift_service_client/ThriftServiceClient.h" - -DEFINE_bool(plaintext_fsdb_client, false, "Use plaintext FSDB clients"); - -namespace facebook::fboss::fsdb { -std::unique_ptr> Client::getClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr, - std::optional tos, - const bool plaintextClient, - folly::EventBase* eb) { - CHECK(eb->isInEventBaseThread()); - bool usePlaintextClient = plaintextClient || dstAddr.isLoopbackAddress() || - FLAGS_plaintext_fsdb_client; - return usePlaintextClient - ? utils::createPlaintextClient(dstAddr, srcAddr, eb, tos) - : utils::tryCreateEncryptedClient(dstAddr, srcAddr, eb, tos); -} -} // namespace facebook::fboss::fsdb diff --git a/fboss/fsdb/client/Client.h b/fboss/fsdb/client/Client.h deleted file mode 100644 index efe3d1e388882..0000000000000 --- a/fboss/fsdb/client/Client.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - -#pragma once - -#include -#include "fboss/fsdb/if/gen-cpp2/FsdbService.h" - -namespace folly { -class EventBase; -} - -namespace facebook::fboss::fsdb { - -class Client { - public: - static std::unique_ptr> getClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr, - std::optional tos, - const bool plaintextClient, - folly::EventBase* eb); -}; - -} // namespace facebook::fboss::fsdb diff --git a/fboss/fsdb/client/FsdbDeltaPublisher.cpp b/fboss/fsdb/client/FsdbDeltaPublisher.cpp index 9355eac5dae81..c0d9dfad999fe 100644 --- a/fboss/fsdb/client/FsdbDeltaPublisher.cpp +++ b/fboss/fsdb/client/FsdbDeltaPublisher.cpp @@ -4,8 +4,6 @@ #include -#include "fboss/fsdb/client/Client.h" - namespace facebook::fboss::fsdb { folly::coro::Task diff --git a/fboss/fsdb/client/FsdbPatchPublisher.cpp b/fboss/fsdb/client/FsdbPatchPublisher.cpp index c40a0c593bbe1..8dff97e66f077 100644 --- a/fboss/fsdb/client/FsdbPatchPublisher.cpp +++ b/fboss/fsdb/client/FsdbPatchPublisher.cpp @@ -1,7 +1,6 @@ // (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. #include "fboss/fsdb/client/FsdbPatchPublisher.h" -#include "fboss/fsdb/client/Client.h" #include #include diff --git a/fboss/fsdb/client/FsdbStatePublisher.cpp b/fboss/fsdb/client/FsdbStatePublisher.cpp index f7134ff1c2860..80e5d98624a6d 100644 --- a/fboss/fsdb/client/FsdbStatePublisher.cpp +++ b/fboss/fsdb/client/FsdbStatePublisher.cpp @@ -4,8 +4,6 @@ #include -#include "fboss/fsdb/client/Client.h" - namespace facebook::fboss::fsdb { folly::coro::Task diff --git a/fboss/fsdb/client/FsdbStreamClient.cpp b/fboss/fsdb/client/FsdbStreamClient.cpp index 2f01e7b28ef4c..9a644d8d95b19 100644 --- a/fboss/fsdb/client/FsdbStreamClient.cpp +++ b/fboss/fsdb/client/FsdbStreamClient.cpp @@ -2,7 +2,7 @@ #include "fboss/fsdb/client/FsdbStreamClient.h" #include "common/time/Time.h" -#include "fboss/fsdb/client/Client.h" +#include "fboss/lib/thrift_service_client/ThriftServiceClient.h" #include #include @@ -141,27 +141,17 @@ folly::coro::Task FsdbStreamClient::serviceLoopWrapper() { } #endif -// Set DSCP to 48 (Network Control) -// 8-bit TOS = 6-bit DSCP followed by 2-bit ECN -const uint8_t kTosForClassOfServiceNC = 48 << 2; - void FsdbStreamClient::resetClient() { CHECK(streamEvb_->getEventBase()->isInEventBaseThread()); client_.reset(); } -std::optional getTosForClientPriority( +utils::ConnectionOptions::TrafficClass getTosForClientPriority( const std::optional priority) { - if (priority.has_value()) { - switch (*priority) { - case FsdbStreamClient::Priority::CRITICAL: - return kTosForClassOfServiceNC; - case FsdbStreamClient::Priority::NORMAL: - // no TC marking by default - return std::nullopt; - } + if (priority == FsdbStreamClient::Priority::CRITICAL) { + return utils::ConnectionOptions::TrafficClass::NC; } - return std::nullopt; + return utils::ConnectionOptions::TrafficClass::DEFAULT; } bool shouldUseEncryptedClient(const FsdbStreamClient::ServerOptions& options) { @@ -175,13 +165,12 @@ void FsdbStreamClient::createClient(const ServerOptions& options) { auto tos = getTosForClientPriority(options.priority); bool encryptedClient = shouldUseEncryptedClient(options); - - client_ = Client::getClient( - options.dstAddr /* dstAddr */, - options.srcAddr /* srcAddr */, - tos, - !encryptedClient, - streamEvb_->getEventBase()); + client_ = createFsdbClient( + utils::ConnectionOptions(options.dstAddr) + .setSrcAddr(options.srcAddr) + .setTrafficClass(tos) + .setPreferEncrypted(encryptedClient), + streamEvb_); } } // namespace facebook::fboss::fsdb diff --git a/fboss/fsdb/client/FsdbStreamClient.h b/fboss/fsdb/client/FsdbStreamClient.h index b397136ebef91..e33edd73e2bad 100644 --- a/fboss/fsdb/client/FsdbStreamClient.h +++ b/fboss/fsdb/client/FsdbStreamClient.h @@ -2,6 +2,11 @@ #pragma once +#include "fboss/fsdb/common/Utils.h" +#include "fboss/fsdb/if/gen-cpp2/FsdbService.h" +#include "fboss/fsdb/if/gen-cpp2/fsdb_oper_types.h" +#include "fboss/lib/CommonThriftUtils.h" + #include #include #include @@ -12,14 +17,11 @@ #include #include #include -#include -#include -#include "fboss/fsdb/common/Utils.h" -#include "fboss/fsdb/if/gen-cpp2/fsdb_oper_types.h" -#include "fboss/lib/CommonThriftUtils.h" #include #include +#include +#include namespace folly { class CancellationToken; diff --git a/fboss/fsdb/tests/client/BUCK b/fboss/fsdb/tests/client/BUCK index 9013583bec0c1..1b2c94f599a76 100644 --- a/fboss/fsdb/tests/client/BUCK +++ b/fboss/fsdb/tests/client/BUCK @@ -13,7 +13,6 @@ cpp_library( ], exported_deps = [ "fbsource//third-party/googletest:gtest", - "//fboss/fsdb/client:client", "//fboss/fsdb/client:fsdb_pub_sub", "//fboss/fsdb/client:fsdb_stream_client", "//fboss/fsdb/if:fsdb_model", @@ -36,13 +35,13 @@ cpp_unittest( deps = [ ":fsdb_test_clients", "//fb303:service_data", - "//fboss/fsdb/client:client", "//fboss/fsdb/client:fsdb_pub_sub", "//fboss/fsdb/client:fsdb_stream_client", "//fboss/fsdb/if:fsdb_model", "//fboss/fsdb/oper:extended_path_builder", "//fboss/fsdb/tests/utils:fsdb_test_server", "//fboss/lib:common_utils", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly/coro:blocking_wait", "//folly/io/async:scoped_event_base_thread", "//folly/logging:log_level", diff --git a/fboss/fsdb/tests/client/FsdbPublisherTest.cpp b/fboss/fsdb/tests/client/FsdbPublisherTest.cpp index 39388542c0dcf..fb9dac20097ee 100644 --- a/fboss/fsdb/tests/client/FsdbPublisherTest.cpp +++ b/fboss/fsdb/tests/client/FsdbPublisherTest.cpp @@ -1,13 +1,13 @@ // (c) Facebook, Inc. and its affiliates. Confidential and proprietary. #include -#include "fboss/fsdb/client/Client.h" #include "fboss/fsdb/client/FsdbDeltaPublisher.h" #include "fboss/fsdb/client/FsdbStatePublisher.h" #include "fboss/fsdb/if/FsdbModel.h" #include "fboss/fsdb/tests/client/FsdbTestClients.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ThriftServiceClient.h" #include #include @@ -231,12 +231,8 @@ TYPED_TEST(FsdbPublisherTest, getState) { folly::ScopedEventBaseThread streamEvb; std::unique_ptr> client; streamEvb.getEventBase()->runInEventBaseThreadAndWait([&]() { - client = Client::getClient( - folly::SocketAddress( - "::1", this->fsdbTestServer_->getFsdbPort()) /* dstAddr */, - std::nullopt /* srcAddr */, - std::nullopt /* tos */, - false /* plaintextClient */, + client = utils::createFsdbClient( + utils::ConnectionOptions("::1", this->fsdbTestServer_->getFsdbPort()), streamEvb.getEventBase()); }); diff --git a/fboss/fsdb/tests/client/FsdbTestClients.cpp b/fboss/fsdb/tests/client/FsdbTestClients.cpp index 89b5f497d1e1d..1eacd35eb21ad 100644 --- a/fboss/fsdb/tests/client/FsdbTestClients.cpp +++ b/fboss/fsdb/tests/client/FsdbTestClients.cpp @@ -2,7 +2,6 @@ #include "fboss/fsdb/tests/client/FsdbTestClients.h" #include -#include "fboss/fsdb/client/Client.h" #include "fboss/fsdb/if/FsdbModel.h" #include diff --git a/fboss/fsdb/tests/server/BUCK b/fboss/fsdb/tests/server/BUCK index d8102124dfa95..3671158833089 100644 --- a/fboss/fsdb/tests/server/BUCK +++ b/fboss/fsdb/tests/server/BUCK @@ -8,8 +8,8 @@ cpp_unittest( "ServiceHandlerTest.cpp", ], deps = [ - "//fboss/fsdb/client:client", "//fboss/fsdb/tests/utils:fsdb_test_server", "//fboss/lib:common_utils", + "//fboss/lib/thrift_service_client:thrift-service-client", ], ) diff --git a/fboss/fsdb/tests/server/ServiceHandlerTest.cpp b/fboss/fsdb/tests/server/ServiceHandlerTest.cpp index 9d255e8782af1..a4dbbd24e7fac 100644 --- a/fboss/fsdb/tests/server/ServiceHandlerTest.cpp +++ b/fboss/fsdb/tests/server/ServiceHandlerTest.cpp @@ -3,9 +3,9 @@ #include #include -#include "fboss/fsdb/client/Client.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ThriftServiceClient.h" namespace facebook::fboss::fsdb::test { @@ -21,12 +21,8 @@ class ServiceHandlerTest : public ::testing::Test { std::unique_ptr> createClient( folly::EventBase* evb) { - return Client::getClient( - folly::SocketAddress("::1", getFsdbPort()), - std::nullopt, - std::nullopt, - false /* plaintextClient */, - evb); + return utils::createFsdbClient( + utils::ConnectionOptions("::1", getFsdbPort()), evb); } uint16_t getFsdbPort() const { diff --git a/fboss/lib/thrift_service_client/ConnectionOptions.h b/fboss/lib/thrift_service_client/ConnectionOptions.h index dd78cd9ba259f..f844963f790b5 100644 --- a/fboss/lib/thrift_service_client/ConnectionOptions.h +++ b/fboss/lib/thrift_service_client/ConnectionOptions.h @@ -25,7 +25,7 @@ class ConnectionOptions { ConnectionOptions(folly::IPAddress dstIp, uint16_t dstPort) : ConnectionOptions(folly::SocketAddress(std::move(dstIp), dstPort)) {} - enum class TrafficClass : uint8_t { NORMAL, NC }; + enum class TrafficClass : uint8_t { DEFAULT, NC }; folly::SocketAddress getDstAddr() const { return dstAddr_; @@ -116,6 +116,8 @@ class ConnectionOptions { std::optional dstAddr = std::nullopt); private: + // DSCP for Network Control is 48 + // 8-bit TOS = 6-bit DSCP followed by 2-bit ECN static constexpr uint8_t kTosForClassOfServiceNC = 48 << 2; static constexpr uint32_t kConnTimeout = 1000; static constexpr uint32_t kSendTimeout = 5000; diff --git a/fboss/lib/thrift_service_client/ThriftServiceClient.cpp b/fboss/lib/thrift_service_client/ThriftServiceClient.cpp index 72071276fa0ed..675f8d5bdb79d 100644 --- a/fboss/lib/thrift_service_client/ThriftServiceClient.cpp +++ b/fboss/lib/thrift_service_client/ThriftServiceClient.cpp @@ -35,4 +35,13 @@ createQsfpServiceClient( ConnectionOptions::defaultOptions(dstAddr), eb); } + +std::unique_ptr> +createFsdbClient(ConnectionOptions options, folly::EventBase* eb) { + return options.getPreferEncrypted() + ? tryCreateEncryptedClient( + options, eb) + : createPlaintextClient(options, eb); +} + } // namespace facebook::fboss::utils diff --git a/fboss/lib/thrift_service_client/ThriftServiceClient.h b/fboss/lib/thrift_service_client/ThriftServiceClient.h index aaef2516c5d0b..5f054a37b977a 100644 --- a/fboss/lib/thrift_service_client/ThriftServiceClient.h +++ b/fboss/lib/thrift_service_client/ThriftServiceClient.h @@ -10,6 +10,7 @@ #pragma once #include "fboss/agent/if/gen-cpp2/ctrl_clients.h" +#include "fboss/fsdb/if/gen-cpp2/FsdbService.h" #include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include "fboss/qsfp_service/if/gen-cpp2/qsfp_clients.h" @@ -103,4 +104,10 @@ std::unique_ptr> createQsfpServiceClient( const std::optional& dstAddr = std::nullopt, folly::EventBase* eb = nullptr); + +std::unique_ptr> +createFsdbClient( + ConnectionOptions options = + ConnectionOptions::defaultOptions(), + folly::EventBase* eb = nullptr); } // namespace facebook::fboss::utils From adb2a58e658eda8a8cbcf0673fd28e47602900a9 Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Fri, 18 Oct 2024 12:42:23 -0700 Subject: [PATCH 207/479] Remove old tryCreateEncryptedClient Summary: Removed the old version of tryCreateEncryptedClient since all usages are moved to the version with ConnectionOptions Differential Revision: D64264979 Privacy Context Container: L1125642 fbshipit-source-id: 404c88d4836a0223f68c0bd34429148dbbd2288f --- .../ThriftServiceClient.h | 12 ++++---- .../oss/ThriftServiceClient.cpp | 30 ------------------- 2 files changed, 6 insertions(+), 36 deletions(-) diff --git a/fboss/lib/thrift_service_client/ThriftServiceClient.h b/fboss/lib/thrift_service_client/ThriftServiceClient.h index 5f054a37b977a..fcb45179a0693 100644 --- a/fboss/lib/thrift_service_client/ThriftServiceClient.h +++ b/fboss/lib/thrift_service_client/ThriftServiceClient.h @@ -85,15 +85,15 @@ std::unique_ptr> createPlaintextClient( // Prefers encrypted client, creates plaintext client if certs are unavailble template std::unique_ptr> tryCreateEncryptedClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr = std::nullopt, - folly::EventBase* eb = nullptr, - std::optional tos = std::nullopt); + const ConnectionOptions& options, + folly::EventBase* eb = nullptr); template std::unique_ptr> tryCreateEncryptedClient( - const ConnectionOptions& options, - folly::EventBase* eb = nullptr); + folly::EventBase* eb = nullptr) { + return tryCreateEncryptedClient( + ConnectionOptions::defaultOptions(), eb); +} std::unique_ptr> createWedgeAgentClient( diff --git a/fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp b/fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp index 487141aa09e35..47abec06bad36 100644 --- a/fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp +++ b/fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp @@ -13,16 +13,6 @@ namespace facebook::fboss::utils { -template -std::unique_ptr> tryCreateEncryptedClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr, - folly::EventBase* eb, - std::optional tos) { - // default to plaintext in oss - return createPlaintextClient(dstAddr, srcAddr, eb); -} - template std::unique_ptr> tryCreateEncryptedClient( const ConnectionOptions& options, @@ -30,26 +20,6 @@ std::unique_ptr> tryCreateEncryptedClient( return createPlaintextClient(std::move(options), eb); } -template std::unique_ptr> -tryCreateEncryptedClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr, - folly::EventBase* eb, - std::optional tos); -template std::unique_ptr> -tryCreateEncryptedClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr, - folly::EventBase* eb, - std::optional tos); -template std::unique_ptr< - apache::thrift::Client> -tryCreateEncryptedClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr, - folly::EventBase* eb, - std::optional tos); - template std::unique_ptr> tryCreateEncryptedClient( const ConnectionOptions& options, From 65745099357256868c7c20e9934a37b977e93bf1 Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Fri, 18 Oct 2024 12:42:23 -0700 Subject: [PATCH 208/479] Remove old createPlaintTextclient Summary: same as past couple diffs, move over to new helper and use timeouts from connection options Differential Revision: D64264980 fbshipit-source-id: c2dda24c7955a7a52e0e1bc947202354caeab954 --- .../ThriftServiceClient.h | 42 ++++--------------- 1 file changed, 8 insertions(+), 34 deletions(-) diff --git a/fboss/lib/thrift_service_client/ThriftServiceClient.h b/fboss/lib/thrift_service_client/ThriftServiceClient.h index fcb45179a0693..c7c95ab9f5701 100644 --- a/fboss/lib/thrift_service_client/ThriftServiceClient.h +++ b/fboss/lib/thrift_service_client/ThriftServiceClient.h @@ -27,53 +27,27 @@ DECLARE_int32(qsfp_service_port); DECLARE_int32(bgp_service_port); namespace facebook::fboss::utils { -auto constexpr kConnTimeout = 1000; -auto constexpr kRecvTimeout = 45000; -auto constexpr kSendTimeout = 5000; - -inline folly::SocketOptionMap getSocketOptionMap( - std::optional tos = std::nullopt) { - if (tos.has_value()) { - folly::SocketOptionKey v6Opts = {IPPROTO_IPV6, IPV6_TCLASS}; - folly::SocketOptionMap sockOptsMap; - sockOptsMap.insert({v6Opts, *tos}); - return sockOptsMap; - } else { - return folly::emptySocketOptionMap; - } -} - template std::unique_ptr> createPlaintextClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr = std::nullopt, - folly::EventBase* eb = nullptr, - std::optional tos = std::nullopt) { + ConnectionOptions options, + folly::EventBase* eb = nullptr) { folly::EventBase* socketEb = eb ? eb : folly::EventBaseManager::get()->getEventBase(); auto socket = folly::AsyncSocket::UniquePtr(new folly::AsyncSocket(socketEb)); - socket->setSendTimeout(kSendTimeout); + socket->setSendTimeout(options.getSendTimeoutMs()); socket->connect( nullptr, - dstAddr, - kConnTimeout, - getSocketOptionMap(tos), - srcAddr ? *srcAddr : folly::AsyncSocketTransport::anyAddress()); + options.getDstAddr(), + options.getConnTimeoutMs(), + options.getSocketOptionMap(), + options.getSrcAddr()); auto channel = apache::thrift::RocketClientChannel::newChannel(std::move(socket)); - channel->setTimeout(kRecvTimeout); + channel->setTimeout(options.getRecvTimeoutMs()); return std::make_unique>(std::move(channel)); } -template -std::unique_ptr> createPlaintextClient( - const ConnectionOptions& options, - folly::EventBase* eb = nullptr) { - return createPlaintextClient( - options.getDstAddr(), options.getSrcAddr(), eb, options.getTos()); -} - // client with default dst and options template std::unique_ptr> createPlaintextClient( From 9c380a30e99cf2d884235abda4da9cba31b627b2 Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Fri, 18 Oct 2024 12:42:23 -0700 Subject: [PATCH 209/479] swap ServerOptions with ConnectionOptions Summary: Replace all usages for ServerOptions with ConnectionOptions. Remove ServerOptions. Unfortunately diff is pretty big because this is used everywhere... For the most part it's just renames, I'll try to annotate the few changes that were more than a find+replace Differential Revision: D64264973 Privacy Context Container: L1125642 fbshipit-source-id: 2bad46cbaec69d4d0334e21f28cbba314f2079c5 --- fboss/agent/BUCK | 2 + fboss/agent/DsfSubscription.cpp | 15 ++-- .../mnpu/SplitAgentThriftSyncerClient.cpp | 11 ++- .../agent/mnpu/SplitAgentThriftSyncerClient.h | 5 +- fboss/agent/test/DsfSubscriptionTests.cpp | 1 - fboss/fsdb/client/BUCK | 2 + fboss/fsdb/client/FsdbPubSubManager.cpp | 77 ++++++++++--------- fboss/fsdb/client/FsdbPubSubManager.h | 59 +++++++------- fboss/fsdb/client/FsdbStreamClient.cpp | 28 ++----- fboss/fsdb/client/FsdbStreamClient.h | 5 +- fboss/fsdb/client/FsdbSubManager.h | 10 +-- fboss/fsdb/client/test/BUCK | 2 + .../client/test/FsdbPubSubManagerTest.cpp | 9 ++- .../fsdb/client/test/FsdbStreamClientTest.cpp | 5 +- fboss/fsdb/client/test/FsdbSubManagerTest.cpp | 25 +++--- .../tests/client/FsdbPubSubManagerTest.cpp | 19 +++-- fboss/fsdb/tests/client/FsdbPubSubTest.cpp | 15 ++-- fboss/fsdb/tests/client/FsdbPublisherTest.cpp | 5 +- .../tests/client/FsdbStreamClientTest.cpp | 22 +++--- fboss/lib/BUCK | 1 + fboss/lib/CommonThriftUtils.cpp | 15 ++-- fboss/lib/CommonThriftUtils.h | 54 +++---------- 22 files changed, 177 insertions(+), 210 deletions(-) diff --git a/fboss/agent/BUCK b/fboss/agent/BUCK index 99f101389ae94..c69e74cf6fda1 100644 --- a/fboss/agent/BUCK +++ b/fboss/agent/BUCK @@ -802,6 +802,7 @@ cpp_library( "//fboss/lib/phy:phy-cpp2-types", "//fboss/lib/phy:prbs-cpp2-types", "//fboss/lib/platforms:product-info", + "//fboss/lib/thrift_service_client:thrift-service-client", "//fboss/thrift_cow/nodes:nodes", "//fboss/thrift_cow/nodes:serializer", "//fboss/thrift_cow/storage:cow_storage", @@ -1437,6 +1438,7 @@ cpp_library( ":packet", "//fboss/agent/state:state", "//fboss/lib:common_thrift_utils", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly:cancellation_token", "//folly:network_address", "//folly:synchronized", diff --git a/fboss/agent/DsfSubscription.cpp b/fboss/agent/DsfSubscription.cpp index 072b28b75b619..270f322ab4582 100644 --- a/fboss/agent/DsfSubscription.cpp +++ b/fboss/agent/DsfSubscription.cpp @@ -9,6 +9,7 @@ #include "fboss/agent/state/SwitchState.h" #include "fboss/fsdb/if/FsdbModel.h" #include "fboss/fsdb/if/gen-cpp2/fsdb_common_types.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include "fboss/thrift_cow/nodes/Serializer.h" #include "fboss/util/Logging.h" @@ -17,16 +18,18 @@ namespace { const thriftpath::RootThriftPath stateRoot; -fsdb::FsdbStreamClient::ServerOptions getServerOptions( +utils::ConnectionOptions getConnectionOptions( const std::string& srcIP, const std::string& dstIP) { // Subscribe to FSDB of DSF node in the cluster with: // dstIP = inband IP of that DSF node // dstPort = FSDB port // srcIP = self inband IP - // priority = CRITICAL - return fsdb::FsdbStreamClient::ServerOptions( - dstIP, FLAGS_fsdbPort, srcIP, fsdb::FsdbStreamClient::Priority::CRITICAL); + // tos = NC + return utils::ConnectionOptions(dstIP, FLAGS_fsdbPort) + .setSrcAddr(srcIP) + .setPreferEncrypted(false) + .setTrafficClass(utils::ConnectionOptions::TrafficClass::NC); } const auto& getSystemPortsPath() { @@ -80,7 +83,7 @@ DsfSubscription::DsfSubscription( subscriberEvb)), subMgr_(new FsdbAdaptedSubManager( fsdb::SubscriptionOptions(opts_), - getServerOptions(localIp.str(), remoteIp.str()), + getConnectionOptions(localIp.str(), remoteIp.str()), reconnectEvb, subscriberEvb)), validator_(std::make_unique( @@ -172,7 +175,7 @@ void DsfSubscription::setupSubscription() { [this](fsdb::OperSubPathUnit&& operStateUnit) { handleFsdbUpdate(std::move(operStateUnit)); }, - getServerOptions(localIp_.str(), remoteIp_.str())); + getConnectionOptions(localIp_.str(), remoteIp_.str())); XLOG(DBG2) << kDsfCtrlLogPrefix << "added subscription for : " << remoteEndpointStr(); } diff --git a/fboss/agent/mnpu/SplitAgentThriftSyncerClient.cpp b/fboss/agent/mnpu/SplitAgentThriftSyncerClient.cpp index 5ade3dbcfd8f8..0c8e1ce1fb972 100644 --- a/fboss/agent/mnpu/SplitAgentThriftSyncerClient.cpp +++ b/fboss/agent/mnpu/SplitAgentThriftSyncerClient.cpp @@ -8,6 +8,7 @@ * */ #include "fboss/agent/mnpu/SplitAgentThriftSyncerClient.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -42,20 +43,21 @@ SplitAgentThriftClient::SplitAgentThriftClient( streamEvbThread_(streamEvbThread), serverPort_(serverPort), switchId_(switchId) { - setServerOptions(ServerOptions("::1", serverPort_)); + setConnectionOptions(utils::ConnectionOptions("::1", serverPort_)); scheduleTimeout(); } SplitAgentThriftClient::~SplitAgentThriftClient() {} -void SplitAgentThriftClient::connectClient(const ServerOptions& options) { +void SplitAgentThriftClient::connectClient( + const utils::ConnectionOptions& options) { auto channel = apache::thrift::PooledRequestChannel::newChannel( streamEvbThread_->getEventBase(), streamEvbThread_, [options = options](folly::EventBase& evb) mutable { return apache::thrift::RocketClientChannel::newChannel( folly::AsyncSocket::UniquePtr( - new folly::AsyncSocket(&evb, options.dstAddr))); + new folly::AsyncSocket(&evb, options.getDstAddr()))); }); multiSwitchClient_.reset( @@ -63,7 +65,8 @@ void SplitAgentThriftClient::connectClient(const ServerOptions& options) { std::move(channel))); } -void SplitAgentThriftClient::connectToServer(const ServerOptions& options) { +void SplitAgentThriftClient::connectToServer( + const utils::ConnectionOptions& options) { try { connectClient(options); } catch (const std::exception& ex) { diff --git a/fboss/agent/mnpu/SplitAgentThriftSyncerClient.h b/fboss/agent/mnpu/SplitAgentThriftSyncerClient.h index 9758ea41e1258..62e52f20fa8e5 100644 --- a/fboss/agent/mnpu/SplitAgentThriftSyncerClient.h +++ b/fboss/agent/mnpu/SplitAgentThriftSyncerClient.h @@ -26,6 +26,7 @@ #include "fboss/agent/MultiSwitchThriftHandler.h" #include "fboss/lib/CommonThriftUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" namespace facebook::fboss { @@ -44,11 +45,11 @@ class SplitAgentThriftClient : public ReconnectingThriftClient { ~SplitAgentThriftClient() override; protected: - void connectClient(const ServerOptions& options); + void connectClient(const utils::ConnectionOptions& options); void resetClient() override; apache::thrift::Client* getThriftClient(); virtual void startClientService() = 0; - void connectToServer(const ServerOptions& options) override; + void connectToServer(const utils::ConnectionOptions& options) override; #if FOLLY_HAS_COROUTINES virtual folly::coro::Task serveStream() = 0; #endif diff --git a/fboss/agent/test/DsfSubscriptionTests.cpp b/fboss/agent/test/DsfSubscriptionTests.cpp index 781a9bc6e976e..b59ebf6e68d21 100644 --- a/fboss/agent/test/DsfSubscriptionTests.cpp +++ b/fboss/agent/test/DsfSubscriptionTests.cpp @@ -278,7 +278,6 @@ class DsfSubscriptionTest : public ::testing::Test { std::unique_ptr streamConnectPool_; std::unique_ptr streamServePool_; std::unique_ptr hwUpdatePool_; - std::optional serverOptions_; std::unique_ptr handle_; std::shared_ptr subscription_; SwSwitch* sw_; diff --git a/fboss/fsdb/client/BUCK b/fboss/fsdb/client/BUCK index 565ae0d8c8c0c..1a9ef097c0b63 100644 --- a/fboss/fsdb/client/BUCK +++ b/fboss/fsdb/client/BUCK @@ -57,6 +57,7 @@ cpp_library( "//fboss/fsdb/if:fsdb-cpp2-services", "//fboss/fsdb/if:fsdb_common-cpp2-types", "//fboss/fsdb/if:fsdb_oper-cpp2-types", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly:format", "//folly:string", "//folly:synchronized", @@ -98,6 +99,7 @@ cpp_library( ":fsdb_pub_sub", "//fboss/fsdb/if:fsdb_model", "//fboss/fsdb/if:fsdb_oper-cpp2-types", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly/io/async:scoped_event_base_thread", ], ) diff --git a/fboss/fsdb/client/FsdbPubSubManager.cpp b/fboss/fsdb/client/FsdbPubSubManager.cpp index 48eadae5f4b79..65f07ec76d3da 100644 --- a/fboss/fsdb/client/FsdbPubSubManager.cpp +++ b/fboss/fsdb/client/FsdbPubSubManager.cpp @@ -6,6 +6,7 @@ #include "fboss/fsdb/client/FsdbStatePublisher.h" #include "fboss/fsdb/client/FsdbStreamClient.h" #include "fboss/fsdb/common/PathHelpers.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -148,7 +149,7 @@ std::unique_ptr FsdbPubSubManager::createPublisherImpl( reconnectEvb_, publishStats, publisherStateChangeCb); - publisher->setServerOptions(FsdbStreamClient::ServerOptions("::1", fsdbPort)); + publisher->setConnectionOptions(utils::ConnectionOptions("::1", fsdbPort)); return publisher; } @@ -315,105 +316,105 @@ std::string FsdbPubSubManager::addStatDeltaSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( subscribePath, stateChangeCb, operDeltaCb, true /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } std::string FsdbPubSubManager::addStatPathSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( subscribePath, stateChangeCb, operStateCb, true /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } /* multi path subscriptions */ std::string FsdbPubSubManager::addStateDeltaSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( PathHelpers::toExtendedOperPath(subscribePaths), stateChangeCb, operDeltaCb, false /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } std::string FsdbPubSubManager::addStatPathSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( PathHelpers::toExtendedOperPath(subscribePaths), stateChangeCb, operStateCb, true /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } std::string FsdbPubSubManager::addStateDeltaSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( subscribePath, stateChangeCb, operDeltaCb, false /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } std::string FsdbPubSubManager::addStatePatchSubscription( const PatchPath& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbPatchSubscriber::FsdbOperPatchUpdateCb patchCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( subscribePath, stateChangeCb, patchCb, false /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } std::string FsdbPubSubManager::addStatePathSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( subscribePath, stateChangeCb, operStateCb, false /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } std::string FsdbPubSubManager::addStatePathSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions, + utils::ConnectionOptions&& connectionOptions, const std::optional& clientIdSuffix) { return addSubscriptionImpl( PathHelpers::toExtendedOperPath(subscribePaths), stateChangeCb, operStateCb, false /*subscribeStat*/, - std::move(serverOptions), + std::move(connectionOptions), clientIdSuffix); } @@ -422,13 +423,13 @@ std::string FsdbPubSubManager::addStatePathSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( std::move(subscriptionOptions), subscribePath, stateChangeCb, operStateCb, - std::move(serverOptions)); + std::move(connectionOptions)); } std::string FsdbPubSubManager::addStatePathSubscription( @@ -436,65 +437,65 @@ std::string FsdbPubSubManager::addStatePathSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( std::move(subscriptionOptions), PathHelpers::toExtendedOperPath(subscribePaths), stateChangeCb, operStateCb, - std::move(serverOptions)); + std::move(connectionOptions)); } std::string FsdbPubSubManager::addStateExtPathSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( subscribePaths, stateChangeCb, operStateCb, false /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } std::string FsdbPubSubManager::addStatExtPathSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( subscribePaths, stateChangeCb, operStateCb, true /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } std::string FsdbPubSubManager::addStateExtDeltaSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( subscribePaths, stateChangeCb, operDeltaCb, false /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } std::string FsdbPubSubManager::addStatExtDeltaSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { return addSubscriptionImpl( subscribePaths, stateChangeCb, operDeltaCb, true /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } template @@ -503,12 +504,12 @@ std::string FsdbPubSubManager::addSubscriptionImpl( SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, bool subscribeStats, - FsdbStreamClient::ServerOptions&& serverOptions, + utils::ConnectionOptions&& connectionOptions, const std::optional& clientIdSuffix) { auto subscribeType = SubscriberT::subscriptionType(); XCHECK(subscribeType != SubscriptionType::UNKNOWN) << "Unknown data type"; auto subsStr = toSubscriptionStr( - serverOptions.dstAddr.getAddressStr(), + connectionOptions.getDstAddr().getAddressStr(), subscribePath, subscribeType, subscribeStats); @@ -536,7 +537,7 @@ std::string FsdbPubSubManager::addSubscriptionImpl( "Subscription at : " + subsStr + " already exists"); } XLOG(DBG2) << "Added subscription for: " << subsStr; - itr->second->setServerOptions(std::move(serverOptions)); + itr->second->setConnectionOptions(std::move(connectionOptions)); return subsStr; } @@ -547,12 +548,12 @@ std::string FsdbPubSubManager::addSubscriptionImpl( SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, bool subscribeStats, - FsdbStreamClient::ServerOptions&& serverOptions, + utils::ConnectionOptions&& connectionOptions, const std::optional& clientIdSuffix) { auto subscriptionType = SubscriberT::subscriptionType(); XCHECK(subscriptionType != SubscriptionType::UNKNOWN) << "Unknown data type"; auto subsStr = toSubscriptionStr( - serverOptions.dstAddr.getAddressStr(), + connectionOptions.getDstAddr().getAddressStr(), subscribePath, subscriptionType, subscribeStats); @@ -580,7 +581,7 @@ std::string FsdbPubSubManager::addSubscriptionImpl( "Subscription at : " + subsStr + " already exists"); } XLOG(DBG2) << " Added subscription for: " << subsStr; - itr->second->setServerOptions(std::move(serverOptions)); + itr->second->setConnectionOptions(std::move(connectionOptions)); return subsStr; } @@ -591,11 +592,11 @@ std::string FsdbPubSubManager::addSubscriptionImpl( const std::vector& subscribePath, SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { auto subscriptionType = SubscriberT::subscriptionType(); XCHECK(subscriptionType != SubscriptionType::UNKNOWN) << "Unknown data type"; auto subsStr = toSubscriptionStr( - serverOptions.dstAddr.getAddressStr(), + connectionOptions.getDstAddr().getAddressStr(), subscribePath, subscriptionType, subscriptionOptions.subscribeStats_); @@ -618,7 +619,7 @@ std::string FsdbPubSubManager::addSubscriptionImpl( "Subscription at : " + subsStr + " already exists"); } XLOG(DBG2) << " Added subscription for: " << subsStr; - itr->second->setServerOptions(std::move(serverOptions)); + itr->second->setConnectionOptions(std::move(connectionOptions)); return subsStr; } diff --git a/fboss/fsdb/client/FsdbPubSubManager.h b/fboss/fsdb/client/FsdbPubSubManager.h index 059bdaf1f11d3..22c58398fce08 100644 --- a/fboss/fsdb/client/FsdbPubSubManager.h +++ b/fboss/fsdb/client/FsdbPubSubManager.h @@ -10,6 +10,7 @@ #include "fboss/fsdb/client/FsdbStreamClient.h" #include "fboss/fsdb/common/Flags.h" #include "fboss/fsdb/if/gen-cpp2/fsdb_oper_types.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -80,91 +81,92 @@ class FsdbPubSubManager { const Path& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); std::string addStatPathSubscription( const Path& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); /* multi path subscription */ std::string addStateDeltaSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); std::string addStatDeltaSubscription( const MultiPath& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); std::string addStatPathSubscription( const MultiPath& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); - /* Apis that use ServerOptions */ + /* Apis that use ConnectionOptions */ // TODO: change all above apis to use server options std::string addStatePathSubscription( const Path& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); std::string addStatePathSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions = kDefaultServerOptions(), + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions(), const std::optional& clientIdSuffix = std::nullopt); std::string addStateDeltaSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); std::string addStatePatchSubscription( const PatchPath& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbPatchSubscriber::FsdbOperPatchUpdateCb patchCb, - FsdbStreamClient::ServerOptions&& serverOptions); + utils::ConnectionOptions&& connectionOptions); std::string addStatePathSubscription( SubscriptionOptions&& subscriptionOptions, const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions); + utils::ConnectionOptions&& connectionOptions); std::string addStatePathSubscription( SubscriptionOptions&& subscriptionOptions, const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions); + utils::ConnectionOptions&& connectionOptions); std::string addStateExtPathSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions); + utils::ConnectionOptions&& connectionOptions); std::string addStatExtPathSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions); + utils::ConnectionOptions&& connectionOptions); std::string addStateExtDeltaSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions); + utils::ConnectionOptions&& connectionOptions); std::string addStatExtDeltaSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions); + utils::ConnectionOptions&& connectionOptions); /* Subscriber remove APIs */ void removeStateDeltaSubscription( @@ -248,8 +250,9 @@ class FsdbPubSubManager { static std::string subscriptionStateToString(FsdbStreamClient::State state); private: - static FsdbStreamClient::ServerOptions kDefaultServerOptions() { - return FsdbStreamClient::ServerOptions("::1", FLAGS_fsdbPort); + static utils::ConnectionOptions kDefaultConnectionOptions() { + return utils::ConnectionOptions::defaultOptions< + facebook::fboss::fsdb::FsdbService>(); } // Publisher helpers template @@ -279,7 +282,7 @@ class FsdbPubSubManager { SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, bool subscribeStats, - FsdbStreamClient::ServerOptions&& serverOptions, + utils::ConnectionOptions&& connectionOptions, const std::optional& clientIdSuffix = std::nullopt); template std::string addSubscriptionImpl( @@ -287,7 +290,7 @@ class FsdbPubSubManager { SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, bool subscribeStats, - FsdbStreamClient::ServerOptions&& serverOptions, + utils::ConnectionOptions&& connectionOptions, const std::optional& clientIdSuffix = std::nullopt); template std::string addSubscriptionImpl( @@ -295,7 +298,7 @@ class FsdbPubSubManager { const std::vector& subscribePath, SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, - FsdbStreamClient::ServerOptions&& serverOptions); + utils::ConnectionOptions&& connectionOptions); const std::string clientId_; diff --git a/fboss/fsdb/client/FsdbStreamClient.cpp b/fboss/fsdb/client/FsdbStreamClient.cpp index 9a644d8d95b19..a8270302e4dda 100644 --- a/fboss/fsdb/client/FsdbStreamClient.cpp +++ b/fboss/fsdb/client/FsdbStreamClient.cpp @@ -2,6 +2,7 @@ #include "fboss/fsdb/client/FsdbStreamClient.h" #include "common/time/Time.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include "fboss/lib/thrift_service_client/ThriftServiceClient.h" #include @@ -81,7 +82,8 @@ FsdbStreamClient::~FsdbStreamClient() { CHECK(isCancelled()); } -void FsdbStreamClient::connectToServer(const ServerOptions& options) { +void FsdbStreamClient::connectToServer( + const utils::ConnectionOptions& options) { CHECK(getState() == State::DISCONNECTED); streamEvb_->runImmediatelyOrRunInEventBaseThreadAndWait([this, &options]() { try { @@ -146,31 +148,11 @@ void FsdbStreamClient::resetClient() { client_.reset(); } -utils::ConnectionOptions::TrafficClass getTosForClientPriority( - const std::optional priority) { - if (priority == FsdbStreamClient::Priority::CRITICAL) { - return utils::ConnectionOptions::TrafficClass::NC; - } - return utils::ConnectionOptions::TrafficClass::DEFAULT; -} - -bool shouldUseEncryptedClient(const FsdbStreamClient::ServerOptions& options) { - // use encrypted connection for all clients except CRITICAL ones. - return (options.priority != FsdbStreamClient::Priority::CRITICAL); -} - -void FsdbStreamClient::createClient(const ServerOptions& options) { +void FsdbStreamClient::createClient(const utils::ConnectionOptions& options) { CHECK(streamEvb_->getEventBase()->isInEventBaseThread()); resetClient(); - auto tos = getTosForClientPriority(options.priority); - bool encryptedClient = shouldUseEncryptedClient(options); - client_ = createFsdbClient( - utils::ConnectionOptions(options.dstAddr) - .setSrcAddr(options.srcAddr) - .setTrafficClass(tos) - .setPreferEncrypted(encryptedClient), - streamEvb_); + client_ = createFsdbClient(options, streamEvb_); } } // namespace facebook::fboss::fsdb diff --git a/fboss/fsdb/client/FsdbStreamClient.h b/fboss/fsdb/client/FsdbStreamClient.h index e33edd73e2bad..3a8487fcf914d 100644 --- a/fboss/fsdb/client/FsdbStreamClient.h +++ b/fboss/fsdb/client/FsdbStreamClient.h @@ -6,6 +6,7 @@ #include "fboss/fsdb/if/gen-cpp2/FsdbService.h" #include "fboss/fsdb/if/gen-cpp2/fsdb_oper_types.h" #include "fboss/lib/CommonThriftUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -100,9 +101,9 @@ class FsdbStreamClient : public ReconnectingThriftClient { DeltaExtSubStreamT>; private: - void createClient(const ServerOptions& options); + void createClient(const utils::ConnectionOptions& options); void resetClient() override; - void connectToServer(const ServerOptions& options) override; + void connectToServer(const utils::ConnectionOptions& options) override; void timeoutExpired() noexcept; #if FOLLY_HAS_COROUTINES diff --git a/fboss/fsdb/client/FsdbSubManager.h b/fboss/fsdb/client/FsdbSubManager.h index dc5c98da4e02f..012eea95fca66 100644 --- a/fboss/fsdb/client/FsdbSubManager.h +++ b/fboss/fsdb/client/FsdbSubManager.h @@ -5,6 +5,7 @@ #include "fboss/fsdb/client/FsdbPatchSubscriber.h" #include "fboss/fsdb/if/FsdbModel.h" #include "fboss/fsdb/if/gen-cpp2/fsdb_oper_types.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include @@ -62,11 +63,11 @@ class FsdbSubManager { FsdbSubManager( fsdb::SubscriptionOptions opts, - ReconnectingThriftClient::ServerOptions serverOptions, + utils::ConnectionOptions serverOptions, folly::EventBase* reconnectEvb = nullptr, folly::EventBase* subscriberEvb = nullptr) : opts_(std::move(opts)), - serverOptions_(std::move(serverOptions)), + connectionOptions_(std::move(serverOptions)), reconnectEvbThread_( reconnectEvb ? nullptr : std::make_unique( @@ -127,8 +128,7 @@ class FsdbSubManager { parseChunkAndInvokeCallback(std::move(chunk), std::move(cb)); }, std::move(subscriptionStateChangeCb)); - subscriber_->setServerOptions( - ReconnectingThriftClient::ServerOptions(serverOptions_)); + subscriber_->setConnectionOptions(connectionOptions_); } // Returns a synchronized data object that is always kept up to date @@ -181,7 +181,7 @@ class FsdbSubManager { } fsdb::SubscriptionOptions opts_; - ReconnectingThriftClient::ServerOptions serverOptions_; + utils::ConnectionOptions connectionOptions_; // local threads are only needed when there are no external eventbases std::unique_ptr reconnectEvbThread_{nullptr}; diff --git a/fboss/fsdb/client/test/BUCK b/fboss/fsdb/client/test/BUCK index ebb2f37ee062b..8a26e854ede2a 100644 --- a/fboss/fsdb/client/test/BUCK +++ b/fboss/fsdb/client/test/BUCK @@ -15,6 +15,7 @@ cpp_unittest( "//fboss/fsdb/client:fsdb_stream_client", "//fboss/fsdb/common:flags", "//fboss/lib:common_utils", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly/coro:async_generator", "//folly/coro:async_pipe", "//folly/io/async:scoped_event_base_thread", @@ -34,6 +35,7 @@ cpp_unittest( "//fboss/fsdb/if:fsdb_model", "//fboss/fsdb/tests/utils:fsdb_test_server", "//fboss/lib:common_utils", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly/logging:init", "//folly/logging:log_level", "//folly/logging:logging", diff --git a/fboss/fsdb/client/test/FsdbPubSubManagerTest.cpp b/fboss/fsdb/client/test/FsdbPubSubManagerTest.cpp index 0a570fa6204f7..a9ee7ea46d8ca 100644 --- a/fboss/fsdb/client/test/FsdbPubSubManagerTest.cpp +++ b/fboss/fsdb/client/test/FsdbPubSubManagerTest.cpp @@ -8,6 +8,7 @@ #include "fboss/fsdb/client/FsdbPubSubManager.h" #include "fboss/fsdb/common/Flags.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -36,7 +37,7 @@ class PubSubManagerTest : public ::testing::Test { path, subscriptionStateChangeCb, operDeltaCb, - FsdbStreamClient::ServerOptions(host, FLAGS_fsdbPort)); + utils::ConnectionOptions(host, FLAGS_fsdbPort)); } void addStatDeltaSubscription( const std::vector& path, @@ -45,7 +46,7 @@ class PubSubManagerTest : public ::testing::Test { path, subscriptionStateChangeCb, operDeltaCb, - FsdbStreamClient::ServerOptions(host, FLAGS_fsdbPort)); + utils::ConnectionOptions(host, FLAGS_fsdbPort)); } void addStatePathSubscription( const std::vector& path, @@ -54,7 +55,7 @@ class PubSubManagerTest : public ::testing::Test { path, subscriptionStateChangeCb, operStateCb, - FsdbStreamClient::ServerOptions(host, FLAGS_fsdbPort)); + utils::ConnectionOptions(host, FLAGS_fsdbPort)); } void addStatPathSubscription( const std::vector& path, @@ -63,7 +64,7 @@ class PubSubManagerTest : public ::testing::Test { path, subscriptionStateChangeCb, operStateCb, - FsdbStreamClient::ServerOptions(host, FLAGS_fsdbPort)); + utils::ConnectionOptions(host, FLAGS_fsdbPort)); } FsdbPubSubManager pubSubManager_{"testMgr"}; }; diff --git a/fboss/fsdb/client/test/FsdbStreamClientTest.cpp b/fboss/fsdb/client/test/FsdbStreamClientTest.cpp index 65539e2fb3a44..7e1e68d06c935 100644 --- a/fboss/fsdb/client/test/FsdbStreamClientTest.cpp +++ b/fboss/fsdb/client/test/FsdbStreamClientTest.cpp @@ -5,6 +5,7 @@ #include "fboss/fsdb/client/FsdbStreamClient.h" #include "fboss/fsdb/common/Flags.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -101,8 +102,8 @@ class StreamClientTest : public ::testing::Test { }; TEST_F(StreamClientTest, connectAndCancel) { - streamClient_->setServerOptions( - FsdbStreamClient::ServerOptions("::1", FLAGS_fsdbPort)); + streamClient_->setConnectionOptions( + utils::ConnectionOptions("::1", FLAGS_fsdbPort)); auto counterPrefix = streamClient_->getCounterPrefix(); EXPECT_EQ(counterPrefix, "test_fsdb_client"); EXPECT_EQ( diff --git a/fboss/fsdb/client/test/FsdbSubManagerTest.cpp b/fboss/fsdb/client/test/FsdbSubManagerTest.cpp index a6965036a6816..3010f7ce7b527 100644 --- a/fboss/fsdb/client/test/FsdbSubManagerTest.cpp +++ b/fboss/fsdb/client/test/FsdbSubManagerTest.cpp @@ -6,6 +6,7 @@ #include "fboss/fsdb/if/FsdbModel.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -19,11 +20,9 @@ namespace facebook::fboss::fsdb::test { class TestAgentPublisher { public: - TestAgentPublisher( - bool isStats, - ReconnectingThriftClient::ServerOptions serverOptions) + TestAgentPublisher(bool isStats, utils::ConnectionOptions serverOptions) : isStats_(isStats), - serverOptions_(std::move(serverOptions)), + connectionOptions_(std::move(serverOptions)), publisherThread_(std::make_unique( "test-publisher-stream")), reconnectThread_(std::make_unique( @@ -46,8 +45,7 @@ class TestAgentPublisher { b.post(); } })); - publisher_->setServerOptions( - ReconnectingThriftClient::ServerOptions(serverOptions_)); + publisher_->setConnectionOptions(connectionOptions_); b.wait(); } @@ -71,7 +69,7 @@ class TestAgentPublisher { private: bool isStats_; std::unique_ptr publisher_; - ReconnectingThriftClient::ServerOptions serverOptions_; + utils::ConnectionOptions connectionOptions_; std::unique_ptr publisherThread_; std::unique_ptr reconnectThread_; }; @@ -208,9 +206,10 @@ class FsdbSubManagerTest : public ::testing::Test, std::unique_ptr createSubscriber( std::string clientId, int grHoldTimer = 0) { - CHECK(serverOptions_); + CHECK(connectionOptions_); SubscriptionOptions options(clientId, IsStats, grHoldTimer); - return std::make_unique(std::move(options), *serverOptions_); + return std::make_unique( + std::move(options), *connectionOptions_); } template @@ -230,10 +229,10 @@ class FsdbSubManagerTest : public ::testing::Test, void createFsdbServerAndPublisher() { fsdbTestServer_ = std::make_unique(); - serverOptions_ = ReconnectingThriftClient::ServerOptions( - "::1", fsdbTestServer_->getFsdbPort()); + connectionOptions_ = + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort()); testPublisher_ = - std::make_unique(IsStats, *serverOptions_); + std::make_unique(IsStats, *connectionOptions_); } void killFsdb() { @@ -243,7 +242,7 @@ class FsdbSubManagerTest : public ::testing::Test, private: std::unique_ptr fsdbTestServer_; std::unique_ptr testPublisher_; - std::optional serverOptions_; + std::optional connectionOptions_; }; using SubscriberTypes = diff --git a/fboss/fsdb/tests/client/FsdbPubSubManagerTest.cpp b/fboss/fsdb/tests/client/FsdbPubSubManagerTest.cpp index 241ee2cdec502..8d488ccaf1fa1 100644 --- a/fboss/fsdb/tests/client/FsdbPubSubManagerTest.cpp +++ b/fboss/fsdb/tests/client/FsdbPubSubManagerTest.cpp @@ -7,6 +7,7 @@ #include "fboss/fsdb/tests/client/FsdbTestClients.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -262,7 +263,7 @@ class FsdbPubSubManagerTest : public ::testing::Test { subscriptionPath(), stChangeCb, operDeltaUpdate, - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); } std::string addStateDeltaSubscription( FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaUpdate, @@ -271,7 +272,7 @@ class FsdbPubSubManagerTest : public ::testing::Test { subscriptionPath(), stChangeCb, operDeltaUpdate, - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); } void addSubscriptions( FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaUpdate) { @@ -285,7 +286,7 @@ class FsdbPubSubManagerTest : public ::testing::Test { subscriptionPath(), stChangeCb, operPathUpdate, - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); } std::string addStatePathSubscription( FsdbStateSubscriber::FsdbOperStateUpdateCb operPathUpdate, @@ -294,15 +295,14 @@ class FsdbPubSubManagerTest : public ::testing::Test { subscriptionPath(), stChangeCb, operPathUpdate, - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); } void addStatePathSubscriptionWithGrHoldTime( FsdbStateSubscriber::FsdbOperStateUpdateCb operPathUpdate, SubscriptionStateChangeCb stChangeCb, uint32_t grHoldTimeSec) { auto subscribeStats = false; - ReconnectingThriftClient::ServerOptions serverOpts{ - "::1", fsdbTestServer_->getFsdbPort()}; + utils::ConnectionOptions connOpts{"::1", fsdbTestServer_->getFsdbPort()}; SubscriptionOptions opts{ pubSubManager_->getClientId(), subscribeStats, grHoldTimeSec}; pubSubManager_->addStatePathSubscription( @@ -310,15 +310,14 @@ class FsdbPubSubManagerTest : public ::testing::Test { subscriptionPath(), stChangeCb, operPathUpdate, - std::move(serverOpts)); + std::move(connOpts)); } std::string addStateExtDeltaSubscription( FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, SubscriptionStateChangeCb stChangeCb) { - ReconnectingThriftClient::ServerOptions serverOpts{ - "::1", fsdbTestServer_->getFsdbPort()}; + utils::ConnectionOptions connOpts{"::1", fsdbTestServer_->getFsdbPort()}; return pubSubManager_->addStateExtDeltaSubscription( - extSubscriptionPaths(), stChangeCb, operDeltaCb, std::move(serverOpts)); + extSubscriptionPaths(), stChangeCb, operDeltaCb, std::move(connOpts)); } void addSubscriptions( FsdbStateSubscriber::FsdbOperStateUpdateCb operPathUpdate) { diff --git a/fboss/fsdb/tests/client/FsdbPubSubTest.cpp b/fboss/fsdb/tests/client/FsdbPubSubTest.cpp index c661e28c81951..d0facbbd5d835 100644 --- a/fboss/fsdb/tests/client/FsdbPubSubTest.cpp +++ b/fboss/fsdb/tests/client/FsdbPubSubTest.cpp @@ -5,6 +5,7 @@ #include "fboss/fsdb/tests/client/FsdbTestClients.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -107,8 +108,8 @@ class FsdbPubSubTest : public ::testing::Test { void setupConnection( FsdbStreamClient& pubSub, bool updateServerPort = false) { - pubSub.setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort()), + pubSub.setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort()), updateServerPort); WITH_RETRIES_N(kRetries, { ASSERT_EVENTUALLY_TRUE(pubSub.isConnectedToServer()) @@ -659,9 +660,8 @@ TYPED_TEST(FsdbPubSubTest, verifyUnknownPublisherRejected) { FLAGS_checkOperOwnership = true; FLAGS_enforcePublisherConfig = true; auto publisher = this->createPublisher(kUnknownPublisherId); - publisher->setServerOptions( - FsdbStreamClient::ServerOptions( - "::1", this->fsdbTestServer_->getFsdbPort()), + publisher->setConnectionOptions( + utils::ConnectionOptions("::1", this->fsdbTestServer_->getFsdbPort()), false); WITH_RETRIES_N( this->kRetries, ASSERT_FALSE(publisher->isConnectedToServer())); @@ -691,9 +691,8 @@ TYPED_TEST(FsdbUnknownPublisherPathTest, verifyUnknownPublisherPathRejected) { FLAGS_checkOperOwnership = true; FLAGS_enforcePublisherConfig = true; auto publisher = this->createPublisher(kPublisherId); - publisher->setServerOptions( - FsdbStreamClient::ServerOptions( - "::1", this->fsdbTestServer_->getFsdbPort()), + publisher->setConnectionOptions( + utils::ConnectionOptions("::1", this->fsdbTestServer_->getFsdbPort()), false); WITH_RETRIES_N( this->kRetries, ASSERT_FALSE(publisher->isConnectedToServer())); diff --git a/fboss/fsdb/tests/client/FsdbPublisherTest.cpp b/fboss/fsdb/tests/client/FsdbPublisherTest.cpp index fb9dac20097ee..4bbb0b2a31dd2 100644 --- a/fboss/fsdb/tests/client/FsdbPublisherTest.cpp +++ b/fboss/fsdb/tests/client/FsdbPublisherTest.cpp @@ -7,6 +7,7 @@ #include "fboss/fsdb/tests/client/FsdbTestClients.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include "fboss/lib/thrift_service_client/ThriftServiceClient.h" #include @@ -57,8 +58,8 @@ class FsdbPublisherTest : public ::testing::Test { return std::is_same_v; } void setupConnection(bool updateServerPort = false) { - publisher_->setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort()), + publisher_->setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort()), updateServerPort); WITH_RETRIES_N( kRetries, auto metadata = getPublisherRootMetadata(); diff --git a/fboss/fsdb/tests/client/FsdbStreamClientTest.cpp b/fboss/fsdb/tests/client/FsdbStreamClientTest.cpp index 025c44d91cab8..b60fc5e43510d 100644 --- a/fboss/fsdb/tests/client/FsdbStreamClientTest.cpp +++ b/fboss/fsdb/tests/client/FsdbStreamClientTest.cpp @@ -5,6 +5,7 @@ #include "fboss/fsdb/tests/client/FsdbTestClients.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include @@ -35,8 +36,8 @@ class FsdbStreamClientTest : public ::testing::Test { }; TEST_F(FsdbStreamClientTest, connectAndCancel) { - streamClient_->setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + streamClient_->setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); WITH_RETRIES(ASSERT_EVENTUALLY_TRUE(streamClient_->isConnectedToServer())); EXPECT_EQ( *streamClient_->lastStateUpdateSeen(), @@ -49,12 +50,12 @@ TEST_F(FsdbStreamClientTest, connectAndCancel) { } TEST_F(FsdbStreamClientTest, multipleStreamClientsOnSameEvb) { - streamClient_->setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + streamClient_->setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); auto streamClient2 = std::make_unique( streamEvbThread_->getEventBase(), connRetryEvbThread_->getEventBase()); - streamClient2->setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + streamClient2->setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); WITH_RETRIES(ASSERT_EVENTUALLY_TRUE(streamClient_->isConnectedToServer())); WITH_RETRIES(ASSERT_EVENTUALLY_TRUE(streamClient2->isConnectedToServer())); EXPECT_EQ( @@ -76,8 +77,8 @@ TEST_F(FsdbStreamClientTest, multipleStreamClientsOnSameEvb) { } TEST_F(FsdbStreamClientTest, reconnect) { - streamClient_->setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + streamClient_->setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); WITH_RETRIES(ASSERT_EVENTUALLY_TRUE(streamClient_->isConnectedToServer())); EXPECT_EQ( *streamClient_->lastStateUpdateSeen(), @@ -92,9 +93,8 @@ TEST_F(FsdbStreamClientTest, reconnect) { fsdbTestServer_ = std::make_unique(); // Need to update server address since we are binding to ephemeral port // which will change on server recreate - streamClient_->setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort()), - true); + streamClient_->setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort()), true); WITH_RETRIES(ASSERT_EVENTUALLY_TRUE(streamClient_->isConnectedToServer())); EXPECT_EQ( *streamClient_->lastStateUpdateSeen(), diff --git a/fboss/lib/BUCK b/fboss/lib/BUCK index 289caeea95c78..937e1271fc336 100644 --- a/fboss/lib/BUCK +++ b/fboss/lib/BUCK @@ -254,6 +254,7 @@ cpp_library( ], exported_deps = [ "//fb303:thread_cached_service_data", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly:network_address", "//folly/coro:async_scope", "//folly/coro:blocking_wait", diff --git a/fboss/lib/CommonThriftUtils.cpp b/fboss/lib/CommonThriftUtils.cpp index 0f568d3978250..38ae54faae228 100644 --- a/fboss/lib/CommonThriftUtils.cpp +++ b/fboss/lib/CommonThriftUtils.cpp @@ -13,6 +13,7 @@ #include #include #include +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" namespace facebook::fboss { @@ -91,14 +92,14 @@ void ReconnectingThriftClient::setState(State state) { stateChangeCb_(oldState, state); } -void ReconnectingThriftClient::setServerOptions( - ServerOptions&& options, +void ReconnectingThriftClient::setConnectionOptions( + utils::ConnectionOptions options, bool allowReset) { - if (!allowReset && *serverOptions_.rlock()) { + if (!allowReset && *connectionOptions_.rlock()) { throw std::runtime_error("Cannot reset server address"); } - connectionLogStr_ = fmt::format("{}->{}", clientId(), options.deviceName); - *serverOptions_.wlock() = std::move(options); + connectionLogStr_ = fmt::format("{}->{}", clientId(), options.getHostname()); + *connectionOptions_.wlock() = std::move(options); } void ReconnectingThriftClient::cancel() { @@ -109,7 +110,7 @@ void ReconnectingThriftClient::cancel() { STREAM_XLOG(WARNING) << "Already cancelled"; return; } - serverOptions_.wlock()->reset(); + connectionOptions_.wlock()->reset(); connRetryEvb_->runImmediatelyOrRunInEventBaseThreadAndWait( [this] { timer_->cancelTimeout(); }); setState(State::CANCELLED); @@ -119,7 +120,7 @@ void ReconnectingThriftClient::cancel() { } void ReconnectingThriftClient::timeoutExpired() noexcept { - auto serverOptions = *serverOptions_.rlock(); + auto serverOptions = *connectionOptions_.rlock(); if (getState() == State::DISCONNECTED && serverOptions) { connectToServer(*serverOptions); } diff --git a/fboss/lib/CommonThriftUtils.h b/fboss/lib/CommonThriftUtils.h index fb50a5abdfa1a..a36046f618a44 100644 --- a/fboss/lib/CommonThriftUtils.h +++ b/fboss/lib/CommonThriftUtils.h @@ -9,6 +9,8 @@ */ #pragma once +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" + #include #include #include @@ -49,43 +51,6 @@ class ReconnectingThriftClient { using StreamStateChangeCb = std::function; - enum class Priority : uint8_t { NORMAL, CRITICAL }; - - struct ServerOptions { - ServerOptions( - const std::string& dstIp, - uint16_t dstPort, - const std::optional& deviceName = std::nullopt) - : dstAddr(folly::SocketAddress(dstIp, dstPort)), - deviceName(deviceName.value_or(dstAddr.getAddressStr())) {} - - ServerOptions( - const std::string& dstIp, - uint16_t dstPort, - const std::string& srcIp, - const std::optional& deviceName = std::nullopt) - : dstAddr(folly::SocketAddress(dstIp, dstPort)), - srcAddr(folly::SocketAddress(srcIp, 0)), - deviceName(deviceName.value_or(dstAddr.getAddressStr())) {} - - ServerOptions( - const std::string& dstIp, - uint16_t dstPort, - const std::string& srcIp, - Priority priority, - const std::optional& deviceName = std::nullopt) - : dstAddr(folly::SocketAddress(dstIp, dstPort)), - srcAddr(folly::SocketAddress(srcIp, 0)), - priority{priority}, - deviceName(deviceName.value_or(dstAddr.getAddressStr())) {} - - folly::SocketAddress dstAddr; - std::string fsdbPort; - std::optional srcAddr; - std::optional priority; - std::string deviceName; - }; - ReconnectingThriftClient( const std::string& clientId, folly::EventBase* streamEvb, @@ -109,14 +74,14 @@ class ReconnectingThriftClient { return clientId_; } - void setServerOptions( - ServerOptions&& options, + void setConnectionOptions( + utils::ConnectionOptions options, bool allowReset = false /* allow reset for use in tests*/); std::string getServer() const { - if (auto serverOptions = serverOptions_.rlock(); - serverOptions->has_value()) { - return (*serverOptions)->dstAddr.getAddressStr(); + if (auto connectionOptions = connectionOptions_.rlock(); + connectionOptions->has_value()) { + return (*connectionOptions)->getDstAddr().getAddressStr(); } return ""; } @@ -133,7 +98,7 @@ class ReconnectingThriftClient { std::string getConnectedCounterName() { return counterPrefix_ + ".connected"; } - virtual void connectToServer(const ServerOptions& options) = 0; + virtual void connectToServer(const utils::ConnectionOptions& options) = 0; void setGracefulServiceLoopCompletion(const std::function& cb) { auto requested = gracefulServiceLoopCompletionCb_.wlock(); @@ -165,7 +130,8 @@ class ReconnectingThriftClient { fb303::TimeseriesWrapper disconnectEvents_; fb303::TimeseriesWrapper aggDisconnectEvents_; StreamStateChangeCb stateChangeCb_; - folly::Synchronized> serverOptions_; + folly::Synchronized> + connectionOptions_; std::unique_ptr timer_; uint32_t reconnectTimeout_; std::string connectionLogStr_; From b6abdbbdceaae88045c1d2caccc2ec5ff440299a Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Fri, 18 Oct 2024 12:42:23 -0700 Subject: [PATCH 210/479] Set custom timeouts for fsdb session in dsf Summary: Adding gflags to set the socket connect and recv timeouts in DSF. Defaulting to 4s and 12s respectively since those numbers gave me pretty good results in convergence benchmarking Differential Revision: D64265387 fbshipit-source-id: a8859b175cfec92ef22494ccca02ee7adb915dbd --- fboss/agent/AgentFeatures.cpp | 10 ++++++++++ fboss/agent/AgentFeatures.h | 2 ++ fboss/agent/DsfSubscription.cpp | 6 +++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/fboss/agent/AgentFeatures.cpp b/fboss/agent/AgentFeatures.cpp index 7cb29ac3b0917..0b6142108994f 100644 --- a/fboss/agent/AgentFeatures.cpp +++ b/fboss/agent/AgentFeatures.cpp @@ -76,6 +76,16 @@ DEFINE_int32( 1, "Number of threads to use for DSF remote stream pool"); +DEFINE_int32( + dsf_session_conn_timeout_ms, + 4000, + "Socket connection timeout for DSF session"); + +DEFINE_int32( + dsf_session_recv_timeout_ms, + 12000, + "Socket pkt receive timeout for DSF session"); + DEFINE_bool( set_classid_for_my_subnet_and_ip_routes, false, diff --git a/fboss/agent/AgentFeatures.h b/fboss/agent/AgentFeatures.h index 720357079bcf6..c09720491d6f4 100644 --- a/fboss/agent/AgentFeatures.h +++ b/fboss/agent/AgentFeatures.h @@ -46,6 +46,8 @@ DECLARE_int32(dsf_num_fsdb_stream_threads); DECLARE_bool(dsf_subscribe_patch); DECLARE_int32(dsf_subscriber_reconnect_thread_heartbeat_ms); DECLARE_int32(dsf_subscriber_stream_thread_heartbeat_ms); +DECLARE_int32(dsf_session_conn_timeout_ms); +DECLARE_int32(dsf_session_recv_timeout_ms); DECLARE_bool(set_classid_for_my_subnet_and_ip_routes); DECLARE_int32(stat_publish_interval_ms); diff --git a/fboss/agent/DsfSubscription.cpp b/fboss/agent/DsfSubscription.cpp index 270f322ab4582..6c9528a7b42e3 100644 --- a/fboss/agent/DsfSubscription.cpp +++ b/fboss/agent/DsfSubscription.cpp @@ -29,7 +29,11 @@ utils::ConnectionOptions getConnectionOptions( return utils::ConnectionOptions(dstIP, FLAGS_fsdbPort) .setSrcAddr(srcIP) .setPreferEncrypted(false) - .setTrafficClass(utils::ConnectionOptions::TrafficClass::NC); + .setTrafficClass(utils::ConnectionOptions::TrafficClass::NC) + .setConnectionTimeout( + std::chrono::milliseconds(FLAGS_dsf_session_conn_timeout_ms)) + .setRecvTimeout( + std::chrono::milliseconds(FLAGS_dsf_session_recv_timeout_ms)); } const auto& getSystemPortsPath() { From 4d247d4788492227869bda98671f00ff0fa61e50 Mon Sep 17 00:00:00 2001 From: Peyman Gardideh Date: Fri, 18 Oct 2024 13:21:40 -0700 Subject: [PATCH 211/479] support matching against an extended wildcard path Summary: with this we can check path equality against an extended path, wether its id or name Reviewed By: wilsonwinhi Differential Revision: D64565030 fbshipit-source-id: 17eb53953b182115f598da588b3baec79af0b920 --- cmake/fsdb/FsdbIf.cmake | 1 + fboss/thrift_visitors/tests/PathTests.cpp | 19 ++++ fboss/thriftpath_plugin/BUCK | 4 + fboss/thriftpath_plugin/Path.cpp | 13 +++ fboss/thriftpath_plugin/Path.h | 103 ++++++++++++++-------- 5 files changed, 104 insertions(+), 36 deletions(-) diff --git a/cmake/fsdb/FsdbIf.cmake b/cmake/fsdb/FsdbIf.cmake index b9b01b38dec7d..30eb7f5b0ad44 100644 --- a/cmake/fsdb/FsdbIf.cmake +++ b/cmake/fsdb/FsdbIf.cmake @@ -70,6 +70,7 @@ target_link_libraries(thriftpath_lib fsdb_oper_cpp2 FBThrift::thriftcpp2 Folly::folly + ${RE2} ) add_library(fsdb_model_thriftpath_cpp2 diff --git a/fboss/thrift_visitors/tests/PathTests.cpp b/fboss/thrift_visitors/tests/PathTests.cpp index 2eb16302ee289..2e763a067da0b 100644 --- a/fboss/thrift_visitors/tests/PathTests.cpp +++ b/fboss/thrift_visitors/tests/PathTests.cpp @@ -99,3 +99,22 @@ TEST(PathTests, WildcardPaths) { EXPECT_THROW(path.tokens(), std::runtime_error); EXPECT_THROW(path.idTokens(), std::runtime_error); } + +TEST(PathTests, ExtendedPathMatching) { + using namespace facebook::fboss::fsdb; + + using RootPath = + thriftpath::RootThriftPath; + RootPath root; + OperPathElem wildcard; + wildcard.set_any(true); + auto path = root.sw().ports()[wildcard].logicalID(); + + auto idPath = root.sw().ports()[123].logicalID().idTokens(); + auto namePath = root.sw().ports()[123].logicalID().tokens(); + + EXPECT_TRUE(path.matchesPath(namePath)); + EXPECT_TRUE(path.matchesPath(idPath)); + + EXPECT_FALSE(path.matchesPath({"sw", "ports"})); +} diff --git a/fboss/thriftpath_plugin/BUCK b/fboss/thriftpath_plugin/BUCK index 24297db55ed16..2ecc40873b0a6 100644 --- a/fboss/thriftpath_plugin/BUCK +++ b/fboss/thriftpath_plugin/BUCK @@ -11,8 +11,12 @@ cpp_library( "Path.h", ], exported_deps = [ + "//fboss/fsdb/common:utils", "//fboss/fsdb/if:fsdb_oper-cpp2-types", "//folly:string", "//folly:unit", ], + exported_external_deps = [ + "re2", + ], ) diff --git a/fboss/thriftpath_plugin/Path.cpp b/fboss/thriftpath_plugin/Path.cpp index 40ea4e3aa13d4..37a183a8c3706 100644 --- a/fboss/thriftpath_plugin/Path.cpp +++ b/fboss/thriftpath_plugin/Path.cpp @@ -20,4 +20,17 @@ std::vector copyAndExtendVec( return out; } +std::string pathElemToString(const facebook::fboss::fsdb::OperPathElem& elem) { + switch (elem.getType()) { + case facebook::fboss::fsdb::OperPathElem::Type::raw: + return elem.get_raw(); + case facebook::fboss::fsdb::OperPathElem::Type::regex: + return elem.get_regex(); + case facebook::fboss::fsdb::OperPathElem::Type::any: + return "*"; + default: + throw std::runtime_error("Unknown path elem type"); + } +} + } // namespace thriftpath diff --git a/fboss/thriftpath_plugin/Path.h b/fboss/thriftpath_plugin/Path.h index ce5cf3edffe82..084efe5fdeae6 100644 --- a/fboss/thriftpath_plugin/Path.h +++ b/fboss/thriftpath_plugin/Path.h @@ -2,10 +2,13 @@ #pragma once +#include "fboss/fsdb/common/PathHelpers.h" +#include "fboss/fsdb/common/Utils.h" #include "fboss/fsdb/if/gen-cpp2/fsdb_oper_types.h" #include #include +#include #include namespace thriftpath { @@ -34,41 +37,46 @@ namespace thriftpath { std::move(this->extendedTokens_), \ this->hasWildcards_); \ } -#define CONTAINER_CHILD_GETTERS(key_type) \ - Child operator[](key_type token) const& { \ - const std::string strToken = folly::to(token); \ - facebook::fboss::fsdb::OperPathElem elem; \ - elem.set_raw(strToken); \ - return Child( \ - copyAndExtendVec(this->tokens_, strToken), \ - copyAndExtendVec(this->idTokens_, strToken), \ - copyAndExtendVec(this->extendedTokens_, std::move(elem)), \ - this->hasWildcards_); \ - } \ - Child operator[](key_type token)&& { \ - const std::string strToken = folly::to(token); \ - this->tokens_.push_back(strToken); \ - this->idTokens_.push_back(strToken); \ - facebook::fboss::fsdb::OperPathElem elem; \ - elem.set_raw(strToken); \ - this->extendedTokens_.push_back(std::move(elem)); \ - return Child( \ - std::move(this->tokens_), \ - std::move(this->idTokens_), \ - std::move(this->extendedTokens_), \ - this->hasWildcards_); \ - } \ - Child operator[](facebook::fboss::fsdb::OperPathElem elem) const& { \ - return Child( \ - {}, \ - {}, \ - copyAndExtendVec(this->extendedTokens_, std::move(elem)), \ - true /* hasWildcards */); \ - } \ - Child operator[](facebook::fboss::fsdb::OperPathElem elem)&& { \ - this->extendedTokens_.push_back(std::move(elem)); \ - return Child( \ - {}, {}, std::move(this->extendedTokens_), true /* hasWildcards */); \ +#define CONTAINER_CHILD_GETTERS(key_type) \ + Child operator[](key_type token) const& { \ + const std::string strToken = folly::to(token); \ + facebook::fboss::fsdb::OperPathElem elem; \ + elem.set_raw(strToken); \ + return Child( \ + copyAndExtendVec(this->tokens_, strToken), \ + copyAndExtendVec(this->idTokens_, strToken), \ + copyAndExtendVec(this->extendedTokens_, std::move(elem)), \ + this->hasWildcards_); \ + } \ + Child operator[](key_type token)&& { \ + const std::string strToken = folly::to(token); \ + this->tokens_.push_back(strToken); \ + this->idTokens_.push_back(strToken); \ + facebook::fboss::fsdb::OperPathElem elem; \ + elem.set_raw(strToken); \ + this->extendedTokens_.push_back(std::move(elem)); \ + return Child( \ + std::move(this->tokens_), \ + std::move(this->idTokens_), \ + std::move(this->extendedTokens_), \ + this->hasWildcards_); \ + } \ + Child operator[](facebook::fboss::fsdb::OperPathElem elem) const& { \ + return Child( \ + copyAndExtendVec(this->tokens_, pathElemToString(elem)), \ + copyAndExtendVec(this->idTokens_, pathElemToString(elem)), \ + copyAndExtendVec(this->extendedTokens_, std::move(elem)), \ + true /* hasWildcards */); \ + } \ + Child operator[](facebook::fboss::fsdb::OperPathElem elem)&& { \ + this->tokens_.push_back(pathElemToString(elem)); \ + this->idTokens_.push_back(pathElemToString(elem)); \ + this->extendedTokens_.push_back(std::move(elem)); \ + return Child( \ + std::move(this->tokens_), \ + std::move(this->idTokens_), \ + std::move(this->extendedTokens_), \ + true /* hasWildcards */); \ } class BasePath { @@ -117,7 +125,28 @@ class BasePath { } bool matchesPath(const std::vector& other) const { - return other == idTokens_ || other == tokens_; + if (other.size() != extendedTokens_.size()) { + return false; + } + using OperPathElem = facebook::fboss::fsdb::OperPathElem; + for (int i = 0; i < other.size(); i++) { + const auto& elem = extendedTokens_.at(i); + const auto& token = other.at(i); + if (elem.getType() == OperPathElem::Type::raw) { + if (token != idTokens_.at(i) && token != tokens_.at(i)) { + // raw token didn't match either id or name token + return false; + } + } else if (elem.getType() == OperPathElem::Type::regex) { + if (!re2::RE2::FullMatch(token, *elem.regex_ref())) { + return false; + } + } else if (elem.getType() == OperPathElem::Type::any) { + // always match + } + } + // no violations + return true; } std::string str() const { @@ -180,4 +209,6 @@ std::vector copyAndExtendVec( const std::vector& parents, facebook::fboss::fsdb::OperPathElem last); +std::string pathElemToString(const facebook::fboss::fsdb::OperPathElem& elem); + } // namespace thriftpath From 782a2837da49d289d1831eea484c51809a8b7110 Mon Sep 17 00:00:00 2001 From: Ron He Date: Fri, 18 Oct 2024 15:00:25 -0700 Subject: [PATCH 212/479] Reconstruct sw ports for attr CondEntropyRehashEnable and reachability group Summary: As titled. Also adding missing support for reachability group. Reviewed By: nivinl Differential Revision: D64452708 fbshipit-source-id: f6efff8b97cfcfafe92b26b18db348da3b47778b --- fboss/agent/hw/sai/switch/SaiPortManager.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index 4175d862bab16..777217426f9cf 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -1502,6 +1502,19 @@ std::shared_ptr SaiPortManager::swPortFromAttributes( auto prbsPolynomial = GET_OPT_ATTR(Port, PrbsPolynomial, attributes); prbsState.polynominal() = prbsPolynomial; port->setAsicPrbs(prbsState); + +#if defined(BRCM_SAI_SDK_GTE_12_0) && defined(BRCM_SAI_SDK_DNX) + auto reachabilityGroupId = GET_OPT_ATTR(Port, ReachabilityGroup, attributes); + if (reachabilityGroupId > 0) { + port->setReachabilityGroupId(reachabilityGroupId); + } +#endif + +// TODO(zecheng): Update flag when new 12.0 release has the attribute +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + port->setReachabilityGroupId( + GET_OPT_ATTR(Port, CondEntropyRehashEnable, attributes)); +#endif return port; } From 04325dfc42d577bc3e4b5850539f7c011acb7acd Mon Sep 17 00:00:00 2001 From: Ron He Date: Fri, 18 Oct 2024 15:00:25 -0700 Subject: [PATCH 213/479] Program condEntropyRehash Summary: As titled. Pass in conditional entropy value to create attributes Reviewed By: nivinl Differential Revision: D64452709 fbshipit-source-id: 48083e9452993efae0ef70017f18a838666500d3 --- fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index 193b6ec20551e..aba779e83c98f 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -639,6 +639,13 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( } #endif + std::optional + condEntropyRehashEnable{}; +// TODO(zecheng): Update flag when new 12.0 release has the attribute +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + condEntropyRehashEnable = swPort->getConditionalEntropyRehash(); +#endif + if (basicAttributeOnly) { return SaiPortTraits::CreateAttributes{ #if defined(BRCM_SAI_SDK_DNX) @@ -775,7 +782,7 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( arsPortLoadFutureWeight, // ARS port load future weight #endif reachabilityGroup, - std::nullopt, // CondEntropyRehashEnable + condEntropyRehashEnable, // CondEntropyRehashEnable std::nullopt, // CondEntropyRehashPeriodUS std::nullopt, // CondEntropyRehashSeed }; From a1efdb350128b26809f53969a86ad20da633220e Mon Sep 17 00:00:00 2001 From: Ron He Date: Fri, 18 Oct 2024 15:00:25 -0700 Subject: [PATCH 214/479] Init test to configure conditional entropy on all interface port Summary: Simple test to set conditional entropy enable on all interface ports. TODO: Add thread to change seed and verify next hop being updated. Reviewed By: nivinl Differential Revision: D64482629 fbshipit-source-id: 2c7403f56f48e66299582a8a81fd02df24b2e764 --- .../agent_hw_tests/AgentVoqSwitchTests.cpp | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp index 33fd1533a6bb0..36b2c8471f79e 100644 --- a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp @@ -2515,4 +2515,35 @@ TEST_F( verifyAcrossWarmBoots(setup, verify); } +class AgentVoqSwitchConditionalEntropyTest : public AgentVoqSwitchTest { + public: + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { + auto cfg = AgentVoqSwitchTest::initialConfig(ensemble); + // Enable Conditional Entropy on Interface Ports + for (auto& port : *cfg.ports()) { + if (port.portType() == cfg::PortType::INTERFACE_PORT) { + port.conditionalEntropyRehash() = true; + } + } + return cfg; + } +}; + +TEST_F(AgentVoqSwitchConditionalEntropyTest, init) { + auto setup = []() {}; + + auto verify = [this]() { + auto state = getProgrammedState(); + for (const auto& portMap : std::as_const(*state->getPorts())) { + for (const auto& port : std::as_const(*portMap.second)) { + if (port.second->getPortType() == cfg::PortType::INTERFACE_PORT) { + EXPECT_TRUE(port.second->getConditionalEntropyRehash()); + } + } + } + // TODO: Program ECMP route, insert traffic and verify change in next hop. + }; + verifyAcrossWarmBoots(setup, verify); +} } // namespace facebook::fboss From 4868c319bc010badebf9a52214b1ff44503946a1 Mon Sep 17 00:00:00 2001 From: Ron He Date: Fri, 18 Oct 2024 15:00:25 -0700 Subject: [PATCH 215/479] Gflag to use for updating seed for conditional entropy Summary: As titled. We'll use this Gflag to control whether we use CPU to update the seed for conditional entropy. Reviewed By: nivinl Differential Revision: D64488680 fbshipit-source-id: d54d7e269f790d97ce9c4a4f7dd17d3dc5e853a4 --- fboss/agent/AgentFeatures.cpp | 6 ++++++ fboss/agent/AgentFeatures.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/fboss/agent/AgentFeatures.cpp b/fboss/agent/AgentFeatures.cpp index 0b6142108994f..5b736d85a960f 100644 --- a/fboss/agent/AgentFeatures.cpp +++ b/fboss/agent/AgentFeatures.cpp @@ -157,3 +157,9 @@ DEFINE_bool( "Enable setting of unicast and multicast queue guaranteed buffer sizes"); DEFINE_bool(skip_buffer_reservation, false, "Enable skip reservation"); + +// TODO(zecheng): Remove this once firmware support is ready +DEFINE_bool( + conditional_entropy_cpu_seed_test_only, + false, + "Enable test-only feature for CPU updating conditional entropy seed"); diff --git a/fboss/agent/AgentFeatures.h b/fboss/agent/AgentFeatures.h index c09720491d6f4..ca896aff82537 100644 --- a/fboss/agent/AgentFeatures.h +++ b/fboss/agent/AgentFeatures.h @@ -64,3 +64,5 @@ DECLARE_bool(enable_balanced_intput_mode); DECLARE_int32(hw_agent_connection_timeout_ms); DECLARE_bool(qgroup_guarantee_enable); DECLARE_bool(skip_buffer_reservation); +// TODO(zecheng): Remove this once firmware support is ready +DECLARE_bool(conditional_entropy_cpu_seed_test_only); From 25d14c82e306d343e6170f27ca7343812c4cf8ca Mon Sep 17 00:00:00 2001 From: Ron He Date: Fri, 18 Oct 2024 15:00:25 -0700 Subject: [PATCH 216/479] Port manager helper to set seed for given port Summary: As titled. Setting conditional entropy seed for a given port Reviewed By: nivinl Differential Revision: D64488678 fbshipit-source-id: 425e10e153c261f87441270b16d15fe5427f9c1b --- fboss/agent/hw/sai/switch/SaiPortManager.cpp | 15 +++++++++++++++ fboss/agent/hw/sai/switch/SaiPortManager.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index 777217426f9cf..56eaa4d4251ea 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -2975,4 +2975,19 @@ void SaiPortManager::changeTxEnable( : false}); } } + +void SaiPortManager::updateConditionalEntropySeed(PortID portID, uint32_t seed) + const { +// TODO(zecheng): Update flag when new 12.0 release has the attribute +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + auto portHandle = getPortHandle(portID); + if (!portHandle) { + throw FbossError( + "Cannot update conditional entropy seed on non existent port: ", + portID); + } + portHandle->port->setOptionalAttribute( + SaiPortTraits::Attributes::CondEntropyRehashSeed{seed}); +#endif +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.h b/fboss/agent/hw/sai/switch/SaiPortManager.h index cb85fde890433..75ce96ce86686 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.h +++ b/fboss/agent/hw/sai/switch/SaiPortManager.h @@ -291,6 +291,8 @@ class SaiPortManager { bool rxFrequencyRPMSupported() const; bool rxSNRSupported() const; bool fecCodewordsStatsSupported(PortID portID) const; + // TODO(zecheng): Remove this once firmware support is ready + void updateConditionalEntropySeed(PortID portID, uint32_t seed) const; private: PortSaiId addPortImpl(const std::shared_ptr& swPort); From 055d3f4b7e0f1ec347203181fd9fb35d7febd81e Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Sat, 19 Oct 2024 09:35:16 -0700 Subject: [PATCH 217/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/f6c58c707013de3eb46e84863acbeaf7e7d89672 https://github.com/facebook/buck2-shims-meta/commit/a519d46b53167f543164c9417e0e54319dff0a56 https://github.com/facebook/fb303/commit/9d49a1723c189f081211acc2f839235012662f82 https://github.com/facebook/fbthrift/commit/843a1cc0b4dff3cefd4ee2f431ab3f74d418fbda https://github.com/facebook/folly/commit/1f718917dd8d9c2c825beda1f9fbbc2bc572bbad https://github.com/facebook/mvfst/commit/54b321dd2925f89b258e0270770413181870cba6 https://github.com/facebook/proxygen/commit/a24a48266084afbc801bdf7a1d8e1e97d695ee94 https://github.com/facebook/wangle/commit/1b99e6a07f4af9f0bac7c1dc275ecaab4f1f790c https://github.com/facebookexperimental/edencommon/commit/1d8f2d43a37caf79b04794c63624875ab9386232 https://github.com/facebookexperimental/rust-shed/commit/a0bbedbb5729b0e29ab03897d68cb0d78e34797d https://github.com/facebookincubator/fizz/commit/ecfef791a15c1321cb2888178eaf05d9fd2d8950 Reviewed By: bigfootjon fbshipit-source-id: dd4f98f01f6bc50e2b60aebe6d0c59eb92ba7d69 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 48739bff481b7..54d2642c83624 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 80e3fb11397d3c04126250a8c5b0bcad48100303 +Subproject commit 9d49a1723c189f081211acc2f839235012662f82 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 5fcea5a64258d..d7625c23d4cb9 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit a81fe64b93329093639ff15a0eace7cb85fcba73 +Subproject commit 843a1cc0b4dff3cefd4ee2f431ab3f74d418fbda diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 92e44fd357d53..9838dc4e35229 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 74e857c3773d3b125836fe78133a131db2f66fed +Subproject commit 1f718917dd8d9c2c825beda1f9fbbc2bc572bbad diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 0aa91b3f05e8d..3ce42177e40b7 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit d07f8672dcbc2cc7c76e9e414299c82a6a5dfdf2 +Subproject commit 1b99e6a07f4af9f0bac7c1dc275ecaab4f1f790c diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index a2c4d6e5378dd..3294306a20ad7 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 56482fd17b4f9a25cd1f2254ff4df1804aea879c +Subproject commit ecfef791a15c1321cb2888178eaf05d9fd2d8950 From a49f07d3bf391faaa87ed203e748e2f0a1b2ec14 Mon Sep 17 00:00:00 2001 From: Ravi Vantipalli Date: Sat, 19 Oct 2024 21:28:12 -0700 Subject: [PATCH 218/479] Fix corner case to reinit stats with change in pfc priorites Summary: Corner case where change in pfc priorities is not considered when reinitializing port stats # Before ``` { "id": 6, "name": "pg6", "scalingFactor": 6, "minLimitBytes": 4826, "headroomLimitBytes": 0, "resumeOffsetBytes": 4826, "bufferPoolName": "ingress_lossless_pool" }, ``` # After ``` { "id": 6, "name": "pg6", "scalingFactor": 9, "minLimitBytes": 4826, "headroomLimitBytes": 808736, "resumeOffsetBytes": 4826, "bufferPoolName": "ingress_lossless_pool" }, ``` Both scalingFactor and headroomLimitBytes changed. The headroomLimitBytes is considered when decided which PG has its PFC stats polled. After warmboot, the agent crashes with error ``` BcmPort.cpp:1725] failed to find port counter for key in_pfc_frames.priority6 and type 196, existing counters ``` Reviewed By: nivinl Differential Revision: D64448326 fbshipit-source-id: d21b5ee3d838e1d0e170d3df3e96b830424aaa01 --- fboss/agent/hw/bcm/BcmPort.cpp | 29 +++++++++- fboss/agent/hw/test/HwIngressBufferTests.cpp | 61 ++++++++++++++++++++ 2 files changed, 89 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/bcm/BcmPort.cpp b/fboss/agent/hw/bcm/BcmPort.cpp index 475d958cc5061..8b88052dfd1e5 100644 --- a/fboss/agent/hw/bcm/BcmPort.cpp +++ b/fboss/agent/hw/bcm/BcmPort.cpp @@ -107,6 +107,23 @@ bool hasPortQueueChanges( return false; } +// PfcPriorities is compiled taking headroom limit into consideration +// Refer to findEnabledPfcPriorities() +bool hasPfcPrioritiesChanged( + const shared_ptr& oldPort, + const shared_ptr& newPort) { + auto oldList = oldPort->getPfcPriorities(); + auto newList = newPort->getPfcPriorities(); + std::set oldPfcPriorities( + oldList.begin(), oldList.end()); + std::set newPfcPriorities( + newList.begin(), newList.end()); + if (oldPfcPriorities != newPfcPriorities) { + return true; + } + return false; +} + bool hasPfcStatusChangedToEnabled( const shared_ptr& oldPort, const shared_ptr& newPort) { @@ -1035,7 +1052,17 @@ void BcmPort::setupStatsIfNeeded(const std::shared_ptr& swPort) { if (!savedPort || swPort->getName() != savedPort->getName() || hasPortQueueChanges(savedPort, swPort) || - hasPfcStatusChangedToEnabled(savedPort, swPort)) { + hasPfcStatusChangedToEnabled(savedPort, swPort) || + hasPfcPrioritiesChanged(savedPort, swPort)) { + // PfcPriorities can be + // - added (2 -> 2,6) + // - deleted (2,6 -> 6) + // - updated (2,6 -> 2,7) + // Clear the existing counters and reinit the new list + if (savedPort) { + auto pfcPriorities = savedPort->getPfcPriorities(); + removePortPfcStatsLocked(lockedPortStatsPtr, swPort, pfcPriorities); + } reinitPortStatsLocked(lockedPortStatsPtr, swPort); } if (savedPort && hasPfcStatusChangedToDisabled(savedPort, swPort)) { diff --git a/fboss/agent/hw/test/HwIngressBufferTests.cpp b/fboss/agent/hw/test/HwIngressBufferTests.cpp index 59faeb194f881..1e06d0f266153 100644 --- a/fboss/agent/hw/test/HwIngressBufferTests.cpp +++ b/fboss/agent/hw/test/HwIngressBufferTests.cpp @@ -219,6 +219,67 @@ TEST_F(HwIngressBufferTest, validatePGParamChange) { verifyAcrossWarmBoots(setup, verify); } +// For each of the below transitions, ensure headroom is programmed +TEST_F(HwIngressBufferTest, validatePGHeadroomLimitChange) { + auto setup = [&]() { + // Start with PG0 and PG1 with non-zero headroom + setupHelper(); + + // Modify PG1 headroom value + // This ensure the new value is getting programmed after config update + std::map> portPgConfigMap; + auto portPgConfigs = getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {0}, 0); + portPgConfigs.push_back(getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {1}, 1)[0]); + portPgConfigMap["foo"] = portPgConfigs; + cfg_.portPgConfigs() = portPgConfigMap; + applyNewConfig(cfg_); + utility::checkSwHwPgCfgMatch( + getHwSwitch(), + getProgrammedState()->getPorts()->getNodeIf( + PortID(masterLogicalInterfacePortIds()[0])), + true /*pfcEnable*/); + + // Make PG1 headroom 0 and add a new PG2 with 0 headroom + portPgConfigs = getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {0}, 0); + portPgConfigs.push_back(getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {1}, 1, false)[0]); + portPgConfigs.push_back(getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {2}, 0, false)[0]); + portPgConfigMap["foo"] = portPgConfigs; + cfg_.portPgConfigs() = portPgConfigMap; + applyNewConfig(cfg_); + utility::checkSwHwPgCfgMatch( + getHwSwitch(), + getProgrammedState()->getPorts()->getNodeIf( + PortID(masterLogicalInterfacePortIds()[0])), + true /*pfcEnable*/); + + // Remove PG1 and update PG2 headrrom to non-zero + // This ensure counters are accurately updated per PG. PFC counters are + // are created only for non-zero headroom PGs + portPgConfigs = getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {0}, 0); + portPgConfigs.push_back(getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {2}, 0)[0]); + portPgConfigMap["foo"] = portPgConfigs; + cfg_.portPgConfigs() = portPgConfigMap; + applyNewConfig(cfg_); + }; + + auto verify = [&]() { + utility::checkSwHwPgCfgMatch( + getHwSwitch(), + getProgrammedState()->getPorts()->getNodeIf( + PortID(masterLogicalInterfacePortIds()[0])), + true /*pfcEnable*/); + }; + + verifyAcrossWarmBoots(setup, verify); +} + // Validate the Pg's pfc mode bit, by default we have been enabling // PFC on the port and hence on every PG. Force the port to have no // PFC. Validate that Pg's pfc mode is False now. From 1a90ab908fb0707a56fd02c103c362e6f411bda6 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Sun, 20 Oct 2024 09:35:16 -0700 Subject: [PATCH 219/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/854204088f94a2aa2e5d7f323f27784c894a65be https://github.com/facebook/fb303/commit/22ce5b2743c6b88df6475997e03c0d7f6358952a https://github.com/facebook/fbthrift/commit/af909fac4abc713ab1cd91c1cafd302c38a34c5c https://github.com/facebook/folly/commit/a6e3b26de735c5719b19dd1076089e128f389a47 https://github.com/facebook/mvfst/commit/6809d020e1792d58975e46e2eacb70bb81368115 https://github.com/facebook/proxygen/commit/1f2e31e87987f6178bb000c9254dd73a8bb4cb05 https://github.com/facebook/wangle/commit/888b37c463e0506fc2ec8e11c521a2f03a3cb44f https://github.com/facebookexperimental/edencommon/commit/399293ac7f69b831e0615c2a99673e349bcb5b5f https://github.com/facebookexperimental/rust-shed/commit/f2b747a982178ce9d068d377dff3d282657dd65a https://github.com/facebookincubator/fizz/commit/729cc4ba4ce66146d76b6eb86dfc60c55941853a Reviewed By: bigfootjon fbshipit-source-id: dd2b3928ab4c898a72e472aec47cad725e8df350 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 54d2642c83624..bd63463a45dac 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 9d49a1723c189f081211acc2f839235012662f82 +Subproject commit 22ce5b2743c6b88df6475997e03c0d7f6358952a diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index d7625c23d4cb9..ec238d011241d 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 843a1cc0b4dff3cefd4ee2f431ab3f74d418fbda +Subproject commit af909fac4abc713ab1cd91c1cafd302c38a34c5c diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 9838dc4e35229..862c9dee8ffec 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 1f718917dd8d9c2c825beda1f9fbbc2bc572bbad +Subproject commit a6e3b26de735c5719b19dd1076089e128f389a47 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 3ce42177e40b7..dc8e10e11efde 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 1b99e6a07f4af9f0bac7c1dc275ecaab4f1f790c +Subproject commit 888b37c463e0506fc2ec8e11c521a2f03a3cb44f diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 3294306a20ad7..7a0f0570d52bc 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit ecfef791a15c1321cb2888178eaf05d9fd2d8950 +Subproject commit 729cc4ba4ce66146d76b6eb86dfc60c55941853a From c3701b14a03e6f9495f83c7628dfa4d899f322d6 Mon Sep 17 00:00:00 2001 From: Srikrishna Gopu Date: Sun, 20 Oct 2024 16:18:12 -0700 Subject: [PATCH 220/479] move mirror manager to use port descriptor Summary: As titled, move mirror manager to use port descriptor Reviewed By: jasmeetbagga Differential Revision: D64632296 Privacy Context Container: L1125642 fbshipit-source-id: 3ec0065d9cc19b57b85dac7a6d5715de01e2d6a8 --- fboss/agent/MirrorManagerImpl.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/fboss/agent/MirrorManagerImpl.cpp b/fboss/agent/MirrorManagerImpl.cpp index 483364ed5a60c..337221a54abd3 100644 --- a/fboss/agent/MirrorManagerImpl.cpp +++ b/fboss/agent/MirrorManagerImpl.cpp @@ -77,9 +77,7 @@ std::shared_ptr MirrorManagerImpl::updateMirror( std::optional egressPortDesc = std::nullopt; if (mirror->configHasEgressPort()) { - egressPortDesc = mirror->getEgressPortDesc().has_value() - ? mirror->getEgressPortDesc().value() - : PortDescriptor(mirror->getEgressPort().value()); + egressPortDesc = PortDescriptor(mirror->getEgressPort().value()); } auto newMirror = std::make_shared( mirror->getID(), @@ -102,11 +100,9 @@ std::shared_ptr MirrorManagerImpl::updateMirror( } auto neighborPort = entry->getPort(); if (mirror->configHasEgressPort()) { - auto egressPort = mirror->getEgressPortDesc().has_value() - ? mirror->getEgressPortDesc().value().phyPortID() - : mirror->getEgressPort().value(); + egressPortDesc = mirror->getEgressPortDesc().value(); if (!neighborPort.isPhysicalPort() || - neighborPort.phyPortID() != egressPort) { + neighborPort.phyPortID() != egressPortDesc->phyPortID()) { // TODO: support configuring LAG egress for mirror continue; } @@ -155,7 +151,6 @@ std::shared_ptr MirrorManagerImpl::updateMirror( entry, newMirror->getTunnelUdpPorts())); newMirror->setEgressPortDesc(egressPortDesc.value()); - newMirror->setEgressPort(egressPortDesc.value().phyPortID()); break; } From ae634628b7f9d738a6f8c62dd307f426058a8dfc Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 20 Oct 2024 22:04:55 -0700 Subject: [PATCH 221/479] Add support for new buffer profile extn attr for OCB PFC threshold Summary: New extension attributes under buffer profile to specify OCB and combined OCB/DRAM min/max/xon_offset thresholds, will help protect OCB under severe buffer pressure. Reviewed By: jasmeetbagga Differential Revision: D64621447 fbshipit-source-id: 661df5b5d82a7be3af8cb977a1a4fb894a692e76 --- fboss/agent/hw/sai/api/BufferApi.h | 30 ++++++++++- fboss/agent/hw/sai/api/bcm/BufferApi.cpp | 40 +++++++++++++++ .../hw/sai/api/fake/FakeSaiExtensions.cpp | 20 ++++++++ fboss/agent/hw/sai/api/oss/BufferApi.cpp | 20 ++++++++ fboss/agent/hw/sai/api/tajo/BufferApi.cpp | 20 ++++++++ .../agent/hw/sai/api/tests/BufferApiTest.cpp | 4 ++ .../hw/sai/store/tests/BufferStoreTest.cpp | 4 ++ .../agent/hw/sai/switch/SaiBufferManager.cpp | 51 ++++++++++++++++++- fboss/agent/hw/sai/tracer/BufferApiTracer.cpp | 4 ++ 9 files changed, 190 insertions(+), 3 deletions(-) diff --git a/fboss/agent/hw/sai/api/BufferApi.h b/fboss/agent/hw/sai/api/BufferApi.h index e63fc24962950..57568a27f0a85 100644 --- a/fboss/agent/hw/sai/api/BufferApi.h +++ b/fboss/agent/hw/sai/api/BufferApi.h @@ -106,6 +106,26 @@ struct SaiBufferProfileTraits { }; using SharedFadtMaxTh = SaiExtensionAttribute; + struct AttributeSharedFadtMinTh { + std::optional operator()(); + }; + using SharedFadtMinTh = + SaiExtensionAttribute; + struct AttributeSramFadtMaxTh { + std::optional operator()(); + }; + using SramFadtMaxTh = + SaiExtensionAttribute; + struct AttributeSramFadtMinTh { + std::optional operator()(); + }; + using SramFadtMinTh = + SaiExtensionAttribute; + struct AttributeSramFadtXonOffset { + std::optional operator()(); + }; + using SramFadtXonOffset = + SaiExtensionAttribute; }; using AdapterKey = BufferProfileSaiId; using CreateAttributes = std::tuple< @@ -116,7 +136,11 @@ struct SaiBufferProfileTraits { std::optional, std::optional, std::optional, - std::optional>; + std::optional, + std::optional, + std::optional, + std::optional, + std::optional>; using AdapterHostKey = CreateAttributes; }; @@ -128,6 +152,10 @@ SAI_ATTRIBUTE_NAME(BufferProfile, XoffTh); SAI_ATTRIBUTE_NAME(BufferProfile, XonTh); SAI_ATTRIBUTE_NAME(BufferProfile, XonOffsetTh); SAI_ATTRIBUTE_NAME(BufferProfile, SharedFadtMaxTh); +SAI_ATTRIBUTE_NAME(BufferProfile, SharedFadtMinTh); +SAI_ATTRIBUTE_NAME(BufferProfile, SramFadtMaxTh); +SAI_ATTRIBUTE_NAME(BufferProfile, SramFadtMinTh); +SAI_ATTRIBUTE_NAME(BufferProfile, SramFadtXonOffset); struct SaiIngressPriorityGroupTraits { static constexpr sai_api_t ApiType = SAI_API_BUFFER; diff --git a/fboss/agent/hw/sai/api/bcm/BufferApi.cpp b/fboss/agent/hw/sai/api/bcm/BufferApi.cpp index bc35a2e8185a0..0f609340af649 100644 --- a/fboss/agent/hw/sai/api/bcm/BufferApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/BufferApi.cpp @@ -22,4 +22,44 @@ SaiBufferProfileTraits::Attributes::AttributeSharedFadtMaxTh::operator()() { #endif } +std::optional +SaiBufferProfileTraits::Attributes::AttributeSharedFadtMinTh::operator()() { +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_BUFFER_PROFILE_ATTR_SHARED_FADT_MIN_TH; +#else + return std::nullopt; +#endif +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMinTh::operator()() { +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_BUFFER_PROFILE_ATTR_SRAM_FADT_MIN_TH; +#else + return std::nullopt; +#endif +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMaxTh::operator()() { +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_BUFFER_PROFILE_ATTR_SRAM_FADT_MAX_TH; +#else + return std::nullopt; +#endif +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtXonOffset::operator()() { +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_BUFFER_PROFILE_ATTR_SRAM_FADT_XON_OFFSET; +#else + return std::nullopt; +#endif +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp index 2d4d3fe895789..81d2947e4e3fd 100644 --- a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp +++ b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp @@ -216,6 +216,26 @@ std::optional SaiSwitchTraits::Attributes:: return std::nullopt; } +std::optional +SaiBufferProfileTraits::Attributes::AttributeSharedFadtMinTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMinTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMaxTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtXonOffset::operator()() { + return std::nullopt; +} + const std::vector& SaiSwitchTraits::dramStats() { static const std::vector stats; return stats; diff --git a/fboss/agent/hw/sai/api/oss/BufferApi.cpp b/fboss/agent/hw/sai/api/oss/BufferApi.cpp index 5aeb313135b2c..0e2682dd7f447 100644 --- a/fboss/agent/hw/sai/api/oss/BufferApi.cpp +++ b/fboss/agent/hw/sai/api/oss/BufferApi.cpp @@ -9,4 +9,24 @@ SaiBufferProfileTraits::Attributes::AttributeSharedFadtMaxTh::operator()() { return std::nullopt; } +std::optional +SaiBufferProfileTraits::Attributes::AttributeSharedFadtMinTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMinTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMaxTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtXonOffset::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tajo/BufferApi.cpp b/fboss/agent/hw/sai/api/tajo/BufferApi.cpp index 5aeb313135b2c..0e2682dd7f447 100644 --- a/fboss/agent/hw/sai/api/tajo/BufferApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/BufferApi.cpp @@ -9,4 +9,24 @@ SaiBufferProfileTraits::Attributes::AttributeSharedFadtMaxTh::operator()() { return std::nullopt; } +std::optional +SaiBufferProfileTraits::Attributes::AttributeSharedFadtMinTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMinTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMaxTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtXonOffset::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tests/BufferApiTest.cpp b/fboss/agent/hw/sai/api/tests/BufferApiTest.cpp index 8564aee4cbc19..c258b7a38a4ea 100644 --- a/fboss/agent/hw/sai/api/tests/BufferApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/BufferApiTest.cpp @@ -69,6 +69,10 @@ class BufferApiTest : public ::testing::Test { xoffTh, xonTh, xonOffsetTh, + std::nullopt, + std::nullopt, + std::nullopt, + std::nullopt, std::nullopt}; return bufferApi->create(c, 0); } diff --git a/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp b/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp index 3ef8e47f5ab15..1ea3f99987ddf 100644 --- a/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp @@ -58,6 +58,10 @@ class BufferStoreTest : public SaiStoreTest { xoffTh, xonTh, xonOffsetTh, + std::nullopt, + std::nullopt, + std::nullopt, + std::nullopt, std::nullopt}; } BufferProfileSaiId createBufferProfile(BufferPoolSaiId _pool) { diff --git a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp index 38a9c280429a2..90373aec9c7c6 100644 --- a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp @@ -514,6 +514,14 @@ SaiBufferProfileTraits::CreateAttributes SaiBufferManager::profileCreateAttrs( } std::optional sharedFadtMaxTh; + std::optional + sharedFadtMinTh{}; + std::optional + sramFadtMaxTh{}; + std::optional + sramFadtMinTh{}; + std::optional + sramFadtXonOffset{}; #if defined(BRCM_SAI_SDK_DNX_GTE_11_0) if (queue.getMaxDynamicSharedBytes()) { sharedFadtMaxTh = queue.getMaxDynamicSharedBytes().value(); @@ -521,9 +529,28 @@ SaiBufferProfileTraits::CreateAttributes SaiBufferManager::profileCreateAttrs( // use default value 0 sharedFadtMaxTh = 0; } +#endif +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + // Unused, set default value as 0 + sharedFadtMinTh = 0; + sramFadtMaxTh = 0; + sramFadtMinTh = 0; + sramFadtXonOffset = 0; #endif return SaiBufferProfileTraits::CreateAttributes{ - pool, reservedBytes, mode, dynThresh, 0, 0, 0, sharedFadtMaxTh}; + pool, + reservedBytes, + mode, + dynThresh, + 0, + 0, + 0, + sharedFadtMaxTh, + sharedFadtMinTh, + sramFadtMaxTh, + sramFadtMinTh, + sramFadtXonOffset}; } void SaiBufferManager::setupBufferPool( @@ -583,10 +610,26 @@ SaiBufferManager::ingressProfileCreateAttrs( } std::optional sharedFadtMaxTh; + std::optional + sharedFadtMinTh; + std::optional + sramFadtMaxTh; + std::optional + sramFadtMinTh; + std::optional + sramFadtXonOffset; #if defined(BRCM_SAI_SDK_DNX_GTE_11_0) // use default 0 since this attribute currently only used by profile for // cpu/eventor/rcy port queues sharedFadtMaxTh = 0; +#endif +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + // TODO: Populate based on config + sharedFadtMinTh = 0; + sramFadtMaxTh = 0; + sramFadtMinTh = 0; + sramFadtXonOffset = 0; #endif return SaiBufferProfileTraits::CreateAttributes{ pool, @@ -596,7 +639,11 @@ SaiBufferManager::ingressProfileCreateAttrs( xoffTh, xonTh, xonOffsetTh, - sharedFadtMaxTh}; + sharedFadtMaxTh, + sharedFadtMinTh, + sramFadtMaxTh, + sramFadtMinTh, + sramFadtXonOffset}; } std::shared_ptr SaiBufferManager::getOrCreateIngressProfile( diff --git a/fboss/agent/hw/sai/tracer/BufferApiTracer.cpp b/fboss/agent/hw/sai/tracer/BufferApiTracer.cpp index 633e5f581b53d..cd46faccfe0ba 100644 --- a/fboss/agent/hw/sai/tracer/BufferApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/BufferApiTracer.cpp @@ -45,6 +45,10 @@ std::map> _IngressPriorityGroupMap{ void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(BufferProfile, SharedFadtMaxTh) + SAI_EXT_ATTR_MAP(BufferProfile, SharedFadtMinTh) + SAI_EXT_ATTR_MAP(BufferProfile, SramFadtMaxTh) + SAI_EXT_ATTR_MAP(BufferProfile, SramFadtMinTh) + SAI_EXT_ATTR_MAP(BufferProfile, SramFadtXonOffset) } } // namespace From 32cfb973989647d052e845e515ac2d511791f236 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 20 Oct 2024 22:04:55 -0700 Subject: [PATCH 222/479] Add support for new switch extn attr for OCB global xoff/xon threshold Summary: New switch extension attribute to set the global OCB XON/XOFF percentage thresholds. Reviewed By: jasmeetbagga Differential Revision: D64643237 fbshipit-source-id: e56d00e80e84321f819beb65d872afec88250f46 --- fboss/agent/hw/sai/api/SwitchApi.h | 20 ++++++++++++++++++- fboss/agent/hw/sai/api/bcm/SwitchApi.cpp | 20 +++++++++++++++++++ .../hw/sai/api/fake/FakeSaiExtensions.cpp | 10 ++++++++++ .../agent/hw/sai/api/fake/saifakeextensions.h | 2 ++ fboss/agent/hw/sai/api/oss/SwitchApi.cpp | 11 ++++++++++ fboss/agent/hw/sai/api/tajo/SwitchApi.cpp | 10 ++++++++++ fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp | 2 ++ fboss/agent/platforms/sai/SaiPlatform.cpp | 2 ++ 8 files changed, 76 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/api/SwitchApi.h b/fboss/agent/hw/sai/api/SwitchApi.h index ca79d6232683d..f81ca940dd8d4 100644 --- a/fboss/agent/hw/sai/api/SwitchApi.h +++ b/fboss/agent/hw/sai/api/SwitchApi.h @@ -559,6 +559,20 @@ struct SaiSwitchTraits { std::vector, AttributeFabricLinkLayerFlowControlThreshold, SaiU32ListDefault>; + struct AttributeSramFreePercentXoffThWrapper { + std::optional operator()(); + }; + using SramFreePercentXoffTh = SaiExtensionAttribute< + sai_uint8_t, + AttributeSramFreePercentXoffThWrapper, + SaiIntDefault>; + struct AttributeSramFreePercentXonThWrapper { + std::optional operator()(); + }; + using SramFreePercentXonTh = SaiExtensionAttribute< + sai_uint8_t, + AttributeSramFreePercentXonThWrapper, + SaiIntDefault>; }; using AdapterKey = SwitchSaiId; using AdapterHostKey = std::monostate; @@ -627,7 +641,9 @@ struct SaiSwitchTraits { #endif std::optional, std::optional, - std::optional>; + std::optional, + std::optional, + std::optional>; #if SAI_API_VERSION >= SAI_VERSION(1, 12, 0) static constexpr std::array CounterIdsToRead = { @@ -760,6 +776,8 @@ SAI_ATTRIBUTE_NAME(Switch, ArsProfile) #endif SAI_ATTRIBUTE_NAME(Switch, ReachabilityGroupList); SAI_ATTRIBUTE_NAME(Switch, FabricLinkLayerFlowControlThreshold); +SAI_ATTRIBUTE_NAME(Switch, SramFreePercentXoffTh); +SAI_ATTRIBUTE_NAME(Switch, SramFreePercentXonTh); template <> struct SaiObjectHasStats : public std::true_type {}; diff --git a/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp b/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp index 681f65a34a6d3..433dd76627361 100644 --- a/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp @@ -72,6 +72,26 @@ SaiSwitchTraits::Attributes::AttributeSdkBootTimeWrapper::operator()() { return SAI_SWITCH_ATTR_CUSTOM_RANGE_START + 1; } +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXoffThWrapper::operator()() { +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XOFF_TH; +#else + return std::nullopt; +#endif +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXonThWrapper::operator()() { +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XON_TH; +#else + return std::nullopt; +#endif +} + const std::vector& SaiSwitchTraits::dramStats() { #if defined(BRCM_SAI_SDK_DNX) static const std::vector stats{ diff --git a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp index 81d2947e4e3fd..7d65f3a49ab8b 100644 --- a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp +++ b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp @@ -312,6 +312,16 @@ std::optional SaiSwitchTraits::Attributes:: return SAI_SWITCH_ATTR_FABRIC_LLFC_THRESHOLD; } +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXoffThWrapper::operator()() { + return SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XOFF_TH; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXonThWrapper::operator()() { + return SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XON_TH; +} + std::optional SaiPortSerdesTraits::Attributes::AttributeTxDiffEncoderEnWrapper::operator()() { return SAI_PORT_SERDES_ATTR_EXT_TX_DIFF_ENCODER_EN; diff --git a/fboss/agent/hw/sai/api/fake/saifakeextensions.h b/fboss/agent/hw/sai/api/fake/saifakeextensions.h index 877d7afc683e9..1b29e78d8cbf8 100644 --- a/fboss/agent/hw/sai/api/fake/saifakeextensions.h +++ b/fboss/agent/hw/sai/api/fake/saifakeextensions.h @@ -74,6 +74,8 @@ typedef enum _sai_switch_extensions_attr_t { SAI_SWITCH_ATTR_VOQ_LATENCY_MAX_LEVEL_2, SAI_SWITCH_ATTR_REACHABILITY_GROUP_LIST, SAI_SWITCH_ATTR_FABRIC_LLFC_THRESHOLD, + SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XOFF_TH, + SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XON_TH, } sai_switch_extensions_attr_t; typedef enum _sai_tam_event_extensions_attr_t { diff --git a/fboss/agent/hw/sai/api/oss/SwitchApi.cpp b/fboss/agent/hw/sai/api/oss/SwitchApi.cpp index a19f6c84fca7e..029fa3ab8d4c4 100644 --- a/fboss/agent/hw/sai/api/oss/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/oss/SwitchApi.cpp @@ -162,4 +162,15 @@ std::optional SaiSwitchTraits::Attributes:: AttributeFabricLinkLayerFlowControlThreshold::operator()() { return std::nullopt; } + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXoffThWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXonThWrapper::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp b/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp index 2bab60388a7a7..856d1509e498d 100644 --- a/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp @@ -183,4 +183,14 @@ std::optional SaiSwitchTraits::Attributes:: AttributeFabricLinkLayerFlowControlThreshold::operator()() { return std::nullopt; } + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXoffThWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXonThWrapper::operator()() { + return std::nullopt; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp b/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp index a2dd00c35aae2..32703a1ffdf19 100644 --- a/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp @@ -124,6 +124,8 @@ void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(Switch, ReachabilityGroupList); SAI_EXT_ATTR_MAP(Switch, DelayDropCongThreshold); SAI_EXT_ATTR_MAP(Switch, FabricLinkLayerFlowControlThreshold); + SAI_EXT_ATTR_MAP(Switch, SramFreePercentXoffTh); + SAI_EXT_ATTR_MAP(Switch, SramFreePercentXonTh); } } // namespace diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index 17852c377a28b..9c9ff010cbc8f 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -678,6 +678,8 @@ SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes( std::nullopt, // ReachabilityGroupList delayDropCongThreshold, // Delay Drop Cong Threshold fabricLLFC, + std::nullopt, // SRAM free percent XOFF threshold + std::nullopt, // SRAM free percent XON threshold }; } From 5bbb6211c1e5688690ff3cb9eeee67182b285ec5 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Mon, 21 Oct 2024 04:06:29 -0700 Subject: [PATCH 223/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/7ca3b3d224894efb8c783bc350bc4ecfebe9fdc4 https://github.com/facebook/fb303/commit/648dc1e0eeea0e4a4c804a07352c329b3b71b26d https://github.com/facebook/fbthrift/commit/044cf81de37c799c7dbd4d5dd4d22526b978e976 https://github.com/facebook/folly/commit/10817a62c50ac24bf16d3ec6fda8c5152a53737e https://github.com/facebook/mvfst/commit/c4dd9d8da5250e95eff21edd75cf43e43230e603 https://github.com/facebook/proxygen/commit/d8d681c7443d46a31db7d66fcfff1c150a473c82 https://github.com/facebook/wangle/commit/7916247d939bf41cd1da818a290afe39f4a90af3 https://github.com/facebookexperimental/edencommon/commit/96b6fa842cb90b2eae3f7d42c0a92150c139c4a6 https://github.com/facebookexperimental/rust-shed/commit/e1150408e2b8a02d87f957b55be0e603f2911cb3 https://github.com/facebookincubator/fizz/commit/ebba1870a2088598af35dc42cb3d6d2d78ee416b Reviewed By: bigfootjon fbshipit-source-id: d7353addcd878a7d351ddd73a5b9aa818019d7e0 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index bd63463a45dac..7c38bf5ad1fb1 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 22ce5b2743c6b88df6475997e03c0d7f6358952a +Subproject commit 648dc1e0eeea0e4a4c804a07352c329b3b71b26d diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index ec238d011241d..662f63c59c591 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit af909fac4abc713ab1cd91c1cafd302c38a34c5c +Subproject commit 044cf81de37c799c7dbd4d5dd4d22526b978e976 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 862c9dee8ffec..fa21338498e89 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit a6e3b26de735c5719b19dd1076089e128f389a47 +Subproject commit 10817a62c50ac24bf16d3ec6fda8c5152a53737e diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index dc8e10e11efde..ddbdc374c9817 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 888b37c463e0506fc2ec8e11c521a2f03a3cb44f +Subproject commit 7916247d939bf41cd1da818a290afe39f4a90af3 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 7a0f0570d52bc..43eeeebd4be45 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 729cc4ba4ce66146d76b6eb86dfc60c55941853a +Subproject commit ebba1870a2088598af35dc42cb3d6d2d78ee416b From 524ab32444b8fa5b4acdb73e055ed22f1047ecb8 Mon Sep 17 00:00:00 2001 From: Cullen Walsh Date: Mon, 21 Oct 2024 08:58:03 -0700 Subject: [PATCH 224/479] Add go_bootstrap toolchain target Summary: Got an error when testing build of facebookincubator/phabtest_rust. Adding this target to the shims seems to fix it. Reviewed By: bigfootjon Differential Revision: D64618954 fbshipit-source-id: 4ea6b868647ea450a330b82b51eb94707ffa40cb --- shim/BUCK | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shim/BUCK b/shim/BUCK index 30019fa0007ee..42230090524af 100644 --- a/shim/BUCK +++ b/shim/BUCK @@ -7,7 +7,7 @@ load("@prelude//toolchains:cxx.bzl", "system_cxx_toolchain") load("@prelude//toolchains:genrule.bzl", "system_genrule_toolchain") -load("@prelude//toolchains:go.bzl", "system_go_toolchain") +load("@prelude//toolchains:go.bzl", "system_go_bootstrap_toolchain", "system_go_toolchain") load("@prelude//toolchains:haskell.bzl", "system_haskell_toolchain") load("@prelude//toolchains:ocaml.bzl", "system_ocaml_toolchain") load("@prelude//toolchains:python.bzl", "system_python_bootstrap_toolchain", "system_python_toolchain") @@ -38,6 +38,11 @@ system_go_toolchain( visibility = ["PUBLIC"], ) +system_go_bootstrap_toolchain( + name = "go_bootstrap", + visibility = ["PUBLIC"], +) + system_haskell_toolchain( name = "haskell", visibility = ["PUBLIC"], From c26527b42e8c223956e6123457ac0bcfcfca68c4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 21 Oct 2024 12:40:27 -0700 Subject: [PATCH 225/479] Janga/Tahan:config: remove fan led entry from fan_service config file (#275) Summary: Description For Janga and Tahan project, the FAN LEDs are controlled by hardware. So remove the FAN LED entries from fan_service config file. Test log: For Janga project: ![image](https://github.com/user-attachments/assets/3a648c27-e393-437d-811c-1762ce93f9c6) For Tahan project: ![image](https://github.com/user-attachments/assets/377ccdbe-6ca2-466e-9f41-edb8b2e27280) Attach the detailed log: [Janga_DVT_fanled_log.txt](https://github.com/user-attachments/files/17390712/Janga_DVT_fanled_log.txt) [TH5_DVT_fanled_log.txt](https://github.com/user-attachments/files/17390715/TH5_DVT_fanled_log.txt) Pull Request resolved: https://github.com/facebook/fboss/pull/275 Reviewed By: kimdo8736 Differential Revision: D64577179 Pulled By: mikechoifb fbshipit-source-id: 235c3fca214b14721df1a0a724ccb9651f42a513 --- .../configs/janga800bic/fan_service.json | 16 ---------------- .../platform/configs/tahan800bc/fan_service.json | 16 ---------------- 2 files changed, 32 deletions(-) diff --git a/fboss/platform/configs/janga800bic/fan_service.json b/fboss/platform/configs/janga800bic/fan_service.json index da8d1e891b79c..7d0dfc60b044e 100644 --- a/fboss/platform/configs/janga800bic/fan_service.json +++ b/fboss/platform/configs/janga800bic/fan_service.json @@ -114,7 +114,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan1_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -128,7 +127,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan2_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -142,7 +140,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan3_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -156,7 +153,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan4_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -170,7 +166,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan5_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -184,7 +179,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan6_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -198,7 +192,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan7_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -212,7 +205,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan8_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -226,7 +218,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan1_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -240,7 +231,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan2_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -254,7 +244,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan3_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -268,7 +257,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan4_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -282,7 +270,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan5_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -296,7 +283,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan6_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -310,7 +296,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan7_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -324,7 +309,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan8_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, diff --git a/fboss/platform/configs/tahan800bc/fan_service.json b/fboss/platform/configs/tahan800bc/fan_service.json index adfa780d468ed..f435222c5a3c0 100644 --- a/fboss/platform/configs/tahan800bc/fan_service.json +++ b/fboss/platform/configs/tahan800bc/fan_service.json @@ -114,7 +114,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan1_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -128,7 +127,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan2_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -142,7 +140,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan3_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -156,7 +153,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan4_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -170,7 +166,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan5_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -184,7 +179,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan6_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -198,7 +192,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan7_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -212,7 +205,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan8_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -226,7 +218,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan1_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -240,7 +231,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan2_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -254,7 +244,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan3_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -268,7 +257,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan4_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -282,7 +270,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan5_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -296,7 +283,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan6_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -310,7 +296,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan7_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -324,7 +309,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan8_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, From 1e33ee6db3e0b57fcbe959f967460a2be73a5fb3 Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Mon, 21 Oct 2024 12:56:21 -0700 Subject: [PATCH 226/479] ld library path for chenab sdk Summary: as titled Reviewed By: srikrishnagopu Differential Revision: D64638757 fbshipit-source-id: 52402638f8164f32e78ea2406dc20a0d3fdec054 --- fboss/lib/test/test_version.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fboss/lib/test/test_version.sh b/fboss/lib/test/test_version.sh index dfd2e03f35bfb..4301c4b50ded2 100755 --- a/fboss/lib/test/test_version.sh +++ b/fboss/lib/test/test_version.sh @@ -1,4 +1,2 @@ #!/bin/bash -if [[ "$2" == "no" ]]; then - $1 --version | grep "Package Version" -fi +$1 --version | grep "Package Version" From 4dc9d0083612a10de0177d1d87d16393d5bc98a1 Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Mon, 21 Oct 2024 13:58:04 -0700 Subject: [PATCH 227/479] Generate new stable commits for FBOSS Summary: Generate a new set of stable commits for FBOSS via the following script: ``` ./fboss/facebook/scripts/gen-stable-commits-tarball.py --opensource_dir ./opensource/ --out /tmp ``` Reviewed By: srikrishnagopu Differential Revision: D64708554 fbshipit-source-id: 22c9d9cd375d244996bfdeb40f9e8140d62feecd --- .../github_hashes_10212024_124153.tar.gz | Bin 0 -> 21795 bytes .../stable_commits/latest_stable_hashes.tar.gz | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 fboss/oss/stable_commits/github_hashes_10212024_124153.tar.gz diff --git a/fboss/oss/stable_commits/github_hashes_10212024_124153.tar.gz b/fboss/oss/stable_commits/github_hashes_10212024_124153.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..0723a2733850527ca2ce89d49b8847d2462cdf67 GIT binary patch literal 21795 zcmY&fpwJ<6LqBiI%aGV@8(q z#XdWkolJTm#s$))n#VPbPox{H&7H%iGjTY2D{4qD&?~d{=i8a$;gi8IbvbFjy{v5#` zvd$=4?`7{4OoT!TD!CqrzAUcGJ?^^?U4*h=!+!*tkpp10zwxOLq-~Jf%V(A9 zy_32CgMh~yFu-&BP@AseOhb%v2$4FtxrOPdmjSQ`NbkQdkAz^*v)GFQ=`9!-G}LzX zpH()2z)RUoe&7+<=>g`7zi=(sGLMl5$_lmtH&ToR2mdZsx`Q=lT8_eh53~XXaR`-3 zfJ9)#I=kjzPzZs|e@+4-zSAJHQf2sOH}~+(+*6ZtV=8B$MxdB}t~ff()sbt1JQhGe z%6>fn72ka)!ejC!fb|Ho;9MyD2|_kQ5zCuOVMlK+j-ik>Bo?S+pS6-tE1_bWkT%i8 zHz~>jBm!wJ!MnY~05vora~PBWh~HXFCi}n4kz<0qMhr%UEx|tq_|7c6s3@6#PZ0oFYry3#WwQZXp63ycOTcK+0F>Cc zp^pgC^p?qg(D|ZeN25y^^>xDy39O!01Eu|-)nU-_IY8P6c;dmZN`c*j)?ok_s5DAi zK0MI=_^>O*!20(VL`}w*9*J3g)9Mi2lwC; zKwyWZZ5TiWE(N>q?3RF>+bbaHjJ60pQX79FX+DfCHoPD|T!?>`%A5WrjuSfUa_by^ zl@8H>JMhoVAOQ|CTB?Grpr!r0z}qtm0UK)~@(~OreDAt+OJ3$*tNfU8gfY@DJZN^F z79KsI0y*<4vZ%TdT)=p!ovpK+=GVuK}6&PR@D58I7G?TMY0TG3ya28d`ijT zx=O+R|2^v_5IGE}L3@)|1jF-q5N^qjKz-d%K>3z-$Pl08OXkohe-(}}e}57qUowfK zYt}oZ;77UFYpNI zRomt`ziQ!MFE=t zkP!*!|5^WD{OXf6bmRbdgi2xUFM;F9O^!C-0511&2@&XZ!E`V|>;?3aPj zm)DoRb)2(Xf|+^?h0x2k=Y$FGUisPVdgvv$gxYdqNxtT`3RF>a3{ypdJ#Ld>?+?4h2|O7VbQAK%T5WM9ULz)x^?vF6b_ zI|aPG9;iGxFiXz>{GsrG16lCG#_ZCLBpUIe0asE0qi^{sV0w={l@O)VJkTgH8Ut}F zK2}!$u;v4EHygUQp);9e zbXmU)32k_>P#or!Yr?fj-jaI{+7u=6^;49naP9;NS}!a=Pg!;z*z(Q=XaGrA0DL3!%v_@)lU+9i2wQ~%8_)fQL4JdWmQhNEah?f? z=)@zUzrt2U1!D+fxkOAYYj%}i6X?(jl7)!Q)yJcw*A#!6b}q4b#@`|SY}rxa@fX%l zY+JEUY9YJ-gkS_ftV8hues+t`&uu>lXAE|tnF2aJu|Vp3s1zZrRt)MMfG{VKS5imA zTxs?Z$@OK;uO=#s9jzt@DFnt(nNIz2^&!LKmNjy5LWIVYL-c*D0`)D#O>r-u(YrBX z%xc-%#L9U^K7Q1zjPM~EdQ|)5F=-)j2a9Z60)5Tt6@A#h^Y0coJ0A2awTQTVdVJwo zj0W)N19W?y-OuRk3PVc+{T>ruUR?k-+n|kYzh{6)Zr@OR;JO4q`-VEjF$pZS7-Ob-5@bM%y^KAx<2~N0{5u;X^_*kn>Ln zoP&YWNWkA*pH@o9y$>|>mKKO^1tdveow(qSfL6MJ#opc@z2q!tMPSowG~@3)N>|}U zjI^YQA)HomN(9seZ?kx?a3-X`Y^lhz1Q~r)q~B4MAL1<$B9gE*mSYrrM&)daGKA^< zozDPYiIaaZU-QST5nE)4eD;Z1>s5;2RZzpSqXT1Vv>LYMKqf~?VnNcS0ighu$+Jlx z**D5zZL)NF_51{MmeL$mOworMNl3|6RkmM3$Yp%*d_4&R@lcQr@QYQ9P!_O}%7r-D z%eB$D3s_SmI6|G7Dq~=iWJPdAT%}k|VP8iJW=_C_Q`rn|-A5#Z*X*z1?07Xonm9o^qNp|!cxf!jalr}hG8`ioj+w$tv=8F049xv~gLPdr8~ff+fYZvfMw3r;;&rf;36iUq`=gC1m4L_0X>dhjQsT zZ}?F>b01Uj+D!!ffXBVUD0gPVYheP3S@Wltk?VXA6HkHPA4TtcW!o=Z8SZWFsT>zh zbO!^0+p}Zt2+g6xAtP8TxG59%?;rtFUPa_lQv1$cC?oIm)%K$?)t`MHv83aW^oG=M z2+!OF(qSDa+9dPjzpNX%D&zj+%)(&wW~?=I`;5KZeuLL>YE@?bYjuY^Ltpn){M-lS zs>#k^H==d)ta*lFwT~`0-ESe4YL3j`4{e3eS5xg}U31^8&wXPnHaqqMy^GF6E4{_zh3!JcP}taEh5k;URmnn z*YJ`T4bb*CPt&6#^`R9*=5J_I<-c(QB^k&d@~e4-lrJVcYpx1mnF<+f@UrmK`vrM{ z^^U#KDbe<77+6@zhR~w%3&^l}B)cBgQ05>Dpb;_^=T|mxmtGcneipyLMl$(zxkdYV zAYR{X{IV(RaNew&!lK5_DVeL*Y|b16f=OhK^h=`-Z7?a1z8G^cc!6cagd1$C*H_5` z?nG?@ziZCv(U{f!jL9otv_N~~m2ROn?5={;ZM z$!j|l1>Px~)Mr6KZaOcyGyvYf)$iM2^RB?hztAgqIk|BFd|vrq9YaU%z zMe7J4*VPFmB%Ph-B{ai88ZGJ35S4CeT}TSbiaB!&TRhAnXp!JR_+T1WwsE{C8D)MH z6#I>0DMJvzJ4cT%%#D&}=O!2|K=`gq=A4wqheTn;U_?gF@QIFQ7u~y}nUNETfWR%$ zJ~^>@6J(KFZ~s?(_1V!PHY!kYg?d<+LX+eyS{~pd({9Rn(Vx_iKk2@7xX+w&DUaq< zh-tKr9pQTx8i@AU2rs);g6;B@yE@QvmJ@xoQSU)ykMgL*;m-Q3asQuWZ4QH+0|+pe za@+g5+bOb@LD2pUkPr^|L_&VfndGl2p4Ujf{4#PuUF?Lj513ehv9qnP%;dxf8Te%% zbRw6MGSP*rJop9kJsYJwyAffWzv_38to!ApeFwn~1Egkefq`2MUaW^($O-T{9FW`vg!dS~&!E@q z({ZwevQLFd2u;|_aOs1mhm0%i^toE+>tLD|K%`QFzMe0m&D`6M=6B@FO)XQ&$4dSp zT)jAHjlIliYj$K(ZyT=FS87dFxQ8;{$xlZKh6XO@V6Qow)cL~F_IV~(3)w6odqCP17G zoq-Yg8$q&emMHdfSu!PEN|JDFq9R!~HCJhQiO(u!*gxnj@xPOy4~fvq+KX8DAQcY# z`#WPH=zUSjyUn`ql*z9~sNPB3A<3b$%!HdnO#fK9u8%A$y6U8aK?nUE0 zw1wNrRvDCUqBv|XWahB>E&VI^YMPvzzCmwEk}2nqMozlH{n{r3QWGZq|S@Ckrg^7IZ@4~E$ z33eCdl|$;1el15BM=1}dDi`u9CL5{scN(I!x=}3REc>AI8#iXOhAuMvymSCd+zm^q zTXazcrvHPU{^>aIwt7c0*ijs`=PBreKR`(x{eT2I`hW0G0Cg~rlx272l9tSG^n_&^ zzfE*LCQ)AJKIcya4XF{yo(w8wx>S{9uC`>D^~JK<6{7OQ#4Q9e$R6jZ-EI)UtbnZQ zZ5M{nV~dVfiQ=z0Uf}LmKP2z<7J2ME$M2q?z&`7UiVfO-)?) zlLd`DEN%7VRTpK3R}%BeJ3+OIeN_Y5#Z8vc)==v#wVX6x@*LE7ySHotMRrEt>UeGt zm?7@GE$&kk6gnoK)+E$CQ1$g1>FXE1v&Z~aCDi_PZ{{?gkFe7=C|Lf}5^)J@dLh3a zm11#k)uy#FW&eKTdpE}cn0^X%aMqtR^V5pcSXsbbssD8g_ujSnfp%{f`nm}>W%lt! zsbKlXmWZ7@s*rVG`)&Lt{S%f?T)(JlE_OCXWt4W6i($2Pbf3Ixlp6djLuB;@SW#KH zd+Qbb7WWMB$G=8~<_E`qnuvX2LBdp=p}FY$Cn1y{ug21oFcp%lpfhe%!_rKr+r1{V z>OZ=OUAeOV;ji!XtEtnm zvGir}ZQYmo|KZ``MoN*(dMw9O{oTQSD<_}}!#ABEl=OZ$s@5ZaJK?n1*HL@a-QxQ$ z==RfGyOs&wG2!}nIZO4W3}5!xU|EZsA7skMGg(j5mfuaR(MPJ0v!D_*9ZYoSuLYuC zhdL5v)4lQy^*fGe%k~vlF`Kdf5I-ls;D4G@|8>@-)MXpbi(vesVb)7)abn_v;~;Ek zg69D9g);wFZk$vZ?X*5eVN7$sIWAU*JANUVP7!j(g#!Hq1Ha!QptRN=(Z-Rc^J6~u zb>h@r?Wy5Lr=YvO^}eBDpPYnT_E-=emN1@>F%Ub)MO5ZuUg1UyB*k7FNaBp8KAGv+a8(-R&S2OJvI^LoK9@tmZ;z}*EKn_w99f@9Y?i!Z2AtR;tl)nCE@!IP>9we z|4~;-1So+@{_*V=jT-RwK(YpP9z^^5p%!-WV6Gu~NO1%Cy0|e5x~V8V$$qfVIlSwM zg_SbUW>qD>{=LL^|6xMsu=S8oH>j;MZ7a3lkmqoh>z%XT^PYg~l50NL@!()~m45ENX?_j_VOBtS_?L(%Icnk)cn_@m)B7oLKGF2WBE;)YB%xEP?Rf^ zykF|sv9i~37t#3}7reKj<=!f7uOo68%Sz-Z-|pTdm6YV{4x6C3ylUzEaMC;E?$rDN z(utyf)W0z}0qS`r6>vXrR~DcHyljI!Vdj6b6(DyD>SnF*qm>kLUjT^VxspX5o~@pW zK3MI~ZdKymaT;d@w1S#7Kv!}G{UjQ&)>G~$J7P_ier_j^V85u$z$(j#%|}YGO&~Dq zRj`xjMGz@EYl`qKUEc5QL5m$|uF1o&wFGkWZG?J)Bvwz$Z2;#f-urpF~ z{W5k~R5J7k?Y+MO&d;8(;Vwc=pjn_z*|ESae!zkh-;63*zm_~1iSldCRQ>wxWqK|- z0-aE7MPokFt9YY0>k2`7Z4(?iYd_5nQxO-#)&g4O>$S#M5%4RJ|8(N%73pMB;<- z>_XLsfwcik&(X-P44`h3{#q(&#VS4mUwm3u)lXDO>R7#S?6OF+6qdB33sY7#3*7<(t|Xf<#d*`9l+mNDwy~({X70Om&}w4w0I7VssK@==yt8v!3BcsM7qx;W z5za69UV)-+051txD}Tz$Ys9s6Nh(kAgSqMNC6josk;JvOK0~6!Ri9;7UU%e*zQ8>u zPzf=dKZv5HbNv?X!rx{e#pPGEvJIV0U)Z|;!2J3^>6h9ZXI8rZw6TRa56vA?L&Lkz zFDvrj@Z&V+rR(ZHCw2ib@f#L5H2Cw;inVfLO-HM}J9=qlq};mjo2rvIakI_XjM_&a z)LmJ0zl-%^>_?k8UQZ8}Oyn z6wn2oy6lyM^7sQVqBrqtx3oLmw-)omfCL3l`Em^LJa6nspf`SAwAvY&c^ zo$)uuBWukCrOO+~MY+K4aiqc26p#M>8trDTkHSsBwo&#MN!(Qq+AD6!_ZeR&HgMuE zdK~%GbYVK}eZ=6>Xy^AkxMN-?&TAK<%k_}~e|=MYX-H6*Az)fdS?PGeA3Q28-;50W-H?XiWs@a&%49Gvirw6x1F1T z?2)+)4Sh~mYUM(IjDYyleOfEGgC`2l0|5wcg>(1d?Ov1ESFA9i&mZmqs)xs3I9*n` z)MSC6>u}8^ojsCgyE~=#zVml!>$6A#D@m=<&#vJ*t$WQWH?NvL-${8*q4r08UfsuyyqKk&i?CtI8%aJ z(IJH$ZztM=d)q&mm}vgWa+8y6Yu*0gTgf%!^B_fhxO4x=MK385i97Q5Fn-g0ho%Wy z=28ZLTN~R0LUC1BRV2uRf|Th4&L3BfE=wm@{B6J&6Jr^q9?VmD-M2@-b|zM`9W<`9 zhFv4eP2sj>PNCD%(dayegNbG z0e5*o&}V2bohBYTKosbpVlv6Bo1)_vI6oV`v8HRXR0JzrFA3Tjf&tw1qLn?j6qn8Vq`=u? z5k2*Wt}oADsQpoGLK>(>a=VD-;@i15^ObR2Bcbs!I=U;@qi zqroTSJ^G+f7KIj(w?BlwU`136iyBPU{E-!h&+ww{^R6Ztt|-ZOL^65ZBtrs( zQ6EN(B+O?9bQ?!3-wrti2%a=2@D4~DN5>@ic)kq>!1yx^ya)y$hPU8%?>i-e#0~RAVwbP(hQwN5 zi(^pvcJR(H*D1V$T&Iy}_onEun!P_kYGChvxm7{fksYIj)t=ha7l)B6 z?{_BZt_2SI9rbJCdowD6)-O)-UxT?Ds^1rXOaAj6L#HJ$Z1J8%p$43$=o0~R`tXwW zx32x%>cSk2{rra))lB&D(}hV=^CINjq>B2yo*_|A?63Ve5?AWV&!My)=6Py853rG6 zdzB)jr317^XSB6oQ{({w)%`wRn@h{v`-#D=krfe#DHaX$p4;mczZ8$Wydb}~Vod{C z^N@&mrP2awG0@I8?qr2#b(gr~r32<#{^g%}`$skh+Ezi=MO~=_O>d6HMoRAVynQ>n zzD>MiTFWu6JZinK`nNmC10KchEM7e#>+D|NLL^~I7*|k;A+#1ZG??@x!8osjhR$UJ zPjH7}e(n*07vK6dJ%zQM6X&<6=ewxrdZ|AmB9J?05Ru=i%U6}{;5)mJX-l*~xjSf` zUQsXlNfjdpliJObQc~ninFk&Sz6M~&6E`UapvRhREZW&OkFew3Nfr_ zz)GdD+B=QK!Mp4^v$e*WXZq|6S1vS*Q+~0V%Go%7EIn)g2kj%zKz4$cmKU^yJLXV> z{YQWb3lQlZTn|O5;$E}CF_*?{2&1F1YG5G=472IuJmU>9%+eelH!RYuVz5;Fi0+Rq z`dI;85H}uagg#VA@q3%hP;zHosNQA7TKu2Jkd!SbVNAC3en^#!v8?6yQ9I*>2>oWO z#Wy6DA=X*#8V+uXx-wr-=PIthh^9>DvX+Nc0kfY{gBQ=k>hgFQK+gP zeacQTzog-M`pbPnlDVS{m-lnp%UN@hMg>;k4}Xi-Vgx8_e`E#f`P2L=zheqnTTC$0 zA@}2-y6Rkeua<%L$I@r}z&Z$UxrGJ5J34q>%mt`-K$8L|1EU}^#mC#;^~+v{bE&0m zv@&qsu#E|q;+(6I%L8}1v&2OD1ep_zc2*MlS&6_wb}){EDGM`+Fj@5zio7ykc_zLz z*S9EMm6!EjwnY0g9gB$5rm?0QT0lK|Gp#OD_Sjj^T~;wppA=m;ky3sjXGc zgV@L)ppXyeQutT5AV#Q%c;GjnvnsiXZ`sIAwQP3WF1ekm_VVayodxg!K8OMKJR;eG*Q@$8jrM)a>y(pyml-2*6nwY$}^6{gwHgAo> zvt8_pgXF*d5Acxj7@R?ji0oG|Kb1%(%lCL!%Lf z3w(M8+~bLRKa?$;epmNK#WMP1MERy^EW7Q+U!S23*&h#A@Y}!x-1JUi03hg}lyP8f zSL%8PXp@2iwGcoG_D-6pcGA%0`C=)Dh*kI3JE8-l4JS$1?HqnWKj4Yw+Zxq6;rOoLFdM)n#Uxv7M zRZPtFLddK(^GFzM_Azg9k!_@zXOY;bjVLK7=_$hJ5fIMM|KybyO$!}xvtt5>+_XZm z!7SV=Ii5BhIpP|R3k^R8L0v&189>UNW3ANsP5yLshPSLV-r9T-}dlpTjzZeI0h zeqn7cD^id#{a{YpPoIe{*vcG}^9J9z8l^2hwa z{eCPqc4Sb>LgL(V>))s04oo@(P>g>tge}bhgCXzlz)80jueDEYA2w1?V1G|~cxG7F z8yAMP%K*c z(76d@YB>1iWMOgnbHz)m3~ab+vDa`RhVY9%Eo~y!|87RYD_c=`N~((1*OcT#Ud)t! zYC#51E^yg|i{0Llii!eldV|Rt`Yra;%Syy{Y#1>2F`>}p>QjfV-$rq_JMidRR*n_$ z#TfW{1MkP-Z8;QHdjNtrBjzN3Tb}{=%38wo#l>M zWhzG5(pPUXvtV7XH6UoB|Hmzf$*g?ljk!gFsv%@!aVdhK@5UdO-Y^7{L6H}y9f!bE zouSIc2^}k|fibSyKBt^_h&?RRgj$PRdAy$FEm+S|*e9OO2mRb0=xDYNX#aS;v(wIy zGIiv5YLSMZ20fNat33OCwb=4WmD%ae5p;I?*|jDl4af=FjrVKtuvxC?;tZ|*a<((u z7Qe}i9kfBfO?+3RhwV#hFR2`FD!Q}oir*^!ojFqmk-Io>_L%KpMKz%(mYb(>h$~sp zjp-Dnt-<9+CBdxPfSV+c*MvlGsY~lDC>SL}Q^MVP+G3$6*_iP7(0ggDs=PU%x2SJq zi}7~x4+bml>IFN|Nw=2j}uZ2)p1k=>6{hv&fiTZnMD*x$&ePiIys zn~5K-cH7>kAT{|@^5>PL!>v$I^!+`4o~4pd_U1jqgB8Jv1I>9w#FH}@0DFd&!fF+) z5mz6#QDYS*)Pl@MzpJVGsm=0Z6Q)fl*4&afaH*G!To8n51e{NMIkw*V$vyx#zt_e?Axod^bA(m$#GNPZd9CSZ?LQx!~o zCNru+q34blrhujHWO_mmRE*M!4p*~KOSW2QNl;QJ^Q(t;7%6kwGJk#2 zp{!-P=gyJs#G0YFe~BieTH-_$-DlO59)5|UyLUzMnPb(F3q|KARWkyS;Ni)}HyJt? z)>`}7jcGH)rC7lkl|5lhlF$8rxjQO9>ptEdh4%PclP34041fPo&ym)D7;^H9<{=sb z{h6T*HbrDe(oYIm1=fCiQ>(Tqk4D+YyTNMZ&o5nG3yI6CnJWRS z_oqM7s?<89f^y%fD7nh7Lal;kNm2Q1^_1(r*Ar{2RA7I^Q5#Q;eu0YIj~{O{YEvU< zmC9SyKfOw3&5pjR6nPzEr>{l^E%`qZ;1J-Xos{quF1dm-f3JYT=i!to9$*#;DGbVP z2?_AqOt};cR}bl3IHwO4ldv_g;!Uy3*D;zzD#a&1o+HDx{nKLbCA_)ukF&7-7q9sH zIu2pXkXYuXl8_gmCHb#qyXvT3>@LwWl%*YqVJiH*nuqj8^RG&5n-hGA2UfJ>$Fdtf z=BXA9sTgq=P(^N6&+y*J_a7sfwm|kLi-*nX?mG!ozsd)^%S}orV;~9VGx&+F%JBO8 z%2>FdJhH-<-=e9C=v>%nv8CA{-~xK=lMQ!`@bL64Xo)mpbr|pU z>6v$7*(UJ_5dGvF^T??=E&Qp6dD%d2I&qnUd|6DzZL8Hm*u3gRcd%8%BW?!n7!n-W ztj@K8tB|N5n$HhOdXz~s2Um~(DGCxmXE?x>ye^RsjlBK~LcczjN*Do5Bf<8ib`55& zU_19p4x{;O{Ue!1F|wVc-)t9{ghl8C&hN34^x2051&1u{5d@Ve-Y`Z*yH*t@4yMZ| z6)4J(#o~KoUr#1~(IbMgO#CaC!Te~U8pOm469e0zfx&gdY zt{~ht*$U$=l@;+?)EN4eT9-?2tY0Cn2@a)4S7r*%l3cT?6=y-ukcS=@F89D>XHnkW10JBlYJ2uqhY@ine<%)w}8!1g69wJh)@C zg42n5{^as9jVQCo%Q-A|9QGQc!_@}yKiVgMhA@XH+emxwUc08wLrf#EwT)y5+9XpM zr&ik-Hhg1sN?lt`zlf`kRv^3tb*0@px-c+1w_2KJKPal6q_`d%3MF(TG&Hr0kn0Mo zaIgx~=d@R@O36vcGU%s}T;*07Vd2)tTN8-ahbK-l8imUbF26ubivJiBMc*fwK+u9Y z$h`k%NE>79WeY)1Z`yPPU+BZcKg#M8K_C?e&|(0z*8suwUn#TXVYrtI5QaLinQ{2q zvuz;Hb5bv6oxG(MZd5a}IhKh!fr1#bxQY>-oZ}wB&c=cR?#G-Vt8}8p4E*$65JdG) znEr9{KdoshGOeG|E5iEdz0pCf@gjlB(B(yxd6XQki9EA|2nRk2PySBNkX;(1p~ z$D^9!ijzZJi2nR6=b*Q7rBY0HDz~vg*TbAy)~4YnVf&5c3^PfXN{!IAsZxEP@hGowK3NQQ3;#OW{bb`J<^|7W zE>3m;9xC8`)2GzT+ov!w(+79uh?!B4eZNAA`7t<^eo8K)fo3uEKl#SwOiE8{d!LMwnd<^kfu^-Eqv^W{^TSGePY?3dcMcR9DeoOF1 z`w+7>@_@#Jz+EIKfBWe2;J|_O;HYqbxk%}?G+SRECKq`;+qW;QgLU#0!+bkhzp?Qd zF{`HwgjnZeRH>Ze8RU{ssemp`?#_wTK)US7GMc|;*av&xXu35>DBTyUg#IFoj2U8n7n8C2A|82K zd@Z(SZF-H{Ywzgfo8%CA^@f6RR+B&v8T9`Dt5|mX`gVAc0H(Xp!XTYXk+#-^P~DX~>a*uS%^Uu|0nw}bB<8IFGEKBVd;pNA^aId#lL;ta z7w*G9Sp%F#YocY#g$-rDE=41+8bcIuR2LpsUSm#2C7yRUG05ICXVPWlTMyWbRA~{& zMkE`04GAF<4AtYX6@+YMvNMY+Qz@k@tH@5iZIZz}bti9dSF@0qR_w;>aeg*KdBE1+ z{@Jm{`;`VQ3UlOac&6WH#*lB`QO5g|bk5qoS_f)dRN0?VStd8^v!>{#@?#@xG8P&> zt`5kr+-+8Iyv1cRU2)#Wen-c(U0-=sf$Jdk)R1>fcwV2X;vwb%{{le?;1UYq1v-;1 z;a%yUH2^;hjsnl0{^Egbkyy$M3&=(lt5Lwr^5X%go1zt1lT?9#mxi#U&}q z2_P$g=Kh`(oDKc!CHGaNJI7{I^&Qmp{NHZ_K`OUWB8PBs!{kazWePx3*o55}!ruzm zuz`p!WKs$R!UpC%m>r1|9IFepe$qRw`!xHkTh$KhX(iN4a?1%){A;eHbd_5);Sr8R2OR!k)r7!HG+<1S-JVByHd0L4JdF6k% zb0?+Y(P3RJ=3r8%bGq*L>AxkZu@AU8)`4&A5mZD2E7JVO72NBvCPs7R&w=}X%Gl`p z$SOu#tV#V|o_JIMZeJ+eD*gBL>xL_;u3OFK`R-$zf#uqxpAL7ht~fM!>iYeIyGf_E zOgZf@?t2!9(WA#eyoz9ml1;#SiY0O#krxUd@OzxxTYP`ZLuTQn=msKX+y)S#;d%wNE82se5cuEYtUh5-$ z^^fQa?gM=agyJOtT(AS9+&#$F_E}z7=G8eE0?=XsYq+$Adi!It1GaRPSy(@e@RIn* zexmMi8Zj;u``rHt6mTtePx!VaSQf*yo}!-WwH@Nn;<^*+-rU4la%Y~P!=jd|&JuN7 z5Yzy7<_d$2^lkm0r;ZKM^RV+u;_3NJoK!P2FKz6a?hST&(Fwhwu-`HN?%V)({yA?B z{_O5-H|?Ts@|a>{W7c7{O(WfHU{CL0AO4n`;GlCu7U>Pq{1mI6&ip}}L$1RfWE;OR zw_dp!zwO<+3ehooO#b>j-X?_7X#-)M(|#=I#J#aab@MuBZKK0K%>`V5r78&-6|k(l0V?GPW?5s@yX-yyZ>NQuy%K`@^oP+B|kV^#(W|lT~!j#R6(Y09MjVZ zExs|yIKH194~||#Vkb=)=h%qhrkHX5Y0dP8HjKa6e>=S@WooF+Z~z^tIRmFcSm{!e z((cR>d>rNG_t6!ads_bCz-Ek!mi$sByFb$l>gnQDsfl_lg zoe2m7d5lIVbF%s>xk1LTgy`jFz&_;m7NoQfWK+Ykjj>!`W4Dr<>m~e|U(~2fS5&wTgn>Rw4oRq{ZagM0tCFsbYVYc#~143iEP zN<8QHP)cPs-2U6$JZytXG88cOhSlTO&Md+T4*-St008GaTLwg)m#-D)KJ@y`C`twv zQ5CoTHumTMEI9S3k@CA+9>j?Q1Z#Guoj-qL##C76b^B;tH;%8yNB70DT(FPs2diST zmP*nBm0%ye^~c*O?CGYN!XR^?HrY9yr?Q}@ho*wjTe~P;*C?`Vv%^s?r#^;UbJ7;E zq`OA^!4rY$pP3>!A4@|Bl%7_q(GUY~JsxSjdI4`vsE1hKT)9VflkagScjG?#5kKWC zkO*e*@@WNE*L~;GB@dQT83&)MdVqus{#cR%zR5&CnPD;Ov+-zNVg3l|ao*>snfCH! zn)2xN=t_n!2($`igIYZi*5cc^UT79Z_@{5WiY}RrAh<`sz3Adf6kX7NXldXf4LZd3MIYUQfWw{BtzIShAL$#uswU>7?BNboUF{WhFb1+QG#z&LzwbGKe zwz)5$*A(C=cZmW1pK2a>YzNpkx+7@rW~BWYMF*DYNf_Aa$&J()oK@mvU8SSQoS5R7 zt)dK-ji?mEEMJS_H`DpHDJW~V+7@1Pu~*7+3yW%Pte4o)NCgvtK~um}J^fdipK$Qb zvKycs3*dllYQf|J&S}~9H(`Jw)T40#!rJD*ftW}?EPCv_ESmPgbnWk z)wfa^u^PNW?#+M<+}OLc2GHUFU)zUN>vq-GK?85boVlJ?jO8GUQqYn74y?&hwcQ#; zR?*+{5tTJyHB^37SKoe{*!P@R%~CGIs9%<(!OK@@dVWs@{hAO=kc+i2TYq| zZM&2suB!Wsp4<(eq%>j``((dYl|;4V51FexZ4PCg<#I)JiK9b?E^*a+^ho7NX+NUS*@~-*b?JENTHe6kq@{K!t%KZR zO#oySVK%Id4~&ji?oyoNhYA(YfTFJ1_wM7Q%^QhFP51p=eSXqFiTd^|_; zh4*lsbxtk!a6Whv>IxX47~p4iVY$6@6dqy@&l;QKypi60A_C#QF;K58EQ99-$5V>v z0F>mXU}yo4V21PFj)8}3sjp7zDH{TatEwr6K3$k&MV>BuPOW2GToGQ zaElH5Pq(xCV>Bh5cdslM+2TKI3nZkWDn0&?yIj| z!FLxE5h-JxodXiCj`Ll=uF#EGeD{^~oSlyt0JE$Au+NajEs)(^;(0G0p(KzO74QII zxae(oBjVFJ#(%OB+&l;)N~qhlFq*cjwhQz&`jbUO#f?rmgs zx|FK6%oIKgNHQ=mC~DDl(_Qpjaz7ReDke}5SW8e2PewwcaT%p2G?xA{nplqiu9(p< zCMt%3gCVT&XPEF%j%svxT7f32IL2=Yyzz5>Zq`n@k5zqyx zl8?k<4Wu&s&%*}vV8aZ|*X%H8#f97xfd1}Bpf(Z^q7D|BsBJkr^eBB;$i@4!`O}F{ zPdhr%+Ky9R(WXxM2WMei1fx8KESBjk{z|6yKw>mDQmi!-1GC_&OJ1uI4{(z2GNkW4 z1Rpnb(TGwhnfvysk5uwMV`=}m`+3&sX|x{_Z#6!ggS%iia2wmvSz5k5LqQU{8{_;% z)&vr52{upiQ3h$HRkJnr&p);hLKKB&!qJa2mhI97sH2Q~$|l90^3sD=t_+myYJAFD zrbD_B%G$B${F$2*iM=jk)6G`AxBdUl6g-s{xOd+S;qJElEhX$S80vSp+Y5in%_2SA zuHLb6QF}U^xW|ic61@-7`{f?DwUDxO@Jp{qbv~|DQXf$JN)}JHDpA80`axqc2T{P1 zz3@vofzQsf6DlN3#ka^Ig!Xb=h#b^jL`D?@hE4>r%k;&33Gq>ec^KT^9m(?q7q_6n)#P(GS4Gp8~?LR&r)*{wM5-j|o8N--lh5eS8 zpuGQs4FY*lQygzc?7_NF`clFJ%GCeJlPKWHas5wGpkgiOl_J8ZHnbOmCfExLG47Gc?B z&B9JC5!)iqu!vYne&h9Nt8@q6)Rl?f&gnHPNHToS>V}+O%SBgf=?`ibk|~5ZavBjU ze)mB~mqphiW-AgM`r@5&JTLly1rt`^Uci2FVszS+6?uc>m<$3uTVm`Fu54LG6cuvfN#57O?*Hc%tVb?>i6l0rIcF<`46W z0v2L7o@lf)sSsrzm|RpBY#1)~ZEUY$zVMj^&1y9*B9*5&-n3%fy(did(&~)x*8gs2 zY0KopK1MjY<(&T8=tV4jd)SK+Br#0d)?nQinku5NQr>L4Gk2v}S@Nyyf2W*pa#_1%p7I*3uSYY_jl>?Nh1$q;W;MP{a^=42T@ zX11Y#VwQ|pe~8v-8!BZu1y)#beKIDoHxYXn!kZK1J6y3E6Pz|C{RQ6_sy|2V5MyoM zu2L+v(YWUxYuMGj7oqMDOD?~>ad0CfE0bP2MM~kam9|H;&4BxpYcxICVvBwEZNA6r6D`x{bt+j%y-h>I z3<;-PEjjnk(zTnm<;FrE#U!DuC2x2wDN=Nx(Hj(ey)n4f*HO|}C+u6x5QdY7_eEsI zM6_vy1(EFMq3E97^iSoZKXa3mSGmZ0UfaHUXzFZ-&jz!Y!M>4%<}|dBIA0; z^=4~jr6zmCNV1RG^48Ql)60oYBr4YUNDSy`+~IWuc+thl^i1FM3$_XbQL{BwCN!xk zc+wEx|A({z;GUA|<9mc#9^dmktDURf&#?gI>I5wv@^>4;1eBdGj$HKQ!+dRi(itde;7+(AJ`>#n?q?`TyR0Un ztr17=#U~j6(bA+!P2dq>>su9nA57{oM45$y2QZh+@Ql3goe3~vOBB?+e9P!cYs@B_ zzFVkhP9KLbcXS`OdS)CMtS67SG8b+)k>#eu)$fO5#mrZOal2;k@WY_O5$$UhAP;vfivz%9D-qi( zvQC!7_yb(VBbrp4CMHHAW+kS_bK{|_)2#%?;!k&_%y?O4M*K>uyYe)*+DVlNe=GBg znG+Y=o92@~_Svbi<{bk2{ywm}44YgINko%rzCn^((DZv&A)MM-9EbgHR+cC3#A!#A zRhAT&fV0`l`AXx28o0C42L&s#O|RHAvN5w)ObfBXB-iR}@1BzVTc9ieDT71^qDZ)cLYSy8sa3m7hkT88oUq>(`jJ5-1f zX&JSwU`83~xSl5O2>#1!hL9eGjYG2h;hu}w;OwRTk*JQMw7<0uJCJZ8Z-{=;1!+a> z0igQgXpN|Li1S$tJVk%st&tJgwtT7qWQ_}QjBk_FTe$PVKWaT>u<4aadFX6MjuI5- zb`dHw)5^V8WBQf4)Dgs!qy_gV0d03^NB&=ww*&DfuZ0d1w;lI5RQ~iFDZOYc>X6?R zb~HMfbtiX{h)CAH!kmg$ini-V{7?EcL;4O>$yc0sMXG)`R!A`aga`7pFYe7yqPSn= zJ1@?!MCe+B(md~r$0monvd?w<`x1gn#xALA$?{uEdJ8fklXb6E%_tHzy1hKBB7#~a zWl)&Vz11c}v?s*5&e3PP%40R;9cr`1!#Jbq_|f)T>rC)ZDK{>>*g96@l|6d5_+w`b|Ld4k#?MbguG-}618P89|iOF}^ z&82Qsxk%ndn@`i5o#a2I3^L0ZEy=yOvHL5U_~XUT%~?JMnOOnQR0CwEU){$%0qZZ# zo6E)4a^+K8GPf^XV>S_;{L(dbo2oewh2rh)%4uhs>u6sMhft)pvF`p;f$r)sW&9ai z^F{>jY?+o<9!#+wN*XotE0MYG`Mo0k_NRsGN+L(K`#lKW-Ca}j%%0MZ z{=~o%!YL&KnhQZnchGiP*RXdyU2F_zt!fOWo^bx#FHg6J^Ofu8M^F569%TOTnd}Dpr}*tA!U3 zc!-)+d$xXPsEwOqn7q6G?&X#(t^3!1Oh_)SCjW&ggiec2fb}!zFfjKdl3oxfZ>t0} z!AHkX?G@OgcupsnXt7<9 zCS0JfM_)Ig>`nFa2BjxNa^;80Rj?rI0q^vjBMr1M7MPaBMVFML36p(-z!C! zyp8QdFaaQ0yTuI>d2hX`S1#1O{!f+Qk8_OHI$h1x^>|J`v>pwEc&sE|yhmPQR=fs=rT>Z=rADPl;!jJAL;* zSN6{UOVT~+ih)P_Mc`dxGbDHzew25aDEwJYTLrwTe3||!-hJ7!*Troy)8n6$8Q`pP zQ@m!pQx-A!y+I6Q+_d?mEgjo@_Jlck47>|xmwNw6s#Sm^o#7M7GmyZSe|q>5h23oQ zSO)J|G-6@f_7LCIA%;j)z2kR!$Q>=_-PH%+8To$@jmVYp25DsUwpaI8 zpYQNjKQFTydGdzb{K)C0VX(BO8T5VohkAGS*cPugQU7Qzzl7%v3EAol$Ffd43oNE^ z<^JlSOKnB8P0T5}N$GLpqBG`BVYxPE6Ti#i)G|gB-3^g}IMwjmbKcH#Qw<&mP zu*A8cp})*fmIZy4^*~klP~ppXYcyn>UT^awn)43$^UD!?I%-!{aC@C$Y~C-PVR}P7 z&|)Kgto&8Hw^Phje=#iwcdUcXm32mxQ-ueFdw%4oigT{yF!g!LVzBbJ(tw6itmjF) z>HXQfXA^n66M2`!vBr@=4{!;f{|$7cvlcOFBOp$_-1!7q%aVI1VeIxo?_pv7rm}vZ(h_ME z?F`;EBo`}4$Ml)YeS=mV7sU?)=DYElz)pz0{dBiRMWn$@*#}TMHIJH3H)idv!mf-m z$MA5r1Jo`uTWd08661b+u)X~a-R1YX&UO4;|Mdo+Vx`13zMTI#i%p|5-@4d1ja4Sk zd}Oy9oNw{V!eVnz+JSOem9d=;1(#|OH{_iG8=8u@tD9L|Uf9@lBGP3QVZG_pIbP3t zqUN(Hmy3q}FfI+bAL1)8+q9)5mZ1$d-WNhEG`QJ(PS?6E_)YH?DntL#&2$M1@kgx! z_9*RSgz0EQuOco~D%q9OZG3z1oYSW+L}5V9ZS!HiTlI@Hd}GeZoym^b>2E=S2g8Ru zJHOF^fh&u!J>pgpca#VQ0rf9T@>yLnk)xrKbp0?~9RcZkwgeOm0rNlh9V>Z?DK7!PR+TqkBm~rHx6Lt_$ZCX=g|TN~D}Gm_Ok z-qGsj7BTmPokNG{6DBLTs%KjeNGX?4By7rIj6bm&eWX?b4$65LY8c^poriMOF?wJb zM<=c@r_rKmImgG9?0~^j;wW+P06==7uJJ;yzdWc(LP*GY;*gs$N2P*%=)K`E zN;C;eqA=IK9(p@XehiTf@))v1H8#u)B#~G2T&p1G9StPQkhpIWrsy5u*`|#EH@{dk zatSd~*QXj3X7R2i4=j72}^M+F_95XT=1!*T{@)yOIo^??sxvg-=n- z>})XCYxUe)bZr7}AjXhe(gPJf82fa;7i#RbGnM%~E9Wr}e)6C|sqAcDLlj0Ur&g21 z2SIiWUXC13FH3uG*}`p)8S>%ZHh3WxCQVPKcV4)9R6DfjY&_Fm<0v=%!scR;MVUhI z+EpeVx4&nNei>#uasP=V-5=%r8@P}X!a?;O)VXT=S=SH$ikv7PnI=ftb{3?3jy`dS#a^&tQ_Mj%}=C{hLhttRUFU=Co z`DOLlgsjCpM)DPM+iNA=w*hi~=@uOV5>F1;&UkC#We1p@dEN#d%@hjA z*PWi%`Xr^#g3;hCpiV}^Y3$QuJdC&M-*oC#_ph;w%ueZOeP#+1ZRt?a-A9D)a{>vgk38(HnDi4qwy-hii&4YH1~bjls(yPJjhBN=JO|L1{5;n_EQ>I+D~ Date: Mon, 21 Oct 2024 14:57:50 -0700 Subject: [PATCH 228/479] Introduce firmware version member to SdkVersion Summary: See comments in the code. Reviewed By: jasmeetbagga Differential Revision: D64671463 Privacy Context Container: L1125642 fbshipit-source-id: 563590c8efc7adebaece5e04e3ff7bc8582f2922 --- fboss/agent/switch_config.thrift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fboss/agent/switch_config.thrift b/fboss/agent/switch_config.thrift index d38c899ff414b..2bbb8276bb22d 100644 --- a/fboss/agent/switch_config.thrift +++ b/fboss/agent/switch_config.thrift @@ -1720,12 +1720,16 @@ struct PortPgConfig { 7: string bufferPoolName; } -// Sdk version information that will be parsed by the wrapper script -// -> asicSdk would be the native SDK for a binary -// -> saiSdk would be the SDK required for a Sai device, if the Native SDK does not provide support +// asicSdk: Native SDK version. may or may not support SAI +// saiSdk: Set to SAI SDK version on SAI device if asicSdk does not support SAI +// firmware: Set to firmware version if a device uses firmware +// +// asicSdk and saiSdk are consumed by the wrapper script. +// firmware version will be consumed by Agent. struct SdkVersion { 1: optional string asicSdk; 2: optional string saiSdk; + 3: optional string firmware; } enum IpTunnelMode { From 19d38edcf23c005f34fc16046a54d96afb33184d Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Mon, 21 Oct 2024 15:02:42 -0700 Subject: [PATCH 229/479] program port mtu error trap through sai Summary: Program port mtu error trap on J3 through sai extension attribute SAI_HOSTIF_TRAP_TYPE_PORT_MTU_ERROR Reviewed By: jasmeetbagga Differential Revision: D64349591 Privacy Context Container: L1125642 fbshipit-source-id: 2153897ee73c61e34da7f3df9e43f42dd87702d4 --- fboss/agent/hw/sai/api/LoggingUtil.cpp | 2 + .../agent/hw/sai/switch/SaiHostifManager.cpp | 18 +++++- fboss/agent/hw/sai/switch/SaiHostifManager.h | 3 +- .../hw/sai/switch/tests/HostifManagerTest.cpp | 2 +- .../test/agent_hw_tests/AgentCoppTests.cpp | 56 +++++++++++++++++++ fboss/agent/test/utils/CoppTestUtils.cpp | 6 +- 6 files changed, 80 insertions(+), 7 deletions(-) diff --git a/fboss/agent/hw/sai/api/LoggingUtil.cpp b/fboss/agent/hw/sai/api/LoggingUtil.cpp index af143db40ce0b..692e7d14bf82f 100644 --- a/fboss/agent/hw/sai/api/LoggingUtil.cpp +++ b/fboss/agent/hw/sai/api/LoggingUtil.cpp @@ -427,6 +427,8 @@ folly::StringPiece packetRxReasonToString(cfg::PacketRxReason rxReason) { return "samplepacket"; case cfg::PacketRxReason::EAPOL: return "eapol"; + case cfg::PacketRxReason::PORT_MTU_ERROR: + return "port-mtu-error"; default: return "unknown-trap"; } diff --git a/fboss/agent/hw/sai/switch/SaiHostifManager.cpp b/fboss/agent/hw/sai/switch/SaiHostifManager.cpp index 6aac8fcbe6963..c7999ac288040 100644 --- a/fboss/agent/hw/sai/switch/SaiHostifManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiHostifManager.cpp @@ -21,6 +21,16 @@ #include +extern "C" { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +#endif +} + using namespace std::chrono; namespace facebook::fboss { @@ -55,7 +65,7 @@ SaiHostifManager::~SaiHostifManager() { store.release(); } -std::pair +std::pair SaiHostifManager::packetReasonToHostifTrap( cfg::PacketRxReason reason, const SaiPlatform* platform) { @@ -129,6 +139,10 @@ SaiHostifManager::packetReasonToHostifTrap( case cfg::PacketRxReason::EAPOL: return std::make_pair(SAI_HOSTIF_TRAP_TYPE_EAPOL, SAI_PACKET_ACTION_TRAP); case cfg::PacketRxReason::PORT_MTU_ERROR: +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return std::make_pair( + SAI_HOSTIF_TRAP_TYPE_PORT_MTU_ERROR, SAI_PACKET_ACTION_TRAP); +#endif case cfg::PacketRxReason::MPLS_UNKNOWN_LABEL: case cfg::PacketRxReason::BPDU: case cfg::PacketRxReason::L3_SLOW_PATH: @@ -145,7 +159,7 @@ SaiHostifManager::makeHostifTrapAttributes( HostifTrapGroupSaiId trapGroupId, uint16_t priority, const SaiPlatform* platform) { - sai_hostif_trap_type_t hostifTrapId; + sai_int32_t hostifTrapId; sai_packet_action_t hostifPacketAction; std::tie(hostifTrapId, hostifPacketAction) = packetReasonToHostifTrap(trapId, platform); diff --git a/fboss/agent/hw/sai/switch/SaiHostifManager.h b/fboss/agent/hw/sai/switch/SaiHostifManager.h index 65b4a14854a27..c9de090aaebda 100644 --- a/fboss/agent/hw/sai/switch/SaiHostifManager.h +++ b/fboss/agent/hw/sai/switch/SaiHostifManager.h @@ -77,8 +77,7 @@ class SaiHostifManager { cfg::PacketRxReason trapId, uint32_t queueId, uint16_t priority); - static std::pair - packetReasonToHostifTrap( + static std::pair packetReasonToHostifTrap( cfg::PacketRxReason reason, const SaiPlatform* platform); static SaiHostifTrapTraits::CreateAttributes makeHostifTrapAttributes( diff --git a/fboss/agent/hw/sai/switch/tests/HostifManagerTest.cpp b/fboss/agent/hw/sai/switch/tests/HostifManagerTest.cpp index ec0c17dad4917..1888d5162887e 100644 --- a/fboss/agent/hw/sai/switch/tests/HostifManagerTest.cpp +++ b/fboss/agent/hw/sai/switch/tests/HostifManagerTest.cpp @@ -34,7 +34,7 @@ TEST_F(HostifManagerTest, createHostifTrap) { trapId, SaiHostifTrapTraits::Attributes::TrapType{}); auto trapPacketActionExpected = saiApiTable->hostifApi().getAttribute( trapId, SaiHostifTrapTraits::Attributes::PacketAction{}); - sai_hostif_trap_type_t hostifTrapId; + sai_int32_t hostifTrapId; sai_packet_action_t hostifPacketAction; std::tie(hostifTrapId, hostifPacketAction) = SaiHostifManager::packetReasonToHostifTrap(trapType, saiPlatform.get()); diff --git a/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp b/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp index f96f0bf76fb24..b627890ef6749 100644 --- a/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp @@ -1058,6 +1058,62 @@ TYPED_TEST(AgentCoppTest, L3MTUErrorToLowPriQ) { this->verifyAcrossWarmBoots(setup, verify); } +template +class AgentCoppPortMtuTest : public AgentCoppTest { + public: + std::vector + getProductionFeaturesVerified() const override { + if constexpr (std::is_same_v) { + return { + production_features::ProductionFeature::COPP, + production_features::ProductionFeature::PORT_MTU_ERROR_TRAP}; + } else { + return { + production_features::ProductionFeature::COPP, + production_features::ProductionFeature::LAG, + production_features::ProductionFeature::PORT_MTU_ERROR_TRAP}; + } + } +}; + +TYPED_TEST_SUITE(AgentCoppPortMtuTest, TestTypes); +TYPED_TEST(AgentCoppPortMtuTest, PortMTUErrorToLowPriQ) { + auto setup = [=, this]() { + this->setup(); + this->setupEcmp(); + }; + auto verify = [=, this]() { + // Make sure all packets packet with large payload (> MTU) + // are sent to cpu low priority queue. + // Port Max Frame size is set to 9412 + // Ethernet header size is 14 bytes Ipv6 header size is 40, TCP header size + // is 20. Thus paload 9412 - 20 - 40 - 14 = 9338 + + // send packet with payload 9338, should not be trapped + this->sendTcpPktAndVerifyCpuQueue( + utility::kCoppLowPriQueueId, + kRandomIP, + utility::kNonSpecialPort1, + utility::kNonSpecialPort2, + std::nullopt, + 0, /* traffic class*/ + std::vector(9338, 0xff), + false /* expectQueueHit */); + + // send packet with payload 9339, should be trapped + this->sendTcpPktAndVerifyCpuQueue( + utility::kCoppLowPriQueueId, + kRandomIP, + utility::kNonSpecialPort1, + utility::kNonSpecialPort2, + std::nullopt, + 0, /* traffic class*/ + std::vector(9339, 0xff), + true /* expectQueueHit */); + }; + this->verifyAcrossWarmBoots(setup, verify); +} + TYPED_TEST(AgentCoppTest, ArpRequestAndReplyToHighPriQ) { auto setup = [=, this]() { this->setup(); }; auto verify = [=, this]() { diff --git a/fboss/agent/test/utils/CoppTestUtils.cpp b/fboss/agent/test/utils/CoppTestUtils.cpp index 46cbc536114e1..894f37c76d31a 100644 --- a/fboss/agent/test/utils/CoppTestUtils.cpp +++ b/fboss/agent/test/utils/CoppTestUtils.cpp @@ -1085,12 +1085,14 @@ std::vector getCoppRxReasonToQueuesForSai( cfg::PacketRxReason::SAMPLEPACKET, kCoppLowPriQueueId)); } - // TODO: remove once CS00012311423 is fixed. Gate setting the L3 mtu error - // trap on J2/J3 more specifically. if (hwAsic->isSupported(HwAsic::Feature::L3_MTU_ERROR_TRAP)) { rxReasonToQueues.push_back(ControlPlane::makeRxReasonToQueueEntry( cfg::PacketRxReason::L3_MTU_ERROR, kCoppLowPriQueueId)); } + if (hwAsic->isSupported(HwAsic::Feature::PORT_MTU_ERROR_TRAP)) { + rxReasonToQueues.push_back(ControlPlane::makeRxReasonToQueueEntry( + cfg::PacketRxReason::PORT_MTU_ERROR, kCoppLowPriQueueId)); + } return rxReasonToQueues; } From 98d86942352fb9cbabe9c964958d95249fbdb2e0 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Mon, 21 Oct 2024 15:30:10 -0700 Subject: [PATCH 230/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-shims-meta/commit/42067fa345a942abb92ebde7f9808cb618d3eeed https://github.com/facebook/fb303/commit/ca4eba5fc6d47a1e8385a3c181f89ccd68dc15d9 https://github.com/facebook/fbthrift/commit/261e18355195977eefedf1cd8a54d60d89a223a1 https://github.com/facebook/folly/commit/a9bfa31f1aae3a3964f0d8a8b6864ef4911897af https://github.com/facebook/mvfst/commit/d05265fe65d517c7aa28c2e35f8229ac998924a2 https://github.com/facebook/proxygen/commit/5617867029920e6ebe8eecba76010d14ce1682dd https://github.com/facebook/wangle/commit/ecc475c93c1beff42e1e7ddb74c9b79eb666de19 https://github.com/facebookexperimental/edencommon/commit/7964f934832413d561646b971d51e15a0cfb1974 https://github.com/facebookexperimental/rust-shed/commit/9e06717960837a9c4f569a9f598195eff4464414 https://github.com/facebookincubator/fizz/commit/0fe9ab8d9f85c4b211d4b42dee83cb7031a3c721 GitHub releases: https://github.com/facebookincubator/reindeer/releases/tag/v2024.10.21.00 Reviewed By: ajb85 fbshipit-source-id: a4f801a17c7d4b75ca0813b8274eef2b5b931902 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 7c38bf5ad1fb1..852c142af7bf1 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 648dc1e0eeea0e4a4c804a07352c329b3b71b26d +Subproject commit ca4eba5fc6d47a1e8385a3c181f89ccd68dc15d9 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 662f63c59c591..2d98d7b695558 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 044cf81de37c799c7dbd4d5dd4d22526b978e976 +Subproject commit 261e18355195977eefedf1cd8a54d60d89a223a1 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index fa21338498e89..2bffcf1fe0623 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 10817a62c50ac24bf16d3ec6fda8c5152a53737e +Subproject commit a9bfa31f1aae3a3964f0d8a8b6864ef4911897af diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index ddbdc374c9817..b6e568290f9e0 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 7916247d939bf41cd1da818a290afe39f4a90af3 +Subproject commit ecc475c93c1beff42e1e7ddb74c9b79eb666de19 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 43eeeebd4be45..e2a908fd7a684 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit ebba1870a2088598af35dc42cb3d6d2d78ee416b +Subproject commit 0fe9ab8d9f85c4b211d4b42dee83cb7031a3c721 From 5bc0af3d3d2700a108dc7a0018b5b0a4f294756f Mon Sep 17 00:00:00 2001 From: Amithash Prasad Date: Mon, 21 Oct 2024 16:23:02 -0700 Subject: [PATCH 231/479] rackmon2: Flip scan retry order Summary: Before, rackmon would go through all possible addresses and try to probe each address X times. This makes the best case (Probe succeeds on first try for each module) 70ms * 3 retries * 256 possible addresses * 3 ports ~3min. By having the retry on the outside, we get the best case probe completion in ~1min. Obviously, if the device failed probe on the first attempt, it will not be detected further. Imported from: D64141034 Reviewed By: alandau Differential Revision: D64629558 fbshipit-source-id: 9fc8ce654fb21ee4dfacda977d7850bec28a96b2 --- fboss/platform/rackmon/Rackmon.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/fboss/platform/rackmon/Rackmon.cpp b/fboss/platform/rackmon/Rackmon.cpp index dcc838c633d72..3d25396c7b24a 100644 --- a/fboss/platform/rackmon/Rackmon.cpp +++ b/fboss/platform/rackmon/Rackmon.cpp @@ -193,21 +193,23 @@ ModbusDevice& Rackmon::getModbusDevice(uint8_t addr) { void Rackmon::fullScan() { logInfo << "Starting scan of all devices" << std::endl; bool atLeastOne = false; - for (auto& addr : allPossibleDevAddrs_) { - if (isDeviceKnown(addr)) { - continue; - } - for (int i = 0; i < kScanNumRetry; i++) { + // Retry the scan loop to ensure we discover any flaky + // devices which might have missed the first loop. + for (int i = 0; i < kScanNumRetry; i++) { + for (const auto& addr : allPossibleDevAddrs_) { + if (isDeviceKnown(addr)) { + continue; + } if (reqForceScan_.load() == false) { logWarn << "Full scan aborted" << std::endl; return; } if (probe(addr)) { atLeastOne = true; - break; } } } + logInfo << "Finished scan of all devices" << std::endl; // When scan is complete, request for a monitor. if (atLeastOne) { std::shared_lock lk(threadMutex_); From bfb22e6fc1c7de6ef2045ce3bb0aac4ecfcb9034 Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Mon, 21 Oct 2024 16:31:16 -0700 Subject: [PATCH 232/479] Add switch_config_cpp2 dependency for NodeBase.cpp Summary: Seeing some failures such as the one below: https://www.internalfb.com/sandcastle/workflow/1571756269957004800/ ``` FAILED: CMakeFiles/thriftpath_lib.dir/fboss/thriftpath_plugin/Path.cpp.o /bin/c++ -DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_NO_LIB -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_NO_LIB -DGFLAGS_IS_A_DLL=0 -DIS_OSS=true -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fb303/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fatal -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/nlohmann-json-d5Eo4WLAejQ7EvsuTb7aJjFah4gNmDdVatBoQf3rfVg/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/libsai-AFjbBRrPw7_EpdXNjjLffW_ngNfQzNkcp-I6cnyysiw/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/libsai-AFjbBRrPw7_EpdXNjjLffW_ngNfQzNkcp-I6cnyysiw/experimental -I/usr/include/libnl3 -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/iproute2-3q0ljU1mWMR-fgtjgBnjhcycDJlQL8oFlYMtQzii1Jw/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/yaml-cpp-Vt1STlr3rn14b60WXatyTiW_lw2bJsos1UnWbVmpm2E/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/libyaml-X9dZsDVUtr_WgSH46_qv6a7oqEMw--_bZNAR0OrK_t0/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/exprtk--xpjpMwx0ttWv76LKTu2VCY8NVfAt1KXrPLZIgAFbEg -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/libgpiod-VEYBm5uQx3gTKmhgXTF3eE0S_OG_DgRF8SVWoTA4-6E/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/googletest-rF2r4d3DQH3be3j-UFJxaYJrOMGFAbhD_OBSBih0MHQ/include -I/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/build/fboss -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/gflags-MpUYa6JSZ2Vmb6mnonoCMpeD9eP1eZkUKB9n9opwIrk/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/glog-rMa35ZR65LheEDFExzR1XOLW0AhpfKaO1HgQBLpOEos/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-4tgDfrJmVL7Z4SVnUkhyjhy5rKOD8I6mEmBZj4zqGIA/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-2FInSBfJDqu8ligxsc_Mbo85ImkGltbs0CeWNLTbCRY/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fast_float-AGZqJLQUdDVqVSH3kJB5foT9kw4EM4PO4XA24l5rH6E/include -isystem /usr/include/libdwarf-0 -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/wangle/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fizz/include -isystem /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/include -Wall -Werror -Wno-sign-compare -Wno-maybe-uninitialized -Wno-deprecated-declarations -Os -DNDEBUG -std=gnu++20 -fsized-deallocation -MD -MT CMakeFiles/thriftpath_lib.dir/fboss/thriftpath_plugin/Path.cpp.o -MF CMakeFiles/thriftpath_lib.dir/fboss/thriftpath_plugin/Path.cpp.o.d -o CMakeFiles/thriftpath_lib.dir/fboss/thriftpath_plugin/Path.cpp.o -c /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/thriftpath_plugin/Path.cpp In file included from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/agent/state/NodeBase.h:12, from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/agent/state/NodeBase-defs.h:12, from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/thrift_cow/nodes/ThriftPrimitiveNode-inl.h:18, from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/thrift_cow/nodes/Types.h:139, from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/thrift_cow/storage/CowStorage.h:5, from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/fsdb/common/Utils.h:5, from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/thriftpath_plugin/Path.h:6, from /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/thriftpath_plugin/Path.cpp:3: /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/shipit/fboss/fboss/agent/types.h:20:10: fatal error: fboss/agent/gen-cpp2/switch_config_types.h: No such file or directory 20 | #include "fboss/agent/gen-cpp2/switch_config_types.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. ``` Reviewed By: srikrishnagopu Differential Revision: D64701142 fbshipit-source-id: 6f5877112a006d07308adf11960a17f804eb5c1a --- cmake/AgentState.cmake | 1 + cmake/fsdb/FsdbIf.cmake | 1 + 2 files changed, 2 insertions(+) diff --git a/cmake/AgentState.cmake b/cmake/AgentState.cmake index a4fa9a272e471..372be074f7c3a 100644 --- a/cmake/AgentState.cmake +++ b/cmake/AgentState.cmake @@ -17,6 +17,7 @@ add_library(nodebase ) target_link_libraries(nodebase + switch_config_cpp2 fboss_error fboss_types Folly::folly diff --git a/cmake/fsdb/FsdbIf.cmake b/cmake/fsdb/FsdbIf.cmake index 30eb7f5b0ad44..5b4de5ead52ad 100644 --- a/cmake/fsdb/FsdbIf.cmake +++ b/cmake/fsdb/FsdbIf.cmake @@ -67,6 +67,7 @@ add_library(thriftpath_lib ) target_link_libraries(thriftpath_lib + switch_config_cpp2 fsdb_oper_cpp2 FBThrift::thriftcpp2 Folly::folly From c910fa1debfa5de87161436ecf2cf51ae12d7af8 Mon Sep 17 00:00:00 2001 From: Ron He Date: Mon, 21 Oct 2024 16:50:00 -0700 Subject: [PATCH 233/479] Reduce stress program ECMP iterations to 20 Summary: As titled. Exceeding 15 min of netcastle test timeout. Reviewed By: simuthus-fb Differential Revision: D64708581 fbshipit-source-id: cc8355bf3c822ca0a8003831a1cac5af1540caab --- fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp index 36b2c8471f79e..b8d1adab9145f 100644 --- a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp @@ -2335,10 +2335,8 @@ TEST_F(AgentVoqSwitchFullScaleDsfNodesTest, remoteAndLocalLoadBalance) { TEST_F(AgentVoqSwitchFullScaleDsfNodesTest, stressProgramEcmpRoutes) { auto kEcmpWidth = getMaxEcmpWidth(); - // Stress add/delete 40 iterations of 5 routes with ECMP width. - // 40 iterations take ~17 mins on j3. const auto routeScale = 5; - const auto numIterations = 40; + const auto numIterations = 20; auto setup = [&]() { setupRemoteIntfAndSysPorts(); utility::EcmpSetupTargetedPorts6 ecmpHelper(getProgrammedState()); From 650192e84e2d833eaf7eff3ca05f8a7499069320 Mon Sep 17 00:00:00 2001 From: Jeffrey Leung Date: Mon, 21 Oct 2024 17:44:07 -0700 Subject: [PATCH 234/479] Move show techsupport to .cpp Summary: Move show techsupport implementation to a .cpp file for increased compile speed. Reviewed By: jasmeetbagga Differential Revision: D64703329 fbshipit-source-id: acd20e305804aec54b02afb1250a917797c457b5 --- fboss/cli/fboss2/BUCK | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/cli/fboss2/BUCK b/fboss/cli/fboss2/BUCK index 6094b8361c144..ec721fb0faa72 100644 --- a/fboss/cli/fboss2/BUCK +++ b/fboss/cli/fboss2/BUCK @@ -275,6 +275,7 @@ cpp_library( "commands/show/facebook/environment/power/CmdShowEnvironmentPower.cpp", "commands/show/facebook/environment/sensor/CmdShowEnvironmentSensor.cpp", "commands/show/facebook/fsdb/CmdShowFsdbUtils.cpp", + "commands/show/facebook/techsupport/CmdShowTechSupport.cpp", "commands/show/route/utils.cpp", "facebook/CmdHandlerImpl.cpp", "facebook/CmdList.cpp", From f5d33b1766e1c4db11977462068f6ce2025f2e51 Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Mon, 21 Oct 2024 18:09:00 -0700 Subject: [PATCH 235/479] Add empty definition for `publishSwitchWatermarks` Summary: OSS Full build fails on IaC VM with the following error: P1661869749 ``` FAILED: sai_agent_hw_test-sai_impl : && /usr/bin/c++ -DSAI_VERSION_11_0_EA_DNX_ODP -Wall -Werror -Wno-sign-compare -Wno-maybe-uninitialized -Wno-deprecated-declarations -Os -DNDEBUG -Wl,-wrap,sai_api_query -Wl,-wrap,sai_api_initialize -Wl,-wrap,sai_api_uninitialize -Wl,-wrap,sai_get_object_key CMakeFiles/sai_agent_hw_test-sai_impl.dir/fboss/agent/test/agent_hw_tests/SaiAgentHwTest.cpp.o -o sai_agent_hw_test-sai_impl -Wl,-rpath,/var/FBOSS/tmp_bld_dir/installed/libyaml-_uopPZAyEuJ1pa5uqQsrLr4S97-mQpIjrUubZRQo2og/lib:/var/FBOSS/tmp_bld_dir/installed/gflags-rTRHsBCNJ1QPFhXYI6Cn8x-wcYeGrQFSs0Z0lQGKwJ8/lib:/var/FBOSS/tmp_bld_dir/installed/glog--TiS8L7XT-dpPvonq2U7ueP0LLGtKprnfwIBV9cK38M/lib64: -Wl,--whole-archive libagent_hw_test_src.a /var/FBOSS/tmp_bld_dir/installed/sai_impl-QsIpM6gZa-bdzhWyVP78z_v9UeXMfUPkFd-FimYHKz0/lib/libsai_impl.a libacl_test_utils.a libcopp_test_utils.a libsai_acl_utils.a libsai_copp_utils.a libhw_packet_utils.a libolympic_qos_utils.a libtraffic_policy_utils.a libsai_traced_api.a -Wl,--no-whole-archive libagent_test_utils.a liblabel_forwarding_utils.a libhw_mock.a libmulti_switch_hw_switch_handler.a libaqm_test_utils.a libport_stats_test_utils.a libmulti_port_traffic_test_utils.a libagent_hw_test.a libagent_hw_test_constants.a libmono_agent_ensemble.a libmonolithic_agent_initializer.a libsw_agent_initializer.a libsetup_thrift.a libagent_hw_test_thrift_handler.a libsai_ecmp_utils.a libproduction_features_cpp2.a libstats_test_utils.a libecmp_dataplane_test_util.a libfabric_test_utils.a libtrunk_utils.a libpfc_test_utils.a libqueue_test_utils.a libinvariant_test_utils.a libqos_test_utils.a libvalidated_shell_commands_cpp2.a libprod_config_factory.a libdscp_marking_utils.a libolympic_qos_utils.a libqueue_per_host_test_utils.a libcopp_test_utils.a libtraffic_policy_utils.a libagent_ensemble.a libmain.a libfboss_common_init.a libagent_hw_test_ctrl_cpp2.a libload_balancer_utils.a libhw_pfc_utils.a libroute_scale_gen.a libroute_test_utils.a libroute_distribution_gen.a libload_balancer_test_utils.a libl2learn_observer_util.a libmac_test_utils.a libsflow_shim_utils.a libmirror_test_utils.a libtrap_packet_utils.a libvoq_test_utils.a libecmp_helper.a libdsf_config_utils.a libhw_acl_utils.a libhw_packet_utils.a libpacket_snooper.a libhw_switch_ensemble.a libpkt_test_utils.a libconfig_factory.a libconfig_utils.a libport_test_utils.a libhwagent.a libfboss_init.a liblinkstate_toggler.a libtest_ensemble_if.a libhw_link_state_toggler.a libmultiswitch_test_server.a libsplit_agent_thrift_syncer.a libmultiswitch_service.a libsai_switch.a libsai_platform.a libthrift_handler.a libdiag_shell.a libsai_switch.a libsai_platform.a libthrift_handler.a libdiag_shell.a libhw_resource_stats_publisher.a -Wl,--unresolved-symbols=ignore-all libhw_trunk_counters.a libhw_port_fb303_stats.a libprbs_stats_entry.a libsai_store.a libref_map.a -Wl,--unresolved-symbols=report-all libwedge_led_utils.a libfboss_i2c_lib.a libi2c_controller_stats_cpp2.a /usr/lib64/libusb-1.0.so /usr/lib64/libcurl.so libbcm_yaml_config.a /var/FBOSS/tmp_bld_dir/installed/yaml-cpp-GUi5lTGEdkQXgMx9WRXIVQUXNp_t04zlqomCGse-Jq0/lib/libyaml-cpp.a /var/FBOSS/tmp_bld_dir/installed/libyaml-_uopPZAyEuJ1pa5uqQsrLr4S97-mQpIjrUubZRQo2og/lib/libyaml.so libled_structs_types_cpp2.a libled_mapping_cpp2.a libhandler.a libpkt.a liblog_thrift_call.a libthrifthandler_utils.a libsai_ctrl_cpp2.a libsai_repl.a libsai_api.a libpython_repl.a /usr/lib64/libpython3.9.so -lutil libhw_copp_utils.a libresourcelibutil.a libpacket_factory.a /var/FBOSS/tmp_bld_dir/installed/googletest-GXS04svCG6RIq2z2VZ5_jAU0UT7-sdLvT-zqexiGLLs/lib64/libgmock_main.a /var/FBOSS/tmp_bld_dir/installed/googletest-GXS04svCG6RIq2z2VZ5_jAU0UT7-sdLvT-zqexiGLLs/lib64/libgmock.a /var/FBOSS/tmp_bld_dir/installed/googletest-GXS04svCG6RIq2z2VZ5_jAU0UT7-sdLvT-zqexiGLLs/lib64/libgtest.a libhw_test_acl_utils.a libacl_test_utils.a libasic_test_utils.a libcore.a libmonolithic_switch_handler.a libhw_switch_handler.a libcapture.a libpacket.a libpktutil.a libpacket_observer.a libdiag_cmd_filter.a libhw_cpu_fb303_stats.a libhw_fb303_stats.a libcounter_utils.a liblldp.a liblldp_structs_cpp2.a librestart_time_tracker.a libexponential_back_off.a libphy_utils.a libbidirectional_packet_stream.a libasync_packet_transport.a libpacket_stream_cpp2.a /var/FBOSS/tmp_bld_dir/installed/iproute2-whtmrPlJs8hIRpwOqIyTUwmu8_LdyvkOl8DV_Z12tYY/lib/libnetlink.a /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so libthread_heartbeat.a libhw_ctrl_cpp2.a libloadbalancer_utils.a libl2learn_event_observer.a libagent_fsdb_sync_manager.a libfsdb_syncer.a libfsdb_pub_sub.a libfsdb_stream_client.a libcommon_thrift_utils.a libthrift_service_client.a libqsfp_cpp2.a libfsdb_cpp2.a libfsdb_flags.a libcow_storage_mgr.a libfboss_event_base.a libphy_snapshot_manager.a libsnapshot_manager.a libalert_logger.a libbuild_info_wrapper.a libhw_switch.a libhw_switch_fb303_stats.a libstats.a libcommon_utils.a libmultiswitch_ctrl_cpp2.a libplatform_base.a libswitchinfo_utils.a libroute_update_wrapper.a libfib_updater.a libhw_switch_warmboot_helper.a libsw_switch_warmboot_helper.a libhw_asic_table.a libplatform_mapping_utils.a libminipack_platform_mapping.a libelbert_platform_mapping.a libyamp_platform_mapping.a libfake_test_platform_mapping.a libfuji_platform_mapping.a libgalaxy_platform_mapping.a libwedge100_platform_mapping.a libwedge40_platform_mapping.a libwedge400_platform_utils.a libwedge400c_platform_utils.a libdarwin_platform_mapping.a libwedge400_platform_mapping.a libwedge400c_platform_mapping.a libmorgan_platform_mapping.a libcloud_ripper_platform_mapping.a libmontblanc_platform_mapping.a libtahan800bc_platform_mapping.a libutils.a libasic_utils.a libswitch_asics.a libversion_util.a libswitchid_scope_resolver.a libagent_dir_util.a libload_agent_config.a libmeru400biu_platform_mapping.a libmeru400bia_platform_mapping.a libmeru400bfu_platform_mapping.a libmeru800bia_platform_mapping.a libmeru800bfa_platform_mapping.a libproduct_info.a libjanga800bic_platform_mapping.a libplatform_mapping.a libstate.a libfsdb_helper.a libstate.a libfsdb_helper.a libhwswitch_matcher.a liblacp_types.a libfsdb_model.a libfsdb_model_thriftpath_cpp2.a libfsdb_model_cpp2.a libagent_config_cpp2.a libswitch_reachability_cpp2.a libqsfp_state_cpp2.a libqsfp_config_cpp2.a libtransceiver_validation_cpp2.a libqsfp_stats_cpp2.a libsensor_service_stats_cpp2.a libsensor_service_cpp2.a libsensor_config_cpp2.a libthriftpath_lib.a libfsdb_utils.a libcow_storage.a libstorage.a libfboss_config_utils.a libexternal_phy.a libagent_features.a libstandalone_rib.a libaddress_utils.a libnetwork_to_route_map.a libradix_tree.a libstate_utils.a libswitch_state_cpp2.a liblabel_forwarding_action.a liberror.a libctrl_cpp2.a libplatform_config_cpp2.a libbcm_config_cpp2.a libasic_config_cpp2.a libasic_config_v2_cpp2.a libagent_stats_cpp2.a libhardware_stats_cpp2.a libmka_structs_cpp2.a libphy_cpp2.a libio_stats_cpp2.a libfb303_cpp2.a liboptic_cpp2.a libtransceiver_cpp2.a liblink_cpp2.a libprbs_cpp2.a libproduct_info_cpp2.a libthrift_cow_nodes.a libnodebase.a libthrift_cow_serializer.a libthrift_cow_visitors.a libfsdb_oper_cpp2.a libfsdb_common_cpp2.a libpatch_cpp2.a /usr/lib64/libre2.so libcow_visitor_results_cpp2.a libcommon_file_utils.a libsai_tracer.a libasync_logger.a /var/FBOSS/tmp_bld_dir/installed/fb303/lib/libfb303.a /var/FBOSS/tmp_bld_dir/installed/fb303/lib/libfb303_thrift_cpp.a libsai_version.a libtuple_utils.a libaddress_util.a liblogging_util.a libfboss_error.a libfboss_types.a libswitch_config_cpp2.a libfboss_common_cpp2.a libfboss_cpp2.a libfunction_call_time_reporter.a libhw_write_behavior.a libcommon_cpp2.a libnetwork_address_cpp2.a libmpls_cpp2.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftcpp2.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftfrozen2.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftmetadata.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftanyrep.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthrifttype.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftprotocol.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftprotocol.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libasync.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libruntime.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libtransport.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/librpcmetadata.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libconcurrency.a /lib64/libzstd.so /var/FBOSS/tmp_bld_dir/installed/wangle/lib/libwangle.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthrift-core.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthrifttyperep.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftannotation.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libserverdbginfo.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_server_async_tran.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_server.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_server_state.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_dsr_frontend.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_dsr_types.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_fizz_handshake.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_transport.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_buf_accessor.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_datagram_handler.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_batch_writer.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_cc_algo.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_codec_pktrebuilder.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_happyeyeballs.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_async_udp_socket.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_events.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_looper.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_observer.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_ack_handler.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_loss.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_pacing_functions.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_simple_frame_functions.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_functions.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_codec_pktbuilder.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_stream.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_flowcontrol.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_qlogger.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_stream_functions.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_machine.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_codec.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_handshake.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_codec_packet_number_cipher.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_codec_decode.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_codec_types.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_exception.a /var/FBOSS/tmp_bld_dir/installed/fizz/lib/libfizz.a /usr/lib64/libsodium.so /usr/lib64/libz.so /usr/lib64/librt.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_bufutil.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_transport_knobs.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_constants.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_transport_settings_functions.a /var/FBOSS/tmp_bld_dir/installed/folly/lib/libfolly.a /var/FBOSS/tmp_bld_dir/installed/fmt-uSYXU74IPh1alWrMBg51QsrvAsUtGQlguX0AigNHg-8/lib64/libfmt.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_context.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_filesystem.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_atomic.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_program_options.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_regex.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_system.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_thread.a /usr/lib64/libdouble-conversion.so /var/FBOSS/tmp_bld_dir/installed/gflags-rTRHsBCNJ1QPFhXYI6Cn8x-wcYeGrQFSs0Z0lQGKwJ8/lib/libgflags.so.2.2.2 /var/FBOSS/tmp_bld_dir/installed/glog--TiS8L7XT-dpPvonq2U7ueP0LLGtKprnfwIBV9cK38M/lib64/libglog.so /usr/lib64/libevent.so /usr/lib64/libz.so /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libbz2.so /usr/lib64/liblzma.so /usr/lib64/liblz4.so /usr/lib64/libzstd.so /usr/lib64/libsnappy.so /usr/lib64/libdwarf.so /usr/lib64/libiberty.a /usr/lib64/libsodium.so -ldl && : /usr/bin/ld: libsai_switch.a(SaiSwitchManager.cpp.o): in function `facebook::fboss::SaiSwitchManager::updateStats(bool)': SaiSwitchManager.cpp:(.text+0x6fcd): undefined reference to `facebook::fboss::publishSwitchWatermarks(facebook::fboss::HwSwitchWatermarkStats&)' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. Command '['/usr/bin/cmake', '--build', '/var/FBOSS/tmp_bld_dir/build/fboss', '--target', 'install', '--config', 'RelWithDebInfo', '-j', '32']' returned non-zero exit status 1. !! Failed real 2m11.786s user 8m0.894s sys 1m3.305s ``` This change adds an empty definition for this function, similar to [oss/SaiSwitchManager](https://www.internalfb.com/code/fbsource/[d1f74c8dd747037b10977e299e6baa9afb55b09c]/fbcode/fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp), which cannot be included due to function definition conflicts between `oss/SaiSwitchManager.cpp` and `npu/bcm/SaiSwitchManager.cpp`. Reviewed By: srikrishnagopu Differential Revision: D64707842 fbshipit-source-id: c63c26215393eb217c447dc263d3b4a93509c2df --- cmake/AgentHwSaiSwitch.cmake | 1 + .../switch/npu/bcm/oss/SaiSwitchManager.cpp | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 fboss/agent/hw/sai/switch/npu/bcm/oss/SaiSwitchManager.cpp diff --git a/cmake/AgentHwSaiSwitch.cmake b/cmake/AgentHwSaiSwitch.cmake index 56701582b1505..fc168a3ffb738 100644 --- a/cmake/AgentHwSaiSwitch.cmake +++ b/cmake/AgentHwSaiSwitch.cmake @@ -65,6 +65,7 @@ elseif (SAI_BRCM_IMPL) fboss/agent/hw/sai/switch/npu/bcm/SaiPortManager.cpp fboss/agent/hw/sai/switch/npu/bcm/SaiQueueManager.cpp fboss/agent/hw/sai/switch/npu/bcm/SaiSwitchManager.cpp + fboss/agent/hw/sai/switch/npu/bcm/oss/SaiSwitchManager.cpp fboss/agent/hw/sai/switch/oss/SaiAclTableManager.cpp ) else() diff --git a/fboss/agent/hw/sai/switch/npu/bcm/oss/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/npu/bcm/oss/SaiSwitchManager.cpp new file mode 100644 index 0000000000000..d8e99372f69c4 --- /dev/null +++ b/fboss/agent/hw/sai/switch/npu/bcm/oss/SaiSwitchManager.cpp @@ -0,0 +1,19 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/switch/SaiSwitchManager.h" + +#include "fboss/agent/hw/HwSwitchFb303Stats.h" + +extern "C" { +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +} + +namespace facebook::fboss { + +void publishSwitchWatermarks(HwSwitchWatermarkStats& /*watermarkStats*/) {} + +} // namespace facebook::fboss From 06a0c188df07b431c3b1d43493e9289ac049cf27 Mon Sep 17 00:00:00 2001 From: Jeffrey Leung Date: Mon, 21 Oct 2024 21:12:48 -0700 Subject: [PATCH 236/479] Expose port scope in PortFields Summary: Expose port scope (global/local) in thrift struct. Reviewed By: jasmeetbagga Differential Revision: D64700224 fbshipit-source-id: e88a3888594e98528c4d080900c41b6c2df1dbc2 --- fboss/agent/ThriftHandler.cpp | 1 + fboss/agent/if/ctrl.thrift | 1 + 2 files changed, 2 insertions(+) diff --git a/fboss/agent/ThriftHandler.cpp b/fboss/agent/ThriftHandler.cpp index 663dbefe5bf10..479d68af3c37c 100644 --- a/fboss/agent/ThriftHandler.cpp +++ b/fboss/agent/ThriftHandler.cpp @@ -199,6 +199,7 @@ void getPortInfoHelper( portInfo.hwLogicalPortId() = *id; } *portInfo.portType() = port->getPortType(); + *portInfo.scope() = port->getScope(); std::shared_ptr qosPolicy; auto state = sw.getState(); diff --git a/fboss/agent/if/ctrl.thrift b/fboss/agent/if/ctrl.thrift index f50374c587d1a..980fda9acf7bc 100644 --- a/fboss/agent/if/ctrl.thrift +++ b/fboss/agent/if/ctrl.thrift @@ -376,6 +376,7 @@ struct PortInfoThrift { 29: optional i32 coreId; 30: optional i32 virtualDeviceId; 31: switch_config.PortType portType; + 32: switch_config.Scope scope; } // Port queueing configuration From 74dceb97c1e2b655d007254cfefd3d2f3f7c1b39 Mon Sep 17 00:00:00 2001 From: Jeffrey Leung Date: Mon, 21 Oct 2024 21:12:48 -0700 Subject: [PATCH 237/479] Tag inband recycle port in show int Summary: Tag first global recycle port in show interface as the inband port. Example output: {P1661744766} Reviewed By: jasmeetbagga Differential Revision: D64706158 fbshipit-source-id: 4383fdf295ce0a3e42fb1d3efecfa497df9ae9e9 --- .../show/interface/CmdShowInterface.h | 19 +++++++++++++++++-- .../commands/show/interface/model.thrift | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h b/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h index c31dde38ceac0..7dc523855abf3 100644 --- a/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h +++ b/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h @@ -136,6 +136,7 @@ class CmdShowInterface ifModel.speed() = std::to_string(*portInfo.speedMbps() / 1000) + "G"; ifModel.prefixes() = {}; ifModel.portType() = *portInfo.portType(); + ifModel.scope() = *portInfo.scope(); // We assume that there is a one-to-one association between // port, interface, and VLAN. @@ -281,6 +282,8 @@ class CmdShowInterface }); } + bool foundInbandPort = false; + for (const auto& interface : *model.interfaces()) { std::string name = *interface.name(); std::vector prefixes; @@ -295,6 +298,18 @@ class CmdShowInterface } } + // Tag first global recycle port as the inband port + auto description = *interface.description(); + if (!foundInbandPort && + interface.portType() == cfg::PortType::RECYCLE_PORT && + interface.scope() == cfg::Scope::GLOBAL) { + if (!description.empty() && !description.ends_with("\n")) { + description += "\n"; + } + description += "Inband port"; + foundInbandPort = true; + } + std::vector row; if (isVoq) { outTable.addRow( @@ -305,7 +320,7 @@ class CmdShowInterface (interface.vlan() ? std::to_string(*interface.vlan()) : ""), (interface.mtu() ? std::to_string(*interface.mtu()) : ""), (prefixes.size() > 0 ? folly::join("\n", prefixes) : ""), - *interface.description()}); + description}); } else { outTable.addRow( {name, @@ -314,7 +329,7 @@ class CmdShowInterface (interface.vlan() ? std::to_string(*interface.vlan()) : ""), (interface.mtu() ? std::to_string(*interface.mtu()) : ""), (prefixes.size() > 0 ? folly::join("\n", prefixes) : ""), - *interface.description()}); + description}); } } out << outTable << std::endl; diff --git a/fboss/cli/fboss2/commands/show/interface/model.thrift b/fboss/cli/fboss2/commands/show/interface/model.thrift index ea98886ab0026..e7f0b35d10d45 100644 --- a/fboss/cli/fboss2/commands/show/interface/model.thrift +++ b/fboss/cli/fboss2/commands/show/interface/model.thrift @@ -17,6 +17,7 @@ struct Interface { 8: i32 systemPortId; 9: list ips; 10: switch_config.PortType portType; + 11: switch_config.Scope scope; } struct IpPrefix { From 5fd95abee9175830d286f586d1a106d7da989294 Mon Sep 17 00:00:00 2001 From: "Shrikrishna (Shri) Khare" Date: Mon, 21 Oct 2024 23:25:40 -0700 Subject: [PATCH 238/479] Subscribe to firmware isolate notifications Summary: As titled. Reviewed By: jasmeetbagga Differential Revision: D64412063 Privacy Context Container: L1125642 fbshipit-source-id: 123fa4be1cb9b3de2fc5b064433ef732824ffb66 --- fboss/agent/hw/sai/api/bcm/SwitchApi.cpp | 5 +++-- fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp b/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp index 433dd76627361..130c2bd7c65fe 100644 --- a/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp @@ -172,13 +172,14 @@ void SwitchApi::registerSwitchEventCallback( // Register switch events #if defined BRCM_SAI_SDK_GTE_11_0 - std::array events = { + std::array events = { SAI_SWITCH_EVENT_TYPE_PARITY_ERROR, SAI_SWITCH_EVENT_TYPE_STABLE_FULL, SAI_SWITCH_EVENT_TYPE_STABLE_ERROR, SAI_SWITCH_EVENT_TYPE_UNCONTROLLED_SHUTDOWN, SAI_SWITCH_EVENT_TYPE_WARM_BOOT_DOWNGRADE, - SAI_SWITCH_EVENT_TYPE_INTERRUPT}; + SAI_SWITCH_EVENT_TYPE_INTERRUPT, + SAI_SWITCH_EVENT_TYPE_FABRIC_AUTO_ISOLATE}; #else std::array events = { SAI_SWITCH_EVENT_TYPE_PARITY_ERROR, diff --git a/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp index 9ca8e8b9e125e..8374dcca0067e 100644 --- a/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp @@ -222,6 +222,8 @@ std::string errorType(sai_switch_error_type_t type) { return "SAI_SWITCH_ERROR_TYPE_RQP_PACKET_REASSEMBLY_RCM_ALL_CONTEXTS_TAKEN_DISCARD_ERR"; case SAI_SWITCH_ERROR_TYPE_RTP_TABLE_CHANGE: return "SAI_SWITCH_ERROR_TYPE_RTP_TABLE_CHANGE"; + case SAI_SWITCH_ERROR_TYPE_FABRIC_AUTO_ISOLATION: + return "SAI_SWITCH_ERROR_TYPE_FABRIC_AUTO_ISOLATION"; #endif default: break; From ae40ae7c18e871a511582253bfb3d8c5ed42dc7c Mon Sep 17 00:00:00 2001 From: "Shrikrishna (Shri) Khare" Date: Mon, 21 Oct 2024 23:25:40 -0700 Subject: [PATCH 239/479] Towards processing the firmware isolate callback Summary: When the callback is received, log along with the arguments passed. In future, we will add more processing. Reviewed By: jasmeetbagga Differential Revision: D64670954 Privacy Context Container: L1125642 fbshipit-source-id: 69fe1252a1212e6bccdc7bd28650b1623ecd6b54 --- fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp index 8374dcca0067e..55bc2150a09b0 100644 --- a/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp @@ -441,6 +441,14 @@ void SaiSwitch::switchEventCallback( getSwitchStats()->switchReachabilityChangeCount(); } } break; + case SAI_SWITCH_EVENT_TYPE_FABRIC_AUTO_ISOLATE: { + // TODO(skhare) Process the callback + XLOG(ERR) << "Firmware Isolate callback received" + << " error type: " << errorType(eventInfo->error_type) + << " is_isolated: " << static_cast(eventInfo->index) + << " nof_active_links: " << static_cast(eventInfo->index2); + break; + } #endif } } From 6dd053811aae42014d61ae89a41ac4a6b8e2d2b7 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 22 Oct 2024 00:28:45 -0700 Subject: [PATCH 240/479] Process all switch settings sans drained Summary: Drained will be handled separately. Per BRCM recommendation - Drain should be applied before enabling ports, configuring reachability groups. - Undrain should be done after enabling ports, configuring reachability groups. With our current configuration application model, we would apply undrain first which does not follow the recommended model. TODO: add diffs for processing drain at start of stateUpdatedImpl and undrain at the end of stateUpdatedImpl KB article: https://brcmsemiconductor-csm.wolkenservicedesk.com/wolken-support/article?articleId=26599 Reviewed By: shri-khare Differential Revision: D64671389 Privacy Context Container: L1125642 fbshipit-source-id: 8d03c97ec3fc3ae314407f335bbc3f3275129564 --- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 24 ++++++++---------------- fboss/agent/hw/sai/switch/SaiSwitch.h | 6 +++--- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 0c3bc5928c78e..929e8304734b7 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -613,7 +613,7 @@ std::shared_ptr SaiSwitch::stateChangedImplLocked( checkUnsupportedDelta( delta.getTeFlowEntriesDelta(), managerTable_->teFlowEntryManager()); // update switch settings first - processSwitchSettingsChanged(delta, lockPolicy); + processSwitchSettingsChangeSansDrained(delta, lockPolicy); processLocalCapsuleSwitchIdsDelta(delta, lockPolicy); // process non-default qos policies, which are stored in @@ -1195,29 +1195,29 @@ void SaiSwitch::updateResourceUsage(const LockPolicyT& lockPolicy) { } } -void SaiSwitch::processSwitchSettingsChangedLocked( +void SaiSwitch::processSwitchSettingsChangeSansDrainedLocked( const std::lock_guard& lock, const StateDelta& delta) { const auto switchSettingDelta = delta.getSwitchSettingsDelta(); DeltaFunctions::forEachAdded( switchSettingDelta, [&](const auto& newSwitchSettings) { - processSwitchSettingsChangedEntryLocked( + processSwitchSettingsChangeSansDrainedEntryLocked( lock, std::make_shared(), newSwitchSettings); }); DeltaFunctions::forEachChanged( switchSettingDelta, [&](const auto& oldSwitchSettings, const auto& newSwitchSettings) { - processSwitchSettingsChangedEntryLocked( + processSwitchSettingsChangeSansDrainedEntryLocked( lock, oldSwitchSettings, newSwitchSettings); }); DeltaFunctions::forEachRemoved( switchSettingDelta, [&](const auto& oldSwitchSettings) { - processSwitchSettingsChangedEntryLocked( + processSwitchSettingsChangeSansDrainedEntryLocked( lock, oldSwitchSettings, std::make_shared()); }); } -void SaiSwitch::processSwitchSettingsChangedEntryLocked( +void SaiSwitch::processSwitchSettingsChangeSansDrainedEntryLocked( const std::lock_guard& /*lock*/, const std::shared_ptr& oldSwitchSettings, const std::shared_ptr& newSwitchSettings) { @@ -1261,14 +1261,6 @@ void SaiSwitch::processSwitchSettingsChangedEntryLocked( newSwitchSettings->getMaxRouteCounterIDs()); } - { - const auto oldVal = oldSwitchSettings->isSwitchDrained(); - const auto newVal = newSwitchSettings->isSwitchDrained(); - if (oldVal != newVal) { - managerTable_->switchManager().setSwitchIsolate(newVal); - } - } - { const auto oldVal = oldSwitchSettings->getForceTrafficOverFabric(); const auto newVal = newSwitchSettings->getForceTrafficOverFabric(); @@ -1298,7 +1290,7 @@ void SaiSwitch::processSwitchSettingsChangedEntryLocked( } template -void SaiSwitch::processSwitchSettingsChanged( +void SaiSwitch::processSwitchSettingsChangeSansDrained( const StateDelta& delta, const LockPolicyT& lockPolicy) { const auto switchSettingsDelta = delta.getSwitchSettingsDelta(); @@ -1313,7 +1305,7 @@ void SaiSwitch::processSwitchSettingsChanged( CHECK(newSwitchSettings); if (oldSwitchSettings != newSwitchSettings) { - processSwitchSettingsChangedLocked(lockPolicy.lock(), delta); + processSwitchSettingsChangeSansDrainedLocked(lockPolicy.lock(), delta); } } diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.h b/fboss/agent/hw/sai/switch/SaiSwitch.h index 9b522dc976f2d..31ef2ca751bdb 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.h +++ b/fboss/agent/hw/sai/switch/SaiSwitch.h @@ -395,11 +395,11 @@ class SaiSwitch : public HwSwitch { uint64_t getDeviceWatermarkBytesLocked( const std::lock_guard& lock) const; - void processSwitchSettingsChangedLocked( + void processSwitchSettingsChangeSansDrainedLocked( const std::lock_guard& lock, const StateDelta& delta); - void processSwitchSettingsChangedEntryLocked( + void processSwitchSettingsChangeSansDrainedEntryLocked( const std::lock_guard& lock, const std::shared_ptr& oldSwitchSettings, const std::shared_ptr& newSwitchSettings); @@ -489,7 +489,7 @@ class SaiSwitch : public HwSwitch { Args... args); template - void processSwitchSettingsChanged( + void processSwitchSettingsChangeSansDrained( const StateDelta& delta, const LockPolicyT& lockPolicy); From eb05bc752e0280aac22497894991e745e12658a3 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 22 Oct 2024 00:28:45 -0700 Subject: [PATCH 241/479] Start adding processSwitchSettingsDrainStateChange* methods Summary: As titled. Will fill in the logic next Reviewed By: shri-khare Differential Revision: D64672959 Privacy Context Container: L1125642 fbshipit-source-id: de2d356a52d4b4b7e9248cbda0d7422deae795b1 --- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 15 +++++++++++++++ fboss/agent/hw/sai/switch/SaiSwitch.h | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 929e8304734b7..3b4fe4bffe9f3 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -1195,6 +1195,21 @@ void SaiSwitch::updateResourceUsage(const LockPolicyT& lockPolicy) { } } +void SaiSwitch::processSwitchSettingsDrainStateChangeLocked( + const std::lock_guard& lock, + cfg::SwitchDrainState drainStateToProcess, + const StateDelta& delta) { + // TODO +} + +void SaiSwitch::processSwitchSettingsChangeDrainedEntryLocked( + const std::lock_guard& lock, + cfg::SwitchDrainState drainStateToProcess, + const std::shared_ptr& oldSwitchSettings, + const std::shared_ptr& newSwitchSettings) { + // TODO +} + void SaiSwitch::processSwitchSettingsChangeSansDrainedLocked( const std::lock_guard& lock, const StateDelta& delta) { diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.h b/fboss/agent/hw/sai/switch/SaiSwitch.h index 31ef2ca751bdb..f9b5914d04e2f 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.h +++ b/fboss/agent/hw/sai/switch/SaiSwitch.h @@ -404,6 +404,17 @@ class SaiSwitch : public HwSwitch { const std::shared_ptr& oldSwitchSettings, const std::shared_ptr& newSwitchSettings); + void processSwitchSettingsDrainStateChangeLocked( + const std::lock_guard& lock, + cfg::SwitchDrainState drainStateToProcess, + const StateDelta& delta); + + void processSwitchSettingsChangeDrainedEntryLocked( + const std::lock_guard& lock, + cfg::SwitchDrainState drainStateToProcess, + const std::shared_ptr& oldSwitchSettings, + const std::shared_ptr& newSwitchSettings); + void syncLinkStatesLocked(const std::lock_guard& lock); void syncLinkConnectivityLocked(const std::lock_guard& lock); From 02eab2d2e50eba48e649c63bbdd29dc64ea3f85f Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 22 Oct 2024 00:28:45 -0700 Subject: [PATCH 242/479] Fill in processSwitchSettingsDrainStateChangeLocked methods Summary: As titled Reviewed By: shri-khare Differential Revision: D64673216 Privacy Context Container: L1125642 fbshipit-source-id: db53ce556b431c9515a4f84af41c0c0e6cc8c106 --- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 33 +++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 3b4fe4bffe9f3..6beb7674fa1e1 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -1199,7 +1199,29 @@ void SaiSwitch::processSwitchSettingsDrainStateChangeLocked( const std::lock_guard& lock, cfg::SwitchDrainState drainStateToProcess, const StateDelta& delta) { - // TODO + const auto switchSettingDelta = delta.getSwitchSettingsDelta(); + DeltaFunctions::forEachAdded( + switchSettingDelta, [&](const auto& newSwitchSettings) { + processSwitchSettingsChangeDrainedEntryLocked( + lock, + drainStateToProcess, + std::make_shared(), + newSwitchSettings); + }); + DeltaFunctions::forEachChanged( + switchSettingDelta, + [&](const auto& oldSwitchSettings, const auto& newSwitchSettings) { + processSwitchSettingsChangeDrainedEntryLocked( + lock, drainStateToProcess, oldSwitchSettings, newSwitchSettings); + }); + DeltaFunctions::forEachRemoved( + switchSettingDelta, [&](const auto& oldSwitchSettings) { + processSwitchSettingsChangeDrainedEntryLocked( + lock, + drainStateToProcess, + oldSwitchSettings, + std::make_shared()); + }); } void SaiSwitch::processSwitchSettingsChangeDrainedEntryLocked( @@ -1207,7 +1229,14 @@ void SaiSwitch::processSwitchSettingsChangeDrainedEntryLocked( cfg::SwitchDrainState drainStateToProcess, const std::shared_ptr& oldSwitchSettings, const std::shared_ptr& newSwitchSettings) { - // TODO + const auto oldVal = oldSwitchSettings->isSwitchDrained(); + const auto newVal = newSwitchSettings->isSwitchDrained(); + cfg::SwitchDrainState newDrainState = newVal + ? cfg::SwitchDrainState::DRAINED + : cfg::SwitchDrainState::UNDRAINED; + if (oldVal != newVal && newDrainState == drainStateToProcess) { + managerTable_->switchManager().setSwitchIsolate(newVal); + } } void SaiSwitch::processSwitchSettingsChangeSansDrainedLocked( From 7553b26a1feec421b486144a860f0b2a87d465f7 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 22 Oct 2024 00:28:45 -0700 Subject: [PATCH 243/479] Drain switch early, undrain late Summary: Switch drain undrain come via config application. Per vendor recommendation we should drain before applying other changes (in particular enabling ports) and undrain only after applying such changes. Follow this sequence. Reviewed By: srikrishnagopu Differential Revision: D64675064 Privacy Context Container: L1125642 fbshipit-source-id: 30b6735b4b8949145e1b44892ac3d3ec15e6e1b0 --- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 30 ++++++++++++++++++++++++- fboss/agent/hw/sai/switch/SaiSwitch.h | 6 +++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 6beb7674fa1e1..95e2ac14182a3 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -612,7 +612,10 @@ std::shared_ptr SaiSwitch::stateChangedImplLocked( // Unsupported features checkUnsupportedDelta( delta.getTeFlowEntriesDelta(), managerTable_->teFlowEntryManager()); - // update switch settings first + // update switch settings first. In particular drain box first if drain == + // true + processSwitchSettingsDrainStateChange( + delta, cfg::SwitchDrainState::DRAINED, lockPolicy); processSwitchSettingsChangeSansDrained(delta, lockPolicy); processLocalCapsuleSwitchIdsDelta(delta, lockPolicy); @@ -1128,6 +1131,9 @@ std::shared_ptr SaiSwitch::stateChangedImplLocked( // Process link state change delta and update the LED status processLinkStateChangeDelta(delta, lockPolicy); + // Undrain switch last + processSwitchSettingsDrainStateChange( + delta, cfg::SwitchDrainState::UNDRAINED, lockPolicy); return delta.newState(); } @@ -1353,6 +1359,28 @@ void SaiSwitch::processSwitchSettingsChangeSansDrained( } } +template +void SaiSwitch::processSwitchSettingsDrainStateChange( + const StateDelta& delta, + cfg::SwitchDrainState drainStateToProcess, + const LockPolicyT& lockPolicy) { + const auto switchSettingsDelta = delta.getSwitchSettingsDelta(); + const auto& oldSwitchSettings = switchSettingsDelta.getOld(); + const auto& newSwitchSettings = switchSettingsDelta.getNew(); + + /* + * SwitchSettings are mandatory and can thus only be modified. + * Every field in SwitchSettings must always be set in new SwitchState. + */ + CHECK(oldSwitchSettings); + CHECK(newSwitchSettings); + + if (oldSwitchSettings != newSwitchSettings) { + processSwitchSettingsDrainStateChangeLocked( + lockPolicy.lock(), drainStateToProcess, delta); + } +} + bool SaiSwitch::isValidStateUpdate(const StateDelta& delta) const { std::lock_guard lock(saiSwitchMutex_); return isValidStateUpdateLocked(lock, delta); diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.h b/fboss/agent/hw/sai/switch/SaiSwitch.h index f9b5914d04e2f..31f7ea68860b3 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.h +++ b/fboss/agent/hw/sai/switch/SaiSwitch.h @@ -504,6 +504,12 @@ class SaiSwitch : public HwSwitch { const StateDelta& delta, const LockPolicyT& lockPolicy); + template + void processSwitchSettingsDrainStateChange( + const StateDelta& delta, + cfg::SwitchDrainState drainStateToProcess, + const LockPolicyT& lockPolicy); + PortSaiId getCPUPortSaiId() const; void packetRxCallbackPort( From 455abbe60fddb92ff9012c55897da54339966f62 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 22 Oct 2024 00:28:45 -0700 Subject: [PATCH 244/479] Add boot type to getSwitchAttributes API Summary: Isolation status would be different for Fabric switches based on cold/warm boot. Reviewed By: shri-khare Differential Revision: D64697538 Privacy Context Container: L1125642 fbshipit-source-id: d3dfb6c83d7ca6038fea9d3f40d5db4d8f98bc36 --- fboss/agent/hw/sai/switch/SaiSwitchManager.cpp | 5 +++-- fboss/agent/platforms/sai/SaiPlatform.cpp | 3 ++- fboss/agent/platforms/sai/SaiPlatform.h | 3 ++- .../platforms/sai/cloudripper/SaiCloudRipperPhyPlatform.h | 3 ++- fboss/agent/platforms/sai/elbert/SaiElbert8DDPhyPlatform.h | 3 ++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp index 30721221137a7..6a5962c413fe6 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp @@ -190,7 +190,8 @@ SaiSwitchManager::SaiSwitchManager( // init attribute (warm boot path) auto& switchApi = SaiApiTable::getInstance()->switchApi(); auto newSwitchId = switchApi.create( - platform->getSwitchAttributes(true, switchType, switchId), swId); + platform->getSwitchAttributes(true, switchType, switchId, bootType), + swId); // Load all switch attributes switch_ = std::make_unique(newSwitchId); if (switchType != cfg::SwitchType::FABRIC) { @@ -204,7 +205,7 @@ SaiSwitchManager::SaiSwitchManager( } else { switch_ = std::make_unique( std::monostate(), - platform->getSwitchAttributes(false, switchType, switchId), + platform->getSwitchAttributes(false, switchType, switchId, bootType), swId); const auto& asic = platform_->getAsic(); diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index 9c9ff010cbc8f..089dbeff6d75b 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -453,7 +453,8 @@ std::vector SaiPlatform::getPortsWithTransceiverID( SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes( bool mandatoryOnly, cfg::SwitchType swType, - std::optional swId) { + std::optional swId, + BootType /*bootType*/) { SaiSwitchTraits::Attributes::InitSwitch initSwitch(true); std::optional hwInfo = getHwInfo(this); diff --git a/fboss/agent/platforms/sai/SaiPlatform.h b/fboss/agent/platforms/sai/SaiPlatform.h index 5b27017cb4b1c..537b77c02263d 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.h +++ b/fboss/agent/platforms/sai/SaiPlatform.h @@ -104,7 +104,8 @@ class SaiPlatform : public Platform, public StateObserver { virtual SaiSwitchTraits::CreateAttributes getSwitchAttributes( bool mandatoryOnly, cfg::SwitchType switchType, - std::optional switchId); + std::optional switchId, + BootType bootType); uint32_t getDefaultMacAgingTime() const; diff --git a/fboss/agent/platforms/sai/cloudripper/SaiCloudRipperPhyPlatform.h b/fboss/agent/platforms/sai/cloudripper/SaiCloudRipperPhyPlatform.h index b3af4613cfa57..1d0eb673a173d 100644 --- a/fboss/agent/platforms/sai/cloudripper/SaiCloudRipperPhyPlatform.h +++ b/fboss/agent/platforms/sai/cloudripper/SaiCloudRipperPhyPlatform.h @@ -45,7 +45,8 @@ class SaiCloudRipperPhyPlatform : public SaiPlatform { SaiSwitchTraits::CreateAttributes getSwitchAttributes( bool /*mandatoryOnly*/, cfg::SwitchType switchType, - std::optional switchId) override { + std::optional switchId, + BootType /*bootType*/) override { CHECK(switchCreateAttrs_); return *switchCreateAttrs_; } diff --git a/fboss/agent/platforms/sai/elbert/SaiElbert8DDPhyPlatform.h b/fboss/agent/platforms/sai/elbert/SaiElbert8DDPhyPlatform.h index 189f4c08c158c..78459d8874c56 100644 --- a/fboss/agent/platforms/sai/elbert/SaiElbert8DDPhyPlatform.h +++ b/fboss/agent/platforms/sai/elbert/SaiElbert8DDPhyPlatform.h @@ -50,7 +50,8 @@ class SaiElbert8DDPhyPlatform : public SaiPlatform { SaiSwitchTraits::CreateAttributes getSwitchAttributes( bool /*mandatoryOnly*/, cfg::SwitchType switchType, - std::optional switchId) override { + std::optional switchId, + BootType /*bootType*/) override { CHECK(switchCreateAttrs_); return *switchCreateAttrs_; } From d1224df71ad1e4b69e0969b65740d229f9700f0b Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 22 Oct 2024 00:28:45 -0700 Subject: [PATCH 245/479] Start fabric switch in isolated state on cold boot Summary: As titled Reviewed By: zechengh09 Differential Revision: D64707348 Privacy Context Container: L1125642 fbshipit-source-id: f06e7f1e15f5655257fc96109a01546958f7f132 --- fboss/agent/platforms/sai/SaiPlatform.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index 089dbeff6d75b..03f69cf8ec28b 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -454,7 +454,7 @@ SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes( bool mandatoryOnly, cfg::SwitchType swType, std::optional swId, - BootType /*bootType*/) { + BootType bootType) { SaiSwitchTraits::Attributes::InitSwitch initSwitch(true); std::optional hwInfo = getHwInfo(this); @@ -614,6 +614,11 @@ SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes( fabricLLFC = std::vector({kRamon3LlfcThreshold}); } #endif + if (swType == cfg::SwitchType::FABRIC && bootType == BootType::COLD_BOOT) { + // FABRIC switches should always start in isolated state until we configure + // the switch + switchIsolate = true; + } return { initSwitch, From 241168bb4d905abbfbafd29358ed3df1c01aeece Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Tue, 22 Oct 2024 08:43:15 -0700 Subject: [PATCH 246/479] yangra platform, yangra platform port and yangra platform mapping Summary: as titled Reviewed By: srikrishnagopu Differential Revision: D63654456 fbshipit-source-id: 15ee35c8fd8ad9109bfde84b0e7d8dba7697a47e --- cmake/AgentPlatformsCommon.cmake | 1 + cmake/AgentPlatformsCommonYangra.cmake | 12 ++ cmake/AgentPlatformsSai.cmake | 3 + fboss/agent/hw/sai/diag/DiagShell.cpp | 6 + fboss/agent/platforms/common/BUCK | 1 + .../platforms/common/PlatformMappingUtils.cpp | 5 + fboss/agent/platforms/common/yangra/BUCK | 16 ++ .../common/yangra/YangraPlatformMapping.h | 26 +++ .../yangra/oss/YangraPlatformMapping.cpp | 26 +++ fboss/agent/platforms/sai/SaiPlatform.cpp | 12 ++ fboss/agent/platforms/sai/SaiPlatformInit.cpp | 4 + .../agent/platforms/sai/SaiYangraPlatform.cpp | 99 +++++++++++ fboss/agent/platforms/sai/SaiYangraPlatform.h | 57 ++++++ .../platforms/sai/SaiYangraPlatformPort.cpp | 30 ++++ .../platforms/sai/SaiYangraPlatformPort.h | 35 ++++ .../AgentRouteOverflowTests.cpp | 3 + fboss/agent/test/utils/ConfigUtils.cpp | 8 + fboss/lib/if/fboss_common.thrift | 1 + fboss/lib/platforms/PlatformMode.h | 2 + fboss/lib/platforms/PlatformProductInfo.cpp | 8 + .../yangra.agent.materialized_JSON | 162 ++++++++++++++++++ .../test/hw_test/HwXphyFirmwareTest.cpp | 1 + 22 files changed, 518 insertions(+) create mode 100644 cmake/AgentPlatformsCommonYangra.cmake create mode 100644 fboss/agent/platforms/common/yangra/BUCK create mode 100644 fboss/agent/platforms/common/yangra/YangraPlatformMapping.h create mode 100644 fboss/agent/platforms/common/yangra/oss/YangraPlatformMapping.cpp create mode 100644 fboss/agent/platforms/sai/SaiYangraPlatform.cpp create mode 100644 fboss/agent/platforms/sai/SaiYangraPlatform.h create mode 100644 fboss/agent/platforms/sai/SaiYangraPlatformPort.cpp create mode 100644 fboss/agent/platforms/sai/SaiYangraPlatformPort.h create mode 100644 fboss/oss/hw_test_configs/yangra.agent.materialized_JSON diff --git a/cmake/AgentPlatformsCommon.cmake b/cmake/AgentPlatformsCommon.cmake index f8eb62d1b6784..2967bf8bc71ae 100644 --- a/cmake/AgentPlatformsCommon.cmake +++ b/cmake/AgentPlatformsCommon.cmake @@ -44,6 +44,7 @@ target_link_libraries(platform_mapping_utils meru400bia_platform_mapping meru800bia_platform_mapping meru800bfa_platform_mapping + yangra_platform_mapping janga800bic_platform_mapping tahan800bc_platform_mapping ${RE2} diff --git a/cmake/AgentPlatformsCommonYangra.cmake b/cmake/AgentPlatformsCommonYangra.cmake new file mode 100644 index 0000000000000..749346afd9346 --- /dev/null +++ b/cmake/AgentPlatformsCommonYangra.cmake @@ -0,0 +1,12 @@ +# CMake to build libraries and binaries in fboss/agent/platforms/common/yangra + +# In general, libraries and binaries in fboss/foo/bar are built by +# cmake/FooBar.cmake + +add_library(yangra_platform_mapping + fboss/agent/platforms/common/yangra/oss/YangraPlatformMapping.cpp +) + +target_link_libraries(yangra_platform_mapping + platform_mapping +) diff --git a/cmake/AgentPlatformsSai.cmake b/cmake/AgentPlatformsSai.cmake index d9c2959c60c9e..e24d484f822d5 100644 --- a/cmake/AgentPlatformsSai.cmake +++ b/cmake/AgentPlatformsSai.cmake @@ -39,6 +39,7 @@ add_library(sai_platform fboss/agent/platforms/sai/SaiBcmMontblancPlatformPort.cpp fboss/agent/platforms/sai/SaiTahan800bcPlatform.cpp fboss/agent/platforms/sai/SaiTahan800bcPlatformPort.cpp + fboss/agent/platforms/sai/SaiYangraPlatform.cpp fboss/agent/platforms/sai/oss/SaiBcmMinipackPlatform.cpp fboss/agent/platforms/sai/oss/SaiTajoPlatform.cpp @@ -63,6 +64,7 @@ add_library(sai_platform fboss/agent/platforms/sai/oss/SaiMeru400bfuPlatformPort.cpp fboss/agent/platforms/sai/oss/SaiMeru800bfaPlatformPort.cpp fboss/agent/platforms/sai/oss/SaiMorgan800ccPlatformPort.cpp + fboss/agent/platforms/sai/SaiYangraPlatformPort.cpp ) target_link_libraries(sai_platform @@ -94,6 +96,7 @@ target_link_libraries(sai_platform meru400bfu_platform_mapping meru800bia_platform_mapping meru800bfa_platform_mapping + yangra_platform_mapping montblanc_platform_mapping janga800bic_platform_mapping tahan800bc_platform_mapping diff --git a/fboss/agent/hw/sai/diag/DiagShell.cpp b/fboss/agent/hw/sai/diag/DiagShell.cpp index efb715cd9b5f7..e4ed57eb74dc1 100644 --- a/fboss/agent/hw/sai/diag/DiagShell.cpp +++ b/fboss/agent/hw/sai/diag/DiagShell.cpp @@ -189,6 +189,8 @@ std::unique_ptr DiagShell::makeRepl() const { case PlatformType::PLATFORM_FAKE_WEDGE40: case PlatformType::PLATFORM_FAKE_SAI: throw FbossError("Shell not supported for fake platforms"); + case PlatformType::PLATFORM_YANGRA: + throw FbossError("Shell still not supported for Yangra platforms"); } CHECK(0) << " Should never get here"; return nullptr; @@ -422,6 +424,8 @@ std::string DiagCmdServer::getDelimiterDiagCmd(const std::string& UUID) const { case PlatformType::PLATFORM_FAKE_WEDGE40: case PlatformType::PLATFORM_FAKE_SAI: throw FbossError("Shell not supported for fake platforms"); + case PlatformType::PLATFORM_YANGRA: + throw FbossError("Shell still not supported for Yangra platforms"); } CHECK(0) << " Should never get here"; return ""; @@ -486,6 +490,8 @@ std::string& DiagCmdServer::cleanUpOutput( case PlatformType::PLATFORM_FAKE_WEDGE40: case PlatformType::PLATFORM_FAKE_SAI: throw FbossError("Shell not supported for fake platforms"); + case PlatformType::PLATFORM_YANGRA: + throw FbossError("Shell still not supported for Yangra platforms"); } CHECK(0) << " Should never get here"; return output; diff --git a/fboss/agent/platforms/common/BUCK b/fboss/agent/platforms/common/BUCK index 0ad879af48f54..d3afa5038bb99 100644 --- a/fboss/agent/platforms/common/BUCK +++ b/fboss/agent/platforms/common/BUCK @@ -57,6 +57,7 @@ cpp_library( "//fboss/agent/platforms/common/wedge400:wedge400_platform_utils", "//fboss/agent/platforms/common/wedge400c:wedge400c_platform_mapping", "//fboss/agent/platforms/common/yamp:yamp_platform_mapping", + "//fboss/agent/platforms/common/yangra:yangra_platform_mapping", "//fboss/lib/platforms:platform_mode", "//folly:file_util", "//folly/logging:logging", diff --git a/fboss/agent/platforms/common/PlatformMappingUtils.cpp b/fboss/agent/platforms/common/PlatformMappingUtils.cpp index ec5a8a7c80b0f..33cf32576407b 100644 --- a/fboss/agent/platforms/common/PlatformMappingUtils.cpp +++ b/fboss/agent/platforms/common/PlatformMappingUtils.cpp @@ -41,6 +41,7 @@ #include "fboss/agent/platforms/common/wedge400c/Wedge400CPlatformMapping.h" #include "fboss/agent/platforms/common/wedge400c/Wedge400CPlatformUtil.h" #include "fboss/agent/platforms/common/yamp/YampPlatformMapping.h" +#include "fboss/agent/platforms/common/yangra/YangraPlatformMapping.h" namespace { std::vector getFakeSaiControllingPortIDs() { @@ -172,6 +173,10 @@ std::unique_ptr initPlatformMapping(PlatformType type) { return platformMappingStr.empty() ? std::make_unique() : std::make_unique(platformMappingStr); + case PlatformType::PLATFORM_YANGRA: + return platformMappingStr.empty() + ? std::make_unique() + : std::make_unique(platformMappingStr); case PlatformType::PLATFORM_FAKE_SAI: { std::vector controllingPorts = getFakeSaiControllingPortIDs(); return std::make_unique(controllingPorts); diff --git a/fboss/agent/platforms/common/yangra/BUCK b/fboss/agent/platforms/common/yangra/BUCK new file mode 100644 index 0000000000000..fb658b34f0a79 --- /dev/null +++ b/fboss/agent/platforms/common/yangra/BUCK @@ -0,0 +1,16 @@ +load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") + +oncall("fboss_agent_push") + +cpp_library( + name = "yangra_platform_mapping", + srcs = [ + "facebook/YangraPlatformMapping.cpp", + ], + headers = [ + "YangraPlatformMapping.h", + ], + exported_deps = [ + "//fboss/agent/platforms/common:platform_mapping", + ], +) diff --git a/fboss/agent/platforms/common/yangra/YangraPlatformMapping.h b/fboss/agent/platforms/common/yangra/YangraPlatformMapping.h new file mode 100644 index 0000000000000..dc4fd0c8ac838 --- /dev/null +++ b/fboss/agent/platforms/common/yangra/YangraPlatformMapping.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2023-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#pragma once + +#include "fboss/agent/platforms/common/PlatformMapping.h" + +namespace facebook::fboss { + +class YangraPlatformMapping : public PlatformMapping { + public: + YangraPlatformMapping(); + explicit YangraPlatformMapping(const std::string& platformMappingStr); + + private: + // Forbidden copy constructor and assignment operator + YangraPlatformMapping(YangraPlatformMapping const&) = delete; + YangraPlatformMapping& operator=(YangraPlatformMapping const&) = delete; +}; +} // namespace facebook::fboss diff --git a/fboss/agent/platforms/common/yangra/oss/YangraPlatformMapping.cpp b/fboss/agent/platforms/common/yangra/oss/YangraPlatformMapping.cpp new file mode 100644 index 0000000000000..0870205fd370a --- /dev/null +++ b/fboss/agent/platforms/common/yangra/oss/YangraPlatformMapping.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2023-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#include "fboss/agent/platforms/common/yangra/YangraPlatformMapping.h" + +namespace { +constexpr auto kJsonPlatformMappingStr = R"( +)"; +} // namespace + +namespace facebook::fboss { +YangraPlatformMapping::YangraPlatformMapping() + : PlatformMapping(kJsonPlatformMappingStr) {} + +YangraPlatformMapping::YangraPlatformMapping( + const std::string& platformMappingStr) + : PlatformMapping(platformMappingStr) {} + +} // namespace facebook::fboss diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index 03f69cf8ec28b..06aaf301117b3 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -37,6 +37,7 @@ #include "fboss/agent/platforms/sai/SaiMorgan800ccPlatformPort.h" #include "fboss/agent/platforms/sai/SaiTahan800bcPlatformPort.h" #include "fboss/agent/platforms/sai/SaiWedge400CPlatformPort.h" +#include "fboss/agent/platforms/sai/SaiYangraPlatformPort.h" #include "fboss/agent/state/Port.h" #include "fboss/lib/CommonFileUtils.h" #include "fboss/lib/config/PlatformConfigUtils.h" @@ -380,6 +381,8 @@ void SaiPlatform::initPorts() { saiPort = std::make_unique(portId, this); } else if (platformMode == PlatformType::PLATFORM_TAHAN800BC) { saiPort = std::make_unique(portId, this); + } else if (platformMode == PlatformType::PLATFORM_YANGRA) { + saiPort = std::make_unique(portId, this); } else { saiPort = std::make_unique(portId, this); } @@ -709,6 +712,15 @@ const std::set& SaiPlatform::getDefaultSwitchAsicSupportedApis() static auto apis = SaiApiTable::getInstance()->getFullApiList(); // Macsec is not currently supported in the broadcom sai sdk apis.erase(facebook::fboss::MacsecApi::ApiType); + // TODO_NV: What is the condition here to erase not supported APIs? + apis.erase(facebook::fboss::MplsApi::ApiType); + apis.erase(facebook::fboss::VirtualRouterApi::ApiType); + apis.erase(facebook::fboss::TamApi::ApiType); + apis.erase(facebook::fboss::SystemPortApi::ApiType); +#if SAI_API_VERSION >= SAI_VERSION(1, 14, 0) + apis.erase(facebook::fboss::ArsApi::ApiType); + apis.erase(facebook::fboss::ArsProfileApi::ApiType); +#endif return apis; } const std::set& SaiPlatform::getDefaultPhyAsicSupportedApis() const { diff --git a/fboss/agent/platforms/sai/SaiPlatformInit.cpp b/fboss/agent/platforms/sai/SaiPlatformInit.cpp index 3a66c0dcecfd1..821cfb4e2379b 100644 --- a/fboss/agent/platforms/sai/SaiPlatformInit.cpp +++ b/fboss/agent/platforms/sai/SaiPlatformInit.cpp @@ -34,6 +34,7 @@ #include "fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h" #include "fboss/agent/platforms/sai/SaiTahan800bcPlatform.h" #include "fboss/agent/platforms/sai/SaiWedge400CPlatform.h" +#include "fboss/agent/platforms/sai/SaiYangraPlatform.h" namespace facebook::fboss { @@ -97,6 +98,9 @@ std::unique_ptr chooseSaiPlatform( } else if (productInfo->getType() == PlatformType::PLATFORM_MORGAN800CC) { return std::make_unique( std::move(productInfo), localMac, platformMappingStr); + } else if (productInfo->getType() == PlatformType::PLATFORM_YANGRA) { + return std::make_unique( + std::move(productInfo), localMac, platformMappingStr); } else if (productInfo->getType() == PlatformType::PLATFORM_JANGA800BIC) { return std::make_unique( std::move(productInfo), localMac, platformMappingStr); diff --git a/fboss/agent/platforms/sai/SaiYangraPlatform.cpp b/fboss/agent/platforms/sai/SaiYangraPlatform.cpp new file mode 100644 index 0000000000000..ac11d3de8fd2f --- /dev/null +++ b/fboss/agent/platforms/sai/SaiYangraPlatform.cpp @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2023-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#include "fboss/agent/platforms/sai/SaiYangraPlatform.h" +#include "fboss/agent/hw/switch_asics/ChenabAsic.h" +#include "fboss/agent/platforms/common/yangra/YangraPlatformMapping.h" + +#include + +namespace facebook::fboss { + +// No Change +SaiYangraPlatform::SaiYangraPlatform( + std::unique_ptr productInfo, + folly::MacAddress localMac, + const std::string& platformMappingStr) + : SaiPlatform( + std::move(productInfo), + platformMappingStr.empty() + ? std::make_unique() + : std::make_unique(platformMappingStr), + localMac) {} + +void SaiYangraPlatform::setupAsic( + cfg::SwitchType switchType, + std::optional switchId, + int16_t switchIndex, + std::optional systemPortRange, + folly::MacAddress& mac, + std::optional /*role*/) { + asic_ = std::make_unique( + switchType, switchId, switchIndex, systemPortRange, mac); + asic_->setDefaultStreamType(cfg::StreamType::UNICAST); +} + +HwAsic* SaiYangraPlatform::getAsic() const { + return asic_.get(); +} +const std::unordered_map +SaiYangraPlatform::getSaiProfileVendorExtensionValues() const { + return std::unordered_map(); +} + +const std::set& SaiYangraPlatform::getSupportedApiList() const { + return getDefaultSwitchAsicSupportedApis(); +} + +std::optional +SaiYangraPlatform::getAclFieldList() const { + return std::nullopt; +} +std::string SaiYangraPlatform::getHwConfig() { + std::string xml_filename = "/usr/share/sai_5600.xml"; + std::ifstream xml_file(xml_filename); + std::string xml_config( + (std::istreambuf_iterator(xml_file)), + std::istreambuf_iterator()); + // std::cout << "Read config from: " << xml_filename << std::endl; + // std::cout << "Content:" << std::endl << xml_config << std::endl; + return xml_config; +} + +bool SaiYangraPlatform::isSerdesApiSupported() const { + return false; +} +std::vector SaiYangraPlatform::getAllPortsInGroup( + PortID /*portID*/) const { + return {}; +} +std::vector SaiYangraPlatform::getSupportedFlexPortModes() const { + return { + FlexPortMode::ONEX400G, + FlexPortMode::ONEX100G, + FlexPortMode::ONEX40G, + FlexPortMode::FOURX25G, + FlexPortMode::FOURX10G, + FlexPortMode::TWOX50G}; +} +std::optional SaiYangraPlatform::getInterfaceType( + TransmitterTechnology /*transmitterTech*/, + cfg::PortSpeed /*speed*/) const { + return std::nullopt; +} + +bool SaiYangraPlatform::supportInterfaceType() const { + return false; +} + +void SaiYangraPlatform::initLEDs() {} +SaiYangraPlatform::~SaiYangraPlatform() = default; + +} // namespace facebook::fboss diff --git a/fboss/agent/platforms/sai/SaiYangraPlatform.h b/fboss/agent/platforms/sai/SaiYangraPlatform.h new file mode 100644 index 0000000000000..96b2144e4dd79 --- /dev/null +++ b/fboss/agent/platforms/sai/SaiYangraPlatform.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#pragma once + +#include "fboss/agent/platforms/sai/SaiPlatform.h" + +namespace facebook::fboss { + +class ChenabAsic; + +class SaiYangraPlatform : public SaiPlatform { + public: + SaiYangraPlatform( + std::unique_ptr productInfo, + folly::MacAddress localMac, + const std::string& platformMappingStr); + ~SaiYangraPlatform() override; + + std::optional getAclFieldList() + const override; + + HwAsic* getAsic() const override; + bool isSerdesApiSupported() const override; + std::vector getAllPortsInGroup(PortID /*portID*/) const override; + std::vector getSupportedFlexPortModes() const override; + std::optional getInterfaceType( + TransmitterTechnology /*transmitterTech*/, + cfg::PortSpeed /*speed*/) const override; + bool supportInterfaceType() const override; + void initLEDs() override; + + const std::set& getSupportedApiList() const override; + + const std::unordered_map + getSaiProfileVendorExtensionValues() const override; + + std::string getHwConfig() override; + + private: + void setupAsic( + cfg::SwitchType switchType, + std::optional switchId, + int16_t switchIndex, + std::optional systemPortRange, + folly::MacAddress& mac, + std::optional role) override; + std::unique_ptr asic_; +}; + +} // namespace facebook::fboss diff --git a/fboss/agent/platforms/sai/SaiYangraPlatformPort.cpp b/fboss/agent/platforms/sai/SaiYangraPlatformPort.cpp new file mode 100644 index 0000000000000..41ddfe0e73cb6 --- /dev/null +++ b/fboss/agent/platforms/sai/SaiYangraPlatformPort.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#include "fboss/agent/platforms/sai/SaiYangraPlatformPort.h" + +namespace facebook::fboss { + +uint32_t SaiYangraPlatformPort::getCurrentLedState() const { + return static_cast(currentLedState_); +} +uint32_t SaiYangraPlatformPort::getPhysicalLaneId( + uint32_t /*chipId*/, + uint32_t logicalLane) const { + return logicalLane; +} +void SaiYangraPlatformPort::portChanged( + std::shared_ptr /*newPort*/, + std::shared_ptr /*oldPort*/) {} +void SaiYangraPlatformPort::linkStatusChanged(bool /*up*/, bool /*adminUp*/) {} +bool SaiYangraPlatformPort::supportsTransceiver() const { + return false; +} + +} // namespace facebook::fboss diff --git a/fboss/agent/platforms/sai/SaiYangraPlatformPort.h b/fboss/agent/platforms/sai/SaiYangraPlatformPort.h new file mode 100644 index 0000000000000..66ed0f2409539 --- /dev/null +++ b/fboss/agent/platforms/sai/SaiYangraPlatformPort.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2023-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#pragma once + +#include "fboss/agent/platforms/sai/SaiPlatformPort.h" + +namespace facebook::fboss { + +class SaiYangraPlatformPort : public SaiPlatformPort { + public: + SaiYangraPlatformPort(PortID id, SaiPlatform* platform) + : SaiPlatformPort(id, platform) {} + void linkStatusChanged(bool up, bool adminUp) override; + uint32_t getPhysicalLaneId(uint32_t chipId, uint32_t logicalLane) + const override; + // void externalState(PortLedExternalState lfs) override; + uint32_t getCurrentLedState() const override; + void portChanged( + std::shared_ptr /*newPort*/, + std::shared_ptr /*oldPort*/) override; + + bool supportsTransceiver() const override; + + private: + uint32_t currentLedState_{0}; +}; + +} // namespace facebook::fboss diff --git a/fboss/agent/test/agent_hw_tests/AgentRouteOverflowTests.cpp b/fboss/agent/test/agent_hw_tests/AgentRouteOverflowTests.cpp index 079dcddea340b..54dfc9c2c54ce 100644 --- a/fboss/agent/test/agent_hw_tests/AgentRouteOverflowTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentRouteOverflowTests.cpp @@ -106,6 +106,9 @@ TEST_F(AgentRouteOverflowTest, overflowRoutes) { break; case PlatformType::PLATFORM_TAHAN800BC: break; + case PlatformType::PLATFORM_YANGRA: + // No overflow test for Yangra + break; } if (routeChunks.size() == 0) { return; diff --git a/fboss/agent/test/utils/ConfigUtils.cpp b/fboss/agent/test/utils/ConfigUtils.cpp index 2d3ef5b50b28a..919239bcb0f12 100644 --- a/fboss/agent/test/utils/ConfigUtils.cpp +++ b/fboss/agent/test/utils/ConfigUtils.cpp @@ -431,6 +431,14 @@ cfg::DsfNode dsfNodeConfig( localMac), PlatformType::PLATFORM_MERU800BFA); case cfg::AsicType::ASIC_TYPE_CHENAB: + return std::pair( + std::make_unique( + fromAsic.getSwitchType(), + switchId, + fromAsic.getSwitchIndex(), + std::nullopt, + localMac), + PlatformType::PLATFORM_YANGRA); default: throw FbossError("Unexpected asic type: ", fromAsic.getAsicTypeStr()); } diff --git a/fboss/lib/if/fboss_common.thrift b/fboss/lib/if/fboss_common.thrift index 784553771ad39..b26fb48dd46dd 100644 --- a/fboss/lib/if/fboss_common.thrift +++ b/fboss/lib/if/fboss_common.thrift @@ -41,4 +41,5 @@ enum PlatformType { PLATFORM_TAHAN800BC = 33, PLATFORM_MERU800BFA_P1 = 34, PLATFORM_MERU800BIAB = 35, + PLATFORM_YANGRA = 36, } diff --git a/fboss/lib/platforms/PlatformMode.h b/fboss/lib/platforms/PlatformMode.h index 20c784b352624..04923d10f44ab 100644 --- a/fboss/lib/platforms/PlatformMode.h +++ b/fboss/lib/platforms/PlatformMode.h @@ -90,6 +90,8 @@ inline std::string toString(PlatformType mode) { return "JANGA800BIC"; case PlatformType::PLATFORM_TAHAN800BC: return "TAHAN800BC"; + case PlatformType::PLATFORM_YANGRA: + return "YANGRA"; } throw std::runtime_error("Unknown mode"); return "Unknown"; diff --git a/fboss/lib/platforms/PlatformProductInfo.cpp b/fboss/lib/platforms/PlatformProductInfo.cpp index 9a89c9952b1ac..c0af196a58d90 100644 --- a/fboss/lib/platforms/PlatformProductInfo.cpp +++ b/fboss/lib/platforms/PlatformProductInfo.cpp @@ -112,6 +112,10 @@ void PlatformProductInfo::initMode() { type_ = PlatformType::PLATFORM_FAKE_WEDGE; } else if (modelName.find("CLOUDRIPPER") == 0) { type_ = PlatformType::PLATFORM_CLOUDRIPPER; + } else if ( + modelName.find("Yangra") == 0 || modelName.find("yangra") == 0 || + modelName.find("YANGRA") == 0) { + type_ = PlatformType::PLATFORM_YANGRA; } else if ( modelName.find("Meru400biu") == 0 || modelName.find("S9710-76D-BB12") == 0) { @@ -149,6 +153,8 @@ void PlatformProductInfo::initMode() { modelName.find("MORGAN800CC") == 0 || modelName.find("8501-SYS-MT") == 0) { type_ = PlatformType::PLATFORM_MORGAN800CC; + } else if (modelName.find("YANGRA") == 0) { + type_ = PlatformType::PLATFORM_YANGRA; } else if (modelName.find("FAKE_SAI") == 0) { type_ = PlatformType::PLATFORM_FAKE_SAI; } else if ( @@ -220,6 +226,8 @@ void PlatformProductInfo::initMode() { type_ = PlatformType::PLATFORM_TAHAN800BC; } else if (FLAGS_mode == "morgan800cc") { type_ = PlatformType::PLATFORM_MORGAN800CC; + } else if (FLAGS_mode == "yangra") { + type_ = PlatformType::PLATFORM_YANGRA; } else { throw std::runtime_error("invalid mode " + FLAGS_mode); } diff --git a/fboss/oss/hw_test_configs/yangra.agent.materialized_JSON b/fboss/oss/hw_test_configs/yangra.agent.materialized_JSON new file mode 100644 index 0000000000000..37600aa9cb52d --- /dev/null +++ b/fboss/oss/hw_test_configs/yangra.agent.materialized_JSON @@ -0,0 +1,162 @@ +{ + "defaultCommandLineArgs": { + "check_wb_handles": "true", + "counter_refresh_interval": "0", + "intf_nbr_tables": "true", + "log_variable_name": "true", + "mode": "yangra", + "skip_transceiver_programming": "true" + }, + "sw": { + "version": 0, + "ports": [ + + ], + "vlans": [ + + ], + "vlanPorts": [ + + ], + "defaultVlan": 0, + "interfaces": [ + { + "intfID": 101, + "routerID": 0, + "vlanID": 0, + "ipAddresses": [ + + ], + "mtu": 9000, + "isVirtual": false, + "isStateSyncDisabled": true, + "type": 2, + "scope": 0 + } + ], + "arpTimeoutSeconds": 60, + "arpRefreshSeconds": 20, + "arpAgerInterval": 5, + "proactiveArp": false, + "staticRoutesWithNhops": [ + + ], + "staticRoutesToNull": [ + + ], + "staticRoutesToCPU": [ + + ], + "acls": [ + + ], + "maxNeighborProbes": 300, + "staleEntryInterval": 10, + "aggregatePorts": [ + + ], + "clientIdToAdminDistance": { + "0": 20, + "1": 1, + "2": 0, + "3": 0, + "700": 255, + "786": 10 + }, + "sFlowCollectors": [ + + ], + "cpuQueues": [ + + ], + "loadBalancers": [ + + ], + "mirrors": [ + + ], + "trafficCounters": [ + + ], + "qosPolicies": [ + + ], + "defaultPortQueues": [ + + ], + "staticMplsRoutesWithNhops": [ + + ], + "staticMplsRoutesToNull": [ + + ], + "staticMplsRoutesToCPU": [ + + ], + "staticIp2MplsRoutes": [ + + ], + "portQueueConfigs": { + + }, + "switchSettings": { + "l2LearningMode": 0, + "qcmEnable": false, + "ptpTcEnable": false, + "l2AgeTimerSeconds": 300, + "maxRouteCounterIDs": 0, + "blockNeighbors": [ + + ], + "macAddrsToBlock": [ + + ], + "switchType": 0, + "switchId": 0, + "exactMatchTableConfigs": [ + + ], + "switchIdToSwitchType": { + + }, + "switchDrainState": 0, + "switchIdToSwitchInfo": { + "0": { + "switchType": 0, + "asicType": 17, + "switchIndex": 0, + "portIdRange": { + "minimum": 0, + "maximum": 2047 + }, + "systemPortRange": { + "minimum": 100, + "maximum": 120 + }, + "switchMac": "02:00:00:00:00:01", + "connectionHandle": "68:00" + } + }, + "vendorMacOuis": [ + + ], + "metaMacOuis": [ + + ], + "needL2EntryForNeighbor": true + }, + "dsfNodes": { + }, + "defaultVoqConfig": [ + + ] + }, + "platform": { + "chip": { + "bcm": { + "config": { + } + } + } + } +} diff --git a/fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp b/fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp index b3d6c262d7d95..956df7eef6ee4 100644 --- a/fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp +++ b/fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp @@ -58,6 +58,7 @@ TEST_F(HwXphyFirmwareTest, CheckDefaultXphyFirmwareVersion) { case PlatformType::PLATFORM_MORGAN800CC: case PlatformType::PLATFORM_JANGA800BIC: case PlatformType::PLATFORM_TAHAN800BC: + case PlatformType::PLATFORM_YANGRA: throw FbossError("No xphys to check FW version on"); case PlatformType::PLATFORM_ELBERT: desiredFw.version() = 1; From 051d5337f117c9aa01970c975963fd72dbc794c1 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 22 Oct 2024 09:23:05 -0700 Subject: [PATCH 247/479] Query switch isolate state for both voq and fabric switch on cold boot Summary: As titled Reviewed By: zechengh09 Differential Revision: D64740563 Privacy Context Container: L1125642 fbshipit-source-id: 998910f0e0711b8df2cd9ca6dcafcbd12a23efac --- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 95e2ac14182a3..3b409ff91322d 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -2353,8 +2353,8 @@ std::shared_ptr SaiSwitch::getColdBootSwitchState() { scopeResolver->switchIdToSwitchInfo()); multiSwitchSwitchSettings->addNode(matcher.matcherString(), switchSettings); - if (platform_->getAsic()->isSupported( - HwAsic::Feature::LINK_INACTIVE_BASED_ISOLATE)) { + if (getSwitchType() == cfg::SwitchType::VOQ || + getSwitchType() == cfg::SwitchType::FABRIC) { CHECK(getSwitchId().has_value()); // In practice, this will read and populate the value set during switch // create viz. DRAINED From 722af5d97edd97f3617e4cfd51c4ea31dbfa4ab4 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Tue, 22 Oct 2024 09:36:20 -0700 Subject: [PATCH 248/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/cddd1d8d9dd78450f6126a7e71319837675f8138 https://github.com/facebook/fb303/commit/43d83c1fbfbe94914dc5e197e5b0a37ea0c38e35 https://github.com/facebook/fbthrift/commit/0101ff3e5233ff3476f0c2dbcb0c439d3ab4cbac https://github.com/facebook/folly/commit/671c75faa7cd0e17b82e465e4e7f0d2a36d26cca https://github.com/facebook/mvfst/commit/58612fd1c3498731ade44db02c3079cf63a19d45 https://github.com/facebook/proxygen/commit/ae4f1ebcd65c74b49aaa4c17a323c40433a5cde8 https://github.com/facebook/wangle/commit/542d380b9bef1b209b34e3618b826a444aceeaa3 https://github.com/facebookexperimental/edencommon/commit/4d13d4d1fe4b7ac7f1bde3cba87b5b228f2884dc https://github.com/facebookexperimental/rust-shed/commit/b5573e18975ead289e1e12c18159fc8ab75ae24a https://github.com/facebookincubator/fizz/commit/63e26d01a6f80ac69fe718efeea1a6565b5d91de Reviewed By: ajb85 fbshipit-source-id: 7da107b1a5cda284b795b0a9d04b56c0cd9cc0ff --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 852c142af7bf1..b338eaa85450a 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit ca4eba5fc6d47a1e8385a3c181f89ccd68dc15d9 +Subproject commit 43d83c1fbfbe94914dc5e197e5b0a37ea0c38e35 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 2d98d7b695558..400c1310b9113 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 261e18355195977eefedf1cd8a54d60d89a223a1 +Subproject commit 0101ff3e5233ff3476f0c2dbcb0c439d3ab4cbac diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 2bffcf1fe0623..a0aa0e2b3c7e2 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit a9bfa31f1aae3a3964f0d8a8b6864ef4911897af +Subproject commit 671c75faa7cd0e17b82e465e4e7f0d2a36d26cca diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index b6e568290f9e0..29fe30f92698f 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit ecc475c93c1beff42e1e7ddb74c9b79eb666de19 +Subproject commit 542d380b9bef1b209b34e3618b826a444aceeaa3 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index e2a908fd7a684..eb9191ae93759 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 0fe9ab8d9f85c4b211d4b42dee83cb7031a3c721 +Subproject commit 63e26d01a6f80ac69fe718efeea1a6565b5d91de From c854a22027be27ef4fd5880f36664a52f85cb329 Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Tue, 22 Oct 2024 09:58:27 -0700 Subject: [PATCH 249/479] Fix stable commit symlink Summary: Symlink erroneously includes path prefix, which is now removed. Reviewed By: srikrishnagopu Differential Revision: D64764814 fbshipit-source-id: e3fd32c21c3a79191ead1079d16a2e18c4a04a1d --- fboss/oss/stable_commits/latest_stable_hashes.tar.gz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fboss/oss/stable_commits/latest_stable_hashes.tar.gz b/fboss/oss/stable_commits/latest_stable_hashes.tar.gz index 05836ef1f9717..cb0961ecaffed 120000 --- a/fboss/oss/stable_commits/latest_stable_hashes.tar.gz +++ b/fboss/oss/stable_commits/latest_stable_hashes.tar.gz @@ -1 +1 @@ -fboss/oss/stable_commits/github_hashes_10212024_124153.tar.gz \ No newline at end of file +github_hashes_10212024_124153.tar.gz \ No newline at end of file From 0e68c1ea6384691ce6238af90f35b34a916882d8 Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Tue, 22 Oct 2024 10:11:10 -0700 Subject: [PATCH 250/479] Add more disconnect reason counters Summary: Adding counters for additional disconnect reasons: disconnectReason.transportError -- unknown transport exception disconnectReason.dupId -- due to duplicate sub/pub ID disconnectReason.badArgs -- connection rejected due to bad path/ID Differential Revision: D64445032 fbshipit-source-id: 60fb5c6ebf7f5a9453b68d62c4ed021ac470b462 --- fboss/fsdb/client/FsdbStreamClient.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/fboss/fsdb/client/FsdbStreamClient.h b/fboss/fsdb/client/FsdbStreamClient.h index 3a8487fcf914d..5ef3a6375d8da 100644 --- a/fboss/fsdb/client/FsdbStreamClient.h +++ b/fboss/fsdb/client/FsdbStreamClient.h @@ -147,6 +147,18 @@ class FsdbStreamClient : public ReconnectingThriftClient { case fsdb::FsdbErrorCode::SUBSCRIPTION_DATA_CALLBACK_ERROR: disconnectReasonDataCbError_.add(1); break; + case fsdb::FsdbErrorCode::CLIENT_TRANSPORT_EXCEPTION: + disconnectReasonTransportError_.add(1); + break; + case fsdb::FsdbErrorCode::ID_ALREADY_EXISTS: + disconnectReasonIdExists_.add(1); + break; + case fsdb::FsdbErrorCode::EMPTY_PUBLISHER_ID: + case fsdb::FsdbErrorCode::UNKNOWN_PUBLISHER: + case fsdb::FsdbErrorCode::EMPTY_SUBSCRIBER_ID: + case fsdb::FsdbErrorCode::INVALID_PATH: + disconnectReasonBadArgs_.add(1); + break; default: break; }; @@ -165,6 +177,18 @@ class FsdbStreamClient : public ReconnectingThriftClient { getCounterPrefix() + ".disconnectReason.dataCbError", fb303::SUM, fb303::RATE}; + fb303::TimeseriesWrapper disconnectReasonTransportError_{ + getCounterPrefix() + ".disconnectReason.transportError", + fb303::SUM, + fb303::RATE}; + fb303::TimeseriesWrapper disconnectReasonIdExists_{ + getCounterPrefix() + ".disconnectReason.dupId", + fb303::SUM, + fb303::RATE}; + fb303::TimeseriesWrapper disconnectReasonBadArgs_{ + getCounterPrefix() + ".disconnectReason.badArgs", + fb303::SUM, + fb303::RATE}; }; } // namespace facebook::fboss::fsdb From 1a2efe9ba1bd70ea3f927e33d56cc087318d793a Mon Sep 17 00:00:00 2001 From: Jon Janzen Date: Tue, 22 Oct 2024 10:42:52 -0700 Subject: [PATCH 251/479] Remove custom sets implementation Summary: X-link: https://github.com/facebook/folly/pull/2323 Buck2's Starlark now natively supports this Reviewed By: ckwalsh Differential Revision: D64765124 fbshipit-source-id: ed5283e3d194aefebd7728c7a6a7534eaea7b162 --- shim/lib/new_sets.bzl | 236 ------------------------------------------ shim/shims.bzl | 7 +- 2 files changed, 3 insertions(+), 240 deletions(-) delete mode 100644 shim/lib/new_sets.bzl diff --git a/shim/lib/new_sets.bzl b/shim/lib/new_sets.bzl deleted file mode 100644 index 47124d3fca091..0000000000000 --- a/shim/lib/new_sets.bzl +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright 2018 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Skylib module containing common hash-set algorithms. - - An empty set can be created using: `sets.make()`, or it can be created with some starting values - if you pass it an sequence: `sets.make([1, 2, 3])`. This returns a struct containing all of the - values as keys in a dictionary - this means that all passed in values must be hashable. The - values in the set can be retrieved using `sets.to_list(my_set)`. -""" - -load(":dicts.bzl", "dicts") - -def _make(elements = None): - """Creates a new set. - - All elements must be hashable. - - Args: - elements: Optional sequence to construct the set out of. - - Returns: - A set containing the passed in values. - """ - elements = elements if elements else [] - return struct(_values = {e: None for e in elements}) - -def _copy(s): - """Creates a new set from another set. - - Args: - s: A set, as returned by `sets.make()`. - - Returns: - A new set containing the same elements as `s`. - """ - return struct(_values = dict(s._values)) - -def _to_list(s): - """Creates a list from the values in the set. - - Args: - s: A set, as returned by `sets.make()`. - - Returns: - A list of values inserted into the set. - """ - return list(s._values.keys()) - -def _insert(s, e): - """Inserts an element into the set. - - Element must be hashable. This mutates the orginal set. - - Args: - s: A set, as returned by `sets.make()`. - e: The element to be inserted. - - Returns: - The set `s` with `e` included. - """ - s._values[e] = None - return s - -def _remove(s, e): - """Removes an element from the set. - - Element must be hashable. This mutates the orginal set. - - Args: - s: A set, as returned by `sets.make()`. - e: The element to be removed. - - Returns: - The set `s` with `e` removed. - """ - s._values.pop(e) - return s - -def _contains(a, e): - """Checks for the existence of an element in a set. - - Args: - a: A set, as returned by `sets.make()`. - e: The element to look for. - - Returns: - True if the element exists in the set, False if the element does not. - """ - return e in a._values - -def _get_shorter_and_longer(a, b): - """Returns two sets in the order of shortest and longest. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - `a`, `b` if `a` is shorter than `b` - or `b`, `a` if `b` is shorter than `a`. - """ - if _length(a) < _length(b): - return a, b - return b, a - -def _is_equal(a, b): - """Returns whether two sets are equal. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - True if `a` is equal to `b`, False otherwise. - """ - return a._values == b._values - -def _is_subset(a, b): - """Returns whether `a` is a subset of `b`. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - True if `a` is a subset of `b`, False otherwise. - """ - for e in a._values.keys(): - if e not in b._values: - return False - return True - -def _disjoint(a, b): - """Returns whether two sets are disjoint. - - Two sets are disjoint if they have no elements in common. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - True if `a` and `b` are disjoint, False otherwise. - """ - shorter, longer = _get_shorter_and_longer(a, b) - for e in shorter._values.keys(): - if e in longer._values: - return False - return True - -def _intersection(a, b): - """Returns the intersection of two sets. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - A set containing the elements that are in both `a` and `b`. - """ - shorter, longer = _get_shorter_and_longer(a, b) - return struct(_values = {e: None for e in shorter._values.keys() if e in longer._values}) - -def _union(*args): - """Returns the union of several sets. - - Args: - *args: An arbitrary number of sets or lists. - - Returns: - The set union of all sets or lists in `*args`. - """ - return struct(_values = dicts.add(*[s._values for s in args])) - -def _difference(a, b): - """Returns the elements in `a` that are not in `b`. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - A set containing the elements that are in `a` but not in `b`. - """ - return struct(_values = {e: None for e in a._values.keys() if e not in b._values}) - -def _length(s): - """Returns the number of elements in a set. - - Args: - s: A set, as returned by `sets.make()`. - - Returns: - An integer representing the number of elements in the set. - """ - return len(s._values) - -def _repr(s): - """Returns a string value representing the set. - - Args: - s: A set, as returned by `sets.make()`. - - Returns: - A string representing the set. - """ - return repr(s._values.keys()) - -sets = struct( - make = _make, - copy = _copy, - to_list = _to_list, - insert = _insert, - contains = _contains, - is_equal = _is_equal, - is_subset = _is_subset, - disjoint = _disjoint, - intersection = _intersection, - union = _union, - difference = _difference, - length = _length, - remove = _remove, - repr = _repr, - str = _repr, -) diff --git a/shim/shims.bzl b/shim/shims.bzl index 38770d7250526..791fbecd6a8c0 100644 --- a/shim/shims.bzl +++ b/shim/shims.bzl @@ -5,7 +5,6 @@ # License, Version 2.0 found in the LICENSE-APACHE file in the root directory # of this source tree. -load("@bazel_skylib//lib:new_sets.bzl", "sets") load("@bazel_skylib//lib:paths.bzl", "paths") load("@prelude//utils:selects.bzl", "selects") # @lint-ignore-every FBCODEBZLADDLOADS @@ -100,7 +99,7 @@ def _update_headers_with_src_headers(src_headers, out_headers): """ Helper function to update raw headers with headers from srcs """ - src_headers = sets.to_list(sets.difference(src_headers, sets.make(out_headers))) + src_headers = list(src_headers.difference(out_headers)) # Looks simple, right? But if a header is explicitly added in, say, a # dictionary mapping, we want to make sure to keep the original mapping @@ -167,9 +166,9 @@ def cpp_library( ) auto_headers = get_auto_headers(auto_headers) if auto_headers == AutoHeaders.SOURCES and not is_select(srcs): - src_headers = sets.make(_get_headers_from_sources(srcs)) + src_headers = set(_get_headers_from_sources(srcs)) if private_headers: - src_headers = sets.difference(src_headers, sets.make(private_headers)) + src_headers = src_headers.difference(set(private_headers)) headers = selects.apply( headers, From 55d4ce5abfc870484a1ed978fbd1ff36c3e70eb8 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Tue, 22 Oct 2024 10:53:11 -0700 Subject: [PATCH 252/479] Tahan sensor config fixes Summary: Just merging all the sensors in Tahan unit. Reviewed By: somasun Differential Revision: D64482789 fbshipit-source-id: 4e8830a6e3824ab1118c2996544adc8496cb0b00 --- .../configs/tahan800bc/sensor_service.json | 196 ++++++++---------- 1 file changed, 92 insertions(+), 104 deletions(-) diff --git a/fboss/platform/configs/tahan800bc/sensor_service.json b/fboss/platform/configs/tahan800bc/sensor_service.json index 19aa4daef05ef..8cbf96c9705de 100644 --- a/fboss/platform/configs/tahan800bc/sensor_service.json +++ b/fboss/platform/configs/tahan800bc/sensor_service.json @@ -1,101 +1,5 @@ { "pmUnitSensorsList": [ - { - "slotPath": "/", - "pmUnitName": "CPU_CARD", - "sensors": [ - { - "name": "CPU_UNCORE_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE0_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE1_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE2_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE3_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE4_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE5_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE6_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE7_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - } - ] - }, { "slotPath": "/PDB_SLOT@0", "pmUnitName": "PDB_CARD", @@ -202,8 +106,98 @@ }, { "slotPath": "/", - "pmUnitName": "FCB_CARD", + "pmUnitName": "TAHAN", "sensors": [ + { + "name": "CPU_UNCORE_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE0_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE1_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE2_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE3_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE4_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE5_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE6_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE7_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, { "name": "FCB_FANTRAY1_PWM3", "sysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", @@ -397,13 +391,7 @@ "minAlarmVal": 2900, "lowerCriticalVal": 1500 } - } - ] - }, - { - "slotPath": "/", - "pmUnitName": "SMB_CARD", - "sensors": [ + }, { "name": "SMB_E1S_SSD_TEMP", "sysfsPath": "/run/devmap/sensors/SMB_E1S_SSD_TEMP/temp1_input", From 471fc0bbc269c80cd5fa9ed2c27e7bde0bc48b71 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Tue, 22 Oct 2024 10:53:11 -0700 Subject: [PATCH 253/479] Integrate ConfigValidator to ConfigGenerator. Reviewed By: somasun Differential Revision: D64050282 fbshipit-source-id: 807d8c72d81731e06cc24564dcd05c43975184fe --- fboss/platform/config_lib/BUCK | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/platform/config_lib/BUCK b/fboss/platform/config_lib/BUCK index 1b1ef130e7fde..395cfa94158c5 100644 --- a/fboss/platform/config_lib/BUCK +++ b/fboss/platform/config_lib/BUCK @@ -18,6 +18,7 @@ cpp_binary( "//fboss/platform/fw_util/if:fw_util_config-cpp2-types", "//fboss/platform/platform_manager:config_validator", "//fboss/platform/platform_manager:platform_manager_config-cpp2-types", + "//fboss/platform/sensor_service:config_validator", "//fboss/platform/sensor_service/if:sensor_config-cpp2-types", "//fboss/platform/weutil/if:weutil_config-cpp2-types", "//folly:file_util", From ecd8137e5ca58bb7fd6fa97d8448fa562f6fd687 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Tue, 22 Oct 2024 10:53:11 -0700 Subject: [PATCH 254/479] Validate config in SensorServiceImpl Summary: As titled. Only notable change is we're passing in Config from the Main.cpp (similar to how's done in PM, Fan and DataCorral) It also makes SensorConfig Mocking easier around sysfs path. Reviewed By: somasun Differential Revision: D64054442 fbshipit-source-id: 7fdbbc8bdb0e90ca09b9c8ca4ab895c65959f63b --- cmake/PlatformSensorService.cmake | 1 + fboss/platform/sensor_service/BUCK | 6 +++++- fboss/platform/sensor_service/Main.cpp | 4 +++- .../platform/sensor_service/SensorServiceImpl.cpp | 10 +++------- fboss/platform/sensor_service/SensorServiceImpl.h | 2 +- fboss/platform/sensor_service/Utils.cpp | 14 ++++++++++++++ fboss/platform/sensor_service/Utils.h | 2 ++ fboss/platform/sensor_service/hw_test/BUCK | 2 +- .../sensor_service/hw_test/SensorServiceHwTest.cpp | 8 +++----- fboss/platform/sensor_service/test/TestUtils.cpp | 13 ++++++------- 10 files changed, 39 insertions(+), 23 deletions(-) diff --git a/cmake/PlatformSensorService.cmake b/cmake/PlatformSensorService.cmake index 36f768cacc987..7eef4af9b072e 100644 --- a/cmake/PlatformSensorService.cmake +++ b/cmake/PlatformSensorService.cmake @@ -45,6 +45,7 @@ add_library(sensor_service_lib fboss/platform/sensor_service/SensorServiceThriftHandler.cpp fboss/platform/sensor_service/oss/FsdbSyncer.cpp fboss/platform/sensor_service/PmUnitInfoFetcher.cpp + fboss/platform/sensor_service/ConfigValidator.cpp ) target_link_libraries(sensor_service_lib diff --git a/fboss/platform/sensor_service/BUCK b/fboss/platform/sensor_service/BUCK index 7d3082793d5c5..26e3f3dd6de57 100644 --- a/fboss/platform/sensor_service/BUCK +++ b/fboss/platform/sensor_service/BUCK @@ -16,6 +16,7 @@ cpp_library( "SensorServiceImpl.h", ], exported_deps = [ + ":config_validator", ":pmunit_info_fetcher", ":sensor_service_stats-cpp2-types", ":utils", @@ -26,7 +27,6 @@ cpp_library( "//fboss/fsdb/if:fsdb_model", "//fboss/fsdb/if:fsdb_oper-cpp2-types", "//fboss/platform/config_lib:config_lib", - "//fboss/platform/helpers:platform_name_lib", "//fboss/platform/sensor_service/if:sensor_config-cpp2-types", "//fboss/platform/sensor_service/if:sensor_service-cpp2-types", "//folly:file_util", @@ -62,7 +62,10 @@ cpp_library( ], exported_deps = [ "fbsource//third-party/exprtk:exprtk", + ":config_validator", ":pmunit_info_fetcher", + "//fboss/platform/config_lib:config_lib", + "//fboss/platform/helpers:platform_name_lib", "//fboss/platform/sensor_service/if:sensor_config-cpp2-types", ], exported_external_deps = [ @@ -115,6 +118,7 @@ cpp_binary( ], deps = [ ":core", + ":utils", "//fb303:logging", "//fboss/platform/helpers:init", "//folly/executors:function_scheduler", diff --git a/fboss/platform/sensor_service/Main.cpp b/fboss/platform/sensor_service/Main.cpp index 86812a2de9085..04bf6e27f13a0 100644 --- a/fboss/platform/sensor_service/Main.cpp +++ b/fboss/platform/sensor_service/Main.cpp @@ -7,6 +7,7 @@ #include "fboss/platform/helpers/Init.h" #include "fboss/platform/sensor_service/Flags.h" #include "fboss/platform/sensor_service/SensorServiceThriftHandler.h" +#include "fboss/platform/sensor_service/Utils.h" using namespace facebook; using namespace facebook::fboss::platform; @@ -17,7 +18,8 @@ int main(int argc, char** argv) { helpers::init(&argc, &argv); - auto serviceImpl = std::make_shared(); + SensorConfig sensorConfig = Utils().getConfig(); + auto serviceImpl = std::make_shared(sensorConfig); // Fetch sensor data once to warmup serviceImpl->fetchSensorData(); diff --git a/fboss/platform/sensor_service/SensorServiceImpl.cpp b/fboss/platform/sensor_service/SensorServiceImpl.cpp index a6825ecc57294..4e12beaf2cd81 100644 --- a/fboss/platform/sensor_service/SensorServiceImpl.cpp +++ b/fboss/platform/sensor_service/SensorServiceImpl.cpp @@ -18,7 +18,7 @@ #include #include "fboss/platform/config_lib/ConfigLib.h" -#include "fboss/platform/helpers/PlatformNameLib.h" +#include "fboss/platform/sensor_service/ConfigValidator.h" #include "fboss/platform/sensor_service/FsdbSyncer.h" #include "fboss/platform/sensor_service/SensorServiceImpl.h" #include "fboss/platform/sensor_service/Utils.h" @@ -31,12 +31,8 @@ DEFINE_int32( namespace facebook::fboss::platform::sensor_service { -SensorServiceImpl::SensorServiceImpl() { - auto platformName = helpers::PlatformNameLib().getPlatformName(); - std::string sensorConfJson = ConfigLib().getSensorServiceConfig(platformName); - XLOG(DBG2) << "Read sensor config: " << sensorConfJson; - apache::thrift::SimpleJSONSerializer::deserialize( - sensorConfJson, sensorConfig_); +SensorServiceImpl::SensorServiceImpl(const SensorConfig& sensorConfig) + : sensorConfig_(sensorConfig) { fsdbSyncer_ = std::make_unique(); } diff --git a/fboss/platform/sensor_service/SensorServiceImpl.h b/fboss/platform/sensor_service/SensorServiceImpl.h index 39f31dfcb427d..650ca3a24660d 100644 --- a/fboss/platform/sensor_service/SensorServiceImpl.h +++ b/fboss/platform/sensor_service/SensorServiceImpl.h @@ -34,7 +34,7 @@ class SensorServiceImpl { auto static constexpr kTotalReadFailure = "sensor_read.total.failures"; auto static constexpr kHasReadFailure = "sensor_read.has.failures"; - explicit SensorServiceImpl(); + explicit SensorServiceImpl(const SensorConfig& sensorConfig); ~SensorServiceImpl(); std::vector getSensorsData( diff --git a/fboss/platform/sensor_service/Utils.cpp b/fboss/platform/sensor_service/Utils.cpp index a571d9ae9c4b4..a39071eac4c7a 100644 --- a/fboss/platform/sensor_service/Utils.cpp +++ b/fboss/platform/sensor_service/Utils.cpp @@ -8,6 +8,10 @@ #include #include +#include "fboss/platform/config_lib/ConfigLib.h" +#include "fboss/platform/helpers/PlatformNameLib.h" +#include "fboss/platform/sensor_service/ConfigValidator.h" + namespace facebook::fboss::platform::sensor_service { namespace { @@ -103,4 +107,14 @@ std::optional Utils::resolveVersionedSensors( return resolvedVersionedSensor; } +SensorConfig Utils::getConfig() { + auto platformName = helpers::PlatformNameLib().getPlatformName(); + SensorConfig sensorConfig; + apache::thrift::SimpleJSONSerializer::deserialize( + ConfigLib().getSensorServiceConfig(platformName), sensorConfig); + if (!ConfigValidator().isValid(sensorConfig)) { + throw std::runtime_error("Invalid sensor config"); + } + return sensorConfig; +} } // namespace facebook::fboss::platform::sensor_service diff --git a/fboss/platform/sensor_service/Utils.h b/fboss/platform/sensor_service/Utils.h index 5345cb94bf499..4c5fb8e9a9dfb 100644 --- a/fboss/platform/sensor_service/Utils.h +++ b/fboss/platform/sensor_service/Utils.h @@ -31,5 +31,7 @@ class Utils { const PmUnitInfoFetcher& fetcher, const std::string& slotPath, const std::vector& versionedSensors); + + SensorConfig getConfig(); }; } // namespace facebook::fboss::platform::sensor_service diff --git a/fboss/platform/sensor_service/hw_test/BUCK b/fboss/platform/sensor_service/hw_test/BUCK index f8d20726d0e71..f8e9a8a285139 100644 --- a/fboss/platform/sensor_service/hw_test/BUCK +++ b/fboss/platform/sensor_service/hw_test/BUCK @@ -9,10 +9,10 @@ cpp_binary( ], deps = [ "fbsource//third-party/googletest:gtest", - "//fboss/platform/config_lib:config_lib", "//fboss/platform/helpers:init", "//fboss/platform/sensor_service:core", "//fboss/platform/sensor_service:service", + "//fboss/platform/sensor_service:utils", "//fboss/platform/sensor_service/if:sensor_service-cpp2-services", "//folly/init:init", "//thrift/lib/cpp2/protocol:protocol", diff --git a/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp b/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp index 170212487b67e..0211173712b7c 100644 --- a/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp +++ b/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp @@ -14,8 +14,8 @@ #include #include -#include "fboss/platform/config_lib/ConfigLib.h" #include "fboss/platform/helpers/Init.h" +#include "fboss/platform/sensor_service/Utils.h" using namespace apache::thrift; @@ -24,12 +24,10 @@ namespace facebook::fboss::platform::sensor_service { SensorServiceHwTest::~SensorServiceHwTest() = default; void SensorServiceHwTest::SetUp() { - sensorServiceImpl_ = std::make_shared(); + sensorConfig_ = Utils().getConfig(); + sensorServiceImpl_ = std::make_shared(sensorConfig_); sensorServiceHandler_ = std::make_shared(sensorServiceImpl_); - auto sensorServiceConfigJson = ConfigLib().getSensorServiceConfig(); - apache::thrift::SimpleJSONSerializer::deserialize( - sensorServiceConfigJson, sensorConfig_); } SensorReadResponse SensorServiceHwTest::getSensors( diff --git a/fboss/platform/sensor_service/test/TestUtils.cpp b/fboss/platform/sensor_service/test/TestUtils.cpp index 7a965940efe6e..42ffe8618831c 100644 --- a/fboss/platform/sensor_service/test/TestUtils.cpp +++ b/fboss/platform/sensor_service/test/TestUtils.cpp @@ -11,7 +11,7 @@ using namespace facebook::fboss::platform::sensor_service; namespace { -std::string mockSensorConfig(const std::string& tmpPath) { +SensorConfig mockSensorConfig(const std::string& tmpPath) { SensorConfig config; PmUnitSensors pmUnitSensors; pmUnitSensors.slotPath() = "/"; @@ -40,20 +40,19 @@ std::string mockSensorConfig(const std::string& tmpPath) { }; config.pmUnitSensorsList() = {std::move(pmUnitSensors)}; - std::string fileName = tmpPath + "/sensor_service.json"; + std::string sensorConfigPath = tmpPath + "/sensor_service.json"; folly::writeFile( apache::thrift::SimpleJSONSerializer::serialize(config), - fileName.c_str()); - return fileName; + sensorConfigPath.c_str()); + FLAGS_config_file = sensorConfigPath; + return config; } } // namespace std::shared_ptr createSensorServiceImplForTest( const std::string& tmpDirPath) { - auto confFileName = mockSensorConfig(tmpDirPath); - FLAGS_config_file = confFileName; - return std::make_shared(); + return std::make_shared(mockSensorConfig(tmpDirPath)); } std::map getDefaultMockSensorData() { From 7df247a4f7bb42a01d644f123ee591eb4efff24f Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Tue, 22 Oct 2024 13:05:51 -0700 Subject: [PATCH 255/479] fix sai platform erase for APIs unsupported on Chenab Summary: as titled Reviewed By: shri-khare Differential Revision: D64780507 fbshipit-source-id: fa9c7b3d6ab10365a1b7e0b035b24c091cf1afb7 --- fboss/agent/platforms/sai/SaiPlatform.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index 06aaf301117b3..9028d29113e87 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -712,7 +712,7 @@ const std::set& SaiPlatform::getDefaultSwitchAsicSupportedApis() static auto apis = SaiApiTable::getInstance()->getFullApiList(); // Macsec is not currently supported in the broadcom sai sdk apis.erase(facebook::fboss::MacsecApi::ApiType); - // TODO_NV: What is the condition here to erase not supported APIs? +#if defined(CHENAB_SDK) apis.erase(facebook::fboss::MplsApi::ApiType); apis.erase(facebook::fboss::VirtualRouterApi::ApiType); apis.erase(facebook::fboss::TamApi::ApiType); @@ -720,6 +720,7 @@ const std::set& SaiPlatform::getDefaultSwitchAsicSupportedApis() #if SAI_API_VERSION >= SAI_VERSION(1, 14, 0) apis.erase(facebook::fboss::ArsApi::ApiType); apis.erase(facebook::fboss::ArsProfileApi::ApiType); +#endif #endif return apis; } From b36ca1cf411e7011ca1836202cfb35d71e149cca Mon Sep 17 00:00:00 2001 From: Mohammed Al-Sanabani Date: Tue, 22 Oct 2024 13:18:53 -0700 Subject: [PATCH 256/479] Refactor LED test Summary: title Reviewed By: harshitgulati18 Differential Revision: D64275690 fbshipit-source-id: 6aba6e3a5eae4ca9d7683587edcef127830ac0be --- fboss/lib/led/tests/LedTests.cpp | 116 ++++++++++++++----------------- 1 file changed, 54 insertions(+), 62 deletions(-) diff --git a/fboss/lib/led/tests/LedTests.cpp b/fboss/lib/led/tests/LedTests.cpp index 1727ac2737f15..136dc2d8ee4b5 100644 --- a/fboss/lib/led/tests/LedTests.cpp +++ b/fboss/lib/led/tests/LedTests.cpp @@ -11,77 +11,26 @@ namespace facebook::fboss { class LedTests : public ::testing::Test { - public: - void testInvalidLedPath() { - LedMapping ledMapping; - ledMapping.id() = 0; - EXPECT_THROW( - std::unique_ptr led = std::make_unique(ledMapping), - LedIOError); - } - - void testFakeLed() { + protected: + void SetUp() override { mkdir(blueBasePath_.c_str(), 0777); blueFd_ = open(bluePath_.c_str(), O_RDWR | O_CREAT, 0777); - EXPECT_GE(blueFd_, 0); + CHECK(blueFd_); mkdir(yellowBasePath_.c_str(), 0777); yellowFd_ = open(yellowPath_.c_str(), O_RDWR | O_CREAT, 0777); - EXPECT_GE(yellowFd_, 0); - - LedMapping ledMapping; - ledMapping.id() = 0; - ledMapping.bluePath() = blueBasePath_; - ledMapping.yellowPath() = yellowBasePath_; - // Instantiating Led object will write 0 to both blue and yellow LED - // files and set current color to Off - led_ = std::make_unique(ledMapping); - - VerifyLedOff(); - - // Since current color is Off, setting it to Off again will be noop - led_->setLedState( - utility::constructLedState(led::LedColor::OFF, led::Blink::OFF)); - VerifyLedOff(); - - // Change current color from Off to Blue - led_->setLedState( - utility::constructLedState(led::LedColor::BLUE, led::Blink::OFF)); - VerifyBlueOn(); - - // Since current color is Blue, setting it to Blue again will be noop - led_->setLedState( - utility::constructLedState(led::LedColor::BLUE, led::Blink::OFF)); - VerifyBlueOn(); - - // Change current color from Blue to Off - led_->setLedState( - utility::constructLedState(led::LedColor::OFF, led::Blink::OFF)); - VerifyLedOff(); - - // Change current color from Off to Yellow - led_->setLedState( - utility::constructLedState(led::LedColor::YELLOW, led::Blink::OFF)); - VerifyYellowOn(); - - // Since current color is Yellow, setting it to Yellow again will be noop - led_->setLedState( - utility::constructLedState(led::LedColor::YELLOW, led::Blink::OFF)); - VerifyYellowOn(); - - close(blueFd_); - close(yellowFd_); - } + CHECK(yellowFd_); - protected: - void SetUp() override { - // Write 1 to both blue and yellow LED files initially const std::string content = "1"; folly::writeFile(content, bluePath_.c_str()); folly::writeFile(content, yellowPath_.c_str()); } - private: + void TearDown() override { + close(blueFd_); + close(yellowFd_); + } + char ReadLedFile(int fd) { constexpr auto len = 1; char readBuf; @@ -130,11 +79,54 @@ class LedTests : public ::testing::Test { }; TEST_F(LedTests, TestInvalidLedPath) { - testInvalidLedPath(); + LedMapping ledMapping; + ledMapping.id() = 0; + EXPECT_THROW( + std::unique_ptr led = std::make_unique(ledMapping), + LedIOError); } TEST_F(LedTests, testFakeLed) { - testFakeLed(); + LedMapping ledMapping; + ledMapping.id() = 0; + ledMapping.bluePath() = blueBasePath_; + ledMapping.yellowPath() = yellowBasePath_; + // Instantiating Led object will write 0 to both blue and yellow LED + // files and set current color to Off + led_ = std::make_unique(ledMapping); + + // Expect LEDs to be off after initialization + VerifyLedOff(); + + // Since current color is Off, setting it to Off again will be noop + led_->setLedState( + utility::constructLedState(led::LedColor::OFF, led::Blink::OFF)); + VerifyLedOff(); + + // Change current color from Off to Blue + led_->setLedState( + utility::constructLedState(led::LedColor::BLUE, led::Blink::OFF)); + VerifyBlueOn(); + + // Since current color is Blue, setting it to Blue again will be noop + led_->setLedState( + utility::constructLedState(led::LedColor::BLUE, led::Blink::OFF)); + VerifyBlueOn(); + + // Change current color from Blue to Off + led_->setLedState( + utility::constructLedState(led::LedColor::OFF, led::Blink::OFF)); + VerifyLedOff(); + + // Change current color from Off to Yellow + led_->setLedState( + utility::constructLedState(led::LedColor::YELLOW, led::Blink::OFF)); + VerifyYellowOn(); + + // Since current color is Yellow, setting it to Yellow again will be noop + led_->setLedState( + utility::constructLedState(led::LedColor::YELLOW, led::Blink::OFF)); + VerifyYellowOn(); } } // namespace facebook::fboss From da6115f52d2f2ba7b4b49ae8e8aecfb5c7d2e22c Mon Sep 17 00:00:00 2001 From: Mohammed Al-Sanabani Date: Tue, 22 Oct 2024 13:18:53 -0700 Subject: [PATCH 257/479] set led brightness to max_brightness Summary: We have to read max_brightness in order to set it correctly for platforms that have a value different than 1. montblanc: 1 Kodiak3: 255 Meru: 255 Reviewed By: harshitgulati18 Differential Revision: D64275727 fbshipit-source-id: c183db21b2473f6424462054ed4f36add03955df --- fboss/lib/led/LedIO.cpp | 32 +++++++++++++++++++++++++++++--- fboss/lib/led/LedIO.h | 6 ++++++ fboss/lib/led/tests/LedTests.cpp | 6 ++++++ 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/fboss/lib/led/LedIO.cpp b/fboss/lib/led/LedIO.cpp index 21cb04215d0cf..42ba841a57eeb 100644 --- a/fboss/lib/led/LedIO.cpp +++ b/fboss/lib/led/LedIO.cpp @@ -16,8 +16,8 @@ #include "fboss/lib/led/gen-cpp2/led_mapping_types.h" namespace { -constexpr auto kLedOn = "1"; constexpr auto kLedOff = "0"; +constexpr auto kLedMaxBrightnessPath = "/max_brightness"; constexpr auto kLedBrightnessPath = "/brightness"; constexpr auto kLedTriggerPath = "/trigger"; constexpr auto kLedDelayOnPath = "/delay_on"; @@ -26,6 +26,8 @@ constexpr auto kLedTimerTrigger = "timer"; constexpr auto kLedBlinkOff = "0"; constexpr auto kLedBlinkSlow = "1000"; constexpr auto kLedBlinkFast = "500"; +constexpr auto kMinBrightness = 1; +constexpr auto kMaxBrightness = 255; } // namespace namespace facebook::fboss { @@ -38,9 +40,33 @@ LedIO::LedIO(LedMapping ledMapping) : id_(*ledMapping.id()) { } bluePath_ = ledMapping.bluePath().value(); yellowPath_ = ledMapping.yellowPath().value(); + initMaxBrightness(bluePath_, blueMaxBrightness_); + initMaxBrightness(yellowPath_, yellowMaxBrightness_); init(); } +void LedIO::initMaxBrightness( + const std::string& path, + std::string& maxBrightness) { + std::fstream fs; + auto maxBrightnessPath = path + kLedMaxBrightnessPath; + fs.open(maxBrightnessPath, std::fstream::in); + if (fs.is_open()) { + fs >> maxBrightness; + fs.close(); + } else { + throw LedIOError(fmt::format( + "initMaxBrightness() failed to open {} for ID {:d} (0 base)", + maxBrightnessPath, + id_)); + } + auto value = folly::to(maxBrightness); + CHECK((value >= kMinBrightness) && (value <= kMaxBrightness)) << fmt::format( + "Value of brightness is not in range {} {}", + kMinBrightness, + kMaxBrightness); +} + void LedIO::setLedState(led::LedState ledState) { if (currState_ == ledState) { return; @@ -80,7 +106,7 @@ void LedIO::init() { void LedIO::blueOn(led::Blink blink) { setBlink(bluePath_, blink); - setLed(bluePath_, kLedOn); + setLed(bluePath_, blueMaxBrightness_); XLOG(INFO) << fmt::format( "Trace: set LED {:d} (0 base) to Blue and blink {:s}", id_, @@ -94,7 +120,7 @@ void LedIO::blueOff() { void LedIO::yellowOn(led::Blink blink) { setBlink(yellowPath_, blink); - setLed(yellowPath_, kLedOn); + setLed(yellowPath_, yellowMaxBrightness_); XLOG(INFO) << fmt::format( "Trace: set LED {:d} (0 base) to Yellow and blink {:s}", id_, diff --git a/fboss/lib/led/LedIO.h b/fboss/lib/led/LedIO.h index 10fed61ff3a20..14f82b182221f 100644 --- a/fboss/lib/led/LedIO.h +++ b/fboss/lib/led/LedIO.h @@ -46,10 +46,16 @@ class LedIO { void setLed(const std::string& ledPath, const std::string& ledOp); void setBlink(const std::string& ledPath, led::Blink blink); + // Max brightness for the LED is determined by /max_brightness + // per LED. + void initMaxBrightness(const std::string& path, std::string& maxBrightness); + led::LedState currState_; const uint32_t id_; std::string bluePath_; + std::string blueMaxBrightness_; std::string yellowPath_; + std::string yellowMaxBrightness_; }; } // namespace facebook::fboss diff --git a/fboss/lib/led/tests/LedTests.cpp b/fboss/lib/led/tests/LedTests.cpp index 136dc2d8ee4b5..8bcdfaae5f6f7 100644 --- a/fboss/lib/led/tests/LedTests.cpp +++ b/fboss/lib/led/tests/LedTests.cpp @@ -22,6 +22,10 @@ class LedTests : public ::testing::Test { CHECK(yellowFd_); const std::string content = "1"; + folly::writeFile(content, blueMaxBrightness_.c_str()); + folly::writeFile(content, yellowMaxBrightness_.c_str()); + // We turn the LEDs on. Expect that during initialization (after + // LedIO constructor is called) that the LEDs are turned off. folly::writeFile(content, bluePath_.c_str()); folly::writeFile(content, yellowPath_.c_str()); } @@ -73,6 +77,8 @@ class LedTests : public ::testing::Test { std::string yellowBasePath_ = tmpDir_.path().string() + "/invalidYellowLed"; std::string bluePath_ = blueBasePath_ + "/brightness"; std::string yellowPath_ = yellowBasePath_ + "/brightness"; + std::string blueMaxBrightness_ = blueBasePath_ + "/max_brightness"; + std::string yellowMaxBrightness_ = yellowBasePath_ + "/max_brightness"; int blueFd_; int yellowFd_; std::unique_ptr led_; From 5c96d27729ce8774a679246da8d244952808baaa Mon Sep 17 00:00:00 2001 From: Mohammed Al-Sanabani Date: Tue, 22 Oct 2024 13:18:53 -0700 Subject: [PATCH 258/479] Adding blink tests Summary: title Reviewed By: harshitgulati18 Differential Revision: D64740491 fbshipit-source-id: dcfd67567d05095f4a52fc76ba04242934397239 --- fboss/lib/led/LedIO.cpp | 15 ------- fboss/lib/led/LedIO.h | 13 ++++++ fboss/lib/led/tests/LedTests.cpp | 73 +++++++++++++++++++++++++++++--- 3 files changed, 80 insertions(+), 21 deletions(-) diff --git a/fboss/lib/led/LedIO.cpp b/fboss/lib/led/LedIO.cpp index 42ba841a57eeb..6aae0551277c6 100644 --- a/fboss/lib/led/LedIO.cpp +++ b/fboss/lib/led/LedIO.cpp @@ -15,21 +15,6 @@ #include "fboss/led_service/LedUtils.h" #include "fboss/lib/led/gen-cpp2/led_mapping_types.h" -namespace { -constexpr auto kLedOff = "0"; -constexpr auto kLedMaxBrightnessPath = "/max_brightness"; -constexpr auto kLedBrightnessPath = "/brightness"; -constexpr auto kLedTriggerPath = "/trigger"; -constexpr auto kLedDelayOnPath = "/delay_on"; -constexpr auto kLedDelayOffPath = "/delay_off"; -constexpr auto kLedTimerTrigger = "timer"; -constexpr auto kLedBlinkOff = "0"; -constexpr auto kLedBlinkSlow = "1000"; -constexpr auto kLedBlinkFast = "500"; -constexpr auto kMinBrightness = 1; -constexpr auto kMaxBrightness = 255; -} // namespace - namespace facebook::fboss { LedIO::LedIO(LedMapping ledMapping) : id_(*ledMapping.id()) { diff --git a/fboss/lib/led/LedIO.h b/fboss/lib/led/LedIO.h index 14f82b182221f..76bbe5a50833c 100644 --- a/fboss/lib/led/LedIO.h +++ b/fboss/lib/led/LedIO.h @@ -15,6 +15,19 @@ namespace facebook::fboss { +constexpr auto kLedOff = "0"; +constexpr auto kLedMaxBrightnessPath = "/max_brightness"; +constexpr auto kLedBrightnessPath = "/brightness"; +constexpr auto kLedTriggerPath = "/trigger"; +constexpr auto kLedDelayOnPath = "/delay_on"; +constexpr auto kLedDelayOffPath = "/delay_off"; +constexpr auto kLedTimerTrigger = "timer"; +constexpr auto kLedBlinkOff = "0"; +constexpr auto kLedBlinkSlow = "1000"; +constexpr auto kLedBlinkFast = "500"; +constexpr auto kMinBrightness = 1; +constexpr auto kMaxBrightness = 255; + class LedIOError : public std::runtime_error { public: explicit LedIOError(const std::string& what) : runtime_error(what) {} diff --git a/fboss/lib/led/tests/LedTests.cpp b/fboss/lib/led/tests/LedTests.cpp index 8bcdfaae5f6f7..91930f6f4f15b 100644 --- a/fboss/lib/led/tests/LedTests.cpp +++ b/fboss/lib/led/tests/LedTests.cpp @@ -54,22 +54,52 @@ class LedTests : public ::testing::Test { EXPECT_EQ('0', ReadLedFile(blueFd_)); EXPECT_EQ('0', ReadLedFile(yellowFd_)); EXPECT_EQ(led::LedColor::OFF, led_->getLedState().get_ledColor()); + VerifyYellowBlink("0"); + VerifyBlueBlink("0"); } // Verify that the blue file contains a single 1, the yellow file // contains a single 0, and the current color is Blue - void VerifyBlueOn() { + void VerifyBlueOn(const std::string& blink) { EXPECT_EQ('1', ReadLedFile(blueFd_)); EXPECT_EQ('0', ReadLedFile(yellowFd_)); EXPECT_EQ(led::LedColor::BLUE, led_->getLedState().get_ledColor()); + VerifyYellowBlink("0"); + VerifyBlueBlink(blink); } // Verify that the yellow file contains a single 1, the blue file // contains a single 0, and the current color is Yellow - void VerifyYellowOn() { + void VerifyYellowOn(const std::string& blink) { EXPECT_EQ('0', ReadLedFile(blueFd_)); EXPECT_EQ('1', ReadLedFile(yellowFd_)); EXPECT_EQ(led::LedColor::YELLOW, led_->getLedState().get_ledColor()); + VerifyYellowBlink(blink); + VerifyBlueBlink("0"); + } + + void VerifyYellowBlink(const std::string& ledBlinkSpeed) { + std::string yellow; + folly::readFile(yellowDelayOn_.c_str(), yellow); + EXPECT_TRUE(ledBlinkSpeed == yellow); + folly::readFile(yellowTrigger_.c_str(), yellow); + if (ledBlinkSpeed == "0") { + EXPECT_TRUE(yellow.empty()); + } else { + EXPECT_TRUE("timer" == yellow); + } + } + + void VerifyBlueBlink(const std::string& ledBlinkSpeed) { + std::string blue; + folly::readFile(blueDelayOn_.c_str(), blue); + EXPECT_TRUE(ledBlinkSpeed == blue); + folly::readFile(blueTrigger_.c_str(), blue); + if (ledBlinkSpeed == "0") { + EXPECT_TRUE(blue.empty()); + } else { + EXPECT_TRUE("timer" == blue); + } } folly::test::TemporaryDirectory tmpDir_; @@ -79,6 +109,12 @@ class LedTests : public ::testing::Test { std::string yellowPath_ = yellowBasePath_ + "/brightness"; std::string blueMaxBrightness_ = blueBasePath_ + "/max_brightness"; std::string yellowMaxBrightness_ = yellowBasePath_ + "/max_brightness"; + std::string blueDelayOn_ = blueBasePath_ + "/delay_on"; + std::string yellowDelayOn_ = yellowBasePath_ + "/delay_on"; + std::string blueDelayOff_ = blueBasePath_ + "/delay_off"; + std::string yellowDelayOff_ = yellowBasePath_ + "/delay_off"; + std::string blueTrigger_ = blueBasePath_ + "/trigger"; + std::string yellowTrigger_ = yellowBasePath_ + "/trigger"; int blueFd_; int yellowFd_; std::unique_ptr led_; @@ -112,12 +148,12 @@ TEST_F(LedTests, testFakeLed) { // Change current color from Off to Blue led_->setLedState( utility::constructLedState(led::LedColor::BLUE, led::Blink::OFF)); - VerifyBlueOn(); + VerifyBlueOn("0"); // Since current color is Blue, setting it to Blue again will be noop led_->setLedState( utility::constructLedState(led::LedColor::BLUE, led::Blink::OFF)); - VerifyBlueOn(); + VerifyBlueOn("0"); // Change current color from Blue to Off led_->setLedState( @@ -127,12 +163,37 @@ TEST_F(LedTests, testFakeLed) { // Change current color from Off to Yellow led_->setLedState( utility::constructLedState(led::LedColor::YELLOW, led::Blink::OFF)); - VerifyYellowOn(); + VerifyYellowOn("0"); // Since current color is Yellow, setting it to Yellow again will be noop led_->setLedState( utility::constructLedState(led::LedColor::YELLOW, led::Blink::OFF)); - VerifyYellowOn(); + VerifyYellowOn("0"); +} + +TEST_F(LedTests, TestBlink) { + LedMapping ledMapping; + ledMapping.id() = 0; + ledMapping.bluePath() = blueBasePath_; + ledMapping.yellowPath() = yellowBasePath_; + // Instantiating Led object will write 0 to both blue and yellow LED + // files and set current color to Off + led_ = std::make_unique(ledMapping); + led_->setLedState( + utility::constructLedState(led::LedColor::YELLOW, led::Blink::SLOW)); + VerifyYellowOn(kLedBlinkSlow); + + led_->setLedState( + utility::constructLedState(led::LedColor::BLUE, led::Blink::SLOW)); + VerifyBlueOn(kLedBlinkSlow); + + led_->setLedState( + utility::constructLedState(led::LedColor::YELLOW, led::Blink::FAST)); + VerifyYellowOn(kLedBlinkFast); + + led_->setLedState( + utility::constructLedState(led::LedColor::BLUE, led::Blink::FAST)); + VerifyBlueOn(kLedBlinkFast); } } // namespace facebook::fboss From 58fab07dee32876e9ad323dd5d4f415ef9ad86f6 Mon Sep 17 00:00:00 2001 From: Cullen Walsh Date: Tue, 22 Oct 2024 18:25:54 -0700 Subject: [PATCH 259/479] Add constraint to disable targets known to be broken in oss Summary: - Enumerate what targets are not buildable in OSS - Unblock making OSS buck2 builds push blocking by suppressing targets that are known to fail Reviewed By: bigfootjon Differential Revision: D64738937 fbshipit-source-id: b53219ce7216136bc966205709189697da62ec7e --- shim/cfg.bzl | 4 +++- shim/opensource/macros/BUCK | 14 +++++++++++ .../macros/broken_in_oss/constraints/BUCK | 23 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 shim/opensource/macros/BUCK create mode 100644 shim/opensource/macros/broken_in_oss/constraints/BUCK diff --git a/shim/cfg.bzl b/shim/cfg.bzl index 1e007498afecd..9c630dfa062f3 100644 --- a/shim/cfg.bzl +++ b/shim/cfg.bzl @@ -31,9 +31,11 @@ def get_shim_modifiers(): modifiers = [] linux_distro = read_config("linux", "distro") - pprint(linux_distro) if linux_distro: modifiers.append("shim//os/linux/distro/constraints:{}".format(linux_distro)) + known_broken = read_config("oss", "known_broken", "disable") + modifiers.append("shim//opensource/macros/broken_in_oss/constraints:{}".format(known_broken)) + return modifiers diff --git a/shim/opensource/macros/BUCK b/shim/opensource/macros/BUCK new file mode 100644 index 0000000000000..4e4acfd2090d6 --- /dev/null +++ b/shim/opensource/macros/BUCK @@ -0,0 +1,14 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + +config_setting( + name = "broken-in-oss", + constraint_values = [ + "//opensource/macros/broken_in_oss/constraints:enable", + ], + visibility = ["PUBLIC"], +) diff --git a/shim/opensource/macros/broken_in_oss/constraints/BUCK b/shim/opensource/macros/broken_in_oss/constraints/BUCK new file mode 100644 index 0000000000000..c49f2e67cf60d --- /dev/null +++ b/shim/opensource/macros/broken_in_oss/constraints/BUCK @@ -0,0 +1,23 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + +constraint_setting( + name = "broken_in_oss", + visibility = ["PUBLIC"], +) + +constraint_value( + name = "enable", + constraint_setting = ":broken_in_oss", + visibility = ["PUBLIC"], +) + +constraint_value( + name = "disable", + constraint_setting = ":broken_in_oss", + visibility = ["PUBLIC"], +) From 8688058d52ed00a3402c33afea0ddd064e586a06 Mon Sep 17 00:00:00 2001 From: Cullen Walsh Date: Tue, 22 Oct 2024 18:52:09 -0700 Subject: [PATCH 260/479] Refactor .buckconfig common elements into .buckconfig.d Summary: Move common settings, such as `prelude = bundled` and shim aliases, into a `common.buckconfig` file inside the `.buckconfig.d` folder. The only remaining settings inside the root `.buckconfig` should be setting specific to that project. This refactor also applies a new naming scheme for the root cell of Meta projects. By deriving the root cell name from the public github repo, it makes it easier to import external cells and avoid resolution errors due to shared cell names. Moving forward, the expectation is that "root" shall be a cell alias that always refers to the current cell, so each cell may always trust that by using "root//" they are staying within their code (which was not a guarantee before) Reviewed By: bigfootjon Differential Revision: D64579239 fbshipit-source-id: cb063176457d458bea4cc8891c4df323b778246b --- .buckconfig | 20 +++----------------- .buckconfig.d/common.buckconfig | 20 ++++++++++++++++++++ shim/.buckconfig | 27 +++++++++++++++++++-------- shim/build_defs/lib/oss.bzl | 4 ++-- shim/shims.bzl | 4 ++-- 5 files changed, 46 insertions(+), 29 deletions(-) create mode 100644 .buckconfig.d/common.buckconfig diff --git a/.buckconfig b/.buckconfig index f8609996c946c..0d4a2d16e445d 100644 --- a/.buckconfig +++ b/.buckconfig @@ -1,23 +1,9 @@ [repositories] -root = . -prelude = prelude -shim = shim +gh_facebook_fboss = . +gh_facebook_buck2_shims_meta = shim [repository_aliases] -config = prelude -ovr_config = prelude -toolchains = shim -fbcode = shim -fbcode_macros = shim -fbsource = shim -buck = shim -bazel_skylib = shim - -[external_cells] -prelude = bundled - -[parser] -target_platform_detector_spec = target:root//...->prelude//platforms:default target:shim//...->prelude//platforms:default +root = gh_facebook_fboss [buildfile] name=BUCK diff --git a/.buckconfig.d/common.buckconfig b/.buckconfig.d/common.buckconfig new file mode 100644 index 0000000000000..076a7ca03af40 --- /dev/null +++ b/.buckconfig.d/common.buckconfig @@ -0,0 +1,20 @@ +[cells] +prelude = prelude +none = none + +[cell_aliases] +config = prelude +ovr_config = prelude +bazel_skylib = gh_facebook_buck2_shims_meta +buck = gh_facebook_buck2_shims_meta +fbcode = gh_facebook_buck2_shims_meta +fbcode_macros = gh_facebook_buck2_shims_meta +fbsource = gh_facebook_buck2_shims_meta +shim = gh_facebook_buck2_shims_meta +toolchains = gh_facebook_buck2_shims_meta + +[external_cells] +prelude = bundled + +[parser] +target_platform_detector_spec = target:root//...->prelude//platforms:default target:shim//...->prelude//platforms:default diff --git a/shim/.buckconfig b/shim/.buckconfig index de18401ccbbbd..d6f453f72b545 100644 --- a/shim/.buckconfig +++ b/shim/.buckconfig @@ -6,22 +6,33 @@ # of this source tree. [cells] -shim = . +gh_facebook_buck2_shims_meta = . + +[cell_aliases] +root = gh_facebook_buck2_shims_meta + +# This is a duplicate of .buckconfig.d/common.buckconfig, but due to the way +# we vendor the shim directory, common.buckconfig won't show up in the +# vendored .buckconfig.d directory. +# When the shim cell is no longer vendored in individual projects, this +# duplication cam be removed. +[cells] prelude = prelude -toolchains = . none = none [cell_aliases] config = prelude ovr_config = prelude -fbcode = shim -fbsource = shim -fbcode_macros = shim -bazel_skylib = shim -buck = shim +bazel_skylib = gh_facebook_buck2_shims_meta +buck = gh_facebook_buck2_shims_meta +fbcode = gh_facebook_buck2_shims_meta +fbcode_macros = gh_facebook_buck2_shims_meta +fbsource = gh_facebook_buck2_shims_meta +shim = gh_facebook_buck2_shims_meta +toolchains = gh_facebook_buck2_shims_meta [external_cells] prelude = bundled [parser] -target_platform_detector_spec = target:shim//...->prelude//platforms:default +target_platform_detector_spec = target:root//...->prelude//platforms:default target:shim//...->prelude//platforms:default diff --git a/shim/build_defs/lib/oss.bzl b/shim/build_defs/lib/oss.bzl index f05190ce24ad5..9e386e2ab4923 100644 --- a/shim/build_defs/lib/oss.bzl +++ b/shim/build_defs/lib/oss.bzl @@ -40,11 +40,11 @@ def _strip_third_party_rust_version(target: str) -> str: # Cell the BUCK file being processed belongs to ACTIVE_CELL = native.get_cell_name() -# The root cell of this project, generally "root" and does not need to be set. +# The root cell of this project, extracted from the "root" alias. # Targets that explicitly reference this cell will not be rewritten, and # targets that do not end up referencing a cell will be replaced with targets # that reference this cell -ROOT_CELL = read_config("oss", "root_cell", "root") +ROOT_CELL = read_config("cell_aliases", "root", "root") # The cell this file and the rest of the shim directory belong to, generally # "shim" and does not need to be set. diff --git a/shim/shims.bzl b/shim/shims.bzl index 791fbecd6a8c0..6a73cfe2a8166 100644 --- a/shim/shims.bzl +++ b/shim/shims.bzl @@ -53,8 +53,8 @@ CPP_UNITTEST_DEPS = [ "shim//third-party/googletest:cpp_unittest_main", ] CPP_FOLLY_UNITTEST_DEPS = [ - "folly//folly/test/common:test_main_lib", - "folly//folly/ext/buck2:test_ext", + "gh_facebook_folly//folly/test/common:test_main_lib", + "gh_facebook_folly//folly/ext/buck2:test_ext", ] def _get_headers_from_sources(srcs): From c2bd4ef30e785a32ce5eeb27f7e198e810d6c2ce Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Tue, 22 Oct 2024 19:23:31 -0700 Subject: [PATCH 261/479] Fix missing reference in libsensor_service_utils Summary: P1663641366 ``` FAILED: sensor_service_utils_tests : && /usr/bin/c++ -Wall -Werror -Wno-sign-compare -Wno-maybe-uninitialized -Wno-deprecated-declarations -Os -DNDEBUG CMakeFiles/sensor_service_utils_tests.dir/fboss/platform/sensor_service/test/UtilsTest.cpp.o -o sensor_service_utils_tests -Wl,-rpath,/var/FBOSS/tmp_bld_dir/installed/glog--TiS8L7XT-dpPvonq2U7ueP0LLGtKprnfwIBV9cK38M/lib64:/var/FBOSS/tmp_bld_dir/installed/gflags-rTRHsBCNJ1QPFhXYI6Cn8x-wcYeGrQFSs0Z0lQGKwJ8/lib:/var/FBOSS/tmp_bld_dir/installed/libunwind-c63vwue81b-g1PVdgyfRrkAm8NgyayrkapvA8lMj46w/lib libsensor_service_utils.a /var/FBOSS/tmp_bld_dir/installed/googletest-GXS04svCG6RIq2z2VZ5_jAU0UT7-sdLvT-zqexiGLLs/lib64/libgmock_main.a /var/FBOSS/tmp_bld_dir/installed/googletest-GXS04svCG6RIq2z2VZ5_jAU0UT7-sdLvT-zqexiGLLs/lib64/libgmock.a /var/FBOSS/tmp_bld_dir/installed/googletest-GXS04svCG6RIq2z2VZ5_jAU0UT7-sdLvT-zqexiGLLs/lib64/libgtest.a libsensor_config_cpp2.a libplatform_manager_service_cpp2.a libplatform_manager_snapshot_cpp2.a libplatform_manager_config_cpp2.a libplatform_manager_presence_cpp2.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftcpp2.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftfrozen2.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftmetadata.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftanyrep.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthrifttype.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftprotocol.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftprotocol.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libasync.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libruntime.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libtransport.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/librpcmetadata.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libconcurrency.a /lib64/libzstd.so /var/FBOSS/tmp_bld_dir/installed/wangle/lib/libwangle.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthrift-core.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthrifttyperep.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libthriftannotation.a /var/FBOSS/tmp_bld_dir/installed/fbthrift/lib/libserverdbginfo.a /usr/lib64/libxxhash.so /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_server_async_tran.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_server.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_server_state.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_dsr_frontend.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_dsr_types.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_fizz_handshake.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_transport.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_buf_accessor.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_datagram_handler.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_batch_writer.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_cc_algo.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_codec_pktrebuilder.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_happyeyeballs.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_async_udp_socket.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_events.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_looper.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_observer.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_ack_handler.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_loss.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_pacing_functions.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_simple_frame_functions.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_functions.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_codec_pktbuilder.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_stream.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_flowcontrol.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_qlogger.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_stream_functions.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_state_machine.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_codec.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_handshake.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_codec_packet_number_cipher.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_codec_decode.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_codec_types.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_exception.a /var/FBOSS/tmp_bld_dir/installed/fizz/lib/libfizz.a /usr/lib64/libsodium.so /usr/lib64/libz.so /usr/lib64/librt.a /var/FBOSS/tmp_bld_dir/installed/liboqs-1YXCy0qiTa4ku7OQ_N2qiBjN8Y5LfLjbAEwiIq6RfhI/lib64/liboqs.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_bufutil.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_transport_knobs.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_constants.a /var/FBOSS/tmp_bld_dir/installed/mvfst/lib/libmvfst_transport_settings_functions.a /var/FBOSS/tmp_bld_dir/installed/folly/lib/libfolly.a /var/FBOSS/tmp_bld_dir/installed/fmt-uSYXU74IPh1alWrMBg51QsrvAsUtGQlguX0AigNHg-8/lib64/libfmt.a /var/FBOSS/tmp_bld_dir/installed/glog--TiS8L7XT-dpPvonq2U7ueP0LLGtKprnfwIBV9cK38M/lib64/libglog.so /var/FBOSS/tmp_bld_dir/installed/gflags-rTRHsBCNJ1QPFhXYI6Cn8x-wcYeGrQFSs0Z0lQGKwJ8/lib/libgflags.so.2.2.2 /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_context.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_filesystem.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_atomic.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_program_options.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_regex.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_system.a /var/FBOSS/tmp_bld_dir/installed/boost-bDFME8k4Y3xrApUdeK8pjWoOB1bB6h7YGg7NBnogxL8/lib/libboost_thread.a /usr/lib64/libdouble-conversion.so /usr/lib64/libevent.so /usr/lib64/libz.so /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libbz2.so /usr/lib64/liblzma.so /usr/lib64/liblz4.so /usr/lib64/libzstd.so /usr/lib64/libsnappy.so /usr/lib64/libdwarf.so /usr/lib64/libiberty.a /usr/lib64/libsodium.so -ldl /var/FBOSS/tmp_bld_dir/installed/libunwind-c63vwue81b-g1PVdgyfRrkAm8NgyayrkapvA8lMj46w/lib/libunwind.so /usr/lib64/libre2.so && : /usr/bin/ld: libsensor_service_utils.a(Utils.cpp.o): in function `facebook::fboss::platform::sensor_service::Utils::getConfig()': Utils.cpp:(.text+0xbbe1): undefined reference to `vtable for facebook::fboss::platform::PlatformUtils' /usr/bin/ld: Utils.cpp:(.text+0xbbeb): undefined reference to `facebook::fboss::platform::helpers::PlatformNameLib::PlatformNameLib(std::shared_ptr, std::shared_ptr)' /usr/bin/ld: Utils.cpp:(.text+0xbbfd): undefined reference to `facebook::fboss::platform::helpers::PlatformNameLib::getPlatformName[abi:cxx11]() const' /usr/bin/ld: Utils.cpp:(.text+0xbc3b): undefined reference to `vtable for facebook::fboss::platform::ConfigLib' /usr/bin/ld: Utils.cpp:(.text+0xbc40): undefined reference to `facebook::fboss::platform::ConfigLib::getSensorServiceConfig(std::optional, std::allocator > > const&) const' /usr/bin/ld: Utils.cpp:(.text+0xbd6b): undefined reference to `facebook::fboss::platform::sensor_service::ConfigValidator::isValid(facebook::fboss::platform::sensor_config::SensorConfig const&)' /usr/bin/ld: libsensor_service_utils.a(Utils.cpp.o): in function `std::shared_ptr std::make_shared()': Utils.cpp:(.text._ZSt11make_sharedIN8facebook5fboss8platform15PlatformFsUtilsEJEESt10shared_ptrIT_EDpOT0_[_ZSt11make_sharedIN8facebook5fboss8platform15PlatformFsUtilsEJEESt10shared_ptrIT_EDpOT0_]+0x45): undefined reference to `facebook::fboss::platform::PlatformFsUtils::PlatformFsUtils(std::optional const&)' /usr/bin/ld: libsensor_service_utils.a(Utils.cpp.o): in function `facebook::fboss::platform::helpers::PlatformNameLib::~PlatformNameLib()': Utils.cpp:(.text._ZN8facebook5fboss8platform7helpers15PlatformNameLibD2Ev[_ZN8facebook5fboss8platform7helpers15PlatformNameLibD5Ev]+0xc): undefined reference to `vtable for facebook::fboss::platform::helpers::PlatformNameLib' collect2: error: ld returned 1 exit status ``` Reviewed By: srikrishnagopu Differential Revision: D64803322 fbshipit-source-id: 9185d812ee18061e8c4ebe95227381472e52c6be --- cmake/PlatformSensorService.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/PlatformSensorService.cmake b/cmake/PlatformSensorService.cmake index 7eef4af9b072e..ce9579948f842 100644 --- a/cmake/PlatformSensorService.cmake +++ b/cmake/PlatformSensorService.cmake @@ -26,12 +26,15 @@ add_fbthrift_cpp_library( add_library(sensor_service_utils fboss/platform/sensor_service/Utils.cpp + fboss/platform/sensor_service/ConfigValidator.cpp fboss/platform/sensor_service/PmUnitInfoFetcher.cpp fboss/platform/sensor_service/oss/PmClientFactory.cpp ) target_link_libraries(sensor_service_utils sensor_config_cpp2 + platform_config_lib + platform_name_lib platform_manager_service_cpp2 platform_manager_config_cpp2 ${RE2} From a62b9ebbadcba833090717c38fef929c01f36839 Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Tue, 22 Oct 2024 22:48:16 -0700 Subject: [PATCH 262/479] s/SAI_CHENAB_IMPL/CHENAB_SAI_SDK Summary: as titled Reviewed By: jasmeetbagga Differential Revision: D64773761 fbshipit-source-id: 701525e501963803aff1efeaec275fc2f4cb87b2 --- cmake/AgentHwSaiApi.cmake | 2 +- fboss/agent/hw/sai/api/AclApi.h | 4 ++-- fboss/agent/hw/sai/api/SaiVersion.h | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/cmake/AgentHwSaiApi.cmake b/cmake/AgentHwSaiApi.cmake index 760778d9db446..08191bbf3c8e0 100644 --- a/cmake/AgentHwSaiApi.cmake +++ b/cmake/AgentHwSaiApi.cmake @@ -110,7 +110,7 @@ elseif (SAI_BRCM_IMPL) find_path(SAI_IMPL_DIR NAMES lib/libsai_impl.a) include_directories(${SAI_IMPL_DIR}) message(STATUS "Found SAI_INCLUDE_DIR: ${SAI_INCLUDE_DIR}") -elseif (SAI_CHENAB_IMPL) +elseif (CHENAB_SAI_SDK) list(APPEND SAI_API_SRC fboss/agent/hw/sai/api/chenab/PortApi.cpp fboss/agent/hw/sai/api/chenab/TamApi.cpp diff --git a/fboss/agent/hw/sai/api/AclApi.h b/fboss/agent/hw/sai/api/AclApi.h index c210302625159..bbdd21ee2a2eb 100644 --- a/fboss/agent/hw/sai/api/AclApi.h +++ b/fboss/agent/hw/sai/api/AclApi.h @@ -149,7 +149,7 @@ struct SaiAclTableTraits { SaiAttribute; using FieldTcpFlags = SaiAttribute; -#if defined(TAJO_SDK) || defined(SAI_CHENAB_IMPL) +#if defined(TAJO_SDK) || defined(CHENAB_SAI_SDK) using FieldSrcPort = SaiAttribute; #else @@ -311,7 +311,7 @@ struct SaiAclEntryTraits { EnumType, SAI_ACL_ENTRY_ATTR_FIELD_DST_IP, AclEntryFieldIpV4>; -#if defined(TAJO_SDK) || defined(SAI_CHENAB_IMPL) +#if defined(TAJO_SDK) || defined(CHENAB_SAI_SDK) using FieldSrcPort = SaiAttribute< EnumType, SAI_ACL_ENTRY_ATTR_FIELD_IN_PORT, diff --git a/fboss/agent/hw/sai/api/SaiVersion.h b/fboss/agent/hw/sai/api/SaiVersion.h index fb79a6444b02c..61f68116a3c4b 100644 --- a/fboss/agent/hw/sai/api/SaiVersion.h +++ b/fboss/agent/hw/sai/api/SaiVersion.h @@ -128,7 +128,3 @@ #if defined(TAJO_SDK_EBRO) || defined(TAJO_SDK_MORGAN) #define TAJO_SAI_SDK #endif - -#if defined(SAI_CHENAB_IMPL) -#define SAI_CHENAB_IMPL -#endif From e934e4492fc2aedd382a67da0ad1affac9cbfadf Mon Sep 17 00:00:00 2001 From: Siva Muthusamy Date: Tue, 22 Oct 2024 23:38:56 -0700 Subject: [PATCH 263/479] Fix R3 stats collection test for warmboot Summary: Fix R3 stats collection test for warmboot. The fix is same as D64450685 that got fixed for J3AI. Reviewed By: shri-khare Differential Revision: D64786709 fbshipit-source-id: 211c14d9aaf17103ee4f29145d2949d92c9f36c3 --- fboss/agent/test/agent_hw_tests/AgentFabricSwitchTests.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentFabricSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/AgentFabricSwitchTests.cpp index 4df932be54c91..97098ae5c2e20 100644 --- a/fboss/agent/test/agent_hw_tests/AgentFabricSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentFabricSwitchTests.cpp @@ -138,7 +138,12 @@ TEST_F(AgentFabricSwitchTest, collectStats) { port->getName() + ".load_bearing_link_state.flap.sum.60"); EXPECT_EVENTUALLY_TRUE(loadBearingInErrors.has_value()); EXPECT_EVENTUALLY_TRUE(loadBearingFecErrors.has_value()); - EXPECT_EVENTUALLY_TRUE(loadBearingFlaps.has_value()); + if (getAgentEnsemble()->getBootType() == BootType::COLD_BOOT) { + EXPECT_EVENTUALLY_TRUE(loadBearingFlaps.has_value()); + } else { + // No port flaps after wb, hence no port flap stats being recorded + EXPECT_FALSE(loadBearingFlaps.has_value()); + } } } }); From 724fbf7cb9dadf3f9e86e78db2b30c77a23a9dc8 Mon Sep 17 00:00:00 2001 From: genkzgnluxbjeyb Date: Wed, 23 Oct 2024 00:22:38 -0700 Subject: [PATCH 264/479] fboss_link_test_config_sync Differential Revision: D64812077 fbshipit-source-id: c6de858c2cad1b9962f4d639f08b1f43ba6a7a47 --- .../janga800bic.materialized_JSON | 1710 +++++++++-------- .../meru800bia.materialized_JSON | 123 +- .../tahan800bc.materialized_JSON | 4 +- 3 files changed, 1033 insertions(+), 804 deletions(-) diff --git a/fboss/oss/link_test_configs/janga800bic.materialized_JSON b/fboss/oss/link_test_configs/janga800bic.materialized_JSON index 1b796ac010b33..d49c43ac63019 100644 --- a/fboss/oss/link_test_configs/janga800bic.materialized_JSON +++ b/fboss/oss/link_test_configs/janga800bic.materialized_JSON @@ -223,7 +223,7 @@ }, { "logicalID": 7, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -243,7 +243,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/44/1" }, "lookupClasses": [ @@ -258,7 +258,7 @@ }, { "logicalID": 8, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -278,7 +278,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/2/5" }, "lookupClasses": [ @@ -293,7 +293,7 @@ }, { "logicalID": 9, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -313,7 +313,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/2/1" }, "lookupClasses": [ @@ -328,7 +328,7 @@ }, { "logicalID": 10, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -348,7 +348,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/1/5" }, "lookupClasses": [ @@ -363,7 +363,7 @@ }, { "logicalID": 11, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -383,7 +383,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/1/1" }, "lookupClasses": [ @@ -957,8 +957,8 @@ "scope": 1 }, { - "logicalID": 1112, - "state": 2, + "logicalID": 1114, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -978,7 +978,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/1" + }, "lookupClasses": [ @@ -992,8 +992,8 @@ "scope": 0 }, { - "logicalID": 1113, - "state": 2, + "logicalID": 1115, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1013,7 +1013,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/2" + }, "lookupClasses": [ @@ -1027,8 +1027,8 @@ "scope": 0 }, { - "logicalID": 1114, - "state": 2, + "logicalID": 1112, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1048,7 +1048,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/3" + }, "lookupClasses": [ @@ -1062,8 +1062,8 @@ "scope": 0 }, { - "logicalID": 1115, - "state": 2, + "logicalID": 1113, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1083,7 +1083,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/4" + }, "lookupClasses": [ @@ -1097,8 +1097,8 @@ "scope": 0 }, { - "logicalID": 1116, - "state": 2, + "logicalID": 1119, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1118,7 +1118,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/5" + }, "lookupClasses": [ @@ -1133,7 +1133,7 @@ }, { "logicalID": 1117, - "state": 2, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1153,7 +1153,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/6" + }, "lookupClasses": [ @@ -1168,7 +1168,7 @@ }, { "logicalID": 1118, - "state": 2, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1188,7 +1188,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/7" + }, "lookupClasses": [ @@ -1202,8 +1202,8 @@ "scope": 0 }, { - "logicalID": 1119, - "state": 2, + "logicalID": 1116, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1223,7 +1223,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/8" + }, "lookupClasses": [ @@ -1237,8 +1237,8 @@ "scope": 0 }, { - "logicalID": 1104, - "state": 2, + "logicalID": 1106, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1258,7 +1258,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/1" + }, "lookupClasses": [ @@ -1272,8 +1272,8 @@ "scope": 0 }, { - "logicalID": 1105, - "state": 2, + "logicalID": 1107, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1293,7 +1293,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/2" + }, "lookupClasses": [ @@ -1307,8 +1307,8 @@ "scope": 0 }, { - "logicalID": 1106, - "state": 2, + "logicalID": 1104, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1328,7 +1328,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/3" + }, "lookupClasses": [ @@ -1342,8 +1342,8 @@ "scope": 0 }, { - "logicalID": 1107, - "state": 2, + "logicalID": 1105, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1363,7 +1363,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/4" + }, "lookupClasses": [ @@ -1377,8 +1377,8 @@ "scope": 0 }, { - "logicalID": 1108, - "state": 2, + "logicalID": 1111, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1398,7 +1398,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/5" + }, "lookupClasses": [ @@ -1413,7 +1413,7 @@ }, { "logicalID": 1109, - "state": 2, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1433,7 +1433,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/6" + }, "lookupClasses": [ @@ -1448,7 +1448,7 @@ }, { "logicalID": 1110, - "state": 2, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1468,7 +1468,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/7" + }, "lookupClasses": [ @@ -1482,8 +1482,8 @@ "scope": 0 }, { - "logicalID": 1111, - "state": 2, + "logicalID": 1108, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1503,7 +1503,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/8" + }, "lookupClasses": [ @@ -1517,7 +1517,7 @@ "scope": 0 }, { - "logicalID": 1136, + "logicalID": 1143, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1552,7 +1552,7 @@ "scope": 0 }, { - "logicalID": 1137, + "logicalID": 1141, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1587,7 +1587,7 @@ "scope": 0 }, { - "logicalID": 1138, + "logicalID": 1142, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1622,7 +1622,7 @@ "scope": 0 }, { - "logicalID": 1139, + "logicalID": 1140, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1657,7 +1657,7 @@ "scope": 0 }, { - "logicalID": 1140, + "logicalID": 1138, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1692,7 +1692,7 @@ "scope": 0 }, { - "logicalID": 1141, + "logicalID": 1136, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1727,7 +1727,7 @@ "scope": 0 }, { - "logicalID": 1142, + "logicalID": 1137, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1762,7 +1762,7 @@ "scope": 0 }, { - "logicalID": 1143, + "logicalID": 1139, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1797,7 +1797,7 @@ "scope": 0 }, { - "logicalID": 1128, + "logicalID": 1130, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1832,7 +1832,7 @@ "scope": 0 }, { - "logicalID": 1129, + "logicalID": 1131, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1867,7 +1867,7 @@ "scope": 0 }, { - "logicalID": 1130, + "logicalID": 1128, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1902,7 +1902,7 @@ "scope": 0 }, { - "logicalID": 1131, + "logicalID": 1129, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1937,8 +1937,8 @@ "scope": 0 }, { - "logicalID": 1132, - "state": 1, + "logicalID": 1133, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1958,7 +1958,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/1" }, "lookupClasses": [ @@ -1972,8 +1972,8 @@ "scope": 0 }, { - "logicalID": 1133, - "state": 1, + "logicalID": 1135, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1993,7 +1993,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/2" }, "lookupClasses": [ @@ -2008,7 +2008,7 @@ }, { "logicalID": 1134, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2028,7 +2028,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/3" }, "lookupClasses": [ @@ -2042,8 +2042,8 @@ "scope": 0 }, { - "logicalID": 1135, - "state": 1, + "logicalID": 1132, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2063,7 +2063,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/4" }, "lookupClasses": [ @@ -2077,8 +2077,8 @@ "scope": 0 }, { - "logicalID": 1120, - "state": 1, + "logicalID": 1122, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2098,7 +2098,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/6/5" }, "lookupClasses": [ @@ -2112,8 +2112,8 @@ "scope": 0 }, { - "logicalID": 1121, - "state": 1, + "logicalID": 1123, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2133,7 +2133,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/6/6" }, "lookupClasses": [ @@ -2147,8 +2147,8 @@ "scope": 0 }, { - "logicalID": 1122, - "state": 1, + "logicalID": 1120, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2168,7 +2168,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/6/7" }, "lookupClasses": [ @@ -2182,8 +2182,8 @@ "scope": 0 }, { - "logicalID": 1123, - "state": 1, + "logicalID": 1121, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2203,7 +2203,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/6/8" }, "lookupClasses": [ @@ -2217,8 +2217,8 @@ "scope": 0 }, { - "logicalID": 1124, - "state": 1, + "logicalID": 1125, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2238,7 +2238,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/1" }, "lookupClasses": [ @@ -2252,8 +2252,8 @@ "scope": 0 }, { - "logicalID": 1125, - "state": 1, + "logicalID": 1127, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2273,7 +2273,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/2" }, "lookupClasses": [ @@ -2288,7 +2288,7 @@ }, { "logicalID": 1126, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2308,7 +2308,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/3" }, "lookupClasses": [ @@ -2322,8 +2322,8 @@ "scope": 0 }, { - "logicalID": 1127, - "state": 1, + "logicalID": 1124, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2343,7 +2343,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/4" }, "lookupClasses": [ @@ -2357,8 +2357,8 @@ "scope": 0 }, { - "logicalID": 1160, - "state": 1, + "logicalID": 1162, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2378,7 +2378,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/5" }, "lookupClasses": [ @@ -2392,8 +2392,8 @@ "scope": 0 }, { - "logicalID": 1161, - "state": 1, + "logicalID": 1163, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2413,7 +2413,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/6" }, "lookupClasses": [ @@ -2427,8 +2427,8 @@ "scope": 0 }, { - "logicalID": 1162, - "state": 1, + "logicalID": 1165, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2448,7 +2448,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/7" }, "lookupClasses": [ @@ -2462,8 +2462,8 @@ "scope": 0 }, { - "logicalID": 1163, - "state": 1, + "logicalID": 1167, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2483,7 +2483,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/8" }, "lookupClasses": [ @@ -2498,7 +2498,7 @@ }, { "logicalID": 1164, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2518,7 +2518,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/1" }, "lookupClasses": [ @@ -2532,8 +2532,8 @@ "scope": 0 }, { - "logicalID": 1165, - "state": 1, + "logicalID": 1161, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2553,7 +2553,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/2" }, "lookupClasses": [ @@ -2568,7 +2568,7 @@ }, { "logicalID": 1166, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2588,7 +2588,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/3" }, "lookupClasses": [ @@ -2602,8 +2602,8 @@ "scope": 0 }, { - "logicalID": 1167, - "state": 1, + "logicalID": 1160, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2623,7 +2623,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/4" }, "lookupClasses": [ @@ -2637,8 +2637,8 @@ "scope": 0 }, { - "logicalID": 1152, - "state": 1, + "logicalID": 1155, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2658,7 +2658,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/5" }, "lookupClasses": [ @@ -2672,8 +2672,8 @@ "scope": 0 }, { - "logicalID": 1153, - "state": 1, + "logicalID": 1154, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2693,7 +2693,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/6" }, "lookupClasses": [ @@ -2707,8 +2707,8 @@ "scope": 0 }, { - "logicalID": 1154, - "state": 1, + "logicalID": 1153, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2728,7 +2728,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/7" }, "lookupClasses": [ @@ -2742,8 +2742,8 @@ "scope": 0 }, { - "logicalID": 1155, - "state": 1, + "logicalID": 1152, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2763,7 +2763,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/8" }, "lookupClasses": [ @@ -2777,8 +2777,8 @@ "scope": 0 }, { - "logicalID": 1156, - "state": 1, + "logicalID": 1159, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2798,7 +2798,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/1" }, "lookupClasses": [ @@ -2813,7 +2813,7 @@ }, { "logicalID": 1157, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2833,7 +2833,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/2" }, "lookupClasses": [ @@ -2848,7 +2848,7 @@ }, { "logicalID": 1158, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2868,7 +2868,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/3" }, "lookupClasses": [ @@ -2882,8 +2882,8 @@ "scope": 0 }, { - "logicalID": 1159, - "state": 1, + "logicalID": 1156, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2903,7 +2903,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/4" }, "lookupClasses": [ @@ -2917,8 +2917,8 @@ "scope": 0 }, { - "logicalID": 1144, - "state": 1, + "logicalID": 1146, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2938,7 +2938,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/5" }, "lookupClasses": [ @@ -2952,8 +2952,8 @@ "scope": 0 }, { - "logicalID": 1145, - "state": 1, + "logicalID": 1147, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2973,7 +2973,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/6" }, "lookupClasses": [ @@ -2987,8 +2987,8 @@ "scope": 0 }, { - "logicalID": 1146, - "state": 1, + "logicalID": 1144, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3008,7 +3008,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/7" }, "lookupClasses": [ @@ -3022,8 +3022,8 @@ "scope": 0 }, { - "logicalID": 1147, - "state": 1, + "logicalID": 1145, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3043,7 +3043,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/8" }, "lookupClasses": [ @@ -3057,8 +3057,8 @@ "scope": 0 }, { - "logicalID": 1148, - "state": 1, + "logicalID": 1149, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3078,7 +3078,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/1" }, "lookupClasses": [ @@ -3092,8 +3092,8 @@ "scope": 0 }, { - "logicalID": 1149, - "state": 1, + "logicalID": 1151, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3113,7 +3113,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/2" }, "lookupClasses": [ @@ -3127,8 +3127,8 @@ "scope": 0 }, { - "logicalID": 1150, - "state": 1, + "logicalID": 1148, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3148,7 +3148,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/3" }, "lookupClasses": [ @@ -3162,8 +3162,8 @@ "scope": 0 }, { - "logicalID": 1151, - "state": 1, + "logicalID": 1150, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3183,7 +3183,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/4" }, "lookupClasses": [ @@ -3197,8 +3197,8 @@ "scope": 0 }, { - "logicalID": 1168, - "state": 1, + "logicalID": 1171, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3218,7 +3218,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/5" }, "lookupClasses": [ @@ -3232,8 +3232,8 @@ "scope": 0 }, { - "logicalID": 1169, - "state": 1, + "logicalID": 1175, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3253,7 +3253,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/6" }, "lookupClasses": [ @@ -3268,7 +3268,7 @@ }, { "logicalID": 1170, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3288,7 +3288,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/7" }, "lookupClasses": [ @@ -3302,8 +3302,8 @@ "scope": 0 }, { - "logicalID": 1171, - "state": 1, + "logicalID": 1169, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3323,7 +3323,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/8" }, "lookupClasses": [ @@ -3338,7 +3338,7 @@ }, { "logicalID": 1172, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3358,7 +3358,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/1" }, "lookupClasses": [ @@ -3373,7 +3373,7 @@ }, { "logicalID": 1173, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3393,7 +3393,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/2" }, "lookupClasses": [ @@ -3408,7 +3408,7 @@ }, { "logicalID": 1174, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3428,7 +3428,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/3" }, "lookupClasses": [ @@ -3442,8 +3442,8 @@ "scope": 0 }, { - "logicalID": 1175, - "state": 1, + "logicalID": 1168, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3463,7 +3463,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/4" }, "lookupClasses": [ @@ -3477,8 +3477,8 @@ "scope": 0 }, { - "logicalID": 1176, - "state": 1, + "logicalID": 1182, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3498,7 +3498,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/5" }, "lookupClasses": [ @@ -3512,8 +3512,8 @@ "scope": 0 }, { - "logicalID": 1177, - "state": 1, + "logicalID": 1176, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3533,7 +3533,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/6" }, "lookupClasses": [ @@ -3548,7 +3548,7 @@ }, { "logicalID": 1178, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3568,7 +3568,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/7" }, "lookupClasses": [ @@ -3582,8 +3582,8 @@ "scope": 0 }, { - "logicalID": 1179, - "state": 1, + "logicalID": 1181, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3603,7 +3603,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/8" }, "lookupClasses": [ @@ -3617,8 +3617,8 @@ "scope": 0 }, { - "logicalID": 1180, - "state": 1, + "logicalID": 1179, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3638,7 +3638,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/1" }, "lookupClasses": [ @@ -3652,8 +3652,8 @@ "scope": 0 }, { - "logicalID": 1181, - "state": 1, + "logicalID": 1177, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3673,7 +3673,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/2" }, "lookupClasses": [ @@ -3687,8 +3687,8 @@ "scope": 0 }, { - "logicalID": 1182, - "state": 1, + "logicalID": 1180, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3708,7 +3708,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/3" }, "lookupClasses": [ @@ -3723,7 +3723,7 @@ }, { "logicalID": 1183, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3743,7 +3743,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/4" }, "lookupClasses": [ @@ -3757,8 +3757,8 @@ "scope": 0 }, { - "logicalID": 1096, - "state": 1, + "logicalID": 1099, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3778,7 +3778,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/5" }, "lookupClasses": [ @@ -3792,8 +3792,8 @@ "scope": 0 }, { - "logicalID": 1097, - "state": 1, + "logicalID": 1103, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3813,7 +3813,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/6" }, "lookupClasses": [ @@ -3827,8 +3827,8 @@ "scope": 0 }, { - "logicalID": 1098, - "state": 1, + "logicalID": 1097, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3848,7 +3848,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/7" }, "lookupClasses": [ @@ -3862,8 +3862,8 @@ "scope": 0 }, { - "logicalID": 1099, - "state": 1, + "logicalID": 1098, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3883,7 +3883,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/8" }, "lookupClasses": [ @@ -3898,7 +3898,7 @@ }, { "logicalID": 1100, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3918,7 +3918,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/1" }, "lookupClasses": [ @@ -3933,7 +3933,7 @@ }, { "logicalID": 1101, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3953,7 +3953,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/2" }, "lookupClasses": [ @@ -3968,7 +3968,7 @@ }, { "logicalID": 1102, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3988,7 +3988,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/3" }, "lookupClasses": [ @@ -4002,8 +4002,8 @@ "scope": 0 }, { - "logicalID": 1103, - "state": 1, + "logicalID": 1096, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4023,7 +4023,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/4" }, "lookupClasses": [ @@ -4037,8 +4037,8 @@ "scope": 0 }, { - "logicalID": 1072, - "state": 1, + "logicalID": 1078, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4058,7 +4058,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/5" }, "lookupClasses": [ @@ -4072,8 +4072,8 @@ "scope": 0 }, { - "logicalID": 1073, - "state": 1, + "logicalID": 1072, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4093,7 +4093,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/6" }, "lookupClasses": [ @@ -4107,8 +4107,8 @@ "scope": 0 }, { - "logicalID": 1074, - "state": 1, + "logicalID": 1077, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4128,7 +4128,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/7" }, "lookupClasses": [ @@ -4142,8 +4142,8 @@ "scope": 0 }, { - "logicalID": 1075, - "state": 1, + "logicalID": 1074, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4163,7 +4163,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/8" }, "lookupClasses": [ @@ -4177,8 +4177,8 @@ "scope": 0 }, { - "logicalID": 1076, - "state": 1, + "logicalID": 1073, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4198,7 +4198,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/1" }, "lookupClasses": [ @@ -4212,8 +4212,8 @@ "scope": 0 }, { - "logicalID": 1077, - "state": 1, + "logicalID": 1076, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4233,7 +4233,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/2" }, "lookupClasses": [ @@ -4247,8 +4247,8 @@ "scope": 0 }, { - "logicalID": 1078, - "state": 1, + "logicalID": 1079, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4268,7 +4268,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/3" }, "lookupClasses": [ @@ -4282,8 +4282,8 @@ "scope": 0 }, { - "logicalID": 1079, - "state": 1, + "logicalID": 1075, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4303,7 +4303,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/4" }, "lookupClasses": [ @@ -4317,8 +4317,8 @@ "scope": 0 }, { - "logicalID": 1080, - "state": 1, + "logicalID": 1084, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4338,7 +4338,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/5" }, "lookupClasses": [ @@ -4352,8 +4352,8 @@ "scope": 0 }, { - "logicalID": 1081, - "state": 1, + "logicalID": 1086, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4373,7 +4373,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/6" }, "lookupClasses": [ @@ -4387,8 +4387,8 @@ "scope": 0 }, { - "logicalID": 1082, - "state": 1, + "logicalID": 1087, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4408,7 +4408,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/7" }, "lookupClasses": [ @@ -4422,8 +4422,8 @@ "scope": 0 }, { - "logicalID": 1083, - "state": 1, + "logicalID": 1085, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4443,7 +4443,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/8" }, "lookupClasses": [ @@ -4457,8 +4457,8 @@ "scope": 0 }, { - "logicalID": 1084, - "state": 1, + "logicalID": 1081, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4478,7 +4478,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/1" }, "lookupClasses": [ @@ -4492,8 +4492,8 @@ "scope": 0 }, { - "logicalID": 1085, - "state": 1, + "logicalID": 1080, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4513,7 +4513,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/2" }, "lookupClasses": [ @@ -4527,8 +4527,8 @@ "scope": 0 }, { - "logicalID": 1086, - "state": 1, + "logicalID": 1083, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4548,7 +4548,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/3" }, "lookupClasses": [ @@ -4562,8 +4562,8 @@ "scope": 0 }, { - "logicalID": 1087, - "state": 1, + "logicalID": 1082, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4583,7 +4583,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/4" }, "lookupClasses": [ @@ -4597,8 +4597,8 @@ "scope": 0 }, { - "logicalID": 1088, - "state": 1, + "logicalID": 1094, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4618,7 +4618,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/5" }, "lookupClasses": [ @@ -4632,8 +4632,8 @@ "scope": 0 }, { - "logicalID": 1089, - "state": 1, + "logicalID": 1092, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4653,7 +4653,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/6" }, "lookupClasses": [ @@ -4667,8 +4667,8 @@ "scope": 0 }, { - "logicalID": 1090, - "state": 1, + "logicalID": 1093, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4688,7 +4688,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/7" }, "lookupClasses": [ @@ -4702,8 +4702,8 @@ "scope": 0 }, { - "logicalID": 1091, - "state": 1, + "logicalID": 1095, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4723,7 +4723,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/8" }, "lookupClasses": [ @@ -4737,8 +4737,8 @@ "scope": 0 }, { - "logicalID": 1092, - "state": 1, + "logicalID": 1088, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4758,7 +4758,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/1" }, "lookupClasses": [ @@ -4772,8 +4772,8 @@ "scope": 0 }, { - "logicalID": 1093, - "state": 1, + "logicalID": 1091, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4793,7 +4793,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/2" }, "lookupClasses": [ @@ -4807,8 +4807,8 @@ "scope": 0 }, { - "logicalID": 1094, - "state": 1, + "logicalID": 1090, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4828,7 +4828,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/3" }, "lookupClasses": [ @@ -4842,8 +4842,8 @@ "scope": 0 }, { - "logicalID": 1095, - "state": 1, + "logicalID": 1089, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4863,7 +4863,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/4" }, "lookupClasses": [ @@ -4877,8 +4877,8 @@ "scope": 0 }, { - "logicalID": 1064, - "state": 1, + "logicalID": 1070, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4898,7 +4898,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/5" }, "lookupClasses": [ @@ -4912,8 +4912,8 @@ "scope": 0 }, { - "logicalID": 1065, - "state": 1, + "logicalID": 1064, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4933,7 +4933,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/6" }, "lookupClasses": [ @@ -4947,8 +4947,8 @@ "scope": 0 }, { - "logicalID": 1066, - "state": 1, + "logicalID": 1068, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4968,7 +4968,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/7" }, "lookupClasses": [ @@ -4982,8 +4982,8 @@ "scope": 0 }, { - "logicalID": 1067, - "state": 1, + "logicalID": 1069, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5003,7 +5003,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/8" }, "lookupClasses": [ @@ -5017,8 +5017,8 @@ "scope": 0 }, { - "logicalID": 1068, - "state": 1, + "logicalID": 1065, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5038,7 +5038,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/1" }, "lookupClasses": [ @@ -5052,8 +5052,8 @@ "scope": 0 }, { - "logicalID": 1069, - "state": 1, + "logicalID": 1066, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5073,7 +5073,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/2" }, "lookupClasses": [ @@ -5087,8 +5087,8 @@ "scope": 0 }, { - "logicalID": 1070, - "state": 1, + "logicalID": 1067, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5108,7 +5108,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/3" }, "lookupClasses": [ @@ -5123,7 +5123,7 @@ }, { "logicalID": 1071, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5143,7 +5143,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/4" }, "lookupClasses": [ @@ -5157,8 +5157,8 @@ "scope": 0 }, { - "logicalID": 1056, - "state": 1, + "logicalID": 1060, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5178,7 +5178,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/5" }, "lookupClasses": [ @@ -5192,8 +5192,8 @@ "scope": 0 }, { - "logicalID": 1057, - "state": 1, + "logicalID": 1061, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5213,7 +5213,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/6" }, "lookupClasses": [ @@ -5227,8 +5227,8 @@ "scope": 0 }, { - "logicalID": 1058, - "state": 1, + "logicalID": 1062, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5248,7 +5248,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/7" }, "lookupClasses": [ @@ -5262,8 +5262,8 @@ "scope": 0 }, { - "logicalID": 1059, - "state": 1, + "logicalID": 1056, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5283,7 +5283,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/8" }, "lookupClasses": [ @@ -5297,8 +5297,8 @@ "scope": 0 }, { - "logicalID": 1060, - "state": 1, + "logicalID": 1063, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5318,7 +5318,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/1" }, "lookupClasses": [ @@ -5332,8 +5332,8 @@ "scope": 0 }, { - "logicalID": 1061, - "state": 1, + "logicalID": 1057, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5353,7 +5353,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/2" }, "lookupClasses": [ @@ -5367,8 +5367,8 @@ "scope": 0 }, { - "logicalID": 1062, - "state": 1, + "logicalID": 1059, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5388,7 +5388,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/3" }, "lookupClasses": [ @@ -5402,8 +5402,8 @@ "scope": 0 }, { - "logicalID": 1063, - "state": 1, + "logicalID": 1058, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5423,7 +5423,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/4" }, "lookupClasses": [ @@ -5437,8 +5437,8 @@ "scope": 0 }, { - "logicalID": 1048, - "state": 1, + "logicalID": 1052, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5458,7 +5458,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/5" }, "lookupClasses": [ @@ -5472,8 +5472,8 @@ "scope": 0 }, { - "logicalID": 1049, - "state": 1, + "logicalID": 1053, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5493,7 +5493,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/6" }, "lookupClasses": [ @@ -5507,8 +5507,8 @@ "scope": 0 }, { - "logicalID": 1050, - "state": 1, + "logicalID": 1054, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5528,7 +5528,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/7" }, "lookupClasses": [ @@ -5542,8 +5542,8 @@ "scope": 0 }, { - "logicalID": 1051, - "state": 1, + "logicalID": 1048, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5563,7 +5563,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/8" }, "lookupClasses": [ @@ -5577,8 +5577,8 @@ "scope": 0 }, { - "logicalID": 1052, - "state": 1, + "logicalID": 1050, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5598,7 +5598,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/1" }, "lookupClasses": [ @@ -5612,8 +5612,8 @@ "scope": 0 }, { - "logicalID": 1053, - "state": 1, + "logicalID": 1055, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5633,7 +5633,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/2" }, "lookupClasses": [ @@ -5647,8 +5647,8 @@ "scope": 0 }, { - "logicalID": 1054, - "state": 1, + "logicalID": 1051, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5668,7 +5668,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/3" }, "lookupClasses": [ @@ -5682,8 +5682,8 @@ "scope": 0 }, { - "logicalID": 1055, - "state": 1, + "logicalID": 1049, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5703,7 +5703,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/4" }, "lookupClasses": [ @@ -5717,8 +5717,8 @@ "scope": 0 }, { - "logicalID": 1040, - "state": 1, + "logicalID": 1043, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5738,7 +5738,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/5" }, "lookupClasses": [ @@ -5753,7 +5753,7 @@ }, { "logicalID": 1041, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5773,7 +5773,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/6" }, "lookupClasses": [ @@ -5787,8 +5787,8 @@ "scope": 0 }, { - "logicalID": 1042, - "state": 1, + "logicalID": 1047, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5808,7 +5808,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/7" }, "lookupClasses": [ @@ -5822,8 +5822,8 @@ "scope": 0 }, { - "logicalID": 1043, - "state": 1, + "logicalID": 1042, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5843,7 +5843,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/8" }, "lookupClasses": [ @@ -5857,8 +5857,8 @@ "scope": 0 }, { - "logicalID": 1044, - "state": 1, + "logicalID": 1040, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5878,7 +5878,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/1" }, "lookupClasses": [ @@ -5892,8 +5892,8 @@ "scope": 0 }, { - "logicalID": 1045, - "state": 1, + "logicalID": 1046, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5913,7 +5913,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/2" }, "lookupClasses": [ @@ -5927,8 +5927,8 @@ "scope": 0 }, { - "logicalID": 1046, - "state": 1, + "logicalID": 1045, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5948,7 +5948,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/3" }, "lookupClasses": [ @@ -5962,8 +5962,8 @@ "scope": 0 }, { - "logicalID": 1047, - "state": 1, + "logicalID": 1044, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5983,7 +5983,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/4" }, "lookupClasses": [ @@ -5997,8 +5997,8 @@ "scope": 0 }, { - "logicalID": 1032, - "state": 1, + "logicalID": 1036, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6018,7 +6018,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/5" }, "lookupClasses": [ @@ -6032,8 +6032,8 @@ "scope": 0 }, { - "logicalID": 1033, - "state": 1, + "logicalID": 1037, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6053,7 +6053,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/6" }, "lookupClasses": [ @@ -6067,8 +6067,8 @@ "scope": 0 }, { - "logicalID": 1034, - "state": 1, + "logicalID": 1038, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6088,7 +6088,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/7" }, "lookupClasses": [ @@ -6102,8 +6102,8 @@ "scope": 0 }, { - "logicalID": 1035, - "state": 1, + "logicalID": 1032, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6123,7 +6123,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/8" }, "lookupClasses": [ @@ -6137,8 +6137,8 @@ "scope": 0 }, { - "logicalID": 1036, - "state": 1, + "logicalID": 1039, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6158,7 +6158,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/1" }, "lookupClasses": [ @@ -6172,8 +6172,8 @@ "scope": 0 }, { - "logicalID": 1037, - "state": 1, + "logicalID": 1033, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6193,7 +6193,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/2" }, "lookupClasses": [ @@ -6207,8 +6207,8 @@ "scope": 0 }, { - "logicalID": 1038, - "state": 1, + "logicalID": 1035, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6228,7 +6228,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/3" }, "lookupClasses": [ @@ -6242,8 +6242,8 @@ "scope": 0 }, { - "logicalID": 1039, - "state": 1, + "logicalID": 1034, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6263,7 +6263,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/4" }, "lookupClasses": [ @@ -6277,8 +6277,8 @@ "scope": 0 }, { - "logicalID": 1024, - "state": 1, + "logicalID": 1028, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6298,7 +6298,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/5" }, "lookupClasses": [ @@ -6312,8 +6312,8 @@ "scope": 0 }, { - "logicalID": 1025, - "state": 1, + "logicalID": 1029, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6333,7 +6333,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/6" }, "lookupClasses": [ @@ -6347,8 +6347,8 @@ "scope": 0 }, { - "logicalID": 1026, - "state": 1, + "logicalID": 1030, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6368,7 +6368,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/7" }, "lookupClasses": [ @@ -6382,8 +6382,8 @@ "scope": 0 }, { - "logicalID": 1027, - "state": 1, + "logicalID": 1024, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6403,7 +6403,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/8" }, "lookupClasses": [ @@ -6417,8 +6417,8 @@ "scope": 0 }, { - "logicalID": 1028, - "state": 1, + "logicalID": 1026, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6438,7 +6438,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/1" }, "lookupClasses": [ @@ -6452,8 +6452,8 @@ "scope": 0 }, { - "logicalID": 1029, - "state": 1, + "logicalID": 1031, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6473,7 +6473,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/2" }, "lookupClasses": [ @@ -6487,8 +6487,8 @@ "scope": 0 }, { - "logicalID": 1030, - "state": 1, + "logicalID": 1027, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6508,7 +6508,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/3" }, "lookupClasses": [ @@ -6522,8 +6522,8 @@ "scope": 0 }, { - "logicalID": 1031, - "state": 1, + "logicalID": 1025, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6543,7 +6543,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/4" }, "lookupClasses": [ @@ -6768,7 +6768,7 @@ }, { "logicalID": 2055, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -6788,7 +6788,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/41/1" }, "lookupClasses": [ @@ -6803,7 +6803,7 @@ }, { "logicalID": 2056, - "state": 2, + "state": 1, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -6823,7 +6823,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "eth1/46/1" + }, "lookupClasses": [ @@ -6873,7 +6873,7 @@ }, { "logicalID": 2058, - "state": 2, + "state": 1, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -6893,7 +6893,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "eth1/45/1" + }, "lookupClasses": [ @@ -7502,8 +7502,8 @@ "scope": 1 }, { - "logicalID": 3160, - "state": 1, + "logicalID": 3162, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7523,7 +7523,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/5" }, "lookupClasses": [ @@ -7537,8 +7537,8 @@ "scope": 0 }, { - "logicalID": 3161, - "state": 1, + "logicalID": 3163, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7558,7 +7558,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/6" }, "lookupClasses": [ @@ -7572,8 +7572,8 @@ "scope": 0 }, { - "logicalID": 3162, - "state": 1, + "logicalID": 3160, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7593,7 +7593,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/7" }, "lookupClasses": [ @@ -7607,8 +7607,8 @@ "scope": 0 }, { - "logicalID": 3163, - "state": 1, + "logicalID": 3161, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7628,7 +7628,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/8" }, "lookupClasses": [ @@ -7642,8 +7642,8 @@ "scope": 0 }, { - "logicalID": 3164, - "state": 1, + "logicalID": 3165, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7663,7 +7663,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/1" }, "lookupClasses": [ @@ -7677,8 +7677,8 @@ "scope": 0 }, { - "logicalID": 3165, - "state": 1, + "logicalID": 3167, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7698,7 +7698,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/2" }, "lookupClasses": [ @@ -7713,7 +7713,7 @@ }, { "logicalID": 3166, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7733,7 +7733,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/3" }, "lookupClasses": [ @@ -7747,8 +7747,8 @@ "scope": 0 }, { - "logicalID": 3167, - "state": 1, + "logicalID": 3164, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7768,7 +7768,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/4" }, "lookupClasses": [ @@ -7782,8 +7782,8 @@ "scope": 0 }, { - "logicalID": 3152, - "state": 1, + "logicalID": 3154, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7803,7 +7803,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/5" }, "lookupClasses": [ @@ -7817,8 +7817,8 @@ "scope": 0 }, { - "logicalID": 3153, - "state": 1, + "logicalID": 3155, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7838,7 +7838,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/6" }, "lookupClasses": [ @@ -7852,8 +7852,8 @@ "scope": 0 }, { - "logicalID": 3154, - "state": 1, + "logicalID": 3152, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7873,7 +7873,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/7" }, "lookupClasses": [ @@ -7887,8 +7887,8 @@ "scope": 0 }, { - "logicalID": 3155, - "state": 1, + "logicalID": 3153, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7908,7 +7908,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/8" }, "lookupClasses": [ @@ -7922,8 +7922,8 @@ "scope": 0 }, { - "logicalID": 3156, - "state": 1, + "logicalID": 3157, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7943,7 +7943,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/1" }, "lookupClasses": [ @@ -7957,8 +7957,8 @@ "scope": 0 }, { - "logicalID": 3157, - "state": 1, + "logicalID": 3159, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7978,7 +7978,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/2" }, "lookupClasses": [ @@ -7993,7 +7993,7 @@ }, { "logicalID": 3158, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8013,7 +8013,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/3" }, "lookupClasses": [ @@ -8027,8 +8027,8 @@ "scope": 0 }, { - "logicalID": 3159, - "state": 1, + "logicalID": 3156, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8048,7 +8048,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/4" }, "lookupClasses": [ @@ -8062,8 +8062,8 @@ "scope": 0 }, { - "logicalID": 3184, - "state": 1, + "logicalID": 3186, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8083,7 +8083,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/5" }, "lookupClasses": [ @@ -8097,8 +8097,8 @@ "scope": 0 }, { - "logicalID": 3185, - "state": 1, + "logicalID": 3187, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8118,7 +8118,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/6" }, "lookupClasses": [ @@ -8132,8 +8132,8 @@ "scope": 0 }, { - "logicalID": 3186, - "state": 1, + "logicalID": 3184, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8153,7 +8153,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/7" }, "lookupClasses": [ @@ -8167,8 +8167,8 @@ "scope": 0 }, { - "logicalID": 3187, - "state": 1, + "logicalID": 3185, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8188,7 +8188,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/8" }, "lookupClasses": [ @@ -8202,8 +8202,8 @@ "scope": 0 }, { - "logicalID": 3188, - "state": 1, + "logicalID": 3189, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8223,7 +8223,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/1" }, "lookupClasses": [ @@ -8237,8 +8237,8 @@ "scope": 0 }, { - "logicalID": 3189, - "state": 1, + "logicalID": 3191, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8258,7 +8258,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/2" }, "lookupClasses": [ @@ -8272,8 +8272,8 @@ "scope": 0 }, { - "logicalID": 3190, - "state": 1, + "logicalID": 3188, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8293,7 +8293,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/3" }, "lookupClasses": [ @@ -8307,8 +8307,8 @@ "scope": 0 }, { - "logicalID": 3191, - "state": 1, + "logicalID": 3190, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8328,7 +8328,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/4" }, "lookupClasses": [ @@ -8342,8 +8342,8 @@ "scope": 0 }, { - "logicalID": 3176, - "state": 1, + "logicalID": 3181, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8363,7 +8363,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/5" }, "lookupClasses": [ @@ -8377,8 +8377,8 @@ "scope": 0 }, { - "logicalID": 3177, - "state": 1, + "logicalID": 3180, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8398,7 +8398,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/6" }, "lookupClasses": [ @@ -8412,8 +8412,8 @@ "scope": 0 }, { - "logicalID": 3178, - "state": 1, + "logicalID": 3176, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8433,7 +8433,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/7" }, "lookupClasses": [ @@ -8447,8 +8447,8 @@ "scope": 0 }, { - "logicalID": 3179, - "state": 1, + "logicalID": 3182, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8468,7 +8468,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/8" }, "lookupClasses": [ @@ -8482,8 +8482,8 @@ "scope": 0 }, { - "logicalID": 3180, - "state": 1, + "logicalID": 3183, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8503,7 +8503,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/1" }, "lookupClasses": [ @@ -8517,8 +8517,8 @@ "scope": 0 }, { - "logicalID": 3181, - "state": 1, + "logicalID": 3178, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8538,7 +8538,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/2" }, "lookupClasses": [ @@ -8552,8 +8552,8 @@ "scope": 0 }, { - "logicalID": 3182, - "state": 1, + "logicalID": 3179, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8573,7 +8573,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/3" }, "lookupClasses": [ @@ -8587,8 +8587,8 @@ "scope": 0 }, { - "logicalID": 3183, - "state": 1, + "logicalID": 3177, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8608,7 +8608,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/4" }, "lookupClasses": [ @@ -8622,8 +8622,8 @@ "scope": 0 }, { - "logicalID": 3168, - "state": 1, + "logicalID": 3175, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8643,7 +8643,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/5" }, "lookupClasses": [ @@ -8657,8 +8657,8 @@ "scope": 0 }, { - "logicalID": 3169, - "state": 1, + "logicalID": 3173, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8678,7 +8678,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/6" }, "lookupClasses": [ @@ -8692,8 +8692,8 @@ "scope": 0 }, { - "logicalID": 3170, - "state": 1, + "logicalID": 3174, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8713,7 +8713,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/7" }, "lookupClasses": [ @@ -8727,8 +8727,8 @@ "scope": 0 }, { - "logicalID": 3171, - "state": 1, + "logicalID": 3172, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8748,7 +8748,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/8" }, "lookupClasses": [ @@ -8762,8 +8762,8 @@ "scope": 0 }, { - "logicalID": 3172, - "state": 1, + "logicalID": 3170, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8783,7 +8783,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/1" }, "lookupClasses": [ @@ -8797,8 +8797,8 @@ "scope": 0 }, { - "logicalID": 3173, - "state": 1, + "logicalID": 3168, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8818,7 +8818,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/2" }, "lookupClasses": [ @@ -8832,8 +8832,8 @@ "scope": 0 }, { - "logicalID": 3174, - "state": 1, + "logicalID": 3169, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8853,7 +8853,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/3" }, "lookupClasses": [ @@ -8867,8 +8867,8 @@ "scope": 0 }, { - "logicalID": 3175, - "state": 1, + "logicalID": 3171, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8888,7 +8888,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/4" }, "lookupClasses": [ @@ -8902,8 +8902,8 @@ "scope": 0 }, { - "logicalID": 3208, - "state": 1, + "logicalID": 3211, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8923,7 +8923,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/5" }, "lookupClasses": [ @@ -8937,8 +8937,8 @@ "scope": 0 }, { - "logicalID": 3209, - "state": 1, + "logicalID": 3210, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8958,7 +8958,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/6" }, "lookupClasses": [ @@ -8972,8 +8972,8 @@ "scope": 0 }, { - "logicalID": 3210, - "state": 1, + "logicalID": 3209, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8993,7 +8993,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/7" }, "lookupClasses": [ @@ -9007,8 +9007,8 @@ "scope": 0 }, { - "logicalID": 3211, - "state": 1, + "logicalID": 3208, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9028,7 +9028,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/8" }, "lookupClasses": [ @@ -9042,8 +9042,8 @@ "scope": 0 }, { - "logicalID": 3212, - "state": 1, + "logicalID": 3215, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9063,7 +9063,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/1" }, "lookupClasses": [ @@ -9078,7 +9078,7 @@ }, { "logicalID": 3213, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9098,7 +9098,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/2" }, "lookupClasses": [ @@ -9113,7 +9113,7 @@ }, { "logicalID": 3214, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9133,7 +9133,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/3" }, "lookupClasses": [ @@ -9147,8 +9147,8 @@ "scope": 0 }, { - "logicalID": 3215, - "state": 1, + "logicalID": 3212, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9168,7 +9168,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/4" }, "lookupClasses": [ @@ -9182,8 +9182,8 @@ "scope": 0 }, { - "logicalID": 3200, - "state": 1, + "logicalID": 3202, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9203,7 +9203,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/5" }, "lookupClasses": [ @@ -9217,8 +9217,8 @@ "scope": 0 }, { - "logicalID": 3201, - "state": 1, + "logicalID": 3203, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9238,7 +9238,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/6" }, "lookupClasses": [ @@ -9252,8 +9252,8 @@ "scope": 0 }, { - "logicalID": 3202, - "state": 1, + "logicalID": 3200, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9273,7 +9273,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/7" }, "lookupClasses": [ @@ -9287,8 +9287,8 @@ "scope": 0 }, { - "logicalID": 3203, - "state": 1, + "logicalID": 3201, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9308,7 +9308,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/8" }, "lookupClasses": [ @@ -9322,8 +9322,8 @@ "scope": 0 }, { - "logicalID": 3204, - "state": 1, + "logicalID": 3205, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9343,7 +9343,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/1" }, "lookupClasses": [ @@ -9357,8 +9357,8 @@ "scope": 0 }, { - "logicalID": 3205, - "state": 1, + "logicalID": 3207, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9378,7 +9378,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/2" }, "lookupClasses": [ @@ -9392,8 +9392,8 @@ "scope": 0 }, { - "logicalID": 3206, - "state": 1, + "logicalID": 3204, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9413,7 +9413,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/3" }, "lookupClasses": [ @@ -9427,8 +9427,8 @@ "scope": 0 }, { - "logicalID": 3207, - "state": 1, + "logicalID": 3206, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9448,7 +9448,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/4" }, "lookupClasses": [ @@ -9462,8 +9462,8 @@ "scope": 0 }, { - "logicalID": 3192, - "state": 1, + "logicalID": 3198, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9483,7 +9483,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/5" }, "lookupClasses": [ @@ -9497,8 +9497,8 @@ "scope": 0 }, { - "logicalID": 3193, - "state": 1, + "logicalID": 3192, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9518,7 +9518,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/6" }, "lookupClasses": [ @@ -9532,8 +9532,8 @@ "scope": 0 }, { - "logicalID": 3194, - "state": 1, + "logicalID": 3196, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9553,7 +9553,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/7" }, "lookupClasses": [ @@ -9567,8 +9567,8 @@ "scope": 0 }, { - "logicalID": 3195, - "state": 1, + "logicalID": 3197, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9588,7 +9588,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/8" }, "lookupClasses": [ @@ -9602,8 +9602,8 @@ "scope": 0 }, { - "logicalID": 3196, - "state": 1, + "logicalID": 3194, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9623,7 +9623,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/1" }, "lookupClasses": [ @@ -9637,8 +9637,8 @@ "scope": 0 }, { - "logicalID": 3197, - "state": 1, + "logicalID": 3193, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9658,7 +9658,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/2" }, "lookupClasses": [ @@ -9672,8 +9672,8 @@ "scope": 0 }, { - "logicalID": 3198, - "state": 1, + "logicalID": 3195, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9693,7 +9693,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/3" }, "lookupClasses": [ @@ -9708,7 +9708,7 @@ }, { "logicalID": 3199, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9728,7 +9728,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/4" }, "lookupClasses": [ @@ -9742,8 +9742,8 @@ "scope": 0 }, { - "logicalID": 3216, - "state": 1, + "logicalID": 3218, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9763,7 +9763,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/5" }, "lookupClasses": [ @@ -9777,8 +9777,8 @@ "scope": 0 }, { - "logicalID": 3217, - "state": 1, + "logicalID": 3219, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9798,7 +9798,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/6" }, "lookupClasses": [ @@ -9812,8 +9812,8 @@ "scope": 0 }, { - "logicalID": 3218, - "state": 1, + "logicalID": 3221, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9833,7 +9833,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/7" }, "lookupClasses": [ @@ -9847,8 +9847,8 @@ "scope": 0 }, { - "logicalID": 3219, - "state": 1, + "logicalID": 3223, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9868,7 +9868,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/8" }, "lookupClasses": [ @@ -9883,7 +9883,7 @@ }, { "logicalID": 3220, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9903,7 +9903,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/1" }, "lookupClasses": [ @@ -9917,8 +9917,8 @@ "scope": 0 }, { - "logicalID": 3221, - "state": 1, + "logicalID": 3217, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9938,7 +9938,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/2" }, "lookupClasses": [ @@ -9953,7 +9953,7 @@ }, { "logicalID": 3222, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9973,7 +9973,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/3" }, "lookupClasses": [ @@ -9987,8 +9987,8 @@ "scope": 0 }, { - "logicalID": 3223, - "state": 1, + "logicalID": 3216, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10008,7 +10008,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/4" }, "lookupClasses": [ @@ -10022,8 +10022,8 @@ "scope": 0 }, { - "logicalID": 3224, - "state": 1, + "logicalID": 3227, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10043,7 +10043,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/5" }, "lookupClasses": [ @@ -10057,8 +10057,8 @@ "scope": 0 }, { - "logicalID": 3225, - "state": 1, + "logicalID": 3231, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10078,7 +10078,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/6" }, "lookupClasses": [ @@ -10093,7 +10093,7 @@ }, { "logicalID": 3226, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10113,7 +10113,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/7" }, "lookupClasses": [ @@ -10127,8 +10127,8 @@ "scope": 0 }, { - "logicalID": 3227, - "state": 1, + "logicalID": 3225, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10148,7 +10148,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/8" }, "lookupClasses": [ @@ -10163,7 +10163,7 @@ }, { "logicalID": 3228, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10183,7 +10183,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/1" }, "lookupClasses": [ @@ -10198,7 +10198,7 @@ }, { "logicalID": 3229, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10218,7 +10218,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/2" }, "lookupClasses": [ @@ -10233,7 +10233,7 @@ }, { "logicalID": 3230, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10253,7 +10253,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/3" }, "lookupClasses": [ @@ -10267,8 +10267,8 @@ "scope": 0 }, { - "logicalID": 3231, - "state": 1, + "logicalID": 3224, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10288,7 +10288,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/4" }, "lookupClasses": [ @@ -10302,8 +10302,8 @@ "scope": 0 }, { - "logicalID": 3144, - "state": 1, + "logicalID": 3147, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10323,7 +10323,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/5" }, "lookupClasses": [ @@ -10337,8 +10337,8 @@ "scope": 0 }, { - "logicalID": 3145, - "state": 1, + "logicalID": 3148, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10358,7 +10358,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/6" }, "lookupClasses": [ @@ -10372,8 +10372,8 @@ "scope": 0 }, { - "logicalID": 3146, - "state": 1, + "logicalID": 3145, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10393,7 +10393,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/7" }, "lookupClasses": [ @@ -10407,8 +10407,8 @@ "scope": 0 }, { - "logicalID": 3147, - "state": 1, + "logicalID": 3144, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10428,7 +10428,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/8" }, "lookupClasses": [ @@ -10442,8 +10442,8 @@ "scope": 0 }, { - "logicalID": 3148, - "state": 1, + "logicalID": 3150, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10463,7 +10463,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/1" }, "lookupClasses": [ @@ -10477,8 +10477,8 @@ "scope": 0 }, { - "logicalID": 3149, - "state": 1, + "logicalID": 3151, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10498,7 +10498,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/2" }, "lookupClasses": [ @@ -10512,8 +10512,8 @@ "scope": 0 }, { - "logicalID": 3150, - "state": 1, + "logicalID": 3149, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10533,7 +10533,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/3" }, "lookupClasses": [ @@ -10547,8 +10547,8 @@ "scope": 0 }, { - "logicalID": 3151, - "state": 1, + "logicalID": 3146, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10568,7 +10568,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/4" }, "lookupClasses": [ @@ -10582,7 +10582,7 @@ "scope": 0 }, { - "logicalID": 3120, + "logicalID": 3124, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10617,7 +10617,7 @@ "scope": 0 }, { - "logicalID": 3121, + "logicalID": 3126, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10652,7 +10652,7 @@ "scope": 0 }, { - "logicalID": 3122, + "logicalID": 3127, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10687,7 +10687,7 @@ "scope": 0 }, { - "logicalID": 3123, + "logicalID": 3125, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10722,7 +10722,7 @@ "scope": 0 }, { - "logicalID": 3124, + "logicalID": 3121, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10757,7 +10757,7 @@ "scope": 0 }, { - "logicalID": 3125, + "logicalID": 3120, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10792,7 +10792,7 @@ "scope": 0 }, { - "logicalID": 3126, + "logicalID": 3123, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10827,7 +10827,7 @@ "scope": 0 }, { - "logicalID": 3127, + "logicalID": 3122, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10862,7 +10862,7 @@ "scope": 0 }, { - "logicalID": 3128, + "logicalID": 3134, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10897,7 +10897,7 @@ "scope": 0 }, { - "logicalID": 3129, + "logicalID": 3132, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10932,7 +10932,7 @@ "scope": 0 }, { - "logicalID": 3130, + "logicalID": 3133, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10967,7 +10967,7 @@ "scope": 0 }, { - "logicalID": 3131, + "logicalID": 3135, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11002,7 +11002,7 @@ "scope": 0 }, { - "logicalID": 3132, + "logicalID": 3128, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11037,7 +11037,7 @@ "scope": 0 }, { - "logicalID": 3133, + "logicalID": 3131, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11072,7 +11072,7 @@ "scope": 0 }, { - "logicalID": 3134, + "logicalID": 3130, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11107,7 +11107,7 @@ "scope": 0 }, { - "logicalID": 3135, + "logicalID": 3129, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11142,8 +11142,8 @@ "scope": 0 }, { - "logicalID": 3136, - "state": 1, + "logicalID": 3139, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11163,7 +11163,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/5" }, "lookupClasses": [ @@ -11177,8 +11177,8 @@ "scope": 0 }, { - "logicalID": 3137, - "state": 1, + "logicalID": 3143, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11198,7 +11198,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/6" }, "lookupClasses": [ @@ -11212,8 +11212,8 @@ "scope": 0 }, { - "logicalID": 3138, - "state": 1, + "logicalID": 3137, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11233,7 +11233,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/7" }, "lookupClasses": [ @@ -11247,8 +11247,8 @@ "scope": 0 }, { - "logicalID": 3139, - "state": 1, + "logicalID": 3138, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11268,7 +11268,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/8" }, "lookupClasses": [ @@ -11283,7 +11283,7 @@ }, { "logicalID": 3140, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11303,7 +11303,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/35/1" }, "lookupClasses": [ @@ -11318,7 +11318,7 @@ }, { "logicalID": 3141, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11338,7 +11338,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/35/2" }, "lookupClasses": [ @@ -11353,7 +11353,7 @@ }, { "logicalID": 3142, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11373,7 +11373,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/35/3" }, "lookupClasses": [ @@ -11387,8 +11387,8 @@ "scope": 0 }, { - "logicalID": 3143, - "state": 1, + "logicalID": 3136, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11408,7 +11408,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/35/4" }, "lookupClasses": [ @@ -11422,8 +11422,8 @@ "scope": 0 }, { - "logicalID": 3112, - "state": 1, + "logicalID": 3118, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11443,7 +11443,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/5" }, "lookupClasses": [ @@ -11457,8 +11457,8 @@ "scope": 0 }, { - "logicalID": 3113, - "state": 1, + "logicalID": 3112, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11478,7 +11478,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/6" }, "lookupClasses": [ @@ -11492,8 +11492,8 @@ "scope": 0 }, { - "logicalID": 3114, - "state": 1, + "logicalID": 3117, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11513,7 +11513,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/7" }, "lookupClasses": [ @@ -11527,8 +11527,8 @@ "scope": 0 }, { - "logicalID": 3115, - "state": 1, + "logicalID": 3114, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11548,7 +11548,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/8" }, "lookupClasses": [ @@ -11562,7 +11562,7 @@ "scope": 0 }, { - "logicalID": 3116, + "logicalID": 3113, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11597,7 +11597,7 @@ "scope": 0 }, { - "logicalID": 3117, + "logicalID": 3116, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11632,7 +11632,7 @@ "scope": 0 }, { - "logicalID": 3118, + "logicalID": 3119, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11667,7 +11667,7 @@ "scope": 0 }, { - "logicalID": 3119, + "logicalID": 3115, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11702,7 +11702,7 @@ "scope": 0 }, { - "logicalID": 3104, + "logicalID": 3110, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11737,7 +11737,7 @@ "scope": 0 }, { - "logicalID": 3105, + "logicalID": 3108, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11772,7 +11772,7 @@ "scope": 0 }, { - "logicalID": 3106, + "logicalID": 3109, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11807,7 +11807,7 @@ "scope": 0 }, { - "logicalID": 3107, + "logicalID": 3111, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11842,7 +11842,7 @@ "scope": 0 }, { - "logicalID": 3108, + "logicalID": 3104, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11877,7 +11877,7 @@ "scope": 0 }, { - "logicalID": 3109, + "logicalID": 3105, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11912,7 +11912,7 @@ "scope": 0 }, { - "logicalID": 3110, + "logicalID": 3106, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11947,7 +11947,7 @@ "scope": 0 }, { - "logicalID": 3111, + "logicalID": 3107, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11982,7 +11982,7 @@ "scope": 0 }, { - "logicalID": 3096, + "logicalID": 3100, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12017,7 +12017,7 @@ "scope": 0 }, { - "logicalID": 3097, + "logicalID": 3102, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12052,7 +12052,7 @@ "scope": 0 }, { - "logicalID": 3098, + "logicalID": 3103, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12087,7 +12087,7 @@ "scope": 0 }, { - "logicalID": 3099, + "logicalID": 3101, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12122,7 +12122,7 @@ "scope": 0 }, { - "logicalID": 3100, + "logicalID": 3097, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12157,7 +12157,7 @@ "scope": 0 }, { - "logicalID": 3101, + "logicalID": 3096, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12192,7 +12192,7 @@ "scope": 0 }, { - "logicalID": 3102, + "logicalID": 3098, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12227,7 +12227,7 @@ "scope": 0 }, { - "logicalID": 3103, + "logicalID": 3099, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12262,7 +12262,7 @@ "scope": 0 }, { - "logicalID": 3088, + "logicalID": 3090, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12332,7 +12332,7 @@ "scope": 0 }, { - "logicalID": 3090, + "logicalID": 3094, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12402,7 +12402,7 @@ "scope": 0 }, { - "logicalID": 3092, + "logicalID": 3088, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12437,7 +12437,7 @@ "scope": 0 }, { - "logicalID": 3093, + "logicalID": 3095, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12472,7 +12472,7 @@ "scope": 0 }, { - "logicalID": 3094, + "logicalID": 3092, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12507,7 +12507,7 @@ "scope": 0 }, { - "logicalID": 3095, + "logicalID": 3093, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -13137,7 +13137,7 @@ "scope": 1 }, { - "intfID": 2066, + "intfID": 18, "routerID": 0, "vlanID": 0, "ipAddresses": [ @@ -13151,7 +13151,7 @@ "scope": 1 }, { - "intfID": 2068, + "intfID": 19, "routerID": 0, "vlanID": 0, "ipAddresses": [ @@ -13163,6 +13163,34 @@ "isStateSyncDisabled": true, "type": 2, "scope": 1 + }, + { + "intfID": 20, + "routerID": 0, + "vlanID": 0, + "ipAddresses": [ + "2402::/64", + "12.0.0.0/24" + ], + "mtu": 9000, + "isVirtual": false, + "isStateSyncDisabled": true, + "type": 2, + "scope": 1 + }, + { + "intfID": 21, + "routerID": 0, + "vlanID": 0, + "ipAddresses": [ + "2403::/64", + "13.0.0.0/24" + ], + "mtu": 9000, + "isVirtual": false, + "isStateSyncDisabled": true, + "type": 2, + "scope": 1 } ], "arpTimeoutSeconds": 60, @@ -13219,6 +13247,56 @@ "actionType": 1, "etherType": 34525 }, + { + "icmpType": 133, + "name": "cpuPolicing-high-ndp-router-solicit", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 134, + "name": "cpuPolicing-high-ndp-router-advertisement", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 135, + "name": "cpuPolicing-high-ndp-neighbor-solicit", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 136, + "name": "cpuPolicing-high-ndp-neighbor-advertisement", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 137, + "name": "cpuPolicing-high-ndp-redirect", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, { "proto": 6, "name": "cpuPolicing-high-BGPSrcPort-dstLocalIp4", @@ -13412,6 +13490,66 @@ } } }, + { + "matcher": "cpuPolicing-high-ndp-router-solicit", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 0, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-router-advertisement", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 0, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-neighbor-solicit", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 0, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-neighbor-advertisement", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 0, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-redirect", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 0, + "setTc": { + "tcValue": 7 + } + } + }, { "matcher": "cpuPolicing-high-BGPSrcPort-dstLocalIp4", "action": { @@ -13559,10 +13697,6 @@ ] }, "rxReasonToQueueOrderedList": [ - { - "rxReason": 8, - "queueId": 7 - }, { "rxReason": 2, "queueId": 2 @@ -13574,10 +13708,6 @@ { "rxReason": 6, "queueId": 0 - }, - { - "rxReason": 14, - "queueId": 0 } ] }, @@ -13862,7 +13992,7 @@ "sai_pkt_rx_custom_cfg": "1", "sai_pkt_rx_pkt_size": "16512", "sai_recycle_port_lane_base": "440", - "sai_trigger_linkscan_remote_local_faults": "0", + "sai_trigger_linkscan_remote_local_faults": "1", "sai_voq_wm_latency_enable": "1", "sat_enable.BCM8889X_ADAPTER": "1", "soc_family.BCM8889X": "BCM8889X", diff --git a/fboss/oss/link_test_configs/meru800bia.materialized_JSON b/fboss/oss/link_test_configs/meru800bia.materialized_JSON index 5ffe8161e60ad..fd8f9b650219d 100644 --- a/fboss/oss/link_test_configs/meru800bia.materialized_JSON +++ b/fboss/oss/link_test_configs/meru800bia.materialized_JSON @@ -7337,6 +7337,56 @@ "actionType": 1, "etherType": 34525 }, + { + "icmpType": 133, + "name": "cpuPolicing-high-ndp-router-solicit", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 134, + "name": "cpuPolicing-high-ndp-router-advertisement", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 135, + "name": "cpuPolicing-high-ndp-neighbor-solicit", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 136, + "name": "cpuPolicing-high-ndp-neighbor-advertisement", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 137, + "name": "cpuPolicing-high-ndp-redirect", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, { "proto": 6, "name": "cpuPolicing-high-BGPSrcPort-dstLocalIp4", @@ -7548,6 +7598,66 @@ } } }, + { + "matcher": "cpuPolicing-high-ndp-router-solicit", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 1, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-router-advertisement", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 1, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-neighbor-solicit", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 1, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-neighbor-advertisement", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 1, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-redirect", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 1, + "setTc": { + "tcValue": 7 + } + } + }, { "matcher": "cpuPolicing-high-BGPSrcPort-dstLocalIp4", "action": { @@ -7695,10 +7805,6 @@ ] }, "rxReasonToQueueOrderedList": [ - { - "rxReason": 8, - "queueId": 7 - }, { "rxReason": 2, "queueId": 3 @@ -7710,10 +7816,6 @@ { "rxReason": 6, "queueId": 0 - }, - { - "rxReason": 14, - "queueId": 0 } ] }, @@ -7870,9 +7972,6 @@ "fabric_connectivity_based_on_integrity": "0", "fabric_distributed_system_enable": "1", "fail_on_unsupported_attribute": "1", - "fw_auto_isolation_arm_core_to_use.0": "5", - "fw_auto_isolation_image_filename.0": "/tmp/db/jericho3ai_a0/BCM8889X_fi.elf", - "fw_auto_isolation_log_filename.0": "/tmp/edk_fi.log", "l3_ecmp_max_group_size": "512", "lane_to_serdes_map_fabric_lane0.BCM8889X": "rx0:tx5", "lane_to_serdes_map_fabric_lane1.BCM8889X": "rx1:tx3", @@ -8915,7 +9014,7 @@ "sai_pkt_rx_custom_cfg": "1", "sai_pkt_rx_pkt_size": "16512", "sai_recycle_port_lane_base": "440", - "sai_trigger_linkscan_remote_local_faults": "0", + "sai_trigger_linkscan_remote_local_faults": "1", "sai_voq_wm_latency_enable": "1", "sat_enable.BCM8889X_ADAPTER": "1", "soc_family.BCM8889X": "BCM8889X", diff --git a/fboss/oss/link_test_configs/tahan800bc.materialized_JSON b/fboss/oss/link_test_configs/tahan800bc.materialized_JSON index b85b57f569d1b..612627993b6c2 100644 --- a/fboss/oss/link_test_configs/tahan800bc.materialized_JSON +++ b/fboss/oss/link_test_configs/tahan800bc.materialized_JSON @@ -2252,7 +2252,7 @@ }, { "logicalID": 65, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -2272,7 +2272,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/33/1" }, "lookupClasses": [ From 61b471ac158a91df57981cfadff38adcea7a5f46 Mon Sep 17 00:00:00 2001 From: Ruinan Hu Date: Wed, 23 Oct 2024 02:06:31 -0700 Subject: [PATCH 265/479] enable snooping on arp test Summary: As titled Created from CodeHub with https://fburl.com/edit-in-codehub Reviewed By: daiwei1983 Differential Revision: D64709291 fbshipit-source-id: 29f30ab01142f6def3420637c3a3fdfef625d959 --- fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp b/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp index b627890ef6749..ef43b1655b7b4 100644 --- a/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp @@ -429,7 +429,7 @@ class AgentCoppTest : public AgentHwTest { folly::IPAddress("1.1.1.2"), dstIpAddress, arpType); - sendPkt(std::move(txPacket), outOfPort); + sendPkt(std::move(txPacket), outOfPort, true /*snoopAndVerify*/); } } From 8ace4feee1a9e0c03f4e29758222466c38d749c6 Mon Sep 17 00:00:00 2001 From: genkzgnluxbjeyb Date: Wed, 23 Oct 2024 02:39:43 -0700 Subject: [PATCH 266/479] fboss_hw_known_bad_tests_sync Differential Revision: D64817338 fbshipit-source-id: 8a97ed7aa51c156687faaa244c69cc9a39297d7d --- .../sai_known_bad_tests.materialized_JSON | 465 ++---------------- 1 file changed, 50 insertions(+), 415 deletions(-) diff --git a/fboss/oss/hw_known_bad_tests/sai_known_bad_tests.materialized_JSON b/fboss/oss/hw_known_bad_tests/sai_known_bad_tests.materialized_JSON index deb5981ef2174..b084155782959 100644 --- a/fboss/oss/hw_known_bad_tests/sai_known_bad_tests.materialized_JSON +++ b/fboss/oss/hw_known_bad_tests/sai_known_bad_tests.materialized_JSON @@ -286,6 +286,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.warm_boot_for_warm_boot.0.HwEmptyTest.CheckInit.SaiAclTableGroupTest.AddTablesThenEntries" }, @@ -888,6 +891,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "HwFlexPortTest.FlexPortTWOX50G" }, @@ -2161,6 +2167,9 @@ { "test_name_regex": "HwIngressBufferTest.validatePGQueueChanges" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "HwWideEcmpTest.WideUcmp.*" } @@ -2451,6 +2460,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.warm_boot_for_warm_boot.0.HwEmptyTest.CheckInit.SaiAclTableGroupTest.AddTablesThenEntries" }, @@ -2987,6 +2999,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "HwFlexPortTest.FlexPortTWOX50G" }, @@ -3187,12 +3202,18 @@ { "test_name_regex": "HwTrafficPfcTest/HwTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "warm_boot.HwTrafficPfcTest.PfcWatchdog" }, { "test_name_regex": "warm_boot.HwVerifyPfcConfigInHwTest.PfcWatchdogProgrammingSequence" }, + { + "test_name_regex": "warm_boot.HwParityErrorTest.verifyParityError" + }, { "test_name_regex": "HwAqmTest.verifyEcnTrafficNoDrop" } @@ -3324,12 +3345,18 @@ { "test_name_regex": "HwTrafficPfcTest/HwTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "warm_boot.HwTrafficPfcTest.PfcWatchdog" }, { "test_name_regex": "warm_boot.HwVerifyPfcConfigInHwTest.PfcWatchdogProgrammingSequence" }, + { + "test_name_regex": "warm_boot.HwParityErrorTest.verifyParityError" + }, { "test_name_regex": "HwAqmTest.verifyEcnTrafficNoDrop" } @@ -4943,6 +4970,9 @@ }, { "test_name_regex": "HwIngressBufferTest.validatePGQueueChanges" + }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" } ], "brcm/8.2.0.0_odp/8.2.0.0_odp/tomahawk4": [ @@ -5231,6 +5261,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.warm_boot_for_warm_boot.0.HwEmptyTest.CheckInit.SaiAclTableGroupTest.AddTablesThenEntries" }, @@ -6639,6 +6672,9 @@ { "test_name_regex": "HwIngressBufferTest.validatePGQueueChanges" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "HwTrafficPfcTest.*" }, @@ -6950,6 +6986,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.warm_boot_for_warm_boot.0.HwEmptyTest.CheckInit.SaiAclTableGroupTest.AddTablesThenEntries" }, @@ -7510,6 +7549,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.warm_boot_for_warm_boot.0.HwEmptyTest.CheckInit.SaiAclTableGroupTest.AddTablesThenEntries" }, @@ -8960,6 +9002,9 @@ { "test_name_regex": "HwIngressBufferTest.validatePGQueueChanges" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "HwWideEcmpTest.WideUcmp.*" } @@ -9250,6 +9295,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.warm_boot_for_warm_boot.0.HwEmptyTest.CheckInit.SaiAclTableGroupTest.AddTablesThenEntries" }, @@ -12473,383 +12521,6 @@ "test_name_regex": "HwCoppTest/[01].CpuPortIpv6LinkLocalUcastIp$" } ], - "leaba/24.6.1_yuba/24.6.1_yuba/graphene200": [ - { - "test_name_regex": "HwProdInvariantsMmuLosslessTest.*" - }, - { - "test_name_regex": "HwCoppTest/[01].EapolToHighPriQ" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclIcmp4Qualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclIcmp6Qualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclIp4TcpQualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclIp6TcpQualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclModifyQualifier$" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclEmptyCodeIcmp$" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclVlanIDQualifier$" - }, - { - "test_name_regex": "HwAclStatTest/[01].AclStatCreateShared$" - }, - { - "test_name_regex": "HwAclStatTest/[01].AclStatDeleteShared$" - }, - { - "test_name_regex": "HwAclStatTest/[01].AclStatRenameShared$" - }, - { - "test_name_regex": "HwAclQualifierTest.AclIcmp6Qualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest.AclIp4TcpQualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest.AclIp6TcpQualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest.AclModifyQualifier$" - }, - { - "test_name_regex": "HwAclQualifierTest.AclEmptyCodeIcmp$" - }, - { - "test_name_regex": "HwAclQualifierTest.AclVlanIDQualifier$" - }, - { - "test_name_regex": "HwAclStatTest.AclStatCreateShared$" - }, - { - "test_name_regex": "HwAclStatTest.AclStatDeleteShared$" - }, - { - "test_name_regex": "HwAclStatTest.AclStatRenameShared$" - }, - { - "test_name_regex": "SaiAclTableGroupTest.*$" - }, - { - "test_name_regex": "SaiAclTableGroupTrafficTest/[01].*$" - }, - { - "test_name_regex": "HwInDiscardsCounterTest.*$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest/1.ExceedMaxLabels$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest.*TunnelRefTest$" - }, - { - "test_name_regex": "HwL2ClassIDTest.*$" - }, - { - "test_name_regex": "HwCoppTest/[01].Ipv6LinkLocalUcastIpNetworkControlDscpToHighPriQ$" - }, - { - "test_name_regex": "HwCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" - }, - { - "test_name_regex": "HwCoppTest/[01].NdpAdvertisementToHighPriQ$" - }, - { - "test_name_regex": "HwCoppTest/[01].Ipv6LinkLocalUcastToMidPriQ$" - }, - { - "test_name_regex": "HwCoppTest/[01].UnresolvedRoutesToLowPriQueue$" - }, - { - "test_name_regex": "HwCoppTest/[01].NdpSolicitationToHighPriQ$" - }, - { - "test_name_regex": "HwCoppTest/1.JumboFramesToQueues$" - }, - { - "test_name_regex": "HwCoppTest/1.L3MTUErrorToLowPriQ$" - }, - { - "test_name_regex": "HwDscpMarkingTest.*$" - }, - { - "test_name_regex": "warm_boot.HwMacLearningTest.VerifyHwAgingForTrunk$" - }, - { - "test_name_regex": "HwMacLearningTest.VerifySwToHw.*$" - }, - { - "test_name_regex": "HwMacLearningTest.VerifyHwToSw.*$" - }, - { - "test_name_regex": "warm_boot.HwMacSwLearningModeTest.VerifyCallbacksOnMacEntryChange$" - }, - { - "test_name_regex": "HwMacLearningTest.VerifyMacLearningScale$" - }, - { - "test_name_regex": "HwMacLearningBatchEntriesTest.*$" - }, - { - "test_name_regex": "HwMacLearningMacMoveTest.VerifyMacMoveForPort$" - }, - { - "test_name_regex": "HwRouteScaleTest.turboFabricScaleTest$" - }, - { - "test_name_regex": "HwMmuTuningTest.*$" - }, - { - "test_name_regex": "HwCoppTest/0.JumboFramesToQueues$" - }, - { - "test_name_regex": "HwMirrorTest.*$" - }, - { - "test_name_regex": "HwPacketFloodTest.*$" - }, - { - "test_name_regex": "HwCoppQosTest.*$" - }, - { - "test_name_regex": "HwDataPlaneMirrorTest/[01].SpanAclMirror$" - }, - { - "test_name_regex": "HwDataPlaneMirrorTest/[01].ErspanAclMirror$" - }, - { - "test_name_regex": "warm_boot.HwTrunkTest.TrunkMemberPortDownMinLinksViolated$" - }, - { - "test_name_regex": "warm_boot.HwEcmpTrunkTest.TrunkL2ResolveNhopThenLinkDownThenUpThenStateUp$" - }, - { - "test_name_regex": "HwL3Test.*$" - }, - { - "test_name_regex": "warm_boot.HwAclStatTest/[01].AclStatDelete$" - }, - { - "test_name_regex": "warm_boot.HwAclStatTest/[01].AclStatRename$" - }, - { - "test_name_regex": "warm_boot.HwAclStatTest/[01].StatNumberOfCounters$" - }, - { - "test_name_regex": "warm_boot.HwAclStatTest.AclStatDelete$" - }, - { - "test_name_regex": "warm_boot.HwAclStatTest.AclStatRename$" - }, - { - "test_name_regex": "warm_boot.HwAclStatTest.StatNumberOfCounters$" - }, - { - "test_name_regex": "HwJumboFramesTest.SuperJumboFramesGetDropped$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest/1.OneLabel$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest/1.MaxLabels$" - }, - { - "test_name_regex": "HwMPLSTest/[0123].Pop2Cpu$" - }, - { - "test_name_regex": "HwMPLSTest/[0123].MplsMatchPktsNottrapped$" - }, - { - "test_name_regex": "HwMPLSTest/[0123].MplsNoMatchPktsToLowPriQ$" - }, - { - "test_name_regex": "HwLabelSwitchRouteTest/[01].EcmpModify$" - }, - { - "test_name_regex": "warm_boot.HwDataPlaneMirrorTest/[01].ErspanMirrorWithLagMember$" - }, - { - "test_name_regex": "HwDataPlaneMirrorTest/[01].TrucatePortErspanMirror$" - }, - { - "test_name_regex": "HwProdInvariantsFswTest.verifyInvariants$" - }, - { - "test_name_regex": "HwProdInvariantsRswMhnicTest.verifyInvariants$" - }, - { - "test_name_regex": "HwAclPriorityTest/[01].AclsChanged$" - }, - { - "test_name_regex": "HwHashPolarizationTest.*$" - }, - { - "test_name_regex": "HwHashTrunk[4|8]x[2|3]PolarizationTests.*$" - }, - { - "test_name_regex": "HwDiagShellStressTest.stressDiagCmds$" - }, - { - "test_name_regex": "HwCoppQueueStuckTest.CpuQueueHighRateTraffic$" - }, - { - "test_name_regex": "HwLabelSwitchRouteTest/[01].Swap2Php$" - }, - { - "test_name_regex": "HwSflowTest.SflowSamplingEnabled$" - }, - { - "test_name_regex": "warm_boot.HwSflowMirrorTest.VerifySampledPacketWithLagMemberAsEgressPort$" - }, - { - "test_name_regex": "HwMPLSTest/0.ExpiringTTL$" - }, - { - "test_name_regex": "HwMPLSTest/1.ExpiringTTL$" - }, - { - "test_name_regex": "HwMPLSTest/2.ExpiringTTL$" - }, - { - "test_name_regex": "HwMPLSTest/3.ExpiringTTL$" - }, - { - "test_name_regex": "HwCoppTest/[01].Ttl1PacketToLowPriQ$" - }, - { - "test_name_regex": "HwCoppTest/[01].DhcpPacketToMidPriQ$" - }, - { - "test_name_regex": "HwCoppTest/[01].NdpSolicitNeighbor$" - }, - { - "test_name_regex": "HwWatermarkTest.VerifyDeviceWatermark$" - }, - { - "test_name_regex": "warm_boot.HwEcmpTrunkTest.TrunkL2ResolveNhopThenLinkAndLACPDownThenUpBeforeReinit$" - }, - { - "test_name_regex": "HwMPLSTest/[01].AclRedirectToNexthop.*$" - }, - { - "test_name_regex": "HwMPLSTest/[01].punt2Cpu$" - }, - { - "test_name_regex": "HwSflowMirrorTest.VerifySampledPacketCount$" - }, - { - "test_name_regex": "HwHashConsistencyTest.*$" - }, - { - "test_name_regex": "HwPortBandwidthTest/HwPortBandwidthParamTest.VerifyPortRateTraffic/0$" - }, - { - "test_name_regex": "HwNeighborTest/0.LinkDownAndUpOnResolvedEntry$" - }, - { - "test_name_regex": "HwNeighborTest/0.LinkDownOnResolvedEntry$" - }, - { - "test_name_regex": "HwNeighborTest/0.ResolvePendingEntry$" - }, - { - "test_name_regex": "HwNeighborTest/0.ResolvePendingEntryThenChangeLookupClass$" - }, - { - "test_name_regex": "HwAclStatTest/[01].AclStatCreateMultiple$" - }, - { - "test_name_regex": "HwAclStatTest/[01].AclStatShuffle$" - }, - { - "test_name_regex": "HwAclStatTest/[01].AclStatDeleteSharedPostWarmBoot$" - }, - { - "test_name_regex": "HwAclStatTest.AclStatCreateMultiple$" - }, - { - "test_name_regex": "HwAclStatTest.AclStatShuffle$" - }, - { - "test_name_regex": "HwAclStatTest.AclStatDeleteSharedPostWarmBoot$" - }, - { - "test_name_regex": "HwVoqSwitchWithFabricPortsTest.fabricIsolate$" - }, - { - "test_name_regex": "HwCoppAclTest.*$" - }, - { - "test_name_regex": "SaiRouteRollbackTest.*WithTrunk.*$" - }, - { - "test_name_regex": "HwPortLedTest.TestLedFromSwitchState$" - }, - { - "test_name_regex": "HwMacLearningAndNeighborResolutionTest/[0-7].flapMacAndNeighbors$" - }, - { - "test_name_regex": "HwCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" - }, - { - "test_name_regex": "HwRouteTest/1.verifyCpuRouteChange$" - }, - { - "test_name_regex": "HwVoqSwitch*" - }, - { - "test_name_regex": "HwFabricSwitchTest.*" - }, - { - "test_name_regex": "HwUdfTest.*$" - }, - { - "test_name_regex": "HwIpInIpTunnelTest.*$" - }, - { - "test_name_regex": "warm_boot.HwMacLearningAndMyStationInteractionTest.verifyInteractionHwMacLearning$" - }, - { - "test_name_regex": "warm_boot.HwMacLearningAndMyStationInteractionTest.verifyInteractionSwMacLearning$" - }, - { - "test_name_regex": "HwPacketSendTest.PortTxEnableTest$" - }, - { - "test_name_regex": "warm_boot.HwOlympicQosSchedulerTest.VerifyWRRForOlympicToOlympicV2$" - }, - { - "test_name_regex": "warm_boot.HwOlympicQosSchedulerTest.VerifyOlympicV2AllSPTrafficToWRR$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest.*$" - }, - { - "test_name_regex": "HwLabelSwitchRouteTest.*$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest/0.ExceedMaxLabels$" - }, - { - "test_name_regex": "HwPortBandwidthTest.VerifyQueueShaper$" - }, - { - "test_name_regex": "SaiAclTableRecreateTests.AclEntryCount$" - }, - { - "test_name_regex": "HwCoppTest/[01].CpuPortIpv6LinkLocalUcastIp$" - } - ], "leaba/24.8.3001/24.8.3001/gibraltar": [ { "test_name_regex": "HwTrafficPfcTest.*" @@ -13215,46 +12886,10 @@ "test_name_regex": "HwFabricSwitchTest.*" }, { - "test_name_regex": "warm_boot.HwMacLearningAndMyStationInteractionTest.verifyInteractionHwMacLearning$" - }, - { - "test_name_regex": "warm_boot.HwMacLearningAndMyStationInteractionTest.verifyInteractionSwMacLearning$" - }, - { - "test_name_regex": "HwWatermarkTest.VerifyQueueWatermarkAccuracy$" - }, - { - "test_name_regex": "HwAqmTest.verifyWredThreshold$" - }, - { - "test_name_regex": "HwPacketSendTest.PortTxEnableTest$" - }, - { - "test_name_regex": "HwAqmTest.verifyPerQueueWredDropStats$" - }, - { - "test_name_regex": "warm_boot.HwOlympicQosSchedulerTest.VerifyWRRForOlympicToOlympicV2$" - }, - { - "test_name_regex": "warm_boot.HwOlympicQosSchedulerTest.VerifyOlympicV2AllSPTrafficToWRR$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest/0.ExceedMaxLabels" - }, - { - "test_name_regex": "HwPortBandwidthTest.VerifyQueueShaper" - }, - { - "test_name_regex": "SaiAclTableRecreateTests.AclEntryCount" - }, - { - "test_name_regex": "HwCoppTest/[01].CpuPortIpv6LinkLocalUcastIp" - }, - { - "test_name_regex": "HwMacLearningTest.VerifyHwLearningForPort" + "test_name_regex": "HwResourceStatsTest.l3Stats$" }, { - "test_name_regex": "HwMacLearningTest.VerifyHwLearningForTrunk" + "test_name_regex": "SaiAclTableRecreateTests.AclEntryCount$" } ] } From e7d45f48dc9b1cb648ceb3e73fc3eff2edacb8f9 Mon Sep 17 00:00:00 2001 From: Alex Hornby Date: Wed, 23 Oct 2024 02:56:47 -0700 Subject: [PATCH 267/479] sapling: disable flaky tests on github getdeps cli Summary: X-link: https://github.com/facebook/sapling/pull/973 X-link: https://github.com/facebookincubator/zstrong/pull/1017 * disable flaky tests as per comment in Makefile * fix Makefiles JOBS sed expression to be macOS make compatible * remove Makefile comment in multiline shell, macOS make didn't like it * remove hexdump from deps for macOS where it is a system util Reviewed By: quark-zju Differential Revision: D64781284 fbshipit-source-id: a7f52c67d430219dcf7173b8d03cafe32fe41989 --- build/fbcode_builder/manifests/sapling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/fbcode_builder/manifests/sapling b/build/fbcode_builder/manifests/sapling index c067360ef82ba..cff882c67c87a 100644 --- a/build/fbcode_builder/manifests/sapling +++ b/build/fbcode_builder/manifests/sapling @@ -60,7 +60,7 @@ fb303 fbthrift rust-shed -[dependencies.test=on] +[dependencies.all(test=on,not(os=darwin))] hexdump [dependencies.not(os=windows)] From f65bac55dcf419fdc203225fb93357e804d670e1 Mon Sep 17 00:00:00 2001 From: genkzgnluxbjeyb Date: Wed, 23 Oct 2024 07:17:17 -0700 Subject: [PATCH 268/479] fboss_qsfp_test_config_sync Differential Revision: D64828093 fbshipit-source-id: 8e1d66336260d3e48c36decf3d422caf8556e829 --- .../janga800bic.materialized_JSON | 589 +++++++++++++++++- .../tahan800bc.materialized_JSON | 28 +- 2 files changed, 597 insertions(+), 20 deletions(-) diff --git a/fboss/oss/qsfp_test_configs/janga800bic.materialized_JSON b/fboss/oss/qsfp_test_configs/janga800bic.materialized_JSON index a1d63c78b2d51..bc51bf035ceb5 100644 --- a/fboss/oss/qsfp_test_configs/janga800bic.materialized_JSON +++ b/fboss/oss/qsfp_test_configs/janga800bic.materialized_JSON @@ -2,7 +2,8 @@ "defaultCommandLineArgs": { "firmware_upgrade_supported": "true", "mode": "janga800bic", - "multi_npu_platform_mapping": "true" + "multi_npu_platform_mapping": "true", + "remediation_enabled": "false" }, "transceiverConfigOverrides": [ @@ -10,48 +11,598 @@ "qsfpTestConfig": { "cabledPortPairs": [ { - "aPortName": "eth1/45/1", - "zPortName": "eth1/46/1", + "aPortName": "eth1/2/5", + "zPortName": "eth1/1/1", "profileID": 38 }, { - "aPortName": "fab1/3/1", - "zPortName": "fab1/4/1", + "aPortName": "eth1/1/5", + "zPortName": "eth1/2/1", + "profileID": 38 + }, + { + "aPortName": "eth1/41/1", + "zPortName": "eth1/44/1", + "profileID": 22 + }, + { + "aPortName": "fab1/7/1", + "zPortName": "fab1/6/5", + "profileID": 42 + }, + { + "aPortName": "fab1/8/1", + "zPortName": "fab1/7/5", + "profileID": 42 + }, + { + "aPortName": "fab1/9/1", + "zPortName": "fab1/8/5", + "profileID": 42 + }, + { + "aPortName": "fab1/10/1", + "zPortName": "fab1/9/5", + "profileID": 42 + }, + { + "aPortName": "fab1/11/1", + "zPortName": "fab1/10/5", + "profileID": 42 + }, + { + "aPortName": "fab1/12/1", + "zPortName": "fab1/11/5", + "profileID": 42 + }, + { + "aPortName": "fab1/13/1", + "zPortName": "fab1/12/5", + "profileID": 42 + }, + { + "aPortName": "fab1/14/1", + "zPortName": "fab1/13/5", + "profileID": 42 + }, + { + "aPortName": "fab1/15/1", + "zPortName": "fab1/14/5", + "profileID": 42 + }, + { + "aPortName": "fab1/16/1", + "zPortName": "fab1/15/5", + "profileID": 42 + }, + { + "aPortName": "fab1/17/1", + "zPortName": "fab1/16/5", + "profileID": 42 + }, + { + "aPortName": "fab1/18/1", + "zPortName": "fab1/17/5", + "profileID": 42 + }, + { + "aPortName": "fab1/19/1", + "zPortName": "fab1/18/5", + "profileID": 42 + }, + { + "aPortName": "fab1/20/1", + "zPortName": "fab1/19/5", + "profileID": 42 + }, + { + "aPortName": "fab1/21/1", + "zPortName": "fab1/20/5", + "profileID": 42 + }, + { + "aPortName": "fab1/22/1", + "zPortName": "fab1/21/5", + "profileID": 42 + }, + { + "aPortName": "fab1/23/1", + "zPortName": "fab1/22/5", + "profileID": 42 + }, + { + "aPortName": "fab1/24/1", + "zPortName": "fab1/23/5", + "profileID": 42 + }, + { + "aPortName": "fab1/25/1", + "zPortName": "fab1/24/5", + "profileID": 42 + }, + { + "aPortName": "fab1/26/1", + "zPortName": "fab1/25/5", + "profileID": 42 + }, + { + "aPortName": "fab1/27/1", + "zPortName": "fab1/26/5", + "profileID": 42 + }, + { + "aPortName": "fab1/28/1", + "zPortName": "fab1/27/5", + "profileID": 42 + }, + { + "aPortName": "fab1/29/1", + "zPortName": "fab1/28/5", + "profileID": 42 + }, + { + "aPortName": "fab1/30/1", + "zPortName": "fab1/29/5", + "profileID": 42 + }, + { + "aPortName": "fab1/31/1", + "zPortName": "fab1/30/5", + "profileID": 42 + }, + { + "aPortName": "fab1/32/1", + "zPortName": "fab1/31/5", + "profileID": 42 + }, + { + "aPortName": "fab1/33/1", + "zPortName": "fab1/32/5", + "profileID": 42 + }, + { + "aPortName": "fab1/34/1", + "zPortName": "fab1/33/5", + "profileID": 42 + }, + { + "aPortName": "fab1/35/1", + "zPortName": "fab1/34/5", + "profileID": 42 + }, + { + "aPortName": "fab1/7/2", + "zPortName": "fab1/6/6", + "profileID": 42 + }, + { + "aPortName": "fab1/8/2", + "zPortName": "fab1/7/6", + "profileID": 42 + }, + { + "aPortName": "fab1/9/2", + "zPortName": "fab1/8/6", + "profileID": 42 + }, + { + "aPortName": "fab1/10/2", + "zPortName": "fab1/9/6", + "profileID": 42 + }, + { + "aPortName": "fab1/11/2", + "zPortName": "fab1/10/6", + "profileID": 42 + }, + { + "aPortName": "fab1/12/2", + "zPortName": "fab1/11/6", + "profileID": 42 + }, + { + "aPortName": "fab1/13/2", + "zPortName": "fab1/12/6", + "profileID": 42 + }, + { + "aPortName": "fab1/14/2", + "zPortName": "fab1/13/6", + "profileID": 42 + }, + { + "aPortName": "fab1/15/2", + "zPortName": "fab1/14/6", + "profileID": 42 + }, + { + "aPortName": "fab1/16/2", + "zPortName": "fab1/15/6", + "profileID": 42 + }, + { + "aPortName": "fab1/17/2", + "zPortName": "fab1/16/6", + "profileID": 42 + }, + { + "aPortName": "fab1/18/2", + "zPortName": "fab1/17/6", + "profileID": 42 + }, + { + "aPortName": "fab1/19/2", + "zPortName": "fab1/18/6", + "profileID": 42 + }, + { + "aPortName": "fab1/20/2", + "zPortName": "fab1/19/6", + "profileID": 42 + }, + { + "aPortName": "fab1/21/2", + "zPortName": "fab1/20/6", + "profileID": 42 + }, + { + "aPortName": "fab1/22/2", + "zPortName": "fab1/21/6", + "profileID": 42 + }, + { + "aPortName": "fab1/23/2", + "zPortName": "fab1/22/6", + "profileID": 42 + }, + { + "aPortName": "fab1/24/2", + "zPortName": "fab1/23/6", + "profileID": 42 + }, + { + "aPortName": "fab1/25/2", + "zPortName": "fab1/24/6", + "profileID": 42 + }, + { + "aPortName": "fab1/26/2", + "zPortName": "fab1/25/6", + "profileID": 42 + }, + { + "aPortName": "fab1/27/2", + "zPortName": "fab1/26/6", + "profileID": 42 + }, + { + "aPortName": "fab1/28/2", + "zPortName": "fab1/27/6", + "profileID": 42 + }, + { + "aPortName": "fab1/29/2", + "zPortName": "fab1/28/6", + "profileID": 42 + }, + { + "aPortName": "fab1/30/2", + "zPortName": "fab1/29/6", + "profileID": 42 + }, + { + "aPortName": "fab1/31/2", + "zPortName": "fab1/30/6", + "profileID": 42 + }, + { + "aPortName": "fab1/32/2", + "zPortName": "fab1/31/6", + "profileID": 42 + }, + { + "aPortName": "fab1/33/2", + "zPortName": "fab1/32/6", + "profileID": 42 + }, + { + "aPortName": "fab1/34/2", + "zPortName": "fab1/33/6", + "profileID": 42 + }, + { + "aPortName": "fab1/35/2", + "zPortName": "fab1/34/6", + "profileID": 42 + }, + { + "aPortName": "fab1/7/3", + "zPortName": "fab1/6/7", + "profileID": 42 + }, + { + "aPortName": "fab1/8/3", + "zPortName": "fab1/7/7", + "profileID": 42 + }, + { + "aPortName": "fab1/9/3", + "zPortName": "fab1/8/7", + "profileID": 42 + }, + { + "aPortName": "fab1/10/3", + "zPortName": "fab1/9/7", + "profileID": 42 + }, + { + "aPortName": "fab1/11/3", + "zPortName": "fab1/10/7", + "profileID": 42 + }, + { + "aPortName": "fab1/12/3", + "zPortName": "fab1/11/7", + "profileID": 42 + }, + { + "aPortName": "fab1/13/3", + "zPortName": "fab1/12/7", + "profileID": 42 + }, + { + "aPortName": "fab1/14/3", + "zPortName": "fab1/13/7", + "profileID": 42 + }, + { + "aPortName": "fab1/15/3", + "zPortName": "fab1/14/7", + "profileID": 42 + }, + { + "aPortName": "fab1/16/3", + "zPortName": "fab1/15/7", + "profileID": 42 + }, + { + "aPortName": "fab1/17/3", + "zPortName": "fab1/16/7", + "profileID": 42 + }, + { + "aPortName": "fab1/18/3", + "zPortName": "fab1/17/7", + "profileID": 42 + }, + { + "aPortName": "fab1/19/3", + "zPortName": "fab1/18/7", + "profileID": 42 + }, + { + "aPortName": "fab1/20/3", + "zPortName": "fab1/19/7", + "profileID": 42 + }, + { + "aPortName": "fab1/21/3", + "zPortName": "fab1/20/7", + "profileID": 42 + }, + { + "aPortName": "fab1/22/3", + "zPortName": "fab1/21/7", + "profileID": 42 + }, + { + "aPortName": "fab1/23/3", + "zPortName": "fab1/22/7", + "profileID": 42 + }, + { + "aPortName": "fab1/24/3", + "zPortName": "fab1/23/7", + "profileID": 42 + }, + { + "aPortName": "fab1/25/3", + "zPortName": "fab1/24/7", + "profileID": 42 + }, + { + "aPortName": "fab1/26/3", + "zPortName": "fab1/25/7", + "profileID": 42 + }, + { + "aPortName": "fab1/27/3", + "zPortName": "fab1/26/7", + "profileID": 42 + }, + { + "aPortName": "fab1/28/3", + "zPortName": "fab1/27/7", + "profileID": 42 + }, + { + "aPortName": "fab1/29/3", + "zPortName": "fab1/28/7", + "profileID": 42 + }, + { + "aPortName": "fab1/30/3", + "zPortName": "fab1/29/7", + "profileID": 42 + }, + { + "aPortName": "fab1/31/3", + "zPortName": "fab1/30/7", + "profileID": 42 + }, + { + "aPortName": "fab1/32/3", + "zPortName": "fab1/31/7", + "profileID": 42 + }, + { + "aPortName": "fab1/33/3", + "zPortName": "fab1/32/7", + "profileID": 42 + }, + { + "aPortName": "fab1/34/3", + "zPortName": "fab1/33/7", + "profileID": 42 + }, + { + "aPortName": "fab1/35/3", + "zPortName": "fab1/34/7", + "profileID": 42 + }, + { + "aPortName": "fab1/7/4", + "zPortName": "fab1/6/8", + "profileID": 42 + }, + { + "aPortName": "fab1/8/4", + "zPortName": "fab1/7/8", + "profileID": 42 + }, + { + "aPortName": "fab1/9/4", + "zPortName": "fab1/8/8", + "profileID": 42 + }, + { + "aPortName": "fab1/10/4", + "zPortName": "fab1/9/8", + "profileID": 42 + }, + { + "aPortName": "fab1/11/4", + "zPortName": "fab1/10/8", + "profileID": 42 + }, + { + "aPortName": "fab1/12/4", + "zPortName": "fab1/11/8", + "profileID": 42 + }, + { + "aPortName": "fab1/13/4", + "zPortName": "fab1/12/8", + "profileID": 42 + }, + { + "aPortName": "fab1/14/4", + "zPortName": "fab1/13/8", + "profileID": 42 + }, + { + "aPortName": "fab1/15/4", + "zPortName": "fab1/14/8", + "profileID": 42 + }, + { + "aPortName": "fab1/16/4", + "zPortName": "fab1/15/8", + "profileID": 42 + }, + { + "aPortName": "fab1/17/4", + "zPortName": "fab1/16/8", + "profileID": 42 + }, + { + "aPortName": "fab1/18/4", + "zPortName": "fab1/17/8", + "profileID": 42 + }, + { + "aPortName": "fab1/19/4", + "zPortName": "fab1/18/8", + "profileID": 42 + }, + { + "aPortName": "fab1/20/4", + "zPortName": "fab1/19/8", + "profileID": 42 + }, + { + "aPortName": "fab1/21/4", + "zPortName": "fab1/20/8", + "profileID": 42 + }, + { + "aPortName": "fab1/22/4", + "zPortName": "fab1/21/8", + "profileID": 42 + }, + { + "aPortName": "fab1/23/4", + "zPortName": "fab1/22/8", + "profileID": 42 + }, + { + "aPortName": "fab1/24/4", + "zPortName": "fab1/23/8", + "profileID": 42 + }, + { + "aPortName": "fab1/25/4", + "zPortName": "fab1/24/8", + "profileID": 42 + }, + { + "aPortName": "fab1/26/4", + "zPortName": "fab1/25/8", + "profileID": 42 + }, + { + "aPortName": "fab1/27/4", + "zPortName": "fab1/26/8", + "profileID": 42 + }, + { + "aPortName": "fab1/28/4", + "zPortName": "fab1/27/8", "profileID": 42 }, { - "aPortName": "fab1/3/2", - "zPortName": "fab1/4/2", + "aPortName": "fab1/29/4", + "zPortName": "fab1/28/8", "profileID": 42 }, { - "aPortName": "fab1/3/3", - "zPortName": "fab1/4/3", + "aPortName": "fab1/30/4", + "zPortName": "fab1/29/8", "profileID": 42 }, { - "aPortName": "fab1/3/4", - "zPortName": "fab1/4/4", + "aPortName": "fab1/31/4", + "zPortName": "fab1/30/8", "profileID": 42 }, { - "aPortName": "fab1/3/5", - "zPortName": "fab1/4/5", + "aPortName": "fab1/32/4", + "zPortName": "fab1/31/8", "profileID": 42 }, { - "aPortName": "fab1/3/6", - "zPortName": "fab1/4/6", + "aPortName": "fab1/33/4", + "zPortName": "fab1/32/8", "profileID": 42 }, { - "aPortName": "fab1/3/7", - "zPortName": "fab1/4/7", + "aPortName": "fab1/34/4", + "zPortName": "fab1/33/8", "profileID": 42 }, { - "aPortName": "fab1/3/8", - "zPortName": "fab1/4/8", + "aPortName": "fab1/35/4", + "zPortName": "fab1/34/8", "profileID": 42 } ] diff --git a/fboss/oss/qsfp_test_configs/tahan800bc.materialized_JSON b/fboss/oss/qsfp_test_configs/tahan800bc.materialized_JSON index c01bde25e8bf8..b052d896a6403 100644 --- a/fboss/oss/qsfp_test_configs/tahan800bc.materialized_JSON +++ b/fboss/oss/qsfp_test_configs/tahan800bc.materialized_JSON @@ -1,7 +1,8 @@ { "defaultCommandLineArgs": { "firmware_upgrade_supported": "true", - "mode": "tahan800bc" + "mode": "tahan800bc", + "remediation_enabled": "false" }, "transceiverConfigOverrides": [ @@ -28,6 +29,26 @@ "zPortName": "eth1/6/5", "profileID": 38 }, + { + "aPortName": "eth1/13/1", + "zPortName": "eth1/14/1", + "profileID": 38 + }, + { + "aPortName": "eth1/13/5", + "zPortName": "eth1/14/5", + "profileID": 38 + }, + { + "aPortName": "eth1/22/1", + "zPortName": "eth1/23/1", + "profileID": 38 + }, + { + "aPortName": "eth1/22/5", + "zPortName": "eth1/23/5", + "profileID": 38 + }, { "aPortName": "eth1/27/1", "zPortName": "eth1/30/1", @@ -47,6 +68,11 @@ "aPortName": "eth1/31/5", "zPortName": "eth1/32/5", "profileID": 38 + }, + { + "aPortName": "eth1/33/1", + "zPortName": "eth1/33/1", + "profileID": 23 } ] }, From e8b87e11976fec2e923d48c39fd293f746acfe0f Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 23 Oct 2024 08:05:32 -0700 Subject: [PATCH 269/479] Add local/globalSystemPort offsets Summary: Will be used to compute system port IDs from logical port IDs as described here - https://fburl.com/gdoc/4z04r3rj Reviewed By: shri-khare, zechengh09 Differential Revision: D64801254 Privacy Context Container: L1125642 fbshipit-source-id: b9464774c52fb0206e57976ba484c5e5690a43ca --- fboss/agent/switch_config.thrift | 6 +++++ fboss/fsdb/if/oss/fsdb_model_thriftpath.h | 27 ++++++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/fboss/agent/switch_config.thrift b/fboss/agent/switch_config.thrift index 2bbb8276bb22d..66b3bbe01e42e 100644 --- a/fboss/agent/switch_config.thrift +++ b/fboss/agent/switch_config.thrift @@ -1786,6 +1786,12 @@ struct DsfNode { // Denotes the level for fabric switch in // the DSF n/w topology. Value is either 1 or 2 10: optional i32 fabricLevel; + // Offset from where to start local system port + // ID allocation from + 11: optional i32 localSystemPortOffset; + // Offset from where to start local system port + // ID allocation from + 12: optional i32 globalSystemPortOffset; } /** diff --git a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h index f22c7bbccb438..f2a0e45c12723 100755 --- a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h +++ b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h @@ -11775,7 +11775,9 @@ std::pair>>, std::pair>>, std::pair>, -std::pair>>; +std::pair>, +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, std::pair, Child<::facebook::fboss::cfg::DsfNodeType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::DsfNodeType>>>, @@ -11785,7 +11787,9 @@ std::pair, Child<::facebook::fboss::cfg::AsicType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AsicType>>>, std::pair, Child<::facebook::fboss::PlatformType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::PlatformType>>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -11796,7 +11800,9 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -11812,6 +11818,8 @@ std::pair auto operator()(const std::integral_constant&) { @@ -11825,6 +11833,8 @@ std::pair @@ -12822,12 +12832,15 @@ class ChildThriftPath<::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsd Self >; using Children = fatal::tuple>, -std::pair>>; +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template using NameToId = fatal::tuple>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -12835,11 +12848,13 @@ std::pair STRUCT_CHILD_GETTERS(asicSdk, 1); STRUCT_CHILD_GETTERS(saiSdk, 2); + STRUCT_CHILD_GETTERS(firmware, 3); template auto operator()(const std::integral_constant&) { if constexpr (__id == 1) { return asicSdk(); } else if constexpr (__id == 2) { return saiSdk(); } + else if constexpr (__id == 3) { return firmware(); } } template From 42ea7e419975aaf6598a9132c74fc35d4e767d15 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 23 Oct 2024 09:22:53 -0700 Subject: [PATCH 270/479] API to get local/remoteSystemPortOffset values for dsf node Summary: As titled Reviewed By: zechengh09 Differential Revision: D64813854 Privacy Context Container: L1125642 fbshipit-source-id: 71406e9545c1b633626a758be7477c8211243973 --- fboss/agent/state/DsfNode.cpp | 15 +++++++++++++++ fboss/agent/state/DsfNode.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/fboss/agent/state/DsfNode.cpp b/fboss/agent/state/DsfNode.cpp index 8751e18f5a3e8..a674800b00614 100644 --- a/fboss/agent/state/DsfNode.cpp +++ b/fboss/agent/state/DsfNode.cpp @@ -85,5 +85,20 @@ std::optional DsfNode::getClusterId() const { return clusterId; } +std::optional DsfNode::getLocalSystemPortOffset() const { + std::optional ret; + if (get().has_value()) { + ret = get()->cref(); + } + return ret; +} + +std::optional DsfNode::getGlobalSystemPortOffset() const { + std::optional ret; + if (get().has_value()) { + ret = get()->cref(); + } + return ret; +} template class ThriftStructNode; } // namespace facebook::fboss diff --git a/fboss/agent/state/DsfNode.h b/fboss/agent/state/DsfNode.h index 30506e7527cc2..243c48b75e75a 100644 --- a/fboss/agent/state/DsfNode.h +++ b/fboss/agent/state/DsfNode.h @@ -42,6 +42,8 @@ class DsfNode : public ThriftStructNode { std::optional getMac() const; PlatformType getPlatformType() const; std::optional getClusterId() const; + std::optional getLocalSystemPortOffset() const; + std::optional getGlobalSystemPortOffset() const; private: // Inherit the constructors required for clone() From a1091851c3189cebf5718dfcfc651bb80d70d3e9 Mon Sep 17 00:00:00 2001 From: Ron He Date: Wed, 23 Oct 2024 09:23:21 -0700 Subject: [PATCH 271/479] Fix parallel interface link calculation Summary: As titled. We have 4x100G bundle links between RDSW and FDSW (4 links to each VD). Therefore in prod L1 cluster, each fabric switch (2 VDs) will have 2 links to the same RDSW. Parallel interface links should be calculated on a source VD level, not on source switch ID level. Fixing this in utils. Reviewed By: jasmeetbagga Differential Revision: D64809539 Privacy Context Container: L1125642 fbshipit-source-id: 9fa342395d68ccdd77ea0afe0d49b51a6b2b2a69 --- fboss/agent/ApplyThriftConfig.cpp | 6 ++++- fboss/agent/Utils.cpp | 27 +++++++++++++++++---- fboss/agent/Utils.h | 4 ++- fboss/agent/hw/mock/MockPlatformMapping.cpp | 1 + fboss/agent/test/TestUtils.cpp | 2 +- 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 170cbd21de0aa..6ac99603b0d0e 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -1176,7 +1176,11 @@ void ThriftConfigApplier::processReachabilityGroup( }; bool parallelVoqLinks = haveParallelLinksToInterfaceNodes( - cfg_, localFabricSwitchIds, switchNameToSwitchIds, scopeResolver_); + cfg_, + localFabricSwitchIds, + switchNameToSwitchIds, + scopeResolver_, + platformMapping_); if (!isSingleStageCluster || parallelVoqLinks) { auto newPortMap = new_->getPorts()->modify(&new_); diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 47fdc3e6b332f..1b2255a589b2b 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -982,13 +982,13 @@ bool haveParallelLinksToInterfaceNodes( const std::vector& localFabricSwitchIds, const std::unordered_map>& switchNameToSwitchIds, - SwitchIdScopeResolver& scopeResolver) { + SwitchIdScopeResolver& scopeResolver, + const PlatformMapping* platformMapping) { for (const auto& fabricSwitchId : localFabricSwitchIds) { - // TODO(zecheng): Update to look at DsfNode layer config once available. - // Can be optimized to only look at FDSW layer - std::unordered_set voqNeighbors; + // Determine parallel links on VD level - there are two VDs per R3 ASIC + std::unordered_map> vd2VoqNeighbors; for (const auto& port : *cfg->ports()) { - // Only process ports belonging to the passed switchId + // Only process ports belonging to one switchId if (scopeResolver.scope(port).has(SwitchID(fabricSwitchId)) && port.expectedNeighborReachability()->size() > 0) { auto neighborRemoteSwitchId = @@ -998,6 +998,23 @@ bool haveParallelLinksToInterfaceNodes( CHECK(neighborDsfNodeIter != cfg->dsfNodes()->end()); if (*neighborDsfNodeIter->second.type() == cfg::DsfNodeType::INTERFACE_NODE) { + CHECK(port.name().has_value()); + auto localVirtualDeviceId = + platformMapping->getVirtualDeviceID(*port.name()); + if (!localVirtualDeviceId.has_value()) { + throw FbossError( + "Unable to find virtual device id for port: ", + *port.logicalID(), + " virtual device"); + } + + if (vd2VoqNeighbors.find(localVirtualDeviceId.value()) == + vd2VoqNeighbors.end()) { + vd2VoqNeighbors.insert( + {localVirtualDeviceId.value(), + std::unordered_set()}); + } + auto& voqNeighbors = vd2VoqNeighbors[localVirtualDeviceId.value()]; const auto& [neighborName, _] = getExpectedNeighborAndPortName(port); if (voqNeighbors.find(neighborName) != voqNeighbors.end()) { return true; diff --git a/fboss/agent/Utils.h b/fboss/agent/Utils.h index 676c5a803bce3..adf89a8d2c10b 100644 --- a/fboss/agent/Utils.h +++ b/fboss/agent/Utils.h @@ -86,6 +86,7 @@ class SwitchState; class Interface; class SwitchSettings; class SwitchIdScopeResolver; +class PlatformMapping; struct AgentConfig; constexpr auto kRecyclePortIdOffset = 1; @@ -438,7 +439,8 @@ bool haveParallelLinksToInterfaceNodes( const std::vector& localFabricSwitchIds, const std::unordered_map>& switchNameToSwitchIds, - SwitchIdScopeResolver& scopeResolver); + SwitchIdScopeResolver& scopeResolver, + const PlatformMapping* platformMapping); CpuCosQueueId hwQueueIdToCpuCosQueueId(uint8_t hwQueueId); int numFabricLevels(const std::map& dsfNodes); diff --git a/fboss/agent/hw/mock/MockPlatformMapping.cpp b/fboss/agent/hw/mock/MockPlatformMapping.cpp index d1038b55ebdfa..6f201d46371bc 100644 --- a/fboss/agent/hw/mock/MockPlatformMapping.cpp +++ b/fboss/agent/hw/mock/MockPlatformMapping.cpp @@ -18,6 +18,7 @@ MockPlatformMapping::MockPlatformMapping() : Wedge100PlatformMapping() { auto& platformPort = entry.second; platformPort.mapping()->attachedCoreId() = 0; platformPort.mapping()->attachedCorePortIndex() = 0; + platformPort.mapping()->virtualDeviceId() = 0; } } } // namespace facebook::fboss diff --git a/fboss/agent/test/TestUtils.cpp b/fboss/agent/test/TestUtils.cpp index c0afd17b7991d..76e7da4805ac3 100644 --- a/fboss/agent/test/TestUtils.cpp +++ b/fboss/agent/test/TestUtils.cpp @@ -553,7 +553,7 @@ cfg::SwitchConfig testConfigFabricSwitch( for (int p = 0; p < kPortCount; ++p) { cfg.ports()[p].logicalID() = p + 1; - cfg.ports()[p].name() = folly::to("port", p + 1); + cfg.ports()[p].name() = folly::to("eth1/", p + 1, "/1"); cfg.ports()[p].state() = cfg::PortState::ENABLED; cfg.ports()[p].speed() = cfg::PortSpeed::TWENTYFIVEG; cfg.ports()[p].profileID() = From ae3a7b01f1a53bdc8e2d74b5e638c75040104b27 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Wed, 23 Oct 2024 09:34:39 -0700 Subject: [PATCH 272/479] enable port mtu error trap for 12.0 brcm-sai dnx version Summary: as titled, port mtu error trap now works with 12.0 brcm-sai version after landing patch in D64718407 Reviewed By: jasmeetbagga Differential Revision: D64791404 Privacy Context Container: L1125642 fbshipit-source-id: 905b4bc0c90e0eee26a3a514c35d317174229ca7 --- fboss/agent/hw/sai/switch/SaiHostifManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiHostifManager.cpp b/fboss/agent/hw/sai/switch/SaiHostifManager.cpp index c7999ac288040..586c696b12cf7 100644 --- a/fboss/agent/hw/sai/switch/SaiHostifManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiHostifManager.cpp @@ -22,7 +22,7 @@ #include extern "C" { -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) #ifndef IS_OSS_BRCM_SAI #include #else @@ -139,7 +139,7 @@ SaiHostifManager::packetReasonToHostifTrap( case cfg::PacketRxReason::EAPOL: return std::make_pair(SAI_HOSTIF_TRAP_TYPE_EAPOL, SAI_PACKET_ACTION_TRAP); case cfg::PacketRxReason::PORT_MTU_ERROR: -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) return std::make_pair( SAI_HOSTIF_TRAP_TYPE_PORT_MTU_ERROR, SAI_PACKET_ACTION_TRAP); #endif From d02cd8bf00bbfce38c7b833ae02b00820eddc692 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Wed, 23 Oct 2024 09:38:06 -0700 Subject: [PATCH 273/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/d0a7c16a8c8b645e2b2e65dd78cdf9cc143cf96a https://github.com/facebook/buck2-shims-meta/commit/fea994851907bf77ebdd75d0c5b9f8bc021934e6 https://github.com/facebook/fb303/commit/856e9b37bbb6985a9d7b8ae45c0df16a1174dafb https://github.com/facebook/fbthrift/commit/55e3309e4dcc940d351e485d828028bc168be8b8 https://github.com/facebook/folly/commit/e57ce302ff7fe0960043b7d6299d96b35d62dd39 https://github.com/facebook/mvfst/commit/0f215e2211de184169faaac91bd5ac8e492294df https://github.com/facebook/proxygen/commit/62b5ac0219bac626de8fceb53f28ace0ef58a291 https://github.com/facebook/wangle/commit/be3f9f585f4af7011b069cb391a7f667b977713b https://github.com/facebookexperimental/edencommon/commit/ccee163bbba02efd5ddbb843d0f8c0293221535b https://github.com/facebookexperimental/rust-shed/commit/d02bd901e96f3a907f5ba6eeeb090ddcfc2b6866 https://github.com/facebookincubator/fizz/commit/f614c44619f6d0a66f3b7fa8215449a2f0999223 Reviewed By: ajb85 fbshipit-source-id: 4dd326963b7b41581e22d2fc9a01298c0b5ad8e0 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index b338eaa85450a..d7aae0ec51fd5 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 43d83c1fbfbe94914dc5e197e5b0a37ea0c38e35 +Subproject commit 856e9b37bbb6985a9d7b8ae45c0df16a1174dafb diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 400c1310b9113..d63ed9deee789 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 0101ff3e5233ff3476f0c2dbcb0c439d3ab4cbac +Subproject commit 55e3309e4dcc940d351e485d828028bc168be8b8 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index a0aa0e2b3c7e2..4feb28a16355f 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 671c75faa7cd0e17b82e465e4e7f0d2a36d26cca +Subproject commit e57ce302ff7fe0960043b7d6299d96b35d62dd39 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 29fe30f92698f..57a18a7941540 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 542d380b9bef1b209b34e3618b826a444aceeaa3 +Subproject commit be3f9f585f4af7011b069cb391a7f667b977713b diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index eb9191ae93759..0c559d31a3b82 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 63e26d01a6f80ac69fe718efeea1a6565b5d91de +Subproject commit f614c44619f6d0a66f3b7fa8215449a2f0999223 From 8b153073407c7e744b19f78d677c6bbd6f3e648c Mon Sep 17 00:00:00 2001 From: Ron He Date: Wed, 23 Oct 2024 10:18:58 -0700 Subject: [PATCH 274/479] Sync asic config v2 thrift from configerator to fbcode Summary: As titled. This will be used for netcastle changes to account this. Reviewed By: nivinl Differential Revision: D64811745 fbshipit-source-id: da1e5930272bec8eaa0840ccc705d416d9fd35fa --- fboss/agent/hw/config/asic_config_v2.thrift | 27 ++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/config/asic_config_v2.thrift b/fboss/agent/hw/config/asic_config_v2.thrift index 65f31d4a879ca..8f99b9117ffaa 100644 --- a/fboss/agent/hw/config/asic_config_v2.thrift +++ b/fboss/agent/hw/config/asic_config_v2.thrift @@ -23,9 +23,34 @@ struct AsicConfig { 2: optional map npuEntries; } +/* + * AsicConfigGenType determines the vendor configs to be + * generated based on the gen type mode. + * - DEFAULT - prod asic config + * - HW_TEST - SAI Hw test asic config + * - BENCHMARK - Benchmark asic config + * - LINK_TEST - Link test asic config + */ +enum AsicConfigGenType { + DEFAULT = 0, + HW_TEST = 1, + BENCHMARK = 2, + LINK_TEST = 3, +} + +// asic config depending on roles in multistage DNX network +enum MultistageRole { + NONE = 0, + FAP = 1, // for Jericho3 + FE13 = 2, // for 1st stage Ramon3 + FE2 = 3, // for 2nd stage Ramon3 +} + struct AsicConfigParameters { 1: AsicConfigType configType; 2: optional bool exactMatch; 3: optional bool mmuLossless; - 4: optional bool testConfig; + 4: optional AsicConfigGenType configGenType; + 5: optional string portConfig; + 6: optional MultistageRole multistageRole; } From fed70eb0e30dee6dcedf89538b51e40c60345716 Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Wed, 23 Oct 2024 11:10:29 -0700 Subject: [PATCH 275/479] Fix libcurl/libcurl-minimal conflict Summary: During container build, we attempt to install some dependencies via `getdeps.py`, but the occasionally the base image will change from having `libcurl` and `libcurl-minimal` preinstalled. Add a separate step to manually force installation of the dependencies. `--allowerasing` will force installation of `libcurl-minimal`. Reviewed By: harshitgulati18 Differential Revision: D64839721 fbshipit-source-id: 1bd5fabcfc58bf7df0a58c1e149b801c1af7dfcb --- fboss/oss/docker/Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fboss/oss/docker/Dockerfile b/fboss/oss/docker/Dockerfile index 28adddbe8b716..4e541ac5d77a8 100644 --- a/fboss/oss/docker/Dockerfile +++ b/fboss/oss/docker/Dockerfile @@ -15,7 +15,14 @@ RUN tar xvzf fboss/oss/stable_commits/latest_stable_hashes.tar.gz RUN dnf install -y 'dnf-command(config-manager)' RUN dnf config-manager --set-enabled crb RUN dnf install -y epel-release epel-next-release -RUN dnf install libcurl libcurl-devel -y --allowerasing +RUN sudo dnf install -y autoconf automake binutils binutils-devel bzip2 \ + bzip2-devel cmake double-conversion double-conversion-devel libcurl-devel \ + libcurl-minimal libdwarf libdwarf-devel libevent-devel libffi libffi-devel \ + libnghttp2 libnghttp2-devel libnl3 libnl3-devel libsodium-devel \ + libsodium-static libtool libunwind libunwind-devel libusb libusb-devel \ + libzstd libzstd-devel lz4-devel ncurses-devel ninja-build openssl \ + openssl-devel openssl-libs python3 python3-devel re2 re2-devel \ + snappy-devel xxhash-devel xz-devel zlib-devel zlib-static -y --allowerasing RUN ./build/fbcode_builder/getdeps.py install-system-deps --recursive fboss RUN dnf install bison flex -y RUN dnf group install "Development Tools" -y From 0940f78dc9bcc838701c95199d4278729b7cf266 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 23 Oct 2024 11:33:52 -0700 Subject: [PATCH 276/479] Populate config for local/globalSystemPortOffset in tests Summary: As titled Reviewed By: shri-khare, zechengh09 Differential Revision: D64841416 Privacy Context Container: L1125642 fbshipit-source-id: 6eef1641a87b3e433f1c939dc02e01e1a6aca6ec --- fboss/agent/test/TestUtils.cpp | 2 ++ fboss/agent/test/utils/ConfigUtils.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/fboss/agent/test/TestUtils.cpp b/fboss/agent/test/TestUtils.cpp index 76e7da4805ac3..9ce45ea72cc54 100644 --- a/fboss/agent/test/TestUtils.cpp +++ b/fboss/agent/test/TestUtils.cpp @@ -495,6 +495,8 @@ cfg::DsfNode makeDsfNodeCfg( dsfNodeCfg.systemPortRange() = sysPortRange; dsfNodeCfg.loopbackIps() = getLoopbackIps(switchId); dsfNodeCfg.nodeMac() = "02:00:00:00:0F:0B"; + dsfNodeCfg.localSystemPortOffset() = *sysPortRange.minimum(); + dsfNodeCfg.globalSystemPortOffset() = *sysPortRange.minimum(); } dsfNodeCfg.asicType() = asicType; dsfNodeCfg.platformType() = type == cfg::DsfNodeType::INTERFACE_NODE diff --git a/fboss/agent/test/utils/ConfigUtils.cpp b/fboss/agent/test/utils/ConfigUtils.cpp index 919239bcb0f12..5c493ab191b7c 100644 --- a/fboss/agent/test/utils/ConfigUtils.cpp +++ b/fboss/agent/test/utils/ConfigUtils.cpp @@ -454,6 +454,8 @@ cfg::DsfNode dsfNodeConfig( dsfNode.systemPortRange() = *otherAsic->getSystemPortRange(); dsfNode.nodeMac() = kLocalCpuMac().toString(); dsfNode.loopbackIps() = getLoopbackIps(SwitchID(*dsfNode.switchId())); + dsfNode.localSystemPortOffset() = *dsfNode.systemPortRange()->minimum(); + dsfNode.globalSystemPortOffset() = *dsfNode.systemPortRange()->minimum(); break; case cfg::SwitchType::FABRIC: dsfNode.type() = cfg::DsfNodeType::FABRIC_NODE; From 0745ca882029133ff0b457c8433a5f3513697610 Mon Sep 17 00:00:00 2001 From: Cullen Walsh Date: Wed, 23 Oct 2024 11:58:53 -0700 Subject: [PATCH 277/479] Avoid reaching into root crate for ocaml rust flags Summary: This will no longer be possible with external cells. This diff introduces slight duplication, but landing it first will unbreak ocamlrep builds immediately and avoid a shipit desync. Reviewed By: bigfootjon Differential Revision: D64847706 fbshipit-source-id: 08bd28b3080250ce07f13984a9fa796d148a7532 --- shim/common/ocaml/interop/defs.bzl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/shim/common/ocaml/interop/defs.bzl b/shim/common/ocaml/interop/defs.bzl index 56d22fb5fafeb..18e488e23d29f 100644 --- a/shim/common/ocaml/interop/defs.bzl +++ b/shim/common/ocaml/interop/defs.bzl @@ -5,6 +5,9 @@ # License, Version 2.0 found in the LICENSE-APACHE file in the root directory # of this source tree. -load("@root//defs.bzl", _RUST_FLAGS_2018 = "RUST_FLAGS_2018") - -RUST_FLAGS_2018 = _RUST_FLAGS_2018 +# Try to keep in sync with all the client projects, like hack +RUST_FLAGS_2018 = [ + "-Drust-2018-idioms", + "-Dwarnings", + "-Dunused-crate-dependencies", +] From 1af94fc7bc19e204c38c40e49989a3b56d337915 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Wed, 23 Oct 2024 12:32:01 -0700 Subject: [PATCH 278/479] Add shared/sram PFC buffer thresholds in PG Summary: DNX needs additional config knobs to specify the shared min / max thresholds to trigger PFC with. Make it configurable. Reviewed By: zechengh09 Differential Revision: D64739017 fbshipit-source-id: e4735eb3509336d49ad7fa0e3d2ea18e7fa84ef5 --- fboss/agent/switch_config.thrift | 8 +++ fboss/agent/switch_state.thrift | 5 ++ fboss/fsdb/if/oss/fsdb_model_thriftpath.h | 62 ++++++++++++++++++++--- 3 files changed, 69 insertions(+), 6 deletions(-) diff --git a/fboss/agent/switch_config.thrift b/fboss/agent/switch_config.thrift index 66b3bbe01e42e..80e1d8eabb7de 100644 --- a/fboss/agent/switch_config.thrift +++ b/fboss/agent/switch_config.thrift @@ -1718,6 +1718,14 @@ struct PortPgConfig { 6: optional i32 resumeOffsetBytes; // global buffer pool as used by this PG 7: string bufferPoolName; + // Shared buffer min/max threshold range at which to trigger PFC + 8: optional i64 maxSharedXoffThresholdBytes; + 9: optional i64 minSharedXoffThresholdBytes; + // SRAM/OCB buffer min/max threshold range at which to trigger PFC + 10: optional i64 maxSramXoffThresholdBytes; + 11: optional i64 minSramXoffThresholdBytes; + // Offset from XOFF in SRAM before allowing XON + 12: optional i64 sramResumeOffsetBytes; } // asicSdk: Native SDK version. may or may not support SAI diff --git a/fboss/agent/switch_state.thrift b/fboss/agent/switch_state.thrift index 273ad90aac6ca..1fe976af65993 100644 --- a/fboss/agent/switch_state.thrift +++ b/fboss/agent/switch_state.thrift @@ -28,6 +28,11 @@ struct PortPgFields { 6: string bufferPoolName; 7: optional string scalingFactor; 8: optional common.BufferPoolFields bufferPoolConfig; + 9: optional i64 maxSharedXoffThresholdBytes; + 10: optional i64 minSharedXoffThresholdBytes; + 11: optional i64 maxSramXoffThresholdBytes; + 12: optional i64 minSramXoffThresholdBytes; + 13: optional i64 sramResumeOffsetBytes; } struct MKASakKey { diff --git a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h index f2a0e45c12723..93474b4b29180 100755 --- a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h +++ b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h @@ -4067,7 +4067,12 @@ std::pair>, std::pair>, std::pair>, -std::pair>>; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, @@ -4075,7 +4080,12 @@ std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::facebook::fboss::BufferPoolFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, ChildThriftPath<::facebook::fboss::BufferPoolFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -4084,7 +4094,12 @@ std::pair>, std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -4098,6 +4113,11 @@ std::pair auto operator()(const std::integral_constant&) { @@ -4109,6 +4129,11 @@ std::pair @@ -4563,14 +4588,24 @@ std::pair>, std::pair>, std::pair>, -std::pair>>; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::facebook::fboss::cfg::MMUScalingFactor, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::MMUScalingFactor>>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -4578,7 +4613,12 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -4591,6 +4631,11 @@ std::pair auto operator()(const std::integral_constant&) { @@ -4601,6 +4646,11 @@ std::pair From c2031b8afb07410d42093ad4181958118179df33 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Wed, 23 Oct 2024 13:37:12 -0700 Subject: [PATCH 279/479] Reviewed By: arthurshau Differential Revision: D64818388 fbshipit-source-id: 88219d6bc2890a831593696343106df6131326ea --- fboss/cli/fboss2/tabulate/termcolor.hpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fboss/cli/fboss2/tabulate/termcolor.hpp b/fboss/cli/fboss2/tabulate/termcolor.hpp index c2eda0d950f43..7048f5c7282b2 100644 --- a/fboss/cli/fboss2/tabulate/termcolor.hpp +++ b/fboss/cli/fboss2/tabulate/termcolor.hpp @@ -8,9 +8,7 @@ //! :copyright: (c) 2013 by Ihor Kalnytskyi //! :license: BSD, see LICENSE for details //! - -#ifndef TERMCOLOR_HPP_ -#define TERMCOLOR_HPP_ +#pragma once // the following snippet of code detects the current OS and // defines the appropriate macro that is used to wrap some @@ -443,5 +441,3 @@ inline void win_change_attributes(std::ostream &stream, int foreground, int back #undef TERMCOLOR_OS_WINDOWS #undef TERMCOLOR_OS_MACOS #undef TERMCOLOR_OS_LINUX - -#endif // TERMCOLOR_HPP_ From 9b0b2bfd2dfaa603d095f6051f6e3887ecfb1ea1 Mon Sep 17 00:00:00 2001 From: Amithash Prasad Date: Wed, 23 Oct 2024 14:50:55 -0700 Subject: [PATCH 280/479] rackmon2: Add Register Span Test Summary: Add unit tests for register span support which was missed in a previous commit. Reviewed By: alandau Differential Revision: D64849047 fbshipit-source-id: 0e5557cde76a936bd938447da2dbba48785ace8c --- fboss/platform/rackmon/BUCK | 1 + .../rackmon/tests/RegisterSpanTest.cpp | 86 +++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 fboss/platform/rackmon/tests/RegisterSpanTest.cpp diff --git a/fboss/platform/rackmon/BUCK b/fboss/platform/rackmon/BUCK index f87564d4d0925..f01bca8bb3b36 100644 --- a/fboss/platform/rackmon/BUCK +++ b/fboss/platform/rackmon/BUCK @@ -145,6 +145,7 @@ cpp_unittest( "tests/RackmonTest.cpp", "tests/RegisterDescriptorTest.cpp", "tests/RegisterMapTest.cpp", + "tests/RegisterSpanTest.cpp", "tests/RegisterTest.cpp", "tests/RegisterValueTest.cpp", ], diff --git a/fboss/platform/rackmon/tests/RegisterSpanTest.cpp b/fboss/platform/rackmon/tests/RegisterSpanTest.cpp new file mode 100644 index 0000000000000..93da3ad66cbad --- /dev/null +++ b/fboss/platform/rackmon/tests/RegisterSpanTest.cpp @@ -0,0 +1,86 @@ +// Copyright 2024-present Facebook. All Rights Reserved. +#include +#include +#include "Register.h" + +using namespace std; +using namespace testing; +using namespace rackmon; + +class RegisterSpanTest : public ::testing::Test { + protected: + RegisterDescriptor desc[4]; + std::vector regs; + void SetUp() override { + desc[0].begin = 4; + desc[0].length = 2; + desc[0].interval = 1; + desc[1].begin = 6; + desc[1].length = 4; + desc[1].interval = 1; + desc[2].begin = 10; + desc[2].length = 2; + desc[2].interval = 2; + desc[3].begin = 19; + desc[3].length = 1; + regs.emplace_back(desc[0]); + regs.emplace_back(desc[1]); + regs.emplace_back(desc[2]); + regs.emplace_back(desc[3]); + } +}; + +//-------------------------------------------------------- +// RegisterSpanTests +//-------------------------------------------------------- + +TEST_F(RegisterSpanTest, BasicCreate) { + RegisterStoreSpan span(®s[0]); + ASSERT_EQ(span.length(), 2); + ASSERT_TRUE(span.addRegister(®s[1])); + ASSERT_EQ(span.length(), 6); + ASSERT_FALSE(span.addRegister(®s[2])); + ASSERT_FALSE(span.addRegister(®s[3])); + ASSERT_EQ(span.length(), 6); + + ASSERT_TRUE(span.reloadPending(1234)); + auto& flat = span.beginReloadSpan(); + ASSERT_EQ(flat.size(), 6); + for (auto i = 0; i < 6; i++) { + flat[i] = i; + } + span.endReloadSpan(1234); + ASSERT_EQ(regs[0].back().timestamp, 1234); + ASSERT_EQ(regs[1].back().timestamp, 1234); + ASSERT_EQ(regs[0].back().value[0], 0); + ASSERT_EQ(regs[0].back().value[1], 1); + ASSERT_EQ(regs[1].back().value[0], 2); + ASSERT_EQ(regs[1].back().value[1], 3); + ASSERT_EQ(regs[1].back().value[2], 4); + ASSERT_EQ(regs[1].back().value[3], 5); +} + +TEST_F(RegisterSpanTest, spanListTest) { + std::vector spanList{}; + for (auto& reg : regs) { + ASSERT_TRUE(RegisterStoreSpan::buildRegisterSpanList(spanList, reg)); + } + ASSERT_EQ(spanList.size(), 3); + ASSERT_EQ(spanList[0].getSpanAddress(), 4); + ASSERT_EQ(spanList[0].length(), 6); + ASSERT_EQ(spanList[1].getSpanAddress(), 10); + ASSERT_EQ(spanList[1].length(), 2); + ASSERT_EQ(spanList[2].getSpanAddress(), 19); + ASSERT_EQ(spanList[2].length(), 1); + spanList.clear(); + regs[3].disable(); + ASSERT_TRUE(RegisterStoreSpan::buildRegisterSpanList(spanList, regs[0])); + ASSERT_TRUE(RegisterStoreSpan::buildRegisterSpanList(spanList, regs[1])); + ASSERT_TRUE(RegisterStoreSpan::buildRegisterSpanList(spanList, regs[2])); + ASSERT_FALSE(RegisterStoreSpan::buildRegisterSpanList(spanList, regs[3])); + ASSERT_EQ(spanList.size(), 2); + ASSERT_EQ(spanList[0].getSpanAddress(), 4); + ASSERT_EQ(spanList[0].length(), 6); + ASSERT_EQ(spanList[1].getSpanAddress(), 10); + ASSERT_EQ(spanList[1].length(), 2); +} From cc8ca7fd776e5e5e7f450d16bedbe41ec4f6a373 Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Wed, 23 Oct 2024 15:29:18 -0700 Subject: [PATCH 281/479] introduce easy changes in sai switch for chenab sdk Summary: as titled. this is to get started Reviewed By: jasmeetbagga Differential Revision: D63564940 fbshipit-source-id: a05446483880d111811ab230d09a6eefd8d7dcfb --- CMakeLists.txt | 11 +++++++ cmake/AgentHwSaiSwitch.cmake | 10 ++++++ fboss/agent/HwSwitch.cpp | 1 + fboss/agent/hw/sai/hw_test/HwTestAclUtils.cpp | 32 +++++++++++++------ .../hw/sai/switch/SaiAclTableManager.cpp | 20 ++++++++++++ .../agent/hw/sai/switch/SaiBufferManager.cpp | 4 +++ .../agent/hw/sai/switch/SaiHostifManager.cpp | 8 +++++ .../hw/sai/switch/npu/SaiAclTableManager.cpp | 5 ++- 8 files changed, 80 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8497da08a0868..f0edaa24c95be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,12 @@ if ($ENV{SAI_BRCM_IMPL}) set (SAI_BRCM_IMPL ON) endif() +option(CHENAB_SAI_SDK "Build SAI api with CHENAB-SAI extensions" OFF) +if ($ENV{CHENAB_SAI_SDK}) + message(STATUS "ENV CHENAB_SAI_SDK is set") + set (CHENAB_SAI_SDK ON) +endif() + option(BUILD_SAI_FAKE_LINK_TEST "Building of SAI Fake Link Test binaries" OFF) if ($ENV{BUILD_SAI_FAKE_LINK_TEST}) message(STATUS "ENV BUILD_SAI_FAKE_LINK_TEST is set") @@ -185,6 +191,11 @@ if (SAI_BRCM_IMPL) find_path(SAI_EXPERIMENTAL_INCLUDE_DIR NAMES saiswitchextensions.h) include_directories(${SAI_EXPERIMENTAL_INCLUDE_DIR}) message(STATUS, "Experimental dir: ${SAI_EXPERIMENTAL_INCLUDE_DIR}") +elseif(CHENAB_SAI_SDK) + # Chenab-TODO: set experimental directories appropriately + set(SAI_EXPERIMENTAL_INCLUDE_DIR "/var/FBOSS/sai_impl_output/include") + include_directories(${SAI_EXPERIMENTAL_INCLUDE_DIR}) + message(STATUS, "Experimental dir: ${SAI_EXPERIMENTAL_INCLUDE_DIR}") else() find_path(SAI_EXPERIMENTAL_INCLUDE_DIR NAMES diff --git a/cmake/AgentHwSaiSwitch.cmake b/cmake/AgentHwSaiSwitch.cmake index fc168a3ffb738..f0ca5a76e768a 100644 --- a/cmake/AgentHwSaiSwitch.cmake +++ b/cmake/AgentHwSaiSwitch.cmake @@ -68,6 +68,16 @@ elseif (SAI_BRCM_IMPL) fboss/agent/hw/sai/switch/npu/bcm/oss/SaiSwitchManager.cpp fboss/agent/hw/sai/switch/oss/SaiAclTableManager.cpp ) +elseif (CHENAB_SAI_SDK) +# Chenab-TODO: Use non-default files here + list(APPEND SAI_SWITCH_SRC + fboss/agent/hw/sai/switch/oss/SaiSwitch.cpp + fboss/agent/hw/sai/switch/oss/SaiTamManager.cpp + fboss/agent/hw/sai/switch/oss/SaiPortManager.cpp + fboss/agent/hw/sai/switch/oss/SaiAclTableManager.cpp + fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp + fboss/agent/hw/sai/switch/oss/SaiQueueManager.cpp + ) else() list(APPEND SAI_SWITCH_SRC fboss/agent/hw/sai/switch/oss/SaiSwitch.cpp diff --git a/fboss/agent/HwSwitch.cpp b/fboss/agent/HwSwitch.cpp index cbfb80362daeb..76f445cbc06e6 100644 --- a/fboss/agent/HwSwitch.cpp +++ b/fboss/agent/HwSwitch.cpp @@ -85,6 +85,7 @@ constexpr auto kBuildSdkVersion = "SDK Version"; This function will match each type of sdk and produce results accordingly. */ std::tuple normalizeSdkVersion(std::string sdkVersion) { + // Chenab-TODO(pshaikh): add CHENAB SAI support for sdk version normalization /* Matches broadcom SDK version strings (e.g: BCM SDK Version: sdk-6.5.17) */ constexpr auto bcmSdkVerRegex = "BCM SDK Version: sdk-([0-9]{1,2})\\.([0-9]{1,2})\\.([0-9]{1,2})"; diff --git a/fboss/agent/hw/sai/hw_test/HwTestAclUtils.cpp b/fboss/agent/hw/sai/hw_test/HwTestAclUtils.cpp index 10ad2b5f0de76..72db67b8de271 100644 --- a/fboss/agent/hw/sai/hw_test/HwTestAclUtils.cpp +++ b/fboss/agent/hw/sai/hw_test/HwTestAclUtils.cpp @@ -477,11 +477,15 @@ void checkAclEntryAndStatCount( } #if SAI_API_VERSION >= SAI_VERSION(1, 10, 2) - auto aclCounterNameGot = SaiApiTable::getInstance()->aclApi().getAttribute( - AclCounterSaiId(aclCounterIdGot), - SaiAclCounterTraits::Attributes::Label()); - XLOG(DBG2) << "checkAclEntryAndStatCount:: aclCounterNameGot: " - << aclCounterNameGot.data(); + if (hwSwitch->getPlatform()->getAsic()->isSupported( + HwAsic::Feature::ACL_COUNTER_LABEL)) { + auto aclCounterNameGot = + SaiApiTable::getInstance()->aclApi().getAttribute( + AclCounterSaiId(aclCounterIdGot), + SaiAclCounterTraits::Attributes::Label()); + XLOG(DBG2) << "checkAclEntryAndStatCount:: aclCounterNameGot: " + << aclCounterNameGot.data(); + } #endif XLOG(DBG2) << " enablePacketCount: " << enablePacketCount @@ -525,11 +529,15 @@ void checkAclStat( #if SAI_API_VERSION >= SAI_VERSION(1, 10, 2) // Counter name must match what was previously configured - auto aclCounterNameGot = SaiApiTable::getInstance()->aclApi().getAttribute( - AclCounterSaiId(aclCounterIdGot), - SaiAclCounterTraits::Attributes::Label()); - std::string aclCounterNameGotStr(aclCounterNameGot.data()); - EXPECT_EQ(statName, aclCounterNameGotStr); + if (hw->getPlatform()->getAsic()->isSupported( + HwAsic::Feature::ACL_COUNTER_LABEL)) { + auto aclCounterNameGot = + SaiApiTable::getInstance()->aclApi().getAttribute( + AclCounterSaiId(aclCounterIdGot), + SaiAclCounterTraits::Attributes::Label()); + std::string aclCounterNameGotStr(aclCounterNameGot.data()); + EXPECT_EQ(statName, aclCounterNameGotStr); + } // Verify that only the configured 'types' (byte/packet) of counters are // configured. @@ -611,6 +619,10 @@ void checkAclStatDeleted( SaiAclEntryTraits::Attributes::ActionCounter()) .getData(); // Counter name must match what was previously configured + if (!hwSwitch->getPlatform()->getAsic()->isSupported( + HwAsic::Feature::ACL_COUNTER_LABEL)) { + continue; + } auto aclCounterNameGot = SaiApiTable::getInstance()->aclApi().getAttribute( AclCounterSaiId(aclCounterIdGot), SaiAclCounterTraits::Attributes::Label()); diff --git a/fboss/agent/hw/sai/switch/SaiAclTableManager.cpp b/fboss/agent/hw/sai/switch/SaiAclTableManager.cpp index 49e9137a42092..670b4b57e3d1a 100644 --- a/fboss/agent/hw/sai/switch/SaiAclTableManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiAclTableManager.cpp @@ -1418,6 +1418,8 @@ std::set SaiAclTableManager::getSupportedQualifierSet() platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3; bool isTomahawk5 = platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_TOMAHAWK5; + bool isChenab = + platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_CHENAB; if (isTajo) { std::set tajoQualifiers = { @@ -1490,6 +1492,24 @@ std::set SaiAclTableManager::getSupportedQualifierSet() cfg::AclTableQualifier::DST_MAC, cfg::AclTableQualifier::BTH_OPCODE}; return jericho3Qualifiers; + } else if (isChenab) { + /* TODO(pshaikh): review the qualifiers */ + std::set chenabQualifiers = { + cfg::AclTableQualifier::SRC_IPV6, + cfg::AclTableQualifier::DST_IPV6, + cfg::AclTableQualifier::SRC_IPV4, + cfg::AclTableQualifier::DST_IPV4, + cfg::AclTableQualifier::L4_SRC_PORT, + cfg::AclTableQualifier::L4_DST_PORT, + cfg::AclTableQualifier::IP_PROTOCOL, + cfg::AclTableQualifier::SRC_PORT, + cfg::AclTableQualifier::DSCP, + cfg::AclTableQualifier::TTL, + cfg::AclTableQualifier::OUTER_VLAN, + // TODO(pshaikh): Add UDF? + }; + + return chenabQualifiers; } else { std::set bcmQualifiers = { cfg::AclTableQualifier::SRC_IPV6, diff --git a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp index 90373aec9c7c6..6ef797d800866 100644 --- a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp @@ -51,6 +51,9 @@ void assertMaxBufferPoolSize(const SaiPlatform* platform) { if (asic->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { return; } + if (asic->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_CHENAB) { + return; + } auto availableBuffer = getSwitchEgressPoolAvailableSize(platform); auto maxEgressPoolSize = SaiBufferManager::getMaxEgressPoolBytes(platform); switch (asic->getAsicType()) { @@ -103,6 +106,7 @@ uint64_t SaiBufferManager::getMaxEgressPoolBytes(const SaiPlatform* platform) { case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: case cfg::AsicType::ASIC_TYPE_CHENAB: + /* TODO(pshaikh): Chenab, define pool size */ return asic->getMMUSizeBytes(); case cfg::AsicType::ASIC_TYPE_TOMAHAWK: { auto constexpr kNumXpes = 4; diff --git a/fboss/agent/hw/sai/switch/SaiHostifManager.cpp b/fboss/agent/hw/sai/switch/SaiHostifManager.cpp index 586c696b12cf7..b0d13b2f6e8b3 100644 --- a/fboss/agent/hw/sai/switch/SaiHostifManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiHostifManager.cpp @@ -491,6 +491,10 @@ SaiHostifManager::getVoqHandle(const SaiQueueConfig& saiQueueConfig) { void SaiHostifManager::changeCpuQueue( const ControlPlane::PortQueues& oldQueueConfig, const ControlPlane::PortQueues& newQueueConfig) { + if (platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_CHENAB) { + // Chenab-TODO(pshaikh): no way to configure queues on CPU port + return; + } cpuPortHandle_->configuredQueues.clear(); cpuPortHandle_->configuredVoqs.clear(); @@ -570,6 +574,10 @@ void SaiHostifManager::loadCpuPortQueues() { SaiPortTraits::Attributes::QosQueueList queueListAttribute{queueList}; auto queueSaiIdList = SaiApiTable::getInstance()->portApi().getAttribute( cpuPortHandle_->cpuPortId, queueListAttribute); + if (platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_CHENAB) { + // Chenab-TODO(pshaikh): no way to load queues on CPU port + return; + } if (queueSaiIdList.size() == 0) { throw FbossError("no queues exist for cpu port "); } diff --git a/fboss/agent/hw/sai/switch/npu/SaiAclTableManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiAclTableManager.cpp index d49b8416d7b21..5c112b1e2d3be 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiAclTableManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiAclTableManager.cpp @@ -89,6 +89,8 @@ std::vector SaiAclTableManager::getActionTypeList( cfg::AsicType::ASIC_TYPE_JERICHO2; bool isJericho3 = platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3; + bool isChenab = + platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_CHENAB; std::vector actionTypeList{ SAI_ACL_ACTION_TYPE_PACKET_ACTION, @@ -97,7 +99,8 @@ std::vector SaiAclTableManager::getActionTypeList( SAI_ACL_ACTION_TYPE_SET_DSCP, SAI_ACL_ACTION_TYPE_MIRROR_INGRESS}; - if (!(isTajo || isJericho2 || isJericho3)) { + if (!(isTajo || isJericho2 || isJericho3 || isChenab)) { + // Chenab supports egress mirror action in egress table actionTypeList.push_back(SAI_ACL_ACTION_TYPE_MIRROR_EGRESS); } if (platform_->getAsic()->isSupported( From f1d0f4ac760d0b5f603bdffbdce114ba0a486b53 Mon Sep 17 00:00:00 2001 From: Ron He Date: Wed, 23 Oct 2024 15:31:26 -0700 Subject: [PATCH 282/479] Basic testing for half min link tests Summary: As titled. Basic test to bring up aggregate port with 50% min link configuration Reviewed By: msomasundaran Differential Revision: D63882551 fbshipit-source-id: fa5d30c447b9b106962928e931b012ecd0c71f2e --- fboss/agent/test/MultiNodeLacpTests.cpp | 34 ++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/fboss/agent/test/MultiNodeLacpTests.cpp b/fboss/agent/test/MultiNodeLacpTests.cpp index 782f98756a5d0..b50f3f2b57985 100644 --- a/fboss/agent/test/MultiNodeLacpTests.cpp +++ b/fboss/agent/test/MultiNodeLacpTests.cpp @@ -272,7 +272,7 @@ class MultiNodeLacpTest : public MultiNodeTest { } std::vector getSubPorts( - AggregatePortID aggId) { + AggregatePortID aggId) const { const auto& aggPort = sw()->getState()->getAggregatePorts()->getNode(aggId); EXPECT_NE(aggPort, nullptr); return aggPort->sortedSubports(); @@ -526,3 +526,35 @@ TEST_F(MultiNodeRoutingLoop, LoopTraffic) { }; verifyAcrossWarmBoots(setup, verify, setup, verify); } + +class MultiNodeLacpMinLinkTest : public MultiNodeLacpTest { + protected: + cfg::SwitchConfig initialConfig() const override { + auto config = getConfigWithAggPort( + cfg::LacpPortRate::SLOW /* rate */, 0.5 /* minLinkPercentage */); + // Bring down one port for each agg port + for (auto& aggPort : *config.aggregatePorts()) { + const auto portId = *aggPort.key(); + for (auto& port : *config.ports()) { + if (*port.logicalID() == portId) { + port.state() = cfg::PortState::DISABLED; + break; + } + } + } + return config; + } +}; +TEST_F(MultiNodeLacpMinLinkTest, Bringup) { + auto verify = [=, this]() { + auto period = PeriodicTransmissionMachine::LONG_PERIOD * 3; + // ensure that lacp session can stay up post timeout + XLOG(DBG2) << "Waiting for LACP timeout period"; + std::this_thread::sleep_for(period); + for (const auto& aggId : getAggPorts()) { + verifyLacpState(aggId, getSubPorts(aggId).size()); + } + }; + + verifyAcrossWarmBoots(verify); +} From e6db67dc9dafb2886deea209b4d0dc76365ef2f6 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Wed, 23 Oct 2024 16:51:40 -0700 Subject: [PATCH 283/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/3fd503c6e9372dd34d0352b9b87a8737999c028b https://github.com/facebook/buck2-shims-meta/commit/971b2cb76e43b31983d868c6ccb9ee51c441f6e8 https://github.com/facebook/fb303/commit/989cdd9ac964ce1133db7e56e91eab29dc5d8b96 https://github.com/facebook/fbthrift/commit/1f56c0caa92a8d0366d50f33cd65a628b474c23e https://github.com/facebook/folly/commit/7cdb09f801fb4013c440a87455df898131a6c284 https://github.com/facebook/mvfst/commit/0cbf9634b4baea4da56edef5214d19d213426be0 https://github.com/facebook/proxygen/commit/6c0225d09862860921f212bd576cf43ab02fedbf https://github.com/facebook/wangle/commit/1f365afdde61d781eb0d95a156e315049a1a85fe https://github.com/facebookexperimental/edencommon/commit/4c97c4c703df98075d57b528cb5591c2b97bfbb0 https://github.com/facebookexperimental/rust-shed/commit/1b14f0db8ba07cadc8dee8dac3fc84d34e41f371 https://github.com/facebookexternal/PLC-Code/commit/9c0ce8112799110a51dce97aa56741e297ec90c6 https://github.com/facebookincubator/fizz/commit/93f5504c7be6c97a2047384d9f439c208a907a47 Reviewed By: ajb85 fbshipit-source-id: 4b95b883d150cd6cfb5a19c01a03c293fe1c4b32 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index d7aae0ec51fd5..86edf9dec9d4b 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 856e9b37bbb6985a9d7b8ae45c0df16a1174dafb +Subproject commit 989cdd9ac964ce1133db7e56e91eab29dc5d8b96 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index d63ed9deee789..57d4877e93739 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 55e3309e4dcc940d351e485d828028bc168be8b8 +Subproject commit 1f56c0caa92a8d0366d50f33cd65a628b474c23e diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 4feb28a16355f..d50dccfd71da5 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit e57ce302ff7fe0960043b7d6299d96b35d62dd39 +Subproject commit 7cdb09f801fb4013c440a87455df898131a6c284 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 57a18a7941540..348e3b66aaf4f 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit be3f9f585f4af7011b069cb391a7f667b977713b +Subproject commit 1f365afdde61d781eb0d95a156e315049a1a85fe diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 0c559d31a3b82..00dc2b89b226d 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit f614c44619f6d0a66f3b7fa8215449a2f0999223 +Subproject commit 93f5504c7be6c97a2047384d9f439c208a907a47 From 6f599860f16212c39780731f8883185c2d6f00de Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 23 Oct 2024 17:44:30 -0700 Subject: [PATCH 284/479] Get fabric level and isLevel2Fabric APIs Summary: As titled. Will be used in later diffs Reviewed By: shri-khare Differential Revision: D64858135 fbshipit-source-id: 5c6c84b6479468bd758a3f529c6feacbe657ab80 --- fboss/agent/state/DsfNode.cpp | 13 +++++++++++++ fboss/agent/state/DsfNode.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/fboss/agent/state/DsfNode.cpp b/fboss/agent/state/DsfNode.cpp index a674800b00614..5e400786988ea 100644 --- a/fboss/agent/state/DsfNode.cpp +++ b/fboss/agent/state/DsfNode.cpp @@ -85,6 +85,19 @@ std::optional DsfNode::getClusterId() const { return clusterId; } +std::optional DsfNode::getFabricLevel() const { + std::optional fabricLevel; + if (get().has_value()) { + fabricLevel = get()->cref(); + } + return fabricLevel; +} + +bool DsfNode::isLevel2FabricNode() const { + auto fabricLevel = getFabricLevel(); + return fabricLevel.has_value() && fabricLevel.value() == 2; +} + std::optional DsfNode::getLocalSystemPortOffset() const { std::optional ret; if (get().has_value()) { diff --git a/fboss/agent/state/DsfNode.h b/fboss/agent/state/DsfNode.h index 243c48b75e75a..237c82bc68e57 100644 --- a/fboss/agent/state/DsfNode.h +++ b/fboss/agent/state/DsfNode.h @@ -44,6 +44,8 @@ class DsfNode : public ThriftStructNode { std::optional getClusterId() const; std::optional getLocalSystemPortOffset() const; std::optional getGlobalSystemPortOffset() const; + std::optional getFabricLevel() const; + bool isLevel2FabricNode() const; private: // Inherit the constructors required for clone() From b91a363528bf0b1c775da43d6e32791367988bad Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 23 Oct 2024 17:44:30 -0700 Subject: [PATCH 285/479] set local/global sys port offsets + UTs Summary: as titled Reviewed By: zechengh09 Differential Revision: D64864800 Privacy Context Container: L1125642 fbshipit-source-id: 71cf2f2feb3d4c43ed0a63cf3a05141da79b3943 --- fboss/agent/state/DsfNode.cpp | 16 ++++++++++++++++ fboss/agent/state/DsfNode.h | 2 ++ fboss/agent/state/tests/DsfNodeTests.cpp | 16 ++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/fboss/agent/state/DsfNode.cpp b/fboss/agent/state/DsfNode.cpp index 5e400786988ea..7a920da27b672 100644 --- a/fboss/agent/state/DsfNode.cpp +++ b/fboss/agent/state/DsfNode.cpp @@ -31,6 +31,22 @@ void DsfNode::setName(const std::string& name) { set(name); } +void DsfNode::setLocalSystemPortOffset(std::optional val) { + if (val.has_value()) { + set(val.value()); + } else { + remove(); + } +} + +void DsfNode::setGlobalSystemPortOffset(std::optional val) { + if (val.has_value()) { + set(val.value()); + } else { + remove(); + } +} + cfg::DsfNodeType DsfNode::getType() const { return get()->cref(); } diff --git a/fboss/agent/state/DsfNode.h b/fboss/agent/state/DsfNode.h index 237c82bc68e57..09ac110cd797f 100644 --- a/fboss/agent/state/DsfNode.h +++ b/fboss/agent/state/DsfNode.h @@ -44,6 +44,8 @@ class DsfNode : public ThriftStructNode { std::optional getClusterId() const; std::optional getLocalSystemPortOffset() const; std::optional getGlobalSystemPortOffset() const; + void setLocalSystemPortOffset(std::optional val); + void setGlobalSystemPortOffset(std::optional val); std::optional getFabricLevel() const; bool isLevel2FabricNode() const; diff --git a/fboss/agent/state/tests/DsfNodeTests.cpp b/fboss/agent/state/tests/DsfNodeTests.cpp index 6d4221bcee2d6..21a7541a4242d 100644 --- a/fboss/agent/state/tests/DsfNodeTests.cpp +++ b/fboss/agent/state/tests/DsfNodeTests.cpp @@ -251,3 +251,19 @@ TEST(DSFNode, loopackIpsSorted) { }); EXPECT_EQ(loopbacksSorted, dsfNode->getLoopbackIpsSorted()); } + +TEST(DsfNode, localGlobalSysPortOffset) { + auto dsfNode = makeDsfNode(); + EXPECT_TRUE(dsfNode->getLocalSystemPortOffset().has_value()); + EXPECT_TRUE(dsfNode->getGlobalSystemPortOffset().has_value()); + dsfNode->setGlobalSystemPortOffset(std::nullopt); + dsfNode->setLocalSystemPortOffset(std::nullopt); + EXPECT_FALSE(dsfNode->getLocalSystemPortOffset().has_value()); + EXPECT_FALSE(dsfNode->getGlobalSystemPortOffset().has_value()); + dsfNode->setLocalSystemPortOffset(42); + dsfNode->setGlobalSystemPortOffset(43); + ASSERT_TRUE(dsfNode->getLocalSystemPortOffset().has_value()); + EXPECT_EQ(dsfNode->getLocalSystemPortOffset().value(), 42); + ASSERT_TRUE(dsfNode->getGlobalSystemPortOffset().has_value()); + EXPECT_EQ(dsfNode->getGlobalSystemPortOffset().value(), 43); +} From 21bd65db73a9246623efd541ced60b7d36f05597 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Wed, 23 Oct 2024 18:14:41 -0700 Subject: [PATCH 286/479] fboss_hw_benchmark_config_sync Reviewed By: srikrishnagopu Differential Revision: D64813450 fbshipit-source-id: e651a17d4360de80163b93ffd0d1aae12a3b94d4 --- fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON | 2 +- fboss/oss/hw_bench_configs/minipack.agent.materialized_JSON | 2 ++ fboss/oss/hw_bench_configs/wedge400.agent.materialized_JSON | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON b/fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON index 3d054570e5f6c..bdfb67e4e7490 100644 --- a/fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON +++ b/fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON @@ -1265,7 +1265,7 @@ "sai_pkt_rx_custom_cfg": "1", "sai_pkt_rx_pkt_size": "16512", "sai_recycle_port_lane_base": "440", - "sai_trigger_linkscan_remote_local_faults": "0", + "sai_trigger_linkscan_remote_local_faults": "1", "sai_voq_wm_latency_enable": "1", "sat_enable.BCM8889X_ADAPTER": "1", "soc_family.BCM8889X": "BCM8889X", diff --git a/fboss/oss/hw_bench_configs/minipack.agent.materialized_JSON b/fboss/oss/hw_bench_configs/minipack.agent.materialized_JSON index 199a65b038464..03a6457f376c3 100644 --- a/fboss/oss/hw_bench_configs/minipack.agent.materialized_JSON +++ b/fboss/oss/hw_bench_configs/minipack.agent.materialized_JSON @@ -272,10 +272,12 @@ "dport_map_port_94": "113", "dport_map_port_95": "114", "dpr_clock_frequency": "1000", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "1", "l2xmsg_shadow_hit_bits": "0", "l3_alpm_enable": "2", "l3_alpm_ipv6_128b_bkt_rsvd": "1", + "l3_max_ecmp_mode": "1", "load_firmware": "0x2", "macro_flow_hash_shuffle_random_seed": "34345645", "mem_cache_enable": "0", diff --git a/fboss/oss/hw_bench_configs/wedge400.agent.materialized_JSON b/fboss/oss/hw_bench_configs/wedge400.agent.materialized_JSON index 401dee6aef12a..7205a697ef9e2 100644 --- a/fboss/oss/hw_bench_configs/wedge400.agent.materialized_JSON +++ b/fboss/oss/hw_bench_configs/wedge400.agent.materialized_JSON @@ -193,10 +193,12 @@ "dport_map_port_96": "9", "dport_map_port_97": "10", "dpr_clock_frequency": "1000", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "1", "l2xmsg_shadow_hit_bits": "0", "l3_alpm_enable": "2", "l3_alpm_ipv6_128b_bkt_rsvd": "1", + "l3_max_ecmp_mode": "1", "load_firmware": "0x2", "macro_flow_hash_shuffle_random_seed": "34345645", "mem_cache_enable": "0", From 54ce9756233c1554cf66a399f8ca37e63c98cd44 Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Wed, 23 Oct 2024 18:26:55 -0700 Subject: [PATCH 287/479] Convert RecurseVisitorTests to TYPED_TEST Summary: Add TYPED_TESTS for RecurseVisitorTests so coverage of both pure COW and HybridCow storage modes can be enabled. Right now only enabling hybrid nodes. Reviewed By: wilsonwinhi Differential Revision: D64857675 fbshipit-source-id: b1f775e56ad1a12955d9eb726f4db4b752c60422 --- .../visitors/tests/RecurseVisitorTests.cpp | 94 ++++++++++++++----- 1 file changed, 69 insertions(+), 25 deletions(-) diff --git a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp index eb80564497e63..80a9b65f0d356 100644 --- a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp @@ -15,6 +15,7 @@ using folly::dynamic; using namespace facebook::fboss; using namespace facebook::fboss::thrift_cow; using k = facebook::fboss::test_tags::strings; +using namespace testing; namespace { @@ -51,11 +52,36 @@ TestStruct createTestStruct(folly::dynamic testDyn) { } // namespace -TEST(RecurseVisitorTests, TestFullRecurse) { +template +struct TestParams { + static constexpr auto hybridStorage = EnableHybridStorage; +}; + +using StorageTestTypes = ::testing::Types>; + +template +class RecurseVisitorTests : public ::testing::Test { + public: + auto initNode(auto val) { + auto constexpr isHybridStorage = TestParams::hybridStorage; + using RootType = std::remove_cvref_t; + return std::make_shared, + TestParams::hybridStorage>>(val); + } + bool isHybridStorage() { + return TestParams::hybridStorage; + } +}; + +TYPED_TEST_SUITE(RecurseVisitorTests, StorageTestTypes); + +TYPED_TEST(RecurseVisitorTests, TestFullRecurse) { auto testDyn = createTestDynamic(); auto structA = createTestStruct(testDyn); - auto nodeA = std::make_shared>(structA); + auto nodeA = this->initNode(structA); std::map, folly::dynamic> visited; auto processPath = [&visited]( const std::vector& path, auto&& node) { @@ -75,9 +101,6 @@ TEST(RecurseVisitorTests, TestFullRecurse) { {{"hybridSet"}, dynamic::array()}, {{"hybridUnion"}, dynamic::object()}, {{"hybridStruct"}, testDyn["hybridStruct"]}, -#ifndef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - {{"hybridStruct", "childMap"}, testDyn["hybridStruct"]["childMap"]}, -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ {{"inlineBool"}, testDyn["inlineBool"]}, {{"inlineInt"}, testDyn["inlineInt"]}, {{"inlineString"}, testDyn["inlineString"]}, @@ -113,6 +136,15 @@ TEST(RecurseVisitorTests, TestFullRecurse) { {{"mapA"}, dynamic::object()}, {{"mapB"}, dynamic::object()}}; + std::map, folly::dynamic> hybridLeaves = { + {{"hybridStruct", "childMap"}, testDyn["hybridStruct"]["childMap"]}}; + + if (!this->isHybridStorage()) { + for (const auto& entry : hybridLeaves) { + expected.insert(entry); + } + } + EXPECT_EQ(visited.size(), expected.size()); for (auto& [path, dyn] : expected) { EXPECT_EQ(dyn, visited[path]) @@ -120,11 +152,11 @@ TEST(RecurseVisitorTests, TestFullRecurse) { } } -TEST(RecurseVisitorTests, TestLeafRecurse) { +TYPED_TEST(RecurseVisitorTests, TestLeafRecurse) { auto testDyn = createTestDynamic(); auto structA = createTestStruct(testDyn); - auto nodeA = std::make_shared>(structA); + auto nodeA = this->initNode(structA); std::map, folly::dynamic> visited; auto processPath = [&visited]( const std::vector& path, auto&& node) { @@ -134,15 +166,6 @@ TEST(RecurseVisitorTests, TestLeafRecurse) { RootRecurseVisitor::visit(nodeA, RecurseVisitMode::LEAVES, processPath); std::map, folly::dynamic> expected = { -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - {{"hybridMap"}, testDyn["hybridMap"]}, - {{"hybridMapOfI32ToStruct"}, testDyn["hybridMapOfI32ToStruct"]}, - {{"hybridMapOfMap"}, testDyn["hybridMapOfMap"]}, - {{"hybridList"}, testDyn["hybridList"]}, - {{"hybridSet"}, testDyn["hybridSet"]}, - {{"hybridUnion"}, testDyn["hybridUnion"]}, - {{"hybridStruct"}, testDyn["hybridStruct"]}, -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ {{"inlineBool"}, testDyn["inlineBool"]}, {{"inlineInt"}, testDyn["inlineInt"]}, {{"inlineString"}, testDyn["inlineString"]}, @@ -159,6 +182,21 @@ TEST(RecurseVisitorTests, TestLeafRecurse) { {{"mapOfEnumToStruct", "3", "invert"}, testDyn["mapOfEnumToStruct"][3]["invert"]}}; + std::map, folly::dynamic> hybridNodes = { + {{"hybridMap"}, testDyn["hybridMap"]}, + {{"hybridMapOfI32ToStruct"}, testDyn["hybridMapOfI32ToStruct"]}, + {{"hybridMapOfMap"}, testDyn["hybridMapOfMap"]}, + {{"hybridList"}, testDyn["hybridList"]}, + {{"hybridSet"}, testDyn["hybridSet"]}, + {{"hybridUnion"}, testDyn["hybridUnion"]}, + {{"hybridStruct"}, testDyn["hybridStruct"]}}; + + if (this->isHybridStorage()) { + for (const auto& entry : hybridNodes) { + expected.insert(entry); + } + } + EXPECT_EQ(visited.size(), expected.size()); for (auto& [path, dyn] : expected) { EXPECT_EQ(dyn, visited[path]) @@ -173,15 +211,6 @@ TEST(RecurseVisitorTests, TestLeafRecurse) { processPath); expected = { -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - {{"27"}, testDyn["hybridMap"]}, - {{"28"}, testDyn["hybridList"]}, - {{"29"}, testDyn["hybridSet"]}, - {{"30"}, testDyn["hybridUnion"]}, - {{"31"}, testDyn["hybridStruct"]}, - {{"32"}, testDyn["hybridMapOfI32ToStruct"]}, - {{"33"}, testDyn["hybridMapOfMap"]}, -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ {{"1"}, testDyn["inlineBool"]}, {{"2"}, testDyn["inlineInt"]}, {{"3"}, testDyn["inlineString"]}, @@ -195,6 +224,21 @@ TEST(RecurseVisitorTests, TestLeafRecurse) { {{"15", "3", "2"}, testDyn["mapOfEnumToStruct"][3]["max"]}, {{"15", "3", "3"}, testDyn["mapOfEnumToStruct"][3]["invert"]}}; + hybridNodes = { + {{"27"}, testDyn["hybridMap"]}, + {{"28"}, testDyn["hybridList"]}, + {{"29"}, testDyn["hybridSet"]}, + {{"30"}, testDyn["hybridUnion"]}, + {{"31"}, testDyn["hybridStruct"]}, + {{"32"}, testDyn["hybridMapOfI32ToStruct"]}, + {{"33"}, testDyn["hybridMapOfMap"]}}; + + if (this->isHybridStorage()) { + for (const auto& entry : hybridNodes) { + expected.insert(entry); + } + } + EXPECT_EQ(visited.size(), expected.size()); for (auto& [path, dyn] : expected) { EXPECT_EQ(dyn, visited[path]) From 83e1a62f1b666aba4975b39224b168666bf2b220 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Wed, 23 Oct 2024 18:42:47 -0700 Subject: [PATCH 288/479] Set shared/sram PFC buffer thresholds for PG in state Summary: As titled Reviewed By: jasmeetbagga Differential Revision: D64739015 fbshipit-source-id: 5d49dc4dd8c209819d7d929dc172e0bb48431d59 --- fboss/agent/state/PortPgConfig.h | 64 ++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/fboss/agent/state/PortPgConfig.h b/fboss/agent/state/PortPgConfig.h index 3c2ad51dbff74..3cc8023a2213f 100644 --- a/fboss/agent/state/PortPgConfig.h +++ b/fboss/agent/state/PortPgConfig.h @@ -128,6 +128,70 @@ class PortPgConfig ref() = bufferPoolConfigPtr; } + std::optional getMaxSharedXoffThresholdBytes() const { + if (const auto& maxSharedXoffThresholdBytes = + cref()) { + return std::optional(maxSharedXoffThresholdBytes->cref()); + } + return std::nullopt; + } + + void setMaxSharedXoffThresholdBytes(uint64_t maxSharedXoffThresholdBytes) { + set( + maxSharedXoffThresholdBytes); + } + + std::optional getMinSharedXoffThresholdBytes() const { + if (const auto& minSharedXoffThresholdBytes = + cref()) { + return std::optional(minSharedXoffThresholdBytes->cref()); + } + return std::nullopt; + } + + void setMinSharedXoffThresholdBytes(uint64_t minSharedXoffThresholdBytes) { + set( + minSharedXoffThresholdBytes); + } + + std::optional getMaxSramXoffThresholdBytes() const { + if (const auto& maxSramXoffThresholdBytes = + cref()) { + return std::optional(maxSramXoffThresholdBytes->cref()); + } + return std::nullopt; + } + + void setMaxSramXoffThresholdBytes(uint64_t maxSramXoffThresholdBytes) { + set( + maxSramXoffThresholdBytes); + } + + std::optional getMinSramXoffThresholdBytes() const { + if (const auto& minSramXoffThresholdBytes = + cref()) { + return std::optional(minSramXoffThresholdBytes->cref()); + } + return std::nullopt; + } + + void setMinSramXoffThresholdBytes(uint64_t minSramXoffThresholdBytes) { + set( + minSramXoffThresholdBytes); + } + + std::optional getSramResumeOffsetBytes() const { + if (auto sramResumeOffsetBytes = + safe_cref()) { + return sramResumeOffsetBytes->toThrift(); + } + return std::nullopt; + } + + void setSramResumeOffsetBytes(uint64_t sramResumeOffsetBytes) { + set(sramResumeOffsetBytes); + } + static state::PortPgFields makeThrift( uint8_t id, std::optional scalingFactor, From ac7d6aec6ed7bd2d1f8db4cbc5aeaa8b3aeeb280 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Wed, 23 Oct 2024 18:42:47 -0700 Subject: [PATCH 289/479] Handle shared/sram PG PFC thresholds and populate state Summary: As titled Reviewed By: jasmeetbagga Differential Revision: D64739016 fbshipit-source-id: 165cbc94f65acff17f5be52a2c611be65cb4b603 --- fboss/agent/ApplyThriftConfig.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 6ac99603b0d0e..263249c392fda 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -1813,6 +1813,23 @@ std::shared_ptr ThriftConfigApplier::createPortPg( pgCfg->setResumeOffsetBytes(*resumeOffsetBytes); } pgCfg->setBufferPoolName(*cfg->bufferPoolName()); + if (const auto maxSharedXoffThresholdBytes = + cfg->maxSharedXoffThresholdBytes()) { + pgCfg->setMaxSharedXoffThresholdBytes(*maxSharedXoffThresholdBytes); + } + if (const auto minSharedXoffThresholdBytes = + cfg->minSharedXoffThresholdBytes()) { + pgCfg->setMinSharedXoffThresholdBytes(*minSharedXoffThresholdBytes); + } + if (const auto maxSramXoffThresholdBytes = cfg->maxSramXoffThresholdBytes()) { + pgCfg->setMaxSramXoffThresholdBytes(*maxSramXoffThresholdBytes); + } + if (const auto minSramXoffThresholdBytes = cfg->minSramXoffThresholdBytes()) { + pgCfg->setMinSramXoffThresholdBytes(*minSramXoffThresholdBytes); + } + if (const auto sramResumeOffsetBytes = cfg->sramResumeOffsetBytes()) { + pgCfg->setSramResumeOffsetBytes(*sramResumeOffsetBytes); + } return pgCfg; } From 45dc47a4707e097914d6834f54b5baabeb9a9b56 Mon Sep 17 00:00:00 2001 From: Jeffrey Leung Date: Wed, 23 Oct 2024 18:52:48 -0700 Subject: [PATCH 290/479] Add opt timeout param to Thrift createClient Summary: Add optional timeout parameter to the method to create a client. Previously, the timeout was set to 2 minutes without any specific reason. The default timeout is retained for backwards compatibility and consistency. Reviewed By: jasmeetbagga Differential Revision: D64792401 fbshipit-source-id: 73f4ffb772ce1bb9dd7775e868d68b5568cf470f --- fboss/cli/fboss2/utils/CmdClientUtils.cpp | 7 +++++++ fboss/cli/fboss2/utils/CmdClientUtils.h | 6 ++++++ fboss/cli/fboss2/utils/CmdClientUtilsCommon.h | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/fboss/cli/fboss2/utils/CmdClientUtils.cpp b/fboss/cli/fboss2/utils/CmdClientUtils.cpp index ad1033bd2cd2b..8a2f70f9c9a0f 100644 --- a/fboss/cli/fboss2/utils/CmdClientUtils.cpp +++ b/fboss/cli/fboss2/utils/CmdClientUtils.cpp @@ -17,6 +17,13 @@ std::unique_ptr createClient( return utils::createAgentClient(hostInfo); } +template <> +std::unique_ptr createClient( + const HostInfo& hostInfo, + const std::chrono::milliseconds& timeout) { + return utils::createAgentClient(hostInfo, timeout); +} + template <> std::unique_ptr> createClient( const HostInfo& hostInfo, diff --git a/fboss/cli/fboss2/utils/CmdClientUtils.h b/fboss/cli/fboss2/utils/CmdClientUtils.h index 663ebd4cd8f2e..5b055ee031fd0 100644 --- a/fboss/cli/fboss2/utils/CmdClientUtils.h +++ b/fboss/cli/fboss2/utils/CmdClientUtils.h @@ -17,6 +17,8 @@ #include "fboss/led_service/if/gen-cpp2/LedService.h" #include "fboss/qsfp_service/if/gen-cpp2/QsfpService.h" +#include + namespace facebook::fboss::utils { using RunForHwAgentFn = std::function createAgentClient( const HostInfo& hostInfo); +std::unique_ptr createAgentClient( + const HostInfo& hostInfo, + const std::chrono::milliseconds& timeout); + std::unique_ptr> createAgentClient( const HostInfo& hostInfo, int switchIndex); diff --git a/fboss/cli/fboss2/utils/CmdClientUtilsCommon.h b/fboss/cli/fboss2/utils/CmdClientUtilsCommon.h index 90884651ac8da..69e017a6c7da9 100644 --- a/fboss/cli/fboss2/utils/CmdClientUtilsCommon.h +++ b/fboss/cli/fboss2/utils/CmdClientUtilsCommon.h @@ -25,6 +25,11 @@ std::unique_ptr createClient(const HostInfo& hostInfo); template std::unique_ptr createClient(const HostInfo& hostInfo, int switchIndex); +template +std::unique_ptr createClient( + const HostInfo& hostInfo, + const std::chrono::milliseconds& timeout); + // Some clients do not require info about host info template std::unique_ptr createClient(); From bcdcb2bc602ff2bbfe73cfaddb7ab6cfd06961c7 Mon Sep 17 00:00:00 2001 From: Wei-Cheng Lin Date: Wed, 23 Oct 2024 18:53:40 -0700 Subject: [PATCH 291/479] static flag to disable/enable hybrid cow feature: push EnalbeHybridStorage down to Resolver Summary: push the static flag down to `StructMemberTraits`, where the resolving if skip_thrift_cow happens Differential Revision: D64775849 Privacy Context Container: L1125642 fbshipit-source-id: f513a55faa264435367da4a49221959d77649225 --- fboss/thrift_cow/nodes/ThriftStructNode-inl.h | 7 +- fboss/thrift_cow/nodes/Traits.h | 17 ++-- .../tests/ThriftHybridStructNodeTests.cpp | 77 +++++++++++---- .../nodes/tests/ThriftStructNodeTests.cpp | 95 ++++++++++++++++--- .../visitors/tests/PathVisitorTests.cpp | 15 ++- 5 files changed, 162 insertions(+), 49 deletions(-) diff --git a/fboss/thrift_cow/nodes/ThriftStructNode-inl.h b/fboss/thrift_cow/nodes/ThriftStructNode-inl.h index 27785442ccae7..0add9ffca7fa0 100644 --- a/fboss/thrift_cow/nodes/ThriftStructNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftStructNode-inl.h @@ -156,7 +156,7 @@ struct ChildInvoke { template < typename TType, - typename Derived = ThriftStructResolver, + typename Derived = ThriftStructResolver, bool EnableHybridStorage = false> struct ThriftStructFields : public FieldBaseType { using Self = ThriftStructFields; @@ -169,7 +169,8 @@ struct ThriftStructFields : public FieldBaseType { using Members = typename Info::members; // Extracting useful common types out of each member via Traits.h - using MemberTypes = fatal::transform>; + using MemberTypes = fatal:: + transform>; // type list of members with SkipThriftCow enabled using MemberTypesWithSkipThriftCow = @@ -422,7 +423,7 @@ struct ThriftStructFields : public FieldBaseType { template < typename TType, - typename Resolver = ThriftStructResolver, + typename Resolver = ThriftStructResolver, bool EnableHybridStorage = false> class ThriftStructNode : public NodeBaseT< typename Resolver::type, diff --git a/fboss/thrift_cow/nodes/Traits.h b/fboss/thrift_cow/nodes/Traits.h index aa124dcccb286..8bb7493f9df5a 100644 --- a/fboss/thrift_cow/nodes/Traits.h +++ b/fboss/thrift_cow/nodes/Traits.h @@ -16,11 +16,14 @@ namespace facebook::fboss::thrift_cow { -template +template struct ThriftStructResolver { // if resolver is not specialized for given thrift type, default to // ThriftStructNode - using type = ThriftStructNode, false>; + using type = ThriftStructNode< + TType, + ThriftStructResolver, + EnableHybridStorage>; }; template @@ -167,7 +170,7 @@ struct read_annotation_allow_skip_thrift_cow< fatal_true>::value; }; -template +template struct StructMemberTraits { using member = Member; using traits = StructMemberTraits; @@ -177,7 +180,7 @@ struct StructMemberTraits { // read member annotations using member_annotations = typename Member::annotations; - static constexpr bool allowSkipThriftCow = + static constexpr bool allowSkipThriftCow = EnableHybridStorage && read_annotation_allow_skip_thrift_cow::value; // need to resolve here @@ -186,7 +189,7 @@ struct StructMemberTraits { typename std::shared_ptr>, typename ConvertToNodeTraits::type>; using isChild = std::conditional_t< - read_annotation_allow_skip_thrift_cow::value, + allowSkipThriftCow, std::false_type, typename ConvertToNodeTraits::isChild>; @@ -197,10 +200,10 @@ struct StructMemberTraits { default_type>; }; -template +template struct ExtractStructFields { template - using apply = StructMemberTraits; + using apply = StructMemberTraits; }; template diff --git a/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp b/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp index b807eaba4eddb..fed21264fa9ce 100644 --- a/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp +++ b/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp @@ -67,7 +67,7 @@ void thriftStructNodeAnnotations() { { ThriftStructFields< TestStruct, - ThriftStructResolver, + ThriftStructResolver, EnableHybridStorage> fields; @@ -81,7 +81,7 @@ void thriftStructNodeAnnotations() { { ThriftStructNode< TestStruct, - ThriftStructResolver, + ThriftStructResolver, EnableHybridStorage> node; @@ -108,7 +108,7 @@ template void testHybridNodeTypes() { ThriftStructNode< TestStruct, - ThriftStructResolver, + ThriftStructResolver, EnableHybridStorage> node; // cow member @@ -121,8 +121,14 @@ void testHybridNodeTypes() { using underlying_type = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v>); - using ref_type = folly::remove_cvref_tref())>; - static_assert(std::is_same_v>); + static_assert( + std::is_same_v< + typename decltype(valHybrid)::element_type::CowType, + HybridNodeType> == EnableHybridStorage); + if constexpr (EnableHybridStorage) { + using ref_type = folly::remove_cvref_tref())>; + static_assert(std::is_same_v>); + } #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ } @@ -135,7 +141,7 @@ template void thriftStructFieldsHybridMemberGetSet() { ThriftStructFields< TestStruct, - ThriftStructResolver, + ThriftStructResolver, EnableHybridStorage> fields; @@ -153,9 +159,15 @@ void thriftStructFieldsHybridMemberGetSet() { #ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ fields.template set(*data); auto valHybrid = fields.template get(); - ASSERT_EQ(valHybrid->cref().size(), 2); - ASSERT_EQ(valHybrid->cref().at(1), false); - ASSERT_EQ(valHybrid->cref().at(2), true); + static_assert( + std::is_same_v< + typename decltype(valHybrid)::element_type::CowType, + HybridNodeType> == EnableHybridStorage); + if constexpr (EnableHybridStorage) { + ASSERT_EQ(valHybrid->cref().size(), 2); + ASSERT_EQ(valHybrid->cref().at(1), false); + ASSERT_EQ(valHybrid->cref().at(2), true); + } #endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ } @@ -172,7 +184,7 @@ template void thriftStructFieldsHybridMemberToFromThrift() { ThriftStructFields< TestStruct, - ThriftStructResolver, + ThriftStructResolver, EnableHybridStorage> fields; @@ -200,7 +212,7 @@ template void thriftStructNodeHybridMemberToFromThrift() { ThriftStructNode< TestStruct, - ThriftStructResolver, + ThriftStructResolver, EnableHybridStorage> node; @@ -228,7 +240,7 @@ template void testHybridNodeMemberTypes() { ThriftStructNode< TestStruct, - ThriftStructResolver, + ThriftStructResolver, EnableHybridStorage> node; @@ -240,8 +252,14 @@ void testHybridNodeMemberTypes() { using underlying_type_l = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v>); - using ref_type_l = folly::remove_cvref_tref())>; - static_assert(std::is_same_v>); + static_assert( + std::is_same_v< + typename decltype(v_list)::element_type::CowType, + HybridNodeType> == EnableHybridStorage); + if constexpr (EnableHybridStorage) { + using ref_type_l = folly::remove_cvref_tref())>; + static_assert(std::is_same_v>); + } // set ASSERT_EQ( @@ -250,8 +268,14 @@ void testHybridNodeMemberTypes() { auto v_set = node.template get(); using underlying_type_s = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v>); - using ref_type_s = folly::remove_cvref_tref())>; - static_assert(std::is_same_v>); + static_assert( + std::is_same_v< + typename decltype(v_set)::element_type::CowType, + HybridNodeType> == EnableHybridStorage); + if constexpr (EnableHybridStorage) { + using ref_type_s = folly::remove_cvref_tref())>; + static_assert(std::is_same_v>); + } // union ASSERT_EQ( @@ -261,9 +285,14 @@ void testHybridNodeMemberTypes() { using underlying_type_u = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v); - using ref_type_u = folly::remove_cvref_tref())>; - static_assert(std::is_same_v); - + static_assert( + std::is_same_v< + typename decltype(v_union)::element_type::CowType, + HybridNodeType> == EnableHybridStorage); + if constexpr (EnableHybridStorage) { + using ref_type_u = folly::remove_cvref_tref())>; + static_assert(std::is_same_v); + } // child struct ASSERT_EQ( node.template isSkipThriftCowEnabled(), @@ -272,8 +301,14 @@ void testHybridNodeMemberTypes() { using underlying_type_c = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v); - using ref_type_c = folly::remove_cvref_tref())>; - static_assert(std::is_same_v); + static_assert( + std::is_same_v< + typename decltype(v_struct)::element_type::CowType, + HybridNodeType> == EnableHybridStorage); + if constexpr (EnableHybridStorage) { + using ref_type_c = folly::remove_cvref_tref())>; + static_assert(std::is_same_v); + } } TYPED_TEST_P(ThriftHybridStructNodeTestSuite, TestHybridNodeMemberTypes) { diff --git a/fboss/thrift_cow/nodes/tests/ThriftStructNodeTests.cpp b/fboss/thrift_cow/nodes/tests/ThriftStructNodeTests.cpp index 308baa8fcab30..8275154000f12 100644 --- a/fboss/thrift_cow/nodes/tests/ThriftStructNodeTests.cpp +++ b/fboss/thrift_cow/nodes/tests/ThriftStructNodeTests.cpp @@ -336,7 +336,14 @@ TEST(ThriftStructNodeTests, ThriftStructNodeClone) { ASSERT_TRUE(newNode->template cref()->isPublished()); } -TEST(ThriftStructNodeTests, ThriftStructNodeModify) { +template +class ThriftStructNodeTestSuite : public ::testing::Test {}; + +TYPED_TEST_SUITE_P(ThriftStructNodeTestSuite); + +// no annotation +template +void thriftStructNodeModify() { auto portRange = buildPortRange(100, 999); TestStruct data; @@ -345,36 +352,78 @@ TEST(ThriftStructNodeTests, ThriftStructNodeModify) { data.inlineString() = "HelloThere"; data.inlineStruct() = std::move(portRange); - auto node = std::make_shared>(data); - + auto node = std::make_shared, + EnableHybridStorage>>(data); + static_assert(!std::is_same_v< + typename decltype(node)::element_type::CowType, + HybridNodeType>); ASSERT_FALSE(node->isPublished()); - ASSERT_FALSE(node->template cref()->isPublished()); + if constexpr (!EnableHybridStorage) { + ASSERT_FALSE(node->template cref()->isPublished()); + } node->publish(); - ASSERT_TRUE(node->isPublished()); - ASSERT_TRUE(node->template cref()->isPublished()); + if constexpr (!EnableHybridStorage) { + ASSERT_TRUE(node->template cref()->isPublished()); + } - ThriftStructNode::modify(&node, "inlineStruct"); - ASSERT_FALSE(node->isPublished()); - ASSERT_FALSE(node->template cref()->isPublished()); + ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage>::modify(&node, "inlineStruct"); + + static_assert(!std::is_same_v< + typename decltype(node->template get< + k::inlineStruct>())::element_type::CowType, + HybridNodeType>); + + if constexpr (!EnableHybridStorage) { + ASSERT_FALSE(node->isPublished()); + ASSERT_FALSE(node->template cref()->isPublished()); + } // now try modifying a missing optional field ASSERT_FALSE(node->template isSet()); - ThriftStructNode::modify(&node, "optionalString"); + ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage>::modify(&node, "optionalString"); ASSERT_TRUE(node->template isSet()); - node = std::make_shared>(data); + static_assert(!std::is_same_v< + typename folly::remove_cvref_t< + decltype(node->template get() + .value())>::CowType, + HybridNodeType>); + + node = std::make_shared, + EnableHybridStorage>>(data); node->publish(); - auto& inLineBool = ThriftStructNode::modify(&node); + auto& inLineBool = ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage>::template modify(&node); EXPECT_FALSE(node->isPublished()); inLineBool->set(false); - auto& optionalStruct1 = - ThriftStructNode::modify(&node); + auto& optionalStruct1 = ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage>::template modify(&node); EXPECT_FALSE(optionalStruct1->isPublished()); optionalStruct1->fromThrift(buildPortRange(1, 10)); + static_assert(!std::is_same_v< + typename folly::remove_cvref_t< + decltype(node->template get())>:: + element_type::CowType, + HybridNodeType>); + node->publish(); EXPECT_TRUE(node->isPublished()); @@ -383,7 +432,7 @@ TEST(ThriftStructNodeTests, ThriftStructNodeModify) { EXPECT_TRUE(obj1.optionalStruct().has_value()); EXPECT_EQ(obj1.optionalStruct().value(), buildPortRange(1, 10)); - auto& optionalStruct2 = node->modify(&node); + auto& optionalStruct2 = node->template modify(&node); optionalStruct2.reset(); node->publish(); @@ -391,6 +440,22 @@ TEST(ThriftStructNodeTests, ThriftStructNodeModify) { EXPECT_FALSE(obj2.optionalStruct().has_value()); } +TYPED_TEST_P(ThriftStructNodeTestSuite, ThriftStructNodeModify) { + // non-annotated fields + thriftStructNodeModify(); + thriftStructNodeModify(); + // TODO: annotated fields +} + +using EnableHybridStorageTypes = testing::Types; + +REGISTER_TYPED_TEST_SUITE_P(ThriftStructNodeTestSuite, ThriftStructNodeModify); + +INSTANTIATE_TYPED_TEST_SUITE_P( + ThriftStructNodeTest, + ThriftStructNodeTestSuite, + EnableHybridStorageTypes); + TEST(ThriftStructNodeTests, ThriftStructNodeRemove) { auto portRange = buildPortRange(100, 999); diff --git a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp index dddbf5d84935c..eb9fa554f025b 100644 --- a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp @@ -89,7 +89,10 @@ TEST(PathVisitorTests, AccessField) { TEST(PathVisitorTests, HybridMapPrimitiveAccess) { auto structA = createHybridMapTestStruct(); - auto nodeA = std::make_shared>(structA); + auto nodeA = std::make_shared, + true>>(structA); folly::dynamic dyn; auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { EXPECT_EQ(begin, end); @@ -131,7 +134,10 @@ TEST(PathVisitorTests, HybridMapPrimitiveAccess) { TEST(PathVisitorTests, HybridMapStructAccess) { auto structA = createHybridMapTestStruct(); - auto nodeA = std::make_shared>(structA); + auto nodeA = std::make_shared, + true>>(structA); folly::dynamic dyn; auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { EXPECT_EQ(begin, end); @@ -184,7 +190,10 @@ TEST(PathVisitorTests, HybridMapStructAccess) { TEST(PathVisitorTests, HybridMapOfMapAccess) { auto structA = createHybridMapTestStruct(); - auto nodeA = std::make_shared>(structA); + auto nodeA = std::make_shared, + true>>(structA); folly::dynamic dyn; auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { EXPECT_EQ(begin, end); From 68ef3345ccda14046a896afc9e05436cebc82066 Mon Sep 17 00:00:00 2001 From: Xiang Xu Date: Wed, 23 Oct 2024 19:27:58 -0700 Subject: [PATCH 292/479] (3/N): Remove unimplemented method exposed via bgp thrift Summary: As titled. There are a few thrift endpoint API has been exposed but not implemented at all. :( Remove the dead end. Reviewed By: ashutoshgrewal Differential Revision: D64869341 fbshipit-source-id: c1e64ef05716a38d6ca398bce28049ada57fa606 --- fboss/cli/fboss2/BUCK | 2 -- 1 file changed, 2 deletions(-) diff --git a/fboss/cli/fboss2/BUCK b/fboss/cli/fboss2/BUCK index ec721fb0faa72..d0571f9869e42 100644 --- a/fboss/cli/fboss2/BUCK +++ b/fboss/cli/fboss2/BUCK @@ -316,8 +316,6 @@ cpp_library( "commands/debug/facebook/bgp/add_network/CmdDebugBgpAddNetworkCommunity.h", "commands/debug/facebook/bgp/add_network/CmdDebugBgpAddNetworkLocalPref.h", "commands/debug/facebook/bgp/del_network/CmdDebugBgpDelNetwork.h", - "commands/debug/facebook/bgp/leak_trace/CmdDebugBgpLeakTraceEnd.h", - "commands/debug/facebook/bgp/leak_trace/CmdDebugBgpLeakTraceStart.h", "commands/debug/facebook/bgp/neighbors/CmdDebugBgpNeighbors.h", "commands/debug/facebook/bgp/neighbors/CmdDebugBgpNeighborsRestart.h", "commands/debug/facebook/bgp/neighbors/CmdDebugBgpNeighborsShutdown.h", From 142652bd6e40c48d6e1dc68d7287350a988b63b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Olguy=20Can=C3=A9us?= Date: Wed, 23 Oct 2024 20:36:38 -0700 Subject: [PATCH 293/479] Add fw_ver path for fan_cpld Summary: Adding fw_ver path for fan_cpld. I couldn't find fw_ver for the other fpd Reviewed By: rationalis Differential Revision: D64878241 fbshipit-source-id: c05564b7690a706d092cc3eb0bb8fd3503514d36 --- fboss/platform/configs/meru800bfa/fw_util.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fboss/platform/configs/meru800bfa/fw_util.json b/fboss/platform/configs/meru800bfa/fw_util.json index ef7f14e403a16..373893bda4a3c 100644 --- a/fboss/platform/configs/meru800bfa/fw_util.json +++ b/fboss/platform/configs/meru800bfa/fw_util.json @@ -53,21 +53,21 @@ }, "fan_cpld0": { "preUpgradeCmd": "echo 1 > /run/devmap/fpgas/MERU_SCM_CPLD/switch_jtag_enable && echo 5 > /run/devmap/cplds/MERU800BFA_SMB_CPLD/jtag_mux_sel", - "getVersionCmd": "fan_cpld_ver=$((10#`cat /run/devmap/cplds/FAN0_CPLD/hwmon/hwmon*/cpld_ver`));fan_cpld_subver=$((10#`cat /run/devmap/cplds/FAN0_CPLD/hwmon/hwmon*/cpld_sub_ver`));echo $fan_cpld_ver'.'$fan_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/FAN0_CPLD/hwmon/hwmon*/fw_ver", "priority": 1, "upgradeCmd": "fan_cpld_filename=$(head -n 1 /home/fan_cpld0_filename.txt);jam -aprogram -fmeru_fan_cpld -v $fan_cpld_filename", "postUpgradeCmd": "" }, "fan_cpld1": { "preUpgradeCmd": "echo 1 > /run/devmap/fpgas/MERU_SCM_CPLD/switch_jtag_enable && echo 6 > /run/devmap/cplds/MERU800BFA_SMB_CPLD/jtag_mux_sel", - "getVersionCmd": "fan_cpld_ver=$((10#`cat /run/devmap/cplds/FAN1_CPLD/hwmon/hwmon*/cpld_ver`));fan_cpld_subver=$((10#`cat /run/devmap/cplds/FAN1_CPLD/hwmon/hwmon*/cpld_sub_ver`));echo $fan_cpld_ver'.'$fan_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/FAN1_CPLD/hwmon/hwmon*/fw_ver", "priority": 1, "upgradeCmd": "fan_cpld_filename=$(head -n 1 /home/fan_cpld1_filename.txt);jam -aprogram -fmeru_fan_cpld -v $fan_cpld_filename", "postUpgradeCmd": "" }, "fan_cpld2": { "preUpgradeCmd": "echo 1 > /run/devmap/fpgas/MERU_SCM_CPLD/switch_jtag_enable && echo 7 > /run/devmap/cplds/MERU800BFA_SMB_CPLD/jtag_mux_sel", - "getVersionCmd": "fan_cpld_ver=$((10#`cat /run/devmap/cplds/FAN2_CPLD/hwmon/hwmon*/cpld_ver`));fan_cpld_subver=$((10#`cat /run/devmap/cplds/FAN2_CPLD/hwmon/hwmon*/cpld_sub_ver`));echo $fan_cpld_ver'.'$fan_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/FAN2_CPLD/hwmon/hwmon*/fw_ver", "priority": 1, "upgradeCmd": "fan_cpld_filename=$(head -n 1 /home/fan_cpld2_filename.txt);jam -aprogram -fmeru_fan_cpld -v $fan_cpld_filename", "postUpgradeCmd": "" From 865d2cf19c6d99b246337b352883063bcd142efc Mon Sep 17 00:00:00 2001 From: Amithash Prasad Date: Wed, 23 Oct 2024 21:19:11 -0700 Subject: [PATCH 294/479] rackmon2: Add support for register map to specify max span size Summary: Some older PSU hardware (ORv2) do not support block reads of size larger than 16 words. They return ERR_ILLEGAL_DATA_VALUE when the controller issues a ReadMultipleHoldingRegister request with size greater than 16. This would imply that monitoring such hardware would be broken since we would clearly have computed block sizes much greater than 16. To remedy this, introduce a new configuration to the register map where we can specify the maximum span size and have the span-list builder use that information. Thus, on newer hardware, ORv3 and forward, we would gain the additional performance benefit while supporting older hardware. Imported from: D64794972 Reviewed By: mikechoifb Differential Revision: D64869927 fbshipit-source-id: fee5eeb78a3c70421b928072eada811062faba73 --- fboss/platform/rackmon/ModbusDevice.cpp | 6 ++++-- fboss/platform/rackmon/Register.cpp | 13 ++++++++----- fboss/platform/rackmon/Register.h | 10 +++++++--- .../rackmon/configs/register_map/orv2_psu.json | 1 + fboss/platform/rackmon/tests/RegisterMapTest.cpp | 5 +++++ .../platform/rackmon/tests/RegisterSpanTest.cpp | 16 ++++++++++++++++ 6 files changed, 41 insertions(+), 10 deletions(-) diff --git a/fboss/platform/rackmon/ModbusDevice.cpp b/fboss/platform/rackmon/ModbusDevice.cpp index b6c29f079949f..139e80dfc8e08 100644 --- a/fboss/platform/rackmon/ModbusDevice.cpp +++ b/fboss/platform/rackmon/ModbusDevice.cpp @@ -168,7 +168,8 @@ void ModbusDevice::forceReloadPlan() { time_t reloadTime = getCurrentTime(); for (auto& reg : info_.registerList) { forceReloadRegister(reg, reloadTime); - RegisterStoreSpan::buildRegisterSpanList(reloadPlan_, reg); + RegisterStoreSpan::buildRegisterSpanList( + reloadPlan_, reg, registerMap_.maxRegisterSpanLength); } } @@ -288,7 +289,8 @@ void ModbusDevice::forceReloadRegisters(const ModbusRegisterFilter& filter) { std::vector regSpans{}; for (auto& reg : info_.registerList) { if (shouldPickRegister(reg)) { - bool added = RegisterStoreSpan::buildRegisterSpanList(regSpans, reg); + bool added = RegisterStoreSpan::buildRegisterSpanList( + regSpans, reg, registerMap_.maxRegisterSpanLength); if (!added) { logError << "reload:: Not including register: " << reg.name() << std::endl; diff --git a/fboss/platform/rackmon/Register.cpp b/fboss/platform/rackmon/Register.cpp index 32e9117603ba2..3642931f21901 100644 --- a/fboss/platform/rackmon/Register.cpp +++ b/fboss/platform/rackmon/Register.cpp @@ -271,14 +271,14 @@ RegisterStoreSpan::RegisterStoreSpan(RegisterStore* reg) registers_{reg}, timestamp_(reg->back().timestamp) {} -bool RegisterStoreSpan::addRegister(RegisterStore* reg) { +bool RegisterStoreSpan::addRegister(RegisterStore* reg, size_t maxSpanLength) { if (reg->interval() != interval_) { return false; } if (reg->regAddr() != spanAddress_ + span_.size()) { return false; } - if (span_.size() + reg->length() > kMaxRegisterSpanLength) { + if (span_.size() + reg->length() > maxSpanLength) { return false; } span_.resize(span_.size() + reg->length()); @@ -305,13 +305,14 @@ void RegisterStoreSpan::endReloadSpan(time_t reloadTime) { bool RegisterStoreSpan::buildRegisterSpanList( std::vector& list, - RegisterStore& reg) { + RegisterStore& reg, + size_t maxSpanLength) { // Drop it from a plan if not enabled. if (!reg.isEnabled()) { return false; } - if (!std::any_of(list.begin(), list.end(), [®](auto& span) { - return span.addRegister(®); + if (!std::any_of(list.begin(), list.end(), [®, maxSpanLength](auto& span) { + return span.addRegister(®, maxSpanLength); })) { list.emplace_back(®); } @@ -519,6 +520,8 @@ void from_json(const json& j, RegisterMap& m) { j.at("name").get_to(m.name); m.parity = j.value("parity", Parity::EVEN); j.at("baudrate").get_to(m.baudrate); + m.maxRegisterSpanLength = j.value( + "max_span_length", RegisterStoreSpan::kDefaultMaxRegisterSpanLength); std::vector tmp; j.at("registers").get_to(tmp); for (auto& i : tmp) { diff --git a/fboss/platform/rackmon/Register.h b/fboss/platform/rackmon/Register.h index 3de30b9f05e0e..3e4465779f74d 100644 --- a/fboss/platform/rackmon/Register.h +++ b/fboss/platform/rackmon/Register.h @@ -255,7 +255,6 @@ void to_json(nlohmann::json& j, const RegisterStore& m); // Group of registers which are at contiguous register locations. class RegisterStoreSpan { - static constexpr uint16_t kMaxRegisterSpanLength = 120; uint16_t spanAddress_ = 0; time_t interval_ = 0; std::vector span_{}; @@ -263,8 +262,11 @@ class RegisterStoreSpan { time_t timestamp_ = 0; public: + static constexpr uint16_t kDefaultMaxRegisterSpanLength = 120; explicit RegisterStoreSpan(RegisterStore* reg); - bool addRegister(RegisterStore* reg); + bool addRegister( + RegisterStore* reg, + size_t maxSpanLength = kDefaultMaxRegisterSpanLength); std::vector& beginReloadSpan(); void endReloadSpan(time_t reloadTime); uint16_t getSpanAddress() const { @@ -276,7 +278,8 @@ class RegisterStoreSpan { bool reloadPending(time_t currentTime); static bool buildRegisterSpanList( std::vector& list, - RegisterStore& reg); + RegisterStore& reg, + size_t maxSpanLength = kDefaultMaxRegisterSpanLength); }; struct WriteActionInfo { @@ -318,6 +321,7 @@ struct RegisterMap { std::string name; uint16_t probeRegister; uint32_t baudrate; + size_t maxRegisterSpanLength; Parity parity; std::vector specialHandlers; std::map registerDescriptors; diff --git a/fboss/platform/rackmon/configs/register_map/orv2_psu.json b/fboss/platform/rackmon/configs/register_map/orv2_psu.json index 855fa86efd49c..87da87b87f6f4 100644 --- a/fboss/platform/rackmon/configs/register_map/orv2_psu.json +++ b/fboss/platform/rackmon/configs/register_map/orv2_psu.json @@ -17,6 +17,7 @@ } } ], + "max_span_length": 16, "registers": [ { "begin": 0, diff --git a/fboss/platform/rackmon/tests/RegisterMapTest.cpp b/fboss/platform/rackmon/tests/RegisterMapTest.cpp index ba526b269c3c7..4ff4d79c5580d 100644 --- a/fboss/platform/rackmon/tests/RegisterMapTest.cpp +++ b/fboss/platform/rackmon/tests/RegisterMapTest.cpp @@ -41,6 +41,7 @@ TEST(RegisterMapTest, JSONCoversion) { "address_range": [[160, 191]], "probe_register": 104, "baudrate": 19200, + "max_span_length": 4, "registers": [ { "begin": 0, @@ -67,6 +68,7 @@ TEST(RegisterMapTest, JSONCoversion) { EXPECT_EQ(rmap.probeRegister, 104); EXPECT_EQ(rmap.baudrate, 19200); EXPECT_EQ(rmap.name, "orv2_psu"); + EXPECT_EQ(rmap.maxRegisterSpanLength, 4); EXPECT_EQ(rmap.registerDescriptors.size(), 2); EXPECT_EQ(rmap.specialHandlers.size(), 0); EXPECT_EQ(rmap.at(0).begin, 0); @@ -106,6 +108,9 @@ TEST(RegisterMapTest, JSONCoversionBaudrate) { rmap.applicableAddresses.range.cbegin(), rmap.applicableAddresses.range.cend(), [](auto const& ent) { return (ent.first == 160 && ent.second == 191); })); + EXPECT_EQ( + rmap.maxRegisterSpanLength, + RegisterStoreSpan::kDefaultMaxRegisterSpanLength); EXPECT_EQ(rmap.probeRegister, 104); EXPECT_EQ(rmap.baudrate, 19200); EXPECT_EQ(rmap.name, "orv2_psu"); diff --git a/fboss/platform/rackmon/tests/RegisterSpanTest.cpp b/fboss/platform/rackmon/tests/RegisterSpanTest.cpp index 93da3ad66cbad..a7ef83105326e 100644 --- a/fboss/platform/rackmon/tests/RegisterSpanTest.cpp +++ b/fboss/platform/rackmon/tests/RegisterSpanTest.cpp @@ -84,3 +84,19 @@ TEST_F(RegisterSpanTest, spanListTest) { ASSERT_EQ(spanList[1].getSpanAddress(), 10); ASSERT_EQ(spanList[1].length(), 2); } + +TEST_F(RegisterSpanTest, smallSpanListTest) { + std::vector spanList{}; + for (auto& reg : regs) { + ASSERT_TRUE(RegisterStoreSpan::buildRegisterSpanList(spanList, reg, 4)); + } + ASSERT_EQ(spanList.size(), 4); + ASSERT_EQ(spanList[0].getSpanAddress(), 4); + ASSERT_EQ(spanList[0].length(), 2); + ASSERT_EQ(spanList[1].getSpanAddress(), 6); + ASSERT_EQ(spanList[1].length(), 4); + ASSERT_EQ(spanList[2].getSpanAddress(), 10); + ASSERT_EQ(spanList[2].length(), 2); + ASSERT_EQ(spanList[3].getSpanAddress(), 19); + ASSERT_EQ(spanList[3].length(), 1); +} From 358c1fa2ba48b3db2b2a314a57e1ac3b33fecbfb Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Wed, 23 Oct 2024 21:24:46 -0700 Subject: [PATCH 295/479] fboss_hw_benchmark_config_sync Reviewed By: srikrishnagopu Differential Revision: D64877511 fbshipit-source-id: 87b98a5597fe17efd575110a6fe9cbc20fc77b40 --- fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON b/fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON index bdfb67e4e7490..fa8965b1adc04 100644 --- a/fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON +++ b/fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON @@ -206,6 +206,7 @@ "custom_feature_fabric_cgm_ddc_th_tune.BCM8889X": "1", "custom_feature_programmability_standard_image_name.BCM8889X": "AI23", "custom_feature_ser_event_generate": "1", + "custom_feature_shel_arm_enable": "1", "custom_feature_statdma_enable": "0", "custom_feature_use_new_access.BCM8889X": "1", "custom_feature_use_new_access.BCM8889X_ADAPTER": "1", From 1fd7aad06243a92da079f6856286a04cb5d01cb3 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 23 Oct 2024 21:28:36 -0700 Subject: [PATCH 296/479] Add SystemPortRanges struct - to represent multiple, non continguous rages Summary: As titled. Using a struct instead of a list so we can embed other smarts in case the range algorithm gets more complex Reviewed By: srikrishnagopu Differential Revision: D64867709 Privacy Context Container: L1125642 fbshipit-source-id: 3d51830e2ab249d3fa7d64acba3276d0b99342aa --- fboss/agent/switch_config.thrift | 6 + fboss/fsdb/if/oss/fsdb_model_thriftpath.h | 8770 +++++++++++---------- 2 files changed, 4430 insertions(+), 4346 deletions(-) diff --git a/fboss/agent/switch_config.thrift b/fboss/agent/switch_config.thrift index 80e1d8eabb7de..ce11dbce4310a 100644 --- a/fboss/agent/switch_config.thrift +++ b/fboss/agent/switch_config.thrift @@ -1616,6 +1616,10 @@ const i16 DEFAULT_FLOWLET_TABLE_SIZE = 4096; const i64 DEFAULT_PORT_ID_RANGE_MIN = 0; const i64 DEFAULT_PORT_ID_RANGE_MAX = 2047; +struct SystemPortRanges { + 1: list systemPortRanges; +} + struct SwitchInfo { 1: SwitchType switchType; 2: AsicType asicType; @@ -1625,6 +1629,7 @@ struct SwitchInfo { 5: optional Range64 systemPortRange; 6: optional string switchMac; 7: optional string connectionHandle; + 8: SystemPortRanges systemPortRanges; } /* @@ -1800,6 +1805,7 @@ struct DsfNode { // Offset from where to start local system port // ID allocation from 12: optional i32 globalSystemPortOffset; + 13: SystemPortRanges systemPortRanges; } /** diff --git a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h index 93474b4b29180..cd477e0b40084 100755 --- a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h +++ b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h @@ -4406,44 +4406,23 @@ std::pair>> } }; -template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::Vlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::Vlan>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::Vlan>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - template -class ChildThriftPath<::facebook::fboss::cfg::PktLenRange, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::MirrorTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PktLenRange, + ::facebook::fboss::state::MirrorTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PktLenRange>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorTunnel>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PktLenRange, + ::facebook::fboss::state::MirrorTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PktLenRange>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorTunnel>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -4452,30 +4431,50 @@ class ChildThriftPath<::facebook::fboss::cfg::PktLenRange, ::facebook::fboss::fs ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(min, 1); - STRUCT_CHILD_GETTERS(max, 2); - STRUCT_CHILD_GETTERS(invert, 3); + STRUCT_CHILD_GETTERS(srcIp, 1); + STRUCT_CHILD_GETTERS(dstIp, 2); + STRUCT_CHILD_GETTERS(srcMac, 3); + STRUCT_CHILD_GETTERS(dstMac, 4); + STRUCT_CHILD_GETTERS(udpSrcPort, 5); + STRUCT_CHILD_GETTERS(udpDstPort, 6); + STRUCT_CHILD_GETTERS(ttl, 7); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return min(); } - else if constexpr (__id == 2) { return max(); } - else if constexpr (__id == 3) { return invert(); } + if constexpr (__id == 1) { return srcIp(); } + else if constexpr (__id == 2) { return dstIp(); } + else if constexpr (__id == 3) { return srcMac(); } + else if constexpr (__id == 4) { return dstMac(); } + else if constexpr (__id == 5) { return udpSrcPort(); } + else if constexpr (__id == 6) { return udpDstPort(); } + else if constexpr (__id == 7) { return ttl(); } } template @@ -4485,43 +4484,43 @@ std::pair }; template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::QosPolicyFields>>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::QosPolicyFields>>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; template -class ChildThriftPath<::facebook::fboss::bcm::BcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::ActiveQueueManagement, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::bcm::BcmConfig, + ::facebook::fboss::cfg::ActiveQueueManagement, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::bcm::BcmConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ActiveQueueManagement>, Parent> { public: using Self = Path< - ::facebook::fboss::bcm::BcmConfig, + ::facebook::fboss::cfg::ActiveQueueManagement, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::bcm::BcmConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ActiveQueueManagement>, Parent>; - using strings = ::facebook::fboss::bcm::bcm_config_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -4530,25 +4529,25 @@ class ChildThriftPath<::facebook::fboss::bcm::BcmConfig, ::facebook::fboss::fsdb ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>, +std::pair>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::QueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::cfg::QueueCongestionBehavior, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::QueueCongestionBehavior>>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(config, 1); - STRUCT_CHILD_GETTERS(yamlConfig, 2); + STRUCT_CHILD_GETTERS(detection, 1); + STRUCT_CHILD_GETTERS(behavior, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return config(); } - else if constexpr (__id == 2) { return yamlConfig(); } + if constexpr (__id == 1) { return detection(); } + else if constexpr (__id == 2) { return behavior(); } } template @@ -4559,21 +4558,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::PortPgConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PortPgConfig, + ::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PortPgConfig, + ::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::cfg::asic_config_v2_tags::strings; template using Child = Path< ChildType, @@ -4582,75 +4581,30 @@ class ChildThriftPath<::facebook::fboss::cfg::PortPgConfig, ::facebook::fboss::f ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::cfg::MMUScalingFactor, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::MMUScalingFactor>>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>>; + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(name, 2); - STRUCT_CHILD_GETTERS(scalingFactor, 3); - STRUCT_CHILD_GETTERS(minLimitBytes, 4); - STRUCT_CHILD_GETTERS(headroomLimitBytes, 5); - STRUCT_CHILD_GETTERS(resumeOffsetBytes, 6); - STRUCT_CHILD_GETTERS(bufferPoolName, 7); - STRUCT_CHILD_GETTERS(maxSharedXoffThresholdBytes, 8); - STRUCT_CHILD_GETTERS(minSharedXoffThresholdBytes, 9); - STRUCT_CHILD_GETTERS(maxSramXoffThresholdBytes, 10); - STRUCT_CHILD_GETTERS(minSramXoffThresholdBytes, 11); - STRUCT_CHILD_GETTERS(sramResumeOffsetBytes, 12); + STRUCT_CHILD_GETTERS(config, 1); + STRUCT_CHILD_GETTERS(jsonConfig, 2); + STRUCT_CHILD_GETTERS(yamlConfig, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return name(); } - else if constexpr (__id == 3) { return scalingFactor(); } - else if constexpr (__id == 4) { return minLimitBytes(); } - else if constexpr (__id == 5) { return headroomLimitBytes(); } - else if constexpr (__id == 6) { return resumeOffsetBytes(); } - else if constexpr (__id == 7) { return bufferPoolName(); } - else if constexpr (__id == 8) { return maxSharedXoffThresholdBytes(); } - else if constexpr (__id == 9) { return minSharedXoffThresholdBytes(); } - else if constexpr (__id == 10) { return maxSramXoffThresholdBytes(); } - else if constexpr (__id == 11) { return minSramXoffThresholdBytes(); } - else if constexpr (__id == 12) { return sramResumeOffsetBytes(); } + if constexpr (__id == 1) { return config(); } + else if constexpr (__id == 2) { return jsonConfig(); } + else if constexpr (__id == 3) { return yamlConfig(); } } template @@ -4659,21 +4613,42 @@ std::pair +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::ExpQosMap>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::ExpQosMap>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExpQosMap>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::ExpQosMap>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExpQosMap>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::ExpQosMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + template -class ChildThriftPath<::facebook::fboss::cfg::StaticRouteNoNextHops, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SetTcAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::StaticRouteNoNextHops, + ::facebook::fboss::cfg::SetTcAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::StaticRouteNoNextHops>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetTcAction>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::StaticRouteNoNextHops, + ::facebook::fboss::cfg::SetTcAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::StaticRouteNoNextHops>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetTcAction>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -4684,117 +4659,20 @@ class ChildThriftPath<::facebook::fboss::cfg::StaticRouteNoNextHops, ::facebook: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(routerID, 1); - STRUCT_CHILD_GETTERS(prefix, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return routerID(); } - else if constexpr (__id == 2) { return prefix(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - - -template -class ChildThriftPath<::facebook::fboss::state::AggregatePortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::state::AggregatePortFields, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::state::AggregatePortFields, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>, - Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::state::Subport>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, bool>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, ::facebook::fboss::state::ParticipantInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(name, 2); - STRUCT_CHILD_GETTERS(description, 3); - STRUCT_CHILD_GETTERS(systemPriority, 4); - STRUCT_CHILD_GETTERS(systemID, 5); - STRUCT_CHILD_GETTERS(minimumLinkCount, 6); - STRUCT_CHILD_GETTERS(ports, 7); - STRUCT_CHILD_GETTERS(portToFwdState, 8); - STRUCT_CHILD_GETTERS(portToPartnerState, 9); - STRUCT_CHILD_GETTERS(interfaceIDs, 10); + STRUCT_CHILD_GETTERS(tcValue, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return name(); } - else if constexpr (__id == 3) { return description(); } - else if constexpr (__id == 4) { return systemPriority(); } - else if constexpr (__id == 5) { return systemID(); } - else if constexpr (__id == 6) { return minimumLinkCount(); } - else if constexpr (__id == 7) { return ports(); } - else if constexpr (__id == 8) { return portToFwdState(); } - else if constexpr (__id == 9) { return portToPartnerState(); } - else if constexpr (__id == 10) { return interfaceIDs(); } + if constexpr (__id == 1) { return tcValue(); } } template @@ -4803,63 +4681,21 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::PortQueue>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::PortQueue>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::PortQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - -template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - template -class ChildThriftPath<::facebook::fboss::cfg::AggregatePort, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::AggregatePort, + ::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePort>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::MinimumCapacity>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::AggregatePort, + ::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePort>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::MinimumCapacity>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -4870,45 +4706,25 @@ class ChildThriftPath<::facebook::fboss::cfg::AggregatePort, ::facebook::fboss:: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AggregatePortMember>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(key, 1); - STRUCT_CHILD_GETTERS(name, 2); - STRUCT_CHILD_GETTERS(description, 3); - STRUCT_CHILD_GETTERS(memberPorts, 4); - STRUCT_CHILD_GETTERS(minimumCapacity, 5); - STRUCT_CHILD_GETTERS(counterTags, 6); + STRUCT_CHILD_GETTERS(linkCount, 1); + STRUCT_CHILD_GETTERS(linkPercentage, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return key(); } - else if constexpr (__id == 2) { return name(); } - else if constexpr (__id == 3) { return description(); } - else if constexpr (__id == 4) { return memberPorts(); } - else if constexpr (__id == 5) { return minimumCapacity(); } - else if constexpr (__id == 6) { return counterTags(); } + if constexpr (__id == 1) { return linkCount(); } + else if constexpr (__id == 2) { return linkPercentage(); } } template @@ -4917,44 +4733,23 @@ std::pair -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>>>, - Parent> { - public: - using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>>>, - Parent>; - using Child = ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); -}; - template -class ChildThriftPath<::facebook::fboss::state::RouteNextHopEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SwitchConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::RouteNextHopEntry, + ::facebook::fboss::cfg::SwitchConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::state::RouteNextHopEntry, + ::facebook::fboss::cfg::SwitchConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchConfig>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -4963,40 +4758,337 @@ class ChildThriftPath<::facebook::fboss::state::RouteNextHopEntry, ::facebook::f ChildTag, Self >; - using Children = fatal::tuple>>, -std::pair>>, -std::pair>, -std::pair>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::AdminDistance, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::AdminDistance>>>, - std::pair, Child<::facebook::fboss::RouteForwardAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::RouteForwardAction>>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::cfg::AclLookupClass, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(adminDistance, 1); - STRUCT_CHILD_GETTERS(action, 2); - STRUCT_CHILD_GETTERS(counterID, 3); - STRUCT_CHILD_GETTERS(classID, 4); - STRUCT_CHILD_GETTERS(nexthops, 5); + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Port>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Vlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::VlanPort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Interface>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticRouteWithNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AggregatePort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::SflowCollector>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::Lacp, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::LoadBalancer>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Mirror>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::TrafficCounter>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosPolicy>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticMplsRouteWithNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticMplsRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticMplsRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticIp2MplsRoute>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::SwitchSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::AclTableGroup, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PortFlowletConfigName, ::facebook::fboss::cfg::PortFlowletConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(version, 1); + STRUCT_CHILD_GETTERS(ports, 2); + STRUCT_CHILD_GETTERS(vlans, 3); + STRUCT_CHILD_GETTERS(vlanPorts, 4); + STRUCT_CHILD_GETTERS(defaultVlan, 5); + STRUCT_CHILD_GETTERS(interfaces, 6); + STRUCT_CHILD_GETTERS(arpTimeoutSeconds, 7); + STRUCT_CHILD_GETTERS(arpRefreshSeconds, 8); + STRUCT_CHILD_GETTERS(arpAgerInterval, 9); + STRUCT_CHILD_GETTERS(proactiveArp, 10); + STRUCT_CHILD_GETTERS(cpuMAC, 11); + STRUCT_CHILD_GETTERS(staticRoutesWithNhops, 12); + STRUCT_CHILD_GETTERS(staticRoutesToNull, 13); + STRUCT_CHILD_GETTERS(staticRoutesToCPU, 14); + STRUCT_CHILD_GETTERS(acls, 15); + STRUCT_CHILD_GETTERS(maxNeighborProbes, 16); + STRUCT_CHILD_GETTERS(staleEntryInterval, 17); + STRUCT_CHILD_GETTERS(aggregatePorts, 18); + STRUCT_CHILD_GETTERS(clientIdToAdminDistance, 19); + STRUCT_CHILD_GETTERS(dhcpRelaySrcOverrideV4, 20); + STRUCT_CHILD_GETTERS(dhcpRelaySrcOverrideV6, 21); + STRUCT_CHILD_GETTERS(dhcpReplySrcOverrideV4, 22); + STRUCT_CHILD_GETTERS(dhcpReplySrcOverrideV6, 23); + STRUCT_CHILD_GETTERS(globalEgressTrafficPolicy_DEPRECATED, 24); + STRUCT_CHILD_GETTERS(config_version, 25); + STRUCT_CHILD_GETTERS(sFlowCollectors, 26); + STRUCT_CHILD_GETTERS(lacp, 27); + STRUCT_CHILD_GETTERS(cpuQueues, 28); + STRUCT_CHILD_GETTERS(cpuTrafficPolicy, 29); + STRUCT_CHILD_GETTERS(loadBalancers, 30); + STRUCT_CHILD_GETTERS(dataPlaneTrafficPolicy, 31); + STRUCT_CHILD_GETTERS(mirrors, 32); + STRUCT_CHILD_GETTERS(trafficCounters, 33); + STRUCT_CHILD_GETTERS(qosPolicies, 34); + STRUCT_CHILD_GETTERS(defaultPortQueues, 35); + STRUCT_CHILD_GETTERS(staticMplsRoutesWithNhops, 36); + STRUCT_CHILD_GETTERS(staticMplsRoutesToNull, 37); + STRUCT_CHILD_GETTERS(staticMplsRoutesToCPU, 38); + STRUCT_CHILD_GETTERS(staticIp2MplsRoutes, 39); + STRUCT_CHILD_GETTERS(portQueueConfigs, 40); + STRUCT_CHILD_GETTERS(switchSettings, 41); + STRUCT_CHILD_GETTERS(qcmConfig, 42); + STRUCT_CHILD_GETTERS(portPgConfigs, 43); + STRUCT_CHILD_GETTERS(bufferPoolConfigs, 44); + STRUCT_CHILD_GETTERS(aclTableGroup, 45); + STRUCT_CHILD_GETTERS(sdkVersion, 46); + STRUCT_CHILD_GETTERS(ipInIpTunnels, 47); + STRUCT_CHILD_GETTERS(dsfNodes, 48); + STRUCT_CHILD_GETTERS(udfConfig, 49); + STRUCT_CHILD_GETTERS(flowletSwitchingConfig, 50); + STRUCT_CHILD_GETTERS(defaultVoqConfig, 51); + STRUCT_CHILD_GETTERS(portFlowletConfigs, 52); + STRUCT_CHILD_GETTERS(icmpV4UnavailableSrcAddress, 53); + STRUCT_CHILD_GETTERS(hostname, 54); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return version(); } + else if constexpr (__id == 2) { return ports(); } + else if constexpr (__id == 3) { return vlans(); } + else if constexpr (__id == 4) { return vlanPorts(); } + else if constexpr (__id == 5) { return defaultVlan(); } + else if constexpr (__id == 6) { return interfaces(); } + else if constexpr (__id == 7) { return arpTimeoutSeconds(); } + else if constexpr (__id == 8) { return arpRefreshSeconds(); } + else if constexpr (__id == 9) { return arpAgerInterval(); } + else if constexpr (__id == 10) { return proactiveArp(); } + else if constexpr (__id == 11) { return cpuMAC(); } + else if constexpr (__id == 12) { return staticRoutesWithNhops(); } + else if constexpr (__id == 13) { return staticRoutesToNull(); } + else if constexpr (__id == 14) { return staticRoutesToCPU(); } + else if constexpr (__id == 15) { return acls(); } + else if constexpr (__id == 16) { return maxNeighborProbes(); } + else if constexpr (__id == 17) { return staleEntryInterval(); } + else if constexpr (__id == 18) { return aggregatePorts(); } + else if constexpr (__id == 19) { return clientIdToAdminDistance(); } + else if constexpr (__id == 20) { return dhcpRelaySrcOverrideV4(); } + else if constexpr (__id == 21) { return dhcpRelaySrcOverrideV6(); } + else if constexpr (__id == 22) { return dhcpReplySrcOverrideV4(); } + else if constexpr (__id == 23) { return dhcpReplySrcOverrideV6(); } + else if constexpr (__id == 24) { return globalEgressTrafficPolicy_DEPRECATED(); } + else if constexpr (__id == 25) { return config_version(); } + else if constexpr (__id == 26) { return sFlowCollectors(); } + else if constexpr (__id == 27) { return lacp(); } + else if constexpr (__id == 28) { return cpuQueues(); } + else if constexpr (__id == 29) { return cpuTrafficPolicy(); } + else if constexpr (__id == 30) { return loadBalancers(); } + else if constexpr (__id == 31) { return dataPlaneTrafficPolicy(); } + else if constexpr (__id == 32) { return mirrors(); } + else if constexpr (__id == 33) { return trafficCounters(); } + else if constexpr (__id == 34) { return qosPolicies(); } + else if constexpr (__id == 35) { return defaultPortQueues(); } + else if constexpr (__id == 36) { return staticMplsRoutesWithNhops(); } + else if constexpr (__id == 37) { return staticMplsRoutesToNull(); } + else if constexpr (__id == 38) { return staticMplsRoutesToCPU(); } + else if constexpr (__id == 39) { return staticIp2MplsRoutes(); } + else if constexpr (__id == 40) { return portQueueConfigs(); } + else if constexpr (__id == 41) { return switchSettings(); } + else if constexpr (__id == 42) { return qcmConfig(); } + else if constexpr (__id == 43) { return portPgConfigs(); } + else if constexpr (__id == 44) { return bufferPoolConfigs(); } + else if constexpr (__id == 45) { return aclTableGroup(); } + else if constexpr (__id == 46) { return sdkVersion(); } + else if constexpr (__id == 47) { return ipInIpTunnels(); } + else if constexpr (__id == 48) { return dsfNodes(); } + else if constexpr (__id == 49) { return udfConfig(); } + else if constexpr (__id == 50) { return flowletSwitchingConfig(); } + else if constexpr (__id == 51) { return defaultVoqConfig(); } + else if constexpr (__id == 52) { return portFlowletConfigs(); } + else if constexpr (__id == 53) { return icmpV4UnavailableSrcAddress(); } + else if constexpr (__id == 54) { return hostname(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + + +template +class ChildThriftPath<::facebook::fboss::state::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::state::RedirectToNextHopAction, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::RedirectToNextHopAction>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::state::RedirectToNextHopAction, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::RedirectToNextHopAction>, + Parent>; + using strings = ::facebook::fboss::state::switch_state_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(action, 1); + STRUCT_CHILD_GETTERS(resolvedNexthops, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return adminDistance(); } - else if constexpr (__id == 2) { return action(); } - else if constexpr (__id == 3) { return counterID(); } - else if constexpr (__id == 4) { return classID(); } - else if constexpr (__id == 5) { return nexthops(); } + if constexpr (__id == 1) { return action(); } + else if constexpr (__id == 2) { return resolvedNexthops(); } } template @@ -5007,21 +5099,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::SflowCollectorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::UdfPacketMatcher, + ::facebook::fboss::state::SflowCollectorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::SflowCollectorFields>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::UdfPacketMatcher, + ::facebook::fboss::state::SflowCollectorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::SflowCollectorFields>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -5030,40 +5122,25 @@ class ChildThriftPath<::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fbos ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>, -std::pair>>, -std::pair>>, -std::pair>>; + using Children = fatal::tuple>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::cfg::UdfMatchL2Type, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::UdfMatchL2Type>>>, - std::pair, Child<::facebook::fboss::cfg::UdfMatchL3Type, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::UdfMatchL3Type>>>, - std::pair, Child<::facebook::fboss::cfg::UdfMatchL4Type, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::UdfMatchL4Type>>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + std::pair, ChildThriftPath<::facebook::fboss::state::SocketAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(l2PktType, 2); - STRUCT_CHILD_GETTERS(l3pktType, 3); - STRUCT_CHILD_GETTERS(l4PktType, 4); - STRUCT_CHILD_GETTERS(UdfL4DstPort, 5); + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(address, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return l2PktType(); } - else if constexpr (__id == 3) { return l3pktType(); } - else if constexpr (__id == 4) { return l4PktType(); } - else if constexpr (__id == 5) { return UdfL4DstPort(); } + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return address(); } } template @@ -5073,83 +5150,242 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableActionType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::Vlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::AclTableActionType>, + ::std::vector<::facebook::fboss::cfg::Vlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableActionType>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::AclTableActionType>, + ::std::vector<::facebook::fboss::cfg::Vlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableActionType>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>>, Parent>; - using Child = Path<::facebook::fboss::cfg::AclTableActionType, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableActionType>, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); }; + template -class ChildThriftPath<::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PktLenRange, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, + ::facebook::fboss::cfg::PktLenRange, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PktLenRange>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, + ::facebook::fboss::cfg::PktLenRange, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PktLenRange>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::LoadBalancerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(min, 1); + STRUCT_CHILD_GETTERS(max, 2); + STRUCT_CHILD_GETTERS(invert, 3); - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::LoadBalancerID); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return min(); } + else if constexpr (__id == 2) { return max(); } + else if constexpr (__id == 3) { return invert(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + + +template +class ChildThriftPath<::facebook::fboss::state::AggregatePortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::state::AggregatePortFields, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::state::AggregatePortFields, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>, + Parent>; + using strings = ::facebook::fboss::state::switch_state_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::state::Subport>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, bool>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, ::facebook::fboss::state::ParticipantInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(name, 2); + STRUCT_CHILD_GETTERS(description, 3); + STRUCT_CHILD_GETTERS(systemPriority, 4); + STRUCT_CHILD_GETTERS(systemID, 5); + STRUCT_CHILD_GETTERS(minimumLinkCount, 6); + STRUCT_CHILD_GETTERS(ports, 7); + STRUCT_CHILD_GETTERS(portToFwdState, 8); + STRUCT_CHILD_GETTERS(portToPartnerState, 9); + STRUCT_CHILD_GETTERS(interfaceIDs, 10); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return name(); } + else if constexpr (__id == 3) { return description(); } + else if constexpr (__id == 4) { return systemPriority(); } + else if constexpr (__id == 5) { return systemID(); } + else if constexpr (__id == 6) { return minimumLinkCount(); } + else if constexpr (__id == 7) { return ports(); } + else if constexpr (__id == 8) { return portToFwdState(); } + else if constexpr (__id == 9) { return portToPartnerState(); } + else if constexpr (__id == 10) { return interfaceIDs(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; + template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosPolicy>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::StaticRouteNoNextHops, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::QosPolicy>, + ::facebook::fboss::cfg::StaticRouteNoNextHops, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::StaticRouteNoNextHops>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::QosPolicy>, + ::facebook::fboss::cfg::StaticRouteNoNextHops, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::StaticRouteNoNextHops>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(routerID, 1); + STRUCT_CHILD_GETTERS(prefix, 2); - CONTAINER_CHILD_GETTERS(::std::int32_t); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return routerID(); } + else if constexpr (__id == 2) { return prefix(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::facebook::fboss::cfg::SetTcAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PortPgConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::SetTcAction, + ::facebook::fboss::cfg::PortPgConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetTcAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::SetTcAction, + ::facebook::fboss::cfg::PortPgConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetTcAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -5160,20 +5396,75 @@ class ChildThriftPath<::facebook::fboss::cfg::SetTcAction, ::facebook::fboss::fs ChildTag, Self >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::cfg::MMUScalingFactor, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::MMUScalingFactor>>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>>; template - using NameToId = fatal::tuple>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(tcValue, 1); + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(name, 2); + STRUCT_CHILD_GETTERS(scalingFactor, 3); + STRUCT_CHILD_GETTERS(minLimitBytes, 4); + STRUCT_CHILD_GETTERS(headroomLimitBytes, 5); + STRUCT_CHILD_GETTERS(resumeOffsetBytes, 6); + STRUCT_CHILD_GETTERS(bufferPoolName, 7); + STRUCT_CHILD_GETTERS(maxSharedXoffThresholdBytes, 8); + STRUCT_CHILD_GETTERS(minSharedXoffThresholdBytes, 9); + STRUCT_CHILD_GETTERS(maxSramXoffThresholdBytes, 10); + STRUCT_CHILD_GETTERS(minSramXoffThresholdBytes, 11); + STRUCT_CHILD_GETTERS(sramResumeOffsetBytes, 12); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return tcValue(); } + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return name(); } + else if constexpr (__id == 3) { return scalingFactor(); } + else if constexpr (__id == 4) { return minLimitBytes(); } + else if constexpr (__id == 5) { return headroomLimitBytes(); } + else if constexpr (__id == 6) { return resumeOffsetBytes(); } + else if constexpr (__id == 7) { return bufferPoolName(); } + else if constexpr (__id == 8) { return maxSharedXoffThresholdBytes(); } + else if constexpr (__id == 9) { return minSharedXoffThresholdBytes(); } + else if constexpr (__id == 10) { return maxSramXoffThresholdBytes(); } + else if constexpr (__id == 11) { return minSramXoffThresholdBytes(); } + else if constexpr (__id == 12) { return sramResumeOffsetBytes(); } } template @@ -5747,58 +6038,6 @@ std::pair> }; -template -class ChildThriftPath<::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::cfg::QosRule, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::cfg::QosRule, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>, - Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, ChildThriftPath<::std::vector<::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(queueId, 1); - STRUCT_CHILD_GETTERS(dscp, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return queueId(); } - else if constexpr (__id == 2) { return dscp(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - - template class ChildThriftPath<::facebook::fboss::phy::PinConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< @@ -5865,42 +6104,21 @@ std::pair -class ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::std::int8_t>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, - ::apache::thrift::type::list<::apache::thrift::type::byte_t>, - Parent> { - public: - using Self = Path< - ::std::vector<::std::int8_t>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, - ::apache::thrift::type::list<::apache::thrift::type::byte_t>, - Parent>; - using Child = Path<::std::int8_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - template -class ChildThriftPath<::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::Vlan, + ::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::Vlan, + ::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -5911,65 +6129,25 @@ class ChildThriftPath<::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::Fsd ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child>, - std::pair, Child>, - std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, ChildThriftPath<::std::vector<::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(id, 2); - STRUCT_CHILD_GETTERS(recordStats, 3); - STRUCT_CHILD_GETTERS(routable, 5); - STRUCT_CHILD_GETTERS(ipAddresses, 6); - STRUCT_CHILD_GETTERS(dhcpRelayAddressV4, 7); - STRUCT_CHILD_GETTERS(dhcpRelayAddressV6, 8); - STRUCT_CHILD_GETTERS(dhcpRelayOverridesV4, 9); - STRUCT_CHILD_GETTERS(dhcpRelayOverridesV6, 10); - STRUCT_CHILD_GETTERS(intfID, 11); + using Self::Self; + + STRUCT_CHILD_GETTERS(queueId, 1); + STRUCT_CHILD_GETTERS(dscp, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return id(); } - else if constexpr (__id == 3) { return recordStats(); } - else if constexpr (__id == 5) { return routable(); } - else if constexpr (__id == 6) { return ipAddresses(); } - else if constexpr (__id == 7) { return dhcpRelayAddressV4(); } - else if constexpr (__id == 8) { return dhcpRelayAddressV6(); } - else if constexpr (__id == 9) { return dhcpRelayOverridesV4(); } - else if constexpr (__id == 10) { return dhcpRelayOverridesV6(); } - else if constexpr (__id == 11) { return intfID(); } + if constexpr (__id == 1) { return queueId(); } + else if constexpr (__id == 2) { return dscp(); } } template @@ -5978,23 +6156,65 @@ std::pair +class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>, + Parent> { + public: + using Self = Path< + ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>, + Parent>; + using Child = Path<::facebook::fboss::cfg::SwitchType, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int64_t); +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::Range64>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::Range64>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Range64>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::Range64>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Range64>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::Range64, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + template -class ChildThriftPath<::facebook::fboss::state::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::RedirectToNextHopAction, + ::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::RedirectToNextHopAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::MplsAction>, Parent> { public: using Self = Path< - ::facebook::fboss::state::RedirectToNextHopAction, + ::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::RedirectToNextHopAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::MplsAction>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::mpls_tags::strings; template using Child = Path< ChildType, @@ -6003,25 +6223,30 @@ class ChildThriftPath<::facebook::fboss::state::RedirectToNextHopAction, ::faceb ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::MplsActionCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MplsActionCode>>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template using NameToId = fatal::tuple>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; STRUCT_CHILD_GETTERS(action, 1); - STRUCT_CHILD_GETTERS(resolvedNexthops, 2); + STRUCT_CHILD_GETTERS(swapLabel, 2); + STRUCT_CHILD_GETTERS(pushLabels, 3); template auto operator()(const std::integral_constant&) { if constexpr (__id == 1) { return action(); } - else if constexpr (__id == 2) { return resolvedNexthops(); } + else if constexpr (__id == 2) { return swapLabel(); } + else if constexpr (__id == 3) { return pushLabels(); } } template @@ -6032,19 +6257,19 @@ std::pair -class ChildThriftPath<::facebook::fboss::state::SflowCollectorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::RouteNextHopEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::SflowCollectorFields, + ::facebook::fboss::state::RouteNextHopEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::SflowCollectorFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>, Parent> { public: using Self = Path< - ::facebook::fboss::state::SflowCollectorFields, + ::facebook::fboss::state::RouteNextHopEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::SflowCollectorFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>, Parent>; using strings = ::facebook::fboss::state::switch_state_tags::strings; template @@ -6055,25 +6280,40 @@ class ChildThriftPath<::facebook::fboss::state::SflowCollectorFields, ::facebook ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::facebook::fboss::state::SocketAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>>, +std::pair>>, +std::pair>, +std::pair>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::AdminDistance, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::AdminDistance>>>, + std::pair, Child<::facebook::fboss::RouteForwardAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::RouteForwardAction>>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::cfg::AclLookupClass, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(address, 2); + STRUCT_CHILD_GETTERS(adminDistance, 1); + STRUCT_CHILD_GETTERS(action, 2); + STRUCT_CHILD_GETTERS(counterID, 3); + STRUCT_CHILD_GETTERS(classID, 4); + STRUCT_CHILD_GETTERS(nexthops, 5); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return address(); } + if constexpr (__id == 1) { return adminDistance(); } + else if constexpr (__id == 2) { return action(); } + else if constexpr (__id == 3) { return counterID(); } + else if constexpr (__id == 4) { return classID(); } + else if constexpr (__id == 5) { return nexthops(); } } template @@ -6084,308 +6324,136 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::SwitchConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::SwitchConfig, + ::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::SwitchConfig, + ::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchConfig>, - Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Port>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Vlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::VlanPort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Interface>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticRouteWithNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AggregatePort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::SflowCollector>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::Lacp, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::LoadBalancer>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Mirror>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::TrafficCounter>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosPolicy>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticMplsRouteWithNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticMplsRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticMplsRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticIp2MplsRoute>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::SwitchSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::AclTableGroup, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PortFlowletConfigName, ::facebook::fboss::cfg::PortFlowletConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>, + Parent>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>>, +std::pair>>, +std::pair>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::cfg::UdfMatchL2Type, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::UdfMatchL2Type>>>, + std::pair, Child<::facebook::fboss::cfg::UdfMatchL3Type, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::UdfMatchL3Type>>>, + std::pair, Child<::facebook::fboss::cfg::UdfMatchL4Type, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::UdfMatchL4Type>>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(version, 1); - STRUCT_CHILD_GETTERS(ports, 2); - STRUCT_CHILD_GETTERS(vlans, 3); - STRUCT_CHILD_GETTERS(vlanPorts, 4); - STRUCT_CHILD_GETTERS(defaultVlan, 5); - STRUCT_CHILD_GETTERS(interfaces, 6); - STRUCT_CHILD_GETTERS(arpTimeoutSeconds, 7); - STRUCT_CHILD_GETTERS(arpRefreshSeconds, 8); - STRUCT_CHILD_GETTERS(arpAgerInterval, 9); - STRUCT_CHILD_GETTERS(proactiveArp, 10); - STRUCT_CHILD_GETTERS(cpuMAC, 11); - STRUCT_CHILD_GETTERS(staticRoutesWithNhops, 12); - STRUCT_CHILD_GETTERS(staticRoutesToNull, 13); - STRUCT_CHILD_GETTERS(staticRoutesToCPU, 14); - STRUCT_CHILD_GETTERS(acls, 15); - STRUCT_CHILD_GETTERS(maxNeighborProbes, 16); - STRUCT_CHILD_GETTERS(staleEntryInterval, 17); - STRUCT_CHILD_GETTERS(aggregatePorts, 18); - STRUCT_CHILD_GETTERS(clientIdToAdminDistance, 19); - STRUCT_CHILD_GETTERS(dhcpRelaySrcOverrideV4, 20); - STRUCT_CHILD_GETTERS(dhcpRelaySrcOverrideV6, 21); - STRUCT_CHILD_GETTERS(dhcpReplySrcOverrideV4, 22); - STRUCT_CHILD_GETTERS(dhcpReplySrcOverrideV6, 23); - STRUCT_CHILD_GETTERS(globalEgressTrafficPolicy_DEPRECATED, 24); - STRUCT_CHILD_GETTERS(config_version, 25); - STRUCT_CHILD_GETTERS(sFlowCollectors, 26); - STRUCT_CHILD_GETTERS(lacp, 27); - STRUCT_CHILD_GETTERS(cpuQueues, 28); - STRUCT_CHILD_GETTERS(cpuTrafficPolicy, 29); - STRUCT_CHILD_GETTERS(loadBalancers, 30); - STRUCT_CHILD_GETTERS(dataPlaneTrafficPolicy, 31); - STRUCT_CHILD_GETTERS(mirrors, 32); - STRUCT_CHILD_GETTERS(trafficCounters, 33); - STRUCT_CHILD_GETTERS(qosPolicies, 34); - STRUCT_CHILD_GETTERS(defaultPortQueues, 35); - STRUCT_CHILD_GETTERS(staticMplsRoutesWithNhops, 36); - STRUCT_CHILD_GETTERS(staticMplsRoutesToNull, 37); - STRUCT_CHILD_GETTERS(staticMplsRoutesToCPU, 38); - STRUCT_CHILD_GETTERS(staticIp2MplsRoutes, 39); - STRUCT_CHILD_GETTERS(portQueueConfigs, 40); - STRUCT_CHILD_GETTERS(switchSettings, 41); - STRUCT_CHILD_GETTERS(qcmConfig, 42); - STRUCT_CHILD_GETTERS(portPgConfigs, 43); - STRUCT_CHILD_GETTERS(bufferPoolConfigs, 44); - STRUCT_CHILD_GETTERS(aclTableGroup, 45); - STRUCT_CHILD_GETTERS(sdkVersion, 46); - STRUCT_CHILD_GETTERS(ipInIpTunnels, 47); - STRUCT_CHILD_GETTERS(dsfNodes, 48); - STRUCT_CHILD_GETTERS(udfConfig, 49); - STRUCT_CHILD_GETTERS(flowletSwitchingConfig, 50); - STRUCT_CHILD_GETTERS(defaultVoqConfig, 51); - STRUCT_CHILD_GETTERS(portFlowletConfigs, 52); - STRUCT_CHILD_GETTERS(icmpV4UnavailableSrcAddress, 53); - STRUCT_CHILD_GETTERS(hostname, 54); + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(l2PktType, 2); + STRUCT_CHILD_GETTERS(l3pktType, 3); + STRUCT_CHILD_GETTERS(l4PktType, 4); + STRUCT_CHILD_GETTERS(UdfL4DstPort, 5); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return version(); } - else if constexpr (__id == 2) { return ports(); } - else if constexpr (__id == 3) { return vlans(); } - else if constexpr (__id == 4) { return vlanPorts(); } - else if constexpr (__id == 5) { return defaultVlan(); } - else if constexpr (__id == 6) { return interfaces(); } - else if constexpr (__id == 7) { return arpTimeoutSeconds(); } - else if constexpr (__id == 8) { return arpRefreshSeconds(); } - else if constexpr (__id == 9) { return arpAgerInterval(); } - else if constexpr (__id == 10) { return proactiveArp(); } - else if constexpr (__id == 11) { return cpuMAC(); } - else if constexpr (__id == 12) { return staticRoutesWithNhops(); } - else if constexpr (__id == 13) { return staticRoutesToNull(); } - else if constexpr (__id == 14) { return staticRoutesToCPU(); } - else if constexpr (__id == 15) { return acls(); } - else if constexpr (__id == 16) { return maxNeighborProbes(); } - else if constexpr (__id == 17) { return staleEntryInterval(); } - else if constexpr (__id == 18) { return aggregatePorts(); } - else if constexpr (__id == 19) { return clientIdToAdminDistance(); } - else if constexpr (__id == 20) { return dhcpRelaySrcOverrideV4(); } - else if constexpr (__id == 21) { return dhcpRelaySrcOverrideV6(); } - else if constexpr (__id == 22) { return dhcpReplySrcOverrideV4(); } - else if constexpr (__id == 23) { return dhcpReplySrcOverrideV6(); } - else if constexpr (__id == 24) { return globalEgressTrafficPolicy_DEPRECATED(); } - else if constexpr (__id == 25) { return config_version(); } - else if constexpr (__id == 26) { return sFlowCollectors(); } - else if constexpr (__id == 27) { return lacp(); } - else if constexpr (__id == 28) { return cpuQueues(); } - else if constexpr (__id == 29) { return cpuTrafficPolicy(); } - else if constexpr (__id == 30) { return loadBalancers(); } - else if constexpr (__id == 31) { return dataPlaneTrafficPolicy(); } - else if constexpr (__id == 32) { return mirrors(); } - else if constexpr (__id == 33) { return trafficCounters(); } - else if constexpr (__id == 34) { return qosPolicies(); } - else if constexpr (__id == 35) { return defaultPortQueues(); } - else if constexpr (__id == 36) { return staticMplsRoutesWithNhops(); } - else if constexpr (__id == 37) { return staticMplsRoutesToNull(); } - else if constexpr (__id == 38) { return staticMplsRoutesToCPU(); } - else if constexpr (__id == 39) { return staticIp2MplsRoutes(); } - else if constexpr (__id == 40) { return portQueueConfigs(); } - else if constexpr (__id == 41) { return switchSettings(); } - else if constexpr (__id == 42) { return qcmConfig(); } - else if constexpr (__id == 43) { return portPgConfigs(); } - else if constexpr (__id == 44) { return bufferPoolConfigs(); } - else if constexpr (__id == 45) { return aclTableGroup(); } - else if constexpr (__id == 46) { return sdkVersion(); } - else if constexpr (__id == 47) { return ipInIpTunnels(); } - else if constexpr (__id == 48) { return dsfNodes(); } - else if constexpr (__id == 49) { return udfConfig(); } - else if constexpr (__id == 50) { return flowletSwitchingConfig(); } - else if constexpr (__id == 51) { return defaultVoqConfig(); } - else if constexpr (__id == 52) { return portFlowletConfigs(); } - else if constexpr (__id == 53) { return icmpV4UnavailableSrcAddress(); } - else if constexpr (__id == 54) { return hostname(); } + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return l2PktType(); } + else if constexpr (__id == 3) { return l3pktType(); } + else if constexpr (__id == 4) { return l4PktType(); } + else if constexpr (__id == 5) { return UdfL4DstPort(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + + +template +class ChildThriftPath<::facebook::fboss::bcm::BcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::bcm::BcmConfig, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::bcm::BcmConfig>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::bcm::BcmConfig, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::bcm::BcmConfig>, + Parent>; + using strings = ::facebook::fboss::bcm::bcm_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(config, 1); + STRUCT_CHILD_GETTERS(yamlConfig, 2); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return config(); } + else if constexpr (__id == 2) { return yamlConfig(); } } template @@ -6396,21 +6464,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::QueueMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::MatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::QueueMatchAction, + ::facebook::fboss::state::MatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QueueMatchAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::MatchAction>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::QueueMatchAction, + ::facebook::fboss::state::MatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QueueMatchAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::MatchAction>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -6419,20 +6487,70 @@ class ChildThriftPath<::facebook::fboss::cfg::QueueMatchAction, ::facebook::fbos ChildTag, Self >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::state::SendToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficCounter, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::SetDscpMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::cfg::ToCpuAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::ToCpuAction>>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::MacsecFlowAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::state::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::state::SetTc, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::UserDefinedTrapAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::cfg::FlowletAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::FlowletAction>>>>; template - using NameToId = fatal::tuple>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(queueId, 1); + STRUCT_CHILD_GETTERS(sendToQueue, 1); + STRUCT_CHILD_GETTERS(trafficCounter, 2); + STRUCT_CHILD_GETTERS(setDscp, 3); + STRUCT_CHILD_GETTERS(ingressMirror, 4); + STRUCT_CHILD_GETTERS(egressMirror, 5); + STRUCT_CHILD_GETTERS(toCpuAction, 6); + STRUCT_CHILD_GETTERS(macsecFlow, 7); + STRUCT_CHILD_GETTERS(redirectToNextHop, 8); + STRUCT_CHILD_GETTERS(setTc, 9); + STRUCT_CHILD_GETTERS(userDefinedTrap, 10); + STRUCT_CHILD_GETTERS(flowletAction, 11); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return queueId(); } + if constexpr (__id == 1) { return sendToQueue(); } + else if constexpr (__id == 2) { return trafficCounter(); } + else if constexpr (__id == 3) { return setDscp(); } + else if constexpr (__id == 4) { return ingressMirror(); } + else if constexpr (__id == 5) { return egressMirror(); } + else if constexpr (__id == 6) { return toCpuAction(); } + else if constexpr (__id == 7) { return macsecFlow(); } + else if constexpr (__id == 8) { return redirectToNextHop(); } + else if constexpr (__id == 9) { return setTc(); } + else if constexpr (__id == 10) { return userDefinedTrap(); } + else if constexpr (__id == 11) { return flowletAction(); } } template @@ -6441,21 +6559,42 @@ class ChildThriftPath<::facebook::fboss::cfg::QueueMatchAction, ::facebook::fbos } }; +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + template -class ChildThriftPath<::facebook::fboss::cfg::PacketCounterMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PacketCounterMatchAction, + ::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketCounterMatchAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PacketCounterMatchAction, + ::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketCounterMatchAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -6466,20 +6605,65 @@ class ChildThriftPath<::facebook::fboss::cfg::PacketCounterMatchAction, ::facebo ChildTag, Self >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>, + std::pair, Child>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(counterName, 1); + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(id, 2); + STRUCT_CHILD_GETTERS(recordStats, 3); + STRUCT_CHILD_GETTERS(routable, 5); + STRUCT_CHILD_GETTERS(ipAddresses, 6); + STRUCT_CHILD_GETTERS(dhcpRelayAddressV4, 7); + STRUCT_CHILD_GETTERS(dhcpRelayAddressV6, 8); + STRUCT_CHILD_GETTERS(dhcpRelayOverridesV4, 9); + STRUCT_CHILD_GETTERS(dhcpRelayOverridesV6, 10); + STRUCT_CHILD_GETTERS(intfID, 11); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return counterName(); } + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return id(); } + else if constexpr (__id == 3) { return recordStats(); } + else if constexpr (__id == 5) { return routable(); } + else if constexpr (__id == 6) { return ipAddresses(); } + else if constexpr (__id == 7) { return dhcpRelayAddressV4(); } + else if constexpr (__id == 8) { return dhcpRelayAddressV6(); } + else if constexpr (__id == 9) { return dhcpRelayOverridesV4(); } + else if constexpr (__id == 10) { return dhcpRelayOverridesV6(); } + else if constexpr (__id == 11) { return intfID(); } } template @@ -6488,73 +6672,105 @@ class ChildThriftPath<::facebook::fboss::cfg::PacketCounterMatchAction, ::facebo } }; +template +class ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::std::int8_t>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, + ::apache::thrift::type::list<::apache::thrift::type::byte_t>, + Parent> { + public: + using Self = Path< + ::std::vector<::std::int8_t>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, + ::apache::thrift::type::list<::apache::thrift::type::byte_t>, + Parent>; + using Child = Path<::std::int8_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableActionType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::AclTableActionType>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableActionType>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::AclTableActionType>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableActionType>>, + Parent>; + using Child = Path<::facebook::fboss::cfg::AclTableActionType, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableActionType>, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; template -class ChildThriftPath<::facebook::fboss::cfg::MacAndVlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::MacAndVlan, + ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::MacAndVlan, + ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using Child = ChildThriftPath<::facebook::fboss::state::LoadBalancerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; - template - using TypeFor = typename Children::template type_of; + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::LoadBalancerID); +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosPolicy>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::QosPolicy>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::QosPolicy>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(vlanID, 1); - STRUCT_CHILD_GETTERS(macAddress, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return vlanID(); } - else if constexpr (__id == 2) { return macAddress(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::cfg::QueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::QueueCongestionDetection, + ::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::QueueCongestionDetection>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::FlowletSwitchingConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::QueueCongestionDetection, + ::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::QueueCongestionDetection>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::FlowletSwitchingConfig>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -6565,20 +6781,75 @@ class ChildThriftPath<::facebook::fboss::cfg::QueueCongestionDetection, ::facebo ChildTag, Self >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::LinearQueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::facebook::fboss::cfg::SwitchingMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchingMode>>>>; template - using NameToId = fatal::tuple>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(linear, 1); + STRUCT_CHILD_GETTERS(inactivityIntervalUsecs, 1); + STRUCT_CHILD_GETTERS(flowletTableSize, 2); + STRUCT_CHILD_GETTERS(dynamicEgressLoadExponent, 3); + STRUCT_CHILD_GETTERS(dynamicQueueExponent, 4); + STRUCT_CHILD_GETTERS(dynamicQueueMinThresholdBytes, 5); + STRUCT_CHILD_GETTERS(dynamicQueueMaxThresholdBytes, 6); + STRUCT_CHILD_GETTERS(dynamicSampleRate, 7); + STRUCT_CHILD_GETTERS(dynamicEgressMinThresholdBytes, 8); + STRUCT_CHILD_GETTERS(dynamicEgressMaxThresholdBytes, 9); + STRUCT_CHILD_GETTERS(dynamicPhysicalQueueExponent, 10); + STRUCT_CHILD_GETTERS(maxLinks, 11); + STRUCT_CHILD_GETTERS(switchingMode, 12); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return linear(); } + if constexpr (__id == 1) { return inactivityIntervalUsecs(); } + else if constexpr (__id == 2) { return flowletTableSize(); } + else if constexpr (__id == 3) { return dynamicEgressLoadExponent(); } + else if constexpr (__id == 4) { return dynamicQueueExponent(); } + else if constexpr (__id == 5) { return dynamicQueueMinThresholdBytes(); } + else if constexpr (__id == 6) { return dynamicQueueMaxThresholdBytes(); } + else if constexpr (__id == 7) { return dynamicSampleRate(); } + else if constexpr (__id == 8) { return dynamicEgressMinThresholdBytes(); } + else if constexpr (__id == 9) { return dynamicEgressMaxThresholdBytes(); } + else if constexpr (__id == 10) { return dynamicPhysicalQueueExponent(); } + else if constexpr (__id == 11) { return maxLinks(); } + else if constexpr (__id == 12) { return switchingMode(); } } template @@ -6587,78 +6858,42 @@ class ChildThriftPath<::facebook::fboss::cfg::QueueCongestionDetection, ::facebo } }; - template -class ChildThriftPath<::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::TransceiverConfigOverride>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::ChipConfig, + ::std::vector<::facebook::fboss::cfg::TransceiverConfigOverride>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::TransceiverConfigOverride>>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::ChipConfig, + ::std::vector<::facebook::fboss::cfg::TransceiverConfigOverride>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::TransceiverConfigOverride>>, Parent>; - using strings = ::facebook::fboss::cfg::platform_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::bcm::BcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = ChildThriftPath<::facebook::fboss::cfg::TransceiverConfigOverride, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(bcm, 1); - STRUCT_CHILD_GETTERS(asic, 2); - STRUCT_CHILD_GETTERS(asicConfig, 3); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return bcm(); } - else if constexpr (__id == 2) { return asic(); } - else if constexpr (__id == 3) { return asicConfig(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::QcmConfig, + ::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QcmConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Ttl>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::QcmConfig, + ::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QcmConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Ttl>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -6669,95 +6904,25 @@ class ChildThriftPath<::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(numFlowSamplesPerView, 1); - STRUCT_CHILD_GETTERS(flowLimit, 2); - STRUCT_CHILD_GETTERS(numFlowsClear, 3); - STRUCT_CHILD_GETTERS(scanIntervalInUsecs, 4); - STRUCT_CHILD_GETTERS(exportThreshold, 5); - STRUCT_CHILD_GETTERS(flowWeights, 6); - STRUCT_CHILD_GETTERS(agingIntervalInMsecs, 7); - STRUCT_CHILD_GETTERS(collectorDstIp, 8); - STRUCT_CHILD_GETTERS(collectorSrcPort, 10); - STRUCT_CHILD_GETTERS(collectorDstPort, 11); - STRUCT_CHILD_GETTERS(collectorDscp, 12); - STRUCT_CHILD_GETTERS(ppsToQcm, 13); - STRUCT_CHILD_GETTERS(collectorSrcIp, 14); - STRUCT_CHILD_GETTERS(monitorQcmPortList, 15); - STRUCT_CHILD_GETTERS(port2QosQueueIds, 16); - STRUCT_CHILD_GETTERS(monitorQcmCfgPortsOnly, 17); + STRUCT_CHILD_GETTERS(value, 1); + STRUCT_CHILD_GETTERS(mask, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return numFlowSamplesPerView(); } - else if constexpr (__id == 2) { return flowLimit(); } - else if constexpr (__id == 3) { return numFlowsClear(); } - else if constexpr (__id == 4) { return scanIntervalInUsecs(); } - else if constexpr (__id == 5) { return exportThreshold(); } - else if constexpr (__id == 6) { return flowWeights(); } - else if constexpr (__id == 7) { return agingIntervalInMsecs(); } - else if constexpr (__id == 8) { return collectorDstIp(); } - else if constexpr (__id == 10) { return collectorSrcPort(); } - else if constexpr (__id == 11) { return collectorDstPort(); } - else if constexpr (__id == 12) { return collectorDscp(); } - else if constexpr (__id == 13) { return ppsToQcm(); } - else if constexpr (__id == 14) { return collectorSrcIp(); } - else if constexpr (__id == 15) { return monitorQcmPortList(); } - else if constexpr (__id == 16) { return port2QosQueueIds(); } - else if constexpr (__id == 17) { return monitorQcmCfgPortsOnly(); } + if constexpr (__id == 1) { return value(); } + else if constexpr (__id == 2) { return mask(); } } template @@ -6767,43 +6932,43 @@ std::pair -class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>>>, Parent> { public: using Self = Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>>>, Parent>; - using Child = Path<::facebook::fboss::cfg::SwitchType, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>, Self>; + using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int64_t); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; template -class ChildThriftPath<::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::MplsAction, + ::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MplsAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::MplsAction, + ::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MplsAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfConfig>, Parent>; - using strings = ::facebook::fboss::mpls_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -6812,30 +6977,25 @@ class ChildThriftPath<::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::Fs ChildTag, Self >; - using Children = fatal::tuple>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::MplsActionCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MplsActionCode>>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(action, 1); - STRUCT_CHILD_GETTERS(swapLabel, 2); - STRUCT_CHILD_GETTERS(pushLabels, 3); + STRUCT_CHILD_GETTERS(udfGroups, 1); + STRUCT_CHILD_GETTERS(udfPacketMatcher, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return action(); } - else if constexpr (__id == 2) { return swapLabel(); } - else if constexpr (__id == 3) { return pushLabels(); } + if constexpr (__id == 1) { return udfGroups(); } + else if constexpr (__id == 2) { return udfPacketMatcher(); } } template @@ -6846,21 +7006,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::state::MatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::MatchAction, + ::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::MatchAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::TxSettings>, Parent> { public: using Self = Path< - ::facebook::fboss::state::MatchAction, + ::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::MatchAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::TxSettings>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::phy::phy_tags::strings; template using Child = Path< ChildType, @@ -6869,70 +7029,170 @@ class ChildThriftPath<::facebook::fboss::state::MatchAction, ::facebook::fboss:: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::state::SendToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficCounter, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::SetDscpMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::cfg::ToCpuAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::ToCpuAction>>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::MacsecFlowAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::state::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::state::SetTc, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::UserDefinedTrapAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::cfg::FlowletAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::FlowletAction>>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(sendToQueue, 1); - STRUCT_CHILD_GETTERS(trafficCounter, 2); - STRUCT_CHILD_GETTERS(setDscp, 3); - STRUCT_CHILD_GETTERS(ingressMirror, 4); - STRUCT_CHILD_GETTERS(egressMirror, 5); - STRUCT_CHILD_GETTERS(toCpuAction, 6); - STRUCT_CHILD_GETTERS(macsecFlow, 7); - STRUCT_CHILD_GETTERS(redirectToNextHop, 8); - STRUCT_CHILD_GETTERS(setTc, 9); - STRUCT_CHILD_GETTERS(userDefinedTrap, 10); - STRUCT_CHILD_GETTERS(flowletAction, 11); + STRUCT_CHILD_GETTERS(pre, 1); + STRUCT_CHILD_GETTERS(pre2, 2); + STRUCT_CHILD_GETTERS(main, 3); + STRUCT_CHILD_GETTERS(post, 4); + STRUCT_CHILD_GETTERS(post2, 5); + STRUCT_CHILD_GETTERS(post3, 6); + STRUCT_CHILD_GETTERS(lutMode, 7); + STRUCT_CHILD_GETTERS(driveCurrent, 8); + STRUCT_CHILD_GETTERS(diffEncoderEn, 9); + STRUCT_CHILD_GETTERS(digGain, 10); + STRUCT_CHILD_GETTERS(ffeCoeff0, 11); + STRUCT_CHILD_GETTERS(ffeCoeff1, 12); + STRUCT_CHILD_GETTERS(ffeCoeff2, 13); + STRUCT_CHILD_GETTERS(ffeCoeff3, 14); + STRUCT_CHILD_GETTERS(ffeCoeff4, 15); + STRUCT_CHILD_GETTERS(parityEncoderEn, 16); + STRUCT_CHILD_GETTERS(thpEn, 17); + STRUCT_CHILD_GETTERS(setPrecode, 18); + STRUCT_CHILD_GETTERS(pre3, 19); + STRUCT_CHILD_GETTERS(driverSwing, 20); + STRUCT_CHILD_GETTERS(innerEyeNeg, 21); + STRUCT_CHILD_GETTERS(innerEyePos, 22); + STRUCT_CHILD_GETTERS(ffeCoeff5, 23); + STRUCT_CHILD_GETTERS(ldoBypass, 24); + STRUCT_CHILD_GETTERS(firPre1, 25); + STRUCT_CHILD_GETTERS(firPre2, 26); + STRUCT_CHILD_GETTERS(firPre3, 27); + STRUCT_CHILD_GETTERS(firMain, 28); + STRUCT_CHILD_GETTERS(firPost1, 29); + STRUCT_CHILD_GETTERS(firPost2, 30); + STRUCT_CHILD_GETTERS(firPost3, 31); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return sendToQueue(); } - else if constexpr (__id == 2) { return trafficCounter(); } - else if constexpr (__id == 3) { return setDscp(); } - else if constexpr (__id == 4) { return ingressMirror(); } - else if constexpr (__id == 5) { return egressMirror(); } - else if constexpr (__id == 6) { return toCpuAction(); } - else if constexpr (__id == 7) { return macsecFlow(); } - else if constexpr (__id == 8) { return redirectToNextHop(); } - else if constexpr (__id == 9) { return setTc(); } - else if constexpr (__id == 10) { return userDefinedTrap(); } - else if constexpr (__id == 11) { return flowletAction(); } + if constexpr (__id == 1) { return pre(); } + else if constexpr (__id == 2) { return pre2(); } + else if constexpr (__id == 3) { return main(); } + else if constexpr (__id == 4) { return post(); } + else if constexpr (__id == 5) { return post2(); } + else if constexpr (__id == 6) { return post3(); } + else if constexpr (__id == 7) { return lutMode(); } + else if constexpr (__id == 8) { return driveCurrent(); } + else if constexpr (__id == 9) { return diffEncoderEn(); } + else if constexpr (__id == 10) { return digGain(); } + else if constexpr (__id == 11) { return ffeCoeff0(); } + else if constexpr (__id == 12) { return ffeCoeff1(); } + else if constexpr (__id == 13) { return ffeCoeff2(); } + else if constexpr (__id == 14) { return ffeCoeff3(); } + else if constexpr (__id == 15) { return ffeCoeff4(); } + else if constexpr (__id == 16) { return parityEncoderEn(); } + else if constexpr (__id == 17) { return thpEn(); } + else if constexpr (__id == 18) { return setPrecode(); } + else if constexpr (__id == 19) { return pre3(); } + else if constexpr (__id == 20) { return driverSwing(); } + else if constexpr (__id == 21) { return innerEyeNeg(); } + else if constexpr (__id == 22) { return innerEyePos(); } + else if constexpr (__id == 23) { return ffeCoeff5(); } + else if constexpr (__id == 24) { return ldoBypass(); } + else if constexpr (__id == 25) { return firPre1(); } + else if constexpr (__id == 26) { return firPre2(); } + else if constexpr (__id == 27) { return firPre3(); } + else if constexpr (__id == 28) { return firMain(); } + else if constexpr (__id == 29) { return firPost1(); } + else if constexpr (__id == 30) { return firPost2(); } + else if constexpr (__id == 31) { return firPost3(); } } template @@ -6942,62 +7202,41 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - -template -class ChildThriftPath<::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::set<::facebook::fboss::cfg::IPv6Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, + ::std::set<::facebook::fboss::cfg::IPv6Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>>>, + ::apache::thrift::type_class::set<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::set<::apache::thrift::type::enum_t<::facebook::fboss::cfg::IPv6Field>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, + ::std::set<::facebook::fboss::cfg::IPv6Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>>>, + ::apache::thrift::type_class::set<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::set<::apache::thrift::type::enum_t<::facebook::fboss::cfg::IPv6Field>>, Parent>; - using Child = ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortPgConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = Path<::facebook::fboss::cfg::IPv6Field, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IPv6Field>, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PortPgConfigName); + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::IPv6Field); }; template -class ChildThriftPath<::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::LoadBalancer, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::RedirectNextHop, + ::facebook::fboss::cfg::LoadBalancer, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::LoadBalancer>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::RedirectNextHop, + ::facebook::fboss::cfg::LoadBalancer, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::LoadBalancer>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -7008,25 +7247,35 @@ class ChildThriftPath<::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple>>, +std::pair>, +std::pair>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::LoadBalancerID, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::Fields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::cfg::HashingAlgorithm, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::HashingAlgorithm>>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(ip, 1); - STRUCT_CHILD_GETTERS(intfID, 2); + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(fieldSelection, 2); + STRUCT_CHILD_GETTERS(algorithm, 3); + STRUCT_CHILD_GETTERS(seed, 4); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return ip(); } - else if constexpr (__id == 2) { return intfID(); } + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return fieldSelection(); } + else if constexpr (__id == 3) { return algorithm(); } + else if constexpr (__id == 4) { return seed(); } } template @@ -7035,23 +7284,44 @@ std::pair } }; +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::MatchToAction>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::MatchToAction>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MatchToAction>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::MatchToAction>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MatchToAction>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::MatchToAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + template -class ChildThriftPath<::facebook::fboss::NextHopThrift, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::NextHopThrift, + ::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::NextHopThrift>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>, Parent> { public: using Self = Path< - ::facebook::fboss::NextHopThrift, + ::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::NextHopThrift>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>, Parent>; - using strings = ::facebook::fboss::common_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -7060,35 +7330,25 @@ class ChildThriftPath<::facebook::fboss::NextHopThrift, ::facebook::fboss::fsdb: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(address, 1); - STRUCT_CHILD_GETTERS(weight, 2); - STRUCT_CHILD_GETTERS(mplsAction, 3); - STRUCT_CHILD_GETTERS(disableTTLDecrement, 4); + STRUCT_CHILD_GETTERS(remoteSystem, 1); + STRUCT_CHILD_GETTERS(remotePort, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return address(); } - else if constexpr (__id == 2) { return weight(); } - else if constexpr (__id == 3) { return mplsAction(); } - else if constexpr (__id == 4) { return disableTTLDecrement(); } + if constexpr (__id == 1) { return remoteSystem(); } + else if constexpr (__id == 2) { return remotePort(); } } template @@ -7099,21 +7359,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::phy::PolaritySwap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::MinimumCapacity, + ::facebook::fboss::phy::PolaritySwap, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::MinimumCapacity>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PolaritySwap>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::MinimumCapacity, + ::facebook::fboss::phy::PolaritySwap, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::MinimumCapacity>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PolaritySwap>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::phy::phy_tags::strings; template using Child = Path< ChildType, @@ -7122,25 +7382,25 @@ class ChildThriftPath<::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, - std::pair, Child>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child>, + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(linkCount, 1); - STRUCT_CHILD_GETTERS(linkPercentage, 2); + STRUCT_CHILD_GETTERS(rx, 1); + STRUCT_CHILD_GETTERS(tx, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return linkCount(); } - else if constexpr (__id == 2) { return linkPercentage(); } + if constexpr (__id == 1) { return rx(); } + else if constexpr (__id == 2) { return tx(); } } template @@ -7200,102 +7460,134 @@ std::pair - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + +template +class ChildThriftPath<::std::set<::facebook::fboss::cfg::TransportField>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::set<::facebook::fboss::cfg::TransportField>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::set<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::set<::apache::thrift::type::enum_t<::facebook::fboss::cfg::TransportField>>, + Parent> { + public: + using Self = Path< + ::std::set<::facebook::fboss::cfg::TransportField>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::set<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::set<::apache::thrift::type::enum_t<::facebook::fboss::cfg::TransportField>>, + Parent>; + using Child = Path<::facebook::fboss::cfg::TransportField, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::TransportField>, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::TransportField); +}; + +template +class ChildThriftPath<::std::map<::std::int32_t, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::int32_t, ::std::string>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::string>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::string_t>, + Parent> { + public: + using Self = Path< + ::std::map<::std::int32_t, ::std::string>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::string>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::string_t>, + Parent>; + using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTable>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::AclTable>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclTable>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::AclTable>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclTable>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::AclTable, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::set<::facebook::fboss::cfg::TransportField>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::set<::facebook::fboss::cfg::TransportField>, + ::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::set<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::set<::apache::thrift::type::enum_t<::facebook::fboss::cfg::TransportField>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PacketRxReason>, ::apache::thrift::type::i16_t>, Parent> { public: using Self = Path< - ::std::set<::facebook::fboss::cfg::TransportField>, + ::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::set<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::set<::apache::thrift::type::enum_t<::facebook::fboss::cfg::TransportField>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PacketRxReason>, ::apache::thrift::type::i16_t>, Parent>; - using Child = Path<::facebook::fboss::cfg::TransportField, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::TransportField>, Self>; + using Child = Path<::std::int16_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::TransportField); + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PacketRxReason); }; - template -class ChildThriftPath<::facebook::fboss::phy::PolaritySwap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int32_t, ::facebook::fboss::TcvrState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::PolaritySwap, + ::std::map<::std::int32_t, ::facebook::fboss::TcvrState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PolaritySwap>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::struct_t<::facebook::fboss::TcvrState>>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::PolaritySwap, + ::std::map<::std::int32_t, ::facebook::fboss::TcvrState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PolaritySwap>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::struct_t<::facebook::fboss::TcvrState>>, Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child>, - std::pair, Child>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = ChildThriftPath<::facebook::fboss::TcvrState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(rx, 1); - STRUCT_CHILD_GETTERS(tx, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return rx(); } - else if constexpr (__id == 2) { return tx(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::state::VlanFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::VlanFields, + ::facebook::fboss::cfg::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::VlanFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AsicConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::state::VlanFields, + ::facebook::fboss::cfg::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::VlanFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AsicConfig>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::asic_config_v2_tags::strings; template using Child = Path< ChildType, @@ -7304,80 +7596,25 @@ class ChildThriftPath<::facebook::fboss::state::VlanFields, ::facebook::fboss::f ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int16_t, bool>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::MacEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(vlanId, 1); - STRUCT_CHILD_GETTERS(vlanName, 2); - STRUCT_CHILD_GETTERS(intfID, 3); - STRUCT_CHILD_GETTERS(dhcpV4Relay, 4); - STRUCT_CHILD_GETTERS(dhcpV6Relay, 5); - STRUCT_CHILD_GETTERS(dhcpRelayOverridesV4, 6); - STRUCT_CHILD_GETTERS(dhcpRelayOverridesV6, 7); - STRUCT_CHILD_GETTERS(ports, 8); - STRUCT_CHILD_GETTERS(arpTable, 9); - STRUCT_CHILD_GETTERS(arpResponseTable, 10); - STRUCT_CHILD_GETTERS(ndpTable, 11); - STRUCT_CHILD_GETTERS(ndpResponseTable, 12); - STRUCT_CHILD_GETTERS(macTable, 13); + STRUCT_CHILD_GETTERS(common, 1); + STRUCT_CHILD_GETTERS(npuEntries, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return vlanId(); } - else if constexpr (__id == 2) { return vlanName(); } - else if constexpr (__id == 3) { return intfID(); } - else if constexpr (__id == 4) { return dhcpV4Relay(); } - else if constexpr (__id == 5) { return dhcpV6Relay(); } - else if constexpr (__id == 6) { return dhcpRelayOverridesV4(); } - else if constexpr (__id == 7) { return dhcpRelayOverridesV6(); } - else if constexpr (__id == 8) { return ports(); } - else if constexpr (__id == 9) { return arpTable(); } - else if constexpr (__id == 10) { return arpResponseTable(); } - else if constexpr (__id == 11) { return ndpTable(); } - else if constexpr (__id == 12) { return ndpResponseTable(); } - else if constexpr (__id == 13) { return macTable(); } + if constexpr (__id == 1) { return common(); } + else if constexpr (__id == 2) { return npuEntries(); } } template @@ -7387,43 +7624,43 @@ std::pair -class ChildThriftPath<::std::map<::std::int32_t, ::facebook::fboss::TcvrState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::phy::PhyState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int32_t, ::facebook::fboss::TcvrState>, + ::std::map<::std::string, ::facebook::fboss::phy::PhyState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::struct_t<::facebook::fboss::TcvrState>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::PhyState>>, Parent> { public: using Self = Path< - ::std::map<::std::int32_t, ::facebook::fboss::TcvrState>, + ::std::map<::std::string, ::facebook::fboss::phy::PhyState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::struct_t<::facebook::fboss::TcvrState>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::PhyState>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::TcvrState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::phy::PhyState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::string); }; template -class ChildThriftPath<::facebook::fboss::cfg::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::AsicConfig, + ::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AsicConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AgentConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::AsicConfig, + ::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AsicConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AgentConfig>, Parent>; - using strings = ::facebook::fboss::cfg::asic_config_v2_tags::strings; + using strings = ::facebook::fboss::cfg::agent_config_tags::strings; template using Child = Path< ChildType, @@ -7432,25 +7669,30 @@ class ChildThriftPath<::facebook::fboss::cfg::AsicConfig, ::facebook::fboss::fsd ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::SwitchConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::PlatformConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(common, 1); - STRUCT_CHILD_GETTERS(npuEntries, 2); + STRUCT_CHILD_GETTERS(defaultCommandLineArgs, 1); + STRUCT_CHILD_GETTERS(sw, 2); + STRUCT_CHILD_GETTERS(platform, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return common(); } - else if constexpr (__id == 2) { return npuEntries(); } + if constexpr (__id == 1) { return defaultCommandLineArgs(); } + else if constexpr (__id == 2) { return sw(); } + else if constexpr (__id == 3) { return platform(); } } template @@ -7460,62 +7702,62 @@ std::pair -class ChildThriftPath<::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PacketRxReason>, ::apache::thrift::type::i16_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PacketRxReason>, ::apache::thrift::type::i16_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>>>, Parent>; - using Child = Path<::std::int16_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t, Self>; + using Child = ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PacketRxReason); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::SwitchSettingsFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::SwitchSettingsFields>, + ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::SwitchSettingsFields>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::SwitchSettingsFields>, + ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::SwitchSettingsFields>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::SwitchSettingsFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::TransceiverSpecFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); + CONTAINER_CHILD_GETTERS(::std::int16_t); }; template -class ChildThriftPath<::facebook::fboss::cfg::SflowTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::AclTableGroup, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::SflowTunnel, + ::facebook::fboss::cfg::AclTableGroup, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowTunnel>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclTableGroup>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::SflowTunnel, + ::facebook::fboss::cfg::AclTableGroup, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowTunnel>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclTableGroup>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -7526,35 +7768,30 @@ class ChildThriftPath<::facebook::fboss::cfg::SflowTunnel, ::facebook::fboss::fs ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTable>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::cfg::AclStage, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclStage>>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(ip, 1); - STRUCT_CHILD_GETTERS(udpSrcPort, 2); - STRUCT_CHILD_GETTERS(udpDstPort, 3); - STRUCT_CHILD_GETTERS(ttl, 4); + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(aclTables, 2); + STRUCT_CHILD_GETTERS(stage, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return ip(); } - else if constexpr (__id == 2) { return udpSrcPort(); } - else if constexpr (__id == 3) { return udpDstPort(); } - else if constexpr (__id == 4) { return ttl(); } + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return aclTables(); } + else if constexpr (__id == 3) { return stage(); } } template @@ -7564,85 +7801,100 @@ std::pair>>: }; template -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::MediaLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, + ::std::vector<::facebook::fboss::MediaLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>>, Parent> { public: using Self = Path< - ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, + ::std::vector<::facebook::fboss::MediaLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::MirrorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::MediaLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::string); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; -template -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::enum_t<::facebook::fboss::fsdb::FsdbSubscriptionState>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::enum_t<::facebook::fboss::fsdb::FsdbSubscriptionState>>, - Parent>; - using Child = Path<::facebook::fboss::fsdb::FsdbSubscriptionState, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::fsdb::FsdbSubscriptionState>, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::string); -}; template -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::phy::PhyState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::string, ::facebook::fboss::phy::PhyState>, + ::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::PhyState>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SdkVersion>, Parent> { public: using Self = Path< - ::std::map<::std::string, ::facebook::fboss::phy::PhyState>, + ::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::PhyState>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SdkVersion>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::phy::PhyState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(asicSdk, 1); + STRUCT_CHILD_GETTERS(saiSdk, 2); + STRUCT_CHILD_GETTERS(firmware, 3); - CONTAINER_CHILD_GETTERS(::std::string); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return asicSdk(); } + else if constexpr (__id == 2) { return saiSdk(); } + else if constexpr (__id == 3) { return firmware(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::RoutePrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::AgentConfig, + ::facebook::fboss::state::RoutePrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AgentConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::RoutePrefix>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::AgentConfig, + ::facebook::fboss::state::RoutePrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AgentConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::RoutePrefix>, Parent>; - using strings = ::facebook::fboss::cfg::agent_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -7651,30 +7903,30 @@ class ChildThriftPath<::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fs ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::SwitchConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::PlatformConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child>, + std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(defaultCommandLineArgs, 1); - STRUCT_CHILD_GETTERS(sw, 2); - STRUCT_CHILD_GETTERS(platform, 3); + STRUCT_CHILD_GETTERS(v6, 1); + STRUCT_CHILD_GETTERS(prefix, 2); + STRUCT_CHILD_GETTERS(mask, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return defaultCommandLineArgs(); } - else if constexpr (__id == 2) { return sw(); } - else if constexpr (__id == 3) { return platform(); } + if constexpr (__id == 1) { return v6(); } + else if constexpr (__id == 2) { return prefix(); } + else if constexpr (__id == 3) { return mask(); } } template @@ -7685,21 +7937,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::ControlPlaneFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PortNeighbor, + ::facebook::fboss::state::ControlPlaneFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PortNeighbor, + ::facebook::fboss::state::ControlPlaneFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -7708,25 +7960,30 @@ class ChildThriftPath<::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::f ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::PortQueueFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(remoteSystem, 1); - STRUCT_CHILD_GETTERS(remotePort, 2); + STRUCT_CHILD_GETTERS(queues, 1); + STRUCT_CHILD_GETTERS(rxReasonToQueue, 2); + STRUCT_CHILD_GETTERS(defaultQosPolicy, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return remoteSystem(); } - else if constexpr (__id == 2) { return remotePort(); } + if constexpr (__id == 1) { return queues(); } + else if constexpr (__id == 2) { return rxReasonToQueue(); } + else if constexpr (__id == 3) { return defaultQosPolicy(); } } template @@ -7735,44 +7992,23 @@ std::pair -class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::TransceiverSpecFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int16_t); -}; - template -class ChildThriftPath<::facebook::fboss::cfg::AclTableGroup, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::TransceiverSpecFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::AclTableGroup, + ::facebook::fboss::state::TransceiverSpecFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclTableGroup>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::AclTableGroup, + ::facebook::fboss::state::TransceiverSpecFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclTableGroup>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -7781,30 +8017,35 @@ class ChildThriftPath<::facebook::fboss::cfg::AclTableGroup, ::facebook::fboss:: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTable>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::cfg::AclStage, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclStage>>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>, +std::pair>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child>, + std::pair, Child<::facebook::fboss::MediaInterfaceCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MediaInterfaceCode>>>, + std::pair, Child<::facebook::fboss::TransceiverManagementInterface, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::TransceiverManagementInterface>>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(aclTables, 2); - STRUCT_CHILD_GETTERS(stage, 3); + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(cableLength, 2); + STRUCT_CHILD_GETTERS(mediaInterface, 3); + STRUCT_CHILD_GETTERS(managementInterface, 4); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return aclTables(); } - else if constexpr (__id == 3) { return stage(); } + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return cableLength(); } + else if constexpr (__id == 3) { return mediaInterface(); } + else if constexpr (__id == 4) { return managementInterface(); } } template @@ -7813,27 +8054,6 @@ std::pair> } }; -template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>>>, - Parent> { - public: - using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>>>, - Parent>; - using Child = ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); -}; - template class ChildThriftPath<::facebook::fboss::TransceiverAttributes, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : @@ -7943,167 +8163,84 @@ std::pair } }; - -template -class ChildThriftPath<::facebook::fboss::state::BlockedMacAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::state::BlockedMacAddress, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedMacAddress>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::state::BlockedMacAddress, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedMacAddress>, - Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(macAddrToBlockVlanID, 1); - STRUCT_CHILD_GETTERS(macAddrToBlockAddr, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return macAddrToBlockVlanID(); } - else if constexpr (__id == 2) { return macAddrToBlockAddr(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - template -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::RouteFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::string, ::facebook::fboss::state::RouteFields>, + ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteFields>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>, Parent> { public: using Self = Path< - ::std::map<::std::string, ::facebook::fboss::state::RouteFields>, + ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteFields>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::RouteFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::MirrorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::string); }; - template -class ChildThriftPath<::facebook::fboss::cfg::SflowCollector, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::SflowCollector, + ::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowCollector>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::enum_t<::facebook::fboss::fsdb::FsdbSubscriptionState>>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::SflowCollector, + ::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowCollector>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::enum_t<::facebook::fboss::fsdb::FsdbSubscriptionState>>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = Path<::facebook::fboss::fsdb::FsdbSubscriptionState, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::fsdb::FsdbSubscriptionState>, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(ip, 1); - STRUCT_CHILD_GETTERS(port, 2); - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return ip(); } - else if constexpr (__id == 2) { return port(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::std::string); }; template -class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::state::SystemPortFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int64_t, ::facebook::fboss::state::SystemPortFields>, + ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::SystemPortThrift>>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>, Parent> { public: using Self = Path< - ::std::map<::std::int64_t, ::facebook::fboss::state::SystemPortFields>, + ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::SystemPortThrift>>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::SystemPortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::FibContainerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int64_t); + CONTAINER_CHILD_GETTERS(::std::int16_t); }; template -class ChildThriftPath<::facebook::fboss::state::ControlPlaneFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::ControlPlaneFields, + ::facebook::fboss::state::TrafficClassToQosAttributeEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, Parent> { public: using Self = Path< - ::facebook::fboss::state::ControlPlaneFields, + ::facebook::fboss::state::TrafficClassToQosAttributeEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, Parent>; using strings = ::facebook::fboss::state::switch_state_tags::strings; template @@ -8114,30 +8251,25 @@ class ChildThriftPath<::facebook::fboss::state::ControlPlaneFields, ::facebook:: ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::PortQueueFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(queues, 1); - STRUCT_CHILD_GETTERS(rxReasonToQueue, 2); - STRUCT_CHILD_GETTERS(defaultQosPolicy, 3); + STRUCT_CHILD_GETTERS(trafficClass, 1); + STRUCT_CHILD_GETTERS(attr, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return queues(); } - else if constexpr (__id == 2) { return rxReasonToQueue(); } - else if constexpr (__id == 3) { return defaultQosPolicy(); } + if constexpr (__id == 1) { return trafficClass(); } + else if constexpr (__id == 2) { return attr(); } } template @@ -8146,75 +8278,44 @@ std::pair -class ChildThriftPath<::facebook::fboss::switch_reachability::SwitchReachability, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::switch_reachability::SwitchReachability, + ::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::switch_reachability::SwitchReachability>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>>, Parent> { public: using Self = Path< - ::facebook::fboss::switch_reachability::SwitchReachability, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::switch_reachability::SwitchReachability>, - Parent>; - using strings = ::facebook::fboss::switch_reachability::switch_reachability_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int64_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(fabricPortGroupMap, 1); - STRUCT_CHILD_GETTERS(switchIdToFabricPortGroupMap, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return fabricPortGroupMap(); } - else if constexpr (__id == 2) { return switchIdToFabricPortGroupMap(); } - } + ::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::MediaLaneSignals, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::MediaLaneSignals, + ::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSignals>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>, Parent> { public: using Self = Path< - ::facebook::fboss::MediaLaneSignals, + ::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSignals>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>, Parent>; - using strings = ::facebook::fboss::transceiver_tags::strings; + using strings = ::facebook::fboss::phy::phy_tags::strings; template using Child = Path< ChildType, @@ -8223,50 +8324,50 @@ class ChildThriftPath<::facebook::fboss::MediaLaneSignals, ::facebook::fboss::fs ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, std::pair, Child>, std::pair, Child>, std::pair, Child>, std::pair, Child>, - std::pair, Child>, - std::pair, Child>>; + std::pair, ChildThriftPath<::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; STRUCT_CHILD_GETTERS(lane, 1); - STRUCT_CHILD_GETTERS(txLos, 2); - STRUCT_CHILD_GETTERS(rxLos, 3); - STRUCT_CHILD_GETTERS(txLol, 4); - STRUCT_CHILD_GETTERS(rxLol, 5); - STRUCT_CHILD_GETTERS(txFault, 6); - STRUCT_CHILD_GETTERS(txAdaptEqFault, 7); + STRUCT_CHILD_GETTERS(signalDetectLive, 2); + STRUCT_CHILD_GETTERS(signalDetectChanged, 3); + STRUCT_CHILD_GETTERS(cdrLockLive, 4); + STRUCT_CHILD_GETTERS(cdrLockChanged, 5); + STRUCT_CHILD_GETTERS(txSettings, 6); + STRUCT_CHILD_GETTERS(rxFrequencyPPM, 7); template auto operator()(const std::integral_constant&) { if constexpr (__id == 1) { return lane(); } - else if constexpr (__id == 2) { return txLos(); } - else if constexpr (__id == 3) { return rxLos(); } - else if constexpr (__id == 4) { return txLol(); } - else if constexpr (__id == 5) { return rxLol(); } - else if constexpr (__id == 6) { return txFault(); } - else if constexpr (__id == 7) { return txAdaptEqFault(); } + else if constexpr (__id == 2) { return signalDetectLive(); } + else if constexpr (__id == 3) { return signalDetectChanged(); } + else if constexpr (__id == 4) { return cdrLockLive(); } + else if constexpr (__id == 5) { return cdrLockChanged(); } + else if constexpr (__id == 6) { return txSettings(); } + else if constexpr (__id == 7) { return rxFrequencyPPM(); } } template @@ -8275,44 +8376,23 @@ std::pair -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AclEntryFields>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AclEntryFields>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::AclEntryFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::string); -}; - template -class ChildThriftPath<::facebook::fboss::phy::PinID, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::PinID, + ::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PinID>, + ::apache::thrift::type::struct_t<::facebook::fboss::asic::AsicConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::PinID, + ::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PinID>, + ::apache::thrift::type::struct_t<::facebook::fboss::asic::AsicConfig>, Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; + using strings = ::facebook::fboss::asic::asic_config_tags::strings; template using Child = Path< ChildType, @@ -8321,25 +8401,20 @@ class ChildThriftPath<::facebook::fboss::phy::PinID, ::facebook::fboss::fsdb::Fs ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(chip, 1); - STRUCT_CHILD_GETTERS(lane, 2); + STRUCT_CHILD_GETTERS(config, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return chip(); } - else if constexpr (__id == 2) { return lane(); } + if constexpr (__id == 1) { return config(); } } template @@ -8349,119 +8424,83 @@ std::pair>> }; template -class ChildThriftPath<::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, + ::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::BurstMonitorWeight>, ::apache::thrift::type::i16_t>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableQualifier>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, + ::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::BurstMonitorWeight>, ::apache::thrift::type::i16_t>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableQualifier>>, Parent>; - using Child = Path<::std::int16_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t, Self>; + using Child = Path<::facebook::fboss::cfg::AclTableQualifier, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableQualifier>, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::BurstMonitorWeight); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::state::Subport>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, + ::std::vector<::facebook::fboss::state::Subport>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::Subport>>, Parent> { public: using Self = Path< - ::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, + ::std::vector<::facebook::fboss::state::Subport>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::Subport>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::Subport, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int16_t); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; - template -class ChildThriftPath<::facebook::fboss::phy::DataPlanePhyChip, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::DataPlanePhyChip, + ::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::DataPlanePhyChip>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::DataPlanePhyChip, + ::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::DataPlanePhyChip>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>>, Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::phy::DataPlanePhyChipType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::phy::DataPlanePhyChipType>>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(type, 2); - STRUCT_CHILD_GETTERS(physicalID, 3); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return type(); } - else if constexpr (__id == 3) { return physicalID(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PortQueueConfigName); }; template -class ChildThriftPath<::facebook::fboss::state::IpTunnelFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::PortFlowletFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::IpTunnelFields, + ::facebook::fboss::state::PortFlowletFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFlowletFields>, Parent> { public: using Self = Path< - ::facebook::fboss::state::IpTunnelFields, + ::facebook::fboss::state::PortFlowletFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFlowletFields>, Parent>; using strings = ::facebook::fboss::state::switch_state_tags::strings; template @@ -8472,75 +8511,35 @@ class ChildThriftPath<::facebook::fboss::state::IpTunnelFields, ::facebook::fbos ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(ipTunnelId, 1); - STRUCT_CHILD_GETTERS(underlayIntfId, 2); - STRUCT_CHILD_GETTERS(mode, 3); - STRUCT_CHILD_GETTERS(dstIp, 4); - STRUCT_CHILD_GETTERS(type, 5); - STRUCT_CHILD_GETTERS(tunnelTermType, 6); - STRUCT_CHILD_GETTERS(ttlMode, 7); - STRUCT_CHILD_GETTERS(dscpMode, 8); - STRUCT_CHILD_GETTERS(ecnMode, 9); - STRUCT_CHILD_GETTERS(srcIp, 10); - STRUCT_CHILD_GETTERS(dstIpMask, 11); - STRUCT_CHILD_GETTERS(srcIpMask, 12); + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(scalingFactor, 2); + STRUCT_CHILD_GETTERS(loadWeight, 3); + STRUCT_CHILD_GETTERS(queueWeight, 4); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return ipTunnelId(); } - else if constexpr (__id == 2) { return underlayIntfId(); } - else if constexpr (__id == 3) { return mode(); } - else if constexpr (__id == 4) { return dstIp(); } - else if constexpr (__id == 5) { return type(); } - else if constexpr (__id == 6) { return tunnelTermType(); } - else if constexpr (__id == 7) { return ttlMode(); } - else if constexpr (__id == 8) { return dscpMode(); } - else if constexpr (__id == 9) { return ecnMode(); } - else if constexpr (__id == 10) { return srcIp(); } - else if constexpr (__id == 11) { return dstIpMask(); } - else if constexpr (__id == 12) { return srcIpMask(); } + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return scalingFactor(); } + else if constexpr (__id == 3) { return loadWeight(); } + else if constexpr (__id == 4) { return queueWeight(); } } template @@ -8551,21 +8550,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::MediaInterfaceId, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::BlockedMacAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::MediaInterfaceId, + ::facebook::fboss::state::BlockedMacAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MediaInterfaceId>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedMacAddress>, Parent> { public: using Self = Path< - ::facebook::fboss::MediaInterfaceId, + ::facebook::fboss::state::BlockedMacAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MediaInterfaceId>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedMacAddress>, Parent>; - using strings = ::facebook::fboss::transceiver_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -8574,30 +8573,25 @@ class ChildThriftPath<::facebook::fboss::MediaInterfaceId, ::facebook::fboss::fs ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::facebook::fboss::MediaInterfaceUnion, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::MediaInterfaceCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MediaInterfaceCode>>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(lane, 1); - STRUCT_CHILD_GETTERS(media, 2); - STRUCT_CHILD_GETTERS(code, 3); + STRUCT_CHILD_GETTERS(macAddrToBlockVlanID, 1); + STRUCT_CHILD_GETTERS(macAddrToBlockAddr, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return lane(); } - else if constexpr (__id == 2) { return media(); } - else if constexpr (__id == 3) { return code(); } + if constexpr (__id == 1) { return macAddrToBlockVlanID(); } + else if constexpr (__id == 2) { return macAddrToBlockAddr(); } } template @@ -8607,93 +8601,104 @@ std::pair>> }; template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::BufferPoolFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::RouteFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::BufferPoolFields>>, + ::std::map<::std::string, ::facebook::fboss::state::RouteFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::BufferPoolFields>>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteFields>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::BufferPoolFields>>, + ::std::map<::std::string, ::facebook::fboss::state::RouteFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::BufferPoolFields>>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteFields>>, Parent>; - using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::BufferPoolFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::RouteFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); + CONTAINER_CHILD_GETTERS(::std::string); }; - template -class ChildThriftPath<::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::TeFlow, + ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::TeFlow>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>, Parent> { public: using Self = Path< - ::facebook::fboss::TeFlow, + ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::TeFlow>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>, Parent>; - using strings = ::facebook::fboss::ctrl_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using Child = ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; - template - using TypeFor = typename Children::template type_of; + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AggregatePortMember>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::AggregatePortMember>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePortMember>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::AggregatePortMember>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePortMember>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::AggregatePortMember, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(srcPort, 1); - STRUCT_CHILD_GETTERS(dstPrefix, 2); - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return srcPort(); } - else if constexpr (__id == 2) { return dstPrefix(); } - } + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } +template +class ChildThriftPath<::std::map<::facebook::fboss::ClientID, ::facebook::fboss::state::RouteNextHopEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::facebook::fboss::ClientID, ::facebook::fboss::state::RouteNextHopEntry>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::ClientID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>>, + Parent> { + public: + using Self = Path< + ::std::map<::facebook::fboss::ClientID, ::facebook::fboss::state::RouteNextHopEntry>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::ClientID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::state::RouteNextHopEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::facebook::fboss::ClientID); }; template -class ChildThriftPath<::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::AclUdfEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::BufferPoolConfig, + ::facebook::fboss::cfg::AclUdfEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::BufferPoolConfig, + ::facebook::fboss::cfg::AclUdfEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -8704,74 +8709,53 @@ class ChildThriftPath<::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fbos ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; - + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(sharedBytes, 1); - STRUCT_CHILD_GETTERS(headroomBytes, 2); - STRUCT_CHILD_GETTERS(reservedBytes, 3); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return sharedBytes(); } - else if constexpr (__id == 2) { return headroomBytes(); } - else if constexpr (__id == 3) { return reservedBytes(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; -template -class ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::string, ::std::string>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, - Parent> { - public: - using Self = Path< - ::std::map<::std::string, ::std::string>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, - Parent>; - using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(udfGroup, 1); + STRUCT_CHILD_GETTERS(roceBytes, 2); + STRUCT_CHILD_GETTERS(roceMask, 3); - CONTAINER_CHILD_GETTERS(::std::string); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return udfGroup(); } + else if constexpr (__id == 2) { return roceBytes(); } + else if constexpr (__id == 3) { return roceMask(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::facebook::fboss::cfg::PortFlowletConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PortFlowletConfig, + ::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortFlowletConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PortFlowletConfig, + ::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortFlowletConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -8782,30 +8766,25 @@ class ChildThriftPath<::facebook::fboss::cfg::PortFlowletConfig, ::facebook::fbo ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + using Children = fatal::tuple>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::PacketRxReason, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PacketRxReason>>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(scalingFactor, 1); - STRUCT_CHILD_GETTERS(loadWeight, 2); - STRUCT_CHILD_GETTERS(queueWeight, 3); + STRUCT_CHILD_GETTERS(rxReason, 1); + STRUCT_CHILD_GETTERS(queueId, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return scalingFactor(); } - else if constexpr (__id == 2) { return loadWeight(); } - else if constexpr (__id == 3) { return queueWeight(); } + if constexpr (__id == 1) { return rxReason(); } + else if constexpr (__id == 2) { return queueId(); } } template @@ -8814,46 +8793,116 @@ std::pair -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>>, - Parent> { - public: - using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>>, - Parent>; - using Child = ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); -}; template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::MirrorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>>, + ::facebook::fboss::state::MirrorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>>, + ::facebook::fboss::state::MirrorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>, Parent>; - using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::state::switch_state_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, ChildThriftPath<::facebook::fboss::state::MirrorTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(dscp, 3); + STRUCT_CHILD_GETTERS(truncate, 4); + STRUCT_CHILD_GETTERS(configHasEgressPort, 5); + STRUCT_CHILD_GETTERS(egressPort, 6); + STRUCT_CHILD_GETTERS(destinationIp, 7); + STRUCT_CHILD_GETTERS(srcIp, 8); + STRUCT_CHILD_GETTERS(udpSrcPort, 9); + STRUCT_CHILD_GETTERS(udpDstPort, 10); + STRUCT_CHILD_GETTERS(tunnel, 11); + STRUCT_CHILD_GETTERS(isResolved, 12); + STRUCT_CHILD_GETTERS(switchId, 13); + STRUCT_CHILD_GETTERS(egressPortDesc, 14); + STRUCT_CHILD_GETTERS(samplingRate, 15); - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 3) { return dscp(); } + else if constexpr (__id == 4) { return truncate(); } + else if constexpr (__id == 5) { return configHasEgressPort(); } + else if constexpr (__id == 6) { return egressPort(); } + else if constexpr (__id == 7) { return destinationIp(); } + else if constexpr (__id == 8) { return srcIp(); } + else if constexpr (__id == 9) { return udpSrcPort(); } + else if constexpr (__id == 10) { return udpDstPort(); } + else if constexpr (__id == 11) { return tunnel(); } + else if constexpr (__id == 12) { return isResolved(); } + else if constexpr (__id == 13) { return switchId(); } + else if constexpr (__id == 14) { return egressPortDesc(); } + else if constexpr (__id == 15) { return samplingRate(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; @@ -9014,64 +9063,214 @@ std::pair -class ChildThriftPath<::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::string>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PlatformAttributes>, ::apache::thrift::type::string_t>, + Parent> { + public: + using Self = Path< + ::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::string>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PlatformAttributes>, ::apache::thrift::type::string_t>, + Parent>; + using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PlatformAttributes); +}; + +template +class ChildThriftPath<::std::set<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::set<::std::int32_t>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::set<::apache::thrift::type_class::integral>, + ::apache::thrift::type::set<::apache::thrift::type::i32_t>, + Parent> { + public: + using Self = Path< + ::std::set<::std::int32_t>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::set<::apache::thrift::type_class::integral>, + ::apache::thrift::type::set<::apache::thrift::type::i32_t>, + Parent>; + using Child = Path<::std::int32_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + + +template +class ChildThriftPath<::facebook::fboss::switch_reachability::SwitchReachability, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::switch_reachability::SwitchReachability, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::switch_reachability::SwitchReachability>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::switch_reachability::SwitchReachability, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::switch_reachability::SwitchReachability>, + Parent>; + using strings = ::facebook::fboss::switch_reachability::switch_reachability_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int64_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(fabricPortGroupMap, 1); + STRUCT_CHILD_GETTERS(switchIdToFabricPortGroupMap, 2); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return fabricPortGroupMap(); } + else if constexpr (__id == 2) { return switchIdToFabricPortGroupMap(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + + +template +class ChildThriftPath<::facebook::fboss::MediaLaneSignals, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>, + ::facebook::fboss::MediaLaneSignals, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::string>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PlatformAttributes>, ::apache::thrift::type::string_t>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSignals>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>, + ::facebook::fboss::MediaLaneSignals, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::string>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PlatformAttributes>, ::apache::thrift::type::string_t>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSignals>, Parent>; - using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; + using strings = ::facebook::fboss::transceiver_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(lane, 1); + STRUCT_CHILD_GETTERS(txLos, 2); + STRUCT_CHILD_GETTERS(rxLos, 3); + STRUCT_CHILD_GETTERS(txLol, 4); + STRUCT_CHILD_GETTERS(rxLol, 5); + STRUCT_CHILD_GETTERS(txFault, 6); + STRUCT_CHILD_GETTERS(txAdaptEqFault, 7); - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PlatformAttributes); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return lane(); } + else if constexpr (__id == 2) { return txLos(); } + else if constexpr (__id == 3) { return rxLos(); } + else if constexpr (__id == 4) { return txLol(); } + else if constexpr (__id == 5) { return rxLol(); } + else if constexpr (__id == 6) { return txFault(); } + else if constexpr (__id == 7) { return txAdaptEqFault(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::std::set<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::set<::std::int32_t>, + ::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::set<::apache::thrift::type_class::integral>, - ::apache::thrift::type::set<::apache::thrift::type::i32_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AclEntryFields>>, Parent> { public: using Self = Path< - ::std::set<::std::int32_t>, + ::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::set<::apache::thrift::type_class::integral>, - ::apache::thrift::type::set<::apache::thrift::type::i32_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AclEntryFields>>, Parent>; - using Child = Path<::std::int32_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::AclEntryFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::string); }; template -class ChildThriftPath<::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::phy::PinID, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::VlanPort, + ::facebook::fboss::phy::PinID, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PinID>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::VlanPort, + ::facebook::fboss::phy::PinID, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PinID>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::phy::phy_tags::strings; template using Child = Path< ChildType, @@ -9080,35 +9279,25 @@ class ChildThriftPath<::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::facebook::fboss::cfg::SpanningTreeState, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SpanningTreeState>>>, - std::pair, Child>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(vlanID, 1); - STRUCT_CHILD_GETTERS(logicalPort, 2); - STRUCT_CHILD_GETTERS(spanningTreeState, 3); - STRUCT_CHILD_GETTERS(emitTags, 4); + STRUCT_CHILD_GETTERS(chip, 1); + STRUCT_CHILD_GETTERS(lane, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return vlanID(); } - else if constexpr (__id == 2) { return logicalPort(); } - else if constexpr (__id == 3) { return spanningTreeState(); } - else if constexpr (__id == 4) { return emitTags(); } + if constexpr (__id == 1) { return chip(); } + else if constexpr (__id == 2) { return lane(); } } template @@ -9118,64 +9307,121 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::VlanPort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::VlanPort>, + ::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::BurstMonitorWeight>, ::apache::thrift::type::i16_t>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::VlanPort>, + ::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::BurstMonitorWeight>, ::apache::thrift::type::i16_t>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = Path<::std::int16_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::BurstMonitorWeight); }; template -class ChildThriftPath<::std::vector<::facebook::fboss::HostLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::HostLaneSettings>, + ::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::HostLaneSettings>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::HostLaneSettings>, + ::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::HostLaneSettings>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::HostLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::int16_t); }; template -class ChildThriftPath<::facebook::fboss::phy::PmdState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::phy::DataPlanePhyChip, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::PmdState, + ::facebook::fboss::phy::DataPlanePhyChip, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PmdState>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::DataPlanePhyChip>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::PmdState, + ::facebook::fboss::phy::DataPlanePhyChip, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PmdState>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::DataPlanePhyChip>, + Parent>; + using strings = ::facebook::fboss::phy::phy_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::phy::DataPlanePhyChipType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::phy::DataPlanePhyChipType>>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(type, 2); + STRUCT_CHILD_GETTERS(physicalID, 3); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return type(); } + else if constexpr (__id == 3) { return physicalID(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + + +template +class ChildThriftPath<::facebook::fboss::state::IpTunnelFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::state::IpTunnelFields, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::state::IpTunnelFields, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>, Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -9184,20 +9430,75 @@ class ChildThriftPath<::facebook::fboss::phy::PmdState, ::facebook::fboss::fsdb: ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(lanes, 1); + STRUCT_CHILD_GETTERS(ipTunnelId, 1); + STRUCT_CHILD_GETTERS(underlayIntfId, 2); + STRUCT_CHILD_GETTERS(mode, 3); + STRUCT_CHILD_GETTERS(dstIp, 4); + STRUCT_CHILD_GETTERS(type, 5); + STRUCT_CHILD_GETTERS(tunnelTermType, 6); + STRUCT_CHILD_GETTERS(ttlMode, 7); + STRUCT_CHILD_GETTERS(dscpMode, 8); + STRUCT_CHILD_GETTERS(ecnMode, 9); + STRUCT_CHILD_GETTERS(srcIp, 10); + STRUCT_CHILD_GETTERS(dstIpMask, 11); + STRUCT_CHILD_GETTERS(srcIpMask, 12); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return lanes(); } + if constexpr (__id == 1) { return ipTunnelId(); } + else if constexpr (__id == 2) { return underlayIntfId(); } + else if constexpr (__id == 3) { return mode(); } + else if constexpr (__id == 4) { return dstIp(); } + else if constexpr (__id == 5) { return type(); } + else if constexpr (__id == 6) { return tunnelTermType(); } + else if constexpr (__id == 7) { return ttlMode(); } + else if constexpr (__id == 8) { return dscpMode(); } + else if constexpr (__id == 9) { return ecnMode(); } + else if constexpr (__id == 10) { return srcIp(); } + else if constexpr (__id == 11) { return dstIpMask(); } + else if constexpr (__id == 12) { return srcIpMask(); } } template @@ -9208,21 +9509,21 @@ class ChildThriftPath<::facebook::fboss::phy::PmdState, ::facebook::fboss::fsdb: template -class ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::MediaInterfaceId, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::network::thrift::BinaryAddress, + ::facebook::fboss::MediaInterfaceId, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::network::thrift::BinaryAddress>, + ::apache::thrift::type::struct_t<::facebook::fboss::MediaInterfaceId>, Parent> { public: using Self = Path< - ::facebook::network::thrift::BinaryAddress, + ::facebook::fboss::MediaInterfaceId, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::network::thrift::BinaryAddress>, + ::apache::thrift::type::struct_t<::facebook::fboss::MediaInterfaceId>, Parent>; - using strings = ::facebook::network::thrift::Address_tags::strings; + using strings = ::facebook::fboss::transceiver_tags::strings; template using Child = Path< ChildType, @@ -9231,30 +9532,30 @@ class ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fb ChildTag, Self >; - using Children = fatal::tuple>>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::folly::fbstring, ::apache::thrift::type_class::binary, ::apache::thrift::type::cpp_type<::folly::fbstring, ::apache::thrift::type::binary_t>>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::facebook::fboss::MediaInterfaceUnion, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::MediaInterfaceCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MediaInterfaceCode>>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(addr, 1); - STRUCT_CHILD_GETTERS(port, 2); - STRUCT_CHILD_GETTERS(ifName, 3); + STRUCT_CHILD_GETTERS(lane, 1); + STRUCT_CHILD_GETTERS(media, 2); + STRUCT_CHILD_GETTERS(code, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return addr(); } - else if constexpr (__id == 2) { return port(); } - else if constexpr (__id == 3) { return ifName(); } + if constexpr (__id == 1) { return lane(); } + else if constexpr (__id == 2) { return media(); } + else if constexpr (__id == 3) { return code(); } } template @@ -9264,43 +9565,43 @@ std::pair }; template -class ChildThriftPath<::std::vector<::facebook::fboss::state::BlockedNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::BufferPoolFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::state::BlockedNeighbor>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::BufferPoolFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::BufferPoolFields>>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::state::BlockedNeighbor>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::BufferPoolFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::BufferPoolFields>>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::BlockedNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::BufferPoolFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; template -class ChildThriftPath<::facebook::fboss::cfg::Neighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::Neighbor, + ::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Neighbor>, + ::apache::thrift::type::struct_t<::facebook::fboss::TeFlow>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::Neighbor, + ::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Neighbor>, + ::apache::thrift::type::struct_t<::facebook::fboss::TeFlow>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::ctrl_tags::strings; template using Child = Path< ChildType, @@ -9309,25 +9610,25 @@ class ChildThriftPath<::facebook::fboss::cfg::Neighbor, ::facebook::fboss::fsdb: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; + using Children = fatal::tuple>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + std::pair, ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(vlanID, 1); - STRUCT_CHILD_GETTERS(ipAddress, 2); + STRUCT_CHILD_GETTERS(srcPort, 1); + STRUCT_CHILD_GETTERS(dstPrefix, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return vlanID(); } - else if constexpr (__id == 2) { return ipAddress(); } + if constexpr (__id == 1) { return srcPort(); } + else if constexpr (__id == 2) { return dstPrefix(); } } template @@ -9336,84 +9637,99 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::RedirectNextHop>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::RedirectNextHop>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::RedirectNextHop>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>>, + ::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>>, + ::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>, Parent>; - using Child = ChildThriftPath<::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(sharedBytes, 1); + STRUCT_CHILD_GETTERS(headroomBytes, 2); + STRUCT_CHILD_GETTERS(reservedBytes, 3); - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return sharedBytes(); } + else if constexpr (__id == 2) { return headroomBytes(); } + else if constexpr (__id == 3) { return reservedBytes(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::PortFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int16_t, ::facebook::fboss::state::PortFields>, + ::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFields>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, Parent> { public: using Self = Path< - ::std::map<::std::int16_t, ::facebook::fboss::state::PortFields>, + ::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFields>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::PortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int16_t); + CONTAINER_CHILD_GETTERS(::std::string); }; template -class ChildThriftPath<::facebook::fboss::cfg::PfcWatchdog, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PortFlowletConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PfcWatchdog, + ::facebook::fboss::cfg::PortFlowletConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PfcWatchdog>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortFlowletConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PfcWatchdog, + ::facebook::fboss::cfg::PortFlowletConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PfcWatchdog>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortFlowletConfig>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -9424,30 +9740,30 @@ class ChildThriftPath<::facebook::fboss::cfg::PfcWatchdog, ::facebook::fboss::fs ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::facebook::fboss::cfg::PfcWatchdogRecoveryAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PfcWatchdogRecoveryAction>>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(detectionTimeMsecs, 1); - STRUCT_CHILD_GETTERS(recoveryTimeMsecs, 2); - STRUCT_CHILD_GETTERS(recoveryAction, 3); + STRUCT_CHILD_GETTERS(scalingFactor, 1); + STRUCT_CHILD_GETTERS(loadWeight, 2); + STRUCT_CHILD_GETTERS(queueWeight, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return detectionTimeMsecs(); } - else if constexpr (__id == 2) { return recoveryTimeMsecs(); } - else if constexpr (__id == 3) { return recoveryAction(); } + if constexpr (__id == 1) { return scalingFactor(); } + else if constexpr (__id == 2) { return loadWeight(); } + else if constexpr (__id == 3) { return queueWeight(); } } template @@ -9457,64 +9773,64 @@ std::pair -class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>>, Parent> { public: using Self = Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int64_t); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; template -class ChildThriftPath<::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::BufferPoolConfigName); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; template -class ChildThriftPath<::facebook::fboss::state::LoadBalancerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::LoadBalancerFields, + ::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>, Parent> { public: using Self = Path< - ::facebook::fboss::state::LoadBalancerFields, + ::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -9523,55 +9839,35 @@ class ChildThriftPath<::facebook::fboss::state::LoadBalancerFields, ::facebook:: ChildTag, Self >; - using Children = fatal::tuple>>, -std::pair>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::LoadBalancerID, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>>>, - std::pair, Child<::facebook::fboss::cfg::HashingAlgorithm, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::HashingAlgorithm>>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::IPv4Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::IPv6Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::TransportField>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::MPLSField>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::facebook::fboss::cfg::SpanningTreeState, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SpanningTreeState>>>, + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(algorithm, 2); - STRUCT_CHILD_GETTERS(seed, 3); - STRUCT_CHILD_GETTERS(v4Fields, 4); - STRUCT_CHILD_GETTERS(v6Fields, 5); - STRUCT_CHILD_GETTERS(transportFields, 6); - STRUCT_CHILD_GETTERS(mplsFields, 7); - STRUCT_CHILD_GETTERS(udfGroups, 8); + STRUCT_CHILD_GETTERS(vlanID, 1); + STRUCT_CHILD_GETTERS(logicalPort, 2); + STRUCT_CHILD_GETTERS(spanningTreeState, 3); + STRUCT_CHILD_GETTERS(emitTags, 4); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return algorithm(); } - else if constexpr (__id == 3) { return seed(); } - else if constexpr (__id == 4) { return v4Fields(); } - else if constexpr (__id == 5) { return v6Fields(); } - else if constexpr (__id == 6) { return transportFields(); } - else if constexpr (__id == 7) { return mplsFields(); } - else if constexpr (__id == 8) { return udfGroups(); } + if constexpr (__id == 1) { return vlanID(); } + else if constexpr (__id == 2) { return logicalPort(); } + else if constexpr (__id == 3) { return spanningTreeState(); } + else if constexpr (__id == 4) { return emitTags(); } } template @@ -9580,106 +9876,65 @@ std::pair -class ChildThriftPath<::facebook::fboss::fsdb::AgentData, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::VlanPort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::fsdb::AgentData, + ::std::vector<::facebook::fboss::cfg::VlanPort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::fsdb::AgentData>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>>, Parent> { public: using Self = Path< - ::facebook::fboss::fsdb::AgentData, + ::std::vector<::facebook::fboss::cfg::VlanPort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::fsdb::AgentData>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>>, Parent>; - using strings = ::facebook::fboss::fsdb::fsdb_model_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::state::SwitchState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::switch_reachability::SwitchReachability>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = ChildThriftPath<::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(config, 1); - STRUCT_CHILD_GETTERS(switchState, 2); - STRUCT_CHILD_GETTERS(fsdbSubscriptions, 4); - STRUCT_CHILD_GETTERS(dsfSwitchReachability, 5); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return config(); } - else if constexpr (__id == 2) { return switchState(); } - else if constexpr (__id == 4) { return fsdbSubscriptions(); } - else if constexpr (__id == 5) { return dsfSwitchReachability(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::map<::std::int64_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::HostLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int64_t, ::std::int32_t>, + ::std::vector<::facebook::fboss::HostLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::i32_t>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::HostLaneSettings>>, Parent> { public: using Self = Path< - ::std::map<::std::int64_t, ::std::int32_t>, + ::std::vector<::facebook::fboss::HostLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::i32_t>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::HostLaneSettings>>, Parent>; - using Child = Path<::std::int32_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t, Self>; + using Child = ChildThriftPath<::facebook::fboss::HostLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int64_t); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::cfg::NdpConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::phy::PmdState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::NdpConfig, + ::facebook::fboss::phy::PmdState, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::NdpConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PmdState>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::NdpConfig, + ::facebook::fboss::phy::PmdState, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::NdpConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PmdState>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::phy::phy_tags::strings; template using Child = Path< ChildType, @@ -9688,55 +9943,20 @@ class ChildThriftPath<::facebook::fboss::cfg::NdpConfig, ::facebook::fboss::fsdb ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(routerAdvertisementSeconds, 1); - STRUCT_CHILD_GETTERS(curHopLimit, 2); - STRUCT_CHILD_GETTERS(routerLifetime, 3); - STRUCT_CHILD_GETTERS(prefixValidLifetimeSeconds, 4); - STRUCT_CHILD_GETTERS(prefixPreferredLifetimeSeconds, 5); - STRUCT_CHILD_GETTERS(routerAdvertisementManagedBit, 6); - STRUCT_CHILD_GETTERS(routerAdvertisementOtherBit, 7); - STRUCT_CHILD_GETTERS(routerAddress, 8); + STRUCT_CHILD_GETTERS(lanes, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return routerAdvertisementSeconds(); } - else if constexpr (__id == 2) { return curHopLimit(); } - else if constexpr (__id == 3) { return routerLifetime(); } - else if constexpr (__id == 4) { return prefixValidLifetimeSeconds(); } - else if constexpr (__id == 5) { return prefixPreferredLifetimeSeconds(); } - else if constexpr (__id == 6) { return routerAdvertisementManagedBit(); } - else if constexpr (__id == 7) { return routerAdvertisementOtherBit(); } - else if constexpr (__id == 8) { return routerAddress(); } + if constexpr (__id == 1) { return lanes(); } } template @@ -9747,21 +9967,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::QosPolicy, + ::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>, + ::apache::thrift::type::struct_t<::facebook::network::thrift::BinaryAddress>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::QosPolicy, + ::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>, + ::apache::thrift::type::struct_t<::facebook::network::thrift::BinaryAddress>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::network::thrift::Address_tags::strings; template using Child = Path< ChildType, @@ -9770,30 +9990,30 @@ class ChildThriftPath<::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::QosMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::folly::fbstring, ::apache::thrift::type_class::binary, ::apache::thrift::type::cpp_type<::folly::fbstring, ::apache::thrift::type::binary_t>>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(rules, 2); - STRUCT_CHILD_GETTERS(qosMap, 3); + STRUCT_CHILD_GETTERS(addr, 1); + STRUCT_CHILD_GETTERS(port, 2); + STRUCT_CHILD_GETTERS(ifName, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return rules(); } - else if constexpr (__id == 3) { return qosMap(); } + if constexpr (__id == 1) { return addr(); } + else if constexpr (__id == 2) { return port(); } + else if constexpr (__id == 3) { return ifName(); } } template @@ -9802,21 +10022,42 @@ std::pair } }; +template +class ChildThriftPath<::std::vector<::facebook::fboss::state::BlockedNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::state::BlockedNeighbor>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::state::BlockedNeighbor>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::state::BlockedNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + template -class ChildThriftPath<::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::Neighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::CPUTrafficPolicyConfig, + ::facebook::fboss::cfg::Neighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::CPUTrafficPolicyConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Neighbor>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::CPUTrafficPolicyConfig, + ::facebook::fboss::cfg::Neighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::CPUTrafficPolicyConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Neighbor>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -9827,30 +10068,25 @@ class ChildThriftPath<::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(trafficPolicy, 1); - STRUCT_CHILD_GETTERS(rxReasonToCPUQueue, 2); - STRUCT_CHILD_GETTERS(rxReasonToQueueOrderedList, 3); + STRUCT_CHILD_GETTERS(vlanID, 1); + STRUCT_CHILD_GETTERS(ipAddress, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return trafficPolicy(); } - else if constexpr (__id == 2) { return rxReasonToCPUQueue(); } - else if constexpr (__id == 3) { return rxReasonToQueueOrderedList(); } + if constexpr (__id == 1) { return vlanID(); } + else if constexpr (__id == 2) { return ipAddress(); } } template @@ -9860,64 +10096,85 @@ std::pair -class ChildThriftPath<::std::map<::std::int32_t, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::RedirectNextHop>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int32_t, ::std::string>, + ::std::vector<::facebook::fboss::cfg::RedirectNextHop>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::string>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::string_t>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>>, Parent> { public: using Self = Path< - ::std::map<::std::int32_t, ::std::string>, + ::std::vector<::facebook::fboss::cfg::RedirectNextHop>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::string>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::string_t>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>>, Parent>; - using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTable>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::AclTable>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclTable>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::AclTable>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclTable>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::AclTable, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); +}; + +template +class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::PortFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::int16_t, ::facebook::fboss::state::PortFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFields>>, + Parent> { + public: + using Self = Path< + ::std::map<::std::int16_t, ::facebook::fboss::state::PortFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFields>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::state::PortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int16_t); }; template -class ChildThriftPath<::facebook::fboss::state::QcmCfgFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PfcWatchdog, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::QcmCfgFields, + ::facebook::fboss::cfg::PfcWatchdog, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::QcmCfgFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PfcWatchdog>, Parent> { public: using Self = Path< - ::facebook::fboss::state::QcmCfgFields, + ::facebook::fboss::cfg::PfcWatchdog, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::QcmCfgFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PfcWatchdog>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -9926,95 +10183,30 @@ class ChildThriftPath<::facebook::fboss::state::QcmCfgFields, ::facebook::fboss: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::set<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, Child<::facebook::fboss::cfg::PfcWatchdogRecoveryAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PfcWatchdogRecoveryAction>>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(agingIntervalInMsecs, 1); - STRUCT_CHILD_GETTERS(numFlowSamplesPerView, 2); - STRUCT_CHILD_GETTERS(flowLimit, 3); - STRUCT_CHILD_GETTERS(numFlowsClear, 4); - STRUCT_CHILD_GETTERS(scanIntervalInUsecs, 5); - STRUCT_CHILD_GETTERS(exportThreshold, 6); - STRUCT_CHILD_GETTERS(monitorQcmCfgPortsOnly, 7); - STRUCT_CHILD_GETTERS(flowWeights, 8); - STRUCT_CHILD_GETTERS(collectorSrcIp, 9); - STRUCT_CHILD_GETTERS(collectorDstIp, 10); - STRUCT_CHILD_GETTERS(collectorSrcPort, 11); - STRUCT_CHILD_GETTERS(collectorDstPort, 12); - STRUCT_CHILD_GETTERS(collectorDscp, 13); - STRUCT_CHILD_GETTERS(ppsToQcm, 14); - STRUCT_CHILD_GETTERS(monitorQcmPortList, 15); - STRUCT_CHILD_GETTERS(port2QosQueueIds, 16); + STRUCT_CHILD_GETTERS(detectionTimeMsecs, 1); + STRUCT_CHILD_GETTERS(recoveryTimeMsecs, 2); + STRUCT_CHILD_GETTERS(recoveryAction, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return agingIntervalInMsecs(); } - else if constexpr (__id == 2) { return numFlowSamplesPerView(); } - else if constexpr (__id == 3) { return flowLimit(); } - else if constexpr (__id == 4) { return numFlowsClear(); } - else if constexpr (__id == 5) { return scanIntervalInUsecs(); } - else if constexpr (__id == 6) { return exportThreshold(); } - else if constexpr (__id == 7) { return monitorQcmCfgPortsOnly(); } - else if constexpr (__id == 8) { return flowWeights(); } - else if constexpr (__id == 9) { return collectorSrcIp(); } - else if constexpr (__id == 10) { return collectorDstIp(); } - else if constexpr (__id == 11) { return collectorSrcPort(); } - else if constexpr (__id == 12) { return collectorDstPort(); } - else if constexpr (__id == 13) { return collectorDscp(); } - else if constexpr (__id == 14) { return ppsToQcm(); } - else if constexpr (__id == 15) { return monitorQcmPortList(); } - else if constexpr (__id == 16) { return port2QosQueueIds(); } + if constexpr (__id == 1) { return detectionTimeMsecs(); } + else if constexpr (__id == 2) { return recoveryTimeMsecs(); } + else if constexpr (__id == 3) { return recoveryAction(); } } template @@ -10024,64 +10216,64 @@ std::pair -class ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int32_t, ::std::vector<::std::string>>, + ::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::string>>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::string_t>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>>, Parent> { public: using Self = Path< - ::std::map<::std::int32_t, ::std::vector<::std::string>>, + ::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::string>>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::string_t>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>>, Parent>; - using Child = ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::int64_t); }; template -class ChildThriftPath<::std::map<::std::int16_t, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int16_t, ::std::int16_t>, + ::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::i16_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>>, Parent> { public: using Self = Path< - ::std::map<::std::int16_t, ::std::int16_t>, + ::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::i16_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>>, Parent>; - using Child = Path<::std::int16_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int16_t); + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::BufferPoolConfigName); }; template -class ChildThriftPath<::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::LoadBalancerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::TxSettings, + ::facebook::fboss::state::LoadBalancerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::TxSettings>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::TxSettings, + ::facebook::fboss::state::LoadBalancerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::TxSettings>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>, Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -10090,170 +10282,55 @@ class ChildThriftPath<::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsd ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple>>, +std::pair>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::LoadBalancerID, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>>>, + std::pair, Child<::facebook::fboss::cfg::HashingAlgorithm, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::HashingAlgorithm>>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::IPv4Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::IPv6Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::TransportField>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::MPLSField>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(pre, 1); - STRUCT_CHILD_GETTERS(pre2, 2); - STRUCT_CHILD_GETTERS(main, 3); - STRUCT_CHILD_GETTERS(post, 4); - STRUCT_CHILD_GETTERS(post2, 5); - STRUCT_CHILD_GETTERS(post3, 6); - STRUCT_CHILD_GETTERS(lutMode, 7); - STRUCT_CHILD_GETTERS(driveCurrent, 8); - STRUCT_CHILD_GETTERS(diffEncoderEn, 9); - STRUCT_CHILD_GETTERS(digGain, 10); - STRUCT_CHILD_GETTERS(ffeCoeff0, 11); - STRUCT_CHILD_GETTERS(ffeCoeff1, 12); - STRUCT_CHILD_GETTERS(ffeCoeff2, 13); - STRUCT_CHILD_GETTERS(ffeCoeff3, 14); - STRUCT_CHILD_GETTERS(ffeCoeff4, 15); - STRUCT_CHILD_GETTERS(parityEncoderEn, 16); - STRUCT_CHILD_GETTERS(thpEn, 17); - STRUCT_CHILD_GETTERS(setPrecode, 18); - STRUCT_CHILD_GETTERS(pre3, 19); - STRUCT_CHILD_GETTERS(driverSwing, 20); - STRUCT_CHILD_GETTERS(innerEyeNeg, 21); - STRUCT_CHILD_GETTERS(innerEyePos, 22); - STRUCT_CHILD_GETTERS(ffeCoeff5, 23); - STRUCT_CHILD_GETTERS(ldoBypass, 24); - STRUCT_CHILD_GETTERS(firPre1, 25); - STRUCT_CHILD_GETTERS(firPre2, 26); - STRUCT_CHILD_GETTERS(firPre3, 27); - STRUCT_CHILD_GETTERS(firMain, 28); - STRUCT_CHILD_GETTERS(firPost1, 29); - STRUCT_CHILD_GETTERS(firPost2, 30); - STRUCT_CHILD_GETTERS(firPost3, 31); + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(algorithm, 2); + STRUCT_CHILD_GETTERS(seed, 3); + STRUCT_CHILD_GETTERS(v4Fields, 4); + STRUCT_CHILD_GETTERS(v6Fields, 5); + STRUCT_CHILD_GETTERS(transportFields, 6); + STRUCT_CHILD_GETTERS(mplsFields, 7); + STRUCT_CHILD_GETTERS(udfGroups, 8); template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return pre(); } - else if constexpr (__id == 2) { return pre2(); } - else if constexpr (__id == 3) { return main(); } - else if constexpr (__id == 4) { return post(); } - else if constexpr (__id == 5) { return post2(); } - else if constexpr (__id == 6) { return post3(); } - else if constexpr (__id == 7) { return lutMode(); } - else if constexpr (__id == 8) { return driveCurrent(); } - else if constexpr (__id == 9) { return diffEncoderEn(); } - else if constexpr (__id == 10) { return digGain(); } - else if constexpr (__id == 11) { return ffeCoeff0(); } - else if constexpr (__id == 12) { return ffeCoeff1(); } - else if constexpr (__id == 13) { return ffeCoeff2(); } - else if constexpr (__id == 14) { return ffeCoeff3(); } - else if constexpr (__id == 15) { return ffeCoeff4(); } - else if constexpr (__id == 16) { return parityEncoderEn(); } - else if constexpr (__id == 17) { return thpEn(); } - else if constexpr (__id == 18) { return setPrecode(); } - else if constexpr (__id == 19) { return pre3(); } - else if constexpr (__id == 20) { return driverSwing(); } - else if constexpr (__id == 21) { return innerEyeNeg(); } - else if constexpr (__id == 22) { return innerEyePos(); } - else if constexpr (__id == 23) { return ffeCoeff5(); } - else if constexpr (__id == 24) { return ldoBypass(); } - else if constexpr (__id == 25) { return firPre1(); } - else if constexpr (__id == 26) { return firPre2(); } - else if constexpr (__id == 27) { return firPre3(); } - else if constexpr (__id == 28) { return firMain(); } - else if constexpr (__id == 29) { return firPost1(); } - else if constexpr (__id == 30) { return firPost2(); } - else if constexpr (__id == 31) { return firPost3(); } + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return algorithm(); } + else if constexpr (__id == 3) { return seed(); } + else if constexpr (__id == 4) { return v4Fields(); } + else if constexpr (__id == 5) { return v6Fields(); } + else if constexpr (__id == 6) { return transportFields(); } + else if constexpr (__id == 7) { return mplsFields(); } + else if constexpr (__id == 8) { return udfGroups(); } } template @@ -10264,21 +10341,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::fsdb::AgentData, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::UdfConfig, + ::facebook::fboss::fsdb::AgentData, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::fsdb::AgentData>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::UdfConfig, + ::facebook::fboss::fsdb::AgentData, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::fsdb::AgentData>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::fsdb::fsdb_model_tags::strings; template using Child = Path< ChildType, @@ -10287,25 +10364,35 @@ class ChildThriftPath<::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::state::SwitchState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::switch_reachability::SwitchReachability>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(udfGroups, 1); - STRUCT_CHILD_GETTERS(udfPacketMatcher, 2); + STRUCT_CHILD_GETTERS(config, 1); + STRUCT_CHILD_GETTERS(switchState, 2); + STRUCT_CHILD_GETTERS(fsdbSubscriptions, 4); + STRUCT_CHILD_GETTERS(dsfSwitchReachability, 5); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return udfGroups(); } - else if constexpr (__id == 2) { return udfPacketMatcher(); } + if constexpr (__id == 1) { return config(); } + else if constexpr (__id == 2) { return switchState(); } + else if constexpr (__id == 4) { return fsdbSubscriptions(); } + else if constexpr (__id == 5) { return dsfSwitchReachability(); } } template @@ -10315,43 +10402,64 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int64_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, + ::std::map<::std::int64_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::i32_t>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, + ::std::map<::std::int64_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::i32_t>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = Path<::std::int32_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::int64_t); +}; + +template +class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::state::SystemPortFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::int64_t, ::facebook::fboss::state::SystemPortFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::SystemPortThrift>>, + Parent> { + public: + using Self = Path< + ::std::map<::std::int64_t, ::facebook::fboss::state::SystemPortFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::SystemPortThrift>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::state::SystemPortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int64_t); }; template -class ChildThriftPath<::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::NdpConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::LaneState, + ::facebook::fboss::cfg::NdpConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::NdpConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::LaneState, + ::facebook::fboss::cfg::NdpConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::NdpConfig>, Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -10360,50 +10468,55 @@ class ChildThriftPath<::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child>, - std::pair, ChildThriftPath<::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(lane, 1); - STRUCT_CHILD_GETTERS(signalDetectLive, 2); - STRUCT_CHILD_GETTERS(signalDetectChanged, 3); - STRUCT_CHILD_GETTERS(cdrLockLive, 4); - STRUCT_CHILD_GETTERS(cdrLockChanged, 5); - STRUCT_CHILD_GETTERS(txSettings, 6); - STRUCT_CHILD_GETTERS(rxFrequencyPPM, 7); + STRUCT_CHILD_GETTERS(routerAdvertisementSeconds, 1); + STRUCT_CHILD_GETTERS(curHopLimit, 2); + STRUCT_CHILD_GETTERS(routerLifetime, 3); + STRUCT_CHILD_GETTERS(prefixValidLifetimeSeconds, 4); + STRUCT_CHILD_GETTERS(prefixPreferredLifetimeSeconds, 5); + STRUCT_CHILD_GETTERS(routerAdvertisementManagedBit, 6); + STRUCT_CHILD_GETTERS(routerAdvertisementOtherBit, 7); + STRUCT_CHILD_GETTERS(routerAddress, 8); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return lane(); } - else if constexpr (__id == 2) { return signalDetectLive(); } - else if constexpr (__id == 3) { return signalDetectChanged(); } - else if constexpr (__id == 4) { return cdrLockLive(); } - else if constexpr (__id == 5) { return cdrLockChanged(); } - else if constexpr (__id == 6) { return txSettings(); } - else if constexpr (__id == 7) { return rxFrequencyPPM(); } + if constexpr (__id == 1) { return routerAdvertisementSeconds(); } + else if constexpr (__id == 2) { return curHopLimit(); } + else if constexpr (__id == 3) { return routerLifetime(); } + else if constexpr (__id == 4) { return prefixValidLifetimeSeconds(); } + else if constexpr (__id == 5) { return prefixPreferredLifetimeSeconds(); } + else if constexpr (__id == 6) { return routerAdvertisementManagedBit(); } + else if constexpr (__id == 7) { return routerAdvertisementOtherBit(); } + else if constexpr (__id == 8) { return routerAddress(); } } template @@ -10414,21 +10527,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::asic::AsicConfig, + ::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::asic::AsicConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>, Parent> { public: using Self = Path< - ::facebook::fboss::asic::AsicConfig, + ::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::asic::AsicConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>, Parent>; - using strings = ::facebook::fboss::asic::asic_config_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -10437,20 +10550,30 @@ class ChildThriftPath<::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fs ChildTag, Self >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::QosMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(config, 1); + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(rules, 2); + STRUCT_CHILD_GETTERS(qosMap, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return config(); } + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return rules(); } + else if constexpr (__id == 3) { return qosMap(); } } template @@ -10459,84 +10582,78 @@ class ChildThriftPath<::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fs } }; -template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::AclTableQualifier>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableQualifier>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::AclTableQualifier>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableQualifier>>, - Parent>; - using Child = Path<::facebook::fboss::cfg::AclTableQualifier, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableQualifier>, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - -template -class ChildThriftPath<::std::vector<::facebook::fboss::state::Subport>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::state::Subport>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::Subport>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::state::Subport>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::Subport>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::Subport, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; template -class ChildThriftPath<::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, + ::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::CPUTrafficPolicyConfig>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, + ::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::CPUTrafficPolicyConfig>, Parent>; - using Child = ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(trafficPolicy, 1); + STRUCT_CHILD_GETTERS(rxReasonToCPUQueue, 2); + STRUCT_CHILD_GETTERS(rxReasonToQueueOrderedList, 3); - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PortQueueConfigName); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return trafficPolicy(); } + else if constexpr (__id == 2) { return rxReasonToCPUQueue(); } + else if constexpr (__id == 3) { return rxReasonToQueueOrderedList(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::facebook::fboss::state::PortFlowletFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::QcmCfgFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::PortFlowletFields, + ::facebook::fboss::state::QcmCfgFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFlowletFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::QcmCfgFields>, Parent> { public: using Self = Path< - ::facebook::fboss::state::PortFlowletFields, + ::facebook::fboss::state::QcmCfgFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFlowletFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::QcmCfgFields>, Parent>; using strings = ::facebook::fboss::state::switch_state_tags::strings; template @@ -10547,35 +10664,95 @@ class ChildThriftPath<::facebook::fboss::state::PortFlowletFields, ::facebook::f ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::set<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(scalingFactor, 2); - STRUCT_CHILD_GETTERS(loadWeight, 3); - STRUCT_CHILD_GETTERS(queueWeight, 4); + STRUCT_CHILD_GETTERS(agingIntervalInMsecs, 1); + STRUCT_CHILD_GETTERS(numFlowSamplesPerView, 2); + STRUCT_CHILD_GETTERS(flowLimit, 3); + STRUCT_CHILD_GETTERS(numFlowsClear, 4); + STRUCT_CHILD_GETTERS(scanIntervalInUsecs, 5); + STRUCT_CHILD_GETTERS(exportThreshold, 6); + STRUCT_CHILD_GETTERS(monitorQcmCfgPortsOnly, 7); + STRUCT_CHILD_GETTERS(flowWeights, 8); + STRUCT_CHILD_GETTERS(collectorSrcIp, 9); + STRUCT_CHILD_GETTERS(collectorDstIp, 10); + STRUCT_CHILD_GETTERS(collectorSrcPort, 11); + STRUCT_CHILD_GETTERS(collectorDstPort, 12); + STRUCT_CHILD_GETTERS(collectorDscp, 13); + STRUCT_CHILD_GETTERS(ppsToQcm, 14); + STRUCT_CHILD_GETTERS(monitorQcmPortList, 15); + STRUCT_CHILD_GETTERS(port2QosQueueIds, 16); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return scalingFactor(); } - else if constexpr (__id == 3) { return loadWeight(); } - else if constexpr (__id == 4) { return queueWeight(); } + if constexpr (__id == 1) { return agingIntervalInMsecs(); } + else if constexpr (__id == 2) { return numFlowSamplesPerView(); } + else if constexpr (__id == 3) { return flowLimit(); } + else if constexpr (__id == 4) { return numFlowsClear(); } + else if constexpr (__id == 5) { return scanIntervalInUsecs(); } + else if constexpr (__id == 6) { return exportThreshold(); } + else if constexpr (__id == 7) { return monitorQcmCfgPortsOnly(); } + else if constexpr (__id == 8) { return flowWeights(); } + else if constexpr (__id == 9) { return collectorSrcIp(); } + else if constexpr (__id == 10) { return collectorDstIp(); } + else if constexpr (__id == 11) { return collectorSrcPort(); } + else if constexpr (__id == 12) { return collectorDstPort(); } + else if constexpr (__id == 13) { return collectorDscp(); } + else if constexpr (__id == 14) { return ppsToQcm(); } + else if constexpr (__id == 15) { return monitorQcmPortList(); } + else if constexpr (__id == 16) { return port2QosQueueIds(); } } template @@ -10584,21 +10761,63 @@ std::pair +class ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::int32_t, ::std::vector<::std::string>>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::string>>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::string_t>>, + Parent> { + public: + using Self = Path< + ::std::map<::std::int32_t, ::std::vector<::std::string>>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::string>>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::string_t>>, + Parent>; + using Child = ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; template -class ChildThriftPath<::facebook::fboss::state::MirrorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int16_t, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::MirrorFields, + ::std::map<::std::int16_t, ::std::int16_t>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::i16_t>, + Parent> { + public: + using Self = Path< + ::std::map<::std::int16_t, ::std::int16_t>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::i16_t>, + Parent>; + using Child = Path<::std::int16_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int16_t); +}; + + +template +class ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::state::TrafficClassToQosAttributeMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeMap>, Parent> { public: using Self = Path< - ::facebook::fboss::state::MirrorFields, + ::facebook::fboss::state::TrafficClassToQosAttributeMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeMap>, Parent>; using strings = ::facebook::fboss::state::switch_state_tags::strings; template @@ -10609,85 +10828,25 @@ class ChildThriftPath<::facebook::fboss::state::MirrorFields, ::facebook::fboss: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, ChildThriftPath<::facebook::fboss::state::MirrorTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(dscp, 3); - STRUCT_CHILD_GETTERS(truncate, 4); - STRUCT_CHILD_GETTERS(configHasEgressPort, 5); - STRUCT_CHILD_GETTERS(egressPort, 6); - STRUCT_CHILD_GETTERS(destinationIp, 7); - STRUCT_CHILD_GETTERS(srcIp, 8); - STRUCT_CHILD_GETTERS(udpSrcPort, 9); - STRUCT_CHILD_GETTERS(udpDstPort, 10); - STRUCT_CHILD_GETTERS(tunnel, 11); - STRUCT_CHILD_GETTERS(isResolved, 12); - STRUCT_CHILD_GETTERS(switchId, 13); - STRUCT_CHILD_GETTERS(egressPortDesc, 14); - STRUCT_CHILD_GETTERS(samplingRate, 15); + STRUCT_CHILD_GETTERS(from, 1); + STRUCT_CHILD_GETTERS(to, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 3) { return dscp(); } - else if constexpr (__id == 4) { return truncate(); } - else if constexpr (__id == 5) { return configHasEgressPort(); } - else if constexpr (__id == 6) { return egressPort(); } - else if constexpr (__id == 7) { return destinationIp(); } - else if constexpr (__id == 8) { return srcIp(); } - else if constexpr (__id == 9) { return udpSrcPort(); } - else if constexpr (__id == 10) { return udpDstPort(); } - else if constexpr (__id == 11) { return tunnel(); } - else if constexpr (__id == 12) { return isResolved(); } - else if constexpr (__id == 13) { return switchId(); } - else if constexpr (__id == 14) { return egressPortDesc(); } - else if constexpr (__id == 15) { return samplingRate(); } + if constexpr (__id == 1) { return from(); } + else if constexpr (__id == 2) { return to(); } } template @@ -10698,21 +10857,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::BlockedNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PacketRxReasonToQueue, + ::facebook::fboss::state::BlockedNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PacketRxReasonToQueue, + ::facebook::fboss::state::BlockedNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -10721,25 +10880,25 @@ class ChildThriftPath<::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook: ChildTag, Self >; - using Children = fatal::tuple>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::PacketRxReason, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PacketRxReason>>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(rxReason, 1); - STRUCT_CHILD_GETTERS(queueId, 2); + STRUCT_CHILD_GETTERS(blockNeighborVlanID, 1); + STRUCT_CHILD_GETTERS(blockNeighborIP, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return rxReason(); } - else if constexpr (__id == 2) { return queueId(); } + if constexpr (__id == 1) { return blockNeighborVlanID(); } + else if constexpr (__id == 2) { return blockNeighborIP(); } } template @@ -10749,43 +10908,43 @@ std::pair -class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, + ::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>>, Parent> { public: using Self = Path< - ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, + ::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::FibContainerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int16_t); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::TrafficClassToQosAttributeEntry, + ::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortDescriptor>, Parent> { public: using Self = Path< - ::facebook::fboss::state::TrafficClassToQosAttributeEntry, + ::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortDescriptor>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -10794,25 +10953,25 @@ class ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeEntry, ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; + using Children = fatal::tuple>, +std::pair>>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + std::pair, Child<::facebook::fboss::cfg::PortDescriptorType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PortDescriptorType>>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(trafficClass, 1); - STRUCT_CHILD_GETTERS(attr, 2); + STRUCT_CHILD_GETTERS(portId, 1); + STRUCT_CHILD_GETTERS(portType, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return trafficClass(); } - else if constexpr (__id == 2) { return attr(); } + if constexpr (__id == 1) { return portId(); } + else if constexpr (__id == 2) { return portType(); } } template @@ -10823,21 +10982,21 @@ std::pair>> template -class ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::TrafficClassToQosAttributeMap, + ::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeMap>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>, Parent> { public: using Self = Path< - ::facebook::fboss::state::TrafficClassToQosAttributeMap, + ::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeMap>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -10846,25 +11005,80 @@ class ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeMap, : ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>>, +std::pair>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::facebook::fboss::cfg::DsfNodeType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::DsfNodeType>>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::Range64, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::cfg::AsicType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AsicType>>>, + std::pair, Child<::facebook::fboss::PlatformType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::PlatformType>>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::SystemPortRanges, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(from, 1); - STRUCT_CHILD_GETTERS(to, 2); + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(switchId, 2); + STRUCT_CHILD_GETTERS(type, 3); + STRUCT_CHILD_GETTERS(loopbackIps, 4); + STRUCT_CHILD_GETTERS(systemPortRange, 5); + STRUCT_CHILD_GETTERS(nodeMac, 6); + STRUCT_CHILD_GETTERS(asicType, 7); + STRUCT_CHILD_GETTERS(platformType, 8); + STRUCT_CHILD_GETTERS(clusterId, 9); + STRUCT_CHILD_GETTERS(fabricLevel, 10); + STRUCT_CHILD_GETTERS(localSystemPortOffset, 11); + STRUCT_CHILD_GETTERS(globalSystemPortOffset, 12); + STRUCT_CHILD_GETTERS(systemPortRanges, 13); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return from(); } - else if constexpr (__id == 2) { return to(); } + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return switchId(); } + else if constexpr (__id == 3) { return type(); } + else if constexpr (__id == 4) { return loopbackIps(); } + else if constexpr (__id == 5) { return systemPortRange(); } + else if constexpr (__id == 6) { return nodeMac(); } + else if constexpr (__id == 7) { return asicType(); } + else if constexpr (__id == 8) { return platformType(); } + else if constexpr (__id == 9) { return clusterId(); } + else if constexpr (__id == 10) { return fabricLevel(); } + else if constexpr (__id == 11) { return localSystemPortOffset(); } + else if constexpr (__id == 12) { return globalSystemPortOffset(); } + else if constexpr (__id == 13) { return systemPortRanges(); } } template @@ -10875,21 +11089,73 @@ std::pair>>:: template -class ChildThriftPath<::facebook::fboss::state::BlockedNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SflowCollector, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::BlockedNeighbor, + ::facebook::fboss::cfg::SflowCollector, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowCollector>, Parent> { public: using Self = Path< - ::facebook::fboss::state::BlockedNeighbor, + ::facebook::fboss::cfg::SflowCollector, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowCollector>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(ip, 1); + STRUCT_CHILD_GETTERS(port, 2); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return ip(); } + else if constexpr (__id == 2) { return port(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + + +template +class ChildThriftPath<::facebook::fboss::cfg::PortPause, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::cfg::PortPause, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPause>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::cfg::PortPause, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPause>, + Parent>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -10898,25 +11164,25 @@ class ChildThriftPath<::facebook::fboss::state::BlockedNeighbor, ::facebook::fbo ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child>, + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(blockNeighborVlanID, 1); - STRUCT_CHILD_GETTERS(blockNeighborIP, 2); + STRUCT_CHILD_GETTERS(tx, 1); + STRUCT_CHILD_GETTERS(rx, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return blockNeighborVlanID(); } - else if constexpr (__id == 2) { return blockNeighborIP(); } + if constexpr (__id == 1) { return tx(); } + else if constexpr (__id == 2) { return rx(); } } template @@ -10926,21 +11192,21 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::QosRule>, + ::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::QosRule>, + ::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::PortQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); @@ -10948,19 +11214,19 @@ class ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook template -class ChildThriftPath<::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SflowTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PortDescriptor, + ::facebook::fboss::cfg::SflowTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortDescriptor>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowTunnel>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PortDescriptor, + ::facebook::fboss::cfg::SflowTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortDescriptor>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowTunnel>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -10971,25 +11237,35 @@ class ChildThriftPath<::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::facebook::fboss::cfg::PortDescriptorType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PortDescriptorType>>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(portId, 1); - STRUCT_CHILD_GETTERS(portType, 2); + STRUCT_CHILD_GETTERS(ip, 1); + STRUCT_CHILD_GETTERS(udpSrcPort, 2); + STRUCT_CHILD_GETTERS(udpDstPort, 3); + STRUCT_CHILD_GETTERS(ttl, 4); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return portId(); } - else if constexpr (__id == 2) { return portType(); } + if constexpr (__id == 1) { return ip(); } + else if constexpr (__id == 2) { return udpSrcPort(); } + else if constexpr (__id == 3) { return udpDstPort(); } + else if constexpr (__id == 4) { return ttl(); } } template @@ -10998,56 +11274,25 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::PortPause, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::SwitchSettingsFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PortPause, + ::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::SwitchSettingsFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPause>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::SwitchSettingsFields>>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PortPause, + ::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::SwitchSettingsFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPause>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::SwitchSettingsFields>>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child>, - std::pair, Child>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = ChildThriftPath<::facebook::fboss::state::SwitchSettingsFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(tx, 1); - STRUCT_CHILD_GETTERS(rx, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return tx(); } - else if constexpr (__id == 2) { return rx(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; template @@ -11285,158 +11530,33 @@ std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::facebook::fboss::cfg::LacpPortRate, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::LacpPortRate>>>, - std::pair, Child<::facebook::fboss::cfg::LacpPortActivity, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::LacpPortActivity>>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(memberPortID, 1); - STRUCT_CHILD_GETTERS(priority, 2); - STRUCT_CHILD_GETTERS(rate, 3); - STRUCT_CHILD_GETTERS(activity, 4); - STRUCT_CHILD_GETTERS(holdTimerMultiplier, 5); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return memberPortID(); } - else if constexpr (__id == 2) { return priority(); } - else if constexpr (__id == 3) { return rate(); } - else if constexpr (__id == 4) { return activity(); } - else if constexpr (__id == 5) { return holdTimerMultiplier(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - -template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::ControlPlaneFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::ControlPlaneFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>>, - Parent> { - public: - using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::ControlPlaneFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::ControlPlaneFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); -}; - - -template -class ChildThriftPath<::facebook::fboss::cfg::UserDefinedTrapAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::cfg::UserDefinedTrapAction, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UserDefinedTrapAction>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::cfg::UserDefinedTrapAction, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UserDefinedTrapAction>, - Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; - template - using NameToId = fatal::tuple>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(queueId, 1); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return queueId(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - - -template -class ChildThriftPath<::facebook::fboss::cfg::AclUdfEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::cfg::AclUdfEntry, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::cfg::AclUdfEntry, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>, - Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, Child<::facebook::fboss::cfg::LacpPortRate, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::LacpPortRate>>>, + std::pair, Child<::facebook::fboss::cfg::LacpPortActivity, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::LacpPortActivity>>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(udfGroup, 1); - STRUCT_CHILD_GETTERS(roceBytes, 2); - STRUCT_CHILD_GETTERS(roceMask, 3); + STRUCT_CHILD_GETTERS(memberPortID, 1); + STRUCT_CHILD_GETTERS(priority, 2); + STRUCT_CHILD_GETTERS(rate, 3); + STRUCT_CHILD_GETTERS(activity, 4); + STRUCT_CHILD_GETTERS(holdTimerMultiplier, 5); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return udfGroup(); } - else if constexpr (__id == 2) { return roceBytes(); } - else if constexpr (__id == 3) { return roceMask(); } + if constexpr (__id == 1) { return memberPortID(); } + else if constexpr (__id == 2) { return priority(); } + else if constexpr (__id == 3) { return rate(); } + else if constexpr (__id == 4) { return activity(); } + else if constexpr (__id == 5) { return holdTimerMultiplier(); } } template @@ -11446,66 +11566,71 @@ std::pair -class ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::ControlPlaneFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::ControlPlaneFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>>, Parent> { public: using Self = Path< - ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::ControlPlaneFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>>, Parent>; - using Child = ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::ControlPlaneFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; -template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AggregatePortMember>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::AggregatePortMember>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePortMember>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::AggregatePortMember>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePortMember>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::AggregatePortMember, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; template -class ChildThriftPath<::std::map<::facebook::fboss::ClientID, ::facebook::fboss::state::RouteNextHopEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::UserDefinedTrapAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::ClientID, ::facebook::fboss::state::RouteNextHopEntry>, + ::facebook::fboss::cfg::UserDefinedTrapAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::ClientID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UserDefinedTrapAction>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::ClientID, ::facebook::fboss::state::RouteNextHopEntry>, + ::facebook::fboss::cfg::UserDefinedTrapAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::ClientID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UserDefinedTrapAction>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::RouteNextHopEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + template + using NameToId = fatal::tuple>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(queueId, 1); - CONTAINER_CHILD_GETTERS(::facebook::fboss::ClientID); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return queueId(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; @@ -11625,21 +11750,42 @@ std::pair +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclLookupClass>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::AclLookupClass>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::AclLookupClass>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>>, + Parent>; + using Child = Path<::facebook::fboss::cfg::AclLookupClass, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + template -class ChildThriftPath<::facebook::fboss::cfg::Range, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::Range, + ::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Range>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::TrafficPolicyConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::Range, + ::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Range>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::TrafficPolicyConfig>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -11650,25 +11796,30 @@ class ChildThriftPath<::facebook::fboss::cfg::Range, ::facebook::fboss::fsdb::Fs ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::MatchToAction>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(minimum, 1); - STRUCT_CHILD_GETTERS(maximum, 2); + STRUCT_CHILD_GETTERS(matchToAction, 1); + STRUCT_CHILD_GETTERS(defaultQosPolicy, 2); + STRUCT_CHILD_GETTERS(portIdToQosPolicy, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return minimum(); } - else if constexpr (__id == 2) { return maximum(); } + if constexpr (__id == 1) { return matchToAction(); } + else if constexpr (__id == 2) { return defaultQosPolicy(); } + else if constexpr (__id == 3) { return portIdToQosPolicy(); } } template @@ -11677,44 +11828,23 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclUdfEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::AclUdfEntry>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::AclUdfEntry>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::AclUdfEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - template -class ChildThriftPath<::facebook::fboss::state::TeFlowEntryFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::QueueMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::TeFlowEntryFields, + ::facebook::fboss::cfg::QueueMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TeFlowEntryFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QueueMatchAction>, Parent> { public: using Self = Path< - ::facebook::fboss::state::TeFlowEntryFields, + ::facebook::fboss::cfg::QueueMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TeFlowEntryFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QueueMatchAction>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -11723,89 +11853,43 @@ class ChildThriftPath<::facebook::fboss::state::TeFlowEntryFields, ::facebook::f ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child>>; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(flow, 1); - STRUCT_CHILD_GETTERS(nexthops, 3); - STRUCT_CHILD_GETTERS(resolvedNexthops, 4); - STRUCT_CHILD_GETTERS(enabled, 5); - STRUCT_CHILD_GETTERS(counterID, 6); - STRUCT_CHILD_GETTERS(statEnabled, 7); + STRUCT_CHILD_GETTERS(queueId, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return flow(); } - else if constexpr (__id == 3) { return nexthops(); } - else if constexpr (__id == 4) { return resolvedNexthops(); } - else if constexpr (__id == 5) { return enabled(); } - else if constexpr (__id == 6) { return counterID(); } - else if constexpr (__id == 7) { return statEnabled(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - -template -class ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::std::string>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::string>, - ::apache::thrift::type::list<::apache::thrift::type::string_t>, - Parent> { - public: - using Self = Path< - ::std::vector<::std::string>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::string>, - ::apache::thrift::type::list<::apache::thrift::type::string_t>, - Parent>; - using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; - using Self::Self; + if constexpr (__id == 1) { return queueId(); } + } - CONTAINER_CHILD_GETTERS(::std::int32_t); + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PacketCounterMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::DsfNode, + ::facebook::fboss::cfg::PacketCounterMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketCounterMatchAction>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::DsfNode, + ::facebook::fboss::cfg::PacketCounterMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketCounterMatchAction>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -11816,75 +11900,20 @@ class ChildThriftPath<::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb:: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>>, -std::pair>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, Child<::facebook::fboss::cfg::DsfNodeType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::DsfNodeType>>>, - std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::Range64, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::cfg::AsicType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AsicType>>>, - std::pair, Child<::facebook::fboss::PlatformType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::PlatformType>>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(switchId, 2); - STRUCT_CHILD_GETTERS(type, 3); - STRUCT_CHILD_GETTERS(loopbackIps, 4); - STRUCT_CHILD_GETTERS(systemPortRange, 5); - STRUCT_CHILD_GETTERS(nodeMac, 6); - STRUCT_CHILD_GETTERS(asicType, 7); - STRUCT_CHILD_GETTERS(platformType, 8); - STRUCT_CHILD_GETTERS(clusterId, 9); - STRUCT_CHILD_GETTERS(fabricLevel, 10); - STRUCT_CHILD_GETTERS(localSystemPortOffset, 11); - STRUCT_CHILD_GETTERS(globalSystemPortOffset, 12); + STRUCT_CHILD_GETTERS(counterName, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return switchId(); } - else if constexpr (__id == 3) { return type(); } - else if constexpr (__id == 4) { return loopbackIps(); } - else if constexpr (__id == 5) { return systemPortRange(); } - else if constexpr (__id == 6) { return nodeMac(); } - else if constexpr (__id == 7) { return asicType(); } - else if constexpr (__id == 8) { return platformType(); } - else if constexpr (__id == 9) { return clusterId(); } - else if constexpr (__id == 10) { return fabricLevel(); } - else if constexpr (__id == 11) { return localSystemPortOffset(); } - else if constexpr (__id == 12) { return globalSystemPortOffset(); } + if constexpr (__id == 1) { return counterName(); } } template @@ -11895,19 +11924,19 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::ActiveQueueManagement, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::MacAndVlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::ActiveQueueManagement, + ::facebook::fboss::cfg::MacAndVlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ActiveQueueManagement>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::ActiveQueueManagement, + ::facebook::fboss::cfg::MacAndVlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ActiveQueueManagement>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -11918,25 +11947,25 @@ class ChildThriftPath<::facebook::fboss::cfg::ActiveQueueManagement, ::facebook: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::QueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::cfg::QueueCongestionBehavior, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::QueueCongestionBehavior>>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(detection, 1); - STRUCT_CHILD_GETTERS(behavior, 2); + STRUCT_CHILD_GETTERS(vlanID, 1); + STRUCT_CHILD_GETTERS(macAddress, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return detection(); } - else if constexpr (__id == 2) { return behavior(); } + if constexpr (__id == 1) { return vlanID(); } + else if constexpr (__id == 2) { return macAddress(); } } template @@ -11947,21 +11976,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::QueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::AsicConfigEntry, + ::facebook::fboss::cfg::QueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::QueueCongestionDetection>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::AsicConfigEntry, + ::facebook::fboss::cfg::QueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::QueueCongestionDetection>, Parent>; - using strings = ::facebook::fboss::cfg::asic_config_v2_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -11970,30 +11999,20 @@ class ChildThriftPath<::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::LinearQueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(config, 1); - STRUCT_CHILD_GETTERS(jsonConfig, 2); - STRUCT_CHILD_GETTERS(yamlConfig, 3); + STRUCT_CHILD_GETTERS(linear, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return config(); } - else if constexpr (__id == 2) { return jsonConfig(); } - else if constexpr (__id == 3) { return yamlConfig(); } + if constexpr (__id == 1) { return linear(); } } template @@ -12002,63 +12021,78 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::ExpQosMap>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::ExpQosMap>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExpQosMap>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::ExpQosMap>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExpQosMap>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::ExpQosMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclLookupClass>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::AclLookupClass>, + ::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::AclLookupClass>, + ::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>, Parent>; - using Child = Path<::facebook::fboss::cfg::AclLookupClass, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>, Self>; + using strings = ::facebook::fboss::cfg::platform_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::bcm::BcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(bcm, 1); + STRUCT_CHILD_GETTERS(asic, 2); + STRUCT_CHILD_GETTERS(asicConfig, 3); - CONTAINER_CHILD_GETTERS(::std::int32_t); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return bcm(); } + else if constexpr (__id == 2) { return asic(); } + else if constexpr (__id == 3) { return asicConfig(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::TrafficPolicyConfig, + ::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::TrafficPolicyConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QcmConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::TrafficPolicyConfig, + ::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::TrafficPolicyConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QcmConfig>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -12069,30 +12103,95 @@ class ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::f ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::MatchToAction>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(matchToAction, 1); - STRUCT_CHILD_GETTERS(defaultQosPolicy, 2); - STRUCT_CHILD_GETTERS(portIdToQosPolicy, 3); + STRUCT_CHILD_GETTERS(numFlowSamplesPerView, 1); + STRUCT_CHILD_GETTERS(flowLimit, 2); + STRUCT_CHILD_GETTERS(numFlowsClear, 3); + STRUCT_CHILD_GETTERS(scanIntervalInUsecs, 4); + STRUCT_CHILD_GETTERS(exportThreshold, 5); + STRUCT_CHILD_GETTERS(flowWeights, 6); + STRUCT_CHILD_GETTERS(agingIntervalInMsecs, 7); + STRUCT_CHILD_GETTERS(collectorDstIp, 8); + STRUCT_CHILD_GETTERS(collectorSrcPort, 10); + STRUCT_CHILD_GETTERS(collectorDstPort, 11); + STRUCT_CHILD_GETTERS(collectorDscp, 12); + STRUCT_CHILD_GETTERS(ppsToQcm, 13); + STRUCT_CHILD_GETTERS(collectorSrcIp, 14); + STRUCT_CHILD_GETTERS(monitorQcmPortList, 15); + STRUCT_CHILD_GETTERS(port2QosQueueIds, 16); + STRUCT_CHILD_GETTERS(monitorQcmCfgPortsOnly, 17); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return matchToAction(); } - else if constexpr (__id == 2) { return defaultQosPolicy(); } - else if constexpr (__id == 3) { return portIdToQosPolicy(); } + if constexpr (__id == 1) { return numFlowSamplesPerView(); } + else if constexpr (__id == 2) { return flowLimit(); } + else if constexpr (__id == 3) { return numFlowsClear(); } + else if constexpr (__id == 4) { return scanIntervalInUsecs(); } + else if constexpr (__id == 5) { return exportThreshold(); } + else if constexpr (__id == 6) { return flowWeights(); } + else if constexpr (__id == 7) { return agingIntervalInMsecs(); } + else if constexpr (__id == 8) { return collectorDstIp(); } + else if constexpr (__id == 10) { return collectorSrcPort(); } + else if constexpr (__id == 11) { return collectorDstPort(); } + else if constexpr (__id == 12) { return collectorDscp(); } + else if constexpr (__id == 13) { return ppsToQcm(); } + else if constexpr (__id == 14) { return collectorSrcIp(); } + else if constexpr (__id == 15) { return monitorQcmPortList(); } + else if constexpr (__id == 16) { return port2QosQueueIds(); } + else if constexpr (__id == 17) { return monitorQcmCfgPortsOnly(); } } template @@ -12328,43 +12427,74 @@ class ChildThriftPath<::std::vector<::facebook::fboss::cfg::SflowCollector>, ::f CONTAINER_CHILD_GETTERS(::std::int32_t); }; + template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::Interface>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::Range, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::Interface>, + ::facebook::fboss::cfg::Range, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Interface>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Range>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::Interface>, + ::facebook::fboss::cfg::Range, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Interface>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Range>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::Interface, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(minimum, 1); + STRUCT_CHILD_GETTERS(maximum, 2); - CONTAINER_CHILD_GETTERS(::std::int32_t); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return minimum(); } + else if constexpr (__id == 2) { return maximum(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::std::vector<::facebook::fboss::state::RxSak>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclUdfEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::state::RxSak>, + ::std::vector<::facebook::fboss::cfg::AclUdfEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::RxSak>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::state::RxSak>, + ::std::vector<::facebook::fboss::cfg::AclUdfEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::RxSak>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::RxSak, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::AclUdfEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); @@ -12372,21 +12502,21 @@ class ChildThriftPath<::std::vector<::facebook::fboss::state::RxSak>, ::facebook template -class ChildThriftPath<::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::TeFlowEntryFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::IpInIpTunnel, + ::facebook::fboss::state::TeFlowEntryFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TeFlowEntryFields>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::IpInIpTunnel, + ::facebook::fboss::state::TeFlowEntryFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TeFlowEntryFields>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -12395,70 +12525,45 @@ class ChildThriftPath<::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::f ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>, -std::pair>>, -std::pair>>, -std::pair>>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::cfg::IpTunnelMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IpTunnelMode>>>, - std::pair, Child<::facebook::fboss::cfg::IpTunnelMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IpTunnelMode>>>, - std::pair, Child<::facebook::fboss::cfg::IpTunnelMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IpTunnelMode>>>, - std::pair, Child<::facebook::fboss::cfg::TunnelTerminationType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::TunnelTerminationType>>>, - std::pair, Child<::facebook::fboss::cfg::TunnelType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::TunnelType>>>>; + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(ipInIpTunnelId, 1); - STRUCT_CHILD_GETTERS(underlayIntfID, 2); - STRUCT_CHILD_GETTERS(dstIp, 3); - STRUCT_CHILD_GETTERS(srcIp, 4); - STRUCT_CHILD_GETTERS(dstIpMask, 5); - STRUCT_CHILD_GETTERS(srcIpMask, 6); - STRUCT_CHILD_GETTERS(ttlMode, 7); - STRUCT_CHILD_GETTERS(dscpMode, 8); - STRUCT_CHILD_GETTERS(ecnMode, 9); - STRUCT_CHILD_GETTERS(tunnelTermType, 10); - STRUCT_CHILD_GETTERS(tunnelType, 11); + STRUCT_CHILD_GETTERS(flow, 1); + STRUCT_CHILD_GETTERS(nexthops, 3); + STRUCT_CHILD_GETTERS(resolvedNexthops, 4); + STRUCT_CHILD_GETTERS(enabled, 5); + STRUCT_CHILD_GETTERS(counterID, 6); + STRUCT_CHILD_GETTERS(statEnabled, 7); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return ipInIpTunnelId(); } - else if constexpr (__id == 2) { return underlayIntfID(); } - else if constexpr (__id == 3) { return dstIp(); } - else if constexpr (__id == 4) { return srcIp(); } - else if constexpr (__id == 5) { return dstIpMask(); } - else if constexpr (__id == 6) { return srcIpMask(); } - else if constexpr (__id == 7) { return ttlMode(); } - else if constexpr (__id == 8) { return dscpMode(); } - else if constexpr (__id == 9) { return ecnMode(); } - else if constexpr (__id == 10) { return tunnelTermType(); } - else if constexpr (__id == 11) { return tunnelType(); } + if constexpr (__id == 1) { return flow(); } + else if constexpr (__id == 3) { return nexthops(); } + else if constexpr (__id == 4) { return resolvedNexthops(); } + else if constexpr (__id == 5) { return enabled(); } + else if constexpr (__id == 6) { return counterID(); } + else if constexpr (__id == 7) { return statEnabled(); } } template @@ -12468,41 +12573,62 @@ std::pair -class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, + ::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::string>, + ::apache::thrift::type::list<::apache::thrift::type::string_t>, Parent> { public: using Self = Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, + ::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::string>, + ::apache::thrift::type::list<::apache::thrift::type::string_t>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int64_t); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::cfg::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::AggregatePort, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::RedirectToNextHopAction, + ::facebook::fboss::cfg::AggregatePort, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectToNextHopAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePort>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::RedirectToNextHopAction, + ::facebook::fboss::cfg::AggregatePort, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectToNextHopAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePort>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -12513,25 +12639,45 @@ class ChildThriftPath<::facebook::fboss::cfg::RedirectToNextHopAction, ::faceboo ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::RedirectNextHop>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AggregatePortMember>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(nexthops, 1); - STRUCT_CHILD_GETTERS(redirectNextHops, 2); + STRUCT_CHILD_GETTERS(key, 1); + STRUCT_CHILD_GETTERS(name, 2); + STRUCT_CHILD_GETTERS(description, 3); + STRUCT_CHILD_GETTERS(memberPorts, 4); + STRUCT_CHILD_GETTERS(minimumCapacity, 5); + STRUCT_CHILD_GETTERS(counterTags, 6); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return nexthops(); } - else if constexpr (__id == 2) { return redirectNextHops(); } + if constexpr (__id == 1) { return key(); } + else if constexpr (__id == 2) { return name(); } + else if constexpr (__id == 3) { return description(); } + else if constexpr (__id == 4) { return memberPorts(); } + else if constexpr (__id == 5) { return minimumCapacity(); } + else if constexpr (__id == 6) { return counterTags(); } } template @@ -12541,43 +12687,64 @@ std::pair -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfGroup>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>>>, Parent> { public: using Self = Path< - ::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfGroup>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::UdfGroup, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::string); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); +}; + +template +class ChildThriftPath<::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>>>, + Parent> { + public: + using Self = Path< + ::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>>>, + Parent>; + using Child = ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortPgConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PortPgConfigName); }; template -class ChildThriftPath<::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::VlanFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::FlowletSwitchingConfig, + ::facebook::fboss::state::VlanFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::FlowletSwitchingConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::VlanFields>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::FlowletSwitchingConfig, + ::facebook::fboss::state::VlanFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::FlowletSwitchingConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::VlanFields>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -12586,75 +12753,80 @@ class ChildThriftPath<::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::facebook::fboss::cfg::SwitchingMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchingMode>>>>; + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int16_t, bool>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::MacEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(inactivityIntervalUsecs, 1); - STRUCT_CHILD_GETTERS(flowletTableSize, 2); - STRUCT_CHILD_GETTERS(dynamicEgressLoadExponent, 3); - STRUCT_CHILD_GETTERS(dynamicQueueExponent, 4); - STRUCT_CHILD_GETTERS(dynamicQueueMinThresholdBytes, 5); - STRUCT_CHILD_GETTERS(dynamicQueueMaxThresholdBytes, 6); - STRUCT_CHILD_GETTERS(dynamicSampleRate, 7); - STRUCT_CHILD_GETTERS(dynamicEgressMinThresholdBytes, 8); - STRUCT_CHILD_GETTERS(dynamicEgressMaxThresholdBytes, 9); - STRUCT_CHILD_GETTERS(dynamicPhysicalQueueExponent, 10); - STRUCT_CHILD_GETTERS(maxLinks, 11); - STRUCT_CHILD_GETTERS(switchingMode, 12); + STRUCT_CHILD_GETTERS(vlanId, 1); + STRUCT_CHILD_GETTERS(vlanName, 2); + STRUCT_CHILD_GETTERS(intfID, 3); + STRUCT_CHILD_GETTERS(dhcpV4Relay, 4); + STRUCT_CHILD_GETTERS(dhcpV6Relay, 5); + STRUCT_CHILD_GETTERS(dhcpRelayOverridesV4, 6); + STRUCT_CHILD_GETTERS(dhcpRelayOverridesV6, 7); + STRUCT_CHILD_GETTERS(ports, 8); + STRUCT_CHILD_GETTERS(arpTable, 9); + STRUCT_CHILD_GETTERS(arpResponseTable, 10); + STRUCT_CHILD_GETTERS(ndpTable, 11); + STRUCT_CHILD_GETTERS(ndpResponseTable, 12); + STRUCT_CHILD_GETTERS(macTable, 13); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return inactivityIntervalUsecs(); } - else if constexpr (__id == 2) { return flowletTableSize(); } - else if constexpr (__id == 3) { return dynamicEgressLoadExponent(); } - else if constexpr (__id == 4) { return dynamicQueueExponent(); } - else if constexpr (__id == 5) { return dynamicQueueMinThresholdBytes(); } - else if constexpr (__id == 6) { return dynamicQueueMaxThresholdBytes(); } - else if constexpr (__id == 7) { return dynamicSampleRate(); } - else if constexpr (__id == 8) { return dynamicEgressMinThresholdBytes(); } - else if constexpr (__id == 9) { return dynamicEgressMaxThresholdBytes(); } - else if constexpr (__id == 10) { return dynamicPhysicalQueueExponent(); } - else if constexpr (__id == 11) { return maxLinks(); } - else if constexpr (__id == 12) { return switchingMode(); } + if constexpr (__id == 1) { return vlanId(); } + else if constexpr (__id == 2) { return vlanName(); } + else if constexpr (__id == 3) { return intfID(); } + else if constexpr (__id == 4) { return dhcpV4Relay(); } + else if constexpr (__id == 5) { return dhcpV6Relay(); } + else if constexpr (__id == 6) { return dhcpRelayOverridesV4(); } + else if constexpr (__id == 7) { return dhcpRelayOverridesV6(); } + else if constexpr (__id == 8) { return ports(); } + else if constexpr (__id == 9) { return arpTable(); } + else if constexpr (__id == 10) { return arpResponseTable(); } + else if constexpr (__id == 11) { return ndpTable(); } + else if constexpr (__id == 12) { return ndpResponseTable(); } + else if constexpr (__id == 13) { return macTable(); } } template @@ -12663,44 +12835,75 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::TransceiverConfigOverride>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::TransceiverConfigOverride>, + ::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::TransceiverConfigOverride>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::TransceiverConfigOverride>, + ::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::TransceiverConfigOverride>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::TransceiverConfigOverride, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(ip, 1); + STRUCT_CHILD_GETTERS(intfID, 2); - CONTAINER_CHILD_GETTERS(::std::int32_t); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return ip(); } + else if constexpr (__id == 2) { return intfID(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::NextHopThrift, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::Ttl, + ::facebook::fboss::NextHopThrift, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Ttl>, + ::apache::thrift::type::struct_t<::facebook::fboss::NextHopThrift>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::Ttl, + ::facebook::fboss::NextHopThrift, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Ttl>, + ::apache::thrift::type::struct_t<::facebook::fboss::NextHopThrift>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::common_tags::strings; template using Child = Path< ChildType, @@ -12709,25 +12912,35 @@ class ChildThriftPath<::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::Fsdb ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(value, 1); - STRUCT_CHILD_GETTERS(mask, 2); + STRUCT_CHILD_GETTERS(address, 1); + STRUCT_CHILD_GETTERS(weight, 2); + STRUCT_CHILD_GETTERS(mplsAction, 3); + STRUCT_CHILD_GETTERS(disableTTLDecrement, 4); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return value(); } - else if constexpr (__id == 2) { return mask(); } + if constexpr (__id == 1) { return address(); } + else if constexpr (__id == 2) { return weight(); } + else if constexpr (__id == 3) { return mplsAction(); } + else if constexpr (__id == 4) { return disableTTLDecrement(); } } template @@ -12737,63 +12950,63 @@ std::pair>> }; template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::Interface>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>>, + ::std::vector<::facebook::fboss::cfg::Interface>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Interface>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>>, + ::std::vector<::facebook::fboss::cfg::Interface>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Interface>>, Parent>; - using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::Interface, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::set<::facebook::fboss::cfg::IPv6Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::state::RxSak>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::set<::facebook::fboss::cfg::IPv6Field>, + ::std::vector<::facebook::fboss::state::RxSak>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::set<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::set<::apache::thrift::type::enum_t<::facebook::fboss::cfg::IPv6Field>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::RxSak>>, Parent> { public: using Self = Path< - ::std::set<::facebook::fboss::cfg::IPv6Field>, + ::std::vector<::facebook::fboss::state::RxSak>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::set<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::set<::apache::thrift::type::enum_t<::facebook::fboss::cfg::IPv6Field>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::RxSak>>, Parent>; - using Child = Path<::facebook::fboss::cfg::IPv6Field, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IPv6Field>, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::RxSak, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::IPv6Field); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::vector<::facebook::fboss::MediaLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::MediaLaneSettings>, + ::std::vector<::facebook::fboss::cfg::PortNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::MediaLaneSettings>, + ::std::vector<::facebook::fboss::cfg::PortNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::MediaLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); @@ -12801,21 +13014,21 @@ class ChildThriftPath<::std::vector<::facebook::fboss::MediaLaneSettings>, ::fac template -class ChildThriftPath<::facebook::fboss::state::RoutePrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SwitchSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::RoutePrefix, + ::facebook::fboss::cfg::SwitchSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::RoutePrefix>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchSettings>, Parent> { public: using Self = Path< - ::facebook::fboss::state::RoutePrefix, + ::facebook::fboss::cfg::SwitchSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::RoutePrefix>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchSettings>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -12824,30 +13037,105 @@ class ChildThriftPath<::facebook::fboss::state::RoutePrefix, ::facebook::fboss:: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child>, - std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; + using Children = fatal::tuple>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::L2LearningMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::L2LearningMode>>>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Neighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::MacAndVlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::cfg::SwitchType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::cfg::SwitchDrainState, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchDrainState>>>, + std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(v6, 1); - STRUCT_CHILD_GETTERS(prefix, 2); - STRUCT_CHILD_GETTERS(mask, 3); + STRUCT_CHILD_GETTERS(l2LearningMode, 1); + STRUCT_CHILD_GETTERS(qcmEnable, 2); + STRUCT_CHILD_GETTERS(ptpTcEnable, 3); + STRUCT_CHILD_GETTERS(l2AgeTimerSeconds, 4); + STRUCT_CHILD_GETTERS(maxRouteCounterIDs, 5); + STRUCT_CHILD_GETTERS(blockNeighbors, 6); + STRUCT_CHILD_GETTERS(macAddrsToBlock, 7); + STRUCT_CHILD_GETTERS(switchType, 8); + STRUCT_CHILD_GETTERS(switchId, 9); + STRUCT_CHILD_GETTERS(exactMatchTableConfigs, 10); + STRUCT_CHILD_GETTERS(switchIdToSwitchType_DEPRECATED, 11); + STRUCT_CHILD_GETTERS(switchDrainState, 12); + STRUCT_CHILD_GETTERS(switchIdToSwitchInfo, 13); + STRUCT_CHILD_GETTERS(minLinksToRemainInVOQDomain, 14); + STRUCT_CHILD_GETTERS(minLinksToJoinVOQDomain, 15); + STRUCT_CHILD_GETTERS(vendorMacOuis, 16); + STRUCT_CHILD_GETTERS(metaMacOuis, 17); + STRUCT_CHILD_GETTERS(needL2EntryForNeighbor, 18); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return v6(); } - else if constexpr (__id == 2) { return prefix(); } - else if constexpr (__id == 3) { return mask(); } + if constexpr (__id == 1) { return l2LearningMode(); } + else if constexpr (__id == 2) { return qcmEnable(); } + else if constexpr (__id == 3) { return ptpTcEnable(); } + else if constexpr (__id == 4) { return l2AgeTimerSeconds(); } + else if constexpr (__id == 5) { return maxRouteCounterIDs(); } + else if constexpr (__id == 6) { return blockNeighbors(); } + else if constexpr (__id == 7) { return macAddrsToBlock(); } + else if constexpr (__id == 8) { return switchType(); } + else if constexpr (__id == 9) { return switchId(); } + else if constexpr (__id == 10) { return exactMatchTableConfigs(); } + else if constexpr (__id == 11) { return switchIdToSwitchType_DEPRECATED(); } + else if constexpr (__id == 12) { return switchDrainState(); } + else if constexpr (__id == 13) { return switchIdToSwitchInfo(); } + else if constexpr (__id == 14) { return minLinksToRemainInVOQDomain(); } + else if constexpr (__id == 15) { return minLinksToJoinVOQDomain(); } + else if constexpr (__id == 16) { return vendorMacOuis(); } + else if constexpr (__id == 17) { return metaMacOuis(); } + else if constexpr (__id == 18) { return needL2EntryForNeighbor(); } } template @@ -12858,19 +13146,19 @@ std::pair>> template -class ChildThriftPath<::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::SdkVersion, + ::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SdkVersion>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::SdkVersion, + ::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SdkVersion>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -12881,30 +13169,70 @@ class ChildThriftPath<::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsd ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>, +std::pair>>, +std::pair>>, +std::pair>>, +std::pair>>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::cfg::IpTunnelMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IpTunnelMode>>>, + std::pair, Child<::facebook::fboss::cfg::IpTunnelMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IpTunnelMode>>>, + std::pair, Child<::facebook::fboss::cfg::IpTunnelMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IpTunnelMode>>>, + std::pair, Child<::facebook::fboss::cfg::TunnelTerminationType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::TunnelTerminationType>>>, + std::pair, Child<::facebook::fboss::cfg::TunnelType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::TunnelType>>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(asicSdk, 1); - STRUCT_CHILD_GETTERS(saiSdk, 2); - STRUCT_CHILD_GETTERS(firmware, 3); + STRUCT_CHILD_GETTERS(ipInIpTunnelId, 1); + STRUCT_CHILD_GETTERS(underlayIntfID, 2); + STRUCT_CHILD_GETTERS(dstIp, 3); + STRUCT_CHILD_GETTERS(srcIp, 4); + STRUCT_CHILD_GETTERS(dstIpMask, 5); + STRUCT_CHILD_GETTERS(srcIpMask, 6); + STRUCT_CHILD_GETTERS(ttlMode, 7); + STRUCT_CHILD_GETTERS(dscpMode, 8); + STRUCT_CHILD_GETTERS(ecnMode, 9); + STRUCT_CHILD_GETTERS(tunnelTermType, 10); + STRUCT_CHILD_GETTERS(tunnelType, 11); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return asicSdk(); } - else if constexpr (__id == 2) { return saiSdk(); } - else if constexpr (__id == 3) { return firmware(); } + if constexpr (__id == 1) { return ipInIpTunnelId(); } + else if constexpr (__id == 2) { return underlayIntfID(); } + else if constexpr (__id == 3) { return dstIp(); } + else if constexpr (__id == 4) { return srcIp(); } + else if constexpr (__id == 5) { return dstIpMask(); } + else if constexpr (__id == 6) { return srcIpMask(); } + else if constexpr (__id == 7) { return ttlMode(); } + else if constexpr (__id == 8) { return dscpMode(); } + else if constexpr (__id == 9) { return ecnMode(); } + else if constexpr (__id == 10) { return tunnelTermType(); } + else if constexpr (__id == 11) { return tunnelType(); } } template @@ -12914,41 +13242,41 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::MatchToAction>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::MatchToAction>, + ::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MatchToAction>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::MatchToAction>, + ::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MatchToAction>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::MatchToAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::int64_t); }; template -class ChildThriftPath<::facebook::fboss::cfg::LoadBalancer, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::LoadBalancer, + ::facebook::fboss::cfg::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::LoadBalancer>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectToNextHopAction>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::LoadBalancer, + ::facebook::fboss::cfg::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::LoadBalancer>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectToNextHopAction>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -12959,35 +13287,25 @@ class ChildThriftPath<::facebook::fboss::cfg::LoadBalancer, ::facebook::fboss::f ChildTag, Self >; - using Children = fatal::tuple>>, -std::pair>, -std::pair>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::LoadBalancerID, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::Fields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::cfg::HashingAlgorithm, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::HashingAlgorithm>>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::RedirectNextHop>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(fieldSelection, 2); - STRUCT_CHILD_GETTERS(algorithm, 3); - STRUCT_CHILD_GETTERS(seed, 4); + STRUCT_CHILD_GETTERS(nexthops, 1); + STRUCT_CHILD_GETTERS(redirectNextHops, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return fieldSelection(); } - else if constexpr (__id == 3) { return algorithm(); } - else if constexpr (__id == 4) { return seed(); } + if constexpr (__id == 1) { return nexthops(); } + else if constexpr (__id == 2) { return redirectNextHops(); } } template @@ -12996,6 +13314,27 @@ std::pair>> } }; +template +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfGroup>>, + Parent> { + public: + using Self = Path< + ::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfGroup>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::UdfGroup, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::string); +}; + template class ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : @@ -13502,19 +13841,86 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::MediaLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::ExactMatchTableConfig, + ::facebook::fboss::MediaLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::ExactMatchTableConfig, + ::facebook::fboss::MediaLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>, + Parent>; + using strings = ::facebook::fboss::transceiver_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(lane, 1); + STRUCT_CHILD_GETTERS(txDisable, 2); + STRUCT_CHILD_GETTERS(txSquelch, 3); + STRUCT_CHILD_GETTERS(txAdaptiveEqControl, 4); + STRUCT_CHILD_GETTERS(txSquelchForce, 5); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return lane(); } + else if constexpr (__id == 2) { return txDisable(); } + else if constexpr (__id == 3) { return txSquelch(); } + else if constexpr (__id == 4) { return txAdaptiveEqControl(); } + else if constexpr (__id == 5) { return txSquelchForce(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + + +template +class ChildThriftPath<::facebook::fboss::cfg::SystemPortRanges, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::cfg::SystemPortRanges, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SystemPortRanges>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::cfg::SystemPortRanges, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SystemPortRanges>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -13525,25 +13931,20 @@ class ChildThriftPath<::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Range64>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(dstPrefixLength, 2); + STRUCT_CHILD_GETTERS(systemPortRanges, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return dstPrefixLength(); } + if constexpr (__id == 1) { return systemPortRanges(); } } template @@ -13553,85 +13954,70 @@ std::pair -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::CounterType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, + ::std::vector<::facebook::fboss::cfg::CounterType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::CounterType>>, Parent> { public: using Self = Path< - ::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, + ::std::vector<::facebook::fboss::cfg::CounterType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::CounterType>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = Path<::facebook::fboss::cfg::CounterType, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::CounterType>, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::string); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::MediaLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::MediaLaneSettings, + ::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::MediaLaneSettings, + ::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>, Parent>; - using strings = ::facebook::fboss::transceiver_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child>>; + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(lane, 1); - STRUCT_CHILD_GETTERS(txDisable, 2); - STRUCT_CHILD_GETTERS(txSquelch, 3); - STRUCT_CHILD_GETTERS(txAdaptiveEqControl, 4); - STRUCT_CHILD_GETTERS(txSquelchForce, 5); + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(dstPrefixLength, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return lane(); } - else if constexpr (__id == 2) { return txDisable(); } - else if constexpr (__id == 3) { return txSquelch(); } - else if constexpr (__id == 4) { return txAdaptiveEqControl(); } - else if constexpr (__id == 5) { return txSquelchForce(); } + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return dstPrefixLength(); } } template @@ -13641,24 +14027,24 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::CounterType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::CounterType>, + ::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::CounterType>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::CounterType>, + ::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::CounterType>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>>, Parent>; - using Child = Path<::facebook::fboss::cfg::CounterType, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::CounterType>, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::string); }; template @@ -13790,214 +14176,9 @@ class ChildThriftPath<::facebook::fboss::phy::LaneMap, ::facebook::fboss::fsdb:: ::facebook::fboss::phy::LaneMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneMap>, - Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, - std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(rx, 1); - STRUCT_CHILD_GETTERS(tx, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return rx(); } - else if constexpr (__id == 2) { return tx(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - - -template -class ChildThriftPath<::facebook::fboss::cfg::SwitchSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::cfg::SwitchSettings, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchSettings>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::cfg::SwitchSettings, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchSettings>, - Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::L2LearningMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::L2LearningMode>>>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Neighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::MacAndVlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::cfg::SwitchType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::cfg::SwitchDrainState, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchDrainState>>>, - std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(l2LearningMode, 1); - STRUCT_CHILD_GETTERS(qcmEnable, 2); - STRUCT_CHILD_GETTERS(ptpTcEnable, 3); - STRUCT_CHILD_GETTERS(l2AgeTimerSeconds, 4); - STRUCT_CHILD_GETTERS(maxRouteCounterIDs, 5); - STRUCT_CHILD_GETTERS(blockNeighbors, 6); - STRUCT_CHILD_GETTERS(macAddrsToBlock, 7); - STRUCT_CHILD_GETTERS(switchType, 8); - STRUCT_CHILD_GETTERS(switchId, 9); - STRUCT_CHILD_GETTERS(exactMatchTableConfigs, 10); - STRUCT_CHILD_GETTERS(switchIdToSwitchType_DEPRECATED, 11); - STRUCT_CHILD_GETTERS(switchDrainState, 12); - STRUCT_CHILD_GETTERS(switchIdToSwitchInfo, 13); - STRUCT_CHILD_GETTERS(minLinksToRemainInVOQDomain, 14); - STRUCT_CHILD_GETTERS(minLinksToJoinVOQDomain, 15); - STRUCT_CHILD_GETTERS(vendorMacOuis, 16); - STRUCT_CHILD_GETTERS(metaMacOuis, 17); - STRUCT_CHILD_GETTERS(needL2EntryForNeighbor, 18); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return l2LearningMode(); } - else if constexpr (__id == 2) { return qcmEnable(); } - else if constexpr (__id == 3) { return ptpTcEnable(); } - else if constexpr (__id == 4) { return l2AgeTimerSeconds(); } - else if constexpr (__id == 5) { return maxRouteCounterIDs(); } - else if constexpr (__id == 6) { return blockNeighbors(); } - else if constexpr (__id == 7) { return macAddrsToBlock(); } - else if constexpr (__id == 8) { return switchType(); } - else if constexpr (__id == 9) { return switchId(); } - else if constexpr (__id == 10) { return exactMatchTableConfigs(); } - else if constexpr (__id == 11) { return switchIdToSwitchType_DEPRECATED(); } - else if constexpr (__id == 12) { return switchDrainState(); } - else if constexpr (__id == 13) { return switchIdToSwitchInfo(); } - else if constexpr (__id == 14) { return minLinksToRemainInVOQDomain(); } - else if constexpr (__id == 15) { return minLinksToJoinVOQDomain(); } - else if constexpr (__id == 16) { return vendorMacOuis(); } - else if constexpr (__id == 17) { return metaMacOuis(); } - else if constexpr (__id == 18) { return needL2EntryForNeighbor(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - -template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::PortNeighbor>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::PortNeighbor>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - - -template -class ChildThriftPath<::facebook::fboss::state::TransceiverSpecFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::state::TransceiverSpecFields, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::state::TransceiverSpecFields, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneMap>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::phy::phy_tags::strings; template using Child = Path< ChildType, @@ -14006,35 +14187,25 @@ class ChildThriftPath<::facebook::fboss::state::TransceiverSpecFields, ::faceboo ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child>, - std::pair, Child<::facebook::fboss::MediaInterfaceCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MediaInterfaceCode>>>, - std::pair, Child<::facebook::fboss::TransceiverManagementInterface, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::TransceiverManagementInterface>>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(cableLength, 2); - STRUCT_CHILD_GETTERS(mediaInterface, 3); - STRUCT_CHILD_GETTERS(managementInterface, 4); + STRUCT_CHILD_GETTERS(rx, 1); + STRUCT_CHILD_GETTERS(tx, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return cableLength(); } - else if constexpr (__id == 3) { return mediaInterface(); } - else if constexpr (__id == 4) { return managementInterface(); } + if constexpr (__id == 1) { return rx(); } + else if constexpr (__id == 2) { return tx(); } } template @@ -15096,114 +15267,114 @@ std::pair -class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SetDscpMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, + ::facebook::fboss::cfg::SetDscpMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetDscpMatchAction>, Parent> { public: using Self = Path< - ::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, + ::facebook::fboss::cfg::SetDscpMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetDscpMatchAction>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; + template + using NameToId = fatal::tuple>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(dscpValue, 1); - CONTAINER_CHILD_GETTERS(::std::int16_t); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return dscpValue(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::MacAndVlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, + ::std::vector<::facebook::fboss::cfg::MacAndVlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchInfo>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>>, Parent> { public: using Self = Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, + ::std::vector<::facebook::fboss::cfg::MacAndVlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchInfo>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::SwitchInfo, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::MacAndVlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int64_t); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::MacAndVlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::MacAndVlan>, + ::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::MacAndVlan>, + ::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::MacAndVlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::int16_t); }; - template -class ChildThriftPath<::facebook::fboss::cfg::SetDscpMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::SetDscpMatchAction, + ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetDscpMatchAction>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchInfo>>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::SetDscpMatchAction, + ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetDscpMatchAction>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchInfo>>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; - template - using NameToId = fatal::tuple>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = ChildThriftPath<::facebook::fboss::cfg::SwitchInfo, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(dscpValue, 1); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return dscpValue(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::std::int64_t); }; @@ -16859,14 +17030,16 @@ std::pair>, std::pair>, std::pair>, -std::pair>>; +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::SwitchType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>>, std::pair, Child<::facebook::fboss::cfg::AsicType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AsicType>>>, std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, std::pair, ChildThriftPath<::facebook::fboss::cfg::Range64, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, ChildThriftPath<::facebook::fboss::cfg::Range64, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::SystemPortRanges, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -16874,7 +17047,8 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -16887,6 +17061,7 @@ std::pair auto operator()(const std::integral_constant&) { @@ -16897,6 +17072,7 @@ std::pair @@ -17562,104 +17738,6 @@ class ChildThriftPath<::std::map<::facebook::fboss::cfg::AclStage, ::facebook::f CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::AclStage); }; -template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::QosPolicyFields>>>, - Parent> { - public: - using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::QosPolicyFields>>>, - Parent>; - using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); -}; - - -template -class ChildThriftPath<::facebook::fboss::state::MirrorTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::state::MirrorTunnel, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorTunnel>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::state::MirrorTunnel, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorTunnel>, - Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(srcIp, 1); - STRUCT_CHILD_GETTERS(dstIp, 2); - STRUCT_CHILD_GETTERS(srcMac, 3); - STRUCT_CHILD_GETTERS(dstMac, 4); - STRUCT_CHILD_GETTERS(udpSrcPort, 5); - STRUCT_CHILD_GETTERS(udpDstPort, 6); - STRUCT_CHILD_GETTERS(ttl, 7); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return srcIp(); } - else if constexpr (__id == 2) { return dstIp(); } - else if constexpr (__id == 3) { return srcMac(); } - else if constexpr (__id == 4) { return dstMac(); } - else if constexpr (__id == 5) { return udpSrcPort(); } - else if constexpr (__id == 6) { return udpDstPort(); } - else if constexpr (__id == 7) { return ttl(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - template<> From 30a303eb3b8c283c14a7f44c73d788cd898ff698 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 23 Oct 2024 21:36:57 -0700 Subject: [PATCH 297/479] Workaround for 11.0 bug of not honoring switch isolate during fab switch create Summary: 11.0 is not honoring isolate attribute during fabric switch create We still want the switch to be isolated before we start enabling ports after cold boot. This is tracked in CS00012372888. TODO: get rid of this call once CS00012372888 is resolved Reviewed By: shri-khare Differential Revision: D64783148 Privacy Context Container: L1125642 fbshipit-source-id: f62a546348f011e2766dc67a6b9ac161a9261391 --- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 3b409ff91322d..76e7b87e94357 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -2414,6 +2414,15 @@ HwInitResult SaiSwitch::initLocked( adapterKeysJson.get(), adapterKeys2AdapterHostKeysJson.get()); if (bootType_ != BootType::WARM_BOOT) { + if (getSwitchType() == cfg::SwitchType::FABRIC) { + // 11.0 is not honoring isolate attribute during fabric switch create + // We still want the switch to be isolated before we start enabling ports + // after cold boot. This is tracked in CS00012372888. + // TODO: get rid of this call once CS00012372888 is resolved + auto& switchApi = SaiApiTable::getInstance()->switchApi(); + switchApi.setAttribute( + saiSwitchId_, SaiSwitchTraits::Attributes::SwitchIsolate{true}); + } ret.switchState = getColdBootSwitchState(); ret.switchState->publish(); setProgrammedState(ret.switchState); From 147ff8cb660630a701cd4c6fdb3ef8672149469b Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 23 Oct 2024 21:36:57 -0700 Subject: [PATCH 298/479] Assert that switch comes up drained on cold boot Summary: As titled Reviewed By: shri-khare, nivinl Differential Revision: D64719331 fbshipit-source-id: e4e2833eff1fca13ec320885e693449f38359199 --- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 76e7b87e94357..650a7be97235a 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -2363,6 +2363,11 @@ std::shared_ptr SaiSwitch::getColdBootSwitchState() { saiSwitchId_, SaiSwitchTraits::Attributes::SwitchIsolate{}); auto drainState = switchIsolate ? cfg::SwitchDrainState::DRAINED : cfg::SwitchDrainState::UNDRAINED; + CHECK(drainState == cfg::SwitchDrainState::DRAINED) + << " Switch must be drained on cold boot"; + XLOG(DBG2) << " On cold boot, switch came up: " + << (drainState == cfg::SwitchDrainState::DRAINED ? "DRAINED" + : "UNDRAINED"); switchSettings->setActualSwitchDrainState(drainState); } From 80a29244d48073246ed4eff985b27d32109d6cf5 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Wed, 23 Oct 2024 21:49:37 -0700 Subject: [PATCH 299/479] fboss_sai_agent_known_bad_tests_sync Reviewed By: srikrishnagopu Differential Revision: D64870961 fbshipit-source-id: 34bdd79174990afc59dd2c35e7114bf2181684bb --- ...ai_agent_known_bad_tests.materialized_JSON | 2152 ++++++++++++++--- 1 file changed, 1766 insertions(+), 386 deletions(-) diff --git a/fboss/oss/hw_known_bad_tests/sai_agent_known_bad_tests.materialized_JSON b/fboss/oss/hw_known_bad_tests/sai_agent_known_bad_tests.materialized_JSON index 7320a941eadad..ce87a5a6915b2 100644 --- a/fboss/oss/hw_known_bad_tests/sai_agent_known_bad_tests.materialized_JSON +++ b/fboss/oss/hw_known_bad_tests/sai_agent_known_bad_tests.materialized_JSON @@ -52,6 +52,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -82,6 +85,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -148,6 +154,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -178,6 +187,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -214,6 +226,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentLoadBalancerTestV4.ECMPShrinkExpandLoadBalanceFullHashCpuTraffic$" }, @@ -348,6 +384,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -378,6 +417,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -432,6 +474,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -462,6 +507,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -498,6 +546,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -522,6 +594,9 @@ { "test_name_regex": "AgentSflowMirrorTestV6.*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentIngressPortErspanMirroringTruncateTest/[01].TrucatePortErspanMirror$" }, @@ -656,6 +731,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -686,6 +764,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -752,6 +833,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -782,6 +866,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -818,6 +905,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentIngressPortErspanMirroringTest/1.ErspanPortMirror$" }, @@ -830,6 +941,9 @@ { "test_name_regex": "AgentSflowMirrorTestV6.*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentIngressPortErspanMirroringTruncateTest/[01].TrucatePortErspanMirror$" }, @@ -913,6 +1027,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -943,6 +1060,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -997,6 +1117,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -1027,6 +1150,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -1063,6 +1189,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -1151,10 +1301,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -1218,6 +1365,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -1248,6 +1398,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -1314,6 +1467,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -1344,6 +1500,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -1380,6 +1539,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentLoadBalancerTestV4InMplsPhp.*$" }, @@ -1456,10 +1639,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -1551,10 +1731,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -1616,6 +1793,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -1646,6 +1826,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -1700,6 +1883,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -1730,6 +1916,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -1766,6 +1955,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -1880,10 +2093,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -1945,6 +2155,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -1975,6 +2188,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -2041,6 +2257,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -2071,6 +2290,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -2107,6 +2329,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentAqmTest.verifyEcnWithoutWredConfig$" }, @@ -2220,6 +2466,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -2250,6 +2499,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -2304,6 +2556,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -2334,6 +2589,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -2370,6 +2628,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -2430,6 +2712,12 @@ { "test_name_regex": "AgentVoqSwitchLineRateTest.*$" }, + { + "test_name_regex": "AgentPfcTest.*$" + }, + { + "test_name_regex": "AgentTrafficPfc.*$" + }, { "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToDefaultUCQueue$" }, @@ -2441,41 +2729,236 @@ }, { "test_name_regex": "AgentMacLearningAndNeighborResolutionTest/2.learnMacProgramNeighborsAndMove$" + }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" } ], - "brcm/11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/jericho3/mono": [ + "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk5/multi_switch": [ { - "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" + "test_name_regex": "AgentLoadBalancerTestV4InMplsPhp.*$" }, { - "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastIpNetworkControlDscpToHighPriQ$" + "test_name_regex": "AgentLoadBalancerTestV4InMplsSwap.*$" }, { - "test_name_regex": "AgentCoppTest/[01].L3MTUErrorToLowPriQ$" + "test_name_regex": "AgentLoadBalancerTestV4ToMpls.*$" }, { - "test_name_regex": "AgentCoppTest/[01].DhcpPacketToMidPriQ$" + "test_name_regex": "AgentLoadBalancerTestV6InMplsPhp.*$" }, { - "test_name_regex": "AgentCoppTest/0.VerifyCoppPpsLowPri$" + "test_name_regex": "AgentLoadBalancerTestV6InMplsSwap.*$" }, { - "test_name_regex": "AgentOlympicQosSchedulerTest.VerifyWRRForOlympicToOlympicV2$" + "test_name_regex": "AgentLoadBalancerTestV6ToMpls.*$" }, { - "test_name_regex": "AgentOlympicV2SPToWRRQosSchedulerTest.VerifyOlympicV2AllSPTrafficToWRR$" + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV4MplsPhpFrontPanelTraffic$" }, { - "test_name_regex": "AgentUdfAclCounterTest.*$" + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV4MplsSwapFrontPanelTraffic$" }, { - "test_name_regex": "AgentFlowlet.*$" + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6MplsPhpFrontPanelTraffic$" }, { - "test_name_regex": "AgentCoppQosTest.HighVsLowerPriorityCpuQueueTrafficPrioritization$" + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6MplsSwapFrontPanelTraffic$" }, { - "test_name_regex": "AgentCoppQueueStuckTest.CpuQueueHighRateTraffic$" + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV4MplsPhpFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV4MplsSwapFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV6MplsPhpFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV6MplsSwapFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV4MplsFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6MplsFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV4MplsFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV6MplsFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentIngressAclSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentIngressAclErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentEgressAclSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentEgressPortSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentSflowMirrorTestV4[46].VerifySampledPacketRate$" + }, + { + "test_name_regex": "AgentSflowMirrorTruncateTestV[46].VerifySampledPacketRate$" + }, + { + "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, + { + "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" + }, + { + "test_name_regex": "AgentTrafficPfcTest.verifyIngressPriorityGroupWatermarks$" + }, + { + "test_name_regex": "AgentTrafficPfcWatchdogTest.*$" + }, + { + "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastIpNetworkControlDscpToHighPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].L3MTUErrorToLowPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].DhcpPacketToMidPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/0.VerifyCoppPpsLowPri$" + }, + { + "test_name_regex": "AgentOlympicQosSchedulerTest.VerifyWRRForOlympicToOlympicV2$" + }, + { + "test_name_regex": "AgentOlympicV2SPToWRRQosSchedulerTest.VerifyOlympicV2AllSPTrafficToWRR$" + }, + { + "test_name_regex": "AgentUdfAclCounterTest.*$" + }, + { + "test_name_regex": "AgentFlowlet.*$" + }, + { + "test_name_regex": "AgentCoppQosTest.HighVsLowerPriorityCpuQueueTrafficPrioritization$" + }, + { + "test_name_regex": "AgentCoppQueueStuckTest.CpuQueueHighRateTraffic$" + }, + { + "test_name_regex": "AgentPacketFloodTest.*$" + }, + { + "test_name_regex": "AgentMacLearningMacMoveTest.*$" + }, + { + "test_name_regex": "AgentMacLearningBatchEntriesTest.*$" + }, + { + "test_name_regex": "AgentSflowMirrorTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForTrunk$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwLearningForPort$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwLearningForTrunk$" + }, + { + "test_name_regex": "AgentIngressEgress.*$" + }, + { + "test_name_regex": "AgentIngressAclSpanMirroringTest.*$" + }, + { + "test_name_regex": "AgentIngressAclErspanMirroringTest.*$" + }, + { + "test_name_regex": "AgentEgressAclSpanMirroringTest.*$" + }, + { + "test_name_regex": "AgentEgressAclErspanMirroringTest.*$" + }, + { + "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" + }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, + { + "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" + }, + { + "test_name_regex": "AgentRouteOverflowTest.overflowRoutes$" + }, + { + "test_name_regex": "warm_boot.AgentInNullRouteDiscardsCounterTest.nullRouteHit$" + }, + { + "test_name_regex": "warm_boot.AgentRouteCounterOverflowTest.overflowRouteCounters$" + }, + { + "test_name_regex": "warm_boot.AgentMacLearningAndNeighborResolutionTest/[01].learnMacProgramNeighborsAndAgeMac$" + }, + { + "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastIpNetworkControlDscpToHighPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].L3MTUErrorToLowPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].DhcpPacketToMidPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/0.VerifyCoppPpsLowPri$" + }, + { + "test_name_regex": "AgentOlympicQosSchedulerTest.VerifyWRRForOlympicToOlympicV2$" + }, + { + "test_name_regex": "AgentOlympicV2SPToWRRQosSchedulerTest.VerifyOlympicV2AllSPTrafficToWRR$" + }, + { + "test_name_regex": "AgentUdfAclCounterTest.*$" + }, + { + "test_name_regex": "AgentFlowlet.*$" + }, + { + "test_name_regex": "AgentCoppQosTest.HighVsLowerPriorityCpuQueueTrafficPrioritization$" + }, + { + "test_name_regex": "AgentCoppQueueStuckTest.CpuQueueHighRateTraffic$" }, { "test_name_regex": "AgentPacketFloodTest.*$" @@ -2495,6 +2978,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -2525,6 +3011,227 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, + { + "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" + }, + { + "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" + }, + { + "test_name_regex": "AgentLoopBackTest.VerifyLoopBackSrcEqualDstMac$" + }, + { + "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/0$" + }, + { + "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/2$" + }, + { + "test_name_regex": "AgentMacSwLearningModeTest.VerifyNbrMacInL2Table$" + }, + { + "test_name_regex": "AgentMacLearningStaticEntriesTest.VerifyStaticDynamicTransformations$" + }, + { + "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" + }, + { + "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" + }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, + { + "test_name_regex": "AgentBthOpcodeAclCounterTest.VerifyCounterBumpOnBthOpcodeHitFrontPanel$" + }, + { + "test_name_regex": "AgentFabricSwitchSelfLoopTest.*$" + }, + { + "test_name_regex": "AgentFabricPrbsTest.*$" + }, + { + "test_name_regex": "AgentFabricSwitchTest.*$" + }, + { + "test_name_regex": "AgentIngressAclSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentIngressAclErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentEgressAclSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentEgressForwardingDiscardsCounterTest.*$" + }, + { + "test_name_regex": "AgentFlowletResourceTest.*$" + }, + { + "test_name_regex": "AgentVoqSwitchTest.*$" + }, + { + "test_name_regex": "AgentVoqSwitchWithFabricPortsStartDrained.*$" + }, + { + "test_name_regex": "AgentVoqSwitchWithFabricPortsTest.*$" + }, + { + "test_name_regex": "AgentVoqSwitchWithMultipleDsfNodesTest.*$" + }, + { + "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.*$" + }, + { + "test_name_regex": "AgentVoqSwitchLineRateTest.*$" + }, + { + "test_name_regex": "AgentPfcTest.*$" + }, + { + "test_name_regex": "AgentTrafficPfc.*$" + }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToDefaultUCQueue$" + }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToUCQueue$" + }, + { + "test_name_regex": "AgentMacLearningAndNeighborResolutionTest/0.learnMacProgramNeighborsAndMove$" + }, + { + "test_name_regex": "AgentMacLearningAndNeighborResolutionTest/2.learnMacProgramNeighborsAndMove$" + }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + } + ], + "brcm/11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/jericho3/mono": [ + { + "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastIpNetworkControlDscpToHighPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].L3MTUErrorToLowPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].DhcpPacketToMidPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/0.VerifyCoppPpsLowPri$" + }, + { + "test_name_regex": "AgentOlympicQosSchedulerTest.VerifyWRRForOlympicToOlympicV2$" + }, + { + "test_name_regex": "AgentOlympicV2SPToWRRQosSchedulerTest.VerifyOlympicV2AllSPTrafficToWRR$" + }, + { + "test_name_regex": "AgentUdfAclCounterTest.*$" + }, + { + "test_name_regex": "AgentFlowlet.*$" + }, + { + "test_name_regex": "AgentCoppQosTest.HighVsLowerPriorityCpuQueueTrafficPrioritization$" + }, + { + "test_name_regex": "AgentCoppQueueStuckTest.CpuQueueHighRateTraffic$" + }, + { + "test_name_regex": "AgentPacketFloodTest.*$" + }, + { + "test_name_regex": "AgentMacLearningMacMoveTest.*$" + }, + { + "test_name_regex": "AgentMacLearningBatchEntriesTest.*$" + }, + { + "test_name_regex": "AgentSflowMirrorTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForTrunk$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwLearningForPort$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwLearningForTrunk$" + }, + { + "test_name_regex": "AgentIngressEgress.*$" + }, + { + "test_name_regex": "AgentIngressAclSpanMirroringTest.*$" + }, + { + "test_name_regex": "AgentIngressAclErspanMirroringTest.*$" + }, + { + "test_name_regex": "AgentEgressAclSpanMirroringTest.*$" + }, + { + "test_name_regex": "AgentEgressAclErspanMirroringTest.*$" + }, + { + "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" + }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -2579,6 +3286,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -2609,6 +3319,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -2645,6 +3358,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -2750,6 +3487,12 @@ { "test_name_regex": "AgentAclCounterTest/0.VerifyAclPriorityL4DstportHitFrontPanel$" }, + { + "test_name_regex": "AgentAclCounterTest.VerifyAclPriorityL4DstportHitFrontPanel$" + }, + { + "test_name_regex": "AgentAclCounterTest.VerifyCounterBumpOnL4DstportHitFrontPanel$" + }, { "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" }, @@ -2768,6 +3511,27 @@ { "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" }, + { + "test_name_regex": "AgentHwAclQualifierTest.*$" + }, + { + "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + }, + { + "test_name_regex": "AgentEgressForwardingDiscardsCounterTest.outForwardingDiscards$" + }, + { + "test_name_regex": "AgentHwAclStatTest.AclStatChangeCounterType$" + }, + { + "test_name_regex": "AgentNeighborTest/[46].ResolvePendingEntryThenChangeLookupClassAgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "AgentVoqSwitchTest.trapPktsOnPort$" + }, { "test_name_regex": "AgentCoppTest/0.UnresolvedRoutesToLowPriQueue$" }, @@ -2795,9 +3559,6 @@ { "test_name_regex": "AgentVoqSwitchInterruptTest.*$" }, - { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.systemPortScaleTest$" - }, { "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteNeighborWithEcmpGroup$" }, @@ -2810,6 +3571,15 @@ { "test_name_regex": "warm_boot.AgentVoqSwitchLineRateTest.creditsDeleted$" }, + { + "test_name_regex": "warm_boot.AgentTrafficPfcTest.verifyBufferPoolWatermarks$" + }, + { + "test_name_regex": "warm_boot.AgentVoqSwitchWithFabricPortsTest.fdrCellDrops$" + }, + { + "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + }, { "test_name_regex": "Agent2QueueToOlympicQoSTest.verifyDscpToQueueMapping$" }, @@ -2823,10 +3593,10 @@ "test_name_regex": "AgentPortBandwidthPpsTest.VerifyPpsDynamicChanges$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + "test_name_regex": "AgentNeighborTest[46].ResolvePendingEntryThenChangeLookupClass$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteAndLocalLoadBalance$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" } ], "brcm/11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/jericho3/multi_switch": [ @@ -2881,6 +3651,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -2911,6 +3684,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -2977,6 +3753,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3007,6 +3786,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -3017,31 +3799,55 @@ "test_name_regex": "AgentLoopBackTest.VerifyLoopBackSrcEqualDstMac$" }, { - "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/0$" + "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/0$" + }, + { + "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/2$" + }, + { + "test_name_regex": "AgentMacSwLearningModeTest.VerifyNbrMacInL2Table$" + }, + { + "test_name_regex": "AgentMacLearningStaticEntriesTest.VerifyStaticDynamicTransformations$" + }, + { + "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" + }, + { + "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, { - "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/2$" + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" }, { - "test_name_regex": "AgentMacSwLearningModeTest.VerifyNbrMacInL2Table$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" }, { - "test_name_regex": "AgentMacLearningStaticEntriesTest.VerifyStaticDynamicTransformations$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" }, { - "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" }, { - "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" }, { - "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" }, { - "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" }, { - "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" }, { "test_name_regex": "AgentLoadBalancerTestV4InMplsPhp.*$" @@ -3136,6 +3942,12 @@ { "test_name_regex": "AgentAclCounterTest/0.VerifyAclPriorityL4DstportHitFrontPanel$" }, + { + "test_name_regex": "AgentAclCounterTest.VerifyAclPriorityL4DstportHitFrontPanel$" + }, + { + "test_name_regex": "AgentAclCounterTest.VerifyCounterBumpOnL4DstportHitFrontPanel$" + }, { "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" }, @@ -3154,6 +3966,27 @@ { "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" }, + { + "test_name_regex": "AgentHwAclQualifierTest.*$" + }, + { + "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + }, + { + "test_name_regex": "AgentEgressForwardingDiscardsCounterTest.outForwardingDiscards$" + }, + { + "test_name_regex": "AgentHwAclStatTest.AclStatChangeCounterType$" + }, + { + "test_name_regex": "AgentNeighborTest/[46].ResolvePendingEntryThenChangeLookupClassAgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "AgentVoqSwitchTest.trapPktsOnPort$" + }, { "test_name_regex": "AgentCoppTest/0.UnresolvedRoutesToLowPriQueue$" }, @@ -3181,9 +4014,6 @@ { "test_name_regex": "AgentVoqSwitchInterruptTest.*$" }, - { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.systemPortScaleTest$" - }, { "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteNeighborWithEcmpGroup$" }, @@ -3196,6 +4026,15 @@ { "test_name_regex": "warm_boot.AgentVoqSwitchLineRateTest.creditsDeleted$" }, + { + "test_name_regex": "warm_boot.AgentTrafficPfcTest.verifyBufferPoolWatermarks$" + }, + { + "test_name_regex": "warm_boot.AgentVoqSwitchWithFabricPortsTest.fdrCellDrops$" + }, + { + "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + }, { "test_name_regex": "Agent2QueueToOlympicQoSTest.verifyDscpToQueueMapping$" }, @@ -3209,10 +4048,10 @@ "test_name_regex": "AgentPortBandwidthPpsTest.VerifyPpsDynamicChanges$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + "test_name_regex": "AgentNeighborTest[46].ResolvePendingEntryThenChangeLookupClass$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteAndLocalLoadBalance$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" } ], "brcm/11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/ramon3/mono": [ @@ -3267,6 +4106,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3297,6 +4139,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -3351,6 +4196,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3381,6 +4229,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -3417,6 +4268,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -3485,6 +4360,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3515,6 +4393,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -3581,6 +4462,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3611,6 +4495,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -3647,6 +4534,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentPrbsTest.*$" } @@ -3703,6 +4614,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3733,6 +4647,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -3787,6 +4704,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3817,6 +4737,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -3853,6 +4776,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -4005,6 +4952,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -4035,6 +4985,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -4101,6 +5054,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -4131,6 +5087,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -4167,6 +5126,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentLoadBalancerTestV4InMplsPhp.*$" }, @@ -4307,6 +5290,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -4337,6 +5323,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -4391,6 +5380,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -4421,6 +5413,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -4457,6 +5452,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -4562,6 +5581,12 @@ { "test_name_regex": "AgentAclCounterTest/0.VerifyAclPriorityL4DstportHitFrontPanel$" }, + { + "test_name_regex": "AgentAclCounterTest.VerifyAclPriorityL4DstportHitFrontPanel$" + }, + { + "test_name_regex": "AgentAclCounterTest.VerifyCounterBumpOnL4DstportHitFrontPanel$" + }, { "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" }, @@ -4580,6 +5605,27 @@ { "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" }, + { + "test_name_regex": "AgentHwAclQualifierTest.*$" + }, + { + "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + }, + { + "test_name_regex": "AgentEgressForwardingDiscardsCounterTest.outForwardingDiscards$" + }, + { + "test_name_regex": "AgentHwAclStatTest.AclStatChangeCounterType$" + }, + { + "test_name_regex": "AgentNeighborTest/[46].ResolvePendingEntryThenChangeLookupClassAgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "AgentVoqSwitchTest.trapPktsOnPort$" + }, { "test_name_regex": "AgentCoppTest/0.UnresolvedRoutesToLowPriQueue$" }, @@ -4607,9 +5653,6 @@ { "test_name_regex": "AgentVoqSwitchInterruptTest.*$" }, - { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.systemPortScaleTest$" - }, { "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteNeighborWithEcmpGroup$" }, @@ -4622,6 +5665,15 @@ { "test_name_regex": "warm_boot.AgentVoqSwitchLineRateTest.creditsDeleted$" }, + { + "test_name_regex": "warm_boot.AgentTrafficPfcTest.verifyBufferPoolWatermarks$" + }, + { + "test_name_regex": "warm_boot.AgentVoqSwitchWithFabricPortsTest.fdrCellDrops$" + }, + { + "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + }, { "test_name_regex": "Agent2QueueToOlympicQoSTest.verifyDscpToQueueMapping$" }, @@ -4635,10 +5687,10 @@ "test_name_regex": "AgentPortBandwidthPpsTest.VerifyPpsDynamicChanges$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + "test_name_regex": "AgentNeighborTest[46].ResolvePendingEntryThenChangeLookupClass$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteAndLocalLoadBalance$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" } ], "brcm/12.0_ea_dnx_odp/12.0_ea_dnx_odp/jericho3/multi_switch": [ @@ -4693,6 +5745,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -4723,6 +5778,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -4789,6 +5847,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -4819,6 +5880,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -4855,6 +5919,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentLoadBalancerTestV4InMplsPhp.*$" }, @@ -4948,6 +6036,12 @@ { "test_name_regex": "AgentAclCounterTest/0.VerifyAclPriorityL4DstportHitFrontPanel$" }, + { + "test_name_regex": "AgentAclCounterTest.VerifyAclPriorityL4DstportHitFrontPanel$" + }, + { + "test_name_regex": "AgentAclCounterTest.VerifyCounterBumpOnL4DstportHitFrontPanel$" + }, { "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" }, @@ -4966,6 +6060,27 @@ { "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" }, + { + "test_name_regex": "AgentHwAclQualifierTest.*$" + }, + { + "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + }, + { + "test_name_regex": "AgentEgressForwardingDiscardsCounterTest.outForwardingDiscards$" + }, + { + "test_name_regex": "AgentHwAclStatTest.AclStatChangeCounterType$" + }, + { + "test_name_regex": "AgentNeighborTest/[46].ResolvePendingEntryThenChangeLookupClassAgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "AgentVoqSwitchTest.trapPktsOnPort$" + }, { "test_name_regex": "AgentCoppTest/0.UnresolvedRoutesToLowPriQueue$" }, @@ -4993,9 +6108,6 @@ { "test_name_regex": "AgentVoqSwitchInterruptTest.*$" }, - { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.systemPortScaleTest$" - }, { "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteNeighborWithEcmpGroup$" }, @@ -5008,6 +6120,15 @@ { "test_name_regex": "warm_boot.AgentVoqSwitchLineRateTest.creditsDeleted$" }, + { + "test_name_regex": "warm_boot.AgentTrafficPfcTest.verifyBufferPoolWatermarks$" + }, + { + "test_name_regex": "warm_boot.AgentVoqSwitchWithFabricPortsTest.fdrCellDrops$" + }, + { + "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + }, { "test_name_regex": "Agent2QueueToOlympicQoSTest.verifyDscpToQueueMapping$" }, @@ -5021,10 +6142,10 @@ "test_name_regex": "AgentPortBandwidthPpsTest.VerifyPpsDynamicChanges$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + "test_name_regex": "AgentNeighborTest[46].ResolvePendingEntryThenChangeLookupClass$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteAndLocalLoadBalance$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" } ], "brcm/12.0_ea_dnx_odp/12.0_ea_dnx_odp/ramon/mono": [ @@ -5079,6 +6200,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5109,6 +6233,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -5163,6 +6290,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5193,6 +6323,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -5229,6 +6362,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -5297,6 +6454,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5327,6 +6487,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -5393,6 +6556,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5423,6 +6589,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -5459,6 +6628,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentPrbsTest.*$" } @@ -5515,6 +6708,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5545,6 +6741,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -5599,6 +6798,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5629,6 +6831,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -5665,6 +6870,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -5733,6 +6962,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5763,6 +6995,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -5829,6 +7064,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5859,6 +7097,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -5895,6 +7136,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentPrbsTest.*$" } @@ -6005,6 +7270,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6035,6 +7303,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -6089,6 +7360,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6119,6 +7393,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -6155,6 +7432,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -6179,6 +7480,9 @@ { "test_name_regex": "AgentSflowMirrorTestV6.*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentIngressPortErspanMirroringTruncateTest/[01].TrucatePortErspanMirror$" }, @@ -6313,6 +7617,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6343,6 +7650,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -6409,6 +7719,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6439,6 +7752,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -6475,6 +7791,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentIngressPortErspanMirroringTest/1.ErspanPortMirror$" }, @@ -6487,6 +7827,9 @@ { "test_name_regex": "AgentSflowMirrorTestV6.*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentIngressPortErspanMirroringTruncateTest/[01].TrucatePortErspanMirror$" }, @@ -6570,6 +7913,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6600,6 +7946,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -6654,6 +8003,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6684,6 +8036,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -6720,6 +8075,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -6808,10 +8187,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -6875,6 +8251,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6905,6 +8284,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -6971,6 +8353,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -7001,6 +8386,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -7037,6 +8425,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentLoadBalancerTestV4InMplsPhp.*$" }, @@ -7113,10 +8525,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -7208,10 +8617,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -7273,6 +8679,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -7303,6 +8712,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -7357,6 +8769,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -7387,6 +8802,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -7406,22 +8824,46 @@ "test_name_regex": "AgentMacSwLearningModeTest.VerifyNbrMacInL2Table$" }, { - "test_name_regex": "AgentMacLearningStaticEntriesTest.VerifyStaticDynamicTransformations$" + "test_name_regex": "AgentMacLearningStaticEntriesTest.VerifyStaticDynamicTransformations$" + }, + { + "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" + }, + { + "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" + }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" }, { - "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" }, { - "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" }, { - "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" }, { - "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" }, { - "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" @@ -7537,10 +8979,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -7602,6 +9041,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -7632,6 +9074,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -7698,6 +9143,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -7728,6 +9176,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -7764,6 +9215,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentAqmTest.verifyEcnWithoutWredConfig$" }, @@ -7886,6 +9361,12 @@ { "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" + }, { "test_name_regex": "AgentDeepPacketInspectionTest.*$" }, @@ -7985,6 +9466,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -8015,6 +9499,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" } @@ -8135,267 +9622,58 @@ "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, { - "test_name_regex": "AgentDeepPacketInspectionTest.*$" - }, - { - "test_name_regex": "AgentRouteCounterOverflowTest.*$" - }, - { - "test_name_regex": "AgentDiagShellStressTest.stressDiagCmds$" - }, - { - "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" - }, - { - "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" - }, - { - "test_name_regex": "AgentIngressAclSpanMirroringTest/[01].SpanAclMirror$" - }, - { - "test_name_regex": "AgentIngressAclErspanMirroringTest/[01].ErspanAclMirror$" - }, - { - "test_name_regex": "AgentEgressPortSpanMirroringTest/[01].*$" - }, - { - "test_name_regex": "AgentEgressPortErspanMirroringTest/[01].*$" - }, - { - "test_name_regex": "AgentEgressAclSpanMirroringTest/[01].*$" - }, - { - "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" - }, - { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentQueuePerHostRouteTest/[01].VerifyHostToQueueMappingClassIDBlock$" - }, - { - "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalMcastToMidPriQ$" - }, - { - "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" - }, - { - "test_name_regex": "AgentEgressPortErspanMirroringTruncateTest/[01].*$" - }, - { - "test_name_regex": "AgentHwAclStatTest.*$" - }, - { - "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastIpNetworkControlDscpToHighPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].L3MTUErrorToLowPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].DhcpPacketToMidPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/0.VerifyCoppPpsLowPri$" - }, - { - "test_name_regex": "AgentOlympicQosSchedulerTest.VerifyWRRForOlympicToOlympicV2$" - }, - { - "test_name_regex": "AgentOlympicV2SPToWRRQosSchedulerTest.VerifyOlympicV2AllSPTrafficToWRR$" - }, - { - "test_name_regex": "AgentUdfAclCounterTest.*$" - }, - { - "test_name_regex": "AgentFlowlet.*$" - }, - { - "test_name_regex": "AgentCoppQosTest.HighVsLowerPriorityCpuQueueTrafficPrioritization$" - }, - { - "test_name_regex": "AgentCoppQueueStuckTest.CpuQueueHighRateTraffic$" - }, - { - "test_name_regex": "AgentPacketFloodTest.*$" - }, - { - "test_name_regex": "AgentMacLearningMacMoveTest.*$" - }, - { - "test_name_regex": "AgentMacLearningBatchEntriesTest.*$" - }, - { - "test_name_regex": "AgentSflowMirrorTestV[46].*$" - }, - { - "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" - }, - { - "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForTrunk$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifyHwLearningForPort$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifyHwLearningForTrunk$" - }, - { - "test_name_regex": "AgentIngressEgress.*$" - }, - { - "test_name_regex": "AgentIngressAclSpanMirroringTest.*$" - }, - { - "test_name_regex": "AgentIngressAclErspanMirroringTest.*$" - }, - { - "test_name_regex": "AgentEgressAclSpanMirroringTest.*$" - }, - { - "test_name_regex": "AgentEgressAclErspanMirroringTest.*$" - }, - { - "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" - }, - { - "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" - }, - { - "test_name_regex": "AgentRouteOverflowTest.overflowRoutes$" - }, - { - "test_name_regex": "warm_boot.AgentInNullRouteDiscardsCounterTest.nullRouteHit$" - }, - { - "test_name_regex": "warm_boot.AgentRouteCounterOverflowTest.overflowRouteCounters$" - }, - { - "test_name_regex": "warm_boot.AgentMacLearningAndNeighborResolutionTest/[01].learnMacProgramNeighborsAndAgeMac$" - } - ], - "leaba/1.65.1/1.65.1/gibraltar/mono": [ - { - "test_name_regex": "AgentInNullRouteDiscardsCounterTest.nullRouteHit$" - }, - { - "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastToMidPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].NdpSolicitNeighbor$" - }, - { - "test_name_regex": "AgentCoppTest/[01].NdpSolicitationToHighPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].CpuPortIpv6LinkLocalUcastIp$" - }, - { - "test_name_regex": "AgentQueuePerHostTest.*$" - }, - { - "test_name_regex": "AgentQueuePerHostL2Test.VerifyHostToQueueMappingClassID$" - }, - { - "test_name_regex": "AgentQueuePerHostRouteTest/[01].VerifyHostToQueueMappingClassID$" - }, - { - "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/0$" - }, - { - "test_name_regex": "warm_boot.AgentMacLearningTest.VerifyHwAgingForTrunk$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifySwToHw.*$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifyHwToSw.*$" - }, - { - "test_name_regex": "warm_boot.AgentMacSwLearningModeTest.VerifyCallbacksOnMacEntryChange$" - }, - { - "test_name_regex": "warm_boot.AgentMacSwLearningModeTest.VerifySwAgingForPort$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifyMacLearningScale$" - }, - { - "test_name_regex": "AgentPacketSendTest.PortTxEnableTest$" + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" }, { - "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" - }, - { - "test_name_regex": "AgentCoppTest/[01].NdpAdvertisementToHighPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].Ttl1PacketToLowPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].JumboFramesToQueues$" - }, - { - "test_name_regex": "AgentCoppTest/[01].UnresolvedRoutesToLowPriQueue$" - }, - { - "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalMcastNetworkControlDscpToHighPriQ$" + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" }, { - "test_name_regex": "AgentDscpMarkingTest.VerifyDscpMarking$" + "test_name_regex": "AgentDeepPacketInspectionTest.*$" }, { - "test_name_regex": "AgentAclConflictAndDscpQueueMappingTest.VerifyAclAndQosMapConflict$" + "test_name_regex": "AgentRouteCounterOverflowTest.*$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclIcmp4Qualifiers$" + "test_name_regex": "AgentDiagShellStressTest.stressDiagCmds$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclIcmp6Qualifiers$" + "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclIp4TcpQualifiers$" + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclIp6TcpQualifiers$" + "test_name_regex": "AgentIngressAclSpanMirroringTest/[01].SpanAclMirror$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclModifyQualifier$" + "test_name_regex": "AgentIngressAclErspanMirroringTest/[01].ErspanAclMirror$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclEmptyCodeIcmp$" + "test_name_regex": "AgentEgressPortSpanMirroringTest/[01].*$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" + "test_name_regex": "AgentEgressPortErspanMirroringTest/[01].*$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatCreateShared$" + "test_name_regex": "AgentEgressAclSpanMirroringTest/[01].*$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatDeleteShared$" + "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatRenameShared$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentQueuePerHostRouteTest/[01].VerifyHostToQueueMappingClassIDBlock$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatCreateMultiple$" + "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalMcastToMidPriQ$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatShuffle$" + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" + "test_name_regex": "AgentEgressPortErspanMirroringTruncateTest/[01].*$" }, { - "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" + "test_name_regex": "AgentHwAclStatTest.*$" }, { "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" @@ -8448,6 +9726,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -8479,10 +9760,25 @@ "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" + "test_name_regex": "AgentPortBandwidthTest.*$" + }, + { + "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" + }, + { + "test_name_regex": "AgentRouteOverflowTest.overflowRoutes$" + }, + { + "test_name_regex": "warm_boot.AgentInNullRouteDiscardsCounterTest.nullRouteHit$" + }, + { + "test_name_regex": "warm_boot.AgentRouteCounterOverflowTest.overflowRouteCounters$" + }, + { + "test_name_regex": "warm_boot.AgentMacLearningAndNeighborResolutionTest/[01].learnMacProgramNeighborsAndAgeMac$" } ], - "leaba/1.65.1/1.65.1/gibraltar/multi_switch": [ + "leaba/1.65.1/1.65.1/gibraltar/mono": [ { "test_name_regex": "AgentInNullRouteDiscardsCounterTest.nullRouteHit$" }, @@ -8597,6 +9893,12 @@ { "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" + }, { "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" }, @@ -8651,6 +9953,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -8682,22 +9987,13 @@ "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, { - "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" - }, - { - "test_name_regex": "AgentRouteOverflowTest.overflowRoutes$" - }, - { - "test_name_regex": "warm_boot.AgentInNullRouteDiscardsCounterTest.nullRouteHit$" - }, - { - "test_name_regex": "warm_boot.AgentRouteCounterOverflowTest.overflowRouteCounters$" + "test_name_regex": "AgentPortBandwidthTest.*$" }, { - "test_name_regex": "warm_boot.AgentMacLearningAndNeighborResolutionTest/[01].learnMacProgramNeighborsAndAgeMac$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" } ], - "leaba/24.4.90/24.4.90/gibraltar/mono": [ + "leaba/1.65.1/1.65.1/gibraltar/multi_switch": [ { "test_name_regex": "AgentInNullRouteDiscardsCounterTest.nullRouteHit$" }, @@ -8812,6 +10108,12 @@ { "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" + }, { "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" }, @@ -8866,6 +10168,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -8897,10 +10202,25 @@ "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" + "test_name_regex": "AgentPortBandwidthTest.*$" + }, + { + "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" + }, + { + "test_name_regex": "AgentRouteOverflowTest.overflowRoutes$" + }, + { + "test_name_regex": "warm_boot.AgentInNullRouteDiscardsCounterTest.nullRouteHit$" + }, + { + "test_name_regex": "warm_boot.AgentRouteCounterOverflowTest.overflowRouteCounters$" + }, + { + "test_name_regex": "warm_boot.AgentMacLearningAndNeighborResolutionTest/[01].learnMacProgramNeighborsAndAgeMac$" } ], - "leaba/24.4.90/24.4.90/gibraltar/multi_switch": [ + "leaba/24.4.90/24.4.90/gibraltar/mono": [ { "test_name_regex": "AgentInNullRouteDiscardsCounterTest.nullRouteHit$" }, @@ -9015,6 +10335,12 @@ { "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" + }, { "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" }, @@ -9069,6 +10395,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -9100,82 +10429,46 @@ "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, { - "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" - }, - { - "test_name_regex": "AgentRouteOverflowTest.overflowRoutes$" - }, - { - "test_name_regex": "warm_boot.AgentInNullRouteDiscardsCounterTest.nullRouteHit$" - }, - { - "test_name_regex": "warm_boot.AgentRouteCounterOverflowTest.overflowRouteCounters$" + "test_name_regex": "AgentPortBandwidthTest.*$" }, { - "test_name_regex": "warm_boot.AgentMacLearningAndNeighborResolutionTest/[01].learnMacProgramNeighborsAndAgeMac$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" } ], - "leaba/24.6.1._yuba/24.6.1_yuba/graphene200/mono": [ - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV4MplsFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV4MplsPhpFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV4MplsSwapFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6MplsFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6MplsPhpFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6MplsSwapFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV4MplsFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV4MplsPhpFrontPanelTraffic$" - }, + "leaba/24.4.90/24.4.90/gibraltar/multi_switch": [ { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV4MplsSwapFrontPanelTraffic$" + "test_name_regex": "AgentInNullRouteDiscardsCounterTest.nullRouteHit$" }, { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV6MplsFrontPanelTraffic$" + "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastToMidPriQ$" }, { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV6MplsPhpFrontPanelTraffic$" + "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" }, { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV6MplsSwapFrontPanelTraffic$" + "test_name_regex": "AgentCoppTest/[01].NdpSolicitNeighbor$" }, { - "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastToMidPriQ$" + "test_name_regex": "AgentCoppTest/[01].NdpSolicitationToHighPriQ$" }, { - "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" + "test_name_regex": "AgentCoppTest/[01].CpuPortIpv6LinkLocalUcastIp$" }, { - "test_name_regex": "AgentCoppTest/[01].NdpSolicitationToHighPriQ$" + "test_name_regex": "AgentQueuePerHostTest.*$" }, { - "test_name_regex": "AgentCoppTest/[01].NdpSolicitationToHighPriQ$" + "test_name_regex": "AgentQueuePerHostL2Test.VerifyHostToQueueMappingClassID$" }, { - "test_name_regex": "AgentCoppTest/1.UnresolvedRoutesToLowPriQueue$" + "test_name_regex": "AgentQueuePerHostRouteTest/[01].VerifyHostToQueueMappingClassID$" }, { - "test_name_regex": "AgentCoppTest/[01].CpuPortIpv6LinkLocalUcastIp$" + "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/0$" }, { "test_name_regex": "warm_boot.AgentMacLearningTest.VerifyHwAgingForTrunk$" }, - { - "test_name_regex": "cold_boot.AgentMacSwLearningModeTest.VerifyCallbacksOnMacEntryChange$" - }, { "test_name_regex": "AgentMacLearningTest.VerifySwToHw.*$" }, @@ -9183,7 +10476,7 @@ "test_name_regex": "AgentMacLearningTest.VerifyHwToSw.*$" }, { - "test_name_regex": "warm_boot.AgentMacLearningTest.VerifyHwAgingForTrunk$" + "test_name_regex": "warm_boot.AgentMacSwLearningModeTest.VerifyCallbacksOnMacEntryChange$" }, { "test_name_regex": "warm_boot.AgentMacSwLearningModeTest.VerifySwAgingForPort$" @@ -9192,28 +10485,31 @@ "test_name_regex": "AgentMacLearningTest.VerifyMacLearningScale$" }, { - "test_name_regex": "AgentIngressAclSpanMirroringTest/[01].SpanAclMirror$" + "test_name_regex": "AgentPacketSendTest.PortTxEnableTest$" }, { - "test_name_regex": "AgentIngressAclErspanMirroringTest/[01].ErspanAclMirror$" + "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" }, { - "test_name_regex": "AgentEgressAclSpanMirroringTest/[01].*$" + "test_name_regex": "AgentCoppTest/[01].NdpAdvertisementToHighPriQ$" }, { - "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" + "test_name_regex": "AgentCoppTest/[01].Ttl1PacketToLowPriQ$" }, { - "test_name_regex": "AgentInNullRouteDiscardsCounterTest.nullRouteHit$" + "test_name_regex": "AgentCoppTest/[01].JumboFramesToQueues$" }, { - "test_name_regex": "warm_boot.AgentPacketSendTest.PortTxEnableTest$" + "test_name_regex": "AgentCoppTest/[01].UnresolvedRoutesToLowPriQueue$" }, { - "test_name_regex": "warm_boot.AgentPortBandwidthTest.VerifyQueueShaper$" + "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalMcastNetworkControlDscpToHighPriQ$" }, { - "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + "test_name_regex": "AgentDscpMarkingTest.VerifyDscpMarking$" + }, + { + "test_name_regex": "AgentAclConflictAndDscpQueueMappingTest.VerifyAclAndQosMapConflict$" }, { "test_name_regex": "AgentHwAclQualifierTest.AclIcmp4Qualifiers$" @@ -9246,22 +10542,22 @@ "test_name_regex": "AgentHwAclStatTest.AclStatRenameShared$" }, { - "test_name_regex": "warm_boot.AgentHwAclStatTest.AclStatDelete$" + "test_name_regex": "AgentHwAclStatTest.AclStatCreateMultiple$" }, { - "test_name_regex": "warm_boot.AgentHwAclStatTest.AclStatRename$" + "test_name_regex": "AgentHwAclStatTest.AclStatShuffle$" }, { - "test_name_regex": "warm_boot.AgentHwAclStatTest.StatNumberOfCounters$" + "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatCreateMultiple$" + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatShuffle$" + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" + "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" }, { "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" @@ -9314,6 +10610,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -9344,6 +10643,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -9475,6 +10777,39 @@ { "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" + }, + { + "test_name_regex": "AgentAclAndDscpQueueMappingTest.VerifyAclAndQosMap$" + }, + { + "test_name_regex": "AgentCoppTest/1.VerifyCoppPpsLowPri$" + }, + { + "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + }, + { + "test_name_regex": "AgentDiagShellStressTest.stressDiagCmds$" + }, + { + "test_name_regex": "AgentEgressPortErspanMirroringTruncateTest/[01].*$" + }, + { + "test_name_regex": "AgentHgridUuRouteScaleTest.hgridUuScaleTest$" + }, + { + "test_name_regex": "AgentHundredThousandRouteScaleTest.hundredThousandRouteScaleTest$" + }, + { + "test_name_regex": "AgentL4PortBlackHolingTest.*$" + }, + { + "test_name_regex": "AgentPortBandwidthTest.VerifyKbps$" + }, { "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" }, @@ -9529,6 +10864,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -9559,6 +10897,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" } @@ -9678,6 +11019,39 @@ { "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" + }, + { + "test_name_regex": "AgentAclAndDscpQueueMappingTest.VerifyAclAndQosMap$" + }, + { + "test_name_regex": "AgentCoppTest/1.VerifyCoppPpsLowPri$" + }, + { + "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + }, + { + "test_name_regex": "AgentDiagShellStressTest.stressDiagCmds$" + }, + { + "test_name_regex": "AgentEgressPortErspanMirroringTruncateTest/[01].*$" + }, + { + "test_name_regex": "AgentHgridUuRouteScaleTest.hgridUuScaleTest$" + }, + { + "test_name_regex": "AgentHundredThousandRouteScaleTest.hundredThousandRouteScaleTest$" + }, + { + "test_name_regex": "AgentL4PortBlackHolingTest.*$" + }, + { + "test_name_regex": "AgentPortBandwidthTest.VerifyKbps$" + }, { "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" }, @@ -9732,6 +11106,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -9762,6 +11139,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, From 295f7c6d1817dc5d802ae8543b4681e881d2e2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Olguy=20Can=C3=A9us?= Date: Wed, 23 Oct 2024 22:12:33 -0700 Subject: [PATCH 300/479] changing path to fw_ver Summary: same as title. I was able to find all the fw_ver path Reviewed By: rationalis Differential Revision: D64878724 fbshipit-source-id: eb13ae1a5cebb9dcee81c6cb037798ae64289ac5 --- fboss/platform/configs/meru800bia/fw_util.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fboss/platform/configs/meru800bia/fw_util.json b/fboss/platform/configs/meru800bia/fw_util.json index 09bce8a2de335..0ef146deb642b 100644 --- a/fboss/platform/configs/meru800bia/fw_util.json +++ b/fboss/platform/configs/meru800bia/fw_util.json @@ -11,21 +11,21 @@ }, "scm_cpld": { "preUpgradeCmd": "", - "getVersionCmd": "cpu_cpld_ver=$((`cat /run/devmap/fpgas/MERU_SCM_CPLD/fpga_ver`));cpu_cpld_subver=$((`cat /run/devmap/fpgas/MERU_SCM_CPLD/fpga_sub_ver`));echo $cpu_cpld_ver'.'$cpu_cpld_subver", + "getVersionCmd": "cat /run/devmap/fpgas/MERU_SCM_CPLD/fw_ver", "priority": 3, "upgradeCmd": "cpu_cpld_filename=$(head -n 1 /home/scm_cpld_filename.txt);jam -aprogram -fmeru_cpu_cpld -v $cpu_cpld_filename", "postUpgradeCmd": "" }, "smb_fpga": { "preUpgradeCmd": "printf '0:3FFFFF image' > /home/smb_fpga_layout;modprobe spidev;fpga_spidev=$(echo $(ls /run/devmap/fpgas/MERU800BIA_SMB_FPGA/*spi*/spi_master/spi* | grep spi*.*) | cut -c 4-);echo 'spidev' > /sys/bus/spi/devices/spi$fpga_spidev/driver_override;echo spi$fpga_spidev > /sys/bus/spi/drivers/spidev/bind;flashrom -p linux_spi:dev=/dev/spidev$fpga_spidev > /home/flashrom_output;(grep 'MT25QL256' /home/flashrom_output && echo 'MT25QL256' > /home/flash_chip_name) || (grep 'MX25L25635F' /home/flashrom_output && echo 'MX25L25635F/MX25L25645G' > /home/flash_chip_name) || echo 'NONE' > /home/flash_chip_name", - "getVersionCmd": "smb_fpga_ver=$((`cat /run/devmap/fpgas/MERU800BIA_SMB_FPGA/fpga_ver`));smb_fpga_subver=$((`cat /run/devmap/fpgas/MERU800BIA_SMB_FPGA/fpga_sub_ver`));echo $smb_fpga_ver'.'$smb_fpga_subver", + "getVersionCmd": "cat /run/devmap/fpgas/MERU800BIA_SMB_FPGA/fw_ver", "priority": 2, "upgradeCmd": "smb_fpga_binary_name=$(head -n 1 /home/smb_fpga_filename.txt);fpga_spidev=$(echo $(ls /run/devmap/fpgas/MERU800BIA_SMB_FPGA/*spi*/spi_master/spi* | grep spi*.*) | cut -c 4-);chip=$(head -n 1 /home/flash_chip_name);if [ $chip = 'NONE' ];then cmd_chip_option='' cmd_chip_name='';else cmd_chip_option='-c' cmd_chip_name=$chip;fi;flashrom -p linux_spi:dev=/dev/spidev$fpga_spidev $cmd_chip_option $cmd_chip_name -l /home/smb_fpga_layout -i image -w $smb_fpga_binary_name", "postUpgradeCmd": "rm /home/smb_fpga_layout; rm /home/flash_chip_name" }, "fan_cpld": { "preUpgradeCmd": "echo 1 > /run/devmap/fpgas/MERU_SCM_CPLD/switch_jtag_enable", - "getVersionCmd": "fan_cpld_ver=$((10#`cat /run/devmap/cplds/FAN_CPLD/hwmon/hwmon*/cpld_ver`));fan_cpld_subver=$((10#`cat /run/devmap/cplds/FAN_CPLD/hwmon/hwmon*/cpld_sub_ver`));echo $fan_cpld_ver'.'$fan_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/FAN_CPLD/hwmon/hwmon*/fw_ver", "priority": 1, "upgradeCmd": "fan_cpld_filename=$(head -n 1 /home/fan_cpld_filename.txt);jam -aprogram -fmeru_fan_cpld -v $fan_cpld_filename", "postUpgradeCmd": "" From c8ac3995092fb399e7e55c1f57acec3198bb7904 Mon Sep 17 00:00:00 2001 From: Harshit Gulati Date: Thu, 24 Oct 2024 00:50:21 -0700 Subject: [PATCH 301/479] Refresh transceivers after they become ready Summary: This issue was found while debugging the OpticsTest.verifyTxRxLatches flakiness. Turns out that certain 400G transceivers sometimes report an invalid media type while they are not ready. We release the modules from low power mode and wait till they become ready before programming them. Because the media type is invalid, numHostLanes and numMediaLanes return 0 which causes failures during port programming. The fix here is to refresh the transceiver cache after the module becomes ready. That way whatever happens after this step will see the updated data. Reviewed By: srikrishnagopu Differential Revision: D64875001 Privacy Context Container: L1125642 fbshipit-source-id: 168f5f3b7abff7fa7d22945ebb295681178719fe --- fboss/agent/test/link_tests/OpticsTest.cpp | 8 ++++++++ fboss/qsfp_service/module/QsfpModule.cpp | 12 +++++++++++- .../test/TransceiverStateMachineTest.cpp | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/fboss/agent/test/link_tests/OpticsTest.cpp b/fboss/agent/test/link_tests/OpticsTest.cpp index 7985ed31214f9..9305c3f669ffc 100644 --- a/fboss/agent/test/link_tests/OpticsTest.cpp +++ b/fboss/agent/test/link_tests/OpticsTest.cpp @@ -174,6 +174,14 @@ TEST_F(OpticsTest, verifyTxRxLatches) { auto& tcvrState = *tcvrInfoInfoItr->second.tcvrState(); auto mediaInterface = tcvrState.moduleMediaInterface().value_or({}); + ASSERT_EVENTUALLY_TRUE( + cachedHostLanes.find(portName) != cachedHostLanes.end()) + << folly::sformat( + "Port {} not found in cachedHostLanes", portName); + ASSERT_EVENTUALLY_TRUE( + cachedMediaLanes.find(portName) != cachedMediaLanes.end()) + << folly::sformat( + "Port {} not found in cachedMediaLanes", portName); auto& hostLanes = cachedHostLanes.at(portName); auto& mediaLanes = cachedMediaLanes.at(portName); auto& hostLaneSignals = *tcvrState.hostLaneSignals(); diff --git a/fboss/qsfp_service/module/QsfpModule.cpp b/fboss/qsfp_service/module/QsfpModule.cpp index c217d7bbe5a26..4e0a467d6f2fc 100644 --- a/fboss/qsfp_service/module/QsfpModule.cpp +++ b/fboss/qsfp_service/module/QsfpModule.cpp @@ -1419,7 +1419,17 @@ bool QsfpModule::readyTransceiver() { // Check the transceiver power configuration state and then return // accordingly. This function's implementation is dependent on optics // type (Cmis, Sff etc) - return ensureTransceiverReadyLocked(); + if (ensureTransceiverReadyLocked()) { + // After the transceiver is ready, update the cache with the latest + // data. Some modules report inconsistent data while the module is not + // ready, which fails the subsequent calls to program transceiver. Thus + // ensure that the cache is updated for all the subsequent operations + QSFP_LOG(INFO, this) << "Transceiver is ready, updating cache"; + updateQsfpData(false); + return true; + } else { + return false; + } } else { // If module is not present then don't block state machine transition // and return true diff --git a/fboss/qsfp_service/test/TransceiverStateMachineTest.cpp b/fboss/qsfp_service/test/TransceiverStateMachineTest.cpp index c0ce0c0c23d09..bdcc8f20b65e1 100644 --- a/fboss/qsfp_service/test/TransceiverStateMachineTest.cpp +++ b/fboss/qsfp_service/test/TransceiverStateMachineTest.cpp @@ -1567,7 +1567,7 @@ TEST_F(TransceiverStateMachineTest, remediateCmisTransceiverFailed) { // Expect updateQsfpData and updateCachedTransceiverInfoLocked to be // called from refreshStateMachines() we do in verify() below EXPECT_CALL(*mockXcvr, updateQsfpData(true)).Times(1); - EXPECT_CALL(*mockXcvr, updateQsfpData(false)).Times(2); + EXPECT_CALL(*mockXcvr, updateQsfpData(false)).Times(3); EXPECT_CALL(*mockXcvr, updateCachedTransceiverInfoLocked(::testing::_)) .Times(2) .InSequence(s); @@ -2084,7 +2084,7 @@ TEST_F(TransceiverStateMachineTest, reseatTransceiver) { // valid MockCmisModule* mockXcvr = static_cast(xcvr_); ::testing::Sequence s; - EXPECT_CALL(*mockXcvr, updateQsfpData(false)).Times(2); + EXPECT_CALL(*mockXcvr, updateQsfpData(false)).Times(3); EXPECT_CALL(*mockXcvr, updateCachedTransceiverInfoLocked(::testing::_)) .Times(2); setProgramCmisModuleExpectation(true); From 45fa3b9225f9de21358c3fbad31dd9956b7310c0 Mon Sep 17 00:00:00 2001 From: Alex Hornby Date: Thu, 24 Oct 2024 01:49:45 -0700 Subject: [PATCH 302/479] get mononoke green in github CI Summary: X-link: https://github.com/facebookincubator/zstrong/pull/1018 * test-cross-repo-mononoke-git-sot.t deleted, remove from exclusion list * exclude flaky integration tests changes done to make this easier: * python-click wasn't found in sapling dir, added package mappings for rpm and deb so that we can pick up the installed version * add a bit more info to the "unknown python exception" message from hg * reduce paths set by getdeps, no point listing non-existing dir, makes it easier to see what is happening X-link: https://github.com/facebook/sapling/pull/974 Reviewed By: quark-zju Differential Revision: D64827811 Pulled By: ahornby fbshipit-source-id: 82b4fa224d8ce957ef85e5ecf1e220f71c93e6c4 --- build/fbcode_builder/getdeps/buildopts.py | 14 ++++++++------ build/fbcode_builder/manifests/python-click | 6 ++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/build/fbcode_builder/getdeps/buildopts.py b/build/fbcode_builder/getdeps/buildopts.py index b315c175b8abc..8a9c9a99ddea4 100644 --- a/build/fbcode_builder/getdeps/buildopts.py +++ b/build/fbcode_builder/getdeps/buildopts.py @@ -304,12 +304,14 @@ def compute_env_for_install_dirs( is_direct_dep = ( manifest is not None and m.name in manifest.get_dependencies(ctx) ) - self.add_prefix_to_env( - loader.get_project_install_dir(m), - env, - append=False, - is_direct_dep=is_direct_dep, - ) + d = loader.get_project_install_dir(m) + if os.path.exists(d): + self.add_prefix_to_env( + d, + env, + append=False, + is_direct_dep=is_direct_dep, + ) # Linux is always system openssl system_openssl = self.is_linux() diff --git a/build/fbcode_builder/manifests/python-click b/build/fbcode_builder/manifests/python-click index ea9a9d2d3dc38..cdf29c4d0c029 100644 --- a/build/fbcode_builder/manifests/python-click +++ b/build/fbcode_builder/manifests/python-click @@ -7,3 +7,9 @@ sha256 = dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc [build] builder = python-wheel + +[rpms] +python3-click + +[debs] +python3-click From 47a7df22178fba9228ea8020b97b0f0f0e0760b5 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 24 Oct 2024 01:50:30 -0700 Subject: [PATCH 303/479] Assert that local/remoteSystemPortOffset is set for interface nodes Summary: As titled. This does imply that for next push we must use coop built on top off D64812078 Reviewed By: srikrishnagopu Differential Revision: D64872159 Privacy Context Container: L1125642 fbshipit-source-id: 0e9714fd922ba2508fe507354916215bb4b2afb6 --- fboss/agent/ApplyThriftConfig.cpp | 6 ++++++ fboss/agent/state/DsfNode.cpp | 4 ++++ fboss/agent/state/DsfNode.h | 1 + 3 files changed, 11 insertions(+) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 263249c392fda..69a93df622204 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -1310,6 +1310,12 @@ std::shared_ptr ThriftConfigApplier::updateDsfNodes() { bool changed = false; for (const auto& idAndNode : *newNodes) { auto newNode = idAndNode.second; + if (newNode->isInterfaceNode() && + (!newNode->getLocalSystemPortOffset().has_value() || + !newNode->getGlobalSystemPortOffset().has_value())) { + throw FbossError( + "Local/Global system port offsets must be set for interface nodes"); + } auto origNode = origNodes->getNodeIf(newNode->getID()); if (!origNode || *origNode != *newNode) { changed |= true; diff --git a/fboss/agent/state/DsfNode.cpp b/fboss/agent/state/DsfNode.cpp index 7a920da27b672..9cb482d84f6e6 100644 --- a/fboss/agent/state/DsfNode.cpp +++ b/fboss/agent/state/DsfNode.cpp @@ -114,6 +114,10 @@ bool DsfNode::isLevel2FabricNode() const { return fabricLevel.has_value() && fabricLevel.value() == 2; } +bool DsfNode::isInterfaceNode() const { + return getType() == cfg::DsfNodeType::INTERFACE_NODE; +} + std::optional DsfNode::getLocalSystemPortOffset() const { std::optional ret; if (get().has_value()) { diff --git a/fboss/agent/state/DsfNode.h b/fboss/agent/state/DsfNode.h index 09ac110cd797f..943c875c14c3a 100644 --- a/fboss/agent/state/DsfNode.h +++ b/fboss/agent/state/DsfNode.h @@ -48,6 +48,7 @@ class DsfNode : public ThriftStructNode { void setGlobalSystemPortOffset(std::optional val); std::optional getFabricLevel() const; bool isLevel2FabricNode() const; + bool isInterfaceNode() const; private: // Inherit the constructors required for clone() From cf8a2132c8da184a28041aa858519eda22bdb78c Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Thu, 24 Oct 2024 05:09:58 -0700 Subject: [PATCH 304/479] Populate shared/sram PFC thresholds in buffer profile based on config Summary: As titled Reviewed By: jasmeetbagga Differential Revision: D64739014 fbshipit-source-id: e4bca3ad07707fd177f9b5dcdc506fdb1c775c9d --- fboss/agent/hw/sai/switch/SaiBufferManager.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp index 6ef797d800866..c3adaf3b2474d 100644 --- a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp @@ -623,17 +623,14 @@ SaiBufferManager::ingressProfileCreateAttrs( std::optional sramFadtXonOffset; #if defined(BRCM_SAI_SDK_DNX_GTE_11_0) - // use default 0 since this attribute currently only used by profile for - // cpu/eventor/rcy port queues - sharedFadtMaxTh = 0; + sharedFadtMaxTh = config.maxSharedXoffThresholdBytes().value_or(0); #endif // TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 #if defined(SAI_VERSION_11_3_0_0_DNX_ODP) - // TODO: Populate based on config - sharedFadtMinTh = 0; - sramFadtMaxTh = 0; - sramFadtMinTh = 0; - sramFadtXonOffset = 0; + sharedFadtMinTh = config.minSharedXoffThresholdBytes().value_or(0); + sramFadtMaxTh = config.maxSramXoffThresholdBytes().value_or(0); + sramFadtMinTh = config.minSramXoffThresholdBytes().value_or(0); + sramFadtXonOffset = config.sramResumeOffsetBytes().value_or(0); #endif return SaiBufferProfileTraits::CreateAttributes{ pool, From 615b8de426163740da00733e65375bc3cced5133 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Thu, 24 Oct 2024 05:09:58 -0700 Subject: [PATCH 305/479] Test changes to validate new thresholds added Summary: Add shared/sram configs to ensure the new attribute based programming is attempted and ensure HW is program as expected. Reviewed By: jasmeetbagga Differential Revision: D64772030 fbshipit-source-id: 43998bc94d96ef378df43195a4a2033215cb3413 --- fboss/agent/test/utils/PfcTestUtils.cpp | 44 ++++++++++++++----------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/fboss/agent/test/utils/PfcTestUtils.cpp b/fboss/agent/test/utils/PfcTestUtils.cpp index 737d764f736f3..41081e64ff84a 100644 --- a/fboss/agent/test/utils/PfcTestUtils.cpp +++ b/fboss/agent/test/utils/PfcTestUtils.cpp @@ -120,12 +120,10 @@ void setupBufferPoolConfig( } void setupPortPgConfig( + const facebook::fboss::AgentEnsemble* ensemble, std::map>& portPgConfigMap, const std::vector& losslessPgIds, - int pgLimit, - int pgHeadroom, - std::optional scalingFactor, - int resumeOffset) { + const PfcBufferParams& buffer) { std::vector portPgConfigs; // create 2 pgs for (auto pgId : losslessPgIds) { @@ -133,14 +131,26 @@ void setupPortPgConfig( pgConfig.id() = pgId; pgConfig.bufferPoolName() = "bufferNew"; // provide atleast 1 cell worth of minLimit - pgConfig.minLimitBytes() = pgLimit; + pgConfig.minLimitBytes() = buffer.pgLimit; // set large enough headroom to avoid drop - pgConfig.headroomLimitBytes() = pgHeadroom; + pgConfig.headroomLimitBytes() = buffer.pgHeadroom; // resume offset - pgConfig.resumeOffsetBytes() = resumeOffset; + if (ensemble->getHwAsicTable() + ->getHwAsics() + .cbegin() + ->second->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3) { + // Need to translate global config to shared thresholds + pgConfig.maxSharedXoffThresholdBytes() = buffer.globalShared; + pgConfig.minSharedXoffThresholdBytes() = buffer.globalShared; + // Set some default values for SRAM thresholds + pgConfig.maxSramXoffThresholdBytes() = 2048 * 16 * 256; + pgConfig.minSramXoffThresholdBytes() = 256 * 16 * 256; + pgConfig.sramResumeOffsetBytes() = 128 * 16 * 256; + } + pgConfig.resumeOffsetBytes() = buffer.resumeOffset; // set scaling factor - if (scalingFactor) { - pgConfig.scalingFactor() = *scalingFactor; + if (buffer.scalingFactor) { + pgConfig.scalingFactor() = *buffer.scalingFactor; } portPgConfigs.emplace_back(pgConfig); } @@ -157,14 +167,14 @@ void setupPortPgConfig( pgConfig.id() = pgId; pgConfig.bufferPoolName() = "bufferNew"; // provide atleast 1 cell worth of minLimit - pgConfig.minLimitBytes() = pgLimit; + pgConfig.minLimitBytes() = buffer.pgLimit; // headroom set 0 identifies lossy pgs pgConfig.headroomLimitBytes() = 0; // resume offset - pgConfig.resumeOffsetBytes() = resumeOffset; + pgConfig.resumeOffsetBytes() = buffer.resumeOffset; // set scaling factor - if (scalingFactor) { - pgConfig.scalingFactor() = *scalingFactor; + if (buffer.scalingFactor) { + pgConfig.scalingFactor() = *buffer.scalingFactor; } portPgConfigs.emplace_back(pgConfig); } @@ -185,13 +195,7 @@ void setupPfcBuffers( setupPfc(ensemble, cfg, ports, tcToPgOverride); std::map> portPgConfigMap; - setupPortPgConfig( - portPgConfigMap, - losslessPgIds, - buffer.pgLimit, - buffer.pgHeadroom, - buffer.scalingFactor, - buffer.resumeOffset); + setupPortPgConfig(ensemble, portPgConfigMap, losslessPgIds, buffer); cfg.portPgConfigs() = std::move(portPgConfigMap); // create buffer pool From 4ecc24a85ef92caf0157ce64e0a9a0d4b399a160 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Thu, 24 Oct 2024 05:09:58 -0700 Subject: [PATCH 306/479] Add config support for SRAM global PFC thresholds Summary: As titled. Differential Revision: D64853778 fbshipit-source-id: 27c6003d73bfdf144037fb8518b50b67ba402c56 --- fboss/agent/switch_config.thrift | 6 +++++ fboss/agent/switch_state.thrift | 3 +++ fboss/fsdb/if/oss/fsdb_model_thriftpath.h | 32 ++++++++++++++++++----- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/fboss/agent/switch_config.thrift b/fboss/agent/switch_config.thrift index ce11dbce4310a..11035aa7c5ff4 100644 --- a/fboss/agent/switch_config.thrift +++ b/fboss/agent/switch_config.thrift @@ -1691,6 +1691,12 @@ struct SwitchSettings { // When queue-per-host is enabled, MACs matching any OUI from this list could get any queue. 17: list metaMacOuis = []; 18: optional bool needL2EntryForNeighbor; + // Once the SRAM free buffers fall below this threshold, + // specified as a percent of total SRAM buffers, send XOFF. + 19: optional byte sramGlobalFreePercentXoffThreshold; + // Once the SRAM free buffers goes above this threshold, + // specified as a percent of total SRAM buffers, send XON. + 20: optional byte sramGlobalFreePercentXonThreshold; } // Global buffer pool diff --git a/fboss/agent/switch_state.thrift b/fboss/agent/switch_state.thrift index 1fe976af65993..21f1fe45c086c 100644 --- a/fboss/agent/switch_state.thrift +++ b/fboss/agent/switch_state.thrift @@ -390,6 +390,9 @@ struct SwitchSettingsFields { 42: Address.BinaryAddress icmpV4UnavailableSrcAddress; // Switch property of reachability group size, for the use of input balanced mode. 43: optional i32 reachabilityGroupListSize; + // SRAM global thresholds to send PFC XOFF/XON + 44: optional byte sramGlobalFreePercentXoffThreshold; + 45: optional byte sramGlobalFreePercentXonThreshold; } struct RoutePrefix { diff --git a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h index cd477e0b40084..b6af4ce9f2e3e 100755 --- a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h +++ b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h @@ -3106,7 +3106,9 @@ std::pair>, std::pair>, std::pair>, -std::pair>>; +std::pair>, +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::L2LearningMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::L2LearningMode>>>, std::pair, Child>, std::pair, Child>, @@ -3148,7 +3150,9 @@ std::pair, Child>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -3191,7 +3195,9 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -3239,6 +3245,8 @@ std::pair auto operator()(const std::integral_constant&) { @@ -3284,6 +3292,8 @@ std::pair @@ -13054,7 +13064,9 @@ std::pair>, std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; +std::pair>, +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::L2LearningMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::L2LearningMode>>>, std::pair, Child>, std::pair, Child>, @@ -13072,7 +13084,9 @@ std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child>>; + std::pair, Child>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -13091,7 +13105,9 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -13115,6 +13131,8 @@ std::pair auto operator()(const std::integral_constant&) { @@ -13136,6 +13154,8 @@ std::pair From f36743ed61678a061a3262b44686b0b75d2ed44a Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Thu, 24 Oct 2024 05:09:58 -0700 Subject: [PATCH 307/479] Add SRAM global PFC thresholds to switch state Summary: As titled, add set/get for SRAM global PFC thresholds. Reviewed By: zechengh09 Differential Revision: D64853780 fbshipit-source-id: fb3dfa24b3542426bbc4fb10bb61e6da75a3188e --- fboss/agent/state/SwitchSettings.h | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/fboss/agent/state/SwitchSettings.h b/fboss/agent/state/SwitchSettings.h index 1a833ea10c832..0fe60d19eb6d6 100644 --- a/fboss/agent/state/SwitchSettings.h +++ b/fboss/agent/state/SwitchSettings.h @@ -575,6 +575,42 @@ class SwitchSettings } } + std::optional getSramGlobalFreePercentXoffThreshold() const { + if (auto sramGlobalFreePercentXoffTh = + cref()) { + return sramGlobalFreePercentXoffTh->toThrift(); + } + return std::nullopt; + } + + void setSramGlobalFreePercentXoffThreshold( + std::optional sramGlobalFreePercentXoffTh) { + if (!sramGlobalFreePercentXoffTh) { + ref().reset(); + } else { + set( + *sramGlobalFreePercentXoffTh); + } + } + + std::optional getSramGlobalFreePercentXonThreshold() const { + if (auto sramGlobalFreePercentXonTh = + cref()) { + return sramGlobalFreePercentXonTh->toThrift(); + } + return std::nullopt; + } + + void setSramGlobalFreePercentXonThreshold( + std::optional sramGlobalFreePercentXonTh) { + if (!sramGlobalFreePercentXonTh) { + ref().reset(); + } else { + set( + *sramGlobalFreePercentXonTh); + } + } + SwitchSettings* modify(std::shared_ptr* state); private: From 8f4aa2229f0e9b6db8e7ce36f236ffea5fdd7632 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Thu, 24 Oct 2024 05:09:58 -0700 Subject: [PATCH 308/479] Set the new SRAM global PFC threshold in state from config Summary: Populate the SRAM global PFC threshold in state from config. Reviewed By: zechengh09 Differential Revision: D64853779 fbshipit-source-id: 028d5b9bda429ba0e072865f86a87df742cab8c4 --- fboss/agent/ApplyThriftConfig.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 69a93df622204..284319d079bd2 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -4454,6 +4454,30 @@ shared_ptr ThriftConfigApplier::updateSwitchSettings( switchSettingsChange = true; } + std::optional newSramGlobalFreePercentXoffThreshold; + if (cfg_->switchSettings()->sramGlobalFreePercentXoffThreshold()) { + newSramGlobalFreePercentXoffThreshold = + *cfg_->switchSettings()->sramGlobalFreePercentXoffThreshold(); + } + if (newSramGlobalFreePercentXoffThreshold != + origSwitchSettings->getSramGlobalFreePercentXoffThreshold()) { + newSwitchSettings->setSramGlobalFreePercentXoffThreshold( + newSramGlobalFreePercentXoffThreshold); + switchSettingsChange = true; + } + + std::optional newSramGlobalFreePercentXonThreshold; + if (cfg_->switchSettings()->sramGlobalFreePercentXonThreshold()) { + newSramGlobalFreePercentXonThreshold = + *cfg_->switchSettings()->sramGlobalFreePercentXonThreshold(); + } + if (newSramGlobalFreePercentXonThreshold != + origSwitchSettings->getSramGlobalFreePercentXonThreshold()) { + newSwitchSettings->setSramGlobalFreePercentXonThreshold( + newSramGlobalFreePercentXonThreshold); + switchSettingsChange = true; + } + if (origSwitchSettings->getSwitchDrainState() != *cfg_->switchSettings()->switchDrainState()) { auto numVoqSwtitches = From 8b50d78411e3dde85dedc15db3e995199ad774ab Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Thu, 24 Oct 2024 05:09:58 -0700 Subject: [PATCH 309/479] Set the SRAM global PFC threshold attributes based on config Summary: Set the SRAM global PFC threshold in HW based on the values received from config. Reviewed By: zechengh09 Differential Revision: D64853781 fbshipit-source-id: ee3f378d4bba47ebf76ba16822aac4483b2ee824 --- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 20 +++++++++++++++++++ .../agent/hw/sai/switch/SaiSwitchManager.cpp | 18 +++++++++++++++++ fboss/agent/hw/sai/switch/SaiSwitchManager.h | 2 ++ 3 files changed, 40 insertions(+) diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 650a7be97235a..ab872507285bc 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -1337,6 +1337,26 @@ void SaiSwitch::processSwitchSettingsChangeSansDrainedEntryLocked( newVal.has_value() ? newVal.value() : 0); } } + + { + const auto oldSramGlobalXoffTh = + oldSwitchSettings->getSramGlobalFreePercentXoffThreshold(); + const auto newSramGlobalXoffTh = + newSwitchSettings->getSramGlobalFreePercentXoffThreshold(); + if (oldSramGlobalXoffTh != newSramGlobalXoffTh) { + managerTable_->switchManager().setSramGlobalFreePercentXoffTh( + newSramGlobalXoffTh.value_or(0)); + } + + const auto oldSramGlobalXonTh = + oldSwitchSettings->getSramGlobalFreePercentXonThreshold(); + const auto newSramGlobalXonTh = + newSwitchSettings->getSramGlobalFreePercentXonThreshold(); + if (oldSramGlobalXonTh != newSramGlobalXonTh) { + managerTable_->switchManager().setSramGlobalFreePercentXonTh( + newSramGlobalXonTh.value_or(0)); + } + } } template diff --git a/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp index 6a5962c413fe6..63cffe61bf128 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp @@ -1008,4 +1008,22 @@ void SaiSwitchManager::setReachabilityGroupList(int reachabilityGroupListSize) { } #endif } + +void SaiSwitchManager::setSramGlobalFreePercentXoffTh( + uint8_t sramFreePercentXoffThreshold) { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + switch_->setOptionalAttribute( + SaiSwitchTraits::Attributes::SramFreePercentXoffTh{ + sramFreePercentXoffThreshold}); +#endif +} + +void SaiSwitchManager::setSramGlobalFreePercentXonTh( + uint8_t sramFreePercentXonThreshold) { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + switch_->setOptionalAttribute( + SaiSwitchTraits::Attributes::SramFreePercentXonTh{ + sramFreePercentXonThreshold}); +#endif +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/SaiSwitchManager.h b/fboss/agent/hw/sai/switch/SaiSwitchManager.h index c77dfe668422b..5981a8c9fd1d5 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitchManager.h +++ b/fboss/agent/hw/sai/switch/SaiSwitchManager.h @@ -103,6 +103,8 @@ class SaiSwitchManager { void setLocalCapsuleSwitchIds( const std::map& switchIdToNumCores); void setReachabilityGroupList(int reachabilityGroupListSize); + void setSramGlobalFreePercentXoffTh(uint8_t sramFreePercentXoffThreshold); + void setSramGlobalFreePercentXonTh(uint8_t sramFreePercentXonThreshold); private: void programEcmpLoadBalancerParams( From cb2d8b6d3e4ba07aaa5b53d7dac08ed99b584fc6 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Thu, 24 Oct 2024 09:34:29 -0700 Subject: [PATCH 310/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/50dd2de6fe2f98b899e6df6539733f56b4df2e74 https://github.com/facebook/fb303/commit/05db1baf2aad99a53a8f4bd741f04eeb2026f1d9 https://github.com/facebook/fbthrift/commit/a653fd8196f9720c406a594987e258c52c98e229 https://github.com/facebook/folly/commit/097a5bd8084d056e823d5389389a18ca963167d4 https://github.com/facebook/mvfst/commit/ae3552372f74fffda53423d2ef4d6db41e6ef9ad https://github.com/facebook/proxygen/commit/0e8c86a49890e4e9f70d631d11e308fcaac54c6c https://github.com/facebook/wangle/commit/5aefd05bf887bcbfc04a683b5f19ec35d2ab2048 https://github.com/facebookexperimental/edencommon/commit/0bfb5b1861df5a5beb2e7837707e4310b8c2c303 https://github.com/facebookexperimental/rust-shed/commit/5434f56302a6f48f908c0cbd4d2bbd4890b3710c https://github.com/facebookincubator/fizz/commit/d757c69b3446cc10b23044c3a51efbe270ad5aea Reviewed By: ajb85 fbshipit-source-id: 16d884c4dd529099fd5af8a817b92c1a8fa1b755 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 86edf9dec9d4b..c140cc34d806e 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 989cdd9ac964ce1133db7e56e91eab29dc5d8b96 +Subproject commit 05db1baf2aad99a53a8f4bd741f04eeb2026f1d9 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 57d4877e93739..b61246c0a57c6 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 1f56c0caa92a8d0366d50f33cd65a628b474c23e +Subproject commit a653fd8196f9720c406a594987e258c52c98e229 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index d50dccfd71da5..5d81ec01d205b 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 7cdb09f801fb4013c440a87455df898131a6c284 +Subproject commit 097a5bd8084d056e823d5389389a18ca963167d4 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 348e3b66aaf4f..fed31f107decb 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 1f365afdde61d781eb0d95a156e315049a1a85fe +Subproject commit 5aefd05bf887bcbfc04a683b5f19ec35d2ab2048 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 00dc2b89b226d..099c4abb14132 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 93f5504c7be6c97a2047384d9f439c208a907a47 +Subproject commit d757c69b3446cc10b23044c3a51efbe270ad5aea From c504d0ea5fc61f7da5d81a898318dcc75d02b3ae Mon Sep 17 00:00:00 2001 From: Xiang Xu Date: Thu, 24 Oct 2024 10:16:03 -0700 Subject: [PATCH 311/479] (4/N): Remove restartSessionsAndExit method from fboss2 CLI Summary: As titled. `restartSessionsAndExit` is the API BGP++ today opens to make it possible for one RPC call to send SIGTERM signal to BGP and restart the sessions. This is not ideal to open the door for a unnoticed RPC call to nuke the BGP daemon. This is the subsequent change to remove all of the call sites for this API after deprecating the cold-boot API change. For the BGP restarting use case, the operational tooling today will invoke this via `systemctl` cmd Reviewed By: shih-hao-tseng Differential Revision: D64873876 fbshipit-source-id: 1f1c867b19b7b5c818099a30f293a63c4e360e2b --- fboss/cli/fboss2/BUCK | 2 -- 1 file changed, 2 deletions(-) diff --git a/fboss/cli/fboss2/BUCK b/fboss/cli/fboss2/BUCK index d0571f9869e42..b9014e055a659 100644 --- a/fboss/cli/fboss2/BUCK +++ b/fboss/cli/fboss2/BUCK @@ -307,7 +307,6 @@ cpp_library( "commands/create/facebook/CmdCreateConfig.h", "commands/create/facebook/CmdCreateMirror.h", "commands/create/facebook/config/CmdCreateConfigPatcherAgent.h", - "commands/create/facebook/config/CmdCreateConfigPatcherBgp.h", "commands/create/facebook/config/CmdCreateConfigUtils.h", "commands/create/facebook/teflow/CmdCreateTeFlow.h", "commands/debug/facebook/CmdDebugUtils.h", @@ -321,7 +320,6 @@ cpp_library( "commands/debug/facebook/bgp/neighbors/CmdDebugBgpNeighborsShutdown.h", "commands/debug/facebook/bgp/neighbors/CmdDebugBgpNeighborsStart.h", "commands/delete/facebook/config/CmdDeleteConfigPatcherAgent.h", - "commands/delete/facebook/config/CmdDeleteConfigPatcherBgp.h", "commands/delete/facebook/config/CmdDeleteConfigUtils.h", "commands/facebook/rage/CmdRage.h", "commands/facebook/stream/CmdStreamDummy.h", From e39548a3c9475e51f89915f4d37d2374dc98e871 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 24 Oct 2024 12:06:11 -0700 Subject: [PATCH 312/479] Populate systemPortRanges in dsf node config for UTs Summary: As titled Reviewed By: zechengh09 Differential Revision: D64910541 Privacy Context Container: L1125642 fbshipit-source-id: be1c990347b53a79dc8a9119faddb47808499a0a --- fboss/agent/test/TestUtils.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/agent/test/TestUtils.cpp b/fboss/agent/test/TestUtils.cpp index 9ce45ea72cc54..7ec11dd7ec0d5 100644 --- a/fboss/agent/test/TestUtils.cpp +++ b/fboss/agent/test/TestUtils.cpp @@ -497,6 +497,7 @@ cfg::DsfNode makeDsfNodeCfg( dsfNodeCfg.nodeMac() = "02:00:00:00:0F:0B"; dsfNodeCfg.localSystemPortOffset() = *sysPortRange.minimum(); dsfNodeCfg.globalSystemPortOffset() = *sysPortRange.minimum(); + dsfNodeCfg.systemPortRanges()->systemPortRanges()->push_back(sysPortRange); } dsfNodeCfg.asicType() = asicType; dsfNodeCfg.platformType() = type == cfg::DsfNodeType::INTERFACE_NODE From 7225d7a528040544709f0635802e2f4cd0c13731 Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Thu, 24 Oct 2024 12:46:58 -0700 Subject: [PATCH 313/479] Fix undefined reference to undefined reference to `facebook::fboss::utils::createAgentClient Summary: Example failure OSS on-diff: https://www.internalfb.com/sandcastle/workflow/4544132024021604177 ``` FAILED: fboss2 : && /bin/c++ -Wall -Werror -Wno-sign-compare -Wno-maybe-uninitialized -Wno-deprecated-declarations -Os -DNDEBUG CMakeFiles/fboss2.dir/fboss/cli/fboss2/CmdGlobalOptions.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/CmdHandler.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/CmdHandlerImpl.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/CmdArgsLists.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/CmdList.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/CmdLocalOptions.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/commands/show/route/utils.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/CmdSubcommands.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/Main.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/oss/CmdGlobalOptions.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/oss/CmdList.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/utils/CmdUtils.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/utils/CLIParserUtils.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/utils/CmdClientUtils.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/utils/CmdUtilsCommon.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/utils/Table.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/utils/PrbsUtils.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/utils/oss/CmdClientUtils.cpp.o CMakeFiles/fboss2.dir/fboss/cli/fboss2/utils/oss/CmdUtils.cpp.o -o fboss2 -Wl,-rpath,/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/gflags-MpUYa6JSZ2Vmb6mnonoCMpeD9eP1eZkUKB9n9opwIrk/lib:/data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/glog-rMa35ZR65LheEDFExzR1XOLW0AhpfKaO1HgQBLpOEos/lib64: libtabulate.a libfb303_cpp2.a libctrl_cpp2.a libhw_ctrl_cpp2.a libqsfp_cpp2.a libphy_cpp2.a libled_service_types_cpp2.a libhardware_stats_cpp2.a libmka_structs_cpp2.a libfsdb_cpp2.a libfsdb_oper_cpp2.a libfsdb_model_cpp2.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/lib/libfolly.a libcli_model.a libshow_acl_model.a libshow_agent_model.a libshow_aggregateport_model.a libshow_arp_model.a libshow_flowlet_model.a libshow_dsf_subcription_model.a libshow_dsfnodes_model.a libshow_fabric_model.a libshow_fabric_reachability_model.a libshow_host_model.a libshow_lldp_model.a libshow_mirror_model.a libshow_ndp_model.a libshow_port_model.a libshow_product_model.a libshow_transceiver_model.a libshow_interface_model.a libshow_interface_flaps.a libshow_interface_errors.a libshow_interface_counters.a libshow_interface_counters_mka.a libshow_interface_traffic.a libshow_interface_status.a libshow_interface_phy.a libshow_interface_phymap.a libshow_interface_capabilities.a libshow_interface_prbs_capabilities.a libshow_interface_prbs_state.a libshow_interface_prbs_stats.a libshow_route_model.a libshow_mpls_route_model.a libshow_mac_model.a libshow_systemport_model.a libshow_cpuport_model.a libshow_teflow_model.a libshow_hwagent_status_model.a libshow_interface_counters_fec_ber.a libshow_interface_counters_fec_histogram.a libshow_interface_counters_fec_tail.a libshow_fabric_topology_model.a libshow_rif.a libshow_interface_counters_fec_uncorrectable.a /usr/lib64/libre2.so libled_structs_types_cpp2.a libpatch_cpp2.a libfsdb_common_cpp2.a libswitch_state_cpp2.a libctrl_cpp2.a libagent_stats_cpp2.a liboptic_cpp2.a libproduct_info_cpp2.a libagent_config_cpp2.a libplatform_config_cpp2.a libbcm_config_cpp2.a libasic_config_cpp2.a libasic_config_v2_cpp2.a libswitch_reachability_cpp2.a libqsfp_state_cpp2.a libqsfp_config_cpp2.a libtransceiver_validation_cpp2.a libqsfp_stats_cpp2.a libsensor_service_stats_cpp2.a libsensor_service_cpp2.a libsensor_config_cpp2.a libhardware_stats_cpp2.a libmka_structs_cpp2.a libshow_route_model.a libphy_cpp2.a libfb303_cpp2.a libfboss_cpp2.a libtransceiver_cpp2.a libprbs_cpp2.a liblink_cpp2.a libswitch_config_cpp2.a libcommon_cpp2.a libmpls_cpp2.a libnetwork_address_cpp2.a libfboss_common_cpp2.a libio_stats_cpp2.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftcpp2.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftfrozen2.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftmetadata.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftanyrep.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthrifttype.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftprotocol.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftprotocol.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libasync.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libruntime.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libtransport.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/librpcmetadata.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libconcurrency.a /lib64/libzstd.so /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/wangle/lib/libwangle.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthrift-core.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthrifttyperep.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftannotation.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libserverdbginfo.a /usr/lib64/libxxhash.so /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_server_async_tran.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_server.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_server_state.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_dsr_frontend.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_dsr_types.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_fizz_handshake.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_transport.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_buf_accessor.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_datagram_handler.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_batch_writer.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_cc_algo.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_codec_pktrebuilder.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_happyeyeballs.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_async_udp_socket.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_events.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_looper.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_observer.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_ack_handler.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_loss.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_pacing_functions.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_simple_frame_functions.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_functions.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_codec_pktbuilder.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_stream.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_flowcontrol.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_qlogger.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_stream_functions.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_state_machine.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_codec.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_handshake.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_codec_packet_number_cipher.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_codec_decode.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_codec_types.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_exception.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fizz/lib/libfizz.a /usr/lib64/libsodium.so /usr/lib64/libz.so /usr/lib64/librt.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/liboqs-0PprP4AWiV4mIM7P-Jw8q0DQzuy0QkG5mv9uKNS4z2s/lib64/liboqs.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_bufutil.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_transport_knobs.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_constants.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/mvfst/lib/libmvfst_transport_settings_functions.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/folly/lib/libfolly.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fmt-2FInSBfJDqu8ligxsc_Mbo85ImkGltbs0CeWNLTbCRY/lib64/libfmt.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-4tgDfrJmVL7Z4SVnUkhyjhy5rKOD8I6mEmBZj4zqGIA/lib/libboost_context.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-4tgDfrJmVL7Z4SVnUkhyjhy5rKOD8I6mEmBZj4zqGIA/lib/libboost_filesystem.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-4tgDfrJmVL7Z4SVnUkhyjhy5rKOD8I6mEmBZj4zqGIA/lib/libboost_atomic.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-4tgDfrJmVL7Z4SVnUkhyjhy5rKOD8I6mEmBZj4zqGIA/lib/libboost_program_options.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-4tgDfrJmVL7Z4SVnUkhyjhy5rKOD8I6mEmBZj4zqGIA/lib/libboost_regex.a -licudata -licui18n -licuuc /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-4tgDfrJmVL7Z4SVnUkhyjhy5rKOD8I6mEmBZj4zqGIA/lib/libboost_system.a /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/boost-4tgDfrJmVL7Z4SVnUkhyjhy5rKOD8I6mEmBZj4zqGIA/lib/libboost_thread.a /usr/lib64/libdouble-conversion.so /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/gflags-MpUYa6JSZ2Vmb6mnonoCMpeD9eP1eZkUKB9n9opwIrk/lib/libgflags.so.2.2.2 /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/glog-rMa35ZR65LheEDFExzR1XOLW0AhpfKaO1HgQBLpOEos/lib64/libglog.so /usr/lib64/libevent.so /usr/lib64/libz.so /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libbz2.so /usr/lib64/liblzma.so /usr/lib64/liblz4.so /usr/lib64/libzstd.so /usr/lib64/libsnappy.so /usr/lib64/libdwarf.so /usr/lib64/libiberty.a /usr/lib64/libaio.so /usr/lib64/libsodium.so -ldl /usr/lib64/libunwind.so && : /bin/ld: CMakeFiles/fboss2.dir/fboss/cli/fboss2/utils/CmdClientUtils.cpp.o: in function `std::unique_ptr, std::default_delete > > facebook::fboss::utils::createClient >(facebook::fboss::HostInfo const&, std::chrono::duration > const&)': CmdClientUtils.cpp:(.text+0x228): undefined reference to `facebook::fboss::utils::createAgentClient(facebook::fboss::HostInfo const&, std::chrono::duration > const&)' /bin/ld: /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftcpp2.a(RpcMetadataUtil.cpp.o): in function `apache::thrift::detail::makeRequestRpcMetadata(apache::thrift::RpcOptions const&, apache::thrift::RpcKind, apache::thrift::ManagedStringView&&, std::optional > >, std::variant, bool, long, apache::thrift::transport::THeader&)': RpcMetadataUtil.cpp:(.text+0xef5): undefined reference to `apache::thrift::rocket::CompressionAlgorithmSelector::fromCodecConfig(apache::thrift::CodecConfig const&)' /bin/ld: /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftcpp2.a(Compression.cpp.o): in function `apache::thrift::rocket::compressBuffer(std::unique_ptr >&&, apache::thrift::CompressionAlgorithm)': Compression.cpp:(.text+0x17): undefined reference to `apache::thrift::rocket::CompressionAlgorithmSelector::toCodecTypeAndLevel(apache::thrift::CompressionAlgorithm const&)' /bin/ld: /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftcpp2.a(Compression.cpp.o): in function `apache::thrift::rocket::uncompressBuffer(std::unique_ptr >&&, apache::thrift::CompressionAlgorithm)': Compression.cpp:(.text+0xe5): undefined reference to `apache::thrift::rocket::CompressionAlgorithmSelector::toCodecTypeAndLevel(apache::thrift::CompressionAlgorithm const&)' /bin/ld: /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftcpp2.a(Compression.cpp.o): in function `void apache::thrift::rocket::detail::setCompressionCodec(apache::thrift::CompressionConfig, apache::thrift::RequestRpcMetadata&, unsigned long)': Compression.cpp:(.text._ZN6apache6thrift6rocket6detail19setCompressionCodecINS0_18RequestRpcMetadataEEEvNS0_17CompressionConfigERT_m[_ZN6apache6thrift6rocket6detail19setCompressionCodecINS0_18RequestRpcMetadataEEEvNS0_17CompressionConfigERT_m]+0x4d): undefined reference to `apache::thrift::rocket::CompressionAlgorithmSelector::fromCodecConfig(apache::thrift::CodecConfig const&)' /bin/ld: /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftcpp2.a(Compression.cpp.o): in function `void apache::thrift::rocket::detail::setCompressionCodec(apache::thrift::CompressionConfig, apache::thrift::ResponseRpcMetadata&, unsigned long)': Compression.cpp:(.text._ZN6apache6thrift6rocket6detail19setCompressionCodecINS0_19ResponseRpcMetadataEEEvNS0_17CompressionConfigERT_m[_ZN6apache6thrift6rocket6detail19setCompressionCodecINS0_19ResponseRpcMetadataEEEvNS0_17CompressionConfigERT_m]+0x4d): undefined reference to `apache::thrift::rocket::CompressionAlgorithmSelector::fromCodecConfig(apache::thrift::CodecConfig const&)' /bin/ld: /data/sandcastle/temp/skycastle/fbcode_builder_getdeps/installed/fbthrift/lib/libthriftcpp2.a(Compression.cpp.o): in function `void apache::thrift::rocket::detail::setCompressionCodec(apache::thrift::CompressionConfig, apache::thrift::StreamPayloadMetadata&, unsigned long)': Compression.cpp:(.text._ZN6apache6thrift6rocket6detail19setCompressionCodecINS0_21StreamPayloadMetadataEEEvNS0_17CompressionConfigERT_m[_ZN6apache6thrift6rocket6detail19setCompressionCodecINS0_21StreamPayloadMetadataEEEvNS0_17CompressionConfigERT_m]+0x4d): undefined reference to `apache::thrift::rocket::CompressionAlgorithmSelector::fromCodecConfig(apache::thrift::CodecConfig const&)' collect2: error: ld returned 1 exit status ``` Reviewed By: shri-khare Differential Revision: D64915790 fbshipit-source-id: afa7fd078070ca58ca2fa538dd56e47cc62edb83 --- fboss/cli/fboss2/utils/oss/CmdClientUtils.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fboss/cli/fboss2/utils/oss/CmdClientUtils.cpp b/fboss/cli/fboss2/utils/oss/CmdClientUtils.cpp index 8b5bdb1920003..7974da8aa2e57 100644 --- a/fboss/cli/fboss2/utils/oss/CmdClientUtils.cpp +++ b/fboss/cli/fboss2/utils/oss/CmdClientUtils.cpp @@ -31,6 +31,15 @@ std::unique_ptr> createAgentClient( hostInfo, agentPort); } +std::unique_ptr createAgentClient( + const HostInfo& hostInfo, + const std::chrono::milliseconds& timeout) { + auto port = CmdGlobalOptions::getInstance()->getAgentThriftPort(); + + return createPlaintextClient( + hostInfo, port); +} + std::unique_ptr> createHwAgentClient( const HostInfo& hostInfo, int switchIndex) { From 962291e494586f133467a679b397467eb0fcd2cd Mon Sep 17 00:00:00 2001 From: Alex Hornby Date: Thu, 24 Oct 2024 13:22:40 -0700 Subject: [PATCH 314/479] getdeps: enable -fcoroutines for GCC in fb303 and eden Summary: X-link: https://github.com/facebookincubator/zstrong/pull/1019 Enable coroutines on GCC for fb303 and eden OSS cmake builds to match folly and [fbthrift](https://github.com/facebook/fbthrift/blob/197890bbedd4942809b91139f9a2890c8f167045/CMakeLists.txt#L64-L75). This stops the eden tests from immediatedly core dumping when they try to open up the thrift server So can check if core dumps: * fix to eden main.py to stub par_telemetry in OSS where its not available * add the missing getdeps dependency from eden to sapling for tests (it needs the sapling binaries for the tests torun) Reviewed By: jdelliot Differential Revision: D64911998 fbshipit-source-id: f6316908314bd821dd8c0e5afb5fe4584f5be23e --- build/fbcode_builder/manifests/eden | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/fbcode_builder/manifests/eden b/build/fbcode_builder/manifests/eden index 168f460e9af7d..d7bc911612e39 100644 --- a/build/fbcode_builder/manifests/eden +++ b/build/fbcode_builder/manifests/eden @@ -55,6 +55,10 @@ python # TODO: teach getdeps to compile lmdb on Windows. lmdb +[dependencies.test=on] +# sapling CLI is needed to run the tests +sapling + [shipit.pathmap.fb=on] # for internal builds that use getdeps fbcode/fb303 = fb303 From 9cfab4e5b75ae417203da1ef146d85c4ddc56d64 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 24 Oct 2024 13:26:39 -0700 Subject: [PATCH 315/479] Start populating systemPortRanges in dsf node config for hw/agent tests Summary: As titled Reviewed By: srikrishnagopu Differential Revision: D64913824 Privacy Context Container: L1125642 fbshipit-source-id: e35eb3a33cdb66632820766ce29953122ff39d8a --- fboss/agent/test/utils/ConfigUtils.cpp | 27 ++++++++++++----------- fboss/agent/test/utils/ConfigUtils.h | 3 +-- fboss/agent/test/utils/DsfConfigUtils.cpp | 8 +++---- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/fboss/agent/test/utils/ConfigUtils.cpp b/fboss/agent/test/utils/ConfigUtils.cpp index 5c493ab191b7c..cd90b1836090a 100644 --- a/fboss/agent/test/utils/ConfigUtils.cpp +++ b/fboss/agent/test/utils/ConfigUtils.cpp @@ -367,8 +367,7 @@ void securePortsInConfig( cfg::DsfNode dsfNodeConfig( const HwAsic& myAsic, int64_t otherSwitchId, - std::optional systemPortMin, - std::optional systemPortMax, + cfg::SystemPortRanges sysPortRanges, const std::optional platformType) { auto createAsic = [&](const HwAsic& fromAsic, int64_t switchId) -> std::pair, PlatformType> { @@ -380,12 +379,16 @@ cfg::DsfNode dsfNodeConfig( auto blockSize = (*fromAsicSystemPortRange->maximum() - *fromAsicSystemPortRange->minimum() + 1) / numCores; - range.minimum() = systemPortMin.has_value() - ? kSysPortOffset + systemPortMin.value() - : kSysPortOffset + switchId * blockSize; - range.maximum() = systemPortMax.has_value() - ? kSysPortOffset + systemPortMax.value() - : *range.minimum() + numCores * blockSize - 1; + if (sysPortRanges.systemPortRanges()->size()) { + CHECK_EQ(sysPortRanges.systemPortRanges()->size(), 1) + << " Multiple sys port ranges per node are not supported yet in tests (TODO)"; + auto firstRange = *sysPortRanges.systemPortRanges()->begin(); + range.minimum() = kSysPortOffset + *firstRange.minimum(); + range.maximum() = kSysPortOffset + *firstRange.maximum(); + } else { + range.minimum() = kSysPortOffset + switchId * blockSize; + range.maximum() = *range.minimum() + numCores * blockSize - 1; + } systemPortRange = range; } auto localMac = utility::kLocalCpuMac(); @@ -452,6 +455,8 @@ cfg::DsfNode dsfNodeConfig( dsfNode.type() = cfg::DsfNodeType::INTERFACE_NODE; CHECK(otherAsic->getSystemPortRange().has_value()); dsfNode.systemPortRange() = *otherAsic->getSystemPortRange(); + dsfNode.systemPortRanges()->systemPortRanges()->push_back( + dsfNode.systemPortRange().value()); dsfNode.nodeMac() = kLocalCpuMac().toString(); dsfNode.loopbackIps() = getLoopbackIps(SwitchID(*dsfNode.switchId())); dsfNode.localSystemPortOffset() = *dsfNode.systemPortRange()->minimum(); @@ -884,11 +889,7 @@ void populateSwitchInfo( newDsfNodes.insert( {switchId, dsfNodeConfig( - *hwAsic, - switchId, - std::nullopt /*systemPortMin*/, - std::nullopt /*systemPortMax*/, - platformType)}); + *hwAsic, switchId, cfg::SystemPortRanges(), platformType)}); } } config.switchSettings()->switchIdToSwitchInfo() = newSwitchIdToSwitchInfo; diff --git a/fboss/agent/test/utils/ConfigUtils.h b/fboss/agent/test/utils/ConfigUtils.h index 3e07d30401ebe..af39137c978dd 100644 --- a/fboss/agent/test/utils/ConfigUtils.h +++ b/fboss/agent/test/utils/ConfigUtils.h @@ -72,8 +72,7 @@ std::vector getLoopbackIps(SwitchID switchId); cfg::DsfNode dsfNodeConfig( const HwAsic& myAsic, int64_t otherSwitchId = 4, - std::optional systemPortMin = std::nullopt, - std::optional systemPortMax = std::nullopt, + cfg::SystemPortRanges = cfg::SystemPortRanges(), const std::optional platformType = std::nullopt); std::vector::iterator findCfgPort( diff --git a/fboss/agent/test/utils/DsfConfigUtils.cpp b/fboss/agent/test/utils/DsfConfigUtils.cpp index 614c7823c868a..ce8d59a20fb95 100644 --- a/fboss/agent/test/utils/DsfConfigUtils.cpp +++ b/fboss/agent/test/utils/DsfConfigUtils.cpp @@ -71,12 +71,10 @@ std::optional> addRemoteIntfNodeCfg( systemPortRange.minimum() = systemPortMin; systemPortRange.maximum() = systemPortMin + getPerNodeSysPorts(*asic, remoteSwitchId) - 1; + cfg::SystemPortRanges ranges; + ranges.systemPortRanges()->push_back(systemPortRange); auto remoteDsfNodeCfg = dsfNodeConfig( - *asic, - SwitchID(remoteSwitchId), - systemPortMin, - *systemPortRange.maximum(), - *firstDsfNode.platformType()); + *asic, SwitchID(remoteSwitchId), ranges, *firstDsfNode.platformType()); dsfNodes.insert({remoteSwitchId, remoteDsfNodeCfg}); systemPortMin = *systemPortRange.maximum() + 1; } From 7760a9a263b64f301d75a11fa98d59295383ab67 Mon Sep 17 00:00:00 2001 From: Ruinan Hu Date: Thu, 24 Oct 2024 13:27:31 -0700 Subject: [PATCH 316/479] rename the snooping test argument in sendPkt function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: original argument is a on/off switch, if it's on,then snoop test enable. If expected packet received, then pass test. If it’s off, snooping test disable. new argument indicate if packet is expected or not and snoop test always enable Created from CodeHub with https://fburl.com/edit-in-codehub Reviewed By: daiwei1983 Differential Revision: D64765097 fbshipit-source-id: 52775768af4cb35986bfaf3618d92ed40eda63e2 --- .../test/agent_hw_tests/AgentCoppTests.cpp | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp b/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp index ef43b1655b7b4..14ab506784427 100644 --- a/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp @@ -205,7 +205,7 @@ class AgentCoppTest : public AgentHwTest { void sendPkt( std::unique_ptr pkt, bool outOfPort, - bool snoopAndVerify = false, + bool expectRxPacket = false, bool skipTtlDecrement = true) { XLOG(DBG2) << "Packet Dump::" << folly::hexDump(pkt->buf()->data(), pkt->buf()->length()); @@ -220,11 +220,14 @@ class AgentCoppTest : public AgentHwTest { } else { getSw()->sendPacketSwitchedAsync(std::move(pkt)); } - if (snoopAndVerify) { + if (expectRxPacket) { WITH_RETRIES({ auto frameRx = snooper.waitForPacket(1); EXPECT_EVENTUALLY_TRUE(frameRx.has_value()); }); + } else { + auto frameRx = snooper.waitForPacket(10); + EXPECT_FALSE(frameRx.has_value()); } } @@ -256,7 +259,7 @@ class AgentCoppTest : public AgentHwTest { sendPkt( std::move(pkt), outOfPort, - expectQueueHit /*snoopAndVerify*/, + expectQueueHit /*expectRxPacket*/, skipTtlDecrement); }; utility::sendPktAndVerifyCpuQueue( @@ -296,7 +299,7 @@ class AgentCoppTest : public AgentHwTest { XLOG(DBG2) << "UDP packet Dump::" << folly::hexDump( txPacket->buf()->data(), txPacket->buf()->length()); - sendPkt(std::move(txPacket), outOfPort, expectPktTrap /*snoopAndVerify*/); + sendPkt(std::move(txPacket), outOfPort, expectPktTrap /*expectRxPacket*/); } void sendUdpPktAndVerify( @@ -349,7 +352,7 @@ class AgentCoppTest : public AgentHwTest { dstMac ? *dstMac : intfMac, etherType, payload); - sendPkt(std::move(txPacket), true /*outOfPort*/, true /*snoopAndVerify*/); + sendPkt(std::move(txPacket), true /*outOfPort*/, true /*expectRxPacket*/); } } @@ -429,7 +432,7 @@ class AgentCoppTest : public AgentHwTest { folly::IPAddress("1.1.1.2"), dstIpAddress, arpType); - sendPkt(std::move(txPacket), outOfPort, true /*snoopAndVerify*/); + sendPkt(std::move(txPacket), outOfPort, true /*expectRxPacket*/); } } @@ -468,7 +471,7 @@ class AgentCoppTest : public AgentHwTest { ICMPv6Type type, bool outOfPort, bool selfSolicit, - bool snoopAndVerify = true) { + bool expectRxPacket = true) { auto vlanId = utility::firstVlanID(getProgrammedState()); auto intfMac = utility::getFirstInterfaceMac(getProgrammedState()); auto neighborMac = utility::MacAddressGenerator().get(intfMac.u64NBO() + 1); @@ -490,7 +493,7 @@ class AgentCoppTest : public AgentHwTest { intfMac, // my mac neighborIp, // sender ip folly::IPAddressV6("1::")); // sent to me - sendPkt(std::move(txPacket), outOfPort, snoopAndVerify); + sendPkt(std::move(txPacket), outOfPort, expectRxPacket); } } @@ -502,7 +505,7 @@ class AgentCoppTest : public AgentHwTest { bool outOfPort = true, const int numPktsToSend = 1, const int expectedPktDelta = 1, - bool snoopAndVerify = true) { + bool expectRxPacket = true) { auto beforeOutPkts = utility::getQueueOutPacketsWithRetry( getSw(), @@ -518,7 +521,7 @@ class AgentCoppTest : public AgentHwTest { ndpType, outOfPort, selfSolicit, - snoopAndVerify); + expectRxPacket); auto afterOutPkts = utility::getQueueOutPacketsWithRetry( getSw(), @@ -610,7 +613,7 @@ class AgentCoppTest : public AgentHwTest { DHCPv6Packet::DHCP6_SERVERAGENT_UDPPORT, // DstPort: 547 0 /* dscp */, ttl); // sent to me - sendPkt(std::move(txPacket), outOfPort, true /* snoopAndVerify*/); + sendPkt(std::move(txPacket), outOfPort, true /* expectRxPacket*/); } } @@ -1176,7 +1179,7 @@ TYPED_TEST(AgentCoppTest, NdpSolicitNeighbor) { XLOG(DBG2) << "verifying solicitation"; // do not snoop when L2 is not supported, e.g. J3, where NDP packets goes // through L3 pipeline and might change ttl and dst mac - bool snoopAndVerify = + bool expectRxPacket = this->isSupportedOnAllAsics(HwAsic::Feature::BRIDGE_PORT_8021Q); this->sendPktAndVerifyNdpPacketsCpuQueue( utility::getCoppHighPriQueueId(utility::checkSameAndGetAsic( @@ -1187,7 +1190,7 @@ TYPED_TEST(AgentCoppTest, NdpSolicitNeighbor) { false, 1, 1, - snoopAndVerify); + expectRxPacket); }; this->verifyAcrossWarmBoots(setup, verify); } From ec0860b4ce05862a0561da2e25ee396e6dcc7d72 Mon Sep 17 00:00:00 2001 From: Ravi Vantipalli Date: Thu, 24 Oct 2024 13:44:26 -0700 Subject: [PATCH 317/479] switch config enhancements supporting SAI UDF ACL Summary: This is an enhancement to UDF config for SAI configuration. BCM only includes udf group config in the ACL entry. This change also includes similar info in the ACL table. Reasons are described in https://docs.google.com/document/d/1rPRB6SJpg62xt3125VI2hsNkSpy3akata-lyqTLbIdQ/edit#heading=h.xxb6o1uc99xr Reviewed By: shri-khare Differential Revision: D63740342 fbshipit-source-id: 038712e90d67ef99ef49dac25828b2e5aace1829 --- fboss/agent/switch_config.thrift | 2 ++ fboss/agent/switch_state.thrift | 1 + fboss/fsdb/if/oss/fsdb_model_thriftpath.h | 22 ++++++++++++++++------ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/fboss/agent/switch_config.thrift b/fboss/agent/switch_config.thrift index 11035aa7c5ff4..6800763f8ce7f 100644 --- a/fboss/agent/switch_config.thrift +++ b/fboss/agent/switch_config.thrift @@ -540,6 +540,7 @@ struct AclEntry { 30: optional i32 vlanID; + /* 31-34 not to be used for SAI */ 31: optional list udfGroups; 32: optional byte roceOpcode; @@ -597,6 +598,7 @@ struct AclTable { 3: list aclEntries = []; 4: list actionTypes = []; 5: list qualifiers = []; + 6: list udfGroups = []; } enum AclStage { diff --git a/fboss/agent/switch_state.thrift b/fboss/agent/switch_state.thrift index 21f1fe45c086c..7c288670dbcbb 100644 --- a/fboss/agent/switch_state.thrift +++ b/fboss/agent/switch_state.thrift @@ -583,6 +583,7 @@ struct AclTableFields { 3: optional map aclMap; 4: list actionTypes; 5: list qualifiers; + 6: list udfGroups; } struct AclTableGroupFields { diff --git a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h index b6af4ce9f2e3e..ce022aa69d77f 100755 --- a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h +++ b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h @@ -14341,18 +14341,21 @@ class ChildThriftPath<::facebook::fboss::cfg::AclTable, ::facebook::fboss::fsdb: std::pair>, std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableActionType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template using NameToId = fatal::tuple>, std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -14363,6 +14366,7 @@ std::pair auto operator()(const std::integral_constant&) { @@ -14371,6 +14375,7 @@ std::pair @@ -15426,18 +15431,21 @@ class ChildThriftPath<::facebook::fboss::state::AclTableFields, ::facebook::fbos std::pair>, std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableActionType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template using NameToId = fatal::tuple>, std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -15448,6 +15456,7 @@ std::pair auto operator()(const std::integral_constant&) { @@ -15456,6 +15465,7 @@ std::pair From 38dc59a39ed09a569136e8549d3a995aea2bc2d6 Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Thu, 24 Oct 2024 14:49:21 -0700 Subject: [PATCH 318/479] get rid of chenab specific extension attributes and use oss ones for chenab Summary: as titled this helps avoiding linker errors, while adding new attributes. if any extension api attribute is needed, can always readd implementation specific files Differential Revision: D64877120 fbshipit-source-id: 5d12a78da6672eb77261e2dc0783df20cf35514d --- cmake/AgentHwSaiApi.cmake | 12 +- fboss/agent/hw/sai/api/chenab/BufferApi.cpp | 12 -- .../hw/sai/api/chenab/DebugCounterApi.cpp | 12 -- fboss/agent/hw/sai/api/chenab/PortApi.cpp | 71 -------- fboss/agent/hw/sai/api/chenab/QueueApi.cpp | 12 -- fboss/agent/hw/sai/api/chenab/SwitchApi.cpp | 155 ------------------ fboss/agent/hw/sai/api/chenab/TamApi.cpp | 17 -- 7 files changed, 6 insertions(+), 285 deletions(-) delete mode 100644 fboss/agent/hw/sai/api/chenab/BufferApi.cpp delete mode 100644 fboss/agent/hw/sai/api/chenab/DebugCounterApi.cpp delete mode 100644 fboss/agent/hw/sai/api/chenab/PortApi.cpp delete mode 100644 fboss/agent/hw/sai/api/chenab/QueueApi.cpp delete mode 100644 fboss/agent/hw/sai/api/chenab/SwitchApi.cpp delete mode 100644 fboss/agent/hw/sai/api/chenab/TamApi.cpp diff --git a/cmake/AgentHwSaiApi.cmake b/cmake/AgentHwSaiApi.cmake index 08191bbf3c8e0..2fa756d6ca262 100644 --- a/cmake/AgentHwSaiApi.cmake +++ b/cmake/AgentHwSaiApi.cmake @@ -112,12 +112,12 @@ elseif (SAI_BRCM_IMPL) message(STATUS "Found SAI_INCLUDE_DIR: ${SAI_INCLUDE_DIR}") elseif (CHENAB_SAI_SDK) list(APPEND SAI_API_SRC - fboss/agent/hw/sai/api/chenab/PortApi.cpp - fboss/agent/hw/sai/api/chenab/TamApi.cpp - fboss/agent/hw/sai/api/chenab/SwitchApi.cpp - fboss/agent/hw/sai/api/chenab/DebugCounterApi.cpp - fboss/agent/hw/sai/api/chenab/BufferApi.cpp - fboss/agent/hw/sai/api/chenab/QueueApi.cpp + fboss/agent/hw/sai/api/oss/PortApi.cpp + fboss/agent/hw/sai/api/oss/TamApi.cpp + fboss/agent/hw/sai/api/oss/SwitchApi.cpp + fboss/agent/hw/sai/api/oss/DebugCounterApi.cpp + fboss/agent/hw/sai/api/oss/BufferApi.cpp + fboss/agent/hw/sai/api/oss/QueueApi.cpp ) find_path(SAI_IMPL_DIR NAMES lib/libsai_impl.a) diff --git a/fboss/agent/hw/sai/api/chenab/BufferApi.cpp b/fboss/agent/hw/sai/api/chenab/BufferApi.cpp deleted file mode 100644 index 5aeb313135b2c..0000000000000 --- a/fboss/agent/hw/sai/api/chenab/BufferApi.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - -#include "fboss/agent/hw/sai/api/BufferApi.h" - -namespace facebook::fboss { - -std::optional -SaiBufferProfileTraits::Attributes::AttributeSharedFadtMaxTh::operator()() { - return std::nullopt; -} - -} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/chenab/DebugCounterApi.cpp b/fboss/agent/hw/sai/api/chenab/DebugCounterApi.cpp deleted file mode 100644 index ea970bfe02fc6..0000000000000 --- a/fboss/agent/hw/sai/api/chenab/DebugCounterApi.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - -#include "fboss/agent/hw/sai/api/DebugCounterApi.h" - -#include - -namespace facebook::fboss::detail { - -std::optional trapDrops() { - return std::nullopt; -} -} // namespace facebook::fboss::detail diff --git a/fboss/agent/hw/sai/api/chenab/PortApi.cpp b/fboss/agent/hw/sai/api/chenab/PortApi.cpp deleted file mode 100644 index cb942624d1db9..0000000000000 --- a/fboss/agent/hw/sai/api/chenab/PortApi.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - -#include "fboss/agent/hw/sai/api/PortApi.h" - -namespace facebook::fboss { -std::optional -SaiPortSerdesTraits::Attributes::AttributeTxLutModeIdWrapper::operator()() { - return std::nullopt; -} -std::optional -SaiPortSerdesTraits::Attributes::AttributeRxCtleCodeIdWrapper::operator()() { - return std::nullopt; -} -std::optional -SaiPortSerdesTraits::Attributes::AttributeRxDspModeIdWrapper::operator()() { - return std::nullopt; -} -std::optional -SaiPortSerdesTraits::Attributes::AttributeRxAfeTrimIdWrapper::operator()() { - return std::nullopt; -} -std::optional SaiPortSerdesTraits::Attributes:: - AttributeRxAcCouplingBypassIdWrapper::operator()() { - return std::nullopt; -} -std::optional -SaiPortTraits::Attributes::AttributeSystemPortId::operator()() { - return std::nullopt; -} -std::optional SaiPortSerdesTraits::Attributes:: - AttributeRxAfeAdaptiveEnableWrapper::operator()() { - return std::nullopt; -} -std::optional -SaiPortTraits::Attributes::AttributeSerdesLaneList::operator()() { - return std::nullopt; -} -std::optional -SaiPortTraits::Attributes::AttributeDiagModeEnable::operator()() { - return std::nullopt; -} -std::optional -SaiPortTraits::Attributes::AttributeRxLaneSquelchEnable::operator()() { - return std::nullopt; -} -std::optional -SaiPortTraits::Attributes::AttributeFdrEnable::operator()() { - return std::nullopt; -} -#if SAI_API_VERSION >= SAI_VERSION(1, 10, 3) -std::optional -SaiPortTraits::Attributes::AttributeCrcErrorDetect::operator()() { - return std::nullopt; -} -#endif - -std::optional -SaiPortTraits::Attributes::AttributeCablePropogationDelayNS::operator()() { - return std::nullopt; -} - -std::optional -SaiPortTraits::Attributes::AttributeFabricDataCellsFilterStatus::operator()() { - return std::nullopt; -} - -std::optional -SaiPortTraits::Attributes::AttributeReachabilityGroup::operator()() { - return std::nullopt; -} -} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/chenab/QueueApi.cpp b/fboss/agent/hw/sai/api/chenab/QueueApi.cpp deleted file mode 100644 index 453a462fc295c..0000000000000 --- a/fboss/agent/hw/sai/api/chenab/QueueApi.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - -#include "fboss/agent/hw/sai/api/QueueApi.h" - -namespace facebook::fboss { - -const std::vector& SaiQueueTraits::egressGvoqWatermarkBytes() { - static const std::vector stats; - return stats; -} - -} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/chenab/SwitchApi.cpp b/fboss/agent/hw/sai/api/chenab/SwitchApi.cpp deleted file mode 100644 index 214fa555b2e62..0000000000000 --- a/fboss/agent/hw/sai/api/chenab/SwitchApi.cpp +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - -#include "fboss/agent/hw/sai/api/SwitchApi.h" - -namespace facebook::fboss { - -std::optional -SaiSwitchTraits::Attributes::AttributeLedIdWrapper::operator()() { - return std::nullopt; -} -std::optional -SaiSwitchTraits::Attributes::AttributeLedResetIdWrapper::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::AttributeAclFieldListWrapper::operator()() { - return std::nullopt; -} - -std::optional SaiSwitchTraits::Attributes:: - AttributeEgressPoolAvaialableSizeIdWrapper::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::HwEccErrorInitiateWrapper::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::AttributeDllPathWrapper::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::AttributeRestartIssuWrapper::operator()() { - return std::nullopt; -} - -std::optional SaiSwitchTraits::Attributes:: - AttributeForceTrafficOverFabricWrapper::operator()() { - return std::nullopt; -} - -std::optional SaiSwitchTraits::Attributes:: - AttributeWarmBootTargetVersionWrapper::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::AttributeSwitchIsolateWrapper::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::AttributeMaxCoresWrapper::operator()() { - return std::nullopt; -} - -std::optional SaiSwitchTraits::Attributes:: - AttributeFabricRemoteReachablePortList::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::AttributeSdkBootTimeWrapper::operator()() { - return std::nullopt; -} - -std::optional SaiSwitchTraits::Attributes:: - AttributeRouteNoImplicitMetaDataWrapper::operator()() { - return std::nullopt; -} - -std::optional SaiSwitchTraits::Attributes:: - AttributeRouteAllowImplicitMetaDataWrapper::operator()() { - return std::nullopt; -} - -std::optional SaiSwitchTraits::Attributes:: - AttributeMultiStageLocalSwitchIdsWrapper::operator()() { - return std::nullopt; -} - -const std::vector& SaiSwitchTraits::dramStats() { - static const std::vector stats; - return stats; -} - -const std::vector& SaiSwitchTraits::rciWatermarkStats() { - static const std::vector stats; - return stats; -} - -const std::vector& SaiSwitchTraits::dtlWatermarkStats() { - static const std::vector stats; - return stats; -} - -const std::vector& SaiSwitchTraits::dramBlockTime() { - static const std::vector stats; - return stats; -} - -const std::vector& SaiSwitchTraits::deletedCredits() { - static const std::vector stats; - return stats; -} - -const std::vector& -SaiSwitchTraits::egressCoreBufferWatermarkBytes() { - static const std::vector stats; - return stats; -} - -void SwitchApi::registerSwitchEventCallback( - SwitchSaiId /*id*/, - void* /*switch_event_cb*/) const {} - -std::optional -SaiSwitchTraits::Attributes::AttributeVoqLatencyMinLocalNs::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::AttributeVoqLatencyMaxLocalNs::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::AttributeVoqLatencyMinLevel1Ns::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::AttributeVoqLatencyMaxLevel1Ns::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::AttributeVoqLatencyMinLevel2Ns::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::AttributeVoqLatencyMaxLevel2Ns::operator()() { - return std::nullopt; -} - -std::optional -SaiSwitchTraits::Attributes::AttributeReachabilityGroupList::operator()() { - return std::nullopt; -} -} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/chenab/TamApi.cpp b/fboss/agent/hw/sai/api/chenab/TamApi.cpp deleted file mode 100644 index 695754203903c..0000000000000 --- a/fboss/agent/hw/sai/api/chenab/TamApi.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - -#include "fboss/agent/hw/sai/api/TamApi.h" - -namespace facebook::fboss { - -std::optional -SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { - return std::nullopt; -} - -std::optional -SaiTamEventTraits::Attributes::AttributeEventId::operator()() { - return std::nullopt; -} - -} // namespace facebook::fboss From 9f85eb53b240006521c9c7eb7f242462ef322c9e Mon Sep 17 00:00:00 2001 From: Prasoon Patel Date: Thu, 24 Oct 2024 15:09:10 -0700 Subject: [PATCH 319/479] when FBD received for mac learning, release saiSwitchMutex_ before notifying swSwitch Summary: After enabling mac table updateState with protection, if acquire saiSwitchMutex_ and notify swSwitch it causes deadlock. So with this diff, releases saiSwitchMutex_ before notifying swSwitch. Reviewed By: msomasundaran Differential Revision: D63646244 fbshipit-source-id: 3a6305ea5b940066025d7c91d4f1b14fa12c6f93 --- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 45 ++++++++++++++----------- fboss/agent/hw/sai/switch/SaiSwitch.h | 1 - 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index ab872507285bc..259208b5a3c42 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -3476,33 +3476,40 @@ void SaiSwitch::fdbEventCallback( fdbEventBottomHalfEventBase_.runInFbossEventBaseThread( [this, fdbNotifications = std::move(fdbEventNotificationDataTmp)]() mutable { - auto lock = std::lock_guard(saiSwitchMutex_); - fdbEventCallbackLockedBottomHalf(lock, std::move(fdbNotifications)); + fdbEventCallbackLockedBottomHalf(std::move(fdbNotifications)); }); } void SaiSwitch::fdbEventCallbackLockedBottomHalf( - const std::lock_guard& /*lock*/, std::vector fdbNotifications) { - if (managerTable_->bridgeManager().getL2LearningMode() != - cfg::L2LearningMode::SOFTWARE) { - // Some platforms call fdb callback even when mode is set to HW. In - // keeping with our native SDK approach, don't send these events up. - return; - } - for (const auto& fdbNotification : fdbNotifications) { - auto ditr = - kL2AddrUpdateOperationsOfInterest.find(fdbNotification.eventType); - if (ditr != kL2AddrUpdateOperationsOfInterest.end()) { - auto updateTypeStr = fdbEventToString(ditr->first); - auto l2Entry = getL2Entry(fdbNotification); - if (l2Entry) { - XLOG(DBG2) << "Received FDB " << updateTypeStr - << " notification for: " << l2Entry->str(); - callback_->l2LearningUpdateReceived(l2Entry.value(), ditr->second); + std::vector> l2Entries; + { + auto lock = std::lock_guard(saiSwitchMutex_); + if (managerTable_->bridgeManager().getL2LearningMode() != + cfg::L2LearningMode::SOFTWARE) { + // Some platforms call fdb callback even when mode is set to HW. In + // keeping with our native SDK approach, don't send these events up. + return; + } + + for (const auto& fdbNotification : fdbNotifications) { + auto ditr = + kL2AddrUpdateOperationsOfInterest.find(fdbNotification.eventType); + if (ditr != kL2AddrUpdateOperationsOfInterest.end()) { + auto updateTypeStr = fdbEventToString(ditr->first); + auto l2Entry = getL2Entry(fdbNotification); + if (l2Entry) { + XLOG(DBG2) << "Received FDB " << updateTypeStr + << " notification for: " << l2Entry->str(); + l2Entries.push_back({l2Entry.value(), ditr->second}); + } } } } + + for (auto& l2Entry : l2Entries) { + callback_->l2LearningUpdateReceived(l2Entry.first, l2Entry.second); + } } std::optional SaiSwitch::getL2Entry( diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.h b/fboss/agent/hw/sai/switch/SaiSwitch.h index 31f7ea68860b3..2c6d7b2eebac4 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.h +++ b/fboss/agent/hw/sai/switch/SaiSwitch.h @@ -335,7 +335,6 @@ class SaiSwitch : public HwSwitch { PortID port) const; void fdbEventCallbackLockedBottomHalf( - const std::lock_guard& lock, std::vector data); const SaiManagerTable* managerTableLocked( From 026631aa1112df223be92c3ee8cf18ab6733f747 Mon Sep 17 00:00:00 2001 From: Jimmy Ye Date: Thu, 24 Oct 2024 16:43:25 -0700 Subject: [PATCH 320/479] Remove fbdevd Summary: `fbdevd` is unused, all relevant functionality is now part of `platform_manager`. Notably it is not even deployed in platform_stack fbpkg: https://www.internalfb.com/code/fbsource/fbcode/fboss/platform/TARGETS Removed `fboss/platform/fbdevd` and all references found via https://fburl.com/code/vqtzh3i1 and https://fburl.com/code/ltecno9v Reviewed By: kimdo8736 Differential Revision: D64922170 fbshipit-source-id: c668f58689f025dde65cc3da3689969bbdca0ddf --- cmake/PlatformFbdevd.cmake | 63 --------- fboss/platform/config_lib/BUCK | 1 - fboss/platform/config_lib/ConfigLib.cpp | 12 -- fboss/platform/config_lib/ConfigLib.h | 3 - fboss/platform/configs/darwin/fbdevd.json | 132 ------------------ fboss/platform/fbdevd/BUCK | 60 -------- fboss/platform/fbdevd/FbdevdImpl.cpp | 23 --- fboss/platform/fbdevd/FbdevdImpl.h | 22 --- fboss/platform/fbdevd/FruManager.cpp | 42 ------ fboss/platform/fbdevd/FruManager.h | 26 ---- fboss/platform/fbdevd/I2cController.cpp | 75 ---------- fboss/platform/fbdevd/I2cController.h | 37 ----- fboss/platform/fbdevd/Main.cpp | 29 ---- fboss/platform/fbdevd/if/BUCK | 39 ------ fboss/platform/fbdevd/if/fbdevd.thrift | 121 ---------------- fboss/platform/fbdevd/if/gpio.thrift | 39 ------ fboss/platform/fbdevd/if/i2c.thrift | 13 -- .../platform_manager_config.thrift | 3 - 18 files changed, 740 deletions(-) delete mode 100644 cmake/PlatformFbdevd.cmake delete mode 100644 fboss/platform/configs/darwin/fbdevd.json delete mode 100644 fboss/platform/fbdevd/BUCK delete mode 100644 fboss/platform/fbdevd/FbdevdImpl.cpp delete mode 100644 fboss/platform/fbdevd/FbdevdImpl.h delete mode 100644 fboss/platform/fbdevd/FruManager.cpp delete mode 100644 fboss/platform/fbdevd/FruManager.h delete mode 100644 fboss/platform/fbdevd/I2cController.cpp delete mode 100644 fboss/platform/fbdevd/I2cController.h delete mode 100644 fboss/platform/fbdevd/Main.cpp delete mode 100644 fboss/platform/fbdevd/if/BUCK delete mode 100644 fboss/platform/fbdevd/if/fbdevd.thrift delete mode 100644 fboss/platform/fbdevd/if/gpio.thrift delete mode 100644 fboss/platform/fbdevd/if/i2c.thrift diff --git a/cmake/PlatformFbdevd.cmake b/cmake/PlatformFbdevd.cmake deleted file mode 100644 index b170401f39102..0000000000000 --- a/cmake/PlatformFbdevd.cmake +++ /dev/null @@ -1,63 +0,0 @@ -# Make to build libraries and binaries in fboss/platform/fbdevd - -# In general, libraries and binaries in fboss/foo/bar are built by -# cmake/FooBar.cmake - -add_fbthrift_cpp_library( - fbdevd_cpp2 - fboss/platform/fbdevd/if/fbdevd.thrift - SERVICES - FbdevManager - OPTIONS - json - reflection - DEPENDS - gpio_cpp2 - i2c_cpp2 -) - -add_fbthrift_cpp_library( - gpio_cpp2 - fboss/platform/fbdevd/if/gpio.thrift - OPTIONS - json - reflection -) - -add_fbthrift_cpp_library( - i2c_cpp2 - fboss/platform/fbdevd/if/i2c.thrift - OPTIONS - json - reflection -) - - -add_library(fbdevd_lib - fboss/platform/fbdevd/FbdevdImpl.cpp - fboss/platform/fbdevd/FruManager.cpp - fboss/platform/fbdevd/I2cController.cpp -) - -target_link_libraries(fbdevd_lib - log_thrift_call - common_file_utils - platform_utils - platform_config_lib - fbdevd_cpp2 - gpio_cpp2 - i2c_cpp2 - Folly::folly - FBThrift::thriftcpp2 -) - -add_executable(fbdevd - fboss/platform/fbdevd/Main.cpp -) - -target_link_libraries(fbdevd - fbdevd_lib - fb303::fb303 -) - -install(TARGETS fbdevd) diff --git a/fboss/platform/config_lib/BUCK b/fboss/platform/config_lib/BUCK index 395cfa94158c5..f8adfe1394f9b 100644 --- a/fboss/platform/config_lib/BUCK +++ b/fboss/platform/config_lib/BUCK @@ -14,7 +14,6 @@ cpp_binary( "//fboss/platform/data_corral_service/if:led_manager-cpp2-types", "//fboss/platform/fan_service:utils", "//fboss/platform/fan_service/if:fan_service-cpp2-types", - "//fboss/platform/fbdevd/if:fbdevd-cpp2-types", "//fboss/platform/fw_util/if:fw_util_config-cpp2-types", "//fboss/platform/platform_manager:config_validator", "//fboss/platform/platform_manager:platform_manager_config-cpp2-types", diff --git a/fboss/platform/config_lib/ConfigLib.cpp b/fboss/platform/config_lib/ConfigLib.cpp index 599d49afa74da..fea567ee2e371 100644 --- a/fboss/platform/config_lib/ConfigLib.cpp +++ b/fboss/platform/config_lib/ConfigLib.cpp @@ -71,18 +71,6 @@ std::string ConfigLib::getSensorServiceConfig( #endif } -std::string ConfigLib::getFbdevdConfig( - const std::optional& platformName) const { - if (auto configJson = getConfigFromFile()) { - return *configJson; - } -#ifndef IS_OSS - return configs::fbdevd.at(getPlatformName(platformName)); -#else - throw std::runtime_error("config_file must be specified in OSS"); -#endif -} - std::string ConfigLib::getFanServiceConfig( const std::optional& platformName) const { if (auto configJson = getConfigFromFile()) { diff --git a/fboss/platform/config_lib/ConfigLib.h b/fboss/platform/config_lib/ConfigLib.h index b4f7cad48a94d..8b68895be9213 100644 --- a/fboss/platform/config_lib/ConfigLib.h +++ b/fboss/platform/config_lib/ConfigLib.h @@ -17,9 +17,6 @@ class ConfigLib { virtual std::string getSensorServiceConfig( const std::optional& platformName = std::nullopt) const; - virtual std::string getFbdevdConfig( - const std::optional& platformName = std::nullopt) const; - virtual std::string getFanServiceConfig( const std::optional& platformName = std::nullopt) const; diff --git a/fboss/platform/configs/darwin/fbdevd.json b/fboss/platform/configs/darwin/fbdevd.json deleted file mode 100644 index 67a7a3c6998a3..0000000000000 --- a/fboss/platform/configs/darwin/fbdevd.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "platformName": "Darwin", - "kmods": [ - "scd", - "scd-smbus" - ], - "bootstrap": { - "actions": [] - }, - "i2cClients": [ - { - "bus": "ROOK_SMBUS3_CH0", - "address": 96, - "deviceName": "tehama_cpld" - }, - { - "bus": "ROOK_SMBUS2_CH0", - "address": 35, - "deviceName": "blackhawk_cpld" - }, - { - "bus": "SCD_SMBUS1_CH0", - "address": 77, - "deviceName": "max6581" - }, - { - "bus": "ROOK_SMBUS0_CH0", - "address": 76, - "deviceName": "max6658" - }, - { - "bus": "ROOK_SMBUS0_CH1", - "address": 78, - "deviceName": "ucd90160" - }, - { - "bus": "ROOK_SMBUS0_CH2", - "address": 33, - "deviceName": "pmbus" - }, - { - "bus": "ROOK_SMBUS2_CH2", - "address": 17, - "deviceName": "ucd90320" - }, - { - "bus": "ROOK_SMBUS3_CH2", - "address": 72, - "deviceName": "lm73" - } - ], - "fruList": [ - { - "fruName": "PEM", - "fruState": { - "condType": 2, - "device": { - "sysfsHandle": { - "sysfsPath": "/run/devmap/fpgas/SCD_FPGA/pem_present", - "desiredValue": "0x1" - } - } - }, - "initOps": { - "actions": [] - }, - "cleanupOps": [], - "i2cClients": [ - { - "bus": "SCD_SMBUS1_CH3", - "address": 54, - "deviceName": "max11645" - }, - { - "bus": "SCD_SMBUS1_CH3", - "address": 58, - "deviceName": "amax5970" - }, - { - "bus": "SCD_SMBUS1_CH3", - "address": 76, - "deviceName": "max6658" - }, - { - "bus": "SCD_SMBUS1_CH3", - "address": 80, - "deviceName": "24c512" - } - ], - "childFruList": [] - }, - { - "fruName": "FanSpinner", - "fruState": { - "condType": 2, - "device": { - "sysfsHandle": { - "sysfsPath": "/run/devmap/fpgas/SCD_FPGA/rackmon_present", - "desiredValue": "0x1" - } - } - }, - "initOps": { - "actions": [] - }, - "cleanupOps": [], - "i2cClients": [ - { - "bus": "SCD_SMBUS1_CH4", - "address": 8, - "deviceName": "aslg4f4527" - }, - { - "bus": "SCD_SMBUS1_CH4", - "address": 80, - "deviceName": "24c512" - }, - { - "bus": "SCD_SMBUS1_CH4", - "address": 82, - "deviceName": "24c512" - }, - { - "bus": "SCD_SMBUS1_CH4", - "address": 116, - "deviceName": "pca9539" - } - ], - "childFruList": [] - } - ] - } diff --git a/fboss/platform/fbdevd/BUCK b/fboss/platform/fbdevd/BUCK deleted file mode 100644 index 6861a1f40b1e1..0000000000000 --- a/fboss/platform/fbdevd/BUCK +++ /dev/null @@ -1,60 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") - -oncall("fboss_platform") - -cpp_library( - name = "fbdevd_impl", - srcs = [ - "FbdevdImpl.cpp", - ], - headers = [ - "FbdevdImpl.h", - ], - exported_deps = [ - "//fboss/platform/config_lib:config_lib", - "//fboss/platform/fbdevd/if:fbdevd-cpp2-types", - "//folly:synchronized", - "//folly/logging:logging", - "//thrift/lib/cpp2/protocol:protocol", - ], -) - -cpp_library( - name = "i2c_utils", - srcs = [ - "I2cController.cpp", - ], - exported_deps = [ - "fbsource//third-party/fmt:fmt", - "//fboss/lib:common_file_utils", - "//fboss/lib:devmap", - ], -) - -cpp_library( - name = "fru_manager", - srcs = [ - "FruManager.cpp", - ], - exported_deps = [ - ":i2c_utils", - "//fboss/platform/fbdevd/if:fbdevd-cpp2-services", - ], -) - -cpp_binary( - name = "fbdevd", - srcs = [ - "Main.cpp", - ], - deps = [ - ":fbdevd_impl", - "//fb303:logging", - "//fboss/platform/fbdevd/if:fbdevd-cpp2-services", - "//fboss/platform/helpers:init", - "//folly/executors:function_scheduler", - "//folly/logging:init", - "//folly/logging:logging", - ], -) diff --git a/fboss/platform/fbdevd/FbdevdImpl.cpp b/fboss/platform/fbdevd/FbdevdImpl.cpp deleted file mode 100644 index d016f0e660e8e..0000000000000 --- a/fboss/platform/fbdevd/FbdevdImpl.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "fboss/platform/fbdevd/FbdevdImpl.h" - -#include -#include - -#include "fboss/platform/config_lib/ConfigLib.h" -#include "folly/Synchronized.h" - -namespace facebook::fboss::platform::fbdevd { -using namespace facebook::fboss::platform::fbdevd; - -void FbdevdImpl::initPlatformConfig() { - std::string fbdevdConfJson = ConfigLib().getFbdevdConfig(); - apache::thrift::SimpleJSONSerializer::deserialize( - fbdevdConfJson, fbdevdConfig_); - - XLOG(DBG2) << apache::thrift::SimpleJSONSerializer::serialize( - fbdevdConfig_); -} - -FbdevdImpl::~FbdevdImpl() = default; - -} // namespace facebook::fboss::platform::fbdevd diff --git a/fboss/platform/fbdevd/FbdevdImpl.h b/fboss/platform/fbdevd/FbdevdImpl.h deleted file mode 100644 index 6305cdc3a05fe..0000000000000 --- a/fboss/platform/fbdevd/FbdevdImpl.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include "fboss/platform/fbdevd/if/gen-cpp2/fbdevd_types.h" - -namespace facebook::fboss::platform::fbdevd { - -using namespace facebook::fboss::platform::fbdevd; - -class FbdevdImpl { - public: - ~FbdevdImpl(); - explicit FbdevdImpl() { - initPlatformConfig(); - } - - private: - FbdevdConfig fbdevdConfig_; - - void initPlatformConfig(); -}; - -} // namespace facebook::fboss::platform::fbdevd diff --git a/fboss/platform/fbdevd/FruManager.cpp b/fboss/platform/fbdevd/FruManager.cpp deleted file mode 100644 index c9f514edda225..0000000000000 --- a/fboss/platform/fbdevd/FruManager.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -#include - -#include "fboss/platform/fbdevd/FruManager.h" -#include "fboss/platform/fbdevd/I2cController.h" - -namespace facebook::fboss::platform::fbdevd { - -FruManager::FruManager(const FruModule& fru) { - // TODO: store FruModule(thrift) structure for future reference. - - // Process FRU hotplug event for the first time. - processEvents(); -} - -bool FruManager::isPresent() { - // TODO: determine if the FRU is plugged/removed by reading FruModule - // "fruState" config. - return true; -} - -void FruManager::processEvents() { - bool curState = isPresent(); - - if (curState != isPresent_) { - if (curState) { - // Handle newly-plugged FRU - // TODO: - // 1. trigger FruModule.initOps - // 2. create i2c client devices - } else { - // Handle FRU removal event - // TODO: - // 1. remove i2c client devices - // 2. trigger FruModule.cleanupOps - } - - isPresent_ = curState; - } -} -} // namespace facebook::fboss::platform::fbdevd diff --git a/fboss/platform/fbdevd/FruManager.h b/fboss/platform/fbdevd/FruManager.h deleted file mode 100644 index 66e6c197edb7f..0000000000000 --- a/fboss/platform/fbdevd/FruManager.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -#pragma once - -#include - -#include "fboss/platform/fbdevd/if/gen-cpp2/FbdevManager.h" - -namespace facebook::fboss::platform::fbdevd { - -class FruManager { - public: - explicit FruManager(const FruModule& fru); - ~FruManager() = default; - - // Test if the FRU is present/connected or not. - bool isPresent(); - - // processEvents() function need to be triggered periodically to detect - // and handle FRU hotplug events. - void processEvents(); - - private: - bool isPresent_ = false; // Assume FRU is unplugged at "fbdevd" starts. -}; -} // namespace facebook::fboss::platform::fbdevd diff --git a/fboss/platform/fbdevd/I2cController.cpp b/fboss/platform/fbdevd/I2cController.cpp deleted file mode 100644 index db327dcc888a7..0000000000000 --- a/fboss/platform/fbdevd/I2cController.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -#include - -#include "fboss/lib/CommonFileUtils.h" -#include "fboss/lib/DevMap.h" -#include "fboss/platform/fbdevd/I2cController.h" - -namespace fs = std::filesystem; - -namespace facebook::fboss::platform::fbdevd { - -bool I2cController::isDeviceCreated(uint16_t addr) { - return createdDevices_.find(addr) != createdDevices_.end(); -} - -void I2cController::newDevice(uint16_t addr, const std::string& name) { - if (isDeviceCreated(addr)) { - return; - } - - // Send "name address" string to the sysfs file to initiate device - // creation. - std::string inStr = name + " " + std::to_string(addr); - if (!facebook::fboss::writeSysfs(sysI2cNewDevice_.string(), inStr)) { - throw std::runtime_error(fmt::format( - "I2C bus {}: failed to create device at address {}", busName_, addr)); - } - - createdDevices_.insert(addr); -} - -void I2cController::deleteDevice(uint16_t addr) { - if (!isDeviceCreated(addr)) { - return; - } - - // Send "address" string to the sysfs file to delete the I2C device. - std::string addrStr = std::to_string(addr); - if (!facebook::fboss::writeSysfs(sysI2cDelDevice_.string(), addrStr)) { - throw std::runtime_error(fmt::format( - "I2C bus {}: failed to delete device at address {}", busName_, addr)); - } - - createdDevices_.erase(addr); -} - -I2cController::I2cController(const std::string& busName) { - busName_ = busName; - sysI2cBusDir_ = facebook::fboss::resolveI2cSysfs(busName); - if (!fs::exists(sysI2cBusDir_)) { - throw std::runtime_error(busName + " sysfs/i2c path does not exist"); - } - - // Initialize "createdDevices_" set by looking for device entries in - // "sysI2cBusDir_" whose name starts with "-". - // - "sysI2cBusDir" format: /sys/bus/i2c/devices/i2c- - // - device entries under "sysI2cBusDir": -<4-byte-hex-addr> - std::string busId = sysI2cBusDir_.filename().string(); - std::string busPrefix = "i2c-"; - std::string devPrefix = busId.substr(busPrefix.length()) + "-"; - for (auto const& dirEntry : fs::directory_iterator(sysI2cBusDir_)) { - std::string fileName = dirEntry.path().filename().string(); - if (fileName.find(devPrefix) == 0) { - std::string addrStr = fileName.substr(devPrefix.length()); - uint16_t addr = std::stoul(addrStr, nullptr, 16); - createdDevices_.insert(addr); - } - } - - // Store below 2 files for easier reference in new|deleteDevice(). - sysI2cNewDevice_ = sysI2cBusDir_ / "new_device"; - sysI2cDelDevice_ = sysI2cBusDir_ / "delete_device"; -} -} // namespace facebook::fboss::platform::fbdevd diff --git a/fboss/platform/fbdevd/I2cController.h b/fboss/platform/fbdevd/I2cController.h deleted file mode 100644 index c2af0161eefe3..0000000000000 --- a/fboss/platform/fbdevd/I2cController.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -#pragma once - -#include -#include -#include - -// This file contains APIs to create/delete I2C client devices via the -// Linux sysfs interface. For details, please refer to: -// https://www.kernel.org/doc/Documentation/i2c/instantiating-devices - -namespace facebook::fboss::platform::fbdevd { - -class I2cController { - public: - explicit I2cController(const std::string& busName); - ~I2cController() = default; - - // Test if I2C client device at given "addr" was already created. - bool isDeviceCreated(uint16_t addr); - - // Create I2C client device at "addr" with given "name". - void newDevice(uint16_t addr, const std::string& name); - - // Remove the I2C client device at "addr" from the bus. - void deleteDevice(uint16_t addr); - - private: - std::string busName_{}; - std::filesystem::path sysI2cBusDir_{}; - std::filesystem::path sysI2cNewDevice_{}; - std::filesystem::path sysI2cDelDevice_{}; - std::set createdDevices_ = {}; -}; - -} // namespace facebook::fboss::platform::fbdevd diff --git a/fboss/platform/fbdevd/Main.cpp b/fboss/platform/fbdevd/Main.cpp deleted file mode 100644 index 4af93fcc111a9..0000000000000 --- a/fboss/platform/fbdevd/Main.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -#include -#include -#include -#include - -#include "fboss/platform/fbdevd/FbdevdImpl.h" -#include "fboss/platform/fbdevd/if/gen-cpp2/FbdevManager.h" -#include "fboss/platform/helpers/Init.h" - -using namespace facebook; -using namespace facebook::fboss::platform; -using namespace facebook::fboss::platform::fbdevd; - -FOLLY_INIT_LOGGING_CONFIG("fboss=DBG2; default:async=true"); - -int main(int argc, char** argv) { - fb303::registerFollyLoggingOptionHandlers(); - helpers::init(&argc, &argv); - - auto serviceImpl = std::make_shared(); - - // Set up scheduler. - folly::FunctionScheduler scheduler; - scheduler.start(); - - return 0; -} diff --git a/fboss/platform/fbdevd/if/BUCK b/fboss/platform/fbdevd/if/BUCK deleted file mode 100644 index 2dc5f5131fd40..0000000000000 --- a/fboss/platform/fbdevd/if/BUCK +++ /dev/null @@ -1,39 +0,0 @@ -load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library") - -oncall("fboss_platform") - -thrift_library( - name = "gpio", - languages = [ - "cpp2", - "rust", - ], - thrift_cpp2_options = "json", - thrift_rust_options = ["deprecated_default_enum_min_i32"], - thrift_srcs = {"gpio.thrift": []}, -) - -thrift_library( - name = "i2c", - languages = [ - "cpp2", - "rust", - ], - thrift_cpp2_options = "json", - thrift_srcs = {"i2c.thrift": []}, -) - -thrift_library( - name = "fbdevd", - languages = [ - "cpp2", - "rust", - ], - thrift_cpp2_options = "json", - thrift_rust_options = ["deprecated_default_enum_min_i32"], - thrift_srcs = {"fbdevd.thrift": ["FbdevManager"]}, - deps = [ - ":gpio", - ":i2c", - ], -) diff --git a/fboss/platform/fbdevd/if/fbdevd.thrift b/fboss/platform/fbdevd/if/fbdevd.thrift deleted file mode 100644 index 29c66aac979c1..0000000000000 --- a/fboss/platform/fbdevd/if/fbdevd.thrift +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -namespace cpp2 facebook.fboss.platform.fbdevd - -include "fboss/platform/fbdevd/if/gpio.thrift" -include "fboss/platform/fbdevd/if/i2c.thrift" - -// This file contains data types for describing the hardware components -// and device topology of FBOSS switches. - -// "SysfsFileHandle" is designed for reading/writing sysfs files. -// - "sysfsPath" must be an absolute path, or a symlink to an absolute -// path. -// - If "isWrite" is true, "desiredValue" will be written to the sysfs -// entry. -// - If "isWrite" is false (default), it will trigger file read, and -// callers may compare the return data with "desiredValue". -// -// Please refer to below URLs for Linux sysfs interface: -// - https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt -// - https://www.kernel.org/doc/html/latest/admin-guide/sysfs-rules.html -struct SysfsFileHandle { - 1: string sysfsPath; - 2: string desiredValue; - 3: bool isWrite = false; -} - -// "SimpleIO" in this context refers to a simple (one-line) instruction, -// such as toggling a GPIO line, reading/writing a sysfs file, etc. -// Such instructions are widely used in FBOSS environment to configure -// hardware and/or determine the states of hardware components. -// Currently, only 2 operations are supported in "SimpleIO": -// - SIO_GPIO : setting/getting a GPIO line. -// - SIO_SYSFS: reading/writing a string from/to SYSFS file. -enum SimpleIoDeviceType { - SIO_GPIO = 1, - SIO_SYSFS = 2, -} - -union SimpleIoDevice { - 1: gpio.GpioLineHandle gpioHandle; - 2: SysfsFileHandle sysfsHandle; -} - -struct SimpleIoHandle { - 1: SimpleIoDeviceType ioType; - 2: SimpleIoDevice device; - - // If "delayMS" is set to a positive value, the corresponding delay ( - // in milliseconds) will be introduced after the SimpleIO. Otherwise, - // the field is ignored. - 3: i32 delayMs; -} - -enum ConditionType { - COND_GPIO_MATCH = 1, - COND_SYSFS_MATCH = 2, -} - -// "ConditionMatch" is used to define conditional statement, to test if -// a certain GPIO line or sysfs file reports desired value. -struct ConditionMatch { - 1: ConditionType condType; - 2: SimpleIoDevice device; -} - -// Trigger a list of SimpleIO when a certain condition is met. -struct ConditionalSimpleIo { - 1: list actions; - 2: optional ConditionMatch isRequired; -} - -// "FruModule" is used to describe a FRU (Field Replaceable Unit). -struct FruModule { - 1: string fruName; - - // Check if a FRU is plugged/removed by testing if the given GPIO line - // or sysfs file reports the desired value. - 2: ConditionMatch fruState; - - // Instructions to initialize the FRU when it's plugged. - // It's normal to keep the lists empty. - 3: ConditionalSimpleIo initOps; - - // Instructions to clean up resources when the FRU is unplugged. - // It's normal to keep the lists empty. - 4: list cleanupOps; - - // I2C client devices on the FRU. The devices need to be created when - // the FRU is plugged, and will be removed when the FRU is unplugged. - 5: list i2cClients; - - // Nested FRUs if any. - 6: list childFruList; -} - -// Structure to describe a specific FBOSS switch. -struct FbdevdConfig { - 1: string platformName; - - // List of kernel modules that need to be loaded. It's no-op if the - // modules were already loaded. - 2: list kmods; - - // List of instructions to bootstrap the platform, such as toggling - // GPIOs, bringing devices out of reset, etc. - // It's normal to have empty "bootstrap". - 3: ConditionalSimpleIo bootstrap; - - // I2C client devices on the chassis that need to be instantiated after - // system boot up. It's no-op if some devices were already created, and - // we don't remove these devices when "fbdevd" exits. - 4: list i2cClients; - - // List of FRUs. - 5: list fruList; -} - -// No service functions at present. -service FbdevManager { -} diff --git a/fboss/platform/fbdevd/if/gpio.thrift b/fboss/platform/fbdevd/if/gpio.thrift deleted file mode 100644 index 309ca9072c3e5..0000000000000 --- a/fboss/platform/fbdevd/if/gpio.thrift +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -namespace cpp2 facebook.fboss.platform.fbdevd.gpio - -enum GpioValue { - GPIO_LOW = 0, - GPIO_HIGH = 1, -} - -enum GpioDirection { - GPIO_DIR_OUT = 0, - GPIO_DIR_IN = 1, -} - -// A GPIO line can be specified by either pair, or -// global-unique assigned in ACPI or Device Tree. -// - "gpioChip" must be the symlink name under /run/devmap/gpiochips/. -// - "lineName" is optional. If supplied, pair -// will be updated at runtime, based on the result of gpiofind. -// - GPIO lines are active high by default, unless "activeLow" is set -// to true explicitly. -struct GpioLine { - 1: string gpioChip; - 2: i32 offset; - 3: optional string lineName; - 4: bool activeLow = false; -} - -// Structure to deal with GPIO Line access (set/get GPIO). -// - If "isWrite" is True, the GPIO line's direction is set to OUT, -// and line level is updated to "desiredValue". -// - If "isWrite" is False, the GPIO line's direction is set to IN. The -// line is read, and callers may compare "desiredValue" with the -// current line level and take actions. -struct GpioLineHandle { - 1: GpioLine gLine; - 2: GpioValue desiredValue; - 3: bool isWrite = false; -} diff --git a/fboss/platform/fbdevd/if/i2c.thrift b/fboss/platform/fbdevd/if/i2c.thrift deleted file mode 100644 index d56eed1d2387b..0000000000000 --- a/fboss/platform/fbdevd/if/i2c.thrift +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -namespace cpp2 facebook.fboss.platform.fbdevd.i2c - -// "I2cClient" describes a I2C client (slave) device, such as I2C -// sensors, EEPROM, I/O Expander, etc. -// - "bus" must be the symlink under /run/devmap/i2c-busses/. -// - "deviceName" is the string for driver matching, such as tmp75. -struct I2cClient { - 1: string bus; - 2: i16 address; - 3: string deviceName; -} diff --git a/fboss/platform/platform_manager/platform_manager_config.thrift b/fboss/platform/platform_manager/platform_manager_config.thrift index d105588337fe7..dbb84b839f1d1 100644 --- a/fboss/platform/platform_manager/platform_manager_config.thrift +++ b/fboss/platform/platform_manager/platform_manager_config.thrift @@ -426,9 +426,6 @@ struct SlotTypeConfig { // this slot. Need not be described if there is no presence detection for this // slot // -// TODO: Enhance device presence logic based on SimpleIoDevice definition in -// fbdevd.thrift -// // `outgoingI2cBusNames`: is the list of the buses from the PmUnit perspective // which are going out in the slot. Refer to Bus Naming Convention above. struct SlotConfig { From 5c5901ece88a31fa40248772a16a69b3a1624386 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 24 Oct 2024 17:19:56 -0700 Subject: [PATCH 321/479] Add system port ranges api + UT on DsfNode struct Summary: as titled Reviewed By: zechengh09 Differential Revision: D64927297 Privacy Context Container: L1125642 fbshipit-source-id: 02adfdf01162e3689cfd2c23f0121a10d1c5173e --- fboss/agent/state/DsfNode.cpp | 5 +++++ fboss/agent/state/DsfNode.h | 3 +++ fboss/agent/state/tests/DsfNodeTests.cpp | 7 +++++++ 3 files changed, 15 insertions(+) diff --git a/fboss/agent/state/DsfNode.cpp b/fboss/agent/state/DsfNode.cpp index 9cb482d84f6e6..a4c07433e5351 100644 --- a/fboss/agent/state/DsfNode.cpp +++ b/fboss/agent/state/DsfNode.cpp @@ -75,6 +75,11 @@ std::optional DsfNode::getSystemPortRange() const { return sysPortRange; } +cfg::SystemPortRanges DsfNode::getSystemPortRanges() const { + auto ranges = get()->toThrift(); + return ranges; +} + std::optional DsfNode::getMac() const { std::optional mac; if (get().has_value()) { diff --git a/fboss/agent/state/DsfNode.h b/fboss/agent/state/DsfNode.h index 943c875c14c3a..14b894ccbb2bf 100644 --- a/fboss/agent/state/DsfNode.h +++ b/fboss/agent/state/DsfNode.h @@ -38,7 +38,10 @@ class DsfNode : public ThriftStructNode { } std::set getLoopbackIpsSorted() const; void setLoopbackIps(const std::vector& loopbackIps); + // TODO - deprecate getSystemPortRange in favor of + // getSystemPortRanges std::optional getSystemPortRange() const; + cfg::SystemPortRanges getSystemPortRanges() const; std::optional getMac() const; PlatformType getPlatformType() const; std::optional getClusterId() const; diff --git a/fboss/agent/state/tests/DsfNodeTests.cpp b/fboss/agent/state/tests/DsfNodeTests.cpp index 21a7541a4242d..ba86da25aaf28 100644 --- a/fboss/agent/state/tests/DsfNodeTests.cpp +++ b/fboss/agent/state/tests/DsfNodeTests.cpp @@ -267,3 +267,10 @@ TEST(DsfNode, localGlobalSysPortOffset) { ASSERT_TRUE(dsfNode->getGlobalSystemPortOffset().has_value()); EXPECT_EQ(dsfNode->getGlobalSystemPortOffset().value(), 43); } + +TEST(DsfNode, systemPortRanges) { + auto dsfNode = makeDsfNode(); + auto sysPortRanges = *dsfNode->getSystemPortRanges().systemPortRanges(); + EXPECT_FALSE(sysPortRanges.empty()); + EXPECT_EQ(sysPortRanges.size(), 1); +} From 0defadbe00e35de24f63ad29590b04df01f5a326 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 24 Oct 2024 17:19:56 -0700 Subject: [PATCH 322/479] Start asserting that systemPortRanges are non empty for intf nodes Summary: As titled. These nodes must always have a non-empty sys port range. Reviewed By: shri-khare, zechengh09 Differential Revision: D64928839 Privacy Context Container: L1125642 fbshipit-source-id: 76ffb977e1b6edd6ffd66247a10771e59caabed3 --- fboss/agent/ApplyThriftConfig.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 284319d079bd2..1106092ba69b4 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -1310,11 +1310,16 @@ std::shared_ptr ThriftConfigApplier::updateDsfNodes() { bool changed = false; for (const auto& idAndNode : *newNodes) { auto newNode = idAndNode.second; - if (newNode->isInterfaceNode() && - (!newNode->getLocalSystemPortOffset().has_value() || - !newNode->getGlobalSystemPortOffset().has_value())) { - throw FbossError( - "Local/Global system port offsets must be set for interface nodes"); + if (newNode->isInterfaceNode()) { + if (!newNode->getLocalSystemPortOffset().has_value() || + !newNode->getGlobalSystemPortOffset().has_value()) { + throw FbossError( + "Local/Global system port offsets must be set for interface nodes"); + } + if (newNode->getSystemPortRanges().systemPortRanges()->empty()) { + throw FbossError( + "System port range must be non-empty for interface nodes"); + } } auto origNode = origNodes->getNodeIf(newNode->getID()); if (!origNode || *origNode != *newNode) { From 4f7a6b38a56e500286e11e7c26b95e7923be2528 Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Thu, 24 Oct 2024 17:51:56 -0700 Subject: [PATCH 323/479] Enable all TYPED_TESTs for RecurseVisitor Summary: Enable all typed tests for RecurseVisitor on top of fix for template parameter handling in D64775849. Reviewed By: wilsonwinhi Differential Revision: D64902653 fbshipit-source-id: be467427ac37863175f9982122b32fffa0222259 --- fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp index 80a9b65f0d356..6ec3cecedfa6b 100644 --- a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp @@ -57,7 +57,7 @@ struct TestParams { static constexpr auto hybridStorage = EnableHybridStorage; }; -using StorageTestTypes = ::testing::Types>; +using StorageTestTypes = ::testing::Types, TestParams>; template class RecurseVisitorTests : public ::testing::Test { @@ -67,7 +67,7 @@ class RecurseVisitorTests : public ::testing::Test { using RootType = std::remove_cvref_t; return std::make_shared, + ThriftStructResolver, TestParams::hybridStorage>>(val); } bool isHybridStorage() { From fa15d0af6bdf1f92dadb77cc12c4fc392573d78c Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Thu, 24 Oct 2024 17:51:56 -0700 Subject: [PATCH 324/479] Remove compile time flag for hybrid cow tests Summary: With template param EnableHybridStorage, compile time flag to selectively enable hybrid node tests is no longer needed. Removing this flag, so that all further tests will be added either as typed tests or taking the storage type into account. Also updating test Thrift struct defs to move out test annotations from TestStruct which is used in multiple tests into a separate test struct. Reviewed By: wilsonwinhi Differential Revision: D64902652 fbshipit-source-id: 3be670d690aab906e365c7500102211544b78485 --- fboss/thrift_cow/nodes/tests/BUCK | 10 ++-------- .../tests/ThriftHybridStructNodeTests.cpp | 20 +++---------------- fboss/thrift_cow/nodes/tests/test.thrift | 6 +++++- fboss/thrift_cow/visitors/tests/BUCK | 16 +++------------ .../visitors/tests/PathVisitorTests.cpp | 2 -- 5 files changed, 13 insertions(+), 41 deletions(-) diff --git a/fboss/thrift_cow/nodes/tests/BUCK b/fboss/thrift_cow/nodes/tests/BUCK index c094910403968..bcc4c9c834f19 100644 --- a/fboss/thrift_cow/nodes/tests/BUCK +++ b/fboss/thrift_cow/nodes/tests/BUCK @@ -22,10 +22,7 @@ cpp_unittest( srcs = [ "ThriftHybridStructNodeTests.cpp", ], - preprocessor_flags = [ - "-DENABLE_DYNAMIC_APIS", - "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", - ], + preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], supports_static_listing = False, deps = [ ":test-cpp2-reflection", @@ -49,10 +46,7 @@ cpp_unittest( "ThriftStructNodeTests.cpp", "ThriftUnionNodeTests.cpp", ], - preprocessor_flags = [ - "-DENABLE_DYNAMIC_APIS", - "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", - ], + preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], supports_static_listing = False, deps = [ ":test-cpp2-reflection", diff --git a/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp b/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp index fed21264fa9ce..f7fb77b798e33 100644 --- a/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp +++ b/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp @@ -44,17 +44,15 @@ TYPED_TEST_SUITE_P(ThriftHybridStructNodeTestSuite); template void readThriftStructAnnotation() { -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - static_assert( - is_allow_skip_thrift_cow::value == - EnableHybridStorage); -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ static_assert( is_allow_skip_thrift_cow::value == false); static_assert( is_allow_skip_thrift_cow::value == false); + static_assert( + is_allow_skip_thrift_cow::value == + EnableHybridStorage); } TYPED_TEST_P(ThriftHybridStructNodeTestSuite, ReadThriftStructAnnotation) { @@ -71,11 +69,9 @@ void thriftStructNodeAnnotations() { EnableHybridStorage> fields; -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ static_assert( fields.template isSkipThriftCowEnabled() == EnableHybridStorage); -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ static_assert(fields.template isSkipThriftCowEnabled() == false); } { @@ -85,11 +81,9 @@ void thriftStructNodeAnnotations() { EnableHybridStorage> node; -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ ASSERT_EQ( node.template isSkipThriftCowEnabled(), EnableHybridStorage); -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ ASSERT_EQ(node.template isSkipThriftCowEnabled(), false); } // annotation that is other than `allow_skip_thrift_cow` @@ -116,7 +110,6 @@ void testHybridNodeTypes() { using underlying_type = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v>); // hybrid member -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ auto valHybrid = node.template get(); using underlying_type = folly::remove_cvref_t::ThriftType; @@ -129,7 +122,6 @@ void testHybridNodeTypes() { using ref_type = folly::remove_cvref_tref())>; static_assert(std::is_same_v>); } -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ } TYPED_TEST_P(ThriftHybridStructNodeTestSuite, TestHybridNodeTypes) { @@ -156,7 +148,6 @@ void thriftStructFieldsHybridMemberGetSet() { ASSERT_EQ(val->at(1), false); ASSERT_EQ(val->at(2), true); // hybrid member -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ fields.template set(*data); auto valHybrid = fields.template get(); static_assert( @@ -168,7 +159,6 @@ void thriftStructFieldsHybridMemberGetSet() { ASSERT_EQ(valHybrid->cref().at(1), false); ASSERT_EQ(valHybrid->cref().at(2), true); } -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ } TYPED_TEST_P( @@ -178,8 +168,6 @@ TYPED_TEST_P( thriftStructFieldsHybridMemberGetSet(); } -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - template void thriftStructFieldsHybridMemberToFromThrift() { ThriftStructFields< @@ -316,8 +304,6 @@ TYPED_TEST_P(ThriftHybridStructNodeTestSuite, TestHybridNodeMemberTypes) { testHybridNodeMemberTypes(); } -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ - using EnableHybridStorageTypes = testing::Types; REGISTER_TYPED_TEST_SUITE_P( diff --git a/fboss/thrift_cow/nodes/tests/test.thrift b/fboss/thrift_cow/nodes/tests/test.thrift index 57ac7efe3b869..ad2e9448151e3 100644 --- a/fboss/thrift_cow/nodes/tests/test.thrift +++ b/fboss/thrift_cow/nodes/tests/test.thrift @@ -71,7 +71,7 @@ struct TestStruct { allow_skip_thrift_cow = true, ); 33: map> hybridMapOfMap (allow_skip_thrift_cow = true); -} (allow_skip_thrift_cow = true) +} struct ParentTestStruct { 1: TestStruct childStruct; @@ -80,3 +80,7 @@ struct ParentTestStruct { struct TestStruct2 { 10: i32 deprecatedField (deprecated); } (deprecated, allow_skip_thrift_cow = false) + +struct TestStruct3 { + 1: i32 inlineInt; +} (allow_skip_thrift_cow) diff --git a/fboss/thrift_cow/visitors/tests/BUCK b/fboss/thrift_cow/visitors/tests/BUCK index 44ece127d82aa..3426e108e0fe0 100644 --- a/fboss/thrift_cow/visitors/tests/BUCK +++ b/fboss/thrift_cow/visitors/tests/BUCK @@ -11,7 +11,6 @@ cpp_library( headers = [ "VisitorTestUtils.h", ], - preprocessor_flags = ["-D__ENABLE_HYBRID_THRIFT_COW_TESTS__"], exported_deps = [ "//fboss/agent:switch_config-cpp2-reflection", "//fboss/thrift_cow/nodes/tests:test-cpp2-reflection", @@ -26,10 +25,7 @@ cpp_unittest( srcs = [ "PathVisitorTests.cpp", ], - preprocessor_flags = [ - "-DENABLE_DYNAMIC_APIS", - "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", - ], + preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], deps = [ "fbsource//third-party/googletest:gmock", ":visitor_test_utils", @@ -70,10 +66,7 @@ cpp_unittest( srcs = [ "DeltaVisitorTests.cpp", ], - preprocessor_flags = [ - "-DENABLE_DYNAMIC_APIS", - "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", - ], + preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], deps = [ "fbsource//third-party/googletest:gmock", ":visitor_test_utils", @@ -92,10 +85,7 @@ cpp_unittest( srcs = [ "RecurseVisitorTests.cpp", ], - preprocessor_flags = [ - "-DENABLE_DYNAMIC_APIS", - "-D__ENABLE_HYBRID_THRIFT_COW_TESTS__", - ], + preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], deps = [ "fbsource//third-party/googletest:gmock", "//fboss/thrift_cow/nodes:nodes", diff --git a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp index eb9fa554f025b..2ebf9c1c1c971 100644 --- a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp @@ -85,7 +85,6 @@ TEST(PathVisitorTests, AccessField) { EXPECT_TRUE(dyn.asBool()); } -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ TEST(PathVisitorTests, HybridMapPrimitiveAccess) { auto structA = createHybridMapTestStruct(); @@ -257,7 +256,6 @@ TEST(PathVisitorTests, HybridMapOfMapAccess) { "/", "/10/20", "/20", "/hybridMapOfMap/10/20"})); } } -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ TEST(PathVisitorTests, AccessFieldInContainer) { auto structA = createSimpleTestStruct(); From 51f7ac9e74c03b7f3043e9561ca40eae605a70a9 Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Thu, 24 Oct 2024 17:51:56 -0700 Subject: [PATCH 325/479] Convert DeltaVisitorTests to TYPED_TESTs Summary: Convert DeltaVisitorTests to TYPED_TESTs and enable for pure-COW and hybrid-COW storage types. Reviewed By: wilsonwinhi Differential Revision: D64902651 fbshipit-source-id: eab9c80def7261f5e64b48582872207183d5eaeb --- .../visitors/tests/DeltaVisitorTests.cpp | 89 ++++++++++++------- 1 file changed, 56 insertions(+), 33 deletions(-) diff --git a/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp index 3898af2e6bd8a..c8a757f1cfce9 100644 --- a/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp @@ -13,6 +13,7 @@ #include "fboss/thrift_cow/nodes/tests/gen-cpp2/test_fatal_types.h" using folly::dynamic; +using namespace testing; namespace { using namespace facebook::fboss; @@ -22,13 +23,35 @@ using PathTagSet = std::set>; namespace facebook::fboss::thrift_cow::test { -TEST(DeltaVisitorTests, ChangeOneField) { +template +struct TestParams { + static constexpr auto hybridStorage = EnableHybridStorage; +}; + +using StorageTestTypes = ::testing::Types, TestParams>; + +template +class DeltaVisitorTests : public ::testing::Test { + public: + auto initNode(auto val) { + auto constexpr isHybridStorage = TestParams::hybridStorage; + using RootType = std::remove_cvref_t; + return std::make_shared, + TestParams::hybridStorage>>(val); + } +}; + +TYPED_TEST_SUITE(DeltaVisitorTests, StorageTestTypes); + +TYPED_TEST(DeltaVisitorTests, ChangeOneField) { auto structA = createSimpleTestStruct(); auto structB = structA; structB.inlineInt() = false; - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -88,13 +111,13 @@ TEST(DeltaVisitorTests, ChangeOneField) { std::make_pair("/inlineInt", DeltaElemTag::MINIMAL)})); } -TEST(DeltaVisitorTests, ChangeOneFieldInContainer) { +TYPED_TEST(DeltaVisitorTests, ChangeOneFieldInContainer) { auto structA = createSimpleTestStruct(); auto structB = structA; structB.mapOfEnumToStruct()->at(TestEnum::THIRD).min() = 11; - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -126,13 +149,13 @@ TEST(DeltaVisitorTests, ChangeOneFieldInContainer) { std::make_pair("/mapOfEnumToStruct/3/min", DeltaElemTag::MINIMAL)})); } -TEST(DeltaVisitorTests, SetOptional) { +TYPED_TEST(DeltaVisitorTests, SetOptional) { auto structA = createSimpleTestStruct(); auto structB = structA; structB.optionalString() = "now I'm set"; - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -175,7 +198,7 @@ TEST(DeltaVisitorTests, SetOptional) { std::make_pair("/optionalString", DeltaElemTag::MINIMAL)})); } -TEST(DeltaVisitorTests, AddToMap) { +TYPED_TEST(DeltaVisitorTests, AddToMap) { auto structA = createSimpleTestStruct(); auto structB = structA; @@ -184,8 +207,8 @@ TEST(DeltaVisitorTests, AddToMap) { newOne.max() = 100; structB.mapOfEnumToStruct()->emplace(TestEnum::FIRST, std::move(newOne)); - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -234,7 +257,7 @@ TEST(DeltaVisitorTests, AddToMap) { "/mapOfEnumToStruct/1/invert", DeltaElemTag::NOT_MINIMAL)})); } -TEST(DeltaVisitorTests, UpdateMap) { +TYPED_TEST(DeltaVisitorTests, UpdateMap) { auto structA = createSimpleTestStruct(); auto structB = structA; @@ -250,8 +273,8 @@ TEST(DeltaVisitorTests, UpdateMap) { newOne.max() = 1000; structB.mapOfEnumToStruct()->emplace(TestEnum::FIRST, std::move(newOne)); - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -320,13 +343,13 @@ TEST(DeltaVisitorTests, UpdateMap) { })); } -TEST(DeltaVisitorTests, DeleteFromMap) { +TYPED_TEST(DeltaVisitorTests, DeleteFromMap) { auto structA = createSimpleTestStruct(); auto structB = structA; structB.mapOfEnumToStruct()->erase(TestEnum::THIRD); - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -375,7 +398,7 @@ TEST(DeltaVisitorTests, DeleteFromMap) { "/mapOfEnumToStruct/3/invert", DeltaElemTag::NOT_MINIMAL)})); } -TEST(DeltaVisitorTests, AddToList) { +TYPED_TEST(DeltaVisitorTests, AddToList) { auto structA = createSimpleTestStruct(); auto structB = structA; cfg::L4PortRange newOne; @@ -383,8 +406,8 @@ TEST(DeltaVisitorTests, AddToList) { newOne.max() = 100; structB.listOfStructs()->push_back(std::move(newOne)); - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -433,7 +456,7 @@ TEST(DeltaVisitorTests, AddToList) { "/listOfStructs/0/invert", DeltaElemTag::NOT_MINIMAL)})); } -TEST(DeltaVisitorTests, DeleteFromList) { +TYPED_TEST(DeltaVisitorTests, DeleteFromList) { auto structA = createSimpleTestStruct(); auto structB = structA; cfg::L4PortRange newOne; @@ -441,8 +464,8 @@ TEST(DeltaVisitorTests, DeleteFromList) { newOne.max() = 100; structB.listOfStructs()->push_back(std::move(newOne)); - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -491,13 +514,13 @@ TEST(DeltaVisitorTests, DeleteFromList) { "/listOfStructs/0/invert", DeltaElemTag::NOT_MINIMAL)})); } -TEST(DeltaVisitorTests, EditVariantField) { +TYPED_TEST(DeltaVisitorTests, EditVariantField) { auto structA = createSimpleTestStruct(); auto structB = structA; structB.inlineVariant()->inlineInt_ref() = 1000; - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -560,13 +583,13 @@ TEST(DeltaVisitorTests, EditVariantField) { std::make_pair("/21/2", DeltaElemTag::MINIMAL)})); } -TEST(DeltaVisitorTests, SwitchVariantField) { +TYPED_TEST(DeltaVisitorTests, SwitchVariantField) { auto structA = createSimpleTestStruct(); auto structB = structA; structB.inlineVariant()->inlineBool_ref() = true; - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -614,7 +637,7 @@ TEST(DeltaVisitorTests, SwitchVariantField) { std::make_pair("/inlineVariant/inlineBool", DeltaElemTag::MINIMAL)})); } -TEST(DeltaVisitorTests, SwitchVariantFieldToStruct) { +TYPED_TEST(DeltaVisitorTests, SwitchVariantFieldToStruct) { auto structA = createSimpleTestStruct(); cfg::L4PortRange newOne; @@ -624,8 +647,8 @@ TEST(DeltaVisitorTests, SwitchVariantFieldToStruct) { auto structB = structA; structB.inlineVariant()->inlineStruct_ref() = std::move(newOne); - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, From a336990f4c6190ce19119b7315a4c35fe42d98a6 Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Thu, 24 Oct 2024 17:51:56 -0700 Subject: [PATCH 326/479] CowStorageTests coverage for hybrid storage Summary: Convert CowStorageTests to TYPED_TEST with coverage for pure-COW and hybrid storage types. Reviewed By: wilsonwinhi Differential Revision: D64907860 fbshipit-source-id: fb1713917a55ecb466cc95da49030f1477ad48ed --- .../storage/tests/CowStorageTests.cpp | 108 +++++++++++------- 1 file changed, 68 insertions(+), 40 deletions(-) diff --git a/fboss/thrift_cow/storage/tests/CowStorageTests.cpp b/fboss/thrift_cow/storage/tests/CowStorageTests.cpp index 2e841cb9759b3..483577fcb8d40 100644 --- a/fboss/thrift_cow/storage/tests/CowStorageTests.cpp +++ b/fboss/thrift_cow/storage/tests/CowStorageTests.cpp @@ -15,6 +15,7 @@ #include "fboss/fsdb/tests/gen-cpp2/thriftpath_test_types.h" using folly::dynamic; +using namespace testing; namespace { @@ -56,8 +57,8 @@ template struct IsPublishable()->publish())>> : std::true_type {}; -template -void publishAllNodes(CowStorage& storage) { +template +void publishAllNodes(CowStorage& storage) { using namespace facebook::fboss::thrift_cow; auto root = storage.root(); RootRecurseVisitor::visit( @@ -80,14 +81,40 @@ OperDeltaUnit createEmptyDeltaUnit(std::vector path) { } // namespace -TEST(CowStorageTests, GetThrift) { +template +struct TestParams { + static constexpr auto hybridStorage = EnableHybridStorage; +}; + +using StorageTestTypes = ::testing::Types, TestParams>; + +template +class CowStorageTests : public ::testing::Test { + public: + auto initStorage(auto val) { + auto constexpr isHybridStorage = TestParams::hybridStorage; + using RootType = std::remove_cvref_t; + return CowStorage< + RootType, + facebook::fboss::thrift_cow::ThriftStructNode< + RootType, + facebook::fboss::thrift_cow:: + ThriftStructResolver, + isHybridStorage>>(val); + } +}; + +TYPED_TEST_SUITE(CowStorageTests, StorageTestTypes); + +TYPED_TEST(CowStorageTests, GetThrift) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; auto testStruct = facebook::thrift::from_dynamic( createTestDynamic(), facebook::thrift::dynamic_format::JSON_1); - auto storage = CowStorage(testStruct); + + auto storage = this->initStorage(testStruct); EXPECT_EQ(storage.get(root.tx()).value(), true); EXPECT_EQ(storage.get(root.rx()).value(), false); @@ -97,14 +124,14 @@ TEST(CowStorageTests, GetThrift) { EXPECT_EQ(storage.get(root).value(), testStruct); } -TEST(CowStorageTests, GetEncoded) { +TYPED_TEST(CowStorageTests, GetEncoded) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; auto testStruct = facebook::thrift::from_dynamic( createTestDynamic(), facebook::thrift::dynamic_format::JSON_1); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); auto result = storage.get_encoded(root.tx(), OperProtocol::SIMPLE_JSON); EXPECT_EQ( @@ -138,14 +165,14 @@ TEST(CowStorageTests, GetEncoded) { OperProtocol::SIMPLE_JSON, testStruct)); } -TEST(CowStorageTests, GetEncodedMetadata) { +TYPED_TEST(CowStorageTests, GetEncodedMetadata) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; auto testStruct = facebook::thrift::from_dynamic( createTestDynamic(), facebook::thrift::dynamic_format::JSON_1); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); auto result = storage.get_encoded(root.tx(), OperProtocol::SIMPLE_JSON); EXPECT_FALSE(result.hasError()); @@ -184,14 +211,14 @@ TEST(CowStorageTests, GetEncodedMetadata) { OperProtocol::SIMPLE_JSON, testStruct2)); } -TEST(CowStorageTests, SetThrift) { +TYPED_TEST(CowStorageTests, SetThrift) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; auto testStruct = facebook::thrift::from_dynamic( createTestDynamic(), facebook::thrift::dynamic_format::JSON_1); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); EXPECT_EQ(storage.get(root.tx()).value(), true); EXPECT_EQ(storage.get(root.rx()).value(), false); @@ -218,14 +245,14 @@ TEST(CowStorageTests, SetThrift) { EXPECT_EQ(storage.get(root.structMap()[3]).value(), newStructMapMember); } -TEST(CowStorageTests, AddDynamic) { +TYPED_TEST(CowStorageTests, AddDynamic) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; auto testStruct = facebook::thrift::from_dynamic( createTestDynamic(), facebook::thrift::dynamic_format::JSON_1); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); EXPECT_EQ(storage.get(root.tx()).value(), true); EXPECT_EQ(storage.get(root.rx()).value(), false); @@ -234,7 +261,7 @@ TEST(CowStorageTests, AddDynamic) { storage.get(root.structMap()[3]).value(), testStruct.structMap()->at(3)); } -TEST(CowStorageTests, RemoveThrift) { +TYPED_TEST(CowStorageTests, RemoveThrift) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; @@ -253,7 +280,7 @@ TEST(CowStorageTests, RemoveThrift) { (*testStruct.structMap())[2] = member2; (*testStruct.structList()) = {member2, member1, member1}; - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); EXPECT_EQ(storage.get(root.tx()).value(), true); EXPECT_EQ(storage.get(root.rx()).value(), false); @@ -288,7 +315,7 @@ TEST(CowStorageTests, RemoveThrift) { storage.get(root.structList()[5]).error(), StorageError::INVALID_PATH); } -TEST(CowStorageTests, PatchDelta) { +TYPED_TEST(CowStorageTests, PatchDelta) { using namespace facebook::fboss::fsdb; using namespace apache::thrift::type_class; @@ -296,7 +323,7 @@ TEST(CowStorageTests, PatchDelta) { auto testStruct = facebook::thrift::from_dynamic( createTestDynamic(), facebook::thrift::dynamic_format::JSON_1); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); // publish to ensure we can patch published storage storage.publish(); @@ -354,10 +381,10 @@ TEST(CowStorageTests, PatchDelta) { EXPECT_EQ(storage.get(root.enumMap()[TestEnum::FIRST].min()).value(), 2001); } -TEST(CowStorageTests, EncodedExtendedAccessFieldSimple) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessFieldSimple) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -372,10 +399,10 @@ TEST(CowStorageTests, EncodedExtendedAccessFieldSimple) { OperProtocol::SIMPLE_JSON, true)); } -TEST(CowStorageTests, EncodedExtendedAccessFieldInContainer) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessFieldInContainer) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -390,10 +417,10 @@ TEST(CowStorageTests, EncodedExtendedAccessFieldInContainer) { EXPECT_EQ(*got.max(), 200); } -TEST(CowStorageTests, EncodedExtendedAccessRegexMap) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessRegexMap) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -426,10 +453,10 @@ TEST(CowStorageTests, EncodedExtendedAccessRegexMap) { } } -TEST(CowStorageTests, EncodedExtendedAccessAnyMap) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessAnyMap) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -471,10 +498,10 @@ TEST(CowStorageTests, EncodedExtendedAccessAnyMap) { } } -TEST(CowStorageTests, EncodedExtendedAccessRegexList) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessRegexList) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -506,10 +533,10 @@ TEST(CowStorageTests, EncodedExtendedAccessRegexList) { } } -TEST(CowStorageTests, EncodedExtendedAccessAnyList) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessAnyList) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -542,10 +569,10 @@ TEST(CowStorageTests, EncodedExtendedAccessAnyList) { } } -TEST(CowStorageTests, EncodedExtendedAccessRegexSet) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessRegexSet) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -578,10 +605,10 @@ TEST(CowStorageTests, EncodedExtendedAccessRegexSet) { } } -TEST(CowStorageTests, EncodedExtendedAccessAnySet) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessAnySet) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -614,12 +641,12 @@ TEST(CowStorageTests, EncodedExtendedAccessAnySet) { } } -TEST(CowStorageTests, PatchRoot) { +TYPED_TEST(CowStorageTests, PatchRoot) { using namespace facebook::fboss::fsdb; using namespace facebook::fboss::thrift_cow; auto testStructA = createTestStruct(); - auto storage = CowStorage(testStructA); + auto storage = this->initStorage(testStructA); // In FSDB we only publish root, but just to test PatchApplier functionality, // publish all nodes and make sure we modify itermediate nodes properly publishAllNodes(storage); @@ -648,7 +675,7 @@ TEST(CowStorageTests, PatchRoot) { EXPECT_EQ(storage.root()->toThrift(), testStructB); // reset storage and patch just the one member - storage = CowStorage(testStructA); + storage = this->initStorage(testStructA); publishAllNodes(storage); auto memberNodeA = std::make_shared>( @@ -664,14 +691,15 @@ TEST(CowStorageTests, PatchRoot) { storage.patch(std::move(patch)); using k = thriftpath_test_tags::strings; EXPECT_EQ( - storage.root()->ref()->toThrift(), *testStructB.member()); + storage.root()->template ref()->toThrift(), + *testStructB.member()); } -TEST(SubscribableStorageTests, PatchInvalidDeltaPath) { +TYPED_TEST(CowStorageTests, PatchInvalidDeltaPath) { using namespace facebook::fboss::fsdb; auto testStructA = createTestStruct(); - auto storage = CowStorage(testStructA); + auto storage = this->initStorage(testStructA); OperDelta delta; OperDeltaUnit unit; @@ -689,13 +717,13 @@ TEST(SubscribableStorageTests, PatchInvalidDeltaPath) { EXPECT_EQ(storage.patch(delta), StorageError::INVALID_PATH); } -TEST(CowStorageTests, PatchEmptyDeltaNonexistentPath) { +TYPED_TEST(CowStorageTests, PatchEmptyDeltaNonexistentPath) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; auto testStructA = createTestStruct(); - auto storage = CowStorage(testStructA); + auto storage = this->initStorage(testStructA); EXPECT_EQ(storage.get(root.mapOfStructs())->size(), 0); EXPECT_EQ(storage.get(root.listofStructs())->size(), 0); From 4ade3a4e309bf2a130d6a7b8df01a35430f9d77e Mon Sep 17 00:00:00 2001 From: Ron He Date: Thu, 24 Oct 2024 21:39:34 -0700 Subject: [PATCH 327/479] Modify expected TxFir setting if zero preemphasis is enabled - third try Summary: Original diff D57993788 - we had issue on TH3 roundtrip tests, which got clarified during discussion with Brcm. Issue will be addressed in D64218169. As titled. Currently we set preemphasis to zero for port serdes, but did not maintain the zero preemphasis setting for next delta processing - this leads to resetting txFir to the desired values from platform mapping. Fix this by 1. Process change zero preemphasis setting prior to serdes programming. 2. Different handling for leaba and brcm a. Leaba requires remove and create for zero preemphasis b. Brcm requires direct setting of zero preemphasis but not accepting create. 3. For desired TxFir setting, if zero preemphasis is set, all Tx setting should be zero. Differential Revision: D64928567 fbshipit-source-id: 8a937f2cb2eb242f64aed34c562936dcb5103ec0 --- fboss/agent/hw/sai/switch/SaiPortManager.cpp | 77 +++++++++---------- fboss/agent/hw/sai/switch/SaiPortManager.h | 3 +- .../hw/sai/switch/npu/SaiPortManager.cpp | 61 ++++++++++----- .../hw/sai/switch/phy/SaiPortManager.cpp | 3 +- 4 files changed, 81 insertions(+), 63 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index 56eaa4d4251ea..2159a301993aa 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -2903,59 +2903,52 @@ void SaiPortManager::changeZeroPreemphasis( bool supportsZeroPreemphasis = platform_->getAsic()->isSupported( HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS); #endif + if (!supportsZeroPreemphasis) { return; } - auto gotAttributes = portHandle->port->attributes(); - auto numLanes = - std::get(gotAttributes) - .value() - .size(); - auto serDesAttributes = serdesAttributesFromSwPinConfigs( portHandle->port->adapterKey(), newPort->getPinConfigs(), - portHandle->serdes); - - auto setTxRxAttr = [](auto& attrs, auto type, const auto& val) { - auto& attr = std::get>>(attrs); - if (!val.empty()) { - attr = val; - } - }; - auto zeroVal = std::vector(numLanes, static_cast(0)); - if (platform_->getAsic()->isSupported( - HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS)) { - setTxRxAttr( - serDesAttributes, - SaiPortSerdesTraits::Attributes::Preemphasis{}, - zeroVal); - } else { - // Set three-tap values to zero - setTxRxAttr( - serDesAttributes, - SaiPortSerdesTraits::Attributes::TxFirPre1{}, - zeroVal); - setTxRxAttr( - serDesAttributes, - SaiPortSerdesTraits::Attributes::TxFirMain{}, - zeroVal); - setTxRxAttr( - serDesAttributes, - SaiPortSerdesTraits::Attributes::TxFirPost1{}, - zeroVal); - } + portHandle->serdes, + newPort->getZeroPreemphasis()); if (platform_->isSerdesApiSupported() && platform_->getAsic()->isSupported( HwAsic::Feature::SAI_PORT_SERDES_PROGRAMMING)) { - portHandle->serdes->setAttributes(serDesAttributes); +#ifdef TAJO_SAI_SDK + // TAJO requires recreating serdes object to zero peremphasis. + SaiPortSerdesTraits::AdapterHostKey serdesKey{ + portHandle->port->adapterKey()}; + auto& store = saiStore_->get(); + auto serdes = store.get(serdesKey); + portHandle->serdes.reset(); + serdes.reset(); + portHandle->serdes = store.setObject(serdesKey, serDesAttributes); +#else + // Brcm enforces main tap to be greater than all attributes. + // Hence set other attributes first, and then set main to zero. + auto setTxRxAttr = [](auto& attrs, auto type, const auto& val) { + auto& attr = + std::get>>(attrs); + if (!val.empty()) { + attr = val; + } + }; - // Read from HW to see if six-tap attribute changes after setting - // preemphasis. Then update sai store only. - reloadSixTapAttributes(portHandle, serDesAttributes); - portHandle->serdes->setAttributes( - serDesAttributes, /* skipHwWrite */ true); + auto nonZeroMainAttribute = serDesAttributes; + auto txMain = + std::get>( + serDesAttributes); + if (txMain.has_value()) { + setTxRxAttr( + nonZeroMainAttribute, + SaiPortSerdesTraits::Attributes::TxFirMain{}, + txMain.value().value()); + portHandle->serdes->setAttributes(nonZeroMainAttribute); + } + portHandle->serdes->setAttributes(serDesAttributes); +#endif } } } diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.h b/fboss/agent/hw/sai/switch/SaiPortManager.h index 75ce96ce86686..a2b5b5cbc6cc4 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.h +++ b/fboss/agent/hw/sai/switch/SaiPortManager.h @@ -156,7 +156,8 @@ class SaiPortManager { SaiPortSerdesTraits::CreateAttributes serdesAttributesFromSwPinConfigs( PortSaiId portSaid, const std::vector& pinConfigs, - const std::shared_ptr& serdes); + const std::shared_ptr& serdes, + bool zeroPreemphasis = false); const SaiPortHandle* getPortHandle(PortID swId) const; SaiPortHandle* getPortHandle(PortID swId); diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index aba779e83c98f..cb413aff5e83c 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -317,6 +317,9 @@ void SaiPortManager::changePortImpl( getPortAdapterHostKeyFromAttr(newAttributes)}; auto& portStore = saiStore_->get(); auto saiPort = portStore.setObject(portKey, newAttributes, newPort->getID()); + + changeZeroPreemphasis(oldPort, newPort); + programSerdes(saiPort, newPort, existingPort); // if vlan changed update it, this is important for rx processing if (newPort->getIngressVlan() != oldPort->getIngressVlan()) { @@ -340,7 +343,6 @@ void SaiPortManager::changePortImpl( changeSamplePacket(oldPort, newPort); changePfc(oldPort, newPort); changeRxLaneSquelch(oldPort, newPort); - changeZeroPreemphasis(oldPort, newPort); changeTxEnable(oldPort, newPort); programPfcBuffers(newPort); @@ -933,9 +935,26 @@ void SaiPortManager::programSerdes( << "some lanes are missing for rx-settings"; } + // Check if the platform supports setting zero preemphasis. + // TH4 and TH5 starts supporting zero preemphasis starting 11.0 +#if defined(BRCM_SAI_SDK_GTE_11_0) + bool supportsZeroPreemphasis = + platform_->getAsic()->isSupported( + HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS) || + platform_->getAsic()->getAsicType() == + cfg::AsicType::ASIC_TYPE_TOMAHAWK4 || + platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_TOMAHAWK5; +#else + bool supportsZeroPreemphasis = platform_->getAsic()->isSupported( + HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS); +#endif + SaiPortSerdesTraits::CreateAttributes serdesAttributes = serdesAttributesFromSwPinConfigs( - saiPort->adapterKey(), swPort->getPinConfigs(), serdes); + saiPort->adapterKey(), + swPort->getPinConfigs(), + serdes, + swPort->getZeroPreemphasis() && supportsZeroPreemphasis); if (serdes && checkPortSerdesAttributes(serdes->attributes(), serdesAttributes)) { portHandle->serdes = serdes; @@ -979,7 +998,8 @@ SaiPortSerdesTraits::CreateAttributes SaiPortManager::serdesAttributesFromSwPinConfigs( PortSaiId portSaiId, const std::vector& pinConfigs, - const std::shared_ptr& serdes) { + const std::shared_ptr& serdes, + bool zeroPreemphasis) { SaiPortSerdesTraits::CreateAttributes attrs; SaiPortSerdesTraits::Attributes::TxFirPre1::ValueType txPre1; @@ -1049,19 +1069,19 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( if (platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_YUBA) { if (auto firPre1 = tx->firPre1()) { - txPre1.push_back(*firPre1); + txPre1.push_back(zeroPreemphasis ? 0 : *firPre1); } if (auto firPre2 = tx->firPre2()) { - txPre2.push_back(*firPre2); + txPre2.push_back(zeroPreemphasis ? 0 : *firPre2); } if (auto firPre3 = tx->firPre3()) { - txPre3.push_back(*firPre3); + txPre3.push_back(zeroPreemphasis ? 0 : *firPre3); } if (auto firMain = tx->firMain()) { - txMain.push_back(*firMain); + txMain.push_back(zeroPreemphasis ? 0 : *firMain); } if (auto firPost1 = tx->firPost1()) { - txPost1.push_back(*firPost1); + txPost1.push_back(zeroPreemphasis ? 0 : *firPost1); } if (auto diffEncoderEn = tx->diffEncoderEn()) { txDiffEncoderEn.push_back(diffEncoderEn.value()); @@ -1088,28 +1108,28 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( txDriverSwing.push_back(driverSwing.value()); } } else { - txPre1.push_back(*tx->pre()); - txMain.push_back(*tx->main()); - txPost1.push_back(*tx->post()); + txPre1.push_back(zeroPreemphasis ? 0 : *tx->pre()); + txMain.push_back(zeroPreemphasis ? 0 : *tx->main()); + txPost1.push_back(zeroPreemphasis ? 0 : *tx->post()); if (FLAGS_sai_configure_six_tap && platform_->getAsic()->isSupported( HwAsic::Feature::SAI_CONFIGURE_SIX_TAP)) { - txPost2.push_back(*tx->post2()); - txPost3.push_back(*tx->post3()); - txPre2.push_back(*tx->pre2()); + txPost2.push_back(zeroPreemphasis ? 0 : *tx->post2()); + txPost3.push_back(zeroPreemphasis ? 0 : *tx->post3()); + txPre2.push_back(zeroPreemphasis ? 0 : *tx->pre2()); if (platform_->getAsic()->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { if (auto lutMode = tx->lutMode()) { - txLutMode.push_back(*lutMode); + txLutMode.push_back(zeroPreemphasis ? 0 : *lutMode); } } } if (auto pre3 = tx->pre3()) { - txPre3.push_back(*pre3); + txPre3.push_back(zeroPreemphasis ? 0 : *pre3); } if (auto driveCurrent = tx->driveCurrent()) { - txIDriver.push_back(driveCurrent.value()); + txIDriver.push_back(zeroPreemphasis ? 0 : driveCurrent.value()); } } } @@ -1308,10 +1328,13 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( setTxRxAttr(attrs, SaiPortSerdesTraits::Attributes::TxFirPre3{}, txPre3); } - if (platform_->getAsic()->getPortSerdesPreemphasis().has_value()) { + if (platform_->getAsic()->getPortSerdesPreemphasis().has_value() || + zeroPreemphasis) { SaiPortSerdesTraits::Attributes::Preemphasis::ValueType preempahsis( numExpectedTxLanes, - platform_->getAsic()->getPortSerdesPreemphasis().value()); + zeroPreemphasis + ? 0 + : platform_->getAsic()->getPortSerdesPreemphasis().value()); setTxRxAttr( attrs, SaiPortSerdesTraits::Attributes::Preemphasis{}, preempahsis); } diff --git a/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp index 4ed292be266e3..cdfb1d92225c5 100644 --- a/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp @@ -369,7 +369,8 @@ SaiPortSerdesTraits::CreateAttributes SaiPortManager::serdesAttributesFromSwPinConfigs( PortSaiId portSaiId, const std::vector& pinConfigs, - const std::shared_ptr& /* serdes */) { + const std::shared_ptr& /* serdes */, + bool /* zeroPreemphasis */) { SaiPortSerdesTraits::CreateAttributes attrs; SaiPortSerdesTraits::Attributes::TxFirPre1::ValueType txPre1; From 11d1388a7f5ba1abaab391366907946a02cb5159 Mon Sep 17 00:00:00 2001 From: Ron He Date: Thu, 24 Oct 2024 21:39:34 -0700 Subject: [PATCH 328/479] Fix setting maintap in zero preemphasis setting - third try Summary: Original diff D58880165 - we had issue on TH3 roundtrip tests, which got clarified during discussion with Brcm. Issue will be addressed in D64218169. As titled. The goal is to set preemphasis + all six-tap values to zero (except main), and then set main to zero. This is due to the check on yamp platform - ERROR: in BLACKHAWK, main TAP is expected to be greater than all other TAPs.ERROR:chip/blackhawk/tier1/blackhawk_tsc_config.c->blackhawk_tsc_validate_txfir_cfg() SerDes err_code = ERR_CODE_BAD_PTR_OR_INVALID_INPUT : 26 Fix this by first setting sixtap but keeping main the same, and then set main to zero. Differential Revision: D64928565 fbshipit-source-id: 1abedbc93ec9b1f27a99afdf0641d56898f1608a --- fboss/agent/hw/sai/switch/SaiPortManager.cpp | 21 +++++++------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index 2159a301993aa..3672bcea0b096 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -2928,25 +2928,18 @@ void SaiPortManager::changeZeroPreemphasis( #else // Brcm enforces main tap to be greater than all attributes. // Hence set other attributes first, and then set main to zero. - auto setTxRxAttr = [](auto& attrs, auto type, const auto& val) { - auto& attr = - std::get>>(attrs); - if (!val.empty()) { - attr = val; - } - }; - auto nonZeroMainAttribute = serDesAttributes; auto txMain = std::get>( - serDesAttributes); + portHandle->serdes->attributes()); if (txMain.has_value()) { - setTxRxAttr( - nonZeroMainAttribute, - SaiPortSerdesTraits::Attributes::TxFirMain{}, - txMain.value().value()); - portHandle->serdes->setAttributes(nonZeroMainAttribute); + std::get>( + nonZeroMainAttribute) = txMain.value().value(); + } else { + std::get>( + nonZeroMainAttribute) = std::nullopt; } + portHandle->serdes->setAttributes(nonZeroMainAttribute); portHandle->serdes->setAttributes(serDesAttributes); #endif } From 50837bc9278a1a6d2f5c5db243f1bd15c80a0f19 Mon Sep 17 00:00:00 2001 From: Ron He Date: Thu, 24 Oct 2024 21:39:34 -0700 Subject: [PATCH 329/479] Handle TH3 serdes creation with preemphasis zero - third try Summary: As discussed in CS00012356930, on TH3 devices we cannot create serdes with preemphasis zero along with other attributes. E.g. SaiApiError.h:67] [port] Failed to create sai entity PortSerdesSaiId(0): (PortId: 4294967297, Preemphasis: [0, 0], nullopt, TxFirPre1: [0, 0], nullopt, nullopt, TxFirMain: [0, 0], TxFirPost1: [0, 0], nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt, nullopt): INVALID PARAMETER Need to separately create serdes with preemphasis zero, then program other attributes if necessary. Differential Revision: D64928566 fbshipit-source-id: 6e73db31d6108530b3ddc89b3fe9888dec7dc87f --- fboss/agent/hw/sai/switch/SaiPortManager.h | 3 ++ .../hw/sai/switch/npu/SaiPortManager.cpp | 35 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.h b/fboss/agent/hw/sai/switch/SaiPortManager.h index a2b5b5cbc6cc4..43a84b8f4d2e5 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.h +++ b/fboss/agent/hw/sai/switch/SaiPortManager.h @@ -430,6 +430,9 @@ class SaiPortManager { double calculateRate(uint32_t speed); void updatePrbsStatsEntryRate(const std::shared_ptr& swPort); void resetCableLength(PortID portId); + void createSerdesWithZeroPreemphasis( + SaiPortHandle* portHandle, + const std::vector& pinConfigs); SaiStore* saiStore_; SaiManagerTable* managerTable_; diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index cb413aff5e83c..179cb1cb0e12c 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -971,6 +971,11 @@ void SaiPortManager::programSerdes( portHandle->serdes.reset(); serdes.reset(); } + if (platform_->getAsic()->getAsicType() == + cfg::AsicType::ASIC_TYPE_TOMAHAWK3 && + swPort->getZeroPreemphasis()) { + createSerdesWithZeroPreemphasis(portHandle, swPort->getPinConfigs()); + } // create if serdes doesn't exist or update existing serdes portHandle->serdes = store.setObject(serdesKey, serdesAttributes); @@ -1394,4 +1399,34 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( } return attrs; } + +void SaiPortManager::createSerdesWithZeroPreemphasis( + SaiPortHandle* portHandle, + const std::vector& pinConfigs) { + SaiPortSerdesTraits::CreateAttributes attributes; + + auto portSaiId = portHandle->port->adapterKey(); + std::get(attributes) = + static_cast(portSaiId); + + auto numExpectedTxLanes = 0; + for (const auto& pinConfig : pinConfigs) { + if (auto tx = pinConfig.tx()) { + ++numExpectedTxLanes; + } + } + + SaiPortSerdesTraits::Attributes::Preemphasis::ValueType preemphasis; + preemphasis.resize(numExpectedTxLanes, 0); + std::get>>( + attributes) = preemphasis; + SaiPortSerdesTraits::AdapterHostKey serdesKey{portSaiId}; + auto& store = saiStore_->get(); + portHandle->serdes = store.setObject(serdesKey, attributes); + + // Reload attributes + reloadSixTapAttributes(portHandle, attributes); + portHandle->serdes->setAttributes(attributes, true /* skipHwWrite */); +} } // namespace facebook::fboss From c5dd73203df4d7f432463e6b351f6716342c1e18 Mon Sep 17 00:00:00 2001 From: Cullen Walsh Date: Thu, 24 Oct 2024 22:25:36 -0700 Subject: [PATCH 330/479] Switch shims from vendor to external cell Summary: With this change, the shims repo will be disconnected from the build process of each project, and we will use buck2's native external cells feature instead. Reviewed By: bigfootjon Differential Revision: D64582392 fbshipit-source-id: b23894b5bf4dd8dfb20aecda29be341aa7c68f8f --- .buckconfig | 2 +- .../facebook/buck2-shims-meta/external_cell.buckconfig | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig diff --git a/.buckconfig b/.buckconfig index 0d4a2d16e445d..f7435c4c90e9f 100644 --- a/.buckconfig +++ b/.buckconfig @@ -1,6 +1,6 @@ [repositories] gh_facebook_fboss = . -gh_facebook_buck2_shims_meta = shim +shim_DISABLED = shim [repository_aliases] root = gh_facebook_fboss diff --git a/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig b/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig new file mode 100644 index 0000000000000..2b69a911f8ef4 --- /dev/null +++ b/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig @@ -0,0 +1,9 @@ +[cells] +gh_facebook_buck2_shims_meta = gh_facebook_buck2_shims_meta + +[external_cells] +gh_facebook_buck2_shims_meta = git + +[external_cell_gh_facebook_buck2_shims_meta] +git_origin = https://github.com/facebook/buck2-shims-meta.git +commit_hash = 971b2cb76e43b31983d868c6ccb9ee51c441f6e8 From 153edf0ccca4c6771ffe6ff7bfe823beacc8889c Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 24 Oct 2024 22:33:11 -0700 Subject: [PATCH 331/479] Voq tests - get system port id based on local/remote system port offsets Summary: As titled Reviewed By: zechengh09 Differential Revision: D64932086 fbshipit-source-id: 918899ef1c3e79497720fc6bf503eb0552d0f68e --- .../agent_hw_tests/AgentVoqSwitchTests.cpp | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp index b8d1adab9145f..3e7a48d18818d 100644 --- a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp @@ -250,15 +250,18 @@ class AgentVoqSwitchTest : public AgentHwTest { return txPacketSize; } - SystemPortID getSystemPortID(const PortDescriptor& port) { + SystemPortID getSystemPortID( + const PortDescriptor& port, + cfg::Scope portScope) { auto switchId = scopeResolver().scope(getProgrammedState(), port).switchId(); - auto sysPortRange = getProgrammedState() - ->getDsfNodes() - ->getNodeIf(switchId) - ->getSystemPortRange(); - CHECK(sysPortRange.has_value()); - return SystemPortID(port.intID() + *sysPortRange->minimum()); + const auto& dsfNode = + getProgrammedState()->getDsfNodes()->getNodeIf(switchId); + auto sysPortOffset = portScope == cfg::Scope::GLOBAL + ? dsfNode->getGlobalSystemPortOffset() + : dsfNode->getLocalSystemPortOffset(); + CHECK(sysPortOffset.has_value()); + return SystemPortID(port.intID() + *sysPortOffset); } std::string kDscpAclName() const { @@ -1056,7 +1059,7 @@ TEST_F(AgentVoqSwitchTest, sendPacketCpuAndFrontPanel) { getLatestPortStats(kPort.phyPortID()).get_queueOutBytes_()); }; auto getAllVoQOutBytes = [kPort, this]() { - return getLatestSysPortStats(getSystemPortID(kPort)) + return getLatestSysPortStats(getSystemPortID(kPort, cfg::Scope::GLOBAL)) .get_queueOutBytes_(); }; auto getAclPackets = [this]() { @@ -1478,7 +1481,7 @@ TEST_F(AgentVoqSwitchTest, verifyQueueLatencyWatermark) { utility::setPortTx(getAgentEnsemble(), kPort.phyPortID(), true); WITH_RETRIES({ auto queueLatencyWatermarkNsec = - *getLatestSysPortStats(getSystemPortID(kPort)) + *getLatestSysPortStats(getSystemPortID(kPort, cfg::Scope::GLOBAL)) .queueLatencyWatermarkNsec_(); XLOG(DBG2) << "Port: " << kPort.phyPortID() << " voq queueId: " << queueId << " latency watermark: " << queueLatencyWatermarkNsec[queueId] @@ -2093,7 +2096,7 @@ class AgentVoqSwitchFullScaleDsfNodesTest : public AgentVoqSwitchTest { // Resolve and return list of local nhops (only NIF ports) std::vector resolveLocalNhops( utility::EcmpSetupTargetedPorts6& ecmpHelper) { - std::vector portDescs = getLocalSysPortDesc(); + std::vector portDescs = getInterfacePortSysPortDesc(); applyNewState([&](const std::shared_ptr& in) { auto out = in->clone(); @@ -2141,7 +2144,7 @@ class AgentVoqSwitchFullScaleDsfNodesTest : public AgentVoqSwitchTest { return sysPortDescs; } - std::vector getLocalSysPortDesc() { + std::vector getInterfacePortSysPortDesc() { auto ports = getProgrammedState()->getPorts()->getAllNodes(); std::vector portDescs; std::for_each( @@ -2150,8 +2153,8 @@ class AgentVoqSwitchFullScaleDsfNodesTest : public AgentVoqSwitchTest { [this, &portDescs](const auto& idAndPort) { const auto port = idAndPort.second; if (port->getPortType() == cfg::PortType::INTERFACE_PORT) { - portDescs.push_back( - PortDescriptor(getSystemPortID(PortDescriptor(port->getID())))); + portDescs.push_back(PortDescriptor(getSystemPortID( + PortDescriptor(port->getID()), cfg::Scope::GLOBAL))); } }); return portDescs; @@ -2287,7 +2290,7 @@ TEST_F(AgentVoqSwitchFullScaleDsfNodesTest, remoteAndLocalLoadBalance) { auto verify = [&]() { std::vector sysPortDescs; auto remoteSysPortDescs = getRemoteSysPortDesc(); - auto localSysPortDescs = getLocalSysPortDesc(); + auto localSysPortDescs = getInterfacePortSysPortDesc(); sysPortDescs.insert( sysPortDescs.end(), From fd713e0b4daed0b7aee5556c5e0373c865b9b7a2 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 24 Oct 2024 22:33:11 -0700 Subject: [PATCH 332/479] Use globalSystemPortOffset for computing recycle port id Summary: As titled. Use the offset rather than sys port range min for computing recycle port id Reviewed By: shri-khare, zechengh09 Differential Revision: D64934155 Privacy Context Container: L1125642 fbshipit-source-id: a4f04740502f9b215849151e191c75938d758ae3 --- fboss/agent/Utils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 1b2255a589b2b..8fa9d48c5edbc 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -921,11 +921,11 @@ InterfaceID getRecyclePortIntfID( auto dsfNode = state->getDsfNodes()->getNodeIf(switchId); CHECK(dsfNode); - auto systemPortRange = dsfNode->getSystemPortRange(); - CHECK(systemPortRange.has_value()); + auto globalSystemPortOffset = dsfNode->getGlobalSystemPortOffset(); + CHECK(globalSystemPortOffset.has_value()); auto recyclePortId = - InterfaceID(*systemPortRange.value().minimum() + kRecyclePortIdOffset); + InterfaceID(*globalSystemPortOffset + kRecyclePortIdOffset); return recyclePortId; } From 21d877612837188d37683b0886d920ec1fd025e4 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 24 Oct 2024 22:33:11 -0700 Subject: [PATCH 333/479] s/getRecyclePortIntfID/getInbandPortIntfID Summary: As titled. We have more than one recycle port now, distinguish which recycle port is intended here. Reviewed By: nivinl Differential Revision: D64935864 Privacy Context Container: L1125642 fbshipit-source-id: 5316bd5fc374d30f175687761b814f0a8fd406d3 --- fboss/agent/Utils.cpp | 3 ++- fboss/agent/Utils.h | 2 +- .../agent/test/agent_hw_tests/MultiNodeAgentVoqSwitchTests.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 8fa9d48c5edbc..9ae6b7180fc40 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -915,12 +915,13 @@ std::string runShellCmd(const std::string& cmd) { return result; } -InterfaceID getRecyclePortIntfID( +InterfaceID getInbandPortIntfID( const std::shared_ptr& state, const SwitchID& switchId) { auto dsfNode = state->getDsfNodes()->getNodeIf(switchId); CHECK(dsfNode); + // Inband port is of Global scope by definition auto globalSystemPortOffset = dsfNode->getGlobalSystemPortOffset(); CHECK(globalSystemPortOffset.has_value()); diff --git a/fboss/agent/Utils.h b/fboss/agent/Utils.h index adf89a8d2c10b..598d2fe80dfa6 100644 --- a/fboss/agent/Utils.h +++ b/fboss/agent/Utils.h @@ -421,7 +421,7 @@ uint32_t getRemotePortOffset(const PlatformType platformType); std::string runShellCmd(const std::string& cmd); -InterfaceID getRecyclePortIntfID( +InterfaceID getInbandPortIntfID( const std::shared_ptr& state, const SwitchID& switchId); diff --git a/fboss/agent/test/agent_hw_tests/MultiNodeAgentVoqSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/MultiNodeAgentVoqSwitchTests.cpp index 8b1b2b3e41253..8d8bf150a1d67 100644 --- a/fboss/agent/test/agent_hw_tests/MultiNodeAgentVoqSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/MultiNodeAgentVoqSwitchTests.cpp @@ -77,7 +77,7 @@ TEST_F(MultiNodeAgentVoqSwitchTest, verifyInbandPing) { auto switchId = SwitchID(switchSettings->getSwitchIdToSwitchInfo().begin()->first); auto recyclePortIntfID = - getRecyclePortIntfID(getProgrammedState(), switchId); + getInbandPortIntfID(getProgrammedState(), switchId); auto recyclePortIntf = folly::to("fboss", recyclePortIntfID); auto cmd = folly::to( "/usr/sbin/fping6 -I ", recyclePortIntf, " ", ipAddrsToPing); From 4e97bd4aa639be79cd09f25f4d46bf56c13d325b Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 24 Oct 2024 22:33:11 -0700 Subject: [PATCH 334/479] Mirror local/global system port offset in switch info Summary: As titled. Same strategy as used in system port ranges Reviewed By: shri-khare Differential Revision: D64939299 Privacy Context Container: L1125642 fbshipit-source-id: a8e8f405ff503b220fc562706394805ece1ce026 --- fboss/agent/switch_config.thrift | 6 ++++++ fboss/fsdb/if/oss/fsdb_model_thriftpath.h | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/fboss/agent/switch_config.thrift b/fboss/agent/switch_config.thrift index 6800763f8ce7f..039c452701313 100644 --- a/fboss/agent/switch_config.thrift +++ b/fboss/agent/switch_config.thrift @@ -1632,6 +1632,12 @@ struct SwitchInfo { 6: optional string switchMac; 7: optional string connectionHandle; 8: SystemPortRanges systemPortRanges; + // Offset from where to start local system port + // ID allocation from + 9: optional i32 localSystemPortOffset; + // Offset from where to start global system port + // ID allocation from + 10: optional i32 globalSystemPortOffset; } /* diff --git a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h index ce022aa69d77f..fdaae20a33d92 100755 --- a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h +++ b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h @@ -17061,7 +17061,9 @@ std::pair>, std::pair>, std::pair>, -std::pair>>; +std::pair>, +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::SwitchType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>>, std::pair, Child<::facebook::fboss::cfg::AsicType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AsicType>>>, std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, @@ -17069,7 +17071,9 @@ std::pair, ChildThriftPath<::facebook::fboss::cfg::Range64, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::SystemPortRanges, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, ChildThriftPath<::facebook::fboss::cfg::SystemPortRanges, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -17078,7 +17082,9 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -17092,6 +17098,8 @@ std::pair auto operator()(const std::integral_constant&) { @@ -17103,6 +17111,8 @@ std::pair From 5d597e138391e1f859f47b61f98c01972411cebc Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 24 Oct 2024 23:28:40 -0700 Subject: [PATCH 335/479] Populate switch info sys port ranges and offset fields for test configs Summary: As titled Reviewed By: srikrishnagopu Differential Revision: D64944889 Privacy Context Container: L1125642 fbshipit-source-id: 9318898209cc089d3bb5055bf7d14ecc29c95990 --- fboss/agent/test/TestUtils.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fboss/agent/test/TestUtils.cpp b/fboss/agent/test/TestUtils.cpp index 7ec11dd7ec0d5..d305236abc1cd 100644 --- a/fboss/agent/test/TestUtils.cpp +++ b/fboss/agent/test/TestUtils.cpp @@ -1471,6 +1471,10 @@ cfg::SwitchInfo createSwitchInfo( systemPortRange.minimum() = *sysPortMin; systemPortRange.maximum() = *sysPortMax; switchInfo.systemPortRange() = systemPortRange; + switchInfo.systemPortRanges()->systemPortRanges()->push_back( + systemPortRange); + switchInfo.localSystemPortOffset() = *sysPortMin; + switchInfo.globalSystemPortOffset() = *sysPortMin; } if (mac) { switchInfo.switchMac() = *mac; From 051f2d3b0ce7ec9af3a23bb92398119c7dcb7377 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 24 Oct 2024 23:28:40 -0700 Subject: [PATCH 336/479] Populate local/global system port offset in switchIdToSWitchInfo for hw tests Summary: As titled Reviewed By: shri-khare, srikrishnagopu Differential Revision: D64945860 Privacy Context Container: L1125642 fbshipit-source-id: 3e55104f0d4282b729cf0bb74142dabda89a990f --- fboss/agent/test/utils/ConfigUtils.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fboss/agent/test/utils/ConfigUtils.cpp b/fboss/agent/test/utils/ConfigUtils.cpp index cd90b1836090a..7e194f6cf6ab3 100644 --- a/fboss/agent/test/utils/ConfigUtils.cpp +++ b/fboss/agent/test/utils/ConfigUtils.cpp @@ -770,6 +770,12 @@ cfg::SwitchConfig genPortVlanCfg( } if (asic->getSystemPortRange().has_value()) { switchInfo.systemPortRange() = *asic->getSystemPortRange(); + switchInfo.systemPortRanges()->systemPortRanges()->push_back( + *asic->getSystemPortRange()); + switchInfo.localSystemPortOffset() = + *asic->getSystemPortRange()->minimum(); + switchInfo.globalSystemPortOffset() = + *asic->getSystemPortRange()->minimum(); } defaultSwitchIdToSwitchInfo.insert({SwitchID(switchId), switchInfo}); populateSwitchInfo( From 3a251b2bf2225f270e4fce35be38f727e79d3000 Mon Sep 17 00:00:00 2001 From: Prasoon Patel Date: Fri, 25 Oct 2024 01:10:30 -0700 Subject: [PATCH 337/479] Adding API to check isUpdateHw Protected in macTableHandler Summary: As per title, adding API to check if update hw protected The API is called isUpdateHwProtected() and returns true if the platform supports hardware protection for MAC table updates. The API uses the transactionsSupported() API to check if the platform supports hardware transactions and returns true for SAI switches. Reviewed By: msomasundaran Differential Revision: D64576783 fbshipit-source-id: cfbe227dfe7a82a62d51256905ae5054ad877cee --- fboss/agent/MacTableManager.cpp | 8 ++++++++ fboss/agent/MacTableManager.h | 1 + 2 files changed, 9 insertions(+) diff --git a/fboss/agent/MacTableManager.cpp b/fboss/agent/MacTableManager.cpp index 047efce67ba4e..68773a7d148d3 100644 --- a/fboss/agent/MacTableManager.cpp +++ b/fboss/agent/MacTableManager.cpp @@ -18,6 +18,14 @@ namespace facebook::fboss { MacTableManager::MacTableManager(SwSwitch* sw) : sw_(sw) {} +bool MacTableManager::isHwUpdateProtected() { + // this API return true if the platform supports hw protection + // for this we are using transactionsSupported() API + // and return true for SAI switches. MAC protection uses transactions + // support in HW switch which is available only in SAI switches + return sw_->getHwSwitchHandler()->transactionsSupported(); +} + void MacTableManager::handleL2LearningUpdate( L2Entry l2Entry, L2EntryUpdateType l2EntryUpdateType) { diff --git a/fboss/agent/MacTableManager.h b/fboss/agent/MacTableManager.h index 0adfe3025eadd..215c5c1d48457 100644 --- a/fboss/agent/MacTableManager.h +++ b/fboss/agent/MacTableManager.h @@ -22,6 +22,7 @@ class MacTableManager { void handleL2LearningUpdate( L2Entry l2Entry, L2EntryUpdateType l2EntryUpdateType); + bool isHwUpdateProtected(); private: // Forbidden copy constructor and assignment operator From bbfa90613e236e454224a07290f25f3b5daea62e Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Fri, 25 Oct 2024 03:02:27 -0700 Subject: [PATCH 338/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/5d0cc90040c02b352853efd199116a9987cdc817 https://github.com/facebook/fb303/commit/219abefc2d8a6158d12837359b7a3880c0277991 https://github.com/facebook/fbthrift/commit/36ad9d3b3a93f1dbc85dd4058f594099f14b0049 https://github.com/facebook/folly/commit/16c2c41fec3b0d72c43e494d1c1e4f32776517bf https://github.com/facebook/mvfst/commit/eef79b12029a3b766f678acd61ff20d47825317c https://github.com/facebook/proxygen/commit/23a4134f14d42e80fb95b6cf2b72feb476e121a3 https://github.com/facebook/wangle/commit/1a09d7946acc259d3b018aee5aa6f22c6d1d2455 https://github.com/facebookexperimental/edencommon/commit/b1c60bd012248fce92a0417c74bf9b2ff6a569f4 https://github.com/facebookexperimental/rust-shed/commit/678550d885bda7d43784ac7cd15e0354abaaac6d https://github.com/facebookincubator/fizz/commit/9b87fa5629ccc516993921c6479484dcac2b8c32 Reviewed By: ajb85 fbshipit-source-id: 91e6461d2a6bdb3f18800d39455d2288d8e18380 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index c140cc34d806e..690dc9e0d3fa2 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 05db1baf2aad99a53a8f4bd741f04eeb2026f1d9 +Subproject commit 219abefc2d8a6158d12837359b7a3880c0277991 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index b61246c0a57c6..af07da2b7e0b8 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit a653fd8196f9720c406a594987e258c52c98e229 +Subproject commit 36ad9d3b3a93f1dbc85dd4058f594099f14b0049 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 5d81ec01d205b..21cc58d449711 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 097a5bd8084d056e823d5389389a18ca963167d4 +Subproject commit 16c2c41fec3b0d72c43e494d1c1e4f32776517bf diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index fed31f107decb..2b214f69aa53d 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 5aefd05bf887bcbfc04a683b5f19ec35d2ab2048 +Subproject commit 1a09d7946acc259d3b018aee5aa6f22c6d1d2455 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 099c4abb14132..37c1ba556f7ec 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit d757c69b3446cc10b23044c3a51efbe270ad5aea +Subproject commit 9b87fa5629ccc516993921c6479484dcac2b8c32 From 5d29dcde9852d70232de85775a9d0d100573862d Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Fri, 25 Oct 2024 09:32:19 -0700 Subject: [PATCH 339/479] Fix counter for number of unique subscribers Summary: Fix race in determining whether there is a single active subscription for a given subscriberId by checking for this while holding wlock on activeSubscriptions_. Note that for correct handling of forceSubscribe, activeSubscriptions_ will be removed in lieu of using SubscriptionManager as the SOT for active subscriptions. Differential Revision: D64932019 fbshipit-source-id: e39e318fd5d00de4540e0708b8bee2293ea7487e --- fboss/fsdb/server/ServiceHandler.cpp | 70 +++++++++++++++++----------- fboss/fsdb/server/ServiceHandler.h | 3 +- 2 files changed, 45 insertions(+), 28 deletions(-) diff --git a/fboss/fsdb/server/ServiceHandler.cpp b/fboss/fsdb/server/ServiceHandler.cpp index 64bdec5f4679a..10cf576fb489b 100644 --- a/fboss/fsdb/server/ServiceHandler.cpp +++ b/fboss/fsdb/server/ServiceHandler.cpp @@ -632,7 +632,8 @@ void validatePaths( void ServiceHandler::updateSubscriptionCounters( const OperSubscriberInfo& info, - bool isConnected) { + bool isConnected, + bool uniqueSubForClient) { auto connectedCountIncrement = isConnected ? 1 : -1; auto disconnectCountIncrement = isConnected ? -1 : 1; @@ -650,18 +651,8 @@ void ServiceHandler::updateSubscriptionCounters( counter != connectedSubscriptions_.end()) { counter->second.incrementValue(connectedCountIncrement); // per-subscriber counters: checks global subscription count - int nSubscriptions{0}; - activeSubscriptions_.withRLock( - [&clientId, &nSubscriptions](const auto& activeSubscriptions) { - for (const auto& it : activeSubscriptions) { - auto& subscription = it.second; - if (clientId == *subscription.subscriberId()) { - nSubscriptions++; - } - } - }); - bool isFirstSubscriptionConnected = isConnected && nSubscriptions == 1; - bool isLastSubscriptionDisconnected = !isConnected && nSubscriptions == 0; + bool isFirstSubscriptionConnected = isConnected && uniqueSubForClient; + bool isLastSubscriptionDisconnected = !isConnected && uniqueSubForClient; if (isFirstSubscriptionConnected || isLastSubscriptionDisconnected) { num_subscribers_.incrementValue(connectedCountIncrement); num_disconnected_subscribers_.incrementValue(disconnectCountIncrement); @@ -696,19 +687,34 @@ void ServiceHandler::registerSubscription( buildPathUnion(info), *info.type(), *info.isStats()); - if (FLAGS_forceRegisterSubscriptions || forceSubscribe) { - (*activeSubscriptions_.wlock())[std::move(key)] = info; - } else { - auto resp = activeSubscriptions_.wlock()->insert({std::move(key), info}); - if (!resp.second) { - throw Utils::createFsdbException( - FsdbErrorCode::ID_ALREADY_EXISTS, - "Dup subscriber id: ", - *info.subscriberId()); - } - } - updateSubscriptionCounters(info, true); + // update activeSubscriptions_ : TODO: move into SubscriptionManager + bool forceRegisterNewSubscription = + FLAGS_forceRegisterSubscriptions || forceSubscribe; + int numSubsForClient{0}; + activeSubscriptions_.withWLock( + [&key, &info, &numSubsForClient, forceRegisterNewSubscription]( + auto& activeSubscriptions) { + if (forceRegisterNewSubscription) { + activeSubscriptions[std::move(key)] = info; + } else { + auto resp = activeSubscriptions.insert({std::move(key), info}); + if (!resp.second) { + throw Utils::createFsdbException( + FsdbErrorCode::ID_ALREADY_EXISTS, + "Dup subscriber id: ", + *info.subscriberId()); + } + } + // check for existing subs by same SubscriberId + for (const auto& it : activeSubscriptions) { + if (std::get<0>(key) == *it.second.subscriberId()) { + numSubsForClient++; + } + } + }); + updateSubscriptionCounters(info, true, (numSubsForClient == 1)); } + void ServiceHandler::unregisterSubscription(const OperSubscriberInfo& info) { std::string pathStr; // TODO: handle extended path to string @@ -722,8 +728,18 @@ void ServiceHandler::unregisterSubscription(const OperSubscriberInfo& info) { buildPathUnion(info), *info.type(), *info.isStats()); - activeSubscriptions_.wlock()->erase(std::move(key)); - updateSubscriptionCounters(info, false); + int numSubsForClient{0}; + activeSubscriptions_.withWLock( + [&key, &numSubsForClient](auto& activeSubscriptions) { + // check for existing subs by same SubscriberId + for (const auto& it : activeSubscriptions) { + if (std::get<0>(key) == *it.second.subscriberId()) { + numSubsForClient++; + } + } + activeSubscriptions.erase(std::move(key)); + }); + updateSubscriptionCounters(info, false, (numSubsForClient == 1)); } folly::coro::AsyncGenerator&&> diff --git a/fboss/fsdb/server/ServiceHandler.h b/fboss/fsdb/server/ServiceHandler.h index ee5e900dc4a54..0bea52f6a8b81 100644 --- a/fboss/fsdb/server/ServiceHandler.h +++ b/fboss/fsdb/server/ServiceHandler.h @@ -210,7 +210,8 @@ class ServiceHandler : public FsdbServiceSvIf, void unregisterSubscription(const OperSubscriberInfo& info); void updateSubscriptionCounters( const OperSubscriberInfo& info, - bool isConnected); + bool isConnected, + bool uniqueSubForClient); void registerPublisher(const OperPublisherInfo& info); void unregisterPublisher( const OperPublisherInfo& info, From e9d534b246e39fb68888e8e2c6327f76158870ce Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Fri, 25 Oct 2024 09:33:10 -0700 Subject: [PATCH 340/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/908b70fccd0fec28ed423f1bf26e6a690f5af93e https://github.com/facebook/fb303/commit/7857d6cbf9ce503127853e813c0cda97f94b3679 https://github.com/facebook/fbthrift/commit/2e08d21959f84ddb84967addfadd7861875d7542 https://github.com/facebook/mvfst/commit/66a621d10e8c4f2330c0f04156e69dd7a9241618 https://github.com/facebook/proxygen/commit/89e23d08feef85ac9022be08305c3cceaab6f200 https://github.com/facebook/wangle/commit/39eea114fbcace505bce2dead228b7cb1e6c2895 https://github.com/facebookexperimental/edencommon/commit/129bb3b5b740e6ca85c9c624f544019b82a60555 https://github.com/facebookexperimental/rust-shed/commit/39641fe9538d39374d5bbd1ed521f0b21f4c06c5 https://github.com/facebookincubator/fizz/commit/8f1a9c02f49bb7ea986d0fa3350b17c284d37026 Reviewed By: ajb85 fbshipit-source-id: edf77148b765a33148471f982839168c2d7e0142 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 690dc9e0d3fa2..d93d80c5f4ead 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 219abefc2d8a6158d12837359b7a3880c0277991 +Subproject commit 7857d6cbf9ce503127853e813c0cda97f94b3679 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index af07da2b7e0b8..a246932f82e1b 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 36ad9d3b3a93f1dbc85dd4058f594099f14b0049 +Subproject commit 2e08d21959f84ddb84967addfadd7861875d7542 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 2b214f69aa53d..a357cba98646e 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 1a09d7946acc259d3b018aee5aa6f22c6d1d2455 +Subproject commit 39eea114fbcace505bce2dead228b7cb1e6c2895 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 37c1ba556f7ec..1ed7309f123db 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 9b87fa5629ccc516993921c6479484dcac2b8c32 +Subproject commit 8f1a9c02f49bb7ea986d0fa3350b17c284d37026 From 2ea3988482d947b86910f2cd4d186cc366385821 Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Fri, 25 Oct 2024 09:55:42 -0700 Subject: [PATCH 341/479] fix oss build errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Fixing ``` /var/FBOSS/tmp_bld_dir/repos/github.com-facebook-fboss.git/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp:66:20: error: unused variable ‘isHybridStorage’ [-Werror=unused-variable] /var/FBOSS/tmp_bld_dir/repos/github.com-facebook-fboss.git/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp:37:20: error: unused variable ‘isHybridStorage’ [-Werror=unused-variable] ``` Reviewed By: shri-khare Differential Revision: D64970029 fbshipit-source-id: f32b067722a04682e2ede07b56fa463437da4083 --- fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp | 1 - fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp index c8a757f1cfce9..5d7e69751ce4f 100644 --- a/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp @@ -34,7 +34,6 @@ template class DeltaVisitorTests : public ::testing::Test { public: auto initNode(auto val) { - auto constexpr isHybridStorage = TestParams::hybridStorage; using RootType = std::remove_cvref_t; return std::make_shared class RecurseVisitorTests : public ::testing::Test { public: auto initNode(auto val) { - auto constexpr isHybridStorage = TestParams::hybridStorage; using RootType = std::remove_cvref_t; return std::make_shared Date: Fri, 25 Oct 2024 12:35:31 -0700 Subject: [PATCH 342/479] Fix typod packages for ubuntu Summary: Discovered when testing ubuntu internally Reviewed By: zpao Differential Revision: D64981642 fbshipit-source-id: 30df778cbee1eb7d6494a5e382eb1db57574e365 --- shim/third-party/boost/BUCK | 2 +- shim/third-party/boost/boost.bzl | 4 +++- shim/third-party/libsodium/BUCK | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/shim/third-party/boost/BUCK b/shim/third-party/boost/BUCK index f9ab497e41fd2..a0d3bbf4bcca6 100644 --- a/shim/third-party/boost/BUCK +++ b/shim/third-party/boost/BUCK @@ -16,6 +16,7 @@ boost_libs( "lexical_cast", "multi_index", "preprocessor", + "program_options", "range", "sort", "variant", @@ -24,7 +25,6 @@ boost_libs( "container", "context", "filesystem", - "program_options", "random", "regex", "thread", diff --git a/shim/third-party/boost/boost.bzl b/shim/third-party/boost/boost.bzl index 5fb6f3b64f367..7b2836318953d 100644 --- a/shim/third-party/boost/boost.bzl +++ b/shim/third-party/boost/boost.bzl @@ -32,7 +32,9 @@ def boost_library(library: str, header_only: bool): name = "boost_{}".format(library), packages = { "//os:linux-fedora": ["boost-devel"], - "//os:linux-ubuntu": ["libboost-{}-dev".format(library)], + "//os:linux-ubuntu": [ + "libboost-dev" if header_only else "libboost-{}-dev".format(library), + ], "//os:macos-homebrew": ["boost"], }, exported_linker_flags = exported_linker_flags, diff --git a/shim/third-party/libsodium/BUCK b/shim/third-party/libsodium/BUCK index 915fb8bc4c5af..b2d8fe4f354a2 100644 --- a/shim/third-party/libsodium/BUCK +++ b/shim/third-party/libsodium/BUCK @@ -13,8 +13,8 @@ pkgconfig_system_library( name = "sodium", packages = { "//os:linux-fedora": ["libsodium-devel"], - "//os:linux-ubuntu": ["libsodium"], - "//os:macos-homebrew": ["libsodium-dev"], + "//os:linux-ubuntu": ["libsodium-dev"], + "//os:macos-homebrew": ["libsodium"], }, pkgconfig_name = "libsodium", ) From 7ca3011acfbb7049e2cce058758bde2ea0989697 Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Fri, 25 Oct 2024 13:45:49 -0700 Subject: [PATCH 343/479] Add RemoteInterfaces for second NPU when applying config Summary: This diff resurrects the previous changes in D54216265 to add remote interfaces to second when applying config. The previous diff did not do deep copy of the interface node resulting in creation of local neighbour entries on remote interface entries. This diff solves it by deepcopy Reviewed By: zechengh09 Differential Revision: D62511636 fbshipit-source-id: 0fb49f41366a5596294501838b238b16e0c35ae5 --- fboss/agent/ApplyThriftConfig.cpp | 83 ++++++++++-- fboss/agent/state/SwitchState.h | 4 +- fboss/agent/test/BUCK | 2 + .../agent/test/RemoteSystemInterfaceTests.cpp | 122 ++++++++++++++++++ 4 files changed, 196 insertions(+), 15 deletions(-) create mode 100644 fboss/agent/test/RemoteSystemInterfaceTests.cpp diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 1106092ba69b4..46bc1ab450abb 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -409,6 +409,9 @@ class ThriftConfigApplier { VlanOrIntfT* vlanOrIntf, const CfgVlanOrIntfT* config); std::shared_ptr updateInterfaces(); + std::shared_ptr updateRemoteInterfaces( + const std::shared_ptr& interfaces); + shared_ptr createInterface( const cfg::Interface* config, const Interface::Addresses& addrs); @@ -641,6 +644,7 @@ shared_ptr ThriftConfigApplier::run() { if (newIntfs) { new_->resetIntfs(toMultiSwitchMap( std::move(newIntfs), *cfg_, scopeResolver_)); + new_->resetRemoteIntfs(updateRemoteInterfaces(new_->getInterfaces())); changed = true; } } @@ -3786,6 +3790,57 @@ std::shared_ptr ThriftConfigApplier::updateInterfaces() { return std::make_shared(std::move(newIntfs)); } +std::shared_ptr +ThriftConfigApplier::updateRemoteInterfaces( + const std::shared_ptr& interfaces) { + if (scopeResolver_.hasVoq() && + scopeResolver_.scope(cfg::SwitchType::VOQ).size() <= 1) { + // remote system ports are applicable only for voq switches + // remote system ports are updated on config only when more than voq + // switches are configured on a given SwSwitch + return orig_->getRemoteInterfaces(); + } + auto remoteInterfaces = orig_->getRemoteInterfaces()->clone(); + + for (const auto& [matcher, interfaceMap] : std::as_const(*interfaces)) { + for (const auto& [intfID, intf] : std::as_const(*interfaceMap)) { + if (intf->getType() != cfg::InterfaceType::SYSTEM_PORT) { + continue; + } + auto remoteIntfScope = scopeResolver_.scope(cfg::SwitchType::VOQ); + remoteIntfScope.exclude(scopeResolver_.scope(intf, *cfg_).switchIds()); + auto remoteIntf = std::make_shared(); + remoteIntf->fromThrift(intf->toThrift()); + for (const auto& [ip, entry] : *remoteIntf->getArpTable()) { + entry->setIsLocal(false); + } + for (const auto& [ip, entry] : *remoteIntf->getNdpTable()) { + entry->setIsLocal(false); + } + if (remoteInterfaces->getNodeIf(intfID)) { + remoteInterfaces->updateNode(std::move(remoteIntf), remoteIntfScope); + } else { + remoteInterfaces->addNode(std::move(remoteIntf), remoteIntfScope); + } + } + } + + // check for deleted interfaces + for (const auto& [matcher, interfaceMap] : + std::as_const(*orig_->getInterfaces())) { + for (const auto& [intfID, intf] : std::as_const(*interfaceMap)) { + if (intf->getType() != cfg::InterfaceType::SYSTEM_PORT) { + continue; + } + if (!interfaces->getNodeIf(intfID)) { + remoteInterfaces->removeNode(intfID); + } + } + } + + return remoteInterfaces; +} + shared_ptr ThriftConfigApplier::createInterface( const cfg::Interface* config, const Interface::Addresses& addrs) { @@ -4260,8 +4315,9 @@ ThriftConfigApplier::updateMultiSwitchSettings() { auto origSwitchSettings = origMultiSwitchSettings->getNodeIf(matcher.matcherString()); - // If origmultiSwitchSettings is already populated, and if config carries - // switchId that is not present in origMultiSwitchSettings, throw error + // If origmultiSwitchSettings is already populated, and if config + // carries switchId that is not present in origMultiSwitchSettings, + // throw error if (origMultiSwitchSettings->size() != 0) { if (!origSwitchSettings) { throw FbossError("SwitchId cannot be changed on the fly"); @@ -4422,8 +4478,8 @@ shared_ptr ThriftConfigApplier::updateSwitchSettings( } // computeActualSwitchDrainState relies on minLinksToRemainInVOQDomain and - // minLinksToJoinVOQDomain. Thus, setting these fields must precede call to - // computeActualSwitchDrainState. + // minLinksToJoinVOQDomain. Thus, setting these fields must precede call + // to computeActualSwitchDrainState. std::optional newMinLinksToRemainInVOQDomain{std::nullopt}; if (cfg_->switchSettings()->minLinksToRemainInVOQDomain()) { if (newSwitchSettings->getSwitchIdsOfType(cfg::SwitchType::VOQ).size() == @@ -4719,9 +4775,9 @@ shared_ptr ThriftConfigApplier::updateControlPlane() { } } else { /* - * if cpuTrafficPolicy is not configured default to dataPlaneTrafficPolicy - * default i.e. with regards to QoS map configuration, treat CPU port like - * any front panel port. + * if cpuTrafficPolicy is not configured default to + * dataPlaneTrafficPolicy default i.e. with regards to QoS map + * configuration, treat CPU port like any front panel port. */ if (auto dataPlaneTrafficPolicy = cfg_->dataPlaneTrafficPolicy()) { if (auto defaultDataPlaneQosPolicy = @@ -4836,9 +4892,9 @@ Interface::Addresses ThriftConfigApplier::getInterfaceAddresses( } // NOTE: We do not want to leak link-local address into intfRouteTables_ - // TODO: For now we are allowing v4 LLs to be programmed because they are - // used within Galaxy for LL routing. This hack should go away once we - // move BGP sessions over non LL addresses + // TODO: For now we are allowing v4 LLs to be programmed because they + // are used within Galaxy for LL routing. This hack should go away once + // we move BGP sessions over non LL addresses if (intfAddr.first.isV6() and intfAddr.first.isLinkLocal()) { continue; } @@ -4846,7 +4902,8 @@ Interface::Addresses ThriftConfigApplier::getInterfaceAddresses( IPAddress::createNetwork(addr), std::make_pair(InterfaceID(*config->intfID()), intfAddr.first)); if (!ret2.second) { - // we get same network, only allow it if that is from the same interface + // we get same network, only allow it if that is from the same + // interface auto other = ret2.first->second.first; if (other != InterfaceID(*config->intfID())) { throw FbossError( @@ -5414,8 +5471,8 @@ folly::MacAddress ThriftConfigApplier::getLocalMac(SwitchID switchId) const { void ThriftConfigApplier::addRemoteIntfRoute() { // In order to resolve ECMP members pointing to remote nexthops, // also treat remote Interfaces as directly connected route in rib. - // HwSwitch will point remote nextHops as dropped such that switch does not - // attract traffic for remote nexthops. + // HwSwitch will point remote nextHops as dropped such that switch does + // not attract traffic for remote nexthops. for (const auto& remoteInterfaceMap : std::as_const(*orig_->getRemoteInterfaces())) { for (const auto& [_, remoteInterface] : diff --git a/fboss/agent/state/SwitchState.h b/fboss/agent/state/SwitchState.h index a61b0bef761d0..f8902acb7aa0d 100644 --- a/fboss/agent/state/SwitchState.h +++ b/fboss/agent/state/SwitchState.h @@ -522,6 +522,8 @@ class SwitchState : public ThriftStructNode { std::shared_ptr& getAclTablesForStage( const folly::dynamic& swJson); + void resetRemoteIntfs(const std::shared_ptr& intfs); + static std::shared_ptr fromThrift( const state::SwitchState& data); state::SwitchState toThrift() const; @@ -535,8 +537,6 @@ class SwitchState : public ThriftStructNode { static Type* modify(std::shared_ptr* state); private: - void resetRemoteIntfs(const std::shared_ptr& intfs); - template < typename MultiMapType, typename ThriftType = typename MultiMapType::Node::ThriftType> diff --git a/fboss/agent/test/BUCK b/fboss/agent/test/BUCK index bf780ebe3a72c..408efcb4b5cf4 100644 --- a/fboss/agent/test/BUCK +++ b/fboss/agent/test/BUCK @@ -38,6 +38,7 @@ cpp_unittest( "OperDeltaFilterTests.cpp", "PortUpdateHandlerTest.cpp", "ReachabilityGroupTests.cpp", + "RemoteSystemInterfaceTests.cpp", "RemoteSystemPortTests.cpp", "ResolvedNexthopMonitorTest.cpp", "ResourceAccountantTest.cpp", @@ -115,6 +116,7 @@ cpp_unittest( "//fboss/agent/test/utils:trap_packet_utils", "//fboss/fsdb/tests/utils:fsdb_test_server", "//fboss/lib:common_utils", + "//folly:dynamic", "//folly:memory", "//folly:move_wrapper", "//folly:network_address", diff --git a/fboss/agent/test/RemoteSystemInterfaceTests.cpp b/fboss/agent/test/RemoteSystemInterfaceTests.cpp new file mode 100644 index 0000000000000..2d6e3730d32a5 --- /dev/null +++ b/fboss/agent/test/RemoteSystemInterfaceTests.cpp @@ -0,0 +1,122 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/agent/test/HwTestHandle.h" +#include "fboss/agent/test/TestUtils.h" + +#include +#include + +namespace facebook::fboss { + +class RemoteSystemInterfaceTest : public ::testing::Test { + public: + void SetUp() override { + FLAGS_multi_switch = true; + auto config = initialConfig(); + handle_ = createTestHandle(&config); + sw_ = handle_->getSw(); + waitForStateUpdates(sw_); + } + + cfg::SwitchConfig initialConfig() const { + return testConfigB(); + } + + void TearDown() override { + sw_->stop(false, false); + } + + void verify(int expectedSize = 2) { + auto state = sw_->getState(); + auto local = state->getInterfaces(); + auto remote = state->getRemoteInterfaces(); + + EXPECT_EQ(remote->size(), expectedSize); + + auto intfs1 = state->getInterfaces()->getMapNodeIf( + HwSwitchMatcher(std::unordered_set{SwitchID(1)})); + auto intfs2 = state->getInterfaces()->getMapNodeIf( + HwSwitchMatcher(std::unordered_set{SwitchID(2)})); + + auto remoteIntfs1 = state->getRemoteInterfaces()->getMapNodeIf( + HwSwitchMatcher(std::unordered_set{SwitchID(1)})); + auto remoteIntfs2 = state->getRemoteInterfaces()->getMapNodeIf( + HwSwitchMatcher(std::unordered_set{SwitchID(2)})); + + for (auto intf : std::as_const(*intfs1)) { + auto intfID = intf.second->getID(); + EXPECT_NE(remoteIntfs2->getNodeIf(intfID), nullptr); + } + for (auto intf : std::as_const(*intfs2)) { + auto intfID = intf.second->getID(); + EXPECT_NE(remoteIntfs1->getNodeIf(intfID), nullptr); + } + } + + protected: + SwSwitch* sw_; + std::unique_ptr handle_; +}; + +TEST_F(RemoteSystemInterfaceTest, ConfigureSystemPortInterfaces) { + verify(); +} + +TEST_F(RemoteSystemInterfaceTest, ReConfigureSystemPortInterfaces) { + auto matchAll = sw_->getScopeResolver()->scope(cfg::SwitchType::VOQ); + ; + sw_->updateStateBlocking( + "Add System Interface", [=](const std::shared_ptr& state) { + auto newState = state->clone(); + auto remoteSysIntfs = state->getRemoteInterfaces()->modify(&newState); + remoteSysIntfs->addNode( + std::make_shared( + InterfaceID(512), + RouterID(0), + std::optional(std::nullopt), + folly::StringPiece("512"), + folly::MacAddress("00:02:00:00:00:01"), + 9000, + true, + true, + cfg::InterfaceType::SYSTEM_PORT), + matchAll); + remoteSysIntfs->addNode( + std::make_shared( + InterfaceID(513), + RouterID(0), + std::optional(std::nullopt), + folly::StringPiece("513"), + folly::MacAddress("00:02:00:00:00:02"), + 9000, + true, + true, + cfg::InterfaceType::SYSTEM_PORT), + matchAll); + return newState; + }); + + verify(3); + auto allRemoteSysIntfs0 = + sw_->getState()->getRemoteInterfaces()->getMapNodeIf(matchAll); + EXPECT_NE(nullptr, allRemoteSysIntfs0); + EXPECT_NE(0, allRemoteSysIntfs0->size()); + auto newCfg = initialConfig(); + for (auto port : *newCfg.ports()) { + port.minFrameSize() = 1024; + } + sw_->applyConfig("Reconfigure", newCfg); + verify(3); + auto allRemoteSysIntfs1 = + sw_->getState()->getRemoteInterfaces()->getMapNodeIf(matchAll); + EXPECT_NE(nullptr, allRemoteSysIntfs1); + EXPECT_EQ(allRemoteSysIntfs0, allRemoteSysIntfs1); + auto config = initialConfig(); + config.interfaces()->resize(0); + sw_->applyConfig("Remove System Interface", config); + waitForStateUpdates(sw_); + auto newRemoteSystemIntfs = sw_->getState()->getRemoteInterfaces(); + EXPECT_EQ(newRemoteSystemIntfs->getNodeIf(InterfaceID(101)), nullptr); +} + +} // namespace facebook::fboss From 146558712e90e85c0ea91680584f9e3023989173 Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Fri, 25 Oct 2024 13:45:49 -0700 Subject: [PATCH 344/479] Move dsfStateUpdater util neighbor update to a new method Summary: moving the neighbor update portion to a util so that it can be reused in remote neighbor handling for 2 npus case Reviewed By: zechengh09 Differential Revision: D64148361 fbshipit-source-id: 26ddb6f1426de559100bcf806d49b5a2e3cabfaa --- fboss/agent/DsfStateUpdaterUtil.cpp | 67 +++++++++++++++-------------- fboss/agent/DsfStateUpdaterUtil.h | 4 ++ 2 files changed, 38 insertions(+), 33 deletions(-) diff --git a/fboss/agent/DsfStateUpdaterUtil.cpp b/fboss/agent/DsfStateUpdaterUtil.cpp index 2abe00d5b24df..04e2a168e808a 100644 --- a/fboss/agent/DsfStateUpdaterUtil.cpp +++ b/fboss/agent/DsfStateUpdaterUtil.cpp @@ -33,20 +33,10 @@ std::shared_ptr updateFibForRemoteConnectedRoutes( namespace facebook::fboss { -std::shared_ptr DsfStateUpdaterUtil::getUpdatedState( - const std::shared_ptr& in, - const SwitchIdScopeResolver* scopeResolver, - RoutingInformationBase* rib, - const std::map>& - switchId2SystemPorts, - const std::map>& switchId2Intfs) { - bool changed{false}; - auto out = in->clone(); - IntfRouteTable remoteIntfRoutesToAdd; - boost::container:: - flat_map> - remoteIntfRoutesToDel; - +template +void DsfStateUpdaterUtil::updateNeighborEntry( + const TableT& oldTable, + const TableT& clonedTable) { auto skipProgramming = [&](const auto& nbrEntryIter) -> bool { // Local neighbor entry on one DSF node is remote neighbor entry on // every other DSF node. Thus, for neighbor entry received from other @@ -85,26 +75,37 @@ std::shared_ptr DsfStateUpdaterUtil::getUpdatedState( } }; - auto updateNeighborEntry = [&](const auto& oldTable, - const auto& clonedTable) { - auto nbrEntryIter = clonedTable->begin(); - while (nbrEntryIter != clonedTable->end()) { - if (skipProgramming(nbrEntryIter)) { - XLOG(DBG2) << "Skip programming remote neighbor: " - << nbrEntryIter->second->str(); - nbrEntryIter = clonedTable->erase(nbrEntryIter); - } else { - // Entries received from remote are non-Local on current node - nbrEntryIter->second->setIsLocal(false); - // Entries received from remote always need to be programmed - nbrEntryIter->second->setNoHostRoute(false); - updateResolvedTimestamp(oldTable, nbrEntryIter); - XLOG(DBG2) << "Program remote neighbor: " - << nbrEntryIter->second->str(); - ++nbrEntryIter; - } + auto nbrEntryIter = clonedTable->begin(); + while (nbrEntryIter != clonedTable->end()) { + if (skipProgramming(nbrEntryIter)) { + XLOG(DBG2) << "Skip programming remote neighbor: " + << nbrEntryIter->second->str(); + nbrEntryIter = clonedTable->erase(nbrEntryIter); + } else { + // Entries received from remote are non-Local on current node + nbrEntryIter->second->setIsLocal(false); + // Entries received from remote always need to be programmed + nbrEntryIter->second->setNoHostRoute(false); + updateResolvedTimestamp(oldTable, nbrEntryIter); + XLOG(DBG2) << "Program remote neighbor: " << nbrEntryIter->second->str(); + ++nbrEntryIter; } - }; + } +} + +std::shared_ptr DsfStateUpdaterUtil::getUpdatedState( + const std::shared_ptr& in, + const SwitchIdScopeResolver* scopeResolver, + RoutingInformationBase* rib, + const std::map>& + switchId2SystemPorts, + const std::map>& switchId2Intfs) { + bool changed{false}; + auto out = in->clone(); + IntfRouteTable remoteIntfRoutesToAdd; + boost::container:: + flat_map> + remoteIntfRoutesToDel; auto makeRemoteSysPort = [&](const auto& oldNode, const auto& newNode) { /* diff --git a/fboss/agent/DsfStateUpdaterUtil.h b/fboss/agent/DsfStateUpdaterUtil.h index 0807a66dfef33..ea240e78edc9b 100644 --- a/fboss/agent/DsfStateUpdaterUtil.h +++ b/fboss/agent/DsfStateUpdaterUtil.h @@ -20,6 +20,10 @@ class DsfStateUpdaterUtil { const std::map>& switchId2SystemPorts, const std::map>& switchId2Intfs); + template + static void updateNeighborEntry( + const TableT& oldTable, + const TableT& clonedTable); }; } // namespace facebook::fboss From 001444e48d98f61fcb607af0320f6275d9fd2dd8 Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Fri, 25 Oct 2024 13:45:49 -0700 Subject: [PATCH 345/479] Remote interface neighbour updater for two l3 npu case Summary: Local neighbor entries for one npu needs to be programmed as remote for the second. Update neighbor entries in remote interfaces for 2 npu case. Reviewed By: zechengh09 Differential Revision: D62660873 fbshipit-source-id: 5a64c13791b3d1205d4853bd062b1789d13cda1c --- cmake/Agent.cmake | 1 + fboss/agent/ApplyThriftConfig.cpp | 16 +-- fboss/agent/BUCK | 2 +- fboss/agent/DsfStateUpdaterUtil.cpp | 7 +- fboss/agent/RemoteNeighborUpdater.cpp | 97 +++++++++++++++++++ fboss/agent/RemoteNeighborUpdater.h | 24 +++++ fboss/agent/SwSwitch.cpp | 3 + fboss/agent/SwSwitch.h | 2 + .../agent/test/RemoteSystemInterfaceTests.cpp | 47 +++++++++ 9 files changed, 189 insertions(+), 10 deletions(-) create mode 100644 fboss/agent/RemoteNeighborUpdater.cpp create mode 100644 fboss/agent/RemoteNeighborUpdater.h diff --git a/cmake/Agent.cmake b/cmake/Agent.cmake index 0a0f5c022ff53..597d810c8b502 100644 --- a/cmake/Agent.cmake +++ b/cmake/Agent.cmake @@ -208,6 +208,7 @@ add_library(core fboss/agent/NeighborUpdaterImpl.cpp fboss/agent/NeighborUpdaterNoopImpl.cpp fboss/agent/PortUpdateHandler.cpp + fboss/agent/RemoteNeighborUpdater.cpp fboss/agent/ResolvedNexthopMonitor.cpp fboss/agent/ResolvedNexthopProbe.cpp fboss/agent/ResolvedNexthopProbeScheduler.cpp diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 46bc1ab450abb..ff746a2afc6d9 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -21,7 +21,8 @@ #include "fboss/agent/AclNexthopHandler.h" #include "fboss/agent/AgentFeatures.h" -#include "fboss/agent/AsicUtils.h" + +#include "fboss/agent/DsfStateUpdaterUtil.h" #include "fboss/agent/FbossError.h" #include "fboss/agent/HwAsicTable.h" #include "fboss/agent/LacpTypes.h" @@ -3811,12 +3812,13 @@ ThriftConfigApplier::updateRemoteInterfaces( remoteIntfScope.exclude(scopeResolver_.scope(intf, *cfg_).switchIds()); auto remoteIntf = std::make_shared(); remoteIntf->fromThrift(intf->toThrift()); - for (const auto& [ip, entry] : *remoteIntf->getArpTable()) { - entry->setIsLocal(false); - } - for (const auto& [ip, entry] : *remoteIntf->getNdpTable()) { - entry->setIsLocal(false); - } + auto oldRemoteInterface = remoteInterfaces->getNodeIf(intfID); + DsfStateUpdaterUtil::updateNeighborEntry( + oldRemoteInterface ? oldRemoteInterface->getArpTable() : nullptr, + remoteIntf->getArpTable()); + DsfStateUpdaterUtil::updateNeighborEntry( + oldRemoteInterface ? oldRemoteInterface->getNdpTable() : nullptr, + remoteIntf->getNdpTable()); if (remoteInterfaces->getNodeIf(intfID)) { remoteInterfaces->updateNode(std::move(remoteIntf), remoteIntfScope); } else { diff --git a/fboss/agent/BUCK b/fboss/agent/BUCK index c69e74cf6fda1..0beba444fd8f5 100644 --- a/fboss/agent/BUCK +++ b/fboss/agent/BUCK @@ -572,7 +572,6 @@ cpp_library( srcs = ["ApplyThriftConfig.cpp"], exported_deps = [ ":agent_features", - ":asic_utils", ":core", ":fboss-error", ":hw_asic_table", @@ -664,6 +663,7 @@ cpp_library( "NeighborUpdaterImpl.cpp", "NeighborUpdaterNoopImpl.cpp", "PortUpdateHandler.cpp", + "RemoteNeighborUpdater.cpp", "ResolvedNexthopMonitor.cpp", "ResolvedNexthopProbe.cpp", "ResolvedNexthopProbeScheduler.cpp", diff --git a/fboss/agent/DsfStateUpdaterUtil.cpp b/fboss/agent/DsfStateUpdaterUtil.cpp index 04e2a168e808a..fc17b62d7a728 100644 --- a/fboss/agent/DsfStateUpdaterUtil.cpp +++ b/fboss/agent/DsfStateUpdaterUtil.cpp @@ -70,8 +70,11 @@ void DsfStateUpdaterUtil::updateNeighborEntry( static_cast(std::time(nullptr))); } else { // Retain the resolved timestamp from the old entry. - nbrEntryIter->second->setResolvedSince( - oldTable->at(nbrEntryIter->second->getID())->getResolvedSince()); + if (std::as_const(*oldTable).find(nbrEntryIter->second->getID()) != + oldTable->cend()) { + nbrEntryIter->second->setResolvedSince( + oldTable->at(nbrEntryIter->second->getID())->getResolvedSince()); + } } }; diff --git a/fboss/agent/RemoteNeighborUpdater.cpp b/fboss/agent/RemoteNeighborUpdater.cpp new file mode 100644 index 0000000000000..ff686cef57e43 --- /dev/null +++ b/fboss/agent/RemoteNeighborUpdater.cpp @@ -0,0 +1,97 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/agent/RemoteNeighborUpdater.h" + +#include "fboss/agent/DsfStateUpdaterUtil.h" +#include "fboss/agent/SwSwitch.h" +#include "fboss/agent/SwitchIdScopeResolver.h" +#include "fboss/agent/state/SwitchState.h" + +namespace facebook::fboss { + +RemoteNeighborUpdater::RemoteNeighborUpdater(SwSwitch* sw) : sw_(sw) { + sw_->registerStateObserver(this, "RemoteNeighborUpdater"); +} + +void RemoteNeighborUpdater::stateUpdated(const StateDelta& delta) { + if (delta.getIntfsDelta().getOld() == delta.getIntfsDelta().getNew()) { + /* no change */ + return; + } + if (!sw_->getScopeResolver()->hasVoq()) { + XLOG(WARNING) << "No VOQ switches, ignoring interface update"; + return; + } + // isolated system port interfaces are treated as remote system port + // interfaces, they exist on an another voq switch within the same fboss + // switch + auto voqScope = sw_->getScopeResolver()->scope(cfg::SwitchType::VOQ); + if (voqScope.size() == 1) { + XLOG(WARNING) << "No multiple VOQ switches, ignoring system ports update"; + return; + } + std::vector changedIntfs; + DeltaFunctions::forEachChanged( + delta.getIntfsDelta(), + [&changedIntfs](auto /*oldNode*/, auto newNode) { + if (newNode->getType() != cfg::InterfaceType::SYSTEM_PORT) { + return; + } + changedIntfs.emplace_back(newNode->getID()); + }, + [&changedIntfs](auto newNode) { + changedIntfs.emplace_back(newNode->getID()); + }, + [](auto /*oldNode*/) { + // nothing to do. Remote interfaces are deleted as part of config + // apply + }); + + if (changedIntfs.empty()) { + // no change + return; + } + sw_->updateState( + "update isolated system port interfaces", + [this, changedIntfs = std::move(changedIntfs)]( + const std::shared_ptr& appliedState) { + // apply on an applied state + auto desiredState = appliedState->clone(); + for (const auto& intfID : changedIntfs) { + auto newInterface = appliedState->getInterfaces()->getNodeIf(intfID); + CHECK(newInterface); + processChangedInterface(&desiredState, newInterface); + } + return desiredState; + }); +} + +void RemoteNeighborUpdater::processChangedInterface( + std::shared_ptr* state, + const std::shared_ptr& newInterface) const { + auto remoteInterfaces = (*state)->getRemoteInterfaces()->modify(state); + auto systemPortID = SystemPortID(static_cast(newInterface->getID())); + auto switchID = sw_->getScopeResolver()->scope(systemPortID).switchId(); + auto scope = sw_->getScopeResolver()->scope(cfg::SwitchType::VOQ); + scope.exclude(switchID); + auto innerMap = remoteInterfaces->getMapNodeIf(scope); + CHECK(innerMap); + innerMap = innerMap->clone(); + + auto oldRemoteInterface = innerMap->getNodeIf(newInterface->getID()); + CHECK(oldRemoteInterface); + auto newRemoteInterface = oldRemoteInterface->clone(); + newRemoteInterface->setArpTable(newInterface->getArpTable()->toThrift()); + newRemoteInterface->setNdpTable(newInterface->getNdpTable()->toThrift()); + DsfStateUpdaterUtil::updateNeighborEntry( + oldRemoteInterface->getArpTable(), newRemoteInterface->getArpTable()); + DsfStateUpdaterUtil::updateNeighborEntry( + oldRemoteInterface->getNdpTable(), newRemoteInterface->getNdpTable()); + + innerMap->updateNode(newRemoteInterface); + XLOG(DBG2) << "Updated isolated system port interface " + << newRemoteInterface->getID() << " from " + << scope.matcherString(); + remoteInterfaces->updateMapNode(innerMap, scope); +} +} // namespace facebook::fboss diff --git a/fboss/agent/RemoteNeighborUpdater.h b/fboss/agent/RemoteNeighborUpdater.h new file mode 100644 index 0000000000000..f23a937bc6419 --- /dev/null +++ b/fboss/agent/RemoteNeighborUpdater.h @@ -0,0 +1,24 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#pragma once + +#include "fboss/agent/StateObserver.h" + +namespace facebook::fboss { + +class SwSwitch; + +class RemoteNeighborUpdater : public StateObserver { + public: + explicit RemoteNeighborUpdater(SwSwitch* sw); + virtual ~RemoteNeighborUpdater() override {} + void stateUpdated(const StateDelta& delta) override; + + private: + void processChangedInterface( + std::shared_ptr* state, + const std::shared_ptr& newInterface) const; + SwSwitch* sw_{nullptr}; +}; + +} // namespace facebook::fboss diff --git a/fboss/agent/SwSwitch.cpp b/fboss/agent/SwSwitch.cpp index c9240259a0558..a7a2ec69b2fba 100644 --- a/fboss/agent/SwSwitch.cpp +++ b/fboss/agent/SwSwitch.cpp @@ -57,6 +57,7 @@ #include "fboss/agent/PhySnapshotManager.h" #include "fboss/agent/PortStats.h" #include "fboss/agent/PortUpdateHandler.h" +#include "fboss/agent/RemoteNeighborUpdater.h" #include "fboss/agent/ResolvedNexthopMonitor.h" #include "fboss/agent/ResolvedNexthopProbeScheduler.h" #include "fboss/agent/RestartTimeTracker.h" @@ -429,6 +430,7 @@ SwSwitch::SwSwitch( routeUpdateLogger_(new RouteUpdateLogger(this)), resolvedNexthopMonitor_(new ResolvedNexthopMonitor(this)), resolvedNexthopProbeScheduler_(new ResolvedNexthopProbeScheduler(this)), + remoteNeighborUpdater_(new RemoteNeighborUpdater(this)), portUpdateHandler_(new PortUpdateHandler(this)), lookupClassUpdater_(new LookupClassUpdater(this)), lookupClassRouteUpdater_(new LookupClassRouteUpdater(this)), @@ -541,6 +543,7 @@ void SwSwitch::stop(bool isGracefulStop, bool revertToMinAlpmState) { resolvedNexthopMonitor_.reset(); resolvedNexthopProbeScheduler_.reset(); + remoteNeighborUpdater_.reset(); // Several member variables are performing operations in the background // thread. Ask them to stop, before we shut down the background thread. // diff --git a/fboss/agent/SwSwitch.h b/fboss/agent/SwSwitch.h index 10a656822b1a9..4e5ee10959b0e 100644 --- a/fboss/agent/SwSwitch.h +++ b/fboss/agent/SwSwitch.h @@ -106,6 +106,7 @@ class SwSwitchWarmBootHelper; class AgentDirectoryUtil; class HwSwitchThriftClientTable; class ResourceAccountant; +class RemoteNeighborUpdater; inline static const int kHiPriorityBufferSize{1000}; inline static const int kMidPriorityBufferSize{1000}; @@ -1275,6 +1276,7 @@ class SwSwitch : public HwSwitchCallback { BootType bootType_{BootType::UNINITIALIZED}; std::unique_ptr lldpManager_; + std::unique_ptr remoteNeighborUpdater_; std::unique_ptr portUpdateHandler_; SwitchFlags flags_{SwitchFlags::DEFAULT}; diff --git a/fboss/agent/test/RemoteSystemInterfaceTests.cpp b/fboss/agent/test/RemoteSystemInterfaceTests.cpp index 2d6e3730d32a5..717dfce329d92 100644 --- a/fboss/agent/test/RemoteSystemInterfaceTests.cpp +++ b/fboss/agent/test/RemoteSystemInterfaceTests.cpp @@ -6,6 +6,13 @@ #include #include +namespace { +const auto kInterfaceID = facebook::fboss::InterfaceID(101); +const auto kSystemPortID = facebook::fboss::SystemPortID(101); +const auto kIpV6Address = folly::IPAddressV6("201::10"); +const auto kIpV4Address = folly::IPAddressV4("200.0.0.10"); +} // namespace + namespace facebook::fboss { class RemoteSystemInterfaceTest : public ::testing::Test { @@ -119,4 +126,44 @@ TEST_F(RemoteSystemInterfaceTest, ReConfigureSystemPortInterfaces) { EXPECT_EQ(newRemoteSystemIntfs->getNodeIf(InterfaceID(101)), nullptr); } +TEST_F(RemoteSystemInterfaceTest, verifyNeighborEntries) { + sw_->updateStateBlocking( + "Add Ndp Entry", [=](const std::shared_ptr& state) { + auto newState = state->clone(); + auto interfaces = newState->getInterfaces()->modify(&newState); + auto intf = interfaces->getNodeIf(kInterfaceID); + auto ndpTable = intf->getNdpTable()->modify(kInterfaceID, &newState); + ndpTable->addEntry( + kIpV6Address, + MacAddress("00:02:00:00:00:01"), + PortDescriptor(kSystemPortID), + kInterfaceID); + return newState; + }); + sw_->updateStateBlocking( + "Add Arp Entry", [=](const std::shared_ptr& state) { + auto newState = state->clone(); + auto interfaces = newState->getInterfaces()->modify(&newState); + auto intf = interfaces->getNodeIf(kInterfaceID); + auto arpTable = intf->getArpTable()->modify(kInterfaceID, &newState); + arpTable->addEntry( + kIpV4Address, + MacAddress("00:02:00:00:00:01"), + PortDescriptor(kSystemPortID), + kInterfaceID); + return newState; + }); + waitForStateUpdates(sw_); + waitForStateUpdates(sw_); + auto remoteIntfs = sw_->getState()->getRemoteInterfaces()->getMapNodeIf( + HwSwitchMatcher(std::unordered_set{SwitchID(2)})); + auto remoteIntf = remoteIntfs->getNodeIf(kInterfaceID); + EXPECT_NE(remoteIntf, nullptr); + auto ndpEntry = remoteIntf->getNdpTable()->getEntry(kIpV6Address); + EXPECT_NE(ndpEntry, nullptr); + EXPECT_FALSE(ndpEntry->getIsLocal()); + auto arpEntry = remoteIntf->getArpTable()->getEntry(kIpV4Address); + EXPECT_NE(arpEntry, nullptr); + EXPECT_FALSE(arpEntry->getIsLocal()); +} } // namespace facebook::fboss From 6375d33ff4b27b12db3183ca54c8d9a6bc998dd1 Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Fri, 25 Oct 2024 16:26:37 -0700 Subject: [PATCH 346/479] add a method to set up sai sdk dependencies Summary: this is helpful if libsai_impl.a depends on set of .so. if that happens then linking executables produces errors. this allows providing custom dependencies as needed for executables linking with libsai_impl.a Reviewed By: shri-khare Differential Revision: D64921407 fbshipit-source-id: e7be7198a2bfb3c933855ad6682eecaef213dbc6 --- CMakeLists.txt | 2 ++ cmake/AgentEnsembleSaiLinkTests.cmake | 4 ++++ cmake/AgentHwSaiHwTest.cmake | 2 ++ cmake/AgentPlatformsSai.cmake | 4 ++++ cmake/AgentSaiLinkTests.cmake | 2 ++ cmake/AgentTestAgentHwTests.cmake | 2 ++ functions.cmake | 2 ++ 7 files changed, 18 insertions(+) create mode 100644 functions.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index f0edaa24c95be..dc91289f5f635 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.8) +include(functions.cmake) + option(WITH_ASAN "Turn ON address sanitizer build options" OFF) if ($ENV{WITH_ASAN}) message(STATUS "ENV WITH_ASAN is set") diff --git a/cmake/AgentEnsembleSaiLinkTests.cmake b/cmake/AgentEnsembleSaiLinkTests.cmake index eecca31816ca9..e655d8d8c8929 100644 --- a/cmake/AgentEnsembleSaiLinkTests.cmake +++ b/cmake/AgentEnsembleSaiLinkTests.cmake @@ -8,6 +8,8 @@ function(BUILD_AGENT_ENSEMBLE_SAI_LINK_TEST SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/test/link_tests/SaiMonoLinkTest.cpp ) + add_sai_sdk_dependencies(sai_mono_link_test-${SAI_IMPL_NAME}) + target_link_libraries(sai_mono_link_test-${SAI_IMPL_NAME} # --whole-archive is needed for gtest to find these tests -Wl,--whole-archive @@ -37,6 +39,8 @@ function(BUILD_AGENT_ENSEMBLE_SAI_LINK_TEST SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/test/link_tests/SaiMultiSwitchLinkTest.cpp ) + add_sai_sdk_dependencies(sai_multi_link_test-${SAI_IMPL_NAME}) + target_link_libraries(sai_multi_link_test-${SAI_IMPL_NAME} # --whole-archive is needed for gtest to find these tests -Wl,--whole-archive diff --git a/cmake/AgentHwSaiHwTest.cmake b/cmake/AgentHwSaiHwTest.cmake index f376649a10a54..6069031efabf2 100644 --- a/cmake/AgentHwSaiHwTest.cmake +++ b/cmake/AgentHwSaiHwTest.cmake @@ -214,6 +214,8 @@ function(BUILD_SAI_TEST SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/hw/sai/hw_test/SaiQPHRollbackTests.cpp ) + add_sai_sdk_dependencies(sai_test-${SAI_IMPL_NAME}) + target_link_libraries(sai_test-${SAI_IMPL_NAME} # --whole-archive is needed for gtest to find these tests -Wl,--whole-archive diff --git a/cmake/AgentPlatformsSai.cmake b/cmake/AgentPlatformsSai.cmake index e24d484f822d5..1ab50a7901036 100644 --- a/cmake/AgentPlatformsSai.cmake +++ b/cmake/AgentPlatformsSai.cmake @@ -118,6 +118,8 @@ function(BUILD_SAI_WEDGE_AGENT SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/platforms/sai/wedge_agent.cpp ) + add_sai_sdk_dependencies(wedge_agent-${SAI_IMPL_NAME}) + target_link_libraries(wedge_agent-${SAI_IMPL_NAME} -Wl,--whole-archive main @@ -147,6 +149,8 @@ function(BUILD_SAI_WEDGE_AGENT SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/platforms/sai/oss/WedgeHwAgent.cpp ) + add_sai_sdk_dependencies(fboss_hw_agent-${SAI_IMPL_NAME}) + target_link_libraries(fboss_hw_agent-${SAI_IMPL_NAME} -Wl,--whole-archive hwagent-main diff --git a/cmake/AgentSaiLinkTests.cmake b/cmake/AgentSaiLinkTests.cmake index f5c0854b9b16b..792aa09109eb1 100644 --- a/cmake/AgentSaiLinkTests.cmake +++ b/cmake/AgentSaiLinkTests.cmake @@ -9,6 +9,8 @@ function(BUILD_SAI_LINK_TEST SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/test/link_tests/SaiLinkTest.cpp ) + add_sai_sdk_dependencies(sai_link_test-${SAI_IMPL_NAME}) + target_link_libraries(sai_link_test-${SAI_IMPL_NAME} # --whole-archive is needed for gtest to find these tests -Wl,--whole-archive diff --git a/cmake/AgentTestAgentHwTests.cmake b/cmake/AgentTestAgentHwTests.cmake index e849a84e3d320..32ba286aae383 100644 --- a/cmake/AgentTestAgentHwTests.cmake +++ b/cmake/AgentTestAgentHwTests.cmake @@ -133,6 +133,8 @@ function(BUILD_SAI_AGENT_HW_TEST SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/test/agent_hw_tests/SaiAgentHwTest.cpp ) + add_sai_sdk_dependencies(sai_agent_hw_test-${SAI_IMPL_NAME}) + target_link_libraries(sai_agent_hw_test-${SAI_IMPL_NAME} -Wl,--whole-archive agent_hw_test_src diff --git a/functions.cmake b/functions.cmake new file mode 100644 index 0000000000000..d94155018543b --- /dev/null +++ b/functions.cmake @@ -0,0 +1,2 @@ +function (add_sai_sdk_dependencies name) +endfunction () From 9b2c8144c113474584d026725ea8e0060f490022 Mon Sep 17 00:00:00 2001 From: "Shrikrishna (Shri) Khare" Date: Fri, 25 Oct 2024 17:54:04 -0700 Subject: [PATCH 347/479] Coalesce link active/inactive callback state updates Summary: As titled. See comments in this diff for why. Reviewed By: jasmeetbagga Differential Revision: D64672322 Privacy Context Container: L1125642 fbshipit-source-id: 6d0c3e54f5e0d1d802fa7cc4f918f59b88e24dd3 --- fboss/agent/SwSwitch.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/fboss/agent/SwSwitch.cpp b/fboss/agent/SwSwitch.cpp index a7a2ec69b2fba..01143fe7bae03 100644 --- a/fboss/agent/SwSwitch.cpp +++ b/fboss/agent/SwSwitch.cpp @@ -2225,7 +2225,23 @@ void SwSwitch::linkActiveStateChanged( return newState; }; - updateStateNoCoalescing( + + /* + * Consider the following scenario: + * - Continuous flaps on fabric port(s). + * - linkActiveStateChanged callbacks for each flap. + * - A large number of state updates will be queued. + * - If processed without coalescing, state update queue will build up. + * - This will significantly delay any other state updates. + * - For example, Self Healing's attempt to drain a flapping link will + * require a state update, and could get significantly delayed. + * + * Thus, process linkActiveStateChanged with coalescing. + * + * Note: On NIF ports, we never coalesce link up/down updates to ensure + * expiry of NDP/ARP entries, but that is not applicable for Fabric port. + */ + updateState( "Port ActiveState (ACTIVE/INACTIVE) Update", std::move(updateActiveStateFn)); } From 095d84d59115d2f229ca127e92931e68415b592c Mon Sep 17 00:00:00 2001 From: "Shrikrishna (Shri) Khare" Date: Fri, 25 Oct 2024 17:54:04 -0700 Subject: [PATCH 348/479] Don't queue txReadyStatusChangeCallbackBottomHal if already queued Summary: See comments in the code for why. Reviewed By: jasmeetbagga Differential Revision: D64802444 Privacy Context Container: L1125642 fbshipit-source-id: 2c76fdcc1f4c895373a472b503fd98cb58ee264e --- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 19 +++++++++++++++++-- fboss/agent/hw/sai/switch/SaiSwitch.h | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 259208b5a3c42..0c1bacab2b7b5 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -2152,12 +2152,27 @@ void SaiSwitch::txReadyStatusChangeCallbackTopHalf(SwitchSaiId switchId) { return; } - txReadyStatusChangeBottomHalfEventBase_.runInFbossEventBaseThread( - [this]() mutable { txReadyStatusChangeCallbackBottomHalf(); }); + // When txReadyStatusChangeCallbackBottomHalf runs, it queries for + // active/inactive link status of all the links at that time. + // Thus, if we txReadyStatusChangeCallbackBottomHalf is already queued for + // run, we can skip scheduling another. + // Note: txReadyStatusChangeCallbackBottomHalf sets changePending to false + // before querying link active/inactive status, so avoid race. + auto changePending = txReadyStatusChangePending_.wlock(); + if (!(*changePending)) { + *changePending = true; + txReadyStatusChangeBottomHalfEventBase_.runInFbossEventBaseThread( + [this]() mutable { txReadyStatusChangeCallbackBottomHalf(); }); + } } void SaiSwitch::txReadyStatusChangeCallbackBottomHalf() { #if SAI_API_VERSION >= SAI_VERSION(1, 13, 0) + { + auto changePending = txReadyStatusChangePending_.wlock(); + *changePending = false; + } + std::vector adapterKeys; for (const auto& [portSaiId, portInfo] : concurrentIndices_->portSaiId2PortInfo) { diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.h b/fboss/agent/hw/sai/switch/SaiSwitch.h index 2c6d7b2eebac4..1692fd583e10c 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.h +++ b/fboss/agent/hw/sai/switch/SaiSwitch.h @@ -630,6 +630,7 @@ class SaiSwitch : public HwSwitch { std::unique_ptr fabricConnectivityManager_; bool pfcDeadlockEnabled_{false}; folly::Synchronized switchReachabilityChangePending_{0}; + folly::Synchronized txReadyStatusChangePending_{false}; }; } // namespace facebook::fboss From 67843a555e912733ea0e202ceb186c7c4e3873e7 Mon Sep 17 00:00:00 2001 From: "Shrikrishna (Shri) Khare" Date: Fri, 25 Oct 2024 17:54:04 -0700 Subject: [PATCH 349/479] Add PortType to LinkEvent notification Summary: As titled. Reviewed By: jasmeetbagga Differential Revision: D64856866 fbshipit-source-id: 14b3f0b4e0461423e8455ba418c1bc0557cef665 --- fboss/agent/if/BUCK | 1 + fboss/agent/if/multiswitch_ctrl.thrift | 2 ++ 2 files changed, 3 insertions(+) diff --git a/fboss/agent/if/BUCK b/fboss/agent/if/BUCK index 6dee1a8b3df1c..1866a5c2d696d 100644 --- a/fboss/agent/if/BUCK +++ b/fboss/agent/if/BUCK @@ -280,6 +280,7 @@ thrift_library( deps = [ ":common", ":ctrl", + "//fboss/agent:switch_config", "//fboss/agent/hw:hardware_stats", "//fboss/fsdb/if:fsdb_oper", "//fboss/lib/phy:phy", diff --git a/fboss/agent/if/multiswitch_ctrl.thrift b/fboss/agent/if/multiswitch_ctrl.thrift index f0e79bc4b84d2..b53da510f366c 100644 --- a/fboss/agent/if/multiswitch_ctrl.thrift +++ b/fboss/agent/if/multiswitch_ctrl.thrift @@ -12,6 +12,7 @@ include "thrift/annotation/cpp.thrift" include "fboss/lib/phy/phy.thrift" include "fboss/agent/hw/hardware_stats.thrift" include "thrift/annotation/thrift.thrift" +include "fboss/agent/switch_config.thrift" @cpp.Type{name = "std::unique_ptr"} typedef binary fbbinary @@ -20,6 +21,7 @@ struct LinkEvent { 1: i32 port; 2: bool up; 3: optional phy.LinkFaultStatus iPhyLinkFaultStatus; + 4: switch_config.PortType portType; } struct LinkActiveEvent { From 019917c2956dedbdb8ca9e7d6306abaae51d9de2 Mon Sep 17 00:00:00 2001 From: "Shrikrishna (Shri) Khare" Date: Fri, 25 Oct 2024 17:54:04 -0700 Subject: [PATCH 350/479] Pass portType in link up/down callback Summary: As titled. Consumed by stacked diff Reviewed By: jasmeetbagga Differential Revision: D64856865 Privacy Context Container: L1125642 fbshipit-source-id: 637707a5fee87cb5c40c177df138d50f30e3da96 --- fboss/agent/HwSwitchCallback.h | 1 + fboss/agent/MultiSwitchThriftHandler.cpp | 3 ++- fboss/agent/SwSwitch.cpp | 4 +++- fboss/agent/SwSwitch.h | 1 + fboss/agent/hw/bcm/BcmSwitch.cpp | 11 ++++++++--- fboss/agent/hw/bcm/BcmSwitch.h | 2 +- fboss/agent/hw/mock/MockTestHandle.cpp | 4 ++-- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 8 ++++++-- fboss/agent/hw/test/HwSwitchEnsemble.cpp | 5 ++++- fboss/agent/hw/test/HwSwitchEnsemble.h | 1 + fboss/agent/mnpu/SplitAgentThriftSyncer.cpp | 2 ++ fboss/agent/mnpu/SplitAgentThriftSyncer.h | 1 + fboss/agent/test/AgentEnsemble.h | 3 ++- fboss/agent/test/ArpTest.cpp | 8 ++++---- fboss/agent/test/LookupClassUpdaterTests.cpp | 2 +- fboss/agent/test/NDPTest.cpp | 8 ++++---- fboss/agent/test/StaticL2ForNeighborObserverTests.cpp | 2 +- fboss/agent/test/SwSwitchTest.cpp | 8 ++++---- fboss/agent/test/ThriftServerTest.cpp | 2 +- fboss/agent/test/ThriftTest.cpp | 4 ++-- 20 files changed, 51 insertions(+), 29 deletions(-) diff --git a/fboss/agent/HwSwitchCallback.h b/fboss/agent/HwSwitchCallback.h index ef79cbeb96063..a77ec8ba083f5 100644 --- a/fboss/agent/HwSwitchCallback.h +++ b/fboss/agent/HwSwitchCallback.h @@ -39,6 +39,7 @@ class HwSwitchCallback { virtual void linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus = std::nullopt) = 0; /* diff --git a/fboss/agent/MultiSwitchThriftHandler.cpp b/fboss/agent/MultiSwitchThriftHandler.cpp index 9bb9c7d1ed999..48f9b7d528448 100644 --- a/fboss/agent/MultiSwitchThriftHandler.cpp +++ b/fboss/agent/MultiSwitchThriftHandler.cpp @@ -64,11 +64,12 @@ void MultiSwitchThriftHandler::processLinkState( << *linkStateEvent.port() << " up :" << (*linkStateEvent.up() ? "UP" : "DOWN"); PortID portId = PortID(*linkStateEvent.port()); + cfg::PortType portType = *linkStateEvent.portType(); std::optional faultStatus; if (linkStateEvent.iPhyLinkFaultStatus()) { faultStatus = *linkStateEvent.iPhyLinkFaultStatus(); } - sw_->linkStateChanged(portId, *linkStateEvent.up(), faultStatus); + sw_->linkStateChanged(portId, *linkStateEvent.up(), portType, faultStatus); } void MultiSwitchThriftHandler::processLinkActiveState( diff --git a/fboss/agent/SwSwitch.cpp b/fboss/agent/SwSwitch.cpp index 01143fe7bae03..1a3eb63cee8cd 100644 --- a/fboss/agent/SwSwitch.cpp +++ b/fboss/agent/SwSwitch.cpp @@ -2112,6 +2112,7 @@ void SwSwitch::pfcWatchdogStateChanged( void SwSwitch::linkStateChanged( PortID portId, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus) { if (!isFullyInitialized()) { XLOG(ERR) @@ -3480,7 +3481,8 @@ void SwSwitch::setPortsDownForSwitch(SwitchID switchId) { if (HwSwitchMatcher(matcher).has(switchId)) { for (const auto& port : std::as_const(*portMap)) { if (port.second->isUp()) { - linkStateChanged(port.second->getID(), false); + linkStateChanged( + port.second->getID(), false, port.second->getPortType()); } } } diff --git a/fboss/agent/SwSwitch.h b/fboss/agent/SwSwitch.h index 4e5ee10959b0e..f52fea069ff84 100644 --- a/fboss/agent/SwSwitch.h +++ b/fboss/agent/SwSwitch.h @@ -561,6 +561,7 @@ class SwSwitch : public HwSwitchCallback { void linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus = std::nullopt) override; void linkActiveStateChanged( diff --git a/fboss/agent/hw/bcm/BcmSwitch.cpp b/fboss/agent/hw/bcm/BcmSwitch.cpp index 4823c9dc5cecb..79066f8aab536 100644 --- a/fboss/agent/hw/bcm/BcmSwitch.cpp +++ b/fboss/agent/hw/bcm/BcmSwitch.cpp @@ -776,7 +776,8 @@ void BcmSwitch::setupLinkscan() { // so we need to update sw state here. This needs to be done after linkscan // is enabled otherwise the sdk may return inconsistent results for (auto& port : std::as_const(*portTable_)) { - callback_->linkStateChanged(port.first, port.second->isUp()); + callback_->linkStateChanged( + port.first, port.second->isUp(), cfg::PortType::INTERFACE_PORT); } } } @@ -3014,7 +3015,10 @@ void BcmSwitch::linkStateChangedHwNotLocked( // back. Adding them earlier leads to packet loss. } callback_->linkStateChanged( - portTable_->getPortId(bcmPortId), up, iPhyLinkFaultStatus); + portTable_->getPortId(bcmPortId), + up, + cfg::PortType::INTERFACE_PORT, + iPhyLinkFaultStatus); } // The callback provided to bcm_rx_register() @@ -4220,7 +4224,8 @@ void BcmSwitch::initialStateApplied() { void BcmSwitch::syncLinkStates() { linkScanBottomHalfEventBase_.runInFbossEventBaseThread([this]() { for (auto& port : std::as_const(*portTable_)) { - callback_->linkStateChanged(port.first, port.second->isUp()); + callback_->linkStateChanged( + port.first, port.second->isUp(), cfg::PortType::INTERFACE_PORT); } }); } diff --git a/fboss/agent/hw/bcm/BcmSwitch.h b/fboss/agent/hw/bcm/BcmSwitch.h index fb1a8b64e9ac3..673e282e93091 100644 --- a/fboss/agent/hw/bcm/BcmSwitch.h +++ b/fboss/agent/hw/bcm/BcmSwitch.h @@ -931,7 +931,7 @@ class BcmSwitch : public BcmSwitchIf { * loss in case of back to back port up/down events. * */ - void linkStateChanged(PortID port, bool up); + void linkStateChanged(PortID port, bool up, cfg::PortType portType); /* * Private callback called by the Broadcom API. Dispatches to diff --git a/fboss/agent/hw/mock/MockTestHandle.cpp b/fboss/agent/hw/mock/MockTestHandle.cpp index fc387c9bf2371..fdd31f8054afd 100644 --- a/fboss/agent/hw/mock/MockTestHandle.cpp +++ b/fboss/agent/hw/mock/MockTestHandle.cpp @@ -33,11 +33,11 @@ void MockTestHandle::rxPacket( } void MockTestHandle::forcePortDown(PortID port) { - getSw()->linkStateChanged(port, false); + getSw()->linkStateChanged(port, false, cfg::PortType::INTERFACE_PORT); } void MockTestHandle::forcePortUp(PortID port) { - getSw()->linkStateChanged(port, true); + getSw()->linkStateChanged(port, true, cfg::PortType::INTERFACE_PORT); } void MockTestHandle::forcePortFlap(PortID port) { diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 0c1bacab2b7b5..abc5856e9b780 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -2136,7 +2136,9 @@ void SaiSwitch::linkStateChangedCallbackBottomHalf( // does with the callback notification. for (auto swPortIdAndStatus : swPortId2Status) { callback_->linkStateChanged( - swPortIdAndStatus.first, swPortIdAndStatus.second); + swPortIdAndStatus.first, + swPortIdAndStatus.second, + managerTable_->portManager().getPortType(swPortIdAndStatus.first)); } } @@ -2614,7 +2616,9 @@ void SaiSwitch::syncLinkStatesLocked( << portIdAndHandle.first << " with oper status: " << (operStatus == SAI_PORT_OPER_STATUS_UP ? "UP" : "DOWN"); callback_->linkStateChanged( - portIdAndHandle.first, operStatus == SAI_PORT_OPER_STATUS_UP); + portIdAndHandle.first, + operStatus == SAI_PORT_OPER_STATUS_UP, + managerTable_->portManager().getPortType(portIdAndHandle.first)); } } diff --git a/fboss/agent/hw/test/HwSwitchEnsemble.cpp b/fboss/agent/hw/test/HwSwitchEnsemble.cpp index edfedc1d5fba9..85e8bfc78242a 100644 --- a/fboss/agent/hw/test/HwSwitchEnsemble.cpp +++ b/fboss/agent/hw/test/HwSwitchEnsemble.cpp @@ -79,7 +79,9 @@ class HwEnsembleMultiSwitchThriftHandler << switchId << " for port " << *linkEvent.port() << " up :" << *linkEvent.up(); ensemble_->linkStateChanged( - PortID(*linkEvent.port()), *linkEvent.up()); + PortID(*linkEvent.port()), + *linkEvent.up(), + *linkEvent.portType()); } } co_return true; @@ -413,6 +415,7 @@ void HwSwitchEnsemble::applyInitialConfig(const cfg::SwitchConfig& initCfg) { void HwSwitchEnsemble::linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional /* iPhyFaultStatus */) { if (getHwSwitch()->getRunState() < SwitchRunState::INITIALIZED) { return; diff --git a/fboss/agent/hw/test/HwSwitchEnsemble.h b/fboss/agent/hw/test/HwSwitchEnsemble.h index 2643b1fe190e2..f06f0a96da12b 100644 --- a/fboss/agent/hw/test/HwSwitchEnsemble.h +++ b/fboss/agent/hw/test/HwSwitchEnsemble.h @@ -179,6 +179,7 @@ class HwSwitchEnsemble : public TestEnsembleIf { void linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus = std::nullopt) override; void linkActiveStateChanged( diff --git a/fboss/agent/mnpu/SplitAgentThriftSyncer.cpp b/fboss/agent/mnpu/SplitAgentThriftSyncer.cpp index ad0327f64928c..185c69a53a637 100644 --- a/fboss/agent/mnpu/SplitAgentThriftSyncer.cpp +++ b/fboss/agent/mnpu/SplitAgentThriftSyncer.cpp @@ -89,10 +89,12 @@ void SplitAgentThriftSyncer::packetReceived( void SplitAgentThriftSyncer::linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus) { multiswitch::LinkEvent event; event.port() = port; event.up() = up; + event.portType() = portType; if (iPhyFaultStatus) { event.iPhyLinkFaultStatus() = *iPhyFaultStatus; } diff --git a/fboss/agent/mnpu/SplitAgentThriftSyncer.h b/fboss/agent/mnpu/SplitAgentThriftSyncer.h index e417015d7f24e..1662a5b4eb57e 100644 --- a/fboss/agent/mnpu/SplitAgentThriftSyncer.h +++ b/fboss/agent/mnpu/SplitAgentThriftSyncer.h @@ -45,6 +45,7 @@ class SplitAgentThriftSyncer : public HwSwitchCallback { void linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus = std::nullopt) override; void linkActiveStateChanged( diff --git a/fboss/agent/test/AgentEnsemble.h b/fboss/agent/test/AgentEnsemble.h index 7390cc83c87f3..57dc7ce59ae76 100644 --- a/fboss/agent/test/AgentEnsemble.h +++ b/fboss/agent/test/AgentEnsemble.h @@ -135,13 +135,14 @@ class AgentEnsemble : public TestEnsembleIf { void linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus = std::nullopt) override { if (getSw()->getSwitchRunState() >= SwitchRunState::CONFIGURED) { if (linkToggler_) { linkToggler_->linkStateChanged(port, up); } - getSw()->linkStateChanged(port, up); + getSw()->linkStateChanged(port, up, portType); } } diff --git a/fboss/agent/test/ArpTest.cpp b/fboss/agent/test/ArpTest.cpp index a12d39e97d72a..a94cfcbc60946 100644 --- a/fboss/agent/test/ArpTest.cpp +++ b/fboss/agent/test/ArpTest.cpp @@ -1172,7 +1172,7 @@ TYPED_TEST(ArpTest, FlushEntryWithConcurrentUpdate) { PortID portID(1); // ensure port is up - sw->linkStateChanged(portID, true); + sw->linkStateChanged(portID, true, cfg::PortType::INTERFACE_PORT); VlanID vlanID(1); std::vector targetIPs; @@ -1248,7 +1248,7 @@ TYPED_TEST(ArpTest, PortFlapRecover) { auto sw = handle->getSw(); // ensure port is up - sw->linkStateChanged(PortID(1), true); + sw->linkStateChanged(PortID(1), true, cfg::PortType::INTERFACE_PORT); VlanID vlanID(1); IPAddressV4 senderIP = IPAddressV4("10.0.0.1"); @@ -1303,7 +1303,7 @@ TYPED_TEST(ArpTest, PortFlapRecover) { // send a port down event to the switch for port 1 EXPECT_STATE_UPDATE_TIMES_ATLEAST(sw, 1); - sw->linkStateChanged(PortID(1), false); + sw->linkStateChanged(PortID(1), false, cfg::PortType::INTERFACE_PORT); // purging neighbor entries occurs on the background EVB via NeighorUpdater as // a StateObserver. @@ -1326,7 +1326,7 @@ TYPED_TEST(ArpTest, PortFlapRecover) { // send a port up event to the switch for port 1 EXPECT_STATE_UPDATE_TIMES_ATLEAST(sw, 1); - sw->linkStateChanged(PortID(1), true); + sw->linkStateChanged(PortID(1), true, cfg::PortType::INTERFACE_PORT); waitForStateUpdates(sw); // Receive arp replies for entries on flapped port, port 1 diff --git a/fboss/agent/test/LookupClassUpdaterTests.cpp b/fboss/agent/test/LookupClassUpdaterTests.cpp index 11321432f7ea2..829089d30e085 100644 --- a/fboss/agent/test/LookupClassUpdaterTests.cpp +++ b/fboss/agent/test/LookupClassUpdaterTests.cpp @@ -432,7 +432,7 @@ class LookupClassUpdaterTest : public ::testing::Test { } void bringPortDown(PortID portID) const { - this->sw_->linkStateChanged(portID, false); + this->sw_->linkStateChanged(portID, false, cfg::PortType::INTERFACE_PORT); waitForStateUpdates(this->sw_); this->sw_->getNeighborUpdater()->waitForPendingUpdates(); diff --git a/fboss/agent/test/NDPTest.cpp b/fboss/agent/test/NDPTest.cpp index acb3880ab411e..721b32d22a223 100644 --- a/fboss/agent/test/NDPTest.cpp +++ b/fboss/agent/test/NDPTest.cpp @@ -1819,7 +1819,7 @@ TYPED_TEST(NdpTest, FlushEntryWithConcurrentUpdate) { PortID portID(1); // ensure port is up - sw->linkStateChanged(portID, true); + sw->linkStateChanged(portID, true, cfg::PortType::INTERFACE_PORT); VlanID vlanID(5); std::vector targetIPs; @@ -1926,7 +1926,7 @@ TYPED_TEST(NdpTest, PortFlapRecover) { this->addRoutes(); // ensure port is up - sw->linkStateChanged(PortID(1), true); + sw->linkStateChanged(PortID(1), true, cfg::PortType::INTERFACE_PORT); auto vlanID = VlanID(5); @@ -2110,7 +2110,7 @@ TYPED_TEST(NdpTest, PortFlapRecover) { WaitForNdpEntryPending neigbor0Pending(sw, targetIP, vlanID); WaitForNdpEntryPending neigbor1Pending(sw, targetIP2, vlanID); - sw->linkStateChanged(PortID(1), false); + sw->linkStateChanged(PortID(1), false, cfg::PortType::INTERFACE_PORT); // purging neighbor entries occurs on the background EVB via NeighorUpdater as // a StateObserver. @@ -2135,7 +2135,7 @@ TYPED_TEST(NdpTest, PortFlapRecover) { // send a port up event to the switch for port 1 EXPECT_STATE_UPDATE_TIMES_ATLEAST(sw, 1); - sw->linkStateChanged(PortID(1), true); + sw->linkStateChanged(PortID(1), true, cfg::PortType::INTERFACE_PORT); sendNeighborAdvertisement( handle.get(), diff --git a/fboss/agent/test/StaticL2ForNeighborObserverTests.cpp b/fboss/agent/test/StaticL2ForNeighborObserverTests.cpp index a557934a31528..c3f8e1aa676ef 100644 --- a/fboss/agent/test/StaticL2ForNeighborObserverTests.cpp +++ b/fboss/agent/test/StaticL2ForNeighborObserverTests.cpp @@ -231,7 +231,7 @@ class StaticL2ForNeighorObserverTest : public ::testing::Test { } void bringPortDown(PortID portID) { - this->sw_->linkStateChanged(portID, false); + this->sw_->linkStateChanged(portID, false, cfg::PortType::INTERFACE_PORT); waitForStateUpdates(this->sw_); this->sw_->getNeighborUpdater()->waitForPendingUpdates(); diff --git a/fboss/agent/test/SwSwitchTest.cpp b/fboss/agent/test/SwSwitchTest.cpp index 1c9807daf6b09..3291b92a0a010 100644 --- a/fboss/agent/test/SwSwitchTest.cpp +++ b/fboss/agent/test/SwSwitchTest.cpp @@ -189,8 +189,8 @@ TEST_F(SwSwitchTest, overlappingUpdatesWithExit) { const PortID kPort1{1}; while (!done) { // Now flap the port. This should schedule non coalescing updates. - sw->linkStateChanged(kPort1, false); - sw->linkStateChanged(kPort1, true); + sw->linkStateChanged(kPort1, false, cfg::PortType::INTERFACE_PORT); + sw->linkStateChanged(kPort1, true, cfg::PortType::INTERFACE_PORT); } }); std::thread blockingUpdates([this, &done] { @@ -406,8 +406,8 @@ TYPED_TEST(SwSwitchTestNbrs, TestStateNonCoalescing) { // 2 neighbor entries expected verifyReachableCnt(2); // Now flap the port. This should schedule non coalescing updates. - sw->linkStateChanged(kPort1, false); - sw->linkStateChanged(kPort1, true); + sw->linkStateChanged(kPort1, false, cfg::PortType::INTERFACE_PORT); + sw->linkStateChanged(kPort1, true, cfg::PortType::INTERFACE_PORT); waitForStateUpdates(sw); // Neighbor purge is scheduled on BG thread. Wait for it to be scheduled. waitForBackgroundThread(sw); diff --git a/fboss/agent/test/ThriftServerTest.cpp b/fboss/agent/test/ThriftServerTest.cpp index ed7cdd9c2878f..7a952bd29c094 100644 --- a/fboss/agent/test/ThriftServerTest.cpp +++ b/fboss/agent/test/ThriftServerTest.cpp @@ -203,7 +203,7 @@ TEST_F(ThriftServerTest, setPortDownOnSwitchExit) { folly::coro::blockingWait(fbossCtlClient_->co_setPortState(port5, true)); // Bring the port up - sw_->linkStateChanged(port5, true); + sw_->linkStateChanged(port5, true, cfg::PortType::INTERFACE_PORT); WITH_RETRIES({ auto port = sw_->getState()->getPorts()->getNodeIf(port5); EXPECT_EVENTUALLY_TRUE(port->isUp()); diff --git a/fboss/agent/test/ThriftTest.cpp b/fboss/agent/test/ThriftTest.cpp index 2e78b4ab6ad40..5c24c302fbd0d 100644 --- a/fboss/agent/test/ThriftTest.cpp +++ b/fboss/agent/test/ThriftTest.cpp @@ -353,14 +353,14 @@ TYPED_TEST(ThriftTestAllSwitchTypes, setPortState) { const PortID port5{5}; ThriftHandler handler(this->sw_); handler.setPortState(port5, true); - this->sw_->linkStateChanged(port5, true); + this->sw_->linkStateChanged(port5, true, cfg::PortType::INTERFACE_PORT); waitForStateUpdates(this->sw_); auto port = this->sw_->getState()->getPorts()->getNodeIf(port5); EXPECT_TRUE(port->isUp()); EXPECT_TRUE(port->isEnabled()); - this->sw_->linkStateChanged(port5, false); + this->sw_->linkStateChanged(port5, false, cfg::PortType::INTERFACE_PORT); handler.setPortState(port5, false); waitForStateUpdates(this->sw_); From 50a104352eab5d86407ab6a44016eda526eb61c8 Mon Sep 17 00:00:00 2001 From: "Shrikrishna (Shri) Khare" Date: Fri, 25 Oct 2024 17:54:04 -0700 Subject: [PATCH 351/479] Coalesce link up/down callbacks for Fabric Ports Summary: As titled. See comments in the code. Reviewed By: jasmeetbagga Differential Revision: D64672480 fbshipit-source-id: 3d1fe71010b3307d48e6ec7a494658b1b5f3a3f0 --- fboss/agent/SwSwitch.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/fboss/agent/SwSwitch.cpp b/fboss/agent/SwSwitch.cpp index 1a3eb63cee8cd..fe6acff9776a6 100644 --- a/fboss/agent/SwSwitch.cpp +++ b/fboss/agent/SwSwitch.cpp @@ -2152,8 +2152,20 @@ void SwSwitch::linkStateChanged( return newState; }; - updateStateNoCoalescing( - "Port OperState (UP/DOWN) Update", std::move(updateOperStateFn)); + + // Note: On NIF ports, we never coalesce link up/down updates to ensure + // expiry of NDP/ARP entries, but that is not applicable for Fabric port. + // Thus, coalesce updates on Fabric ports. This is especially useful for a + // flapping fabric ports as coalescing means that fewer state updates get + // queued and other state updates (e.g. drain request to take a flapping + // link off the prod) can get through quicker. + if (portType == cfg::PortType::FABRIC_PORT) { + updateState( + "Fabric Port OperState (UP/DOWN) Update", std::move(updateOperStateFn)); + } else { + updateStateNoCoalescing( + "Port OperState (UP/DOWN) Update", std::move(updateOperStateFn)); + } } void SwSwitch::linkActiveStateChanged( From 3df62dcd00d0490c1578f96d7b2fa8198d7c2007 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Fri, 25 Oct 2024 18:28:38 -0700 Subject: [PATCH 352/479] fboss_sai_agent_known_bad_tests_sync Reviewed By: srikrishnagopu Differential Revision: D64947565 fbshipit-source-id: c7e9777d5ca5009777c87ec4f476e46d476c8a58 --- ...ai_agent_known_bad_tests.materialized_JSON | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/fboss/oss/hw_known_bad_tests/sai_agent_known_bad_tests.materialized_JSON b/fboss/oss/hw_known_bad_tests/sai_agent_known_bad_tests.materialized_JSON index ce87a5a6915b2..ca9d808d18b56 100644 --- a/fboss/oss/hw_known_bad_tests/sai_agent_known_bad_tests.materialized_JSON +++ b/fboss/oss/hw_known_bad_tests/sai_agent_known_bad_tests.materialized_JSON @@ -276,6 +276,9 @@ }, { "test_name_regex": "AgentDiagShellStressTest.stressDiagCmds$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk/mono": [ @@ -623,6 +626,9 @@ }, { "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk/multi_switch": [ @@ -973,6 +979,9 @@ }, { "test_name_regex": "AgentQueuePerHostTest/[0123].VerifyHostToQueueMappingClassIDsAfterResolve.*$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk3/mono": [ @@ -1311,6 +1320,9 @@ }, { "test_name_regex": "AgentTrafficPfcWatchdogTest.*$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk3/multi_switch": [ @@ -1649,6 +1661,9 @@ }, { "test_name_regex": "AgentTrafficPfcWatchdogTest.*$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk4/mono": [ @@ -2011,6 +2026,9 @@ }, { "test_name_regex": "warm_boot.AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6FrontPanelTraffic$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk4/multi_switch": [ @@ -2358,6 +2376,9 @@ }, { "test_name_regex": "AgentDiagShellStressTest.*$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk5/mono": [ @@ -2732,6 +2753,9 @@ }, { "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk5/multi_switch": [ @@ -3142,6 +3166,9 @@ }, { "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/jericho3/mono": [ From 404d6071cfe2c8b3da174bfd47b137682ad3b5a8 Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Fri, 25 Oct 2024 18:41:25 -0700 Subject: [PATCH 353/479] read sdk_dependencies.txt to populate chenab dependencies for oss build Summary: as titled. simply set up sdk_dependencies.txt in fboss checkout next to CMakeLists.txt and run build as usual to link with shared libraries which libsai_impl.a may depend on. Reviewed By: shri-khare Differential Revision: D64921395 fbshipit-source-id: b0b69a6f1129c1cba5d066ddc7bc0d74bdea62f9 --- CMakeLists.txt | 2 ++ functions.cmake | 21 +++++++++++++++++++++ sdk_dependencies.txt | 0 3 files changed, 23 insertions(+) create mode 100644 sdk_dependencies.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index dc91289f5f635..8f3cb555e5553 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,8 @@ option(CHENAB_SAI_SDK "Build SAI api with CHENAB-SAI extensions" OFF) if ($ENV{CHENAB_SAI_SDK}) message(STATUS "ENV CHENAB_SAI_SDK is set") set (CHENAB_SAI_SDK ON) + link_directories(/var/FBOSS/sai_impl/lib) + link_directories(/var/FBOSS/sdk/usr/lib64) endif() option(BUILD_SAI_FAKE_LINK_TEST "Building of SAI Fake Link Test binaries" OFF) diff --git a/functions.cmake b/functions.cmake index d94155018543b..c65efe21a0bc5 100644 --- a/functions.cmake +++ b/functions.cmake @@ -1,2 +1,23 @@ +# provide list of libraries that FBOSS binaries must link with +# because SDK library (libsai_impl.a) uses it and has undefined +# symbols, leading to linker errors while linking binaries. +# specify this list in sdk_dependencies.txt with each library on +# different line (without leading or trailing spaces) +# +# +# $ cat sdk_dependencies.txt +# foo +# bar +# foobar +# foobarfoo +# +# +# FBOSS binaries link with above libraries which libsai_impl.a +# needs function (add_sai_sdk_dependencies name) + file(READ sdk_dependencies.txt DEPENDENCIES_TEXT) + string(REPLACE "\n" ";" DEPENDENCIES "${DEPENDENCIES_TEXT}") + foreach(DEPENDENCY ${DEPENDENCIES}) + target_link_libraries(${name} ${DEPENDENCY}) + endforeach () endfunction () diff --git a/sdk_dependencies.txt b/sdk_dependencies.txt new file mode 100644 index 0000000000000..e69de29bb2d1d From c6daad7e985a92497b46a99499ed73e03f2e04ec Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Fri, 25 Oct 2024 19:11:00 -0700 Subject: [PATCH 354/479] Add an api to HwAsic to get default mid/high priority queues Summary: Adding an api to get default mid/high queues since these vary across asics Reviewed By: zechengh09 Differential Revision: D63276148 fbshipit-source-id: 4e89563a1b28bd2bb0f649257aa04098c0a467de --- fboss/agent/hw/switch_asics/BroadcomXgsAsic.cpp | 14 ++++++++++++++ fboss/agent/hw/switch_asics/BroadcomXgsAsic.h | 2 ++ fboss/agent/hw/switch_asics/ChenabAsic.cpp | 11 +++++++++++ fboss/agent/hw/switch_asics/ChenabAsic.h | 2 ++ fboss/agent/hw/switch_asics/CredoPhyAsic.cpp | 6 ++++++ fboss/agent/hw/switch_asics/CredoPhyAsic.h | 2 ++ fboss/agent/hw/switch_asics/FakeAsic.h | 6 ++++++ fboss/agent/hw/switch_asics/HwAsic.h | 3 +++ fboss/agent/hw/switch_asics/Jericho2Asic.cpp | 13 +++++++++++++ fboss/agent/hw/switch_asics/Jericho2Asic.h | 2 ++ fboss/agent/hw/switch_asics/Jericho3Asic.cpp | 13 +++++++++++++ fboss/agent/hw/switch_asics/Jericho3Asic.h | 2 ++ fboss/agent/hw/switch_asics/MockAsic.h | 6 ++++++ fboss/agent/hw/switch_asics/Ramon3Asic.h | 6 ++++++ fboss/agent/hw/switch_asics/RamonAsic.h | 6 ++++++ fboss/agent/hw/switch_asics/TajoAsic.h | 10 ++++++++++ 16 files changed, 104 insertions(+) diff --git a/fboss/agent/hw/switch_asics/BroadcomXgsAsic.cpp b/fboss/agent/hw/switch_asics/BroadcomXgsAsic.cpp index 47d31c407aec2..128dceec620e5 100644 --- a/fboss/agent/hw/switch_asics/BroadcomXgsAsic.cpp +++ b/fboss/agent/hw/switch_asics/BroadcomXgsAsic.cpp @@ -3,6 +3,11 @@ #include "fboss/agent/hw/switch_asics/BroadcomXgsAsic.h" #include +namespace { +static constexpr int kDefaultMidPriCpuQueueId = 2; +static constexpr int kDefaultHiPriCpuQueueId = 9; +} // namespace + namespace facebook::fboss { std::set BroadcomXgsAsic::getQueueStreamTypes( @@ -23,4 +28,13 @@ std::set BroadcomXgsAsic::getQueueStreamTypes( " ASIC does not support:", apache::thrift::util::enumNameSafe(portType)); } + +int BroadcomXgsAsic::getMidPriCpuQueueId() const { + return kDefaultMidPriCpuQueueId; +} + +int BroadcomXgsAsic::getHiPriCpuQueueId() const { + return kDefaultHiPriCpuQueueId; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/BroadcomXgsAsic.h b/fboss/agent/hw/switch_asics/BroadcomXgsAsic.h index da86781ab6dd1..fe315bb6244d5 100644 --- a/fboss/agent/hw/switch_asics/BroadcomXgsAsic.h +++ b/fboss/agent/hw/switch_asics/BroadcomXgsAsic.h @@ -14,5 +14,7 @@ class BroadcomXgsAsic : public BroadcomAsic { using BroadcomAsic::BroadcomAsic; std::set getQueueStreamTypes( cfg::PortType portType) const override; + int getMidPriCpuQueueId() const override; + int getHiPriCpuQueueId() const override; }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/ChenabAsic.cpp b/fboss/agent/hw/switch_asics/ChenabAsic.cpp index 0d05a21740858..15de13594d322 100644 --- a/fboss/agent/hw/switch_asics/ChenabAsic.cpp +++ b/fboss/agent/hw/switch_asics/ChenabAsic.cpp @@ -3,6 +3,11 @@ #include "fboss/agent/hw/switch_asics/ChenabAsic.h" #include +namespace { +static constexpr int kDefaultMidPriCpuQueueId = 2; +static constexpr int kDefaultHiPriCpuQueueId = 7; +} // namespace + namespace facebook::fboss { bool ChenabAsic::isSupportedNonFabric(Feature feature) const { @@ -342,4 +347,10 @@ uint32_t ChenabAsic::getStaticQueueLimitBytes() const { uint32_t ChenabAsic::getNumMemoryBuffers() const { return 1; } +int ChenabAsic::getMidPriCpuQueueId() const { + return kDefaultMidPriCpuQueueId; +} +int ChenabAsic::getHiPriCpuQueueId() const { + return kDefaultHiPriCpuQueueId; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/ChenabAsic.h b/fboss/agent/hw/switch_asics/ChenabAsic.h index 41e9c2eeba51c..3f508d9869286 100644 --- a/fboss/agent/hw/switch_asics/ChenabAsic.h +++ b/fboss/agent/hw/switch_asics/ChenabAsic.h @@ -70,6 +70,8 @@ class ChenabAsic : public HwAsic { uint32_t getStaticQueueLimitBytes() const override; uint32_t getNumMemoryBuffers() const override; cfg::Range64 getReservedEncapIndexRange() const override; + int getMidPriCpuQueueId() const override; + int getHiPriCpuQueueId() const override; private: bool isSupportedFabric(Feature feature) const; diff --git a/fboss/agent/hw/switch_asics/CredoPhyAsic.cpp b/fboss/agent/hw/switch_asics/CredoPhyAsic.cpp index 396e037fcc72a..cb2c5697f038c 100644 --- a/fboss/agent/hw/switch_asics/CredoPhyAsic.cpp +++ b/fboss/agent/hw/switch_asics/CredoPhyAsic.cpp @@ -95,4 +95,10 @@ uint32_t CredoPhyAsic::getStaticQueueLimitBytes() const { uint32_t CredoPhyAsic::getNumMemoryBuffers() const { throw FbossError("CredoPhyAsic doesn't support MMU feature"); } +int CredoPhyAsic::getMidPriCpuQueueId() const { + throw FbossError("Credo ASIC does not support cpu queue"); +} +int CredoPhyAsic::getHiPriCpuQueueId() const { + throw FbossError("Credo ASIC does not support cpu queue"); +} }; // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/CredoPhyAsic.h b/fboss/agent/hw/switch_asics/CredoPhyAsic.h index 01d4a6cea66cf..4b32e7ec39b77 100644 --- a/fboss/agent/hw/switch_asics/CredoPhyAsic.h +++ b/fboss/agent/hw/switch_asics/CredoPhyAsic.h @@ -76,5 +76,7 @@ class CredoPhyAsic : public HwAsic { cfg::MMUScalingFactor scalingFactor) const override; uint32_t getStaticQueueLimitBytes() const override; uint32_t getNumMemoryBuffers() const override; + int getMidPriCpuQueueId() const override; + int getHiPriCpuQueueId() const override; }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/FakeAsic.h b/fboss/agent/hw/switch_asics/FakeAsic.h index 9b77e7563f564..1bef8be456243 100644 --- a/fboss/agent/hw/switch_asics/FakeAsic.h +++ b/fboss/agent/hw/switch_asics/FakeAsic.h @@ -213,5 +213,11 @@ class FakeAsic : public HwAsic { uint32_t getNumMemoryBuffers() const override { return 0; } + int getMidPriCpuQueueId() const override { + throw FbossError("Fake ASIC does not support cpu queue"); + } + int getHiPriCpuQueueId() const override { + throw FbossError("Fake ASIC does not support cpu queue"); + } }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/HwAsic.h b/fboss/agent/hw/switch_asics/HwAsic.h index c2fc8de673f14..1fd65811f4ae9 100644 --- a/fboss/agent/hw/switch_asics/HwAsic.h +++ b/fboss/agent/hw/switch_asics/HwAsic.h @@ -410,6 +410,9 @@ class HwAsic { return 32; } + virtual int getMidPriCpuQueueId() const = 0; + virtual int getHiPriCpuQueueId() const = 0; + protected: static cfg::Range64 makeRange(int64_t min, int64_t max); diff --git a/fboss/agent/hw/switch_asics/Jericho2Asic.cpp b/fboss/agent/hw/switch_asics/Jericho2Asic.cpp index 37653c46c3ef8..f0daa68597b1f 100644 --- a/fboss/agent/hw/switch_asics/Jericho2Asic.cpp +++ b/fboss/agent/hw/switch_asics/Jericho2Asic.cpp @@ -4,6 +4,11 @@ #include #include "fboss/agent/AgentFeatures.h" +namespace { +static constexpr int kDefaultMidPriCpuQueueId = 3; +static constexpr int kDefaultHiPriCpuQueueId = 7; +} // namespace + namespace facebook::fboss { bool Jericho2Asic::isSupported(Feature feature) const { @@ -289,4 +294,12 @@ Jericho2Asic::desiredLoopbackModes() const { {cfg::PortType::RECYCLE_PORT, cfg::PortLoopbackMode::NONE}}; return kLoopbackMode; } + +int Jericho2Asic::getMidPriCpuQueueId() const { + return kDefaultMidPriCpuQueueId; +} + +int Jericho2Asic::getHiPriCpuQueueId() const { + return kDefaultHiPriCpuQueueId; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/Jericho2Asic.h b/fboss/agent/hw/switch_asics/Jericho2Asic.h index 3bb34b97e0059..8b1eb631dd7b3 100644 --- a/fboss/agent/hw/switch_asics/Jericho2Asic.h +++ b/fboss/agent/hw/switch_asics/Jericho2Asic.h @@ -122,6 +122,8 @@ class Jericho2Asic : public BroadcomAsic { uint32_t getMaxHashSeedLength() const override { return 16; } + int getMidPriCpuQueueId() const override; + int getHiPriCpuQueueId() const override; }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/Jericho3Asic.cpp b/fboss/agent/hw/switch_asics/Jericho3Asic.cpp index 4581c7ccae2a2..8eb9d273f6054 100644 --- a/fboss/agent/hw/switch_asics/Jericho3Asic.cpp +++ b/fboss/agent/hw/switch_asics/Jericho3Asic.cpp @@ -3,6 +3,11 @@ #include "fboss/agent/hw/switch_asics/Jericho3Asic.h" #include +namespace { +static constexpr int kDefaultMidPriCpuQueueId = 3; +static constexpr int kDefaultHiPriCpuQueueId = 7; +} // namespace + namespace facebook::fboss { bool Jericho3Asic::isSupported(Feature feature) const { @@ -354,4 +359,12 @@ std::vector> Jericho3Asic::getPortGroups() const { } return portGroups; } + +int Jericho3Asic::getMidPriCpuQueueId() const { + return kDefaultMidPriCpuQueueId; +} + +int Jericho3Asic::getHiPriCpuQueueId() const { + return kDefaultHiPriCpuQueueId; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/Jericho3Asic.h b/fboss/agent/hw/switch_asics/Jericho3Asic.h index c232e13184fd4..47724d04da408 100644 --- a/fboss/agent/hw/switch_asics/Jericho3Asic.h +++ b/fboss/agent/hw/switch_asics/Jericho3Asic.h @@ -143,6 +143,8 @@ class Jericho3Asic : public BroadcomAsic { std::optional computePortGroupSkew( const std::map& portId2cableLen) const override; std::vector> getPortGroups() const; + int getMidPriCpuQueueId() const override; + int getHiPriCpuQueueId() const override; }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/MockAsic.h b/fboss/agent/hw/switch_asics/MockAsic.h index 86766d2853ef9..506b9b065e0ff 100644 --- a/fboss/agent/hw/switch_asics/MockAsic.h +++ b/fboss/agent/hw/switch_asics/MockAsic.h @@ -207,6 +207,12 @@ class MockAsic : public HwAsic { uint32_t getNumMemoryBuffers() const override { return 0; } + int getMidPriCpuQueueId() const override { + throw FbossError("Mock ASIC does not support cpu queue"); + } + int getHiPriCpuQueueId() const override { + throw FbossError("Mock ASIC does not support cpu queue"); + } }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/Ramon3Asic.h b/fboss/agent/hw/switch_asics/Ramon3Asic.h index 827ebabf8a050..81c642d5f13fb 100644 --- a/fboss/agent/hw/switch_asics/Ramon3Asic.h +++ b/fboss/agent/hw/switch_asics/Ramon3Asic.h @@ -89,6 +89,12 @@ class Ramon3Asic : public BroadcomAsic { FabricNodeRole getFabricNodeRole() const override { return fabricNodeRole_; } + int getMidPriCpuQueueId() const override { + throw FbossError("Ramon3 ASIC does not support cpu queue"); + } + int getHiPriCpuQueueId() const override { + throw FbossError("Ramon3 ASIC does not support cpu queue"); + } private: FabricNodeRole fabricNodeRole_; diff --git a/fboss/agent/hw/switch_asics/RamonAsic.h b/fboss/agent/hw/switch_asics/RamonAsic.h index e05fc82e98296..4280b75fecbaa 100644 --- a/fboss/agent/hw/switch_asics/RamonAsic.h +++ b/fboss/agent/hw/switch_asics/RamonAsic.h @@ -82,6 +82,12 @@ class RamonAsic : public BroadcomAsic { FabricNodeRole getFabricNodeRole() const override { return fabricNodeRole_; } + int getMidPriCpuQueueId() const override { + throw FbossError("Ramon ASIC does not support cpu queue"); + } + int getHiPriCpuQueueId() const override { + throw FbossError("Ramon ASIC does not support cpu queue"); + } private: FabricNodeRole fabricNodeRole_; diff --git a/fboss/agent/hw/switch_asics/TajoAsic.h b/fboss/agent/hw/switch_asics/TajoAsic.h index 5d08b55e1e85c..8ab306a6eac81 100644 --- a/fboss/agent/hw/switch_asics/TajoAsic.h +++ b/fboss/agent/hw/switch_asics/TajoAsic.h @@ -36,6 +36,16 @@ class TajoAsic : public HwAsic { cfg::MMUScalingFactor /* scalingFactor */) const override { throw FbossError("Dynamic buffer threshold unsupported!"); } + int getMidPriCpuQueueId() const override { + return kDefaultMidPriCpuQueueId_; + } + int getHiPriCpuQueueId() const override { + return kDefaultMidPriCpuQueueId_; + } + + private: + static constexpr int kDefaultMidPriCpuQueueId_ = 2; + static constexpr int kDefaultHiPriCpuQueueId_ = 7; }; } // namespace facebook::fboss From 10dd37cd17e05442ae9d9cf73badecec5f6ef4d5 Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Fri, 25 Oct 2024 19:11:00 -0700 Subject: [PATCH 355/479] Fix cosq filling for j3 multi Summary: Use asic specific mid and high priority queues while constructing the ipc for rx packet Reviewed By: zechengh09 Differential Revision: D63280469 fbshipit-source-id: 3aac527d860eea1bfef00012dabf77bd8d10f4a8 --- fboss/agent/BUCK | 1 + fboss/agent/Utils.cpp | 34 ++++++++++----------- fboss/agent/Utils.h | 7 ++++- fboss/agent/hw/HwSwitchFb303Stats.cpp | 5 +++ fboss/agent/hw/HwSwitchFb303Stats.h | 4 +++ fboss/agent/mnpu/SplitAgentThriftSyncer.cpp | 6 +++- fboss/agent/mnpu/SplitAgentThriftSyncer.h | 1 + 7 files changed, 38 insertions(+), 20 deletions(-) diff --git a/fboss/agent/BUCK b/fboss/agent/BUCK index 0beba444fd8f5..6914bf80711cb 100644 --- a/fboss/agent/BUCK +++ b/fboss/agent/BUCK @@ -478,6 +478,7 @@ cpp_library( ":switch_state-cpp2-types", ":switchid_scope_resolver", "//common/network:util", + "//fboss/agent/hw:hw_switch_fb303_stats", "//fboss/agent/if:ctrl-cpp2-types", "//fboss/agent/platforms/common/janga800bic:janga800bic_platform_mapping", "//fboss/agent/platforms/common/meru400bfu:meru400bfu_platform_mapping", diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 9ae6b7180fc40..3f103c1aeb185 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -11,12 +11,12 @@ #include #include - #include "fboss/agent/AsicUtils.h" #include "fboss/agent/FbossError.h" #include "fboss/agent/FsdbHelper.h" #include "fboss/agent/SwitchIdScopeResolver.h" #include "fboss/agent/SysError.h" +#include "fboss/agent/hw/HwSwitchFb303Stats.h" #include "fboss/agent/state/ArpEntry.h" #include "fboss/agent/state/ArpTable.h" #include "fboss/agent/state/Interface.h" @@ -1028,24 +1028,22 @@ bool haveParallelLinksToInterfaceNodes( return false; }; -CpuCosQueueId hwQueueIdToCpuCosQueueId(uint8_t hwQueueId) { - switch (hwQueueId) { - case 0: - return CpuCosQueueId::LOPRI; - case 1: - return CpuCosQueueId::DEFAULT; - case 2: - return CpuCosQueueId::MIDPRI; - /* On asics with 8 queues, cosQueue 7 is high priority - * bcm has 10 mcast cpu queues and use queue 9 as high priority queue - */ - case 7: - case 9: - return CpuCosQueueId::HIPRI; - default: - XLOG(FATAL) << "Got Invalid hwQueueId " << hwQueueId; - break; +CpuCosQueueId hwQueueIdToCpuCosQueueId( + uint8_t hwQueueId, + const HwAsic* asic, + HwSwitchFb303Stats* switchStats) { + if (hwQueueId == asic->getHiPriCpuQueueId()) { + return CpuCosQueueId::HIPRI; + } else if (hwQueueId == asic->getMidPriCpuQueueId()) { + return CpuCosQueueId::MIDPRI; + } else if (hwQueueId == static_cast(CpuCosQueueId::LOPRI)) { + return CpuCosQueueId::LOPRI; + } else if (hwQueueId == static_cast(CpuCosQueueId::DEFAULT)) { + return CpuCosQueueId::DEFAULT; } + XLOG_EVERY_N(ERR, 10000) << "Got Invalid hwQueueId " << hwQueueId; + switchStats->invalidQueueRxPackets(); + return CpuCosQueueId::LOPRI; } int numFabricLevels(const std::map& dsfNodes) { diff --git a/fboss/agent/Utils.h b/fboss/agent/Utils.h index 598d2fe80dfa6..abd67805be47c 100644 --- a/fboss/agent/Utils.h +++ b/fboss/agent/Utils.h @@ -88,6 +88,8 @@ class SwitchSettings; class SwitchIdScopeResolver; class PlatformMapping; struct AgentConfig; +class HwAsic; +class HwSwitchFb303Stats; constexpr auto kRecyclePortIdOffset = 1; @@ -442,6 +444,9 @@ bool haveParallelLinksToInterfaceNodes( SwitchIdScopeResolver& scopeResolver, const PlatformMapping* platformMapping); -CpuCosQueueId hwQueueIdToCpuCosQueueId(uint8_t hwQueueId); +CpuCosQueueId hwQueueIdToCpuCosQueueId( + uint8_t hwQueueId, + const HwAsic* asic, + HwSwitchFb303Stats* hwswitchStats); int numFabricLevels(const std::map& dsfNodes); } // namespace facebook::fboss diff --git a/fboss/agent/hw/HwSwitchFb303Stats.cpp b/fboss/agent/hw/HwSwitchFb303Stats.cpp index 17947c1d88dc6..2d27bf0c9ab83 100644 --- a/fboss/agent/hw/HwSwitchFb303Stats.cpp +++ b/fboss/agent/hw/HwSwitchFb303Stats.cpp @@ -214,6 +214,11 @@ HwSwitchFb303Stats::HwSwitchFb303Stats( map, getCounterPrefix() + "phy_info_collection_failed", SUM, + RATE), + invalidQueueRxPackets_( + map, + getCounterPrefix() + "invalid_queue_rx_packets", + SUM, RATE) {} void HwSwitchFb303Stats::update(const HwSwitchDropStats& dropStats) { diff --git a/fboss/agent/hw/HwSwitchFb303Stats.h b/fboss/agent/hw/HwSwitchFb303Stats.h index 50ce8a07eba90..4fa9fb76ed7ba 100644 --- a/fboss/agent/hw/HwSwitchFb303Stats.h +++ b/fboss/agent/hw/HwSwitchFb303Stats.h @@ -101,6 +101,9 @@ class HwSwitchFb303Stats { void phyInfoCollectionFailed() { phyInfoCollectionFailed_.addValue(1); } + void invalidQueueRxPackets() { + invalidQueueRxPackets_.addValue(1); + } void fabricReachabilityMissingCount(int64_t value); void fabricReachabilityMismatchCount(int64_t value); void virtualDevicesWithAsymmetricConnectivity(int64_t value); @@ -257,6 +260,7 @@ class HwSwitchFb303Stats { // info collection failures TLTimeseries hwStatsCollectionFailed_; TLTimeseries phyInfoCollectionFailed_; + TLTimeseries invalidQueueRxPackets_; }; } // namespace facebook::fboss diff --git a/fboss/agent/mnpu/SplitAgentThriftSyncer.cpp b/fboss/agent/mnpu/SplitAgentThriftSyncer.cpp index 185c69a53a637..d11f981430495 100644 --- a/fboss/agent/mnpu/SplitAgentThriftSyncer.cpp +++ b/fboss/agent/mnpu/SplitAgentThriftSyncer.cpp @@ -28,6 +28,7 @@ SplitAgentThriftSyncer::SplitAgentThriftSyncer( : retryThread_(std::make_shared( "SplitAgentThriftRetryThread")), switchId_(switchId), + hwSwitch_(hw), linkChangeEventSinkClient_(std::make_unique( serverPort, switchId_, @@ -77,7 +78,10 @@ void SplitAgentThriftSyncer::packetReceived( rxPkt.aggPort() = pkt->getSrcAggregatePort(); } if (pkt->cosQueue()) { - rxPkt.cosQueue() = hwQueueIdToCpuCosQueueId(*pkt->cosQueue()); + rxPkt.cosQueue() = hwQueueIdToCpuCosQueueId( + *pkt->cosQueue(), + hwSwitch_->getPlatform()->getAsic(), + hwSwitch_->getSwitchStats()); } // coalesce the IOBuf before copy pkt->buf()->coalesce(); diff --git a/fboss/agent/mnpu/SplitAgentThriftSyncer.h b/fboss/agent/mnpu/SplitAgentThriftSyncer.h index 1662a5b4eb57e..8710ae1b9e7cd 100644 --- a/fboss/agent/mnpu/SplitAgentThriftSyncer.h +++ b/fboss/agent/mnpu/SplitAgentThriftSyncer.h @@ -76,6 +76,7 @@ class SplitAgentThriftSyncer : public HwSwitchCallback { private: std::shared_ptr retryThread_; SwitchID switchId_; + HwSwitch* hwSwitch_; std::unique_ptr linkChangeEventSinkClient_; std::unique_ptr txPktEventStreamClient_; std::unique_ptr operDeltaClient_; From ffc229e4d685f0e63e30a9260253e3f7e24a0378 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 25 Oct 2024 19:38:23 -0700 Subject: [PATCH 356/479] Add inbandPortId to dsf node and switch info struct Summary: Till now this has been implicitly assumed to be 1. But for 2-stage DSF this assumption no longer holds. And since this id is needed for bootstrapping we need it to be part of config Reviewed By: shri-khare Differential Revision: D64993210 Privacy Context Container: L1125642 fbshipit-source-id: a3ef6c029ce20c0f1f551f26ddb4e75c0b44f062 --- fboss/agent/switch_config.thrift | 10 ++++++++++ fboss/fsdb/if/oss/fsdb_model_thriftpath.h | 22 ++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/fboss/agent/switch_config.thrift b/fboss/agent/switch_config.thrift index 039c452701313..62f3cecc36dfc 100644 --- a/fboss/agent/switch_config.thrift +++ b/fboss/agent/switch_config.thrift @@ -1638,6 +1638,11 @@ struct SwitchInfo { // Offset from where to start global system port // ID allocation from 10: optional i32 globalSystemPortOffset; + // Inband port ID - port used by this DSF node + // for inband communication. This must be known + // as part of config for other nodes to bootstrap + // communication to this node + 11: optional i32 inbandPortId; } /* @@ -1820,6 +1825,11 @@ struct DsfNode { // ID allocation from 12: optional i32 globalSystemPortOffset; 13: SystemPortRanges systemPortRanges; + // Inband port ID - port used by this DSF node + // for inband communication. This must be known + // as part of config for other nodes to bootstrap + // communication to this node + 14: optional i32 inbandPortId; } /** diff --git a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h index fdaae20a33d92..aae3080407156 100755 --- a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h +++ b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h @@ -11027,7 +11027,8 @@ std::pair>, std::pair>, std::pair>, -std::pair>>; +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, std::pair, Child<::facebook::fboss::cfg::DsfNodeType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::DsfNodeType>>>, @@ -11040,7 +11041,8 @@ std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::SystemPortRanges, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, ChildThriftPath<::facebook::fboss::cfg::SystemPortRanges, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -11054,7 +11056,8 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -11073,6 +11076,7 @@ std::pair auto operator()(const std::integral_constant&) { @@ -11089,6 +11093,7 @@ std::pair @@ -17063,7 +17068,8 @@ std::pair>, std::pair>, std::pair>, -std::pair>>; +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::SwitchType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>>, std::pair, Child<::facebook::fboss::cfg::AsicType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AsicType>>>, std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, @@ -17073,7 +17079,8 @@ std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, ChildThriftPath<::facebook::fboss::cfg::SystemPortRanges, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -17084,7 +17091,8 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -17100,6 +17108,7 @@ std::pair auto operator()(const std::integral_constant&) { @@ -17113,6 +17122,7 @@ std::pair From f7eab18ae44e0046cc637f6650a053a90202a12a Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Fri, 25 Oct 2024 21:07:20 -0700 Subject: [PATCH 357/479] Add a way to specify a subtype for object in SaiTracer Summary: Currently there is no way to specify a subtype for an object which is relevant for sai replayer in some cases like mirror, provide an option. Reviewed By: jasmeetbagga Differential Revision: D64970585 fbshipit-source-id: 1fe7dd4494eeaf25081a7b8b7e0df58bbf320dc6 --- fboss/agent/hw/sai/tracer/SaiTracer.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fboss/agent/hw/sai/tracer/SaiTracer.h b/fboss/agent/hw/sai/tracer/SaiTracer.h index 292e377741e62..f2c165570b132 100644 --- a/fboss/agent/hw/sai/tracer/SaiTracer.h +++ b/fboss/agent/hw/sai/tracer/SaiTracer.h @@ -826,6 +826,19 @@ class SaiTracer { attr_name::ExtractSelectionType)); \ } +#define SAI_EXT_ATTR_MAP_2(obj_type, obj_sub_type, attr_name) \ + if (facebook::fboss::Sai##obj_sub_type##Traits::Attributes::attr_name:: \ + AttributeId()() \ + .has_value()) { \ + _##obj_type##Map[facebook::fboss::Sai##obj_sub_type##Traits::Attributes:: \ + attr_name::AttributeId()() \ + .value()] = \ + std::make_pair( \ + #attr_name, \ + TYPE_INDEX(facebook::fboss::Sai##obj_sub_type##Traits:: \ + Attributes::attr_name::ExtractSelectionType)); \ + } + #define SET_SAI_REGULAR_ATTRIBUTES(obj_type) \ void set##obj_type##Attributes( \ const sai_attribute_t* attr_list, \ From 9163c580b9741e2fc5d52c17ddaceb7f2ef52196 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Fri, 25 Oct 2024 21:07:20 -0700 Subject: [PATCH 358/479] Add support for extn attr SAI_MIRROR_SESSION_ATTR_TC_BUFFER_LIMIT Summary: As titled, add new attribute to specify buffer limits for mirror session. Reviewed By: jasmeetbagga Differential Revision: D64970583 fbshipit-source-id: 8cb9861b8a77f95209233ac5bee70b133a775e91 --- cmake/AgentHwSaiApi.cmake | 3 ++ fboss/agent/hw/sai/api/MirrorApi.h | 9 +++++- fboss/agent/hw/sai/api/bcm/MirrorApi.cpp | 29 +++++++++++++++++++ .../hw/sai/api/fake/FakeSaiExtensions.cpp | 6 ++++ fboss/agent/hw/sai/api/oss/MirrorApi.cpp | 12 ++++++++ fboss/agent/hw/sai/api/tajo/MirrorApi.cpp | 12 ++++++++ .../agent/hw/sai/switch/SaiMirrorManager.cpp | 9 +++++- fboss/agent/hw/sai/tracer/MirrorApiTracer.cpp | 6 ++++ 8 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 fboss/agent/hw/sai/api/bcm/MirrorApi.cpp create mode 100644 fboss/agent/hw/sai/api/oss/MirrorApi.cpp create mode 100644 fboss/agent/hw/sai/api/tajo/MirrorApi.cpp diff --git a/cmake/AgentHwSaiApi.cmake b/cmake/AgentHwSaiApi.cmake index 2fa756d6ca262..7d6fb897b770f 100644 --- a/cmake/AgentHwSaiApi.cmake +++ b/cmake/AgentHwSaiApi.cmake @@ -92,6 +92,7 @@ if (SAI_TAJO_IMPL) fboss/agent/hw/sai/api/tajo/DebugCounterApi.cpp fboss/agent/hw/sai/api/tajo/BufferApi.cpp fboss/agent/hw/sai/api/tajo/QueueApi.cpp + fboss/agent/hw/sai/api/tajo/MirrorApi.cpp ) find_path(SAI_IMPL_DIR NAMES lib/libsai_impl.a) @@ -105,6 +106,7 @@ elseif (SAI_BRCM_IMPL) fboss/agent/hw/sai/api/bcm/DebugCounterApi.cpp fboss/agent/hw/sai/api/bcm/BufferApi.cpp fboss/agent/hw/sai/api/bcm/QueueApi.cpp + fboss/agent/hw/sai/api/bcm/MirrorApi.cpp ) find_path(SAI_IMPL_DIR NAMES lib/libsai_impl.a) @@ -118,6 +120,7 @@ elseif (CHENAB_SAI_SDK) fboss/agent/hw/sai/api/oss/DebugCounterApi.cpp fboss/agent/hw/sai/api/oss/BufferApi.cpp fboss/agent/hw/sai/api/oss/QueueApi.cpp + fboss/agent/hw/sai/api/oss/MirrorApi.cpp ) find_path(SAI_IMPL_DIR NAMES lib/libsai_impl.a) diff --git a/fboss/agent/hw/sai/api/MirrorApi.h b/fboss/agent/hw/sai/api/MirrorApi.h index cb7933f97814e..0ede3ad5cc3a9 100644 --- a/fboss/agent/hw/sai/api/MirrorApi.h +++ b/fboss/agent/hw/sai/api/MirrorApi.h @@ -170,6 +170,11 @@ struct SaiMirrorTraits { EnumType, SAI_MIRROR_SESSION_ATTR_SAMPLE_RATE, sai_uint32_t>; + struct AttributeTcBufferLimit { + std::optional operator()(); + }; + using TcBufferLimit = + SaiExtensionAttribute; }; using CreateAttributes = std::tuple< typename Attributes::Type, @@ -184,7 +189,8 @@ struct SaiMirrorTraits { typename Attributes::IpHeaderVersion, std::optional, std::optional, - std::optional>; + std::optional, + std::optional>; using AdapterHostKey = std::tuple< typename Attributes::Type, typename Attributes::MonitorPort, @@ -250,6 +256,7 @@ SAI_ATTRIBUTE_NAME(EnhancedRemoteMirror, IpHeaderVersion) SAI_ATTRIBUTE_NAME(EnhancedRemoteMirror, SampleRate) SAI_ATTRIBUTE_NAME(SflowMirror, UdpSrcPort) SAI_ATTRIBUTE_NAME(SflowMirror, UdpDstPort) +SAI_ATTRIBUTE_NAME(SflowMirror, TcBufferLimit) class MirrorApi : public SaiApi { public: diff --git a/fboss/agent/hw/sai/api/bcm/MirrorApi.cpp b/fboss/agent/hw/sai/api/bcm/MirrorApi.cpp new file mode 100644 index 0000000000000..46d7ab7fa5200 --- /dev/null +++ b/fboss/agent/hw/sai/api/bcm/MirrorApi.cpp @@ -0,0 +1,29 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/api/MirrorApi.h" + +// TODO: Add support for 12.0 as well +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +extern "C" { + +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +} +#endif + +namespace facebook::fboss { + +std::optional +SaiSflowMirrorTraits::Attributes::AttributeTcBufferLimit::operator()() { +// TODO: Add support for 12.0 as well +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_MIRROR_SESSION_ATTR_TC_BUFFER_LIMIT; +#else + return std::nullopt; +#endif +} + +} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp index 7d65f3a49ab8b..e3c0a9900a9eb 100644 --- a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp +++ b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp @@ -2,6 +2,7 @@ #include "fboss/agent/hw/sai/api/BufferApi.h" #include "fboss/agent/hw/sai/api/DebugCounterApi.h" +#include "fboss/agent/hw/sai/api/MirrorApi.h" #include "fboss/agent/hw/sai/api/PortApi.h" #include "fboss/agent/hw/sai/api/QueueApi.h" #include "fboss/agent/hw/sai/api/SwitchApi.h" @@ -236,6 +237,11 @@ SaiBufferProfileTraits::Attributes::AttributeSramFadtXonOffset::operator()() { return std::nullopt; } +std::optional +SaiSflowMirrorTraits::Attributes::AttributeTcBufferLimit::operator()() { + return std::nullopt; +} + const std::vector& SaiSwitchTraits::dramStats() { static const std::vector stats; return stats; diff --git a/fboss/agent/hw/sai/api/oss/MirrorApi.cpp b/fboss/agent/hw/sai/api/oss/MirrorApi.cpp new file mode 100644 index 0000000000000..923ba68da9566 --- /dev/null +++ b/fboss/agent/hw/sai/api/oss/MirrorApi.cpp @@ -0,0 +1,12 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/api/MirrorApi.h" + +namespace facebook::fboss { + +std::optional +SaiSflowMirrorTraits::Attributes::AttributeTcBufferLimit::operator()() { + return std::nullopt; +} + +} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tajo/MirrorApi.cpp b/fboss/agent/hw/sai/api/tajo/MirrorApi.cpp new file mode 100644 index 0000000000000..923ba68da9566 --- /dev/null +++ b/fboss/agent/hw/sai/api/tajo/MirrorApi.cpp @@ -0,0 +1,12 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/api/MirrorApi.h" + +namespace facebook::fboss { + +std::optional +SaiSflowMirrorTraits::Attributes::AttributeTcBufferLimit::operator()() { + return std::nullopt; +} + +} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/SaiMirrorManager.cpp b/fboss/agent/hw/sai/switch/SaiMirrorManager.cpp index 383508deb6475..c7cb8b1efb657 100644 --- a/fboss/agent/hw/sai/switch/SaiMirrorManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiMirrorManager.cpp @@ -69,6 +69,12 @@ SaiMirrorHandle::SaiMirror SaiMirrorManager::addNodeSflow( auto headerVersion = mirrorTunnel.srcIp.isV4() ? 4 : 6; auto truncateSize = mirror->getTruncate() ? platform_->getAsic()->getMirrorTruncateSize() : 0; + std::optional tcBufferLimit; +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + // TODO: Fix this to be picked up from eventor VoQ config. + // For now, defaulting to 1M. + tcBufferLimit = 1000000; +#endif SaiSflowMirrorTraits::CreateAttributes attributes{ SAI_MIRROR_SESSION_TYPE_SFLOW, monitorPort, @@ -82,7 +88,8 @@ SaiMirrorHandle::SaiMirror SaiMirrorManager::addNodeSflow( headerVersion, mirrorTunnel.ttl, truncateSize, - mirror->getSamplingRate()}; + mirror->getSamplingRate(), + tcBufferLimit}; SaiSflowMirrorTraits::AdapterHostKey k{ SAI_MIRROR_SESSION_TYPE_SFLOW, monitorPort, diff --git a/fboss/agent/hw/sai/tracer/MirrorApiTracer.cpp b/fboss/agent/hw/sai/tracer/MirrorApiTracer.cpp index 52a960909e5c7..cfedc17767fc3 100644 --- a/fboss/agent/hw/sai/tracer/MirrorApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/MirrorApiTracer.cpp @@ -35,6 +35,11 @@ std::map> _MirrorSessionMap{ SAI_ATTR_MAP(SflowMirror, UdpSrcPort), SAI_ATTR_MAP(SflowMirror, UdpDstPort), }; + +void handleExtensionAttributes() { + SAI_EXT_ATTR_MAP_2(MirrorSession, SflowMirror, TcBufferLimit) +} + } // namespace namespace facebook::fboss { @@ -44,6 +49,7 @@ WRAP_SET_ATTR_FUNC(mirror_session, SAI_OBJECT_TYPE_MIRROR_SESSION, mirror); WRAP_GET_ATTR_FUNC(mirror_session, SAI_OBJECT_TYPE_MIRROR_SESSION, mirror); sai_mirror_api_t* wrappedMirrorApi() { + handleExtensionAttributes(); static sai_mirror_api_t mirrorWrappers; mirrorWrappers.create_mirror_session = &wrap_create_mirror_session; mirrorWrappers.remove_mirror_session = &wrap_remove_mirror_session; From a26d8471c11a18ffbac1d7a2d496003ac475c2ec Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Fri, 25 Oct 2024 21:07:20 -0700 Subject: [PATCH 359/479] Revert changes done in D64251314, dont need this seq Summary: These changes are not needed anymore as sequencing is not really important in this test, hence removing this as this adds unwanted complexity. Reviewed By: jasmeetbagga Differential Revision: D64352689 fbshipit-source-id: cc1d4212ed3c2817c241eeedb4ef0f876339ceb6 --- .../agent_hw_tests/AgentSflowMirrorTest.cpp | 34 +++++-------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp index 8e325d50a9803..deb1c8185c1f8 100644 --- a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp @@ -45,32 +45,25 @@ class AgentSflowMirrorTest : public AgentHwTest { } } - cfg::SwitchConfig baseConfig(const AgentEnsemble& ensemble, bool enableMirror) - const { + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { auto cfg = utility::onePortPerInterfaceConfig( ensemble.getSw(), ensemble.masterLogicalPortIds(), true /*interfaceHasSubnet*/); - if (enableMirror) { - this->configureMirror(cfg); - } auto port0 = ensemble.masterLogicalPortIds()[0]; auto port0Switch = ensemble.getSw()->getScopeResolver()->scope(port0).switchId(); auto asic = ensemble.getSw()->getHwAsicTable()->getHwAsic(port0Switch); auto ports = getPortsForSampling(ensemble.masterLogicalPortIds(), asic); + this->configureMirror(cfg); if (asic->isSupported(HwAsic::Feature::EVENTOR_PORT_FOR_SFLOW)) { utility::addEventorVoqConfig(&cfg, cfg::StreamType::UNICAST); } return cfg; } - cfg::SwitchConfig initialConfig( - const AgentEnsemble& ensemble) const override { - return baseConfig(ensemble, true /* enableMirror */); - } - void configureMirror(cfg::SwitchConfig& cfg, bool v4) const { utility::configureSflowMirror( cfg, kSflowMirror, false, utility::getSflowMirrorDestination(v4).str()); @@ -547,18 +540,16 @@ class AgentSflowMirrorWithLineRateTrafficTest : public AgentSflowMirrorTest { public: static const int kLosslessPriority{2}; - cfg::SwitchConfig initialConfig( - const AgentEnsemble& ensemble) const override { - return baseConfig(ensemble, false /* enableMirror */); - } void testSflowEgressCongestion() { constexpr int kNumDataTrafficPorts{6}; - auto baseSetup = [=, this]() { + auto setup = [=, this]() { auto allPorts = masterLogicalInterfacePortIds(); std::vector portIds( allPorts.begin(), allPorts.begin() + kNumDataTrafficPorts); std::vector losslessPgIds = {kLosslessPriority}; auto config = initialConfig(*getAgentEnsemble()); + // Configure 1:1 sampling to ensure high rate on mirror egress port + configSampling(config, 1); // PFC buffer configurations to ensure we have lossless traffic const std::map tcToPgOverride{}; const utility::PfcBufferParams bufferParams{ @@ -572,23 +563,14 @@ class AgentSflowMirrorWithLineRateTrafficTest bufferParams); // Make sure that traffic is going to loop for ever! utility::setTTLZeroCpuConfig(getAgentEnsemble()->getL3Asics(), config); - return config; - }; - auto setup = [=, this]() { - applyNewConfig(baseSetup()); + applyNewConfig(config); + resolveRouteForMirrorDestination(); utility::setupEcmpDataplaneLoopOnAllPorts(getAgentEnsemble()); utility::createTrafficOnMultiplePorts( getAgentEnsemble(), kNumDataTrafficPorts, sendPacket, 50 /*desiredPctLineRate*/); - // Now that we have line rate traffic, enable mirror - auto config = baseSetup(); - this->configureMirror(config, false); - // Configure 1:1 sampling to ensure high rate on mirror egress port - configSampling(config, 1); - applyNewConfig(config); - resolveRouteForMirrorDestination(); }; auto verify = [=, this]() { verifySflowEgressPortNotStuck(); From 912d34ca6a61e433ae75e2c40ceea085b0c09c45 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Fri, 25 Oct 2024 21:07:20 -0700 Subject: [PATCH 360/479] Use line rate mirror test to use truncate support Summary: Truncation is absolutely needed for J3 as eventor port can otherwise get stuck. Enable it for line rate test. Reviewed By: jasmeetbagga Differential Revision: D64352690 fbshipit-source-id: c7f16c6f16cd26fdf4658fed0e57d9eb18d24477 --- fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp index deb1c8185c1f8..65ae343e48a55 100644 --- a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp @@ -537,7 +537,7 @@ class AgentSflowMirrorOnTrunkTest : public AgentSflowMirrorTruncateTest { }; class AgentSflowMirrorWithLineRateTrafficTest - : public AgentSflowMirrorTest { + : public AgentSflowMirrorTruncateTest { public: static const int kLosslessPriority{2}; void testSflowEgressCongestion() { From 68ff70ae98fc113c1079d8f7b63469f2e2612a53 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Fri, 25 Oct 2024 21:07:20 -0700 Subject: [PATCH 361/479] Limit the rate to expect on mgmt port to be 1Gbps Summary: We dont need to see high rate on management port, limit this to 1Gbps as thats a more realistic number. Reviewed By: jasmeetbagga Differential Revision: D64352688 fbshipit-source-id: 1b179b7c16888f0113d5d2921f5ee5cd41e66585 --- .../test/agent_hw_tests/AgentSflowMirrorTest.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp index 65ae343e48a55..03d182a403d82 100644 --- a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp @@ -609,13 +609,10 @@ class AgentSflowMirrorWithLineRateTrafficTest void verifySflowEgressPortNotStuck() { auto portId = getNonSflowSampledInterfacePorts(); - // Check if stay above 90% of line rate - auto desiredRate = - static_cast( - getProgrammedState()->getPorts()->getNodeIf(portId)->getSpeed()) * - 1000 * 1000 * 0.9; - EXPECT_NO_THROW( - getAgentEnsemble()->waitForSpecificRateOnPort(portId, desiredRate)); + // Expect atleast 1Gbps of mirror traffic! + const uint64_t kDesiredMirroredTrafficRate{1000000000}; + EXPECT_NO_THROW(getAgentEnsemble()->waitForSpecificRateOnPort( + portId, kDesiredMirroredTrafficRate)); // Make sure that we can sustain the rate for longer duration constexpr int kNumberOfIterations{6}; constexpr int kWaitPeriod{5}; @@ -626,7 +623,7 @@ class AgentSflowMirrorWithLineRateTrafficTest auto rate = getAgentEnsemble()->getTrafficRate( prevPortStats, curPortStats, kWaitPeriod); // Ensure that we always see greater than the desired rate - EXPECT_GT(rate, desiredRate); + EXPECT_GT(rate, kDesiredMirroredTrafficRate); prevPortStats = curPortStats; } } From 8a4616c84017cd43b7e3b5eb6adc2e6505a310ff Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Fri, 25 Oct 2024 21:07:20 -0700 Subject: [PATCH 362/479] Add sai replayer audit exclusion for object with subtypes Summary: Currently object/subtype combo is not handled in sai replayer audit, so the audit is flagging the new SflowMirror attribute TcBufferLimit though the sai replayer support is in place. Adding this to the exclude list now. Reviewed By: zechengh09 Differential Revision: D64991361 fbshipit-source-id: b70540c6dd43ac7020fbad722f2f0b5c05c14d33 --- fboss/util/run_sai_replayer_attribute_audit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fboss/util/run_sai_replayer_attribute_audit.py b/fboss/util/run_sai_replayer_attribute_audit.py index 12501e99864d1..4a17b87c99285 100644 --- a/fboss/util/run_sai_replayer_attribute_audit.py +++ b/fboss/util/run_sai_replayer_attribute_audit.py @@ -17,7 +17,7 @@ # There are certain calls replayer don't wrap (e.g. RxPacket as it's callback from SDK). # Exclude these patterns when we audit the attributes. -PATTERN_TO_EXCLUDE = ["RxPacket"] +PATTERN_TO_EXCLUDE = ["RxPacket", "TcBufferLimit"] def get_used_attributes(): From 954772ae12e3fff40206f66f5a88abfbee674c75 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005307016 Date: Fri, 25 Oct 2024 21:48:37 -0700 Subject: [PATCH 363/479] upgrade pyre version in `fbcode/opensource` - batch 1 (#1024) Summary: Pull Request resolved: https://github.com/facebookincubator/zstrong/pull/1024 Differential Revision: D64977670 fbshipit-source-id: 505d9709aa088f7811e0f4d6d7ba26b07ffdbc94 --- build/fbcode_builder/getdeps/expr.py | 2 ++ build/fbcode_builder/getdeps/platform.py | 1 - build/fbcode_builder/getdeps/py_wheel_builder.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/fbcode_builder/getdeps/expr.py b/build/fbcode_builder/getdeps/expr.py index 0f51521d65816..3b3d2d13d8ebc 100644 --- a/build/fbcode_builder/getdeps/expr.py +++ b/build/fbcode_builder/getdeps/expr.py @@ -151,8 +151,10 @@ def top(self): def ident(self) -> str: ident = self.lex.get_token() + # pyre-fixme[6]: For 2nd argument expected `str` but got `Optional[str]`. if not re.match("[a-zA-Z]+", ident): raise Exception("expected identifier found %s" % ident) + # pyre-fixme[7]: Expected `str` but got `Optional[str]`. return ident def parse_not(self) -> NotExpr: diff --git a/build/fbcode_builder/getdeps/platform.py b/build/fbcode_builder/getdeps/platform.py index 1e021d99235a1..5e4acdc44e829 100644 --- a/build/fbcode_builder/getdeps/platform.py +++ b/build/fbcode_builder/getdeps/platform.py @@ -216,7 +216,6 @@ def __init__(self, ostype=None, distro=None, distrovers=None) -> None: ostype = "darwin" elif is_windows(): ostype = "windows" - # pyre-fixme[16]: Module `sys` has no attribute `getwindowsversion`. distrovers = str(sys.getwindowsversion().major) elif sys.platform.startswith("freebsd"): ostype = "freebsd" diff --git a/build/fbcode_builder/getdeps/py_wheel_builder.py b/build/fbcode_builder/getdeps/py_wheel_builder.py index 335d74afd1d31..7db5f2cb0127e 100644 --- a/build/fbcode_builder/getdeps/py_wheel_builder.py +++ b/build/fbcode_builder/getdeps/py_wheel_builder.py @@ -95,13 +95,14 @@ # something like the following pip3 command: # pip3 --isolated install --no-cache-dir --no-index --system \ # --target -# pyre-fixme[13] fields initialized in _build class PythonWheelBuilder(BuilderBase): """This Builder can take Python wheel archives and install them as python libraries that can be used by add_fb_python_library()/add_fb_python_executable() CMake rules. """ + # pyre-fixme[13]: Attribute `dist_info_dir` is never initialized. dist_info_dir: str + # pyre-fixme[13]: Attribute `template_format_dict` is never initialized. template_format_dict: Dict[str, str] def _build(self, reconfigure: bool) -> None: From e152d22fdb420617a4059b989182e1e03f343885 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Sat, 26 Oct 2024 01:04:30 -0700 Subject: [PATCH 364/479] Add inbandPortId to test config generation logic Summary: As titled Reviewed By: shri-khare, nivinl Differential Revision: D64998166 Privacy Context Container: L1125642 fbshipit-source-id: c07704c7ebfe9c3b687db1f584dd7f22f266071f --- fboss/agent/test/TestUtils.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fboss/agent/test/TestUtils.cpp b/fboss/agent/test/TestUtils.cpp index d305236abc1cd..f063cd943b780 100644 --- a/fboss/agent/test/TestUtils.cpp +++ b/fboss/agent/test/TestUtils.cpp @@ -69,6 +69,7 @@ using namespace facebook::fboss; namespace { constexpr auto kSysPortRangeMin = 1000; +constexpr auto kSingleStageInbandPortId = 1; void initSwSwitchWithFlags(SwSwitch* sw, SwitchFlags flags) { if (flags & SwitchFlags::ENABLE_TUN) { @@ -498,6 +499,7 @@ cfg::DsfNode makeDsfNodeCfg( dsfNodeCfg.localSystemPortOffset() = *sysPortRange.minimum(); dsfNodeCfg.globalSystemPortOffset() = *sysPortRange.minimum(); dsfNodeCfg.systemPortRanges()->systemPortRanges()->push_back(sysPortRange); + dsfNodeCfg.inbandPortId() = kSingleStageInbandPortId; } dsfNodeCfg.asicType() = asicType; dsfNodeCfg.platformType() = type == cfg::DsfNodeType::INTERFACE_NODE @@ -1476,6 +1478,9 @@ cfg::SwitchInfo createSwitchInfo( switchInfo.localSystemPortOffset() = *sysPortMin; switchInfo.globalSystemPortOffset() = *sysPortMin; } + if (switchType == cfg::SwitchType::VOQ) { + switchInfo.inbandPortId() = kSingleStageInbandPortId; + } if (mac) { switchInfo.switchMac() = *mac; } From 9449beeaa640ccd1a0b2e46a46a267091dd73a2f Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Sat, 26 Oct 2024 01:04:30 -0700 Subject: [PATCH 365/479] Generate inband port ID for agent hw test configs as well Summary: As titled Reviewed By: shri-khare Differential Revision: D65001067 Privacy Context Container: L1125642 fbshipit-source-id: 54d80e4b5950be0c200b44622c2a05296d1836aa --- fboss/agent/Constants.h | 1 + fboss/agent/test/BUCK | 1 + fboss/agent/test/TestUtils.cpp | 2 +- fboss/agent/test/utils/BUCK | 1 + fboss/agent/test/utils/ConfigUtils.cpp | 5 +++++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fboss/agent/Constants.h b/fboss/agent/Constants.h index 72896f99abf6f..7a1fe3a7fe0aa 100644 --- a/fboss/agent/Constants.h +++ b/fboss/agent/Constants.h @@ -71,5 +71,6 @@ inline constexpr folly::StringPiece kUdfGroupPktMatchers{"udfGroupPktMatchers"}; inline constexpr folly::StringPiece kUdfPacketMatchers{"udfPacketMatchers"}; inline constexpr int32_t kDefaultVrf{0}; +constexpr auto kSingleStageInbandPortId = 1; } // namespace facebook::fboss diff --git a/fboss/agent/test/BUCK b/fboss/agent/test/BUCK index 408efcb4b5cf4..735cdc7fd369f 100644 --- a/fboss/agent/test/BUCK +++ b/fboss/agent/test/BUCK @@ -194,6 +194,7 @@ cpp_library( "//fb303:service_data", "//fb303:thread_cached_service_data", "//fboss/agent:apply_thrift_config", + "//fboss/agent:constants", "//fboss/agent:core", "//fboss/agent:fboss-error", "//fboss/agent:load_agent_config", diff --git a/fboss/agent/test/TestUtils.cpp b/fboss/agent/test/TestUtils.cpp index f063cd943b780..b00d72e1e3235 100644 --- a/fboss/agent/test/TestUtils.cpp +++ b/fboss/agent/test/TestUtils.cpp @@ -32,6 +32,7 @@ #include "fboss/agent/test/HwTestHandle.h" #include "fboss/agent/test/MockTunManager.h" +#include "fboss/agent/Constants.h" #include "fboss/agent/SwSwitchRouteUpdateWrapper.h" #include "fboss/agent/gen-cpp2/switch_config_constants.h" #include "fboss/agent/rib/RoutingInformationBase.h" @@ -69,7 +70,6 @@ using namespace facebook::fboss; namespace { constexpr auto kSysPortRangeMin = 1000; -constexpr auto kSingleStageInbandPortId = 1; void initSwSwitchWithFlags(SwSwitch* sw, SwitchFlags flags) { if (flags & SwitchFlags::ENABLE_TUN) { diff --git a/fboss/agent/test/utils/BUCK b/fboss/agent/test/utils/BUCK index 9e3e492218562..454d13c7fffa4 100644 --- a/fboss/agent/test/utils/BUCK +++ b/fboss/agent/test/utils/BUCK @@ -155,6 +155,7 @@ cpp_library( ":asic_test_utils", ":port_test_utils", "//fboss/agent:agent_features", + "//fboss/agent:constants", "//fboss/agent:core", "//fboss/agent:fboss-error", "//fboss/agent:fboss-types", diff --git a/fboss/agent/test/utils/ConfigUtils.cpp b/fboss/agent/test/utils/ConfigUtils.cpp index 7e194f6cf6ab3..9aad9cae566b8 100644 --- a/fboss/agent/test/utils/ConfigUtils.cpp +++ b/fboss/agent/test/utils/ConfigUtils.cpp @@ -12,6 +12,7 @@ #include #include "fboss/agent/AgentFeatures.h" +#include "fboss/agent/Constants.h" #include "fboss/agent/FbossError.h" #include "fboss/agent/SwSwitch.h" #include "fboss/agent/test/TestEnsembleIf.h" @@ -461,6 +462,7 @@ cfg::DsfNode dsfNodeConfig( dsfNode.loopbackIps() = getLoopbackIps(SwitchID(*dsfNode.switchId())); dsfNode.localSystemPortOffset() = *dsfNode.systemPortRange()->minimum(); dsfNode.globalSystemPortOffset() = *dsfNode.systemPortRange()->minimum(); + dsfNode.inbandPortId() = kSingleStageInbandPortId; break; case cfg::SwitchType::FABRIC: dsfNode.type() = cfg::DsfNodeType::FABRIC_NODE; @@ -777,6 +779,9 @@ cfg::SwitchConfig genPortVlanCfg( switchInfo.globalSystemPortOffset() = *asic->getSystemPortRange()->minimum(); } + if (switchType == cfg::SwitchType::VOQ) { + switchInfo.inbandPortId() = kSingleStageInbandPortId; + } defaultSwitchIdToSwitchInfo.insert({SwitchID(switchId), switchInfo}); populateSwitchInfo( config, defaultSwitchIdToSwitchInfo, defaultHwAsicTable, platformType); From b481cae3f57d6521d04999cb3ce764580a536af5 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Sat, 26 Oct 2024 01:04:30 -0700 Subject: [PATCH 366/479] Throw if inbandPortId is not populated for interface nodes Summary: As titled Reviewed By: nivinl Differential Revision: D65002246 fbshipit-source-id: 488fa34eeda061227d1abade0efa3eeed8023f05 --- fboss/agent/ApplyThriftConfig.cpp | 3 +++ fboss/agent/state/DsfNode.cpp | 8 ++++++++ fboss/agent/state/DsfNode.h | 1 + 3 files changed, 12 insertions(+) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index ff746a2afc6d9..7d1a68be10916 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -1325,6 +1325,9 @@ std::shared_ptr ThriftConfigApplier::updateDsfNodes() { throw FbossError( "System port range must be non-empty for interface nodes"); } + if (!newNode->getInbandPortId().has_value()) { + throw FbossError("Inband port ID must be set for interface nodes"); + } } auto origNode = origNodes->getNodeIf(newNode->getID()); if (!origNode || *origNode != *newNode) { diff --git a/fboss/agent/state/DsfNode.cpp b/fboss/agent/state/DsfNode.cpp index a4c07433e5351..06fcf4f6e8944 100644 --- a/fboss/agent/state/DsfNode.cpp +++ b/fboss/agent/state/DsfNode.cpp @@ -106,6 +106,14 @@ std::optional DsfNode::getClusterId() const { return clusterId; } +std::optional DsfNode::getInbandPortId() const { + std::optional inbandPortId; + if (get().has_value()) { + inbandPortId = get()->cref(); + } + return inbandPortId; +} + std::optional DsfNode::getFabricLevel() const { std::optional fabricLevel; if (get().has_value()) { diff --git a/fboss/agent/state/DsfNode.h b/fboss/agent/state/DsfNode.h index 14b894ccbb2bf..c546245cab3cf 100644 --- a/fboss/agent/state/DsfNode.h +++ b/fboss/agent/state/DsfNode.h @@ -47,6 +47,7 @@ class DsfNode : public ThriftStructNode { std::optional getClusterId() const; std::optional getLocalSystemPortOffset() const; std::optional getGlobalSystemPortOffset() const; + std::optional getInbandPortId() const; void setLocalSystemPortOffset(std::optional val); void setGlobalSystemPortOffset(std::optional val); std::optional getFabricLevel() const; From d026cc4c82005736380491a0ed07f4ce60705138 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Sat, 26 Oct 2024 09:33:50 -0700 Subject: [PATCH 367/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/28856852a1c926ece3fad34f016f1441281e7ade https://github.com/facebook/buck2-shims-meta/commit/3d85b5b3eb9f06cdad2436a0a874dcd0181bf3f2 https://github.com/facebook/fb303/commit/66efc9d44697428e0f33c2c993efa51f80289a75 https://github.com/facebook/fbthrift/commit/5ade17aea7b774a18518056b0214426628f29ae2 https://github.com/facebook/folly/commit/52e1242b8cce2ab6986e1fe109c45e17b60818a8 https://github.com/facebook/mvfst/commit/2ac6b90daa39cd1b55336fbb790c310b4449a5e1 https://github.com/facebook/proxygen/commit/fb32b85ed8a432064ef0fdb44ff8319019725bac https://github.com/facebook/wangle/commit/e22de991f58f80a51309dd9af3bb7deac534a9dd https://github.com/facebookexperimental/edencommon/commit/3fc8dd1786e356e6f35476ca06a2f2a3a3b40c03 https://github.com/facebookexperimental/rust-shed/commit/81988be4f8a53a4f7610607e732edecf971ec527 https://github.com/facebookincubator/fizz/commit/9ef3f0ac3d9cec347e72c0a128a5defb7e2e0a91 Reviewed By: ajb85 fbshipit-source-id: 129dfe93c0042511223599e30b4ef33ff57f16bc --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index d93d80c5f4ead..8ce6ed7ff08ae 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 7857d6cbf9ce503127853e813c0cda97f94b3679 +Subproject commit 66efc9d44697428e0f33c2c993efa51f80289a75 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index a246932f82e1b..963ddbde2ada8 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 2e08d21959f84ddb84967addfadd7861875d7542 +Subproject commit 5ade17aea7b774a18518056b0214426628f29ae2 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 21cc58d449711..c92e4870004f3 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 16c2c41fec3b0d72c43e494d1c1e4f32776517bf +Subproject commit 52e1242b8cce2ab6986e1fe109c45e17b60818a8 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index a357cba98646e..83f6ed1e3f674 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 39eea114fbcace505bce2dead228b7cb1e6c2895 +Subproject commit e22de991f58f80a51309dd9af3bb7deac534a9dd diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 1ed7309f123db..31b5800fca9e8 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 8f1a9c02f49bb7ea986d0fa3350b17c284d37026 +Subproject commit 9ef3f0ac3d9cec347e72c0a128a5defb7e2e0a91 From 9fa045f93f3ea498fc82a40c75ffaa25434469cb Mon Sep 17 00:00:00 2001 From: Ron He Date: Sat, 26 Oct 2024 11:26:39 -0700 Subject: [PATCH 368/479] Default balanced input mode to false Summary: As titled. Also fix typo Reviewed By: shri-khare Differential Revision: D65008726 fbshipit-source-id: fb72f27b436558b1cf151a14ab2f19bf2aa0839d --- fboss/agent/AgentFeatures.cpp | 5 +++-- fboss/agent/AgentFeatures.h | 2 +- fboss/agent/ApplyThriftConfig.cpp | 2 +- fboss/agent/test/ReachabilityGroupTests.cpp | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fboss/agent/AgentFeatures.cpp b/fboss/agent/AgentFeatures.cpp index 5b736d85a960f..652ac6bcc3065 100644 --- a/fboss/agent/AgentFeatures.cpp +++ b/fboss/agent/AgentFeatures.cpp @@ -140,9 +140,10 @@ DEFINE_bool( false, "Flag to indicate whether SwSwitch will crash if any hw switch connection is lost. This will be used in tests to ensure all hw agent running."); +// TODO: Need fix for the feature on single link configuration (CS00012375262) DEFINE_bool( - enable_balanced_intput_mode, - true, + enable_balanced_input_mode, + false, "Enable balanced input mode on fabric devices"); DEFINE_int32( diff --git a/fboss/agent/AgentFeatures.h b/fboss/agent/AgentFeatures.h index ca896aff82537..6537cc0bbbf62 100644 --- a/fboss/agent/AgentFeatures.h +++ b/fboss/agent/AgentFeatures.h @@ -60,7 +60,7 @@ DECLARE_bool(disable_looped_fabric_ports); DECLARE_bool(detect_wrong_fabric_connections); DECLARE_bool(dsf_edsw_platform_mapping); DECLARE_bool(exit_for_any_hw_disconnect); -DECLARE_bool(enable_balanced_intput_mode); +DECLARE_bool(enable_balanced_input_mode); DECLARE_int32(hw_agent_connection_timeout_ms); DECLARE_bool(qgroup_guarantee_enable); DECLARE_bool(skip_buffer_reservation); diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 7d1a68be10916..6db53fd35c774 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -808,7 +808,7 @@ shared_ptr ThriftConfigApplier::run() { { // Update reachability group setting for input balanced auto localFabricSwitchIds = getLocalFabricSwitchIds(); - if (FLAGS_enable_balanced_intput_mode && !localFabricSwitchIds.empty()) { + if (FLAGS_enable_balanced_input_mode && !localFabricSwitchIds.empty()) { processReachabilityGroup(localFabricSwitchIds); } } diff --git a/fboss/agent/test/ReachabilityGroupTests.cpp b/fboss/agent/test/ReachabilityGroupTests.cpp index 27c7e7b6b3782..14813a551a960 100644 --- a/fboss/agent/test/ReachabilityGroupTests.cpp +++ b/fboss/agent/test/ReachabilityGroupTests.cpp @@ -16,6 +16,7 @@ class ReachabilityGroupTest : public ::testing::Test { public: void SetUp() override { FLAGS_multi_switch = true; + fLB::FLAGS_enable_balanced_input_mode = true; auto config = initialConfig(); handle_ = createTestHandle(&config); sw_ = handle_->getSw(); From 78c28c24b8b1f0e468b9e3a1f7b821fe80438202 Mon Sep 17 00:00:00 2001 From: Ravi Vantipalli Date: Sat, 26 Oct 2024 11:50:50 -0700 Subject: [PATCH 369/479] SAI UDF agent state changes Summary: same as subject Reviewed By: zechengh09 Differential Revision: D64416112 fbshipit-source-id: 27142ec0d1e3260757413d66922f428f36fc85d5 --- fboss/agent/ApplyThriftConfig.cpp | 5 ++++- fboss/agent/state/AclTable.h | 8 +++++++ fboss/agent/state/tests/AclGroupTests.cpp | 26 +++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 6db53fd35c774..17580f014c0bd 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -3184,12 +3184,14 @@ std::shared_ptr ThriftConfigApplier::updateAclTable( std::vector newActionTypes = *configTable.actionTypes(); std::vector newQualifiers = *configTable.qualifiers(); + std::vector newUdfGroups = *configTable.udfGroups(); if (origTable) { ++(*numExistingTablesProcessed); if (!newTableEntries && newTablePriority == origTable->getPriority() && newActionTypes == origTable->getActionTypes() && - newQualifiers == origTable->getQualifiers()) { + newQualifiers == origTable->getQualifiers() && + newUdfGroups == origTable->getUdfGroups()->toThrift()) { // Original table exists with same attributes. return nullptr; } @@ -3212,6 +3214,7 @@ std::shared_ptr ThriftConfigApplier::updateAclTable( newTable->setActionTypes(newActionTypes); newTable->setQualifiers(newQualifiers); + newTable->setUdfGroups(newUdfGroups); return newTable; } diff --git a/fboss/agent/state/AclTable.h b/fboss/agent/state/AclTable.h index dfebef1670988..ee4600826f43b 100644 --- a/fboss/agent/state/AclTable.h +++ b/fboss/agent/state/AclTable.h @@ -84,6 +84,14 @@ class AclTable : public ThriftStructNode { set(qualifiers); } + auto getUdfGroups() const { + return safe_cref(); + } + + void setUdfGroups(const std::vector& udfGroups) { + set(udfGroups); + } + // Offset applied to dataplane ACL priority. Dataplane ACL // entries are given priorites >= 100K and CPU ACL entries // priorities < 100K. diff --git a/fboss/agent/state/tests/AclGroupTests.cpp b/fboss/agent/state/tests/AclGroupTests.cpp index 51a68d9254499..6912786ecda51 100644 --- a/fboss/agent/state/tests/AclGroupTests.cpp +++ b/fboss/agent/state/tests/AclGroupTests.cpp @@ -68,6 +68,15 @@ const std::vector kQualifiers = { cfg::AclTableQualifier::SRC_IPV4, cfg::AclTableQualifier::DST_IPV4}; +const std::string kUdfGroup1 = "udfGroup1"; +const std::string kUdfGroup2 = "udfGroup2"; +const std::string kUdfGroup3 = "udfGroup3"; + +const std::vector kAclUdfGroups = { + kUdfGroup1, + kUdfGroup2, + kUdfGroup3}; + namespace { std::shared_ptr getAclMapFromState( @@ -185,10 +194,12 @@ TEST(AclGroup, TestEquality) { table1->setAclMap(map1); table1->setActionTypes(kActionTypes); table1->setQualifiers(kQualifiers); + table1->setUdfGroups(kAclUdfGroups); auto table2 = std::make_shared(2, kTable1); table2->setAclMap(map2); table2->setActionTypes(kActionTypes); table2->setQualifiers(kQualifiers); + table2->setUdfGroups(kAclUdfGroups); validateNodeSerialization(*table1); validateNodeSerialization(*table2); @@ -292,6 +303,7 @@ TEST(AclGroup, SerializeAclTable) { table->setAclMap(map); table->setActionTypes(kActionTypes); table->setQualifiers(kQualifiers); + table->setUdfGroups(kAclUdfGroups); validateNodeSerialization(*table); auto serialized = table->toThrift(); @@ -303,6 +315,7 @@ TEST(AclGroup, SerializeAclTable) { EXPECT_EQ(*(tableBack->getAclMap()), *map); EXPECT_EQ(tableBack->getActionTypes(), kActionTypes); EXPECT_EQ(tableBack->getQualifiers(), kQualifiers); + EXPECT_EQ(tableBack->getUdfGroups()->toThrift(), kAclUdfGroups); // change the priority table->setPriority(2); @@ -317,6 +330,7 @@ TEST(AclGroup, SerializeAclTable) { EXPECT_EQ(*(tableBack->getAclMap()), *map); EXPECT_EQ(tableBack->getActionTypes(), kActionTypes); EXPECT_EQ(tableBack->getQualifiers(), kQualifiers); + EXPECT_EQ(tableBack->getUdfGroups()->toThrift(), kAclUdfGroups); } TEST(AclGroup, SerializeAclTableMap) { @@ -495,6 +509,7 @@ TEST(AclGroup, ApplyConfigColdbootMultipleAclTable) { table1->setAclMap(map1); table1->setActionTypes(kActionTypes); table1->setQualifiers(kQualifiers); + table1->setUdfGroups(kAclUdfGroups); validateNodeSerialization(*table1); auto tableMap = make_shared(); @@ -521,6 +536,9 @@ TEST(AclGroup, ApplyConfigColdbootMultipleAclTable) { cfgTable1.qualifiers_ref()->resize(kQualifiers.size()); cfgTable1.qualifiers_ref() = kQualifiers; + cfgTable1.udfGroups_ref()->resize(kAclUdfGroups.size()); + cfgTable1.udfGroups_ref() = kAclUdfGroups; + cfg::SwitchConfig config; cfg::AclTableGroup cfgTableGroup; config.aclTableGroup_ref() = cfgTableGroup; @@ -579,6 +597,14 @@ TEST(AclGroup, ApplyConfigColdbootMultipleAclTable) { ->getTableIf(table1->getID()) ->getQualifiers(), kQualifiers); + EXPECT_EQ( + stateV1->getAclTableGroups() + ->getNodeIf(kAclStage1) + ->getAclTableMap() + ->getTableIf(table1->getID()) + ->getUdfGroups() + ->toThrift(), + kAclUdfGroups); EXPECT_EQ( *(stateV1->getAclTableGroups() ->getNodeIf(kAclStage1) From 2b031e90d87ac00dadbea0cbae9a29633d771364 Mon Sep 17 00:00:00 2001 From: Ravi Vantipalli Date: Sat, 26 Oct 2024 11:50:50 -0700 Subject: [PATCH 370/479] Fake SAI impl for UDF ACL fields Summary: same as summary We will add support for upto 5 UDF groups. RTSW uses 4 as of now. Reviewed By: zechengh09 Differential Revision: D64416866 fbshipit-source-id: db8d93f65651457bd4d5f9a5508fe3dd462a161c --- fboss/agent/hw/sai/fake/FakeSaiAcl.cpp | 188 +++++++++++++++++++++++-- fboss/agent/hw/sai/fake/FakeSaiAcl.h | 39 ++++- 2 files changed, 216 insertions(+), 11 deletions(-) diff --git a/fboss/agent/hw/sai/fake/FakeSaiAcl.cpp b/fboss/agent/hw/sai/fake/FakeSaiAcl.cpp index 09b4e2a2cf1ca..4466766ab1238 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiAcl.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiAcl.cpp @@ -75,6 +75,12 @@ bool FakeAclTable::entryFieldSupported(const sai_attribute_t& attr) const { return fieldBthOpcode; case SAI_ACL_TABLE_ATTR_FIELD_IPV6_NEXT_HEADER: return fieldIpv6NextHeader; + case SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN: + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 1): + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 2): + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 3): + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 4): + return true; // Actions case SAI_ACL_ENTRY_ATTR_ACTION_PACKET_ACTION: case SAI_ACL_ENTRY_ATTR_ACTION_COUNTER: @@ -129,6 +135,11 @@ sai_status_t create_acl_table_fn( bool fieldOuterVlanId = 0; bool fieldBthOpcode = 0; bool fieldIpv6NextHeader = 0; + sai_object_id_t userDefinedFieldGroupMin = SAI_NULL_OBJECT_ID; + sai_object_id_t userDefinedFieldGroupMin1 = SAI_NULL_OBJECT_ID; + sai_object_id_t userDefinedFieldGroupMin2 = SAI_NULL_OBJECT_ID; + sai_object_id_t userDefinedFieldGroupMin3 = SAI_NULL_OBJECT_ID; + sai_object_id_t userDefinedFieldGroupMin4 = SAI_NULL_OBJECT_ID; for (int i = 0; i < attr_count; ++i) { switch (attr_list[i].id) { @@ -225,6 +236,21 @@ sai_status_t create_acl_table_fn( case SAI_ACL_TABLE_ATTR_FIELD_IPV6_NEXT_HEADER: fieldIpv6NextHeader = attr_list[i].value.booldata; break; + case SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN: + userDefinedFieldGroupMin = attr_list[i].value.oid; + break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 1): + userDefinedFieldGroupMin1 = attr_list[i].value.oid; + break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 2): + userDefinedFieldGroupMin2 = attr_list[i].value.oid; + break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 3): + userDefinedFieldGroupMin3 = attr_list[i].value.oid; + break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 4): + userDefinedFieldGroupMin4 = attr_list[i].value.oid; + break; default: return SAI_STATUS_INVALID_PARAMETER; break; @@ -264,7 +290,12 @@ sai_status_t create_acl_table_fn( fieldEthertype, fieldOuterVlanId, fieldBthOpcode, - fieldIpv6NextHeader); + fieldIpv6NextHeader, + userDefinedFieldGroupMin, + userDefinedFieldGroupMin1, + userDefinedFieldGroupMin2, + userDefinedFieldGroupMin3, + userDefinedFieldGroupMin4); return SAI_STATUS_SUCCESS; } @@ -451,6 +482,26 @@ sai_status_t get_acl_table_attribute_fn( const auto& aclTable = fs->aclTableManager.get(acl_table_id); attr[i].value.booldata = aclTable.fieldIpv6NextHeader; } break; + case SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN: { + const auto& aclTable = fs->aclTableManager.get(acl_table_id); + attr[i].value.oid = aclTable.userDefinedFieldGroupMin; + } break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 1): { + const auto& aclTable = fs->aclTableManager.get(acl_table_id); + attr[i].value.oid = aclTable.userDefinedFieldGroupMin1; + } break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 2): { + const auto& aclTable = fs->aclTableManager.get(acl_table_id); + attr[i].value.oid = aclTable.userDefinedFieldGroupMin2; + } break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 3): { + const auto& aclTable = fs->aclTableManager.get(acl_table_id); + attr[i].value.oid = aclTable.userDefinedFieldGroupMin3; + } break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 4): { + const auto& aclTable = fs->aclTableManager.get(acl_table_id); + attr[i].value.oid = aclTable.userDefinedFieldGroupMin4; + } break; case SAI_ACL_TABLE_ATTR_AVAILABLE_ACL_ENTRY: case SAI_ACL_TABLE_ATTR_AVAILABLE_ACL_COUNTER: attr[i].value.u32 = 1000; @@ -463,6 +514,25 @@ sai_status_t get_acl_table_attribute_fn( return SAI_STATUS_SUCCESS; } +void acl_entry_copy_u8list_from_attr( + std::vector& data, + std::vector& mask, + const sai_attribute_t* attr) { + data.resize(attr->value.aclfield.data.u8list.count); + std::copy( + attr->value.aclfield.data.u8list.list, + attr->value.aclfield.data.u8list.list + + attr->value.aclfield.data.u8list.count, + std::begin(data)); + mask.resize(attr->value.aclfield.mask.u8list.count); + std::copy( + attr->value.aclfield.mask.u8list.list, + attr->value.aclfield.mask.u8list.list + + attr->value.aclfield.mask.u8list.count, + std::begin(mask)); + return; +} + sai_status_t set_acl_entry_attribute_fn( sai_object_id_t acl_entry_id, const sai_attribute_t* attr) { @@ -638,30 +708,70 @@ sai_status_t set_acl_entry_attribute_fn( aclEntry.fieldNeighborDstUserMetaMask = attr->value.aclfield.mask.u32; res = SAI_STATUS_SUCCESS; break; - case SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE: + case SAI_ACL_ENTRY_ATTR_FIELD_ETHER_TYPE: aclEntry.fieldEtherTypeEnable = attr->value.aclfield.enable; aclEntry.fieldEtherTypeData = attr->value.aclfield.data.u16; aclEntry.fieldEtherTypeMask = attr->value.aclfield.mask.u16; res = SAI_STATUS_SUCCESS; break; - case SAI_ACL_TABLE_ATTR_FIELD_OUTER_VLAN_ID: + case SAI_ACL_ENTRY_ATTR_FIELD_OUTER_VLAN_ID: aclEntry.fieldOuterVlanIdEnable = attr->value.aclfield.enable; aclEntry.fieldOuterVlanIdData = attr->value.aclfield.data.u16; aclEntry.fieldOuterVlanIdMask = attr->value.aclfield.mask.u16; res = SAI_STATUS_SUCCESS; break; - case SAI_ACL_TABLE_ATTR_FIELD_BTH_OPCODE: + case SAI_ACL_ENTRY_ATTR_FIELD_BTH_OPCODE: aclEntry.fieldBthOpcodeEnable = attr->value.aclfield.enable; aclEntry.fieldBthOpcodeData = attr->value.aclfield.data.u8; aclEntry.fieldBthOpcodeMask = attr->value.aclfield.mask.u8; res = SAI_STATUS_SUCCESS; break; - case SAI_ACL_TABLE_ATTR_FIELD_IPV6_NEXT_HEADER: + case SAI_ACL_ENTRY_ATTR_FIELD_IPV6_NEXT_HEADER: aclEntry.fieldIpv6NextHeaderEnable = attr->value.aclfield.enable; aclEntry.fieldIpv6NextHeaderData = attr->value.aclfield.data.u8; aclEntry.fieldIpv6NextHeaderMask = attr->value.aclfield.mask.u8; res = SAI_STATUS_SUCCESS; break; + case SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN: + aclEntry.userDefinedFieldGroupMinEnable = attr->value.aclfield.enable; + acl_entry_copy_u8list_from_attr( + aclEntry.userDefinedFieldGroupMinData, + aclEntry.userDefinedFieldGroupMinMask, + attr); + res = SAI_STATUS_SUCCESS; + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 1): + aclEntry.userDefinedFieldGroupMin1Enable = attr->value.aclfield.enable; + acl_entry_copy_u8list_from_attr( + aclEntry.userDefinedFieldGroupMin1Data, + aclEntry.userDefinedFieldGroupMin1Mask, + attr); + res = SAI_STATUS_SUCCESS; + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 2): + aclEntry.userDefinedFieldGroupMin2Enable = attr->value.aclfield.enable; + acl_entry_copy_u8list_from_attr( + aclEntry.userDefinedFieldGroupMin2Data, + aclEntry.userDefinedFieldGroupMin2Mask, + attr); + res = SAI_STATUS_SUCCESS; + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 3): + aclEntry.userDefinedFieldGroupMin3Enable = attr->value.aclfield.enable; + acl_entry_copy_u8list_from_attr( + aclEntry.userDefinedFieldGroupMin3Data, + aclEntry.userDefinedFieldGroupMin3Mask, + attr); + res = SAI_STATUS_SUCCESS; + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 4): + aclEntry.userDefinedFieldGroupMin4Enable = attr->value.aclfield.enable; + acl_entry_copy_u8list_from_attr( + aclEntry.userDefinedFieldGroupMin4Data, + aclEntry.userDefinedFieldGroupMin4Mask, + attr); + res = SAI_STATUS_SUCCESS; + break; case SAI_ACL_ENTRY_ATTR_ACTION_PACKET_ACTION: aclEntry.actionPacketActionEnable = attr->value.aclaction.enable; @@ -880,26 +990,86 @@ sai_status_t get_acl_entry_attribute_fn( attr_list[i].value.aclfield.mask.u32 = aclEntry.fieldNeighborDstUserMetaMask; break; - case SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE: + case SAI_ACL_ENTRY_ATTR_FIELD_ETHER_TYPE: attr_list[i].value.aclfield.enable = aclEntry.fieldEtherTypeEnable; attr_list[i].value.aclfield.data.u16 = aclEntry.fieldEtherTypeData; attr_list[i].value.aclfield.mask.u16 = aclEntry.fieldEtherTypeMask; break; - case SAI_ACL_TABLE_ATTR_FIELD_OUTER_VLAN_ID: + case SAI_ACL_ENTRY_ATTR_FIELD_OUTER_VLAN_ID: attr_list[i].value.aclfield.enable = aclEntry.fieldOuterVlanIdEnable; attr_list[i].value.aclfield.data.u16 = aclEntry.fieldOuterVlanIdData; attr_list[i].value.aclfield.mask.u16 = aclEntry.fieldOuterVlanIdMask; break; - case SAI_ACL_TABLE_ATTR_FIELD_BTH_OPCODE: + case SAI_ACL_ENTRY_ATTR_FIELD_BTH_OPCODE: attr_list[i].value.aclfield.enable = aclEntry.fieldBthOpcodeEnable; attr_list[i].value.aclfield.data.u8 = aclEntry.fieldBthOpcodeData; attr_list[i].value.aclfield.mask.u8 = aclEntry.fieldBthOpcodeMask; break; - case SAI_ACL_TABLE_ATTR_FIELD_IPV6_NEXT_HEADER: + case SAI_ACL_ENTRY_ATTR_FIELD_IPV6_NEXT_HEADER: attr_list[i].value.aclfield.enable = aclEntry.fieldIpv6NextHeaderEnable; attr_list[i].value.aclfield.data.u8 = aclEntry.fieldIpv6NextHeaderData; attr_list[i].value.aclfield.mask.u8 = aclEntry.fieldIpv6NextHeaderMask; break; + case SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN: + attr_list[i].value.aclfield.enable = + aclEntry.userDefinedFieldGroupMinEnable; + attr_list[i].value.aclfield.data.u8list.count = + aclEntry.userDefinedFieldGroupMinData.size(); + attr_list[i].value.aclfield.mask.u8list.count = + aclEntry.userDefinedFieldGroupMinMask.size(); + attr_list[i].value.aclfield.data.u8list.list = + aclEntry.userDefinedFieldGroupMinData.data(); + attr_list[i].value.aclfield.mask.u8list.list = + aclEntry.userDefinedFieldGroupMinMask.data(); + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 1): + attr_list[i].value.aclfield.enable = + aclEntry.userDefinedFieldGroupMin1Enable; + attr_list[i].value.aclfield.data.u8list.count = + aclEntry.userDefinedFieldGroupMin1Data.size(); + attr_list[i].value.aclfield.mask.u8list.count = + aclEntry.userDefinedFieldGroupMin1Mask.size(); + attr_list[i].value.aclfield.data.u8list.list = + aclEntry.userDefinedFieldGroupMin1Data.data(); + attr_list[i].value.aclfield.mask.u8list.list = + aclEntry.userDefinedFieldGroupMin1Mask.data(); + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 2): + attr_list[i].value.aclfield.enable = + aclEntry.userDefinedFieldGroupMin2Enable; + attr_list[i].value.aclfield.data.u8list.count = + aclEntry.userDefinedFieldGroupMin2Data.size(); + attr_list[i].value.aclfield.mask.u8list.count = + aclEntry.userDefinedFieldGroupMin2Mask.size(); + attr_list[i].value.aclfield.data.u8list.list = + aclEntry.userDefinedFieldGroupMin2Data.data(); + attr_list[i].value.aclfield.mask.u8list.list = + aclEntry.userDefinedFieldGroupMin2Mask.data(); + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 3): + attr_list[i].value.aclfield.enable = + aclEntry.userDefinedFieldGroupMin3Enable; + attr_list[i].value.aclfield.data.u8list.count = + aclEntry.userDefinedFieldGroupMin3Data.size(); + attr_list[i].value.aclfield.mask.u8list.count = + aclEntry.userDefinedFieldGroupMin3Mask.size(); + attr_list[i].value.aclfield.data.u8list.list = + aclEntry.userDefinedFieldGroupMin3Data.data(); + attr_list[i].value.aclfield.mask.u8list.list = + aclEntry.userDefinedFieldGroupMin3Mask.data(); + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 4): + attr_list[i].value.aclfield.enable = + aclEntry.userDefinedFieldGroupMin4Enable; + attr_list[i].value.aclfield.data.u8list.count = + aclEntry.userDefinedFieldGroupMin4Data.size(); + attr_list[i].value.aclfield.mask.u8list.count = + aclEntry.userDefinedFieldGroupMin4Mask.size(); + attr_list[i].value.aclfield.data.u8list.list = + aclEntry.userDefinedFieldGroupMin4Data.data(); + attr_list[i].value.aclfield.mask.u8list.list = + aclEntry.userDefinedFieldGroupMin4Mask.data(); + break; case SAI_ACL_ENTRY_ATTR_ACTION_PACKET_ACTION: attr_list[i].value.aclaction.enable = aclEntry.actionPacketActionEnable; diff --git a/fboss/agent/hw/sai/fake/FakeSaiAcl.h b/fboss/agent/hw/sai/fake/FakeSaiAcl.h index 84b0133a3d3be..ebad13622e554 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiAcl.h +++ b/fboss/agent/hw/sai/fake/FakeSaiAcl.h @@ -183,6 +183,26 @@ class FakeAclEntry { sai_uint8_t fieldIpv6NextHeaderData; sai_uint8_t fieldIpv6NextHeaderMask; + bool userDefinedFieldGroupMinEnable{false}; + std::vector userDefinedFieldGroupMinData; + std::vector userDefinedFieldGroupMinMask; + + bool userDefinedFieldGroupMin1Enable{false}; + std::vector userDefinedFieldGroupMin1Data; + std::vector userDefinedFieldGroupMin1Mask; + + bool userDefinedFieldGroupMin2Enable{false}; + std::vector userDefinedFieldGroupMin2Data; + std::vector userDefinedFieldGroupMin2Mask; + + bool userDefinedFieldGroupMin3Enable{false}; + std::vector userDefinedFieldGroupMin3Data; + std::vector userDefinedFieldGroupMin3Mask; + + bool userDefinedFieldGroupMin4Enable{false}; + std::vector userDefinedFieldGroupMin4Data; + std::vector userDefinedFieldGroupMin4Mask; + bool actionPacketActionEnable{false}; sai_uint32_t actionPacketActionData; @@ -243,7 +263,12 @@ class FakeAclTable { bool fieldEthertype, bool fieldOuterVlanId, bool fieldBthOpcode, - bool fieldIpv6NextHeader) + bool fieldIpv6NextHeader, + sai_object_id_t userDefinedFieldGroupMin, + sai_object_id_t userDefinedFieldGroupMin1, + sai_object_id_t userDefinedFieldGroupMin2, + sai_object_id_t userDefinedFieldGroupMin3, + sai_object_id_t userDefinedFieldGroupMin4) : stage(stage), bindPointTypeList(bindPointTypeList), actionTypeList(actionTypeList), @@ -272,7 +297,12 @@ class FakeAclTable { fieldEthertype(fieldEthertype), fieldOuterVlanId(fieldOuterVlanId), fieldBthOpcode(fieldBthOpcode), - fieldIpv6NextHeader(fieldIpv6NextHeader) {} + fieldIpv6NextHeader(fieldIpv6NextHeader), + userDefinedFieldGroupMin(userDefinedFieldGroupMin), + userDefinedFieldGroupMin1(userDefinedFieldGroupMin1), + userDefinedFieldGroupMin2(userDefinedFieldGroupMin2), + userDefinedFieldGroupMin3(userDefinedFieldGroupMin3), + userDefinedFieldGroupMin4(userDefinedFieldGroupMin4) {} bool entryFieldSupported(const sai_attribute_t& attr) const; static sai_acl_api_t* kApi(); @@ -308,6 +338,11 @@ class FakeAclTable { bool fieldOuterVlanId; bool fieldBthOpcode; bool fieldIpv6NextHeader; + sai_object_id_t userDefinedFieldGroupMin; + sai_object_id_t userDefinedFieldGroupMin1; + sai_object_id_t userDefinedFieldGroupMin2; + sai_object_id_t userDefinedFieldGroupMin3; + sai_object_id_t userDefinedFieldGroupMin4; }; class FakeAclCounter { From 4fadb744ee248962ed6b3c85b4ae5ccfc13b31c8 Mon Sep 17 00:00:00 2001 From: Ravi Vantipalli Date: Sat, 26 Oct 2024 11:50:50 -0700 Subject: [PATCH 371/479] Introduce AclEntryFieldU8List container to hold sai_u8_list_t data/mask Summary: same as summary This will hold sai_acl_field_data_t with u8list data and mask Reviewed By: zechengh09 Differential Revision: D64421030 fbshipit-source-id: 1f7fb7dcbc18c815a43f8accb6ab5ec278f13bad --- fboss/agent/hw/sai/api/SaiAttribute.h | 42 +++++++++++++++++++++++++++ fboss/agent/hw/sai/api/Traits.h | 30 +++++++++++++++++-- 2 files changed, 69 insertions(+), 3 deletions(-) diff --git a/fboss/agent/hw/sai/api/SaiAttribute.h b/fboss/agent/hw/sai/api/SaiAttribute.h index 1eb098362c894..eec66bab7d750 100644 --- a/fboss/agent/hw/sai/api/SaiAttribute.h +++ b/fboss/agent/hw/sai/api/SaiAttribute.h @@ -184,6 +184,7 @@ DEFINE_extract(facebook::fboss::AclEntryFieldU32, aclfield); DEFINE_extract(facebook::fboss::AclEntryFieldIpV6, aclfield); DEFINE_extract(facebook::fboss::AclEntryFieldIpV4, aclfield); DEFINE_extract(facebook::fboss::AclEntryFieldMac, aclfield); +DEFINE_extract(facebook::fboss::AclEntryFieldU8List, aclfield); DEFINE_extract(facebook::fboss::AclEntryFieldSaiObjectIdT, aclfield); DEFINE_extract(facebook::fboss::AclEntryActionBool, aclaction); DEFINE_extract(facebook::fboss::AclEntryActionU8, aclaction); @@ -399,6 +400,37 @@ inline void _fill( facebook::fboss::toSaiMacAddress(src.getDataAndMask().second, dst.mask.mac); } +inline void _fill( + const sai_acl_field_data_t& src, + facebook::fboss::AclEntryFieldU8List& dst) { + std::vector data(src.data.u8list.count); + std::vector mask(src.mask.u8list.count); + data.resize(src.data.u8list.count); + mask.resize(src.mask.u8list.count); + std::copy( + src.data.u8list.list, + src.data.u8list.list + src.data.u8list.count, + std::begin(data)); + std::copy( + src.mask.u8list.list, + src.mask.u8list.list + src.mask.u8list.count, + std::begin(mask)); + dst.setDataAndMask(std::make_pair(std::move(data), std::move(mask))); +} + +inline void _fill( + const facebook::fboss::AclEntryFieldU8List& src, + sai_acl_field_data_t& dst) { + dst.enable = true; + const auto& dataAndMask = src.getDataAndMask(); + dst.data.u8list.count = dataAndMask.first.size(); + dst.mask.u8list.count = dataAndMask.second.size(); + dst.data.u8list.list = const_cast( + reinterpret_cast(dataAndMask.first.data())); + dst.mask.u8list.list = const_cast( + reinterpret_cast(dataAndMask.second.data())); +} + inline void _fill( const sai_acl_field_data_t& src, facebook::fboss::AclEntryFieldSaiObjectIdT& dst) { @@ -513,6 +545,16 @@ inline void _realloc( dst.setData(dstData); } +inline void _realloc( + const sai_acl_field_data_t& src, + facebook::fboss::AclEntryFieldU8List& dst) { + std::vector dstData(src.data.u8list.count); + std::vector dstMask(src.mask.u8list.count); + dstData.resize(src.data.u8list.count); + dstMask.resize(src.mask.u8list.count); + dst.setDataAndMask(std::make_pair(std::move(dstData), std::move(dstMask))); +} + template void _realloc(const SaiListT& src, std::vector& dst) { static_assert( diff --git a/fboss/agent/hw/sai/api/Traits.h b/fboss/agent/hw/sai/api/Traits.h index 5f15befc7eb72..ff5dfea9ef260 100644 --- a/fboss/agent/hw/sai/api/Traits.h +++ b/fboss/agent/hw/sai/api/Traits.h @@ -174,7 +174,7 @@ class AclEntryField { public: AclEntryField(){}; AclEntryField(T dataAndMask) : dataAndMask_(dataAndMask) {} - T getDataAndMask() const { + const T& getDataAndMask() const { return dataAndMask_; } @@ -183,8 +183,30 @@ class AclEntryField { } std::string str() const { - return folly::to( - "data: ", dataAndMask_.first, " mask: ", dataAndMask_.second); + if constexpr ( + std::is_same_v< + T, + std::pair, std::vector>>) { + std::ostringstream retStr; + + if (!dataAndMask_.first.empty()) { + retStr << "data: "; + std::copy( + dataAndMask_.first.begin(), + dataAndMask_.first.end(), + std::ostream_iterator(retStr, ", ")); + retStr << "mask: "; + std::copy( + dataAndMask_.second.begin(), + dataAndMask_.second.end(), + std::ostream_iterator(retStr, ", ")); + } + + return retStr.str(); + } else { + return folly::to( + "data: ", dataAndMask_.first, " mask: ", dataAndMask_.second); + } } private: @@ -232,6 +254,8 @@ using AclEntryFieldIpV4 = AclEntryField>; using AclEntryFieldMac = AclEntryField>; +using AclEntryFieldU8List = AclEntryField< + std::pair, std::vector>>; /* * Mask is not needed for sai_object_id_t Acl Entry field. From 890c99ac20b08f1b2722dda09f5cbcc998236b8e Mon Sep 17 00:00:00 2001 From: Prasoon Patel Date: Sat, 26 Oct 2024 16:27:41 -0700 Subject: [PATCH 372/479] enabling hw protection for mac table Summary: This diff enabled table full/hw failure protection for SAI switch for MAC table. If a neighboring device is corrupting packets, the fboss switch can learn spurious mac entries and end up with agent crash due to table full error. Enable hardware update overflow protection for MAC entries in sai switch. Reviewed By: msomasundaran Differential Revision: D63037713 fbshipit-source-id: e3b8b9d6e05529288787b3e40f0f308eb0a93126 --- fboss/agent/MacTableManager.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fboss/agent/MacTableManager.cpp b/fboss/agent/MacTableManager.cpp index 68773a7d148d3..4caaac4435f5a 100644 --- a/fboss/agent/MacTableManager.cpp +++ b/fboss/agent/MacTableManager.cpp @@ -34,9 +34,15 @@ void MacTableManager::handleL2LearningUpdate( return MacTableUtils::updateMacTable(state, l2Entry, l2EntryUpdateType); }; - sw_->updateStateNoCoalescing( - folly::to("Programming : ", l2Entry.str()), - std::move(updateMacTableFn)); + if (isHwUpdateProtected()) { + sw_->updateStateWithHwFailureProtection( + folly::to("Programming : ", l2Entry.str()), + std::move(updateMacTableFn)); + } else { + sw_->updateStateNoCoalescing( + folly::to("Programming : ", l2Entry.str()), + std::move(updateMacTableFn)); + } } } // namespace facebook::fboss From 3b4ee10137aacd33c1250f427272202427f5d4ce Mon Sep 17 00:00:00 2001 From: Prasoon Patel Date: Sat, 26 Oct 2024 16:27:41 -0700 Subject: [PATCH 373/479] Adding fb303 counter for MAC table state update failure Summary: This diff adds a fb303 counter for MAC table state update failure in the MacTableManager.cpp file. The code changes include adding a try-catch block to catch any exceptions that may occur during the update process and incrementing the macTableUpdateFailure counter in the SwitchStats.h file. Reviewed By: msomasundaran Differential Revision: D63352095 fbshipit-source-id: 5edad3cab3aa6f704fb500ab32b17adf50a967f1 --- fboss/agent/MacTableManager.cpp | 12 +++++++++--- fboss/agent/SwitchStats.cpp | 7 ++++++- fboss/agent/SwitchStats.h | 10 ++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/fboss/agent/MacTableManager.cpp b/fboss/agent/MacTableManager.cpp index 4caaac4435f5a..d648659e30a4b 100644 --- a/fboss/agent/MacTableManager.cpp +++ b/fboss/agent/MacTableManager.cpp @@ -9,6 +9,7 @@ */ #include "fboss/agent/MacTableManager.h" +#include "fboss/agent/FbossHwUpdateError.h" #include "fboss/agent/L2Entry.h" #include "fboss/agent/MacTableUtils.h" #include "fboss/agent/SwSwitch.h" @@ -35,9 +36,14 @@ void MacTableManager::handleL2LearningUpdate( }; if (isHwUpdateProtected()) { - sw_->updateStateWithHwFailureProtection( - folly::to("Programming : ", l2Entry.str()), - std::move(updateMacTableFn)); + try { + sw_->updateStateWithHwFailureProtection( + folly::to("Programming : ", l2Entry.str()), + std::move(updateMacTableFn)); + } catch (const FbossHwUpdateError& e) { + XLOG(ERR) << "Exception: " << e.what() << std::endl; + sw_->stats()->macTableUpdateFailure(); + } } else { sw_->updateStateNoCoalescing( folly::to("Programming : ", l2Entry.str()), diff --git a/fboss/agent/SwitchStats.cpp b/fboss/agent/SwitchStats.cpp index fce7ccbf6384b..dc9d00f4f35c8 100644 --- a/fboss/agent/SwitchStats.cpp +++ b/fboss/agent/SwitchStats.cpp @@ -353,7 +353,12 @@ SwitchStats::SwitchStats(ThreadLocalStatsMap* map, int numSwitches) SUM, RATE), loPriPktsDropped_(map, kCounterPrefix + "lo_pri_pkts_dropped", SUM, RATE), - multiSwitchStatus_(map, kCounterPrefix + "multi_switch", SUM, RATE) + multiSwitchStatus_(map, kCounterPrefix + "multi_switch", SUM, RATE), + macTableUpdateFailure_( + map, + kCounterPrefix + "mac_table_update_failure", + SUM, + RATE) { for (auto switchIndex = 0; switchIndex < numSwitches; switchIndex++) { diff --git a/fboss/agent/SwitchStats.h b/fboss/agent/SwitchStats.h index bf95bf50b6a86..5b1f1b6d6a1d2 100644 --- a/fboss/agent/SwitchStats.h +++ b/fboss/agent/SwitchStats.h @@ -452,6 +452,14 @@ class SwitchStats : public boost::noncopyable { multiSwitchStatus_.addValue(enabled ? 1 : 0); } + void macTableUpdateFailure() { + macTableUpdateFailure_.addValue(1); + } + + int getMacTableUpdateFailure() const { + return getCumulativeValue(macTableUpdateFailure_); + } + void hiPriPktsReceived() { hiPriPktsReceived_.addValue(1); } @@ -1024,6 +1032,8 @@ class SwitchStats : public boost::noncopyable { // TODO: delete this once multi_switch becomes default TLTimeseries multiSwitchStatus_; + TLTimeseries macTableUpdateFailure_; + std::vector hwAgentConnectionStatus_; std::vector hwAgentUpdateTimeouts_; std::vector thriftStreamConnectionStatus_; From 704365d21b05a95ab14eeb7fa8db01f6b71ad35f Mon Sep 17 00:00:00 2001 From: Prasoon Patel Date: Sat, 26 Oct 2024 16:27:41 -0700 Subject: [PATCH 374/479] added gflag to resourceAccountant to define max l2/mac entries Summary: Adding gflag to define max l2/mac entries supported in ResourceAccountant. Which is set to 1000 Reviewed By: msomasundaran Differential Revision: D64391115 fbshipit-source-id: 8cd3c1ba68c826ab620d52c8655cc6b599da9531 --- fboss/agent/ResourceAccountant.h | 2 ++ fboss/agent/SwSwitch.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/fboss/agent/ResourceAccountant.h b/fboss/agent/ResourceAccountant.h index 38d93b3d488c9..e75b0cb7c6c7b 100644 --- a/fboss/agent/ResourceAccountant.h +++ b/fboss/agent/ResourceAccountant.h @@ -16,6 +16,8 @@ #include +DECLARE_int32(max_l2_entries); + namespace facebook::fboss { class ResourceAccountant { diff --git a/fboss/agent/SwSwitch.cpp b/fboss/agent/SwSwitch.cpp index fe6acff9776a6..36c53ef2a6361 100644 --- a/fboss/agent/SwSwitch.cpp +++ b/fboss/agent/SwSwitch.cpp @@ -184,6 +184,8 @@ DEFINE_bool(rx_sw_priority, false, "Enable rx packet prioritization"); DEFINE_int32(rx_pkt_thread_timeout, 100, "Rx packet thread timeout (ms)"); +DEFINE_int32(max_l2_entries, 1000, "Maximum L2 entries supported"); + using namespace facebook::fboss; namespace { From 96f92e3277f3ffa578454bc61e96b0fbb3835d8d Mon Sep 17 00:00:00 2001 From: Prasoon Patel Date: Sat, 26 Oct 2024 16:27:41 -0700 Subject: [PATCH 375/479] Added test case for mac table update Summary: This diff adds sai agent test cases for software MAC learning. 1. test case for MAC learning by sending packets 2. test case by calling swSwitch api l2LearningUpdateReceived() directly In this diff, I am adding basic hw agent test case for adding static mac entry. I have modified this test case as overflow test in next diff. Reviewed By: msomasundaran Differential Revision: D63352093 fbshipit-source-id: 0cd66b0f3a4b192b2270651f2339ae0c1505db45 --- .../agent_hw_tests/AgentMacLearningTests.cpp | 58 ++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp b/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp index eaeec4f65d88e..868ad4efb7920 100644 --- a/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp @@ -8,6 +8,7 @@ * */ +#include "fboss/agent/FbossHwUpdateError.h" #include "fboss/agent/MacTableUtils.h" #include "fboss/agent/TxPacket.h" #include "fboss/agent/gen-cpp2/switch_config_types.h" @@ -39,7 +40,11 @@ using folly::IPAddress; using folly::IPAddressV4; using folly::IPAddressV6; +DECLARE_int32(max_l2_entries); + namespace { +class L2Entry; + // Even when running the same test repeatedly could result in different // learning counts based on hash insertion order. // Maximum theortical is 8k for TH ..but practically we hit numbers below it @@ -67,6 +72,7 @@ getMacsForPort(facebook::fboss::SwSwitch* sw, int port, bool isTrunk) { namespace facebook::fboss { +using std::string; using utility::addAggPort; using utility::enableTrunkPorts; @@ -1060,7 +1066,7 @@ class AgentMacLearningBatchEntriesTest : public AgentMacLearningTest { kAsicToMacChunkSizeAndSleepUsecs = { {cfg::AsicType::ASIC_TYPE_TOMAHAWK3, {16, 500000}}, {cfg::AsicType::ASIC_TYPE_TOMAHAWK4, {32, 10000}}, - }; + {cfg::AsicType::ASIC_TYPE_TOMAHAWK, {16, 10000}}}; auto switchId = getSw() ->getScopeResolver() ->scope(masterLogicalPortIds()[0]) @@ -1181,6 +1187,56 @@ class AgentMacLearningBatchEntriesTest : public AgentMacLearningTest { } }; +class AgentMacOverFlowTest : public AgentMacLearningBatchEntriesTest { + public: + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { + auto cfg = AgentMacLearningTest::initialConfig(ensemble); + cfg.switchSettings()->l2LearningMode() = cfg::L2LearningMode::SOFTWARE; + // set mac l2 entry limit to 10000 to bypass resourceAccountant check + FLAGS_max_l2_entries = 10000; + return cfg; + } + + protected: + void VerifyMacOverFlow(const std::vector& macs) { + WITH_RETRIES_N_TIMED(30, std::chrono::seconds(4), { + const auto& learntMacs = + getMacsForPort(getSw(), masterLogicalPortIds()[0], false); + XLOG(DBG2) << "learntMacs.size() = " << learntMacs.size() + << ", macs.size() = " << macs.size(); + EXPECT_EVENTUALLY_TRUE(learntMacs.size() >= macs.size()); + }); + } +}; + +TEST_F(AgentMacOverFlowTest, VerifyMacUpdateOverFlow) { + std::vector macs = generateMacs(1000); + auto portDescr = physPortDescr(); + VlanID vlanId = + (VlanID)*initialConfig(*getAgentEnsemble()).vlanPorts()[0].vlanID(); + auto setup = [this, portDescr, vlanId, &macs]() { + setupHelper(cfg::L2LearningMode::SOFTWARE, portDescr); + // Disable aging, so entry stays in L2 table when we verify. + utility::setMacAgeTimerSeconds(getAgentEnsemble(), 0); + int i = 0; + for (auto& mac : macs) { + i++; + XLOG(DBG2) << "Adding " << i << " : mac " << mac.toString(); + auto l2Entry = L2Entry( + mac, + vlanId, + portDescr, + L2Entry::L2EntryType::L2_ENTRY_TYPE_VALIDATED); + getSw()->l2LearningUpdateReceived( + std::move(l2Entry), L2EntryUpdateType::L2_ENTRY_UPDATE_TYPE_ADD); + } + }; + auto verify = [this, &macs]() { VerifyMacOverFlow(macs); }; + // MACs learned should be preserved across warm boot + verifyAcrossWarmBoots(setup, verify); +} + // Intent of this test is to attempt to learn large number of macs // (L2_LEARN_MAX_MAC_COUNT) and ensure HW can learn them. TEST_F(AgentMacLearningBatchEntriesTest, VerifyMacLearningScale) { From 2c15525a60d1b8297d1a064730b24df4fbdcbe63 Mon Sep 17 00:00:00 2001 From: Prasoon Patel Date: Sat, 26 Oct 2024 16:27:41 -0700 Subject: [PATCH 376/479] scale test case for mac table failure protection Summary: Adding mac table failure protection test case for scale Reviewed By: msomasundaran Differential Revision: D64391107 fbshipit-source-id: 4a01ee1e3ce4b13c6a4235d0d99c5561123ecf40 --- .../agent_hw_tests/AgentMacLearningTests.cpp | 115 +++++++++++++++--- 1 file changed, 95 insertions(+), 20 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp b/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp index 868ad4efb7920..2d8159c3e19a4 100644 --- a/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp @@ -9,7 +9,9 @@ */ #include "fboss/agent/FbossHwUpdateError.h" +#include "fboss/agent/MacTableManager.h" #include "fboss/agent/MacTableUtils.h" +#include "fboss/agent/ResourceAccountant.h" #include "fboss/agent/TxPacket.h" #include "fboss/agent/gen-cpp2/switch_config_types.h" #include "fboss/agent/hw/switch_asics/HwAsic.h" @@ -40,10 +42,23 @@ using folly::IPAddress; using folly::IPAddressV4; using folly::IPAddressV6; +// mac l2 entry limit is used to bypass resourceAccountant check DECLARE_int32(max_l2_entries); namespace { +// this is for mac overflow test for TH3/TH4 +// setting max L2 entries to 8194 for TH3/TH4 +// Maximum theortical MAC/L2 scale is 8k for TH3/TH4. +// MAC overflow test case is not supported in TH and Cisco gibralta, +// as Cisco gibraltar(300K) and TH supports higher scale and exhausting +// them will lead to large test time +constexpr auto kL2MaxMacCount = 8194; +// update switchState mac table with 7800 static entry, this should +// return success. here sdk should be able to program 7800 MACs +// without getting TABLE FULL error +constexpr auto kBulkProgrammedMacCount = 7800; class L2Entry; +class MacTableManager; // Even when running the same test repeatedly could result in different // learning counts based on hash insertion order. @@ -1193,46 +1208,106 @@ class AgentMacOverFlowTest : public AgentMacLearningBatchEntriesTest { const AgentEnsemble& ensemble) const override { auto cfg = AgentMacLearningTest::initialConfig(ensemble); cfg.switchSettings()->l2LearningMode() = cfg::L2LearningMode::SOFTWARE; + // set mac l2 entry limit to 10000 to bypass resourceAccountant check FLAGS_max_l2_entries = 10000; return cfg; } + // adds L2 entries to mac table + void addMacsBulk( + const std::vector& l2Entries, + L2EntryUpdateType l2EntryUpdateType) { + auto updateMacTableFn = [l2Entries, l2EntryUpdateType, this]( + const std::shared_ptr& state) { + return updateMacTableBulk(state, l2Entries, l2EntryUpdateType); + }; + getSw()->updateStateWithHwFailureProtection( + ("test MAC Programming : "), std::move(updateMacTableFn)); + } + protected: - void VerifyMacOverFlow(const std::vector& macs) { - WITH_RETRIES_N_TIMED(30, std::chrono::seconds(4), { + void VerifyMacOverFlow(const std::vector& l2Entries) { + WITH_RETRIES({ const auto& learntMacs = getMacsForPort(getSw(), masterLogicalPortIds()[0], false); - XLOG(DBG2) << "learntMacs.size() = " << learntMacs.size() - << ", macs.size() = " << macs.size(); - EXPECT_EVENTUALLY_TRUE(learntMacs.size() >= macs.size()); + // check total macs programmed + EXPECT_EVENTUALLY_GE(learntMacs.size(), kBulkProgrammedMacCount); + EXPECT_EQ(getSw()->stats()->getMacTableUpdateFailure(), 0); }); + + for (int i = kBulkProgrammedMacCount; i < l2Entries.size(); i++) { + XLOG(DBG2) << "Adding i " << i << "MAC " << l2Entries[i].str(); + getSw()->l2LearningUpdateReceived( + l2Entries[i], L2EntryUpdateType::L2_ENTRY_UPDATE_TYPE_ADD); + // as soon as we get hw failure, terminate the test and verify + // rollback + if (getSw()->stats()->getMacTableUpdateFailure()) { + XLOG(DBG2) << "MacTableUpdateFailure = " + << getSw()->stats()->getMacTableUpdateFailure(); + break; + } + } + + const auto& learntMacs = + getMacsForPort(getSw(), masterLogicalPortIds()[0], false); + XLOG(DBG2) << "learntMacs.size() = " << learntMacs.size() + << ", macTableUpdateFailure = " + << getSw()->stats()->getMacTableUpdateFailure() + << ", l2Entries.size() = " << l2Entries.size(); + + EXPECT_GE(learntMacs.size(), kBulkProgrammedMacCount); + EXPECT_GT(getSw()->stats()->getMacTableUpdateFailure(), 0); + } + + // generate L2Entries with macs + std::vector generateL2Entries( + const std::vector& macs) { + std::vector l2Entries; + const auto portDescr = physPortDescr(); + VlanID vlanId = + (VlanID)*initialConfig(*getAgentEnsemble()).vlanPorts()[0].vlanID(); + + for (auto& mac : macs) { + l2Entries.push_back(L2Entry( + mac, + vlanId, + portDescr, + L2Entry::L2EntryType::L2_ENTRY_TYPE_VALIDATED)); + } + return l2Entries; + } + + // update mac table entries in switchState + std::shared_ptr updateMacTableBulk( + const std::shared_ptr& state, + const std::vector& l2Entries, + L2EntryUpdateType l2EntryUpdateType) { + std::shared_ptr newState{state}; + + for (int i = 0; i < kBulkProgrammedMacCount; i++) { + newState = MacTableUtils::updateMacTable( + newState, l2Entries[i], l2EntryUpdateType); + } + return newState; } }; TEST_F(AgentMacOverFlowTest, VerifyMacUpdateOverFlow) { - std::vector macs = generateMacs(1000); + std::vector macs = generateMacs(kL2MaxMacCount); auto portDescr = physPortDescr(); + auto l2Entries = generateL2Entries(macs); VlanID vlanId = (VlanID)*initialConfig(*getAgentEnsemble()).vlanPorts()[0].vlanID(); - auto setup = [this, portDescr, vlanId, &macs]() { + auto setup = [this, portDescr, vlanId, &l2Entries]() { setupHelper(cfg::L2LearningMode::SOFTWARE, portDescr); // Disable aging, so entry stays in L2 table when we verify. utility::setMacAgeTimerSeconds(getAgentEnsemble(), 0); - int i = 0; - for (auto& mac : macs) { - i++; - XLOG(DBG2) << "Adding " << i << " : mac " << mac.toString(); - auto l2Entry = L2Entry( - mac, - vlanId, - portDescr, - L2Entry::L2EntryType::L2_ENTRY_TYPE_VALIDATED); - getSw()->l2LearningUpdateReceived( - std::move(l2Entry), L2EntryUpdateType::L2_ENTRY_UPDATE_TYPE_ADD); - } + addMacsBulk(l2Entries, L2EntryUpdateType::L2_ENTRY_UPDATE_TYPE_ADD); + EXPECT_EQ(getSw()->stats()->getMacTableUpdateFailure(), 0); }; - auto verify = [this, &macs]() { VerifyMacOverFlow(macs); }; + + auto verify = [this, &l2Entries]() { VerifyMacOverFlow(l2Entries); }; // MACs learned should be preserved across warm boot verifyAcrossWarmBoots(setup, verify); } From 8ab92fd03aa9ca272b4b8d5f73ea689d6183915d Mon Sep 17 00:00:00 2001 From: Prasoon Patel Date: Sat, 26 Oct 2024 16:27:41 -0700 Subject: [PATCH 377/479] adding flag to disable/enable MAC table failure protection Summary: This diff adds a gflag to disable/enable MAC table failure protection. Reviewed By: msomasundaran Differential Revision: D63588672 fbshipit-source-id: 9b89e7e424d6939c789d9160dcac2009afe7e2b7 --- fboss/agent/MacTableManager.cpp | 5 +++-- fboss/agent/MacTableManager.h | 2 ++ fboss/agent/SwSwitch.cpp | 5 +++++ fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/fboss/agent/MacTableManager.cpp b/fboss/agent/MacTableManager.cpp index d648659e30a4b..bb2a968f8a50b 100644 --- a/fboss/agent/MacTableManager.cpp +++ b/fboss/agent/MacTableManager.cpp @@ -35,10 +35,11 @@ void MacTableManager::handleL2LearningUpdate( return MacTableUtils::updateMacTable(state, l2Entry, l2EntryUpdateType); }; - if (isHwUpdateProtected()) { + if (FLAGS_enable_mac_update_protection && isHwUpdateProtected()) { try { sw_->updateStateWithHwFailureProtection( - folly::to("Programming : ", l2Entry.str()), + folly::to( + "Programming with hw failure protection : ", l2Entry.str()), std::move(updateMacTableFn)); } catch (const FbossHwUpdateError& e) { XLOG(ERR) << "Exception: " << e.what() << std::endl; diff --git a/fboss/agent/MacTableManager.h b/fboss/agent/MacTableManager.h index 215c5c1d48457..b7057fb2c2cfe 100644 --- a/fboss/agent/MacTableManager.h +++ b/fboss/agent/MacTableManager.h @@ -11,6 +11,8 @@ #include "fboss/agent/L2Entry.h" +DECLARE_bool(enable_mac_update_protection); + namespace facebook::fboss { class SwSwitch; diff --git a/fboss/agent/SwSwitch.cpp b/fboss/agent/SwSwitch.cpp index 36c53ef2a6361..7abd843e59ce5 100644 --- a/fboss/agent/SwSwitch.cpp +++ b/fboss/agent/SwSwitch.cpp @@ -186,6 +186,11 @@ DEFINE_int32(rx_pkt_thread_timeout, 100, "Rx packet thread timeout (ms)"); DEFINE_int32(max_l2_entries, 1000, "Maximum L2 entries supported"); +DEFINE_bool( + enable_mac_update_protection, + false, + "Enable MAC table update protection"); + using namespace facebook::fboss; namespace { diff --git a/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp b/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp index 2d8159c3e19a4..b441f91345edc 100644 --- a/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp @@ -1211,6 +1211,8 @@ class AgentMacOverFlowTest : public AgentMacLearningBatchEntriesTest { // set mac l2 entry limit to 10000 to bypass resourceAccountant check FLAGS_max_l2_entries = 10000; + // to enable mac update protection + FLAGS_enable_mac_update_protection = true; return cfg; } From de9fe47c294cb54bac3c358f8ac30b48fe79c2c6 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 27 Oct 2024 00:06:52 -0700 Subject: [PATCH 378/479] Add support for static thresholds in buffer profile for queues Summary: Static threshold is needed on YUBA on egress lossless queues to avoid drops due to queue limit / alpha. Reviewed By: vasantspatil, shri-khare Differential Revision: D64731369 fbshipit-source-id: 32a27404b4736ed7ab28dfe54aa079f51e6f1cea --- fboss/agent/hw/sai/api/BufferApi.h | 10 ++++++++++ fboss/agent/hw/sai/api/tests/BufferApiTest.cpp | 3 +++ fboss/agent/hw/sai/fake/FakeSaiBuffer.cpp | 13 ++++++++++++- fboss/agent/hw/sai/fake/FakeSaiBuffer.h | 3 +++ fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp | 3 +++ fboss/agent/hw/sai/switch/SaiBufferManager.cpp | 12 ++++++++++++ fboss/agent/hw/sai/tracer/BufferApiTracer.cpp | 1 + 7 files changed, 44 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/api/BufferApi.h b/fboss/agent/hw/sai/api/BufferApi.h index 57568a27f0a85..581d34af12368 100644 --- a/fboss/agent/hw/sai/api/BufferApi.h +++ b/fboss/agent/hw/sai/api/BufferApi.h @@ -93,6 +93,10 @@ struct SaiBufferProfileTraits { EnumType, SAI_BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH, sai_int8_t>; + using SharedStaticThreshold = SaiAttribute< + EnumType, + SAI_BUFFER_PROFILE_ATTR_SHARED_STATIC_TH, + sai_uint64_t>; using XoffTh = SaiAttribute; using XonTh = @@ -133,6 +137,11 @@ struct SaiBufferProfileTraits { std::optional, std::optional, std::optional, +#if not defined(BRCM_SAI_SDK_XGS_AND_DNX) + // TODO(nivinl): Get rid of the check once support is + // available in SAI 8.2/11.3 - CS00012374846. + std::optional, +#endif std::optional, std::optional, std::optional, @@ -148,6 +157,7 @@ SAI_ATTRIBUTE_NAME(BufferProfile, PoolId); SAI_ATTRIBUTE_NAME(BufferProfile, ReservedBytes); SAI_ATTRIBUTE_NAME(BufferProfile, ThresholdMode); SAI_ATTRIBUTE_NAME(BufferProfile, SharedDynamicThreshold); +SAI_ATTRIBUTE_NAME(BufferProfile, SharedStaticThreshold); SAI_ATTRIBUTE_NAME(BufferProfile, XoffTh); SAI_ATTRIBUTE_NAME(BufferProfile, XonTh); SAI_ATTRIBUTE_NAME(BufferProfile, XonOffsetTh); diff --git a/fboss/agent/hw/sai/api/tests/BufferApiTest.cpp b/fboss/agent/hw/sai/api/tests/BufferApiTest.cpp index c258b7a38a4ea..2d096c26e66c9 100644 --- a/fboss/agent/hw/sai/api/tests/BufferApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/BufferApiTest.cpp @@ -54,6 +54,8 @@ class BufferApiTest : public ::testing::Test { SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC}; SaiBufferProfileTraits::Attributes::SharedDynamicThreshold dynamicThresh{ 24}; + std::optional + staticThresh; SaiBufferProfileTraits::Attributes::XoffTh xoffTh{0}; SaiBufferProfileTraits::Attributes::XonTh xonTh{0}; SaiBufferProfileTraits::Attributes::XonOffsetTh xonOffsetTh{0}; @@ -66,6 +68,7 @@ class BufferApiTest : public ::testing::Test { reservedBytes, mode, dynamicThresh, + staticThresh, xoffTh, xonTh, xonOffsetTh, diff --git a/fboss/agent/hw/sai/fake/FakeSaiBuffer.cpp b/fboss/agent/hw/sai/fake/FakeSaiBuffer.cpp index 5bde6d73d566e..fc5b42687b95b 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiBuffer.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiBuffer.cpp @@ -139,7 +139,7 @@ sai_status_t create_buffer_profile_fn( std::optional reservedBytes; std::optional threshMode; std::optional dynamicThreshold; - std::optional staticThreshold; + std::optional staticThreshold; std::optional xoffTh; std::optional xonTh; std::optional xonOffsetTh; @@ -158,6 +158,9 @@ sai_status_t create_buffer_profile_fn( case SAI_BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH: dynamicThreshold = attr_list[i].value.s8; break; + case SAI_BUFFER_PROFILE_ATTR_SHARED_STATIC_TH: + staticThreshold = attr_list[i].value.u64; + break; case SAI_BUFFER_PROFILE_ATTR_XOFF_TH: xoffTh = attr_list[i].value.u64; break; @@ -179,6 +182,7 @@ sai_status_t create_buffer_profile_fn( reservedBytes, threshMode, dynamicThreshold, + staticThreshold, xoffTh, xonTh, xonOffsetTh); @@ -201,6 +205,9 @@ sai_status_t set_buffer_profile_attribute_fn( case SAI_BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH: profile.dynamicThreshold = attr->value.s8; break; + case SAI_BUFFER_PROFILE_ATTR_SHARED_STATIC_TH: + profile.staticThreshold = attr->value.u64; + break; case SAI_BUFFER_PROFILE_ATTR_XOFF_TH: profile.xoffTh = attr->value.u64; break; @@ -244,6 +251,10 @@ sai_status_t get_buffer_profile_attribute_fn( attr[i].value.s8 = profile.dynamicThreshold ? profile.dynamicThreshold.value() : 0; break; + case SAI_BUFFER_PROFILE_ATTR_SHARED_STATIC_TH: + attr[i].value.u64 = + profile.staticThreshold ? profile.staticThreshold.value() : 0; + break; case SAI_BUFFER_PROFILE_ATTR_XOFF_TH: attr[i].value.u64 = profile.xoffTh ? profile.xoffTh.value() : 0; break; diff --git a/fboss/agent/hw/sai/fake/FakeSaiBuffer.h b/fboss/agent/hw/sai/fake/FakeSaiBuffer.h index ecb11e6e30b01..7df6a05e18754 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiBuffer.h +++ b/fboss/agent/hw/sai/fake/FakeSaiBuffer.h @@ -46,6 +46,7 @@ class FakeBufferProfile { std::optional reservedBytes, std::optional threshMode, std::optional dynamicThreshold, + std::optional staticThreshold, std::optional xoffTh, std::optional xonTh, std::optional xonOffsetTh) @@ -53,6 +54,7 @@ class FakeBufferProfile { reservedBytes(reservedBytes), threshMode(threshMode), dynamicThreshold(dynamicThreshold), + staticThreshold(staticThreshold), xoffTh(xoffTh), xonTh(xonTh), xonOffsetTh(xonOffsetTh) {} @@ -61,6 +63,7 @@ class FakeBufferProfile { std::optional reservedBytes; std::optional threshMode; std::optional dynamicThreshold; + std::optional staticThreshold; std::optional xoffTh; std::optional xonTh; std::optional xonOffsetTh; diff --git a/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp b/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp index 1ea3f99987ddf..e4af38f62e463 100644 --- a/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp @@ -46,6 +46,8 @@ class BufferStoreTest : public SaiStoreTest { SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC}; std::optional dynamicThresh{24}; + std::optional + staticThresh{0}; std::optional xoffTh{293624}; std::optional xonTh{0}; std::optional xonOffsetTh{ @@ -55,6 +57,7 @@ class BufferStoreTest : public SaiStoreTest { reservedBytes, mode, dynamicThresh, + staticThresh, xoffTh, xonTh, xonOffsetTh, diff --git a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp index c3adaf3b2474d..bd06ae8446f6d 100644 --- a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp @@ -511,6 +511,7 @@ SaiBufferProfileTraits::CreateAttributes SaiBufferManager::profileCreateAttrs( SaiBufferProfileTraits::Attributes::ThresholdMode mode{ SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC}; SaiBufferProfileTraits::Attributes::SharedDynamicThreshold dynThresh{0}; + SaiBufferProfileTraits::Attributes::SharedStaticThreshold staticThresh{0}; if (platform_->getAsic()->scalingFactorBasedDynamicThresholdSupported() && queue.getScalingFactor()) { dynThresh = platform_->getAsic()->getBufferDynThreshFromScalingFactor( @@ -547,6 +548,11 @@ SaiBufferProfileTraits::CreateAttributes SaiBufferManager::profileCreateAttrs( reservedBytes, mode, dynThresh, +#if not defined(BRCM_SAI_SDK_XGS_AND_DNX) + // TODO(nivinl): Get rid of the check once support is + // available in SAI 8.2/11.3 - CS00012374846. + staticThresh, +#endif 0, 0, 0, @@ -597,6 +603,7 @@ SaiBufferManager::ingressProfileCreateAttrs( SaiBufferProfileTraits::Attributes::ThresholdMode mode{ SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC}; SaiBufferProfileTraits::Attributes::SharedDynamicThreshold dynThresh{0}; + SaiBufferProfileTraits::Attributes::SharedStaticThreshold staticThresh{0}; if (config.scalingFactor() && platform_->getAsic()->scalingFactorBasedDynamicThresholdSupported()) { // If scalingFactor is specified, configure the same! @@ -637,6 +644,11 @@ SaiBufferManager::ingressProfileCreateAttrs( reservedBytes, mode, dynThresh, +#if not defined(BRCM_SAI_SDK_XGS_AND_DNX) + // TODO(nivinl): Get rid of the check once support is + // available in SAI 8.2/11.3 - CS00012374846. + staticThresh, +#endif xoffTh, xonTh, xonOffsetTh, diff --git a/fboss/agent/hw/sai/tracer/BufferApiTracer.cpp b/fboss/agent/hw/sai/tracer/BufferApiTracer.cpp index cd46faccfe0ba..9a9d1d9c75dfe 100644 --- a/fboss/agent/hw/sai/tracer/BufferApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/BufferApiTracer.cpp @@ -32,6 +32,7 @@ std::map> _BufferProfileMap{ SAI_ATTR_MAP(BufferProfile, ReservedBytes), SAI_ATTR_MAP(BufferProfile, ThresholdMode), SAI_ATTR_MAP(BufferProfile, SharedDynamicThreshold), + SAI_ATTR_MAP(BufferProfile, SharedStaticThreshold), SAI_ATTR_MAP(BufferProfile, XoffTh), SAI_ATTR_MAP(BufferProfile, XonTh), SAI_ATTR_MAP(BufferProfile, XonOffsetTh), From d000f1463462ac7a552e44c333f4413c88a72500 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 27 Oct 2024 00:36:56 -0700 Subject: [PATCH 379/479] Add/update buffer store tests to include buffer profile static thresholds Summary: As titled, adding test coverage for static thresholds in buffer profile. Reviewed By: vasantspatil, srikrishnagopu Differential Revision: D64731368 fbshipit-source-id: e1ab4924a39a52964fc84f4979bf3e0d67b511b6 --- .../hw/sai/store/tests/BufferStoreTest.cpp | 66 +++++++++++++++++-- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp b/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp index e4af38f62e463..815e57886f94d 100644 --- a/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp @@ -38,20 +38,27 @@ class BufferStoreTest : public SaiStoreTest { } SaiBufferProfileTraits::CreateAttributes createProfileAttrs( - BufferPoolSaiId _pool) const { + BufferPoolSaiId _pool, + bool dynamic = true) const { SaiBufferProfileTraits::Attributes::PoolId pool{_pool}; std::optional reservedBytes{42}; - std::optional mode{ - SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC}; + std::optional mode; std::optional - dynamicThresh{24}; + dynamicThresh{0}; std::optional staticThresh{0}; std::optional xoffTh{293624}; std::optional xonTh{0}; std::optional xonOffsetTh{ 4826}; + if (dynamic) { + dynamicThresh = 24; + mode = SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC; + } else { + staticThresh = 34; + mode = SAI_BUFFER_PROFILE_THRESHOLD_MODE_STATIC; + } return SaiBufferProfileTraits::CreateAttributes{ pool, reservedBytes, @@ -67,10 +74,12 @@ class BufferStoreTest : public SaiStoreTest { std::nullopt, std::nullopt}; } - BufferProfileSaiId createBufferProfile(BufferPoolSaiId _pool) { + BufferProfileSaiId createBufferProfile( + BufferPoolSaiId _pool, + bool dynamic = true) { auto& bufferApi = saiApiTable->bufferApi(); return bufferApi.create( - createProfileAttrs(_pool), 0); + createProfileAttrs(_pool, dynamic), 0); } SaiIngressPriorityGroupTraits::CreateAttributes createIngressPriorityGroupAttrs(BufferProfileSaiId profileId) const { @@ -120,6 +129,19 @@ TEST_F(BufferStoreTest, loadBufferProfile) { SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC); } +TEST_F(BufferStoreTest, loadStaticBufferProfile) { + auto poolId = createBufferPool(); + auto profileId = createBufferProfile(poolId, false /* dynamic */); + SaiStore s(0); + s.reload(); + auto& store = s.get(); + auto got = store.get(createProfileAttrs(poolId, false /* dynamic */)); + EXPECT_EQ(got->adapterKey(), profileId); + EXPECT_EQ( + GET_OPT_ATTR(BufferProfile, ThresholdMode, got->attributes()), + SAI_BUFFER_PROFILE_THRESHOLD_MODE_STATIC); +} + TEST_F(BufferStoreTest, loadBufferPoolFromJson) { auto poolId = createBufferPool(); SaiStore s(0); @@ -155,6 +177,22 @@ TEST_F(BufferStoreTest, loadBufferProfileFromJson) { SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC); } +TEST_F(BufferStoreTest, loadStaticBufferProfileFromJson) { + auto poolId = createBufferPool(); + auto profileId = createBufferProfile(poolId, false /* dynamic */); + SaiStore s(0); + s.reload(); + auto json = s.adapterKeysFollyDynamic(); + SaiStore s2(0); + s2.reload(&json); + auto& store = s2.get(); + auto got = store.get(createProfileAttrs(poolId, false /* dynamic */)); + EXPECT_EQ(got->adapterKey(), profileId); + EXPECT_EQ( + GET_OPT_ATTR(BufferProfile, ThresholdMode, got->attributes()), + SAI_BUFFER_PROFILE_THRESHOLD_MODE_STATIC); +} + TEST_F(BufferStoreTest, bufferPoolLoadCtor) { auto poolId = createBufferPool(); SaiObject obj = createObj(poolId); @@ -171,6 +209,15 @@ TEST_F(BufferStoreTest, bufferProfileLoadCtor) { EXPECT_EQ(GET_OPT_ATTR(BufferProfile, ReservedBytes, obj.attributes()), 42); } +TEST_F(BufferStoreTest, staticBufferProfileLoadCtor) { + auto poolId = createBufferPool(); + auto profileId = createBufferProfile(poolId, false /* dynamic */); + SaiObject obj = + createObj(profileId); + EXPECT_EQ(obj.adapterKey(), profileId); + EXPECT_EQ(GET_OPT_ATTR(BufferProfile, ReservedBytes, obj.attributes()), 42); +} + TEST_F(BufferStoreTest, bufferPoolCreateCtor) { auto c = createPoolAttrs(); SaiBufferPoolTraits::AdapterHostKey k = tupleProjection< @@ -187,6 +234,13 @@ TEST_F(BufferStoreTest, bufferProfileCreateCtor) { EXPECT_EQ(GET_OPT_ATTR(BufferProfile, ReservedBytes, obj.attributes()), 42); } +TEST_F(BufferStoreTest, staticBufferProfileCreateCtor) { + auto c = createProfileAttrs(createBufferPool(), false /* dynamic */); + SaiObject obj = + createObj(c, c, 0); + EXPECT_EQ(GET_OPT_ATTR(BufferProfile, ReservedBytes, obj.attributes()), 42); +} + TEST_F(BufferStoreTest, serDeserBufferPool) { auto poolId = createBufferPool(); verifyAdapterKeySerDeser({poolId}); From b82c6c36fccf08c40e594b306f85e3d177854539 Mon Sep 17 00:00:00 2001 From: Alex Hornby Date: Sun, 27 Oct 2024 04:42:48 -0700 Subject: [PATCH 380/479] getdeps: stop error with build --clean and --src-dir=. Summary: X-link: https://github.com/facebookincubator/zstrong/pull/1026 fix the error shown with build --clean and --src-dir=. Reviewed By: jdelliot Differential Revision: D64985193 fbshipit-source-id: f933adb45a7385b13965b89e421b4f9284cf0ecb --- build/fbcode_builder/getdeps/fetcher.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/fbcode_builder/getdeps/fetcher.py b/build/fbcode_builder/getdeps/fetcher.py index 30cff5b7d99b4..005b2494d6364 100644 --- a/build/fbcode_builder/getdeps/fetcher.py +++ b/build/fbcode_builder/getdeps/fetcher.py @@ -155,6 +155,9 @@ def hash(self) -> str: def get_src_dir(self): return self.path + def clean(self) -> None: + pass + class SystemPackageFetcher(object): def __init__(self, build_options, packages) -> None: From 9b56ae28abdd31a8e67abdf3aac2cec1416b4aa9 Mon Sep 17 00:00:00 2001 From: Alex Hornby Date: Sun, 27 Oct 2024 05:01:22 -0700 Subject: [PATCH 381/479] getdeps: add env subcommand Summary: X-link: https://github.com/facebookincubator/zstrong/pull/1025 Add getdeps.py `env` subcommand to get the environment from getdeps in a sourcable form so that its easier to run/test/debug the binaries There is an existing `debug` subcommand, but it starts an interactive shell inside getdeps, which isn't so useful for programatic use. To get the output clean enough to source I switched getdeps print() logging to go to stderr. example usage: ``` $ (source <(./build/fbcode_builder/getdeps.py --allow-system-packages env mononoke_integration); which mononoke) ``` Reviewed By: jdelliot Differential Revision: D64982397 fbshipit-source-id: 65212936d42185e4d395557b56d3dba499caa128 --- build/fbcode_builder/getdeps.py | 21 +++++++++++++++++ build/fbcode_builder/getdeps/builder.py | 30 ++++++++++++++++++++++-- build/fbcode_builder/getdeps/cargo.py | 23 ++++++++++++------ build/fbcode_builder/getdeps/manifest.py | 6 ++++- build/fbcode_builder/getdeps/runcmd.py | 8 ++----- 5 files changed, 72 insertions(+), 16 deletions(-) diff --git a/build/fbcode_builder/getdeps.py b/build/fbcode_builder/getdeps.py index ef81d3c3c887b..01c6c1f68a828 100755 --- a/build/fbcode_builder/getdeps.py +++ b/build/fbcode_builder/getdeps.py @@ -923,6 +923,27 @@ def run_project_cmd(self, args, loader, manifest): self.create_builder(loader, manifest).debug(reconfigure=False) +@cmd( + "env", + "print the environment in a shell sourceable format", +) +class EnvCmd(ProjectCmdBase): + def setup_project_cmd_parser(self, parser): + parser.add_argument( + "--os-type", + help="Filter to just this OS type to run", + choices=["linux", "darwin", "windows"], + action="store", + dest="ostype", + default=None, + ) + + def run_project_cmd(self, args, loader, manifest): + if args.ostype: + loader.build_opts.host_type.ostype = args.ostype + self.create_builder(loader, manifest).printenv(reconfigure=False) + + @cmd("generate-github-actions", "generate a GitHub actions configuration") class GenerateGitHubActionsCmd(ProjectCmdBase): RUN_ON_ALL = """ [push, pull_request]""" diff --git a/build/fbcode_builder/getdeps/builder.py b/build/fbcode_builder/getdeps/builder.py index 6ad9f2859a98d..65bca2692a882 100644 --- a/build/fbcode_builder/getdeps/builder.py +++ b/build/fbcode_builder/getdeps/builder.py @@ -15,6 +15,7 @@ import subprocess import sys import typing +from shlex import quote as shellquote from typing import Optional from .dyndeps import create_dyn_dep_munger @@ -157,6 +158,29 @@ def debug(self, reconfigure: bool) -> None: shell = ["powershell.exe"] if sys.platform == "win32" else ["/bin/sh", "-i"] self._run_cmd(shell, cwd=self.build_dir, env=env) + def printenv(self, reconfigure: bool) -> None: + """print the environment in a shell sourcable format""" + reconfigure = self._reconfigure(reconfigure) + self._apply_patchfile() + self._prepare(reconfigure=reconfigure) + env = self._compute_env(env=Env(src={})) + prefix = "export " + sep = ":" + expand = "$" + expandpost = "" + if self.build_opts.is_windows(): + prefix = "SET " + sep = ";" + expand = "%" + expandpost = "%" + for k, v in sorted(env.items()): + existing = os.environ.get(k, None) + if k.endswith("PATH") and existing: + v = shellquote(v) + sep + f"{expand}{k}{expandpost}" + else: + v = shellquote(v) + print("%s%s=%s" % (prefix, k, v)) + def build(self, reconfigure: bool) -> None: print("Building %s..." % self.manifest.name) reconfigure = self._reconfigure(reconfigure) @@ -225,14 +249,16 @@ def _build(self, reconfigure) -> None: system needs to regenerate its rules.""" pass - def _compute_env(self): + def _compute_env(self, env=None) -> Env: + if env is None: + env = self.env # CMAKE_PREFIX_PATH is only respected when passed through the # environment, so we construct an appropriate path to pass down return self.build_opts.compute_env_for_install_dirs( self.loader, self.dep_manifests, self.ctx, - env=self.env, + env=env, manifest=self.manifest, ) diff --git a/build/fbcode_builder/getdeps/cargo.py b/build/fbcode_builder/getdeps/cargo.py index cae8bf54cac1b..0e0e0ddfe0b99 100644 --- a/build/fbcode_builder/getdeps/cargo.py +++ b/build/fbcode_builder/getdeps/cargo.py @@ -9,6 +9,7 @@ import os import re import shutil +import sys import typing from .builder import BuilderBase @@ -97,7 +98,7 @@ def _create_cargo_config(self): if os.path.isfile(cargo_config_file): with open(cargo_config_file, "r") as f: - print(f"Reading {cargo_config_file}") + print(f"Reading {cargo_config_file}", file=sys.stderr) cargo_content = f.read() else: cargo_content = "" @@ -142,7 +143,8 @@ def _create_cargo_config(self): if new_content != cargo_content: with open(cargo_config_file, "w") as f: print( - f"Writing cargo config for {self.manifest.name} to {cargo_config_file}" + f"Writing cargo config for {self.manifest.name} to {cargo_config_file}", + file=sys.stderr, ) f.write(new_content) @@ -270,7 +272,10 @@ def _patchup_workspace(self, dep_to_git) -> None: new_content += "\n".join(config) if new_content != manifest_content: with open(patch_cargo, "w") as f: - print(f"writing patch to {patch_cargo}") + print( + f"writing patch to {patch_cargo}", + file=sys.stderr, + ) f.write(new_content) def _resolve_config(self, dep_to_git) -> typing.Dict[str, typing.Dict[str, str]]: @@ -296,7 +301,8 @@ def _resolve_config(self, dep_to_git) -> typing.Dict[str, typing.Dict[str, str]] if c in crate_source_map and c not in crates_to_patch_path: crates_to_patch_path[c] = crate_source_map[c] print( - f"{self.manifest.name}: Patching crate {c} via virtual manifest in {self.workspace_dir()}" + f"{self.manifest.name}: Patching crate {c} via virtual manifest in {self.workspace_dir()}", + file=sys.stderr, ) if crates_to_patch_path: git_url_to_crates_and_paths[git_url] = crates_to_patch_path @@ -352,7 +358,8 @@ def _resolve_dep_to_git(self): subpath = subpath.replace("/", "\\") crate_path = os.path.join(dep_source_dir, subpath) print( - f"{self.manifest.name}: Mapped crate {crate} to dep {dep} dir {crate_path}" + f"{self.manifest.name}: Mapped crate {crate} to dep {dep} dir {crate_path}", + file=sys.stderr, ) crate_source_map[crate] = crate_path elif dep_cargo_conf: @@ -367,7 +374,8 @@ def _resolve_dep_to_git(self): crate = match.group(1) if crate: print( - f"{self.manifest.name}: Discovered crate {crate} in dep {dep} dir {crate_root}" + f"{self.manifest.name}: Discovered crate {crate} in dep {dep} dir {crate_root}", + file=sys.stderr, ) crate_source_map[crate] = crate_root @@ -414,7 +422,8 @@ def _resolve_dep_to_crates(self, build_source_dir, dep_to_git): for c in crates: if c not in existing_crates: print( - f"Patch {self.manifest.name} uses {dep_name} crate {crates}" + f"Patch {self.manifest.name} uses {dep_name} crate {crates}", + file=sys.stderr, ) existing_crates.add(c) dep_to_crates.setdefault(name, set()).update(existing_crates) diff --git a/build/fbcode_builder/getdeps/manifest.py b/build/fbcode_builder/getdeps/manifest.py index 6af5e3a74dc66..d02cfe83f217f 100644 --- a/build/fbcode_builder/getdeps/manifest.py +++ b/build/fbcode_builder/getdeps/manifest.py @@ -8,6 +8,7 @@ import configparser import io import os +import sys from typing import List from .builder import ( @@ -391,7 +392,10 @@ def _is_satisfied_by_preinstalled_environment(self, ctx): return False for key in envs: val = os.environ.get(key, None) - print(f"Testing ENV[{key}]: {repr(val)}") + print( + f"Testing ENV[{key}]: {repr(val)}", + file=sys.stderr, + ) if val is None: return False if len(val) == 0: diff --git a/build/fbcode_builder/getdeps/runcmd.py b/build/fbcode_builder/getdeps/runcmd.py index e0b9d2b22fd56..c4a9326f9c2b9 100644 --- a/build/fbcode_builder/getdeps/runcmd.py +++ b/build/fbcode_builder/getdeps/runcmd.py @@ -10,16 +10,12 @@ import subprocess import sys +from shlex import quote as shellquote + from .envfuncs import Env from .platform import is_windows -try: - from shlex import quote as shellquote -except ImportError: - from pipes import quote as shellquote - - class RunCommandError(Exception): pass From 55d3526fd21a377d6a8b5646dcba219a66fb8ed9 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Sun, 27 Oct 2024 09:32:50 -0700 Subject: [PATCH 382/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/fb303/commit/c7aee89b6a8d56ef520ff1f5a4a988db036b7b2d https://github.com/facebook/fbthrift/commit/d0382bd305db51d947808969a964d86e361c6731 https://github.com/facebook/folly/commit/265a484efce787e7540de54be02b3cefc72a2f6d https://github.com/facebook/mvfst/commit/67c05c17d3fb7b2e1c7eacd563405aef406f38f5 https://github.com/facebook/proxygen/commit/5a007c0e3b9759a43e75d3cb51f9334f747db00c https://github.com/facebook/wangle/commit/164ee9ee522392aa4409caab7bc38559fae8263c https://github.com/facebookexperimental/edencommon/commit/c91eeade46438f706efa80810f961b2e344bc8d4 https://github.com/facebookexperimental/rust-shed/commit/792e16be08045cc8ff1e0c216d12ec4716e97d16 https://github.com/facebookincubator/fizz/commit/5c55ba2a6f64f5efaba6f993d442090098322cfd Reviewed By: ajb85 fbshipit-source-id: 769999cb9ea55d53fce695d7b5191675e3daf396 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index 8ce6ed7ff08ae..c3ffb91e8a503 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 66efc9d44697428e0f33c2c993efa51f80289a75 +Subproject commit c7aee89b6a8d56ef520ff1f5a4a988db036b7b2d diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 963ddbde2ada8..6461404d29206 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 5ade17aea7b774a18518056b0214426628f29ae2 +Subproject commit d0382bd305db51d947808969a964d86e361c6731 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index c92e4870004f3..a453b6176b4df 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 52e1242b8cce2ab6986e1fe109c45e17b60818a8 +Subproject commit 265a484efce787e7540de54be02b3cefc72a2f6d diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 83f6ed1e3f674..fe6eb0cd82c0d 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit e22de991f58f80a51309dd9af3bb7deac534a9dd +Subproject commit 164ee9ee522392aa4409caab7bc38559fae8263c diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 31b5800fca9e8..0b98f5e863d90 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 9ef3f0ac3d9cec347e72c0a128a5defb7e2e0a91 +Subproject commit 5c55ba2a6f64f5efaba6f993d442090098322cfd From 43dc2377f7cb4dbc0c0cd33719aa66835a7fae28 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 27 Oct 2024 17:09:58 -0700 Subject: [PATCH 383/479] Configure queue based on static queue limit configured Summary: Use the existing queue config `sharedBytes` to specify a static threshold for queues. If set, use this to populate the buffer profile static threshold. Reviewed By: vasantspatil Differential Revision: D65009237 fbshipit-source-id: cb900032a6c60e7ed7ea2a1640c72d15131883fc --- fboss/agent/hw/sai/switch/SaiBufferManager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp index bd06ae8446f6d..cc8b3ac657901 100644 --- a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp @@ -512,7 +512,12 @@ SaiBufferProfileTraits::CreateAttributes SaiBufferManager::profileCreateAttrs( SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC}; SaiBufferProfileTraits::Attributes::SharedDynamicThreshold dynThresh{0}; SaiBufferProfileTraits::Attributes::SharedStaticThreshold staticThresh{0}; - if (platform_->getAsic()->scalingFactorBasedDynamicThresholdSupported() && + if (queue.getSharedBytes()) { + // If staticBytes is explicitly set, then apply the queue limit! + staticThresh = queue.getSharedBytes().value(); + mode = SAI_BUFFER_PROFILE_THRESHOLD_MODE_STATIC; + } else if ( + platform_->getAsic()->scalingFactorBasedDynamicThresholdSupported() && queue.getScalingFactor()) { dynThresh = platform_->getAsic()->getBufferDynThreshFromScalingFactor( queue.getScalingFactor().value()); From 4f46d74ec2a2c99000171c5774972e73dae17c9f Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 27 Oct 2024 17:09:58 -0700 Subject: [PATCH 384/479] Add queue sharedBytes config for YUBA lossless queues in PFC test Summary: For PFC tests, configure lossless queues with static threshold using buffer profiles. Reviewed By: vasantspatil Differential Revision: D65013598 fbshipit-source-id: 48c141185ff22bbe5c98af0dca596d4e0c6352b6 --- .../agent_hw_tests/AgentTrafficPfcTests.cpp | 21 ++++++++++++++++++- fboss/agent/test/utils/ConfigUtils.cpp | 11 ++++++---- fboss/agent/test/utils/ConfigUtils.h | 3 ++- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp b/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp index 15de7b7960186..d82deeea397eb 100644 --- a/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp @@ -417,8 +417,27 @@ class AgentTrafficPfcTest : public AgentHwTest { kLosslessPgIds, tcToPgOverride, testParams.buffer); + auto asic = + utility::checkSameAndGetAsic(getAgentEnsemble()->getL3Asics()); if (isSupportedOnAllAsics(HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL)) { - utility::setupMultipleEgressPoolAndQueueConfigs(cfg, kLosslessPgIds); + utility::setupMultipleEgressPoolAndQueueConfigs( + cfg, kLosslessPgIds, asic->getMMUSizeBytes()); + } + if (asic->getAsicType() == cfg::AsicType::ASIC_TYPE_YUBA) { + // For YUBA, lossless queues needs to be configured with static + // queue limit equal to the MMU size to ensure its lossless. + for (auto& queueConfigs : *cfg.portQueueConfigs()) { + for (auto& queueCfg : queueConfigs.second) { + if (std::find( + kLosslessPgIds.begin(), + kLosslessPgIds.end(), + *queueCfg.id()) != kLosslessPgIds.end()) { + // Given the 1:1 mapping for queueID to PG ID, + // this is a lossless queue. + queueCfg.sharedBytes() = asic->getMMUSizeBytes(); + } + } + } } applyNewConfig(cfg); diff --git a/fboss/agent/test/utils/ConfigUtils.cpp b/fboss/agent/test/utils/ConfigUtils.cpp index 9aad9cae566b8..0438b986d6dd6 100644 --- a/fboss/agent/test/utils/ConfigUtils.cpp +++ b/fboss/agent/test/utils/ConfigUtils.cpp @@ -1348,15 +1348,18 @@ void configurePortProfile( void setupMultipleEgressPoolAndQueueConfigs( cfg::SwitchConfig& config, - const std::vector& losslessQueueIds) { + const std::vector& losslessQueueIds, + const uint64_t mmuSizeBytes) { const std::string kLosslessPoolName{"egress_lossless_pool"}; const std::string kLossyPoolName{"egress_lossy_pool"}; - // Create pool configs for 2 egress buffer pools + // Create pool configs for 2 egress buffer pools. The buffer pool + // sizing here is very specific to YUBA. A different allocation + // might be needed for other ASICs. cfg::BufferPoolConfig losslessPoolCfg; - losslessPoolCfg.sharedBytes() = 256 * 1024 * 1024; + losslessPoolCfg.sharedBytes() = mmuSizeBytes; cfg::BufferPoolConfig lossyPoolCfg; - lossyPoolCfg.sharedBytes() = 80 * 1024 * 1024; + lossyPoolCfg.sharedBytes() = mmuSizeBytes * 0.3; // 30% of MMU! std::map bufferPoolCfgMap = config.bufferPoolConfigs().ensure(); bufferPoolCfgMap.insert(std::make_pair(kLosslessPoolName, losslessPoolCfg)); diff --git a/fboss/agent/test/utils/ConfigUtils.h b/fboss/agent/test/utils/ConfigUtils.h index af39137c978dd..79017a216196a 100644 --- a/fboss/agent/test/utils/ConfigUtils.h +++ b/fboss/agent/test/utils/ConfigUtils.h @@ -276,7 +276,8 @@ void configurePortProfile( PortID controllingPortID); void setupMultipleEgressPoolAndQueueConfigs( cfg::SwitchConfig& config, - const std::vector& losslessQueueIds); + const std::vector& losslessQueueIds, + const uint64_t mmuSizeBytes); bool isSaiConfig(const cfg::SwitchConfig& config); From a11dabcc5e11f4aac00b559b957ba33ca728f82b Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 27 Oct 2024 17:09:58 -0700 Subject: [PATCH 385/479] Add a new feature for dedicated buffer pool for CPU traffic Summary: YUBA uses a dedicated buffer pool for CPU traffic, hence need to ensure that CPU queues are not tied to the existing default/lossy buffer pool. Adding a feature to control application of buffer profiles to CPU queues. Reviewed By: vasantspatil Differential Revision: D65023141 fbshipit-source-id: f3f6599fe0ae3504d1977603ad60f42910f5de38 --- fboss/agent/hw/switch_asics/ChenabAsic.cpp | 1 + fboss/agent/hw/switch_asics/EbroAsic.cpp | 1 + fboss/agent/hw/switch_asics/HwAsic.h | 1 + fboss/agent/hw/switch_asics/Jericho2Asic.cpp | 1 + fboss/agent/hw/switch_asics/Jericho3Asic.cpp | 1 + fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp | 1 + fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp | 1 + fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp | 1 + fboss/agent/hw/switch_asics/TomahawkAsic.cpp | 1 + fboss/agent/hw/switch_asics/Trident2Asic.cpp | 1 + fboss/agent/hw/switch_asics/YubaAsic.cpp | 1 + 11 files changed, 11 insertions(+) diff --git a/fboss/agent/hw/switch_asics/ChenabAsic.cpp b/fboss/agent/hw/switch_asics/ChenabAsic.cpp index 15de13594d322..b61d582f42625 100644 --- a/fboss/agent/hw/switch_asics/ChenabAsic.cpp +++ b/fboss/agent/hw/switch_asics/ChenabAsic.cpp @@ -186,6 +186,7 @@ bool ChenabAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::PQP_ERROR_EGRESS_DROP_COUNTER: case HwAsic::Feature::FABRIC_LINK_DOWN_CELL_DROP_COUNTER: case HwAsic::Feature::CRC_ERROR_DETECT: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; default: return false; diff --git a/fboss/agent/hw/switch_asics/EbroAsic.cpp b/fboss/agent/hw/switch_asics/EbroAsic.cpp index 53500369fe53d..03e2d71bd6f1e 100644 --- a/fboss/agent/hw/switch_asics/EbroAsic.cpp +++ b/fboss/agent/hw/switch_asics/EbroAsic.cpp @@ -189,6 +189,7 @@ bool EbroAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; case HwAsic::Feature::SAI_ACL_ENTRY_SRC_PORT_QUALIFIER: /* diff --git a/fboss/agent/hw/switch_asics/HwAsic.h b/fboss/agent/hw/switch_asics/HwAsic.h index 1fd65811f4ae9..08b75f8b4e31e 100644 --- a/fboss/agent/hw/switch_asics/HwAsic.h +++ b/fboss/agent/hw/switch_asics/HwAsic.h @@ -198,6 +198,7 @@ class HwAsic { ENABLE_DELAY_DROP_CONGESTION_THRESHOLD, PORT_MTU_ERROR_TRAP, L3_INTF_MTU, + DEDICATED_CPU_BUFFER_POOL, }; enum class AsicMode { diff --git a/fboss/agent/hw/switch_asics/Jericho2Asic.cpp b/fboss/agent/hw/switch_asics/Jericho2Asic.cpp index f0daa68597b1f..4ce365512a903 100644 --- a/fboss/agent/hw/switch_asics/Jericho2Asic.cpp +++ b/fboss/agent/hw/switch_asics/Jericho2Asic.cpp @@ -193,6 +193,7 @@ bool Jericho2Asic::isSupported(Feature feature) const { case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Jericho3Asic.cpp b/fboss/agent/hw/switch_asics/Jericho3Asic.cpp index 8eb9d273f6054..4867aa294b5db 100644 --- a/fboss/agent/hw/switch_asics/Jericho3Asic.cpp +++ b/fboss/agent/hw/switch_asics/Jericho3Asic.cpp @@ -197,6 +197,7 @@ bool Jericho3Asic::isSupported(Feature feature) const { case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: case HwAsic::Feature::L3_MTU_ERROR_TRAP: case HwAsic::Feature::L3_INTF_MTU: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp index 59991a0e0fe2c..334a6914be684 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp @@ -182,6 +182,7 @@ bool Tomahawk3Asic::isSupported(Feature feature) const { case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp index 487ad782e0c33..43411ed5651b4 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp @@ -201,6 +201,7 @@ bool Tomahawk4Asic::isSupported(Feature feature) const { case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp index 38215da115e87..49325c85dad57 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp @@ -184,6 +184,7 @@ bool Tomahawk5Asic::isSupported(Feature feature) const { case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/TomahawkAsic.cpp b/fboss/agent/hw/switch_asics/TomahawkAsic.cpp index ff82d23398746..ac461313d44f2 100644 --- a/fboss/agent/hw/switch_asics/TomahawkAsic.cpp +++ b/fboss/agent/hw/switch_asics/TomahawkAsic.cpp @@ -182,6 +182,7 @@ bool TomahawkAsic::isSupported(Feature feature) const { case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Trident2Asic.cpp b/fboss/agent/hw/switch_asics/Trident2Asic.cpp index 61d879eaefcdf..a805d3a7ae540 100644 --- a/fboss/agent/hw/switch_asics/Trident2Asic.cpp +++ b/fboss/agent/hw/switch_asics/Trident2Asic.cpp @@ -182,6 +182,7 @@ bool Trident2Asic::isSupported(Feature feature) const { case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/YubaAsic.cpp b/fboss/agent/hw/switch_asics/YubaAsic.cpp index 0536950b64f46..1ab7b5e514189 100644 --- a/fboss/agent/hw/switch_asics/YubaAsic.cpp +++ b/fboss/agent/hw/switch_asics/YubaAsic.cpp @@ -88,6 +88,7 @@ bool YubaAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::L3_INTF_MTU: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return true; case HwAsic::Feature::ACL_BYTE_COUNTER: case HwAsic::Feature::SAI_MPLS_LABEL_LOOKUP_FAIL_COUNTER: From 3a28360e0253973fa26008760f0c8545807b9522 Mon Sep 17 00:00:00 2001 From: Nivin Lawrence Date: Sun, 27 Oct 2024 17:09:58 -0700 Subject: [PATCH 386/479] Avoid applying buffer profile on CPU queues for YUBA Summary: As titled, skip applying buffer profile on queue if the queue is on CPU port and if the platform supports a dedicated buffer pool for control traffic. Reviewed By: vasantspatil Differential Revision: D65023142 fbshipit-source-id: 59d8050575029aae8e5b0fde996fa834ae0cab22 --- .../agent/hw/sai/switch/SaiHostifManager.cpp | 3 ++- fboss/agent/hw/sai/switch/SaiQueueManager.cpp | 19 +++++++++++++++++-- fboss/agent/hw/sai/switch/SaiQueueManager.h | 3 ++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiHostifManager.cpp b/fboss/agent/hw/sai/switch/SaiHostifManager.cpp index b0d13b2f6e8b3..806ef35c0f7f8 100644 --- a/fboss/agent/hw/sai/switch/SaiHostifManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiHostifManager.cpp @@ -523,7 +523,8 @@ void SaiHostifManager::changeCpuQueue( ? *newPortQueue->getScalingFactor() : asic->getDefaultScalingFactor( newPortQueue->getStreamType(), true /*cpu port*/)); - managerTable_->queueManager().changeQueue(queueHandle, *portQueue); + managerTable_->queueManager().changeQueue( + queueHandle, *portQueue, nullptr /*swPort*/, cfg::PortType::CPU_PORT); if (platform_->getAsic()->isSupported( HwAsic::Feature::CPU_VOQ_BUFFER_PROFILE)) { auto voqHandle = getVoqHandle(saiQueueConfig); diff --git a/fboss/agent/hw/sai/switch/SaiQueueManager.cpp b/fboss/agent/hw/sai/switch/SaiQueueManager.cpp index 64a6df88c7cb0..db8613884ec1a 100644 --- a/fboss/agent/hw/sai/switch/SaiQueueManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiQueueManager.cpp @@ -302,7 +302,8 @@ void SaiQueueManager::changeQueueDeadlockEnable( void SaiQueueManager::changeQueue( SaiQueueHandle* queueHandle, const PortQueue& newPortQueue, - const Port* swPort) { + const Port* swPort, + const std::optional portType) { CHECK(queueHandle); auto queueType = GET_ATTR(Queue, Type, queueHandle->queue->attributes()); if ((queueType != SAI_QUEUE_TYPE_UNICAST_VOQ) && @@ -314,7 +315,21 @@ void SaiQueueManager::changeQueue( changeQueueEcnWred(queueHandle, newPortQueue); if (platform_->getAsic()->isSupported(HwAsic::Feature::BUFFER_POOL) && (queueType != SAI_QUEUE_TYPE_FABRIC_TX)) { - if (!swPort || (swPort->getPortType() != cfg::PortType::MANAGEMENT_PORT)) { + if (portType && (*portType == cfg::PortType::CPU_PORT) && + platform_->getAsic()->isSupported( + HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL)) { + // Skip configuring a buffer pool on CPU queues for platforms like + // YUBA where a dedicated buffer pool is used for CPU traffic. As + // of now, the same buffer pool used for data traffic on all ports + // gets attached to CPU queues via the default queue config. Hence + // this block is a no-op for now. + // + // TODO: If there is a need to use any other buffer profile attrs + // or configs on CPU queues for such platforms, need to provide an + // option to use a dedicated CPU queue config with buffer pool + // specified explicitly as the reserved buffer pool. + } else if ( + !swPort || (swPort->getPortType() != cfg::PortType::MANAGEMENT_PORT)) { // Unsupported for MANAGEMENT_PORT changeQueueBufferProfile(queueHandle, newPortQueue); } diff --git a/fboss/agent/hw/sai/switch/SaiQueueManager.h b/fboss/agent/hw/sai/switch/SaiQueueManager.h index c5c12f87957e4..031328e2d84e5 100644 --- a/fboss/agent/hw/sai/switch/SaiQueueManager.h +++ b/fboss/agent/hw/sai/switch/SaiQueueManager.h @@ -65,7 +65,8 @@ class SaiQueueManager { void changeQueue( SaiQueueHandle* queueHandle, const PortQueue& newPortQueue, - const Port* swPort = nullptr); + const Port* swPort = nullptr, + const std::optional portType = std::nullopt); void changeQueueBufferProfile( SaiQueueHandle* queueHandle, const PortQueue& newPortQueue); From 0b7bae6c7adb1cb2155ae59c58c5a53862f54ed5 Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Sun, 27 Oct 2024 23:36:05 -0700 Subject: [PATCH 387/479] remove connection handle from hw test config Summary: as titled Reviewed By: srikrishnagopu Differential Revision: D65046427 Privacy Context Container: L1125642 fbshipit-source-id: ceb0929ae795447cbec73475a9ea735334c17329 --- fboss/oss/hw_test_configs/yangra.agent.materialized_JSON | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fboss/oss/hw_test_configs/yangra.agent.materialized_JSON b/fboss/oss/hw_test_configs/yangra.agent.materialized_JSON index 37600aa9cb52d..1ad38a0bdcd77 100644 --- a/fboss/oss/hw_test_configs/yangra.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/yangra.agent.materialized_JSON @@ -133,8 +133,7 @@ "minimum": 100, "maximum": 120 }, - "switchMac": "02:00:00:00:00:01", - "connectionHandle": "68:00" + "switchMac": "02:00:00:00:00:01" } }, "vendorMacOuis": [ From 79311c797b9f81a573191144e9fa71827cc645b8 Mon Sep 17 00:00:00 2001 From: Prasoon Patel Date: Mon, 28 Oct 2024 01:54:17 -0700 Subject: [PATCH 388/479] adding resource check for MAC table in ResourceAccountant Summary: This diff adds a resource check for MAC table in the SwSwitch class. The code changes include adding a check for L2 resource in the SwSwitch class and modifying the ResourceAccountant class to include a check for L2 resource. The ResourceAccountant class also includes a getL2Entries() function to get the number of L2 entries programmed. The changes are made to ensure that the MAC table does not exceed the maximum number of entries supported, which is 1000 . Reviewed By: zechengh09 Differential Revision: D63394006 fbshipit-source-id: 476a4855934f6baf03372350f62fb9f00f245a9e --- fboss/agent/ResourceAccountant.cpp | 56 ++++++++++++++++++++++++++---- fboss/agent/ResourceAccountant.h | 8 ++++- fboss/agent/SwSwitch.cpp | 2 +- 3 files changed, 58 insertions(+), 8 deletions(-) diff --git a/fboss/agent/ResourceAccountant.cpp b/fboss/agent/ResourceAccountant.cpp index 220798a467b97..4ae8f891dafca 100644 --- a/fboss/agent/ResourceAccountant.cpp +++ b/fboss/agent/ResourceAccountant.cpp @@ -176,7 +176,7 @@ bool ResourceAccountant::shouldCheckRouteUpdate() const { return false; } -bool ResourceAccountant::stateChangedImpl(const StateDelta& delta) { +bool ResourceAccountant::ecmpStateChangedImpl(const StateDelta& delta) { if (!checkRouteUpdate_) { return true; } @@ -211,7 +211,7 @@ bool ResourceAccountant::stateChangedImpl(const StateDelta& delta) { } bool ResourceAccountant::isValidRouteUpdate(const StateDelta& delta) { - bool validRouteUpdate = stateChangedImpl(delta); + bool validRouteUpdate = ecmpStateChangedImpl(delta); if (FLAGS_dlbResourceCheckEnable && FLAGS_flowletSwitchingEnable && checkDlbResource_ && !validRouteUpdate) { @@ -257,10 +257,6 @@ bool ResourceAccountant::isValidRouteUpdate(const StateDelta& delta) { return validRouteUpdate; } -void ResourceAccountant::stateChanged(const StateDelta& delta) { - stateChangedImpl(delta); -} - void ResourceAccountant::enableDlbResourceCheck(bool enable) { checkDlbResource_ = enable; } @@ -275,4 +271,52 @@ ResourceAccountant::checkAndUpdateEcmpResource( const std::shared_ptr>& route, bool add); +// calculate new update for l2 entries from the delta +// check l2Entries_ in the switchState +// return true if the l2Entries_ are within the limit +bool ResourceAccountant::l2StateChangedImpl(const StateDelta& delta) { + auto processDelta = [&](const auto& deltaMac) { + DeltaFunctions::forEachChanged( + deltaMac, + [&](const auto& /*oldMac*/, const auto& /*newMac*/) { + return LoopAction::CONTINUE; + }, + [&](const auto& /*newMac*/) { + l2Entries_++; + return LoopAction::CONTINUE; + }, + [&](const auto& /*deletedMac*/) { + l2Entries_--; + return LoopAction::CONTINUE; + }); + }; + + for (auto& deltaVlan : delta.getVlansDelta()) { + processDelta(deltaVlan.getMacDelta()); + } + if (l2Entries_ > FLAGS_max_l2_entries) { + XLOG(ERR) << "Total l2 entries in new switchState: " << l2Entries_ + << " exceeds the limit: " << FLAGS_max_l2_entries; + return false; + } + return true; +} + +void ResourceAccountant::stateChanged(const StateDelta& delta) { + ecmpStateChangedImpl(delta); + if (FLAGS_enable_mac_update_protection) { + l2StateChangedImpl(delta); + } +} + +bool ResourceAccountant::isValidUpdate(const StateDelta& delta) { + bool validRouteUpdate = isValidRouteUpdate(delta); + bool validL2Update = true; + + if (FLAGS_enable_mac_update_protection) { + validL2Update = l2StateChangedImpl(delta); + } + + return validRouteUpdate && validL2Update; +} } // namespace facebook::fboss diff --git a/fboss/agent/ResourceAccountant.h b/fboss/agent/ResourceAccountant.h index e75b0cb7c6c7b..495b5d4581c37 100644 --- a/fboss/agent/ResourceAccountant.h +++ b/fboss/agent/ResourceAccountant.h @@ -18,12 +18,15 @@ DECLARE_int32(max_l2_entries); +DECLARE_bool(enable_mac_update_protection); + namespace facebook::fboss { class ResourceAccountant { public: explicit ResourceAccountant(const HwAsicTable* asicTable); + bool isValidUpdate(const StateDelta& delta); bool isValidRouteUpdate(const StateDelta& delta); void stateChanged(const StateDelta& delta); void enableDlbResourceCheck(bool enable); @@ -32,7 +35,7 @@ class ResourceAccountant { int getMemberCountForEcmpGroup(const RouteNextHopEntry& fwd) const; bool checkEcmpResource(bool intermediateState) const; bool checkDlbResource(uint32_t resourcePercentage) const; - bool stateChangedImpl(const StateDelta& delta); + bool ecmpStateChangedImpl(const StateDelta& delta); bool shouldCheckRouteUpdate() const; bool isEcmp(const RouteNextHopEntry& fwd) const; int computeWeightedEcmpMemberCount( @@ -44,6 +47,8 @@ class ResourceAccountant { const std::shared_ptr>& route, bool add); + bool l2StateChangedImpl(const StateDelta& delta); + uint32_t ecmpMemberUsage_{0}; std::map ecmpGroupRefMap_; @@ -51,6 +56,7 @@ class ResourceAccountant { bool nativeWeightedEcmp_{true}; bool checkRouteUpdate_; bool checkDlbResource_{true}; + int32_t l2Entries_{0}; FRIEND_TEST(ResourceAccountantTest, getMemberCountForEcmpGroup); FRIEND_TEST(ResourceAccountantTest, checkDlbResource); diff --git a/fboss/agent/SwSwitch.cpp b/fboss/agent/SwSwitch.cpp index 7abd843e59ce5..c8e1fde8ab7f3 100644 --- a/fboss/agent/SwSwitch.cpp +++ b/fboss/agent/SwSwitch.cpp @@ -1763,7 +1763,7 @@ std::shared_ptr SwSwitch::applyUpdate( return oldState; } - if (!resourceAccountant_->isValidRouteUpdate(delta)) { + if (!resourceAccountant_->isValidUpdate(delta)) { // Notify resource account to revert back to previous state resourceAccountant_->stateChanged(StateDelta(newState, oldState)); return oldState; From 243a267b90283dbf378a6b52a5d95fe1422bb031 Mon Sep 17 00:00:00 2001 From: Prasoon Patel Date: Mon, 28 Oct 2024 01:54:17 -0700 Subject: [PATCH 389/479] mac table full unit tests Summary: This diff contains unit tests for the MacTableManager and MacTableUtils classes in the agent. This test case also verifies ResoureceAccountant l2 API. Reviewed By: zechengh09 Differential Revision: D63570740 fbshipit-source-id: 87c6438c252ad82767bc495dbb6030ef91eed2dd --- fboss/agent/ResourceAccountant.h | 1 + fboss/agent/SwSwitch.h | 3 + fboss/agent/test/MacTableManagerTests.cpp | 91 +++++++++++++++++++++++ 3 files changed, 95 insertions(+) diff --git a/fboss/agent/ResourceAccountant.h b/fboss/agent/ResourceAccountant.h index 495b5d4581c37..14084511ab49e 100644 --- a/fboss/agent/ResourceAccountant.h +++ b/fboss/agent/ResourceAccountant.h @@ -63,5 +63,6 @@ class ResourceAccountant { FRIEND_TEST(ResourceAccountantTest, checkEcmpResource); FRIEND_TEST(ResourceAccountantTest, checkAndUpdateEcmpResource); FRIEND_TEST(ResourceAccountantTest, computeWeightedEcmpMemberCount); + FRIEND_TEST(MacTableManagerTest, MacLearnedBulkCb); }; } // namespace facebook::fboss diff --git a/fboss/agent/SwSwitch.h b/fboss/agent/SwSwitch.h index f52fea069ff84..a0e1f825e7413 100644 --- a/fboss/agent/SwSwitch.h +++ b/fboss/agent/SwSwitch.h @@ -218,6 +218,9 @@ class SwSwitch : public HwSwitchCallback { return hwSwitchThriftClientTable_.get(); } + ResourceAccountant* getResourceAccountant() const { + return resourceAccountant_.get(); + } /* * Initialize the switch. * diff --git a/fboss/agent/test/MacTableManagerTests.cpp b/fboss/agent/test/MacTableManagerTests.cpp index 1ba00379d016f..f204169e7f1ed 100644 --- a/fboss/agent/test/MacTableManagerTests.cpp +++ b/fboss/agent/test/MacTableManagerTests.cpp @@ -11,6 +11,7 @@ #include #include "fboss/agent/L2Entry.h" +#include "fboss/agent/ResourceAccountant.h" #include "fboss/agent/state/Port.h" #include "fboss/agent/state/SwitchState.h" #include "fboss/agent/state/Vlan.h" @@ -29,6 +30,7 @@ class MacTableManagerTest : public ::testing::Test { void SetUp() override { handle_ = createTestHandle(testStateA()); sw_ = handle_->getSw(); + FLAGS_enable_mac_update_protection = true; } void verifyStateUpdate(Func func) { @@ -61,6 +63,24 @@ class MacTableManagerTest : public ::testing::Test { facebook::fboss::L2EntryUpdateType::L2_ENTRY_UPDATE_TYPE_DELETE, wait); } + void triggerMacBulkLearnedCb( + const std::vector& macs, + bool wait = true) { + triggerMacBulkCbHelper( + macs, + facebook::fboss::L2EntryUpdateType::L2_ENTRY_UPDATE_TYPE_ADD, + wait); + } + + void triggerMacBulkAgedCb( + const std::vector& macs, + bool wait = true) { + triggerMacBulkCbHelper( + macs, + facebook::fboss::L2EntryUpdateType::L2_ENTRY_UPDATE_TYPE_DELETE, + wait); + } + void verifyMacIsAdded() { verifyStateUpdate([=]() { auto vlan = sw_->getState()->getVlans()->getNode(kVlan()); @@ -73,6 +93,22 @@ class MacTableManagerTest : public ::testing::Test { }); } + // verify mac entris in switchState is in sync with resourceAccountant + // l2Entries_ + void verifyMacEntryCount(int l2ResourceAccountantEntries) { + verifyStateUpdate([=, this]() { + auto vlan = sw_->getState()->getVlans()->getNode(kVlan()); + auto* macTable = vlan->getMacTable().get(); + XLOG(DBG2) << "macTable size: " << macTable->size() + << ", l2ResourceAccountantEntries: " + << l2ResourceAccountantEntries + << ", getMacTableUpdateFailure: " + << sw_->stats()->getMacTableUpdateFailure(); + + EXPECT_EQ(l2ResourceAccountantEntries, macTable->size()); + }); + } + void verifyMacIsDeleted() { verifyStateUpdate([=]() { auto vlan = sw_->getState()->getVlans()->getNode(kVlan()); @@ -114,6 +150,24 @@ class MacTableManagerTest : public ::testing::Test { } } + void triggerMacBulkCbHelper( + const std::vector& macs, + L2EntryUpdateType l2EntryUpdateType, + bool wait = true) { + for (const auto& mac : macs) { + auto l2Entry = L2Entry( + mac, + kVlan(), + PortDescriptor(kPortID()), + L2Entry::L2EntryType::L2_ENTRY_TYPE_PENDING); + sw_->l2LearningUpdateReceived(l2Entry, l2EntryUpdateType); + } + if (wait) { + waitForBackgroundThread(sw_); + waitForStateUpdates(sw_); + } + } + std::unique_ptr handle_; SwSwitch* sw_; }; @@ -167,5 +221,42 @@ TEST_F(MacTableManagerTest, SameMacAgedCbTwice) { verifyMacIsDeleted(); } +// This test is to verify resourceAccountant is updated correctly +TEST_F(MacTableManagerTest, MacLearnedBulkCb) { + int16_t numMac = 100; + int16_t deleted = 0; + int16_t batchSize = 10; + std::vector macs; + for (int16_t i = 0; i < numMac; i++) { + macs.push_back(MacAddress::fromHBO(i)); + } + + // learn 10 mac entries + triggerMacBulkLearnedCb( + std::vector(macs.begin(), macs.begin() + batchSize)); + // expect 10 mac entries in switchState and resourceAccountant + verifyMacEntryCount(getSw()->getResourceAccountant()->l2Entries_); + + // age 10 mac entries + triggerMacBulkAgedCb( + std::vector(macs.begin(), macs.begin() + batchSize)); + deleted = batchSize; + // expect 0 mac entries in switchState and resourceAccountant + verifyMacEntryCount(getSw()->getResourceAccountant()->l2Entries_); + + // learn 90 mac entries + triggerMacBulkLearnedCb( + std::vector(macs.begin() + batchSize, macs.end())); + // expect 90 mac entries in switchState and resourceAccountant + verifyMacEntryCount(getSw()->getResourceAccountant()->l2Entries_); + + // age 20 mac entries + batchSize = 20; + triggerMacBulkAgedCb(std::vector( + macs.begin() + deleted, macs.begin() + deleted + batchSize)); + deleted += batchSize; + // expect 70 mac entries in switchState and resourceAccountant + verifyMacEntryCount(getSw()->getResourceAccountant()->l2Entries_); +} } // namespace facebook::fboss From 3eb1ad642ec6ee2503a902e47eb7acb52e45bbb3 Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Mon, 28 Oct 2024 03:47:29 -0700 Subject: [PATCH 390/479] skip hw info attribute for yangra Summary: as titled. Reviewed By: vasantspatil Differential Revision: D65046513 Privacy Context Container: L1125642 fbshipit-source-id: b11219e243939c23555994d4b2fac11e7f812178 --- fboss/agent/platforms/sai/SaiYangraPlatform.cpp | 11 +++++++++++ fboss/agent/platforms/sai/SaiYangraPlatform.h | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/fboss/agent/platforms/sai/SaiYangraPlatform.cpp b/fboss/agent/platforms/sai/SaiYangraPlatform.cpp index ac11d3de8fd2f..260094b41f1dd 100644 --- a/fboss/agent/platforms/sai/SaiYangraPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiYangraPlatform.cpp @@ -96,4 +96,15 @@ bool SaiYangraPlatform::supportInterfaceType() const { void SaiYangraPlatform::initLEDs() {} SaiYangraPlatform::~SaiYangraPlatform() = default; +SaiSwitchTraits::CreateAttributes SaiYangraPlatform::getSwitchAttributes( + bool mandatoryOnly, + cfg::SwitchType switchType, + std::optional switchId, + BootType bootType) { + auto attributes = SaiPlatform::getSwitchAttributes( + mandatoryOnly, switchType, switchId, bootType); + std::get>(attributes) = + std::nullopt; + return attributes; +} } // namespace facebook::fboss diff --git a/fboss/agent/platforms/sai/SaiYangraPlatform.h b/fboss/agent/platforms/sai/SaiYangraPlatform.h index 96b2144e4dd79..79cdecce82b12 100644 --- a/fboss/agent/platforms/sai/SaiYangraPlatform.h +++ b/fboss/agent/platforms/sai/SaiYangraPlatform.h @@ -43,6 +43,12 @@ class SaiYangraPlatform : public SaiPlatform { std::string getHwConfig() override; + SaiSwitchTraits::CreateAttributes getSwitchAttributes( + bool mandatoryOnly, + cfg::SwitchType switchType, + std::optional switchId, + BootType bootType) override; + private: void setupAsic( cfg::SwitchType switchType, From 3c8990fb2d76d5c616916d480f2138c0fa011e4b Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Mon, 28 Oct 2024 09:37:40 -0700 Subject: [PATCH 391/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/3fd057717ceec0e0930954ed76c52c1ed34ed650 https://github.com/facebook/fb303/commit/269ab46d0b920b5eacfd1658ef2b373b36554337 https://github.com/facebook/fbthrift/commit/fb180f035fffa69311bec856e04afc8f30da5d47 https://github.com/facebook/mvfst/commit/80bd5e5f374fa90af1bcbeffd90a22972194a12a https://github.com/facebook/proxygen/commit/508af2e7963c349267de28ceef0d485af48b12de https://github.com/facebook/wangle/commit/b890ed7f5aeeb02fd94cf93d12485bfd3f993256 https://github.com/facebookexperimental/edencommon/commit/e888006c9da7ad08bec511c51aaadfabf8bb8d98 https://github.com/facebookexperimental/rust-shed/commit/ce2cfbec70e6d7592ee9f5cb2eb16bfb6357002a https://github.com/facebookincubator/fizz/commit/8bb942a09b29e847eadaff96d582093d028fcb23 GitHub releases: https://github.com/facebookincubator/reindeer/releases/tag/v2024.10.28.00 Reviewed By: bigfootjon fbshipit-source-id: 946fdae229216518cf8ae6f34844c806ffa876df --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index c3ffb91e8a503..c3f095f64faae 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit c7aee89b6a8d56ef520ff1f5a4a988db036b7b2d +Subproject commit 269ab46d0b920b5eacfd1658ef2b373b36554337 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 6461404d29206..e596bd69d3262 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit d0382bd305db51d947808969a964d86e361c6731 +Subproject commit fb180f035fffa69311bec856e04afc8f30da5d47 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index fe6eb0cd82c0d..77721d6940688 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 164ee9ee522392aa4409caab7bc38559fae8263c +Subproject commit b890ed7f5aeeb02fd94cf93d12485bfd3f993256 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 0b98f5e863d90..8a9f2f4187513 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 5c55ba2a6f64f5efaba6f993d442090098322cfd +Subproject commit 8bb942a09b29e847eadaff96d582093d028fcb23 From 3ec39aa97d75e10060c24248f96755a0989a08e6 Mon Sep 17 00:00:00 2001 From: Scott Smith Date: Mon, 28 Oct 2024 11:19:19 -0700 Subject: [PATCH 392/479] Specify directory structure Summary: Enforcing directory structure will enable simpler tooling around building and testing rpms. Reviewed By: somasun Differential Revision: D64914703 Privacy Context Container: L1125642 fbshipit-source-id: 87657245841eb7c78bb167b53154c06f30fd1f09 --- fboss/docs/bsp_development_requirements.md | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/fboss/docs/bsp_development_requirements.md b/fboss/docs/bsp_development_requirements.md index ab950ba2f5ac0..4ef727eb6f896 100644 --- a/fboss/docs/bsp_development_requirements.md +++ b/fboss/docs/bsp_development_requirements.md @@ -23,6 +23,7 @@ consistent ABIs for user space software. - [2. Terms and Abbreviations](#2-terms-and-abbreviations) - [3. Compatible Kernel Versions](#3-compatible-kernel-versions) - [4. Common Requirements](#4-common-requirements) + - [4.1 Source Code Repository Structure](#41-source-code-repository-structure) - [5. The PCIe FPGA Driver](#5-the-pcie-fpga-driver) - [5.1 Auxiliary Bus](#51-auxiliary-bus) - [5.2 Subdevice (I/O Controller) Creation \& Deletion](#52-subdevice-io-controller-creation--deletion) @@ -166,6 +167,28 @@ this is to avoid potential log spew. unloads all of the provided kernel modules. This script must be kept up to date with any changes made to the BSP. +## 4.1 Source Code Repository Structure + +Source code shared with Meta must have the following general structure: + +``` +/source-repo +├── kmods +│ ├── Makefile +│ ├── module.c +│ └── ... +└── rpmbuild + └── \_bsp_kmods.spec +``` + +The source repository must have a top-level directory named "kmods" and another +named "rpmbuild". The kmods directory must have a `Makefile` which will build +the bsp kernel modules. Any other structure decisions are left to developers. + +The "rpmbuild" directory must have a file name \_bsp_kmods.spec which is +an rpm spec file. This spec file should result in an rpm that conforms to the +rest of the specifications in this document + # 5. The PCIe FPGA Driver From b96d0d8e7b46d997cd5f7f8f7f5414086c98434c Mon Sep 17 00:00:00 2001 From: Scott Smith Date: Mon, 28 Oct 2024 11:19:19 -0700 Subject: [PATCH 393/479] Add item for kmods.json Summary: We've added kmods.json to all repos now, we should include this in the specification. Reviewed By: kimdo8736 Differential Revision: D64917086 fbshipit-source-id: e12c1214419a49ef567db3447b9330cd941c2c78 --- fboss/docs/bsp_development_requirements.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/fboss/docs/bsp_development_requirements.md b/fboss/docs/bsp_development_requirements.md index 4ef727eb6f896..f2f95ad22ff7e 100644 --- a/fboss/docs/bsp_development_requirements.md +++ b/fboss/docs/bsp_development_requirements.md @@ -166,6 +166,23 @@ this is to avoid potential log spew. 10. The BSP must include a bash script named `fbsp-remove.sh` which successfully unloads all of the provided kernel modules. This script must be kept up to date with any changes made to the BSP. +11. A file `kmods.json` must be included in the same directory as `fbsp-remove.sh` +and this file contains a list of kmods (as named in `lsmod`) in the following +format: +``` +{ + "bspKmods": [ + "kmod_A", + "kmod_B", + ], + "sharedKmods": [ + "shared_kmod_C", + "shared_kmod_D" + ] +} +``` +`fbsp-remove.sh` must read `kmods.json` and remove `bspKmods` before `sharedKmods`. +A "shared" kmod is any kmod which other kmods depend upon. ## 4.1 Source Code Repository Structure From 06be4a68dc94fa17aa68c649dcc7a15468c327c9 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005307016 Date: Mon, 28 Oct 2024 11:27:23 -0700 Subject: [PATCH 394/479] Remove default typing argument in PACKAGE file] [batch:62/416] [shard:4/N] Reviewed By: MaggieMoss Differential Revision: D64864503 fbshipit-source-id: d1fbefdbda7b6eddb6f7d1df0523aac789ee5248 --- fboss/platform/bsp_tests/tests/test_i2c.py | 3 +++ fboss/platform/bsp_tests/tests/test_xcvr.py | 2 ++ fboss/py/fboss/cli/commands/interface.py | 1 + fboss/py/fboss/cli/commands/route.py | 1 + fboss/py/fboss/cli/utils/utils.py | 9 +++++++++ fboss/util/sdk_onboarding/sdk_tests.py | 2 ++ 6 files changed, 18 insertions(+) diff --git a/fboss/platform/bsp_tests/tests/test_i2c.py b/fboss/platform/bsp_tests/tests/test_i2c.py index 82c434e610fdf..9c7ec04276c4a 100644 --- a/fboss/platform/bsp_tests/tests/test_i2c.py +++ b/fboss/platform/bsp_tests/tests/test_i2c.py @@ -141,6 +141,7 @@ def run_i2c_test_transactions_concurrent(device: I2CDevice, busNum: int) -> None def run_i2c_dump_test(device: I2CDevice, busNum: int) -> None: if not device.testData: return + # pyre-fixme[16]: Optional type has no attribute `i2cDumpData`. for tc in device.testData.i2cDumpData: output = run_cmd( [ @@ -161,6 +162,7 @@ def run_i2c_dump_test(device: I2CDevice, busNum: int) -> None: def run_i2c_get_test(device: I2CDevice, busNum: int) -> None: if not device.testData: return + # pyre-fixme[16]: Optional type has no attribute `i2cGetData`. for tc in device.testData.i2cGetData: output = i2cget(str(busNum), device.address, tc.reg) assert ( @@ -171,6 +173,7 @@ def run_i2c_get_test(device: I2CDevice, busNum: int) -> None: def run_i2c_set_test(device: I2CDevice, busNum: int) -> None: if not device.testData: return + # pyre-fixme[16]: Optional type has no attribute `i2cSetData`. for tc in device.testData.i2cSetData: original = i2cget(str(busNum), device.address, tc.reg) diff --git a/fboss/platform/bsp_tests/tests/test_xcvr.py b/fboss/platform/bsp_tests/tests/test_xcvr.py index 0429b1736ddb0..166d201582fff 100644 --- a/fboss/platform/bsp_tests/tests/test_xcvr.py +++ b/fboss/platform/bsp_tests/tests/test_xcvr.py @@ -21,6 +21,8 @@ def test_xcvr_names(platform_fpgas) -> None: def test_xcvr_creates_sysfs_files(platform_fpgas, platform_config) -> None: platform = platform_config.platform if platform == "meru800bfa" or platform == "meru800bia": + # pyre-fixme[29]: `_WithException[typing.Any, + # typing.Type[_pytest.outcomes.Skipped]]` is not a function. pytest.skip("DSF fails xcvr test currently.") fpgaDirMap = find_fpga_dirs(platform_fpgas) for fpga in platform_fpgas: diff --git a/fboss/py/fboss/cli/commands/interface.py b/fboss/py/fboss/cli/commands/interface.py index 5c07d740b5104..d30f03d8f0d98 100644 --- a/fboss/py/fboss/cli/commands/interface.py +++ b/fboss/py/fboss/cli/commands/interface.py @@ -70,6 +70,7 @@ def convert_address(addr: bytes) -> str: return socket.inet_ntop(socket.AF_INET, addr) elif len(addr) == 16: return socket.inet_ntop(socket.AF_INET6, addr) + # pyre-fixme[16]: `str` has no attribute `gdlluivnhbufformat`. raise ValueError("bad binary address {0}".gdlluivnhbufformat(repr(addr))) diff --git a/fboss/py/fboss/cli/commands/route.py b/fboss/py/fboss/cli/commands/route.py index 0bd5ed94d8d89..c2eb912af0b57 100644 --- a/fboss/py/fboss/cli/commands/route.py +++ b/fboss/py/fboss/cli/commands/route.py @@ -82,6 +82,7 @@ def is_ucmp_active(next_hops: t.Iterator[NextHopThrift]) -> bool: if not next_hops: return False + # pyre-fixme[16]: `Iterator` has no attribute `__getitem__`. return not all(next_hops[0].weight == nh.weight for nh in next_hops) diff --git a/fboss/py/fboss/cli/utils/utils.py b/fboss/py/fboss/cli/utils/utils.py index 2c6860828e344..00598f09078cd 100644 --- a/fboss/py/fboss/cli/utils/utils.py +++ b/fboss/py/fboss/cli/utils/utils.py @@ -203,6 +203,7 @@ def get_vlan_port_map( if not port_summary: continue + # pyre-fixme[61]: `root_port` is undefined, or not always defined. vlan_port_map[vlan][root_port].append(port_summary) return vlan_port_map @@ -318,6 +319,7 @@ def label_forwarding_action_to_str(label_forwarding_action: MplsAction) -> str: labels = ": " + str(label_forwarding_action.swapLabel) elif label_forwarding_action.action == MplsActionCode.PUSH: stack_str = "{{{}}}".format( + # pyre-fixme[16]: `Optional` has no attribute `__iter__`. ",".join([str(element) for element in label_forwarding_action.pushLabels]) ) labels = f": {stack_str}" @@ -327,11 +329,16 @@ def label_forwarding_action_to_str(label_forwarding_action: MplsAction) -> str: def nexthop_to_str( nexthop: NextHopThrift, + # pyre-fixme[9]: vlan_aggregate_port_map has type `Dict[str, str]`; used as `None`. vlan_aggregate_port_map: t.Dict[str, str] = None, + # pyre-fixme[9]: vlan_port_map has type `DefaultDict[str, DefaultDict[str, + # List[str]]]`; used as `None`. vlan_port_map: t.DefaultDict[str, t.DefaultDict[str, t.List[str]]] = None, ) -> str: weight_str = "" via_str = "" + # pyre-fixme[6]: For 1st argument expected `MplsAction` but got + # `Optional[MplsAction]`. label_str = label_forwarding_action_to_str(nexthop.mplsAction) if nexthop.weight: @@ -345,9 +352,11 @@ def nexthop_to_str( # For agg ports it's better to display the agg port name, # rather than the phy if vlan_id in vlan_aggregate_port_map.keys(): + # pyre-fixme[6]: For 1st argument expected `str` but got `int`. via_str = vlan_aggregate_port_map[vlan_id] else: port_names = [] + # pyre-fixme[6]: For 1st argument expected `str` but got `int`. for ports in vlan_port_map[vlan_id].values(): for port in ports: port_names.append(port) diff --git a/fboss/util/sdk_onboarding/sdk_tests.py b/fboss/util/sdk_onboarding/sdk_tests.py index 134208357b996..02c556f5c9fca 100644 --- a/fboss/util/sdk_onboarding/sdk_tests.py +++ b/fboss/util/sdk_onboarding/sdk_tests.py @@ -14,7 +14,9 @@ def __init__(self, config_file: str): self.sdk_test_config = self.parse_config(config_file) def parse_config(self, config_file: str): + # pyre-fixme[9]: config_file has type `str`; used as `BufferedReader`. with open(config_file, "rb") as config_file: + # pyre-fixme[16]: `str` has no attribute `read`. data = config_file.read() return deserialize( structKlass=SdkTestConfig, From 2fb2dc0bebb8cc548d3eed9cb4bbe9d1c7edc349 Mon Sep 17 00:00:00 2001 From: Cullen Walsh Date: Mon, 28 Oct 2024 12:58:51 -0700 Subject: [PATCH 395/479] Avoid calling cfg constructor in nested cells Summary: PACKAGE values aren't shared across cells, but we can use get_root_config() and get_config() to determine if we are in the root cell or not. Reviewed By: bigfootjon Differential Revision: D64993387 fbshipit-source-id: 240929d4bc5f87ea7e8ce1460821e3243323da6a --- shim/PACKAGE | 5 ++++- shim/cfg.bzl | 8 +++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/shim/PACKAGE b/shim/PACKAGE index ea35fecd14159..782e6f913ff4e 100644 --- a/shim/PACKAGE +++ b/shim/PACKAGE @@ -5,8 +5,11 @@ # License, Version 2.0 found in the LICENSE-APACHE file in the root directory # of this source tree. -load(":cfg.bzl", "get_shim_modifiers") +load(":cfg.bzl", "SHIM_ALIASES", "set_cfg_constructor", "get_shim_modifiers") load("@prelude//cfg/modifier:set_cfg_modifiers.bzl", "set_cfg_modifiers") +# Activate cfg modifiers from CLI / PACKAGE / targets +set_cfg_constructor(SHIM_ALIASES) + modifiers = get_shim_modifiers() set_cfg_modifiers(modifiers) diff --git a/shim/cfg.bzl b/shim/cfg.bzl index 9c630dfa062f3..9b63ae110f292 100644 --- a/shim/cfg.bzl +++ b/shim/cfg.bzl @@ -13,10 +13,10 @@ SHIM_ALIASES = { "ubuntu": "shim//os/linux/distro/constraints:ubuntu", } -CFG_CONSTRUCTOR_INITIALIZED_KEY = "buck.cfg_constructor_initialized" - def set_cfg_constructor(aliases = dict()): - if not read_parent_package_value(CFG_CONSTRUCTOR_INITIALIZED_KEY): + project_root_cell = read_root_config("cell_aliases", "root") + current_root_cell = read_config("cell_aliases", "root") + if project_root_cell == current_root_cell: native.set_cfg_constructor( stage0 = cfg_constructor_pre_constraint_analysis, stage1 = cfg_constructor_post_constraint_analysis, @@ -25,8 +25,6 @@ def set_cfg_constructor(aliases = dict()): extra_data = struct(), ) - write_package_value(CFG_CONSTRUCTOR_INITIALIZED_KEY, True) - def get_shim_modifiers(): modifiers = [] From b7a83ca1a04e4989e2df89ad566faef8ada1b834 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Mon, 28 Oct 2024 13:41:03 -0700 Subject: [PATCH 396/479] Assert for newly added sys port info to be present in switch info Summary: As titled Reviewed By: srikrishnagopu Differential Revision: D65015150 fbshipit-source-id: 22a7c72cabd5a53948f5c9de4173496924284a7c --- fboss/agent/ApplyThriftConfig.cpp | 7 ++++++- fboss/agent/state/tests/SwitchSettingsTests.cpp | 15 ++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 17580f014c0bd..7987ee6659e92 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -1382,8 +1382,13 @@ void ThriftConfigApplier::processInterfaceForPortForVoqSwitches( auto switchInfoItr = cfg_->switchSettings()->switchIdToSwitchInfo()->find(switchId); CHECK(switchInfoItr != cfg_->switchSettings()->switchIdToSwitchInfo()->end()); + const auto& switchInfo = switchInfoItr->second; CHECK(dsfNodeItr->second.systemPortRange().has_value()); - CHECK(switchInfoItr->second.portIdRange().has_value()); + CHECK(switchInfo.portIdRange().has_value()); + CHECK(!switchInfo.systemPortRanges()->systemPortRanges()->empty()); + CHECK(switchInfo.localSystemPortOffset().has_value()); + CHECK(switchInfo.globalSystemPortOffset().has_value()); + CHECK(switchInfo.inbandPortId().has_value()); auto systemPortRange = dsfNodeItr->second.systemPortRange(); auto portIdRange = switchInfoItr->second.portIdRange(); CHECK(systemPortRange); diff --git a/fboss/agent/state/tests/SwitchSettingsTests.cpp b/fboss/agent/state/tests/SwitchSettingsTests.cpp index ba02fc299f64d..8e77261403ae1 100644 --- a/fboss/agent/state/tests/SwitchSettingsTests.cpp +++ b/fboss/agent/state/tests/SwitchSettingsTests.cpp @@ -351,7 +351,16 @@ TEST(SwitchSettingsTest, ThrifyMigration) { TEST(SwitchSettingsTest, applyVoqSwitch) { auto platform = createMockPlatform(); auto stateV0 = make_shared(); - addSwitchInfo(stateV0, cfg::SwitchType::VOQ, kVoqSwitchIdBegin /* switchId*/); + addSwitchInfo( + stateV0, + cfg::SwitchType::VOQ, + kVoqSwitchIdBegin /* switchId*/, + cfg::AsicType::ASIC_TYPE_MOCK, + cfg::switch_config_constants::DEFAULT_PORT_ID_RANGE_MIN(), + cfg::switch_config_constants::DEFAULT_PORT_ID_RANGE_MAX(), + 0, + 10, + 54); // Check default value auto switchSettingsV0 = utility::getFirstNodeIf(stateV0->getSwitchSettings()); @@ -414,6 +423,10 @@ TEST(SwitchSettingsTest, applyVoqSwitch) { sysPortRange.minimum() = 100; sysPortRange.maximum() = 200; switchInfo2.systemPortRange() = sysPortRange; + switchInfo2.systemPortRanges()->systemPortRanges()->push_back(sysPortRange); + switchInfo2.localSystemPortOffset() = *sysPortRange.minimum(); + switchInfo2.globalSystemPortOffset() = *sysPortRange.minimum(); + switchInfo2.inbandPortId() = kSingleStageInbandPortId; config.switchSettings()->switchIdToSwitchInfo() = { std::make_pair(kVoqSwitchIdBegin, switchInfo2)}; auto stateV2 = publishAndApplyConfig(stateV1, &config, platform.get()); From d38a6e0fd39995dfa1b4518cd2156e7d7669066c Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Mon, 28 Oct 2024 13:41:03 -0700 Subject: [PATCH 397/479] Populate sysPortRanges vector in DsfSubscriptionTests Summary: As titled Reviewed By: srikrishnagopu Differential Revision: D65042323 fbshipit-source-id: 66ff57399630ac8db442646040a7108c6e99037e --- fboss/agent/test/DsfSubscriptionTests.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/agent/test/DsfSubscriptionTests.cpp b/fboss/agent/test/DsfSubscriptionTests.cpp index b59ebf6e68d21..86735aaf428da 100644 --- a/fboss/agent/test/DsfSubscriptionTests.cpp +++ b/fboss/agent/test/DsfSubscriptionTests.cpp @@ -119,6 +119,7 @@ class DsfSubscriptionTest : public ::testing::Test { remoteSwitchId / kSwitchIdGap * kSysPortBlockSize; sysPortRange.maximum() = *sysPortRange.minimum() + kSysPortBlockSize; dsfNode.systemPortRange() = sysPortRange; + dsfNode.systemPortRanges()->systemPortRanges()->push_back(sysPortRange); dsfNode.loopbackIps() = {"::1/128", "169.254.0.1/24"}; config.dsfNodes()->insert(std::make_pair(remoteSwitchId, dsfNode)); } From 188efa1b8e3a98311aca2dbcf7346ea5ff3fc27c Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Mon, 28 Oct 2024 13:41:03 -0700 Subject: [PATCH 398/479] Use sysPortRanges vector when validating remote switch id updates Summary: As titled Reviewed By: srikrishnagopu Differential Revision: D65042348 fbshipit-source-id: 577a70d56519f951957ec0a2f9dd1dea82de014b --- fboss/agent/DsfUpdateValidator.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/fboss/agent/DsfUpdateValidator.cpp b/fboss/agent/DsfUpdateValidator.cpp index d07145fefcbad..9b5b3be380872 100644 --- a/fboss/agent/DsfUpdateValidator.cpp +++ b/fboss/agent/DsfUpdateValidator.cpp @@ -25,26 +25,29 @@ void DsfUpdateValidator::validate( " not found for : ", sysPort.getName()); } - auto sysPortRange = dsfNode->getSystemPortRange(); - if (!sysPortRange.has_value()) { + auto sysPortRanges = *dsfNode->getSystemPortRanges().systemPortRanges(); + if (sysPortRanges.empty()) { throw FbossError( "No system port range for node ", dsfNode->getName(), " corresponding to ", sysPort.getName()); } - if (sysPort.getID() < *sysPortRange->minimum() || - sysPort.getID() > *sysPortRange->maximum()) { + bool withinRange{false}; + for (const auto& sysPortRange : sysPortRanges) { + if (sysPort.getID() >= *sysPortRange.minimum() && + sysPort.getID() <= *sysPortRange.maximum()) { + withinRange = true; + break; + } + } + if (!withinRange) { throw FbossError( "Sys port : ", sysPort.getName(), " belonging to: ", sysPort.getSwitchId(), - " out of range: [", - *sysPortRange->minimum(), - ", ", - *sysPortRange->maximum(), - "]"); + " out of range"); } }; DeltaFunctions::forEachChanged( From 4e962c6ef6c26257a3d87cbcb8c66d57f475836c Mon Sep 17 00:00:00 2001 From: Facebook Community Bot Date: Mon, 28 Oct 2024 13:50:29 -0700 Subject: [PATCH 399/479] Re-sync with internal repository (#284) The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging. --- .../buck2-shims-meta/external_cell.buckconfig | 2 +- shim/.buckconfig | 38 - shim/.buckroot | 6 - shim/.gitignore | 12 - shim/BUCK | 75 - shim/CODE_OF_CONDUCT.md | 80 - shim/CONTRIBUTING.md | 31 - shim/LICENSE-APACHE | 201 - shim/LICENSE-MIT | 21 - shim/PACKAGE | 15 - shim/README.md | 18 - shim/antlir/fbpkg/fbpkg.bzl | 17 - shim/buck2/buck_rust_binary.bzl | 13 - shim/buck2/proto_defs.bzl | 13 - shim/build_defs/auto_headers.bzl | 36 - shim/build_defs/config.bzl | 13 - shim/build_defs/cpp_benchmark.bzl | 9 - shim/build_defs/cpp_binary.bzl | 10 - shim/build_defs/cpp_library.bzl | 10 - shim/build_defs/cpp_unittest.bzl | 10 - shim/build_defs/custom_rule.bzl | 9 - shim/build_defs/custom_unittest.bzl | 9 - shim/build_defs/cython_library.bzl | 11 - shim/build_defs/export_files.bzl | 15 - shim/build_defs/lib/oss.bzl | 236 -- shim/build_defs/lib/python_common.bzl | 14 - shim/build_defs/lib/test/BUCK | 10 - shim/build_defs/lib/test/oss.bzl | 73 - shim/build_defs/native_rules.bzl | 26 - shim/build_defs/ocaml_binary.bzl | 10 - shim/build_defs/platform_utils.bzl | 11 - shim/build_defs/prebuilt_cpp_library.bzl | 10 - shim/build_defs/python_binary.bzl | 12 - shim/build_defs/python_library.bzl | 12 - shim/build_defs/python_unittest.bzl | 12 - shim/build_defs/roar.bzl | 14 - shim/build_defs/rust_binary.bzl | 10 - shim/build_defs/rust_library.bzl | 10 - shim/build_defs/rust_linkable_symbol.bzl | 18 - shim/build_defs/rust_unittest.bzl | 10 - shim/cfg.bzl | 39 - shim/common/ocaml/interop/defs.bzl | 13 - shim/folly/io/async/test/certs/defs.bzl | 23 - shim/grpc_fb/codegen/buck_macros.bzl | 10 - shim/lib/dicts.bzl | 41 - shim/lib/paths.bzl | 242 -- shim/lib/shell.bzl | 63 - shim/opensource/macros/BUCK | 14 - .../macros/broken_in_oss/constraints/BUCK | 23 - shim/os/BUCK | 32 - shim/os/linux/distro/constraints/BUCK | 23 - shim/shims.bzl | 422 -- shim/target_determinator/macros/ci.bzl | 28 - shim/third-party/binutils/BUCK | 19 - shim/third-party/boost/BUCK | 32 - shim/third-party/boost/boost.bzl | 41 - shim/third-party/brotli/BUCK | 28 - shim/third-party/bzip2/BUCK | 35 - shim/third-party/defs.bzl | 157 - shim/third-party/double_conversion/BUCK | 20 - shim/third-party/fast_float/BUCK | 19 - shim/third-party/fmt/BUCK | 19 - shim/third-party/gflags/BUCK | 19 - shim/third-party/glibc/BUCK | 36 - shim/third-party/glog/BUCK | 23 - shim/third-party/googletest/BUCK | 35 - shim/third-party/googletest/gtest_main.cpp | 66 - shim/third-party/jemalloc/BUCK | 20 - shim/third-party/jvm/BUCK | 17 - shim/third-party/libaegis/BUCK | 30 - shim/third-party/libaio/BUCK | 20 - shim/third-party/libdwarf/BUCK | 35 - shim/third-party/libevent/BUCK | 19 - shim/third-party/libgcc/BUCK | 19 - shim/third-party/liboqs/BUCK | 30 - shim/third-party/libsodium/BUCK | 20 - shim/third-party/libunwind/BUCK | 20 - shim/third-party/liburing/BUCK | 20 - shim/third-party/lz4/BUCK | 20 - shim/third-party/macros/rust_third_party.bzl | 18 - shim/third-party/ocaml/BUCK | 14 - shim/third-party/ocaml/opam/lib/ocaml | 8 - shim/third-party/openssl/BUCK | 26 - shim/third-party/proto/BUCK | 28 - shim/third-party/proto/defs.bzl | 112 - shim/third-party/proto/releases.bzl | 53 - shim/third-party/proto/update.py | 115 - shim/third-party/python/BUCK | 20 - shim/third-party/range-v3/BUCK | 19 - shim/third-party/rust/.gitignore | 38 - shim/third-party/rust/Cargo.toml | 245 -- shim/third-party/rust/defs.bzl | 14 - .../third-party/rust/fixups/ahash/fixups.toml | 8 - .../rust/fixups/anyhow/fixups.toml | 8 - .../rust/fixups/async-trait/fixups.toml | 8 - .../rust/fixups/atomic/fixups.toml | 9 - .../rust/fixups/axum-core/fixups.toml | 8 - shim/third-party/rust/fixups/axum/fixups.toml | 8 - .../rust/fixups/backtrace/fixups.toml | 8 - .../rust/fixups/blake3/fixups.toml | 88 - .../rust/fixups/bumpalo/fixups.toml | 8 - .../rust/fixups/bzip2-sys/fixups.toml | 8 - shim/third-party/rust/fixups/clap/fixups.toml | 8 - .../rust/fixups/clap_builder/fixups.toml | 8 - .../rust/fixups/clap_derive/fixups.toml | 8 - .../fixups/core-foundation-sys/fixups.toml | 8 - .../rust/fixups/crc32fast/fixups.toml | 8 - .../rust/fixups/criterion/fixups.toml | 8 - .../rust/fixups/crossbeam-epoch/fixups.toml | 9 - .../rust/fixups/crossbeam-queue/fixups.toml | 9 - .../rust/fixups/crossbeam-utils/fixups.toml | 9 - .../rust/fixups/crunchy/fixups.toml | 9 - .../fixups/darwin-libproc-sys/fixups.toml | 8 - .../rust/fixups/debugserver-types/fixups.toml | 9 - .../rust/fixups/derive_more-impl/fixups.toml | 8 - .../rust/fixups/derive_more/fixups.toml | 8 - .../rust/fixups/erased-serde/fixups.toml | 8 - .../rust/fixups/fs-err/fixups.toml | 9 - shim/third-party/rust/fixups/fs4/fixups.toml | 8 - .../rust/fixups/futures-channel/fixups.toml | 9 - .../rust/fixups/futures-core/fixups.toml | 9 - .../rust/fixups/futures-task/fixups.toml | 9 - .../rust/fixups/futures-util/fixups.toml | 9 - .../rust/fixups/generic-array/fixups.toml | 8 - .../rust/fixups/getrandom/fixups.toml | 8 - .../rust/fixups/httparse/fixups.toml | 8 - .../third-party/rust/fixups/hyper/fixups.toml | 12 - .../rust/fixups/indexmap/fixups.toml | 9 - .../rust/fixups/io-lifetimes/fixups.toml | 8 - .../rust/fixups/jemalloc-sys/fixups.toml | 8 - .../rust/fixups/lalrpop/fixups.toml | 8 - .../rust/fixups/lexical-core/fixups.toml | 9 - shim/third-party/rust/fixups/libc/fixups.toml | 9 - shim/third-party/rust/fixups/libm/fixups.toml | 8 - .../rust/fixups/libsqlite3-sys/BUCK | 12 - .../rust/fixups/libsqlite3-sys/bindgen.rs | 3594 ----------------- .../rust/fixups/libsqlite3-sys/fixups.toml | 23 - .../rust/fixups/lock_api/fixups.toml | 10 - shim/third-party/rust/fixups/log/fixups.toml | 9 - .../rust/fixups/memchr/fixups.toml | 8 - .../rust/fixups/memoffset/fixups.toml | 8 - shim/third-party/rust/fixups/mio/fixups.toml | 8 - .../rust/fixups/native-tls/fixups.toml | 8 - shim/third-party/rust/fixups/nix/fixups.toml | 9 - shim/third-party/rust/fixups/nom/fixups.toml | 8 - .../third-party/rust/fixups/ntapi/fixups.toml | 8 - .../rust/fixups/num-bigint/fixups.toml | 12 - .../rust/fixups/num-integer/fixups.toml | 9 - .../rust/fixups/num-traits/fixups.toml | 9 - .../rust/fixups/oid-registry/fixups.toml | 14 - .../rust/fixups/parking_lot/fixups.toml | 9 - .../rust/fixups/parking_lot_core/fixups.toml | 9 - .../third-party/rust/fixups/paste/fixups.toml | 8 - shim/third-party/rust/fixups/pest/fixups.toml | 8 - .../fixups/pin-project-internal/fixups.toml | 8 - .../rust/fixups/platforms/fixups.toml | 33 - .../rust/fixups/prettyplease/fixups.toml | 9 - .../fixups/proc-macro-error-attr/fixups.toml | 8 - .../rust/fixups/proc-macro-error/fixups.toml | 8 - .../rust/fixups/proc-macro-hack/fixups.toml | 8 - .../rust/fixups/proc-macro2/fixups.toml | 9 - .../rust/fixups/prost-build/fixups.toml | 14 - .../rust/fixups/pulldown-cmark/fixups.toml | 8 - .../third-party/rust/fixups/quote/fixups.toml | 8 - .../rust/fixups/radium/fixups.toml | 8 - .../rust/fixups/rayon-core/fixups.toml | 8 - .../rust/fixups/ref-cast/fixups.toml | 8 - .../rust/fixups/reqwest/fixups.toml | 8 - shim/third-party/rust/fixups/ring/fixups.toml | 169 - .../ring_core_generated/prefix_symbols.h | 119 - .../ring_core_generated/prefix_symbols_asm.h | 236 -- .../prefix_symbols_nasm.inc | 236 -- .../rust/fixups/rustix/fixups.toml | 9 - .../rust/fixups/rustls/fixups.toml | 8 - .../rust/fixups/rustversion/fixups.toml | 9 - .../third-party/rust/fixups/serde/fixups.toml | 8 - .../rust/fixups/serde_derive/fixups.toml | 10 - .../rust/fixups/serde_json/fixups.toml | 9 - .../rust/fixups/signal-hook/fixups.toml | 8 - shim/third-party/rust/fixups/slab/fixups.toml | 8 - shim/third-party/rust/fixups/slog/fixups.toml | 8 - shim/third-party/rust/fixups/syn/fixups.toml | 8 - .../rust/fixups/sys-info/fixups.toml | 26 - .../rust/fixups/sysinfo/fixups.toml | 18 - .../rust/fixups/tempfile/fixups.toml | 9 - .../rust/fixups/terminfo/fixups.toml | 9 - .../rust/fixups/termwiz/fixups.toml | 9 - .../rust/fixups/test-case/fixups.toml | 8 - .../rust/fixups/thiserror/fixups.toml | 8 - .../rust/fixups/tiny-keccak/fixups.toml | 8 - .../rust/fixups/tokio-stream/fixups.toml | 9 - .../rust/fixups/tokio-util/fixups.toml | 8 - .../third-party/rust/fixups/tokio/fixups.toml | 15 - .../third-party/rust/fixups/tonic/fixups.toml | 8 - .../fixups/tracing-subscriber/fixups.toml | 9 - .../rust/fixups/trybuild/fixups.toml | 9 - .../rust/fixups/typenum/fixups.toml | 11 - .../rust/fixups/unicase/fixups.toml | 8 - .../winapi-x86_64-pc-windows-gnu/fixups.toml | 16 - .../rust/fixups/winapi/fixups.toml | 11 - .../rust/fixups/windows-targets/fixups.toml | 10 - .../windows_aarch64_gnullvm/fixups.toml | 15 - .../fixups/windows_x86_64_gnu/fixups.toml | 15 - .../fixups/windows_x86_64_gnullvm/fixups.toml | 15 - .../fixups/windows_x86_64_msvc/fixups.toml | 15 - .../rust/fixups/winreg/fixups.toml | 8 - .../rust/fixups/zerocopy/fixups.toml | 8 - .../rust/fixups/zstd-safe/fixups.toml | 8 - .../rust/fixups/zstd-sys/fixups.toml | 125 - shim/third-party/rust/reindeer.toml | 36 - shim/third-party/rust/top/main.rs | 8 - shim/third-party/snappy/BUCK | 20 - shim/third-party/xz/BUCK | 20 - shim/third-party/zlib/BUCK | 20 - shim/third-party/zstd/BUCK | 20 - .../build_defs/audit_dependencies_test.bzl | 10 - shim/tools/build_defs/buck2/is_buck2.bzl | 9 - shim/tools/build_defs/buckconfig.bzl | 16 - .../build_defs/default_platform_defs.bzl | 8 - shim/tools/build_defs/fb_native_wrapper.bzl | 8 - shim/tools/build_defs/glob_defs.bzl | 8 - .../executorch/kernels/optimized/lib_defs.bzl | 149 - .../optimized/op_registration_util.bzl | 138 - 223 files changed, 1 insertion(+), 9758 deletions(-) delete mode 100644 shim/.buckconfig delete mode 100644 shim/.buckroot delete mode 100644 shim/.gitignore delete mode 100644 shim/BUCK delete mode 100644 shim/CODE_OF_CONDUCT.md delete mode 100644 shim/CONTRIBUTING.md delete mode 100644 shim/LICENSE-APACHE delete mode 100644 shim/LICENSE-MIT delete mode 100644 shim/PACKAGE delete mode 100644 shim/README.md delete mode 100644 shim/antlir/fbpkg/fbpkg.bzl delete mode 100644 shim/buck2/buck_rust_binary.bzl delete mode 100644 shim/buck2/proto_defs.bzl delete mode 100644 shim/build_defs/auto_headers.bzl delete mode 100644 shim/build_defs/config.bzl delete mode 100644 shim/build_defs/cpp_benchmark.bzl delete mode 100644 shim/build_defs/cpp_binary.bzl delete mode 100644 shim/build_defs/cpp_library.bzl delete mode 100644 shim/build_defs/cpp_unittest.bzl delete mode 100644 shim/build_defs/custom_rule.bzl delete mode 100644 shim/build_defs/custom_unittest.bzl delete mode 100644 shim/build_defs/cython_library.bzl delete mode 100644 shim/build_defs/export_files.bzl delete mode 100644 shim/build_defs/lib/oss.bzl delete mode 100644 shim/build_defs/lib/python_common.bzl delete mode 100644 shim/build_defs/lib/test/BUCK delete mode 100644 shim/build_defs/lib/test/oss.bzl delete mode 100644 shim/build_defs/native_rules.bzl delete mode 100644 shim/build_defs/ocaml_binary.bzl delete mode 100644 shim/build_defs/platform_utils.bzl delete mode 100644 shim/build_defs/prebuilt_cpp_library.bzl delete mode 100644 shim/build_defs/python_binary.bzl delete mode 100644 shim/build_defs/python_library.bzl delete mode 100644 shim/build_defs/python_unittest.bzl delete mode 100644 shim/build_defs/roar.bzl delete mode 100644 shim/build_defs/rust_binary.bzl delete mode 100644 shim/build_defs/rust_library.bzl delete mode 100644 shim/build_defs/rust_linkable_symbol.bzl delete mode 100644 shim/build_defs/rust_unittest.bzl delete mode 100644 shim/cfg.bzl delete mode 100644 shim/common/ocaml/interop/defs.bzl delete mode 100644 shim/folly/io/async/test/certs/defs.bzl delete mode 100644 shim/grpc_fb/codegen/buck_macros.bzl delete mode 100644 shim/lib/dicts.bzl delete mode 100644 shim/lib/paths.bzl delete mode 100644 shim/lib/shell.bzl delete mode 100644 shim/opensource/macros/BUCK delete mode 100644 shim/opensource/macros/broken_in_oss/constraints/BUCK delete mode 100644 shim/os/BUCK delete mode 100644 shim/os/linux/distro/constraints/BUCK delete mode 100644 shim/shims.bzl delete mode 100644 shim/target_determinator/macros/ci.bzl delete mode 100644 shim/third-party/binutils/BUCK delete mode 100644 shim/third-party/boost/BUCK delete mode 100644 shim/third-party/boost/boost.bzl delete mode 100644 shim/third-party/brotli/BUCK delete mode 100644 shim/third-party/bzip2/BUCK delete mode 100644 shim/third-party/defs.bzl delete mode 100644 shim/third-party/double_conversion/BUCK delete mode 100644 shim/third-party/fast_float/BUCK delete mode 100644 shim/third-party/fmt/BUCK delete mode 100644 shim/third-party/gflags/BUCK delete mode 100644 shim/third-party/glibc/BUCK delete mode 100644 shim/third-party/glog/BUCK delete mode 100644 shim/third-party/googletest/BUCK delete mode 100644 shim/third-party/googletest/gtest_main.cpp delete mode 100644 shim/third-party/jemalloc/BUCK delete mode 100644 shim/third-party/jvm/BUCK delete mode 100644 shim/third-party/libaegis/BUCK delete mode 100644 shim/third-party/libaio/BUCK delete mode 100644 shim/third-party/libdwarf/BUCK delete mode 100644 shim/third-party/libevent/BUCK delete mode 100644 shim/third-party/libgcc/BUCK delete mode 100644 shim/third-party/liboqs/BUCK delete mode 100644 shim/third-party/libsodium/BUCK delete mode 100644 shim/third-party/libunwind/BUCK delete mode 100644 shim/third-party/liburing/BUCK delete mode 100644 shim/third-party/lz4/BUCK delete mode 100644 shim/third-party/macros/rust_third_party.bzl delete mode 100644 shim/third-party/ocaml/BUCK delete mode 100644 shim/third-party/ocaml/opam/lib/ocaml delete mode 100644 shim/third-party/openssl/BUCK delete mode 100644 shim/third-party/proto/BUCK delete mode 100644 shim/third-party/proto/defs.bzl delete mode 100644 shim/third-party/proto/releases.bzl delete mode 100755 shim/third-party/proto/update.py delete mode 100644 shim/third-party/python/BUCK delete mode 100644 shim/third-party/range-v3/BUCK delete mode 100644 shim/third-party/rust/.gitignore delete mode 100644 shim/third-party/rust/Cargo.toml delete mode 100644 shim/third-party/rust/defs.bzl delete mode 100644 shim/third-party/rust/fixups/ahash/fixups.toml delete mode 100644 shim/third-party/rust/fixups/anyhow/fixups.toml delete mode 100644 shim/third-party/rust/fixups/async-trait/fixups.toml delete mode 100644 shim/third-party/rust/fixups/atomic/fixups.toml delete mode 100644 shim/third-party/rust/fixups/axum-core/fixups.toml delete mode 100644 shim/third-party/rust/fixups/axum/fixups.toml delete mode 100644 shim/third-party/rust/fixups/backtrace/fixups.toml delete mode 100644 shim/third-party/rust/fixups/blake3/fixups.toml delete mode 100644 shim/third-party/rust/fixups/bumpalo/fixups.toml delete mode 100644 shim/third-party/rust/fixups/bzip2-sys/fixups.toml delete mode 100644 shim/third-party/rust/fixups/clap/fixups.toml delete mode 100644 shim/third-party/rust/fixups/clap_builder/fixups.toml delete mode 100644 shim/third-party/rust/fixups/clap_derive/fixups.toml delete mode 100644 shim/third-party/rust/fixups/core-foundation-sys/fixups.toml delete mode 100644 shim/third-party/rust/fixups/crc32fast/fixups.toml delete mode 100644 shim/third-party/rust/fixups/criterion/fixups.toml delete mode 100644 shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml delete mode 100644 shim/third-party/rust/fixups/crossbeam-queue/fixups.toml delete mode 100644 shim/third-party/rust/fixups/crossbeam-utils/fixups.toml delete mode 100644 shim/third-party/rust/fixups/crunchy/fixups.toml delete mode 100644 shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml delete mode 100644 shim/third-party/rust/fixups/debugserver-types/fixups.toml delete mode 100644 shim/third-party/rust/fixups/derive_more-impl/fixups.toml delete mode 100644 shim/third-party/rust/fixups/derive_more/fixups.toml delete mode 100644 shim/third-party/rust/fixups/erased-serde/fixups.toml delete mode 100644 shim/third-party/rust/fixups/fs-err/fixups.toml delete mode 100644 shim/third-party/rust/fixups/fs4/fixups.toml delete mode 100644 shim/third-party/rust/fixups/futures-channel/fixups.toml delete mode 100644 shim/third-party/rust/fixups/futures-core/fixups.toml delete mode 100644 shim/third-party/rust/fixups/futures-task/fixups.toml delete mode 100644 shim/third-party/rust/fixups/futures-util/fixups.toml delete mode 100644 shim/third-party/rust/fixups/generic-array/fixups.toml delete mode 100644 shim/third-party/rust/fixups/getrandom/fixups.toml delete mode 100644 shim/third-party/rust/fixups/httparse/fixups.toml delete mode 100644 shim/third-party/rust/fixups/hyper/fixups.toml delete mode 100644 shim/third-party/rust/fixups/indexmap/fixups.toml delete mode 100644 shim/third-party/rust/fixups/io-lifetimes/fixups.toml delete mode 100644 shim/third-party/rust/fixups/jemalloc-sys/fixups.toml delete mode 100644 shim/third-party/rust/fixups/lalrpop/fixups.toml delete mode 100644 shim/third-party/rust/fixups/lexical-core/fixups.toml delete mode 100644 shim/third-party/rust/fixups/libc/fixups.toml delete mode 100644 shim/third-party/rust/fixups/libm/fixups.toml delete mode 100644 shim/third-party/rust/fixups/libsqlite3-sys/BUCK delete mode 100644 shim/third-party/rust/fixups/libsqlite3-sys/bindgen.rs delete mode 100644 shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml delete mode 100644 shim/third-party/rust/fixups/lock_api/fixups.toml delete mode 100644 shim/third-party/rust/fixups/log/fixups.toml delete mode 100644 shim/third-party/rust/fixups/memchr/fixups.toml delete mode 100644 shim/third-party/rust/fixups/memoffset/fixups.toml delete mode 100644 shim/third-party/rust/fixups/mio/fixups.toml delete mode 100644 shim/third-party/rust/fixups/native-tls/fixups.toml delete mode 100644 shim/third-party/rust/fixups/nix/fixups.toml delete mode 100644 shim/third-party/rust/fixups/nom/fixups.toml delete mode 100644 shim/third-party/rust/fixups/ntapi/fixups.toml delete mode 100644 shim/third-party/rust/fixups/num-bigint/fixups.toml delete mode 100644 shim/third-party/rust/fixups/num-integer/fixups.toml delete mode 100644 shim/third-party/rust/fixups/num-traits/fixups.toml delete mode 100644 shim/third-party/rust/fixups/oid-registry/fixups.toml delete mode 100644 shim/third-party/rust/fixups/parking_lot/fixups.toml delete mode 100644 shim/third-party/rust/fixups/parking_lot_core/fixups.toml delete mode 100644 shim/third-party/rust/fixups/paste/fixups.toml delete mode 100644 shim/third-party/rust/fixups/pest/fixups.toml delete mode 100644 shim/third-party/rust/fixups/pin-project-internal/fixups.toml delete mode 100644 shim/third-party/rust/fixups/platforms/fixups.toml delete mode 100644 shim/third-party/rust/fixups/prettyplease/fixups.toml delete mode 100644 shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml delete mode 100644 shim/third-party/rust/fixups/proc-macro-error/fixups.toml delete mode 100644 shim/third-party/rust/fixups/proc-macro-hack/fixups.toml delete mode 100644 shim/third-party/rust/fixups/proc-macro2/fixups.toml delete mode 100644 shim/third-party/rust/fixups/prost-build/fixups.toml delete mode 100644 shim/third-party/rust/fixups/pulldown-cmark/fixups.toml delete mode 100644 shim/third-party/rust/fixups/quote/fixups.toml delete mode 100644 shim/third-party/rust/fixups/radium/fixups.toml delete mode 100644 shim/third-party/rust/fixups/rayon-core/fixups.toml delete mode 100644 shim/third-party/rust/fixups/ref-cast/fixups.toml delete mode 100644 shim/third-party/rust/fixups/reqwest/fixups.toml delete mode 100644 shim/third-party/rust/fixups/ring/fixups.toml delete mode 100644 shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols.h delete mode 100644 shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_asm.h delete mode 100644 shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_nasm.inc delete mode 100644 shim/third-party/rust/fixups/rustix/fixups.toml delete mode 100644 shim/third-party/rust/fixups/rustls/fixups.toml delete mode 100644 shim/third-party/rust/fixups/rustversion/fixups.toml delete mode 100644 shim/third-party/rust/fixups/serde/fixups.toml delete mode 100644 shim/third-party/rust/fixups/serde_derive/fixups.toml delete mode 100644 shim/third-party/rust/fixups/serde_json/fixups.toml delete mode 100644 shim/third-party/rust/fixups/signal-hook/fixups.toml delete mode 100644 shim/third-party/rust/fixups/slab/fixups.toml delete mode 100644 shim/third-party/rust/fixups/slog/fixups.toml delete mode 100644 shim/third-party/rust/fixups/syn/fixups.toml delete mode 100644 shim/third-party/rust/fixups/sys-info/fixups.toml delete mode 100644 shim/third-party/rust/fixups/sysinfo/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tempfile/fixups.toml delete mode 100644 shim/third-party/rust/fixups/terminfo/fixups.toml delete mode 100644 shim/third-party/rust/fixups/termwiz/fixups.toml delete mode 100644 shim/third-party/rust/fixups/test-case/fixups.toml delete mode 100644 shim/third-party/rust/fixups/thiserror/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tiny-keccak/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tokio-stream/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tokio-util/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tokio/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tonic/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tracing-subscriber/fixups.toml delete mode 100644 shim/third-party/rust/fixups/trybuild/fixups.toml delete mode 100644 shim/third-party/rust/fixups/typenum/fixups.toml delete mode 100644 shim/third-party/rust/fixups/unicase/fixups.toml delete mode 100644 shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml delete mode 100644 shim/third-party/rust/fixups/winapi/fixups.toml delete mode 100644 shim/third-party/rust/fixups/windows-targets/fixups.toml delete mode 100644 shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml delete mode 100644 shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml delete mode 100644 shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml delete mode 100644 shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml delete mode 100644 shim/third-party/rust/fixups/winreg/fixups.toml delete mode 100644 shim/third-party/rust/fixups/zerocopy/fixups.toml delete mode 100644 shim/third-party/rust/fixups/zstd-safe/fixups.toml delete mode 100644 shim/third-party/rust/fixups/zstd-sys/fixups.toml delete mode 100644 shim/third-party/rust/reindeer.toml delete mode 100644 shim/third-party/rust/top/main.rs delete mode 100644 shim/third-party/snappy/BUCK delete mode 100644 shim/third-party/xz/BUCK delete mode 100644 shim/third-party/zlib/BUCK delete mode 100644 shim/third-party/zstd/BUCK delete mode 100644 shim/tools/build_defs/audit_dependencies_test.bzl delete mode 100644 shim/tools/build_defs/buck2/is_buck2.bzl delete mode 100644 shim/tools/build_defs/buckconfig.bzl delete mode 100644 shim/tools/build_defs/default_platform_defs.bzl delete mode 100644 shim/tools/build_defs/fb_native_wrapper.bzl delete mode 100644 shim/tools/build_defs/glob_defs.bzl delete mode 100644 shim/xplat/executorch/kernels/optimized/lib_defs.bzl delete mode 100644 shim/xplat/executorch/kernels/optimized/op_registration_util.bzl diff --git a/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig b/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig index 2b69a911f8ef4..08fc9e13b0726 100644 --- a/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig +++ b/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig @@ -6,4 +6,4 @@ gh_facebook_buck2_shims_meta = git [external_cell_gh_facebook_buck2_shims_meta] git_origin = https://github.com/facebook/buck2-shims-meta.git -commit_hash = 971b2cb76e43b31983d868c6ccb9ee51c441f6e8 +commit_hash = 3d85b5b3eb9f06cdad2436a0a874dcd0181bf3f2 diff --git a/shim/.buckconfig b/shim/.buckconfig deleted file mode 100644 index d6f453f72b545..0000000000000 --- a/shim/.buckconfig +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[cells] -gh_facebook_buck2_shims_meta = . - -[cell_aliases] -root = gh_facebook_buck2_shims_meta - -# This is a duplicate of .buckconfig.d/common.buckconfig, but due to the way -# we vendor the shim directory, common.buckconfig won't show up in the -# vendored .buckconfig.d directory. -# When the shim cell is no longer vendored in individual projects, this -# duplication cam be removed. -[cells] -prelude = prelude -none = none - -[cell_aliases] -config = prelude -ovr_config = prelude -bazel_skylib = gh_facebook_buck2_shims_meta -buck = gh_facebook_buck2_shims_meta -fbcode = gh_facebook_buck2_shims_meta -fbcode_macros = gh_facebook_buck2_shims_meta -fbsource = gh_facebook_buck2_shims_meta -shim = gh_facebook_buck2_shims_meta -toolchains = gh_facebook_buck2_shims_meta - -[external_cells] -prelude = bundled - -[parser] -target_platform_detector_spec = target:root//...->prelude//platforms:default target:shim//...->prelude//platforms:default diff --git a/shim/.buckroot b/shim/.buckroot deleted file mode 100644 index a869e838b4c7c..0000000000000 --- a/shim/.buckroot +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. diff --git a/shim/.gitignore b/shim/.gitignore deleted file mode 100644 index ca95b0e4631fb..0000000000000 --- a/shim/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# We currently expect end users to run reindeer vendor themselves -# so mark these things as to ignore -/third-party/rust/.cargo/ -/third-party/rust/BUCK -/third-party/rust/vendor/ diff --git a/shim/BUCK b/shim/BUCK deleted file mode 100644 index 42230090524af..0000000000000 --- a/shim/BUCK +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//toolchains:cxx.bzl", "system_cxx_toolchain") -load("@prelude//toolchains:genrule.bzl", "system_genrule_toolchain") -load("@prelude//toolchains:go.bzl", "system_go_bootstrap_toolchain", "system_go_toolchain") -load("@prelude//toolchains:haskell.bzl", "system_haskell_toolchain") -load("@prelude//toolchains:ocaml.bzl", "system_ocaml_toolchain") -load("@prelude//toolchains:python.bzl", "system_python_bootstrap_toolchain", "system_python_toolchain") -load("@prelude//toolchains:remote_test_execution.bzl", "remote_test_execution_toolchain") -load("@prelude//toolchains:rust.bzl", "system_rust_toolchain") - -oncall("open_source") - -system_cxx_toolchain( - name = "cxx", - cxx_flags = ["-std=c++20"], - link_flags = select({ - "DEFAULT": [], - "prelude//os:linux": [ - "-latomic", - ], - }), - visibility = ["PUBLIC"], -) - -system_genrule_toolchain( - name = "genrule", - visibility = ["PUBLIC"], -) - -system_go_toolchain( - name = "go", - visibility = ["PUBLIC"], -) - -system_go_bootstrap_toolchain( - name = "go_bootstrap", - visibility = ["PUBLIC"], -) - -system_haskell_toolchain( - name = "haskell", - visibility = ["PUBLIC"], -) - -system_ocaml_toolchain( - name = "ocaml", - visibility = ["PUBLIC"], -) - -system_python_toolchain( - name = "python", - visibility = ["PUBLIC"], -) - -system_python_bootstrap_toolchain( - name = "python_bootstrap", - visibility = ["PUBLIC"], -) - -system_rust_toolchain( - name = "rust", - default_edition = "2021", - visibility = ["PUBLIC"], -) - -remote_test_execution_toolchain( - name = "remote_test_execution", - visibility = ["PUBLIC"], -) diff --git a/shim/CODE_OF_CONDUCT.md b/shim/CODE_OF_CONDUCT.md deleted file mode 100644 index 3232ed665566e..0000000000000 --- a/shim/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,80 +0,0 @@ -# Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to make participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or -advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic -address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a -professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies within all project spaces, and it also applies when -an individual is representing the project or its community in public spaces. -Examples of representing a project or community include using an official -project e-mail address, posting via an official social media account, or acting -as an appointed representative at an online or offline event. Representation of -a project may be further defined and clarified by project maintainers. - -This Code of Conduct also applies outside the project spaces when there is a -reasonable belief that an individual's behavior may have a negative impact on -the project or its community. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at . All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/shim/CONTRIBUTING.md b/shim/CONTRIBUTING.md deleted file mode 100644 index 541779c332e6a..0000000000000 --- a/shim/CONTRIBUTING.md +++ /dev/null @@ -1,31 +0,0 @@ -# Contributing -We want to make contributing to this project as easy and transparent as -possible. - -## Pull Requests -We actively welcome your pull requests. - -1. Fork the repo and create your branch from `main`. -2. If you've added code that should be tested, add tests. -3. If you've changed APIs, update the documentation. -4. Ensure the test suite passes. -5. Make sure your code lints. -6. If you haven't already, complete the Contributor License Agreement ("CLA"). - -## Contributor License Agreement ("CLA") -In order to accept your pull request, we need you to submit a CLA. You only need -to do this once to work on any of Facebook's open source projects. - -Complete your CLA here: - -## Issues -We use GitHub issues to track public bugs. Please ensure your description is -clear and has sufficient instructions to be able to reproduce the issue. - -Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe -disclosure of security bugs. In those cases, please go through the process -outlined on that page and do not file a public issue. - -## License -By contributing to this repo, you agree that your contributions will be licensed -under the LICENSE file in the root directory of this source tree. diff --git a/shim/LICENSE-APACHE b/shim/LICENSE-APACHE deleted file mode 100644 index b09cd7856d585..0000000000000 --- a/shim/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/shim/LICENSE-MIT b/shim/LICENSE-MIT deleted file mode 100644 index b93be90515ccd..0000000000000 --- a/shim/LICENSE-MIT +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Meta Platforms, Inc. and affiliates. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/shim/PACKAGE b/shim/PACKAGE deleted file mode 100644 index 782e6f913ff4e..0000000000000 --- a/shim/PACKAGE +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load(":cfg.bzl", "SHIM_ALIASES", "set_cfg_constructor", "get_shim_modifiers") -load("@prelude//cfg/modifier:set_cfg_modifiers.bzl", "set_cfg_modifiers") - -# Activate cfg modifiers from CLI / PACKAGE / targets -set_cfg_constructor(SHIM_ALIASES) - -modifiers = get_shim_modifiers() -set_cfg_modifiers(modifiers) diff --git a/shim/README.md b/shim/README.md deleted file mode 100644 index 72345d6ba0568..0000000000000 --- a/shim/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Buck2 Shims for Meta - -These files implement shims for Meta internal buck2 cells, macros, and targets. - -Via these shims, the buck2 experience when building Meta open source projects -should be nearly identical to the internal buck2 experience. - -## These shims are not recommended for non-Meta projects!!! - -Prefer to use [rules from the buck2 prelude](https://buck2.build/docs/prelude/globals/) -and the [buck2 build apis](https://buck2.build/docs/api/build/globals/) - -## License - -This source code is licensed under both the MIT license found in the -LICENSE-MIT file in the root directory of this source tree and the Apache -License, Version 2.0 found in the LICENSE-APACHE file in the root directory -of this source tree. diff --git a/shim/antlir/fbpkg/fbpkg.bzl b/shim/antlir/fbpkg/fbpkg.bzl deleted file mode 100644 index 21c0104326e78..0000000000000 --- a/shim/antlir/fbpkg/fbpkg.bzl +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def _builder(**_): - pass - -def _buck_opts(**_): - pass - -fbpkg = struct( - builder = _builder, - buck_opts = _buck_opts, -) diff --git a/shim/buck2/buck_rust_binary.bzl b/shim/buck2/buck_rust_binary.bzl deleted file mode 100644 index ebd00026216f0..0000000000000 --- a/shim/buck2/buck_rust_binary.bzl +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load( - "@shim//:shims.bzl", - _rust_binary = "rust_binary", -) - -buck_rust_binary = _rust_binary diff --git a/shim/buck2/proto_defs.bzl b/shim/buck2/proto_defs.bzl deleted file mode 100644 index 468a3be310fc6..0000000000000 --- a/shim/buck2/proto_defs.bzl +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load( - "@shim//:shims.bzl", - _rust_protobuf_library = "rust_protobuf_library", -) - -rust_protobuf_library = _rust_protobuf_library diff --git a/shim/build_defs/auto_headers.bzl b/shim/build_defs/auto_headers.bzl deleted file mode 100644 index 3c1324a6eea8a..0000000000000 --- a/shim/build_defs/auto_headers.bzl +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//utils:buckconfig.bzl", "read_choice") - -AutoHeaders = struct( - NONE = "none", - # Infer headers from sources of the rule. - SOURCES = "sources", -) - -_VALUES = [ - AutoHeaders.NONE, - AutoHeaders.SOURCES, -] - -def get_auto_headers(auto_headers): - """ - Returns the level of auto-headers to apply to a rule. - - Args: - auto_headers: One of the values in `AutoHeaders` - - Returns: - The value passed in as auto_headers, or the value from configuration if - `auto_headers` is None - """ - if auto_headers != None: - if auto_headers not in _VALUES: - fail("unexpected `auto_headers` value: {!r}".format(auto_headers)) - return auto_headers - return read_choice("cxx", "auto_headers", _VALUES, AutoHeaders.SOURCES) diff --git a/shim/build_defs/config.bzl b/shim/build_defs/config.bzl deleted file mode 100644 index cddd1a978905d..0000000000000 --- a/shim/build_defs/config.bzl +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def _get_build_mode(): - return "" - -config = struct( - get_build_mode = _get_build_mode, -) diff --git a/shim/build_defs/cpp_benchmark.bzl b/shim/build_defs/cpp_benchmark.bzl deleted file mode 100644 index 928f62d2c555e..0000000000000 --- a/shim/build_defs/cpp_benchmark.bzl +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def cpp_benchmark(**_): - pass diff --git a/shim/build_defs/cpp_binary.bzl b/shim/build_defs/cpp_binary.bzl deleted file mode 100644 index 89bf161e7b23b..0000000000000 --- a/shim/build_defs/cpp_binary.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _cpp_binary = "cpp_binary") - -cpp_binary = _cpp_binary diff --git a/shim/build_defs/cpp_library.bzl b/shim/build_defs/cpp_library.bzl deleted file mode 100644 index d69787b947c83..0000000000000 --- a/shim/build_defs/cpp_library.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _cpp_library = "cpp_library") - -cpp_library = _cpp_library diff --git a/shim/build_defs/cpp_unittest.bzl b/shim/build_defs/cpp_unittest.bzl deleted file mode 100644 index 2c4103ebd8bb6..0000000000000 --- a/shim/build_defs/cpp_unittest.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _cpp_unittest = "cpp_unittest") - -cpp_unittest = _cpp_unittest diff --git a/shim/build_defs/custom_rule.bzl b/shim/build_defs/custom_rule.bzl deleted file mode 100644 index 03aac5904f5ca..0000000000000 --- a/shim/build_defs/custom_rule.bzl +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def custom_rule(**_): - pass diff --git a/shim/build_defs/custom_unittest.bzl b/shim/build_defs/custom_unittest.bzl deleted file mode 100644 index f5aa4cf8f06e5..0000000000000 --- a/shim/build_defs/custom_unittest.bzl +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def custom_unittest(**_): - pass diff --git a/shim/build_defs/cython_library.bzl b/shim/build_defs/cython_library.bzl deleted file mode 100644 index dac5b8bcae441..0000000000000 --- a/shim/build_defs/cython_library.bzl +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//build_defs:python_library.bzl", "python_library") - -def cython_library(name, visibility = ["PUBLIC"], **_): - python_library(name = name, visibility = visibility) diff --git a/shim/build_defs/export_files.bzl b/shim/build_defs/export_files.bzl deleted file mode 100644 index 25ae03f6288e3..0000000000000 --- a/shim/build_defs/export_files.bzl +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def export_file(visibility = ["PUBLIC"], **kwargs): - # @lint-ignore BUCKLINT: avoid "native is forbidden in fbcode" - native.export_file(visibility = visibility, **kwargs) - -def export_files(files, visibility = ["PUBLIC"], **kwargs): - # @lint-ignore BUCKLINT: avoid "native is forbidden in fbcode" - for file in files: - native.export_file(name = file, visibility = visibility, **kwargs) diff --git a/shim/build_defs/lib/oss.bzl b/shim/build_defs/lib/oss.bzl deleted file mode 100644 index 9e386e2ab4923..0000000000000 --- a/shim/build_defs/lib/oss.bzl +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def _filter_empty_strings(string_list): - return filter(lambda d: d != "", string_list) - -def _parse_prefix_mappings(raw_rules): - rules = [] - for raw_rule in raw_rules: - (match, replace) = raw_rule.split("->", 1) - - (cell, root_dir) = match.split("//") - match = struct(cell = cell, root_dir = root_dir) - - (cell, root_dir) = replace.split("//") - replace = struct(cell = cell, root_dir = root_dir) - - rules.append(struct(match = match, replace = replace)) - - return rules - -def _strip_third_party_rust_version(target: str) -> str: - # When upgrading libraries we either suffix them as `-old` or with a version, e.g. `-1-08` - # Strip those so we grab the right one in open source. - if target.endswith(":md-5"): # md-5 is the one exception - return target - xs = target.split("-") - for i in reversed(range(len(xs))): - s = xs[i] - if s == "old" or s.isdigit(): - xs.pop(i) - else: - break - return "-".join(xs) - -# Cell the BUCK file being processed belongs to -ACTIVE_CELL = native.get_cell_name() - -# The root cell of this project, extracted from the "root" alias. -# Targets that explicitly reference this cell will not be rewritten, and -# targets that do not end up referencing a cell will be replaced with targets -# that reference this cell -ROOT_CELL = read_config("cell_aliases", "root", "root") - -# The cell this file and the rest of the shim directory belong to, generally -# "shim" and does not need to be set. -SHIM_CELL = read_config("oss", "shim_cell", "shim") - -# The internal cell this project originally belonged to. -# -# When applying rewrites, the cell of the target is often considered. Targets -# that do not explicitly specify a cell (eg: "//foo:bar") will be considered -# to belong to INTERNAL_CELL. -INTERNAL_CELL = read_config("oss", "internal_cell", "fbcode") - -# There can be situations where a target specifies a cell explicitly and the -# path is part of the local checkout, rather than potentially needing to be -# shimmed. In this case, we want to rewrite the target to use the root cell. -# -# If a target's cell is unspecified or matches the internal cell, and the path -# starts with an entry in this list, The cell replaced with the ROOT_CELL. -# -# Entries are separated by spaces, and evaluated in order. Once a match is -# found, the rewrite is complete and the following entries will not be -# evaluated. -# -# Examples: -# internal_cell//oss_project/foo:bar -> root//oss_project/foo:bar -PROJECT_DIRS = _filter_empty_strings(read_config("oss", "project_dirs", "").split(" ")) - -# There are some situations where prefix of the internal directory structure is -# removed from the public filepaths, such as rewriting "internal/foo/bar/baz" -# to "oss/baz". When this happens, the BUCK files are not converted to reflect -# the public directory structure, and targets need to be rewritten to account -# for the discrepancy. -# -# Entries behave similarly to PROJECT_DIRS, except that the root directory will -# also be removed from the path in the rewritten target. This setting is -# applied after PROJECT_DIRS. -# -# Entries are separated by spaces and evaluated in order. Once a match is -# found, the rewrite is complete and the following entries will not be -# evaluated. -# -# Examples: -# //oss_project/foo:bar -> root//foo:bar -# internal_cell//oss_project/foo:bar -> root//foo:bar -STRIPPED_ROOT_DIRS = _filter_empty_strings(read_config("oss", "stripped_root_dirs", "").split(" ")) - -# Internally, most code shares the same cell in a monorepo, but public projects -# only contain a subset, importing dependencies via git submodules or other -# mechanisms. When this happens, the dependency may end up in a different -# filepath, or may have it's own buck2 configuration and should be treated as -# an on disk external cell. -# -# If the target's cell is a match (or if unspecified, INTERNAL_CELL is a -# match),unspecified) matches, and the target's path is within the root -# directory, both the cell and root directory prefix are replaced with the new -# values. -# -# Entries are in the form of "MATCH->REPLACEMENT". Both MATCH and replacement -# shall be in the format of "CELL//DIR_PREFIX". -# -# Entries are separated by spaces and evaluated in order. Once a match is -# found, the rewrite is complete and the following entries will not be -# evaluated. -# -# Examples: -# internal//foo->foo//foo; internal//foo/bar:baz -> foo//foo/bar:baz -PREFIX_MAPPINGS = _parse_prefix_mappings( - _filter_empty_strings(read_config("oss", "prefix_mappings", "").split(" ")), -) - -# Hardcoded rewrite rules that apply to many projects and only produce targets -# within the shim cell. They are applied after the rules from .buckconfig, and -# will not be applied if any other rules match. -IMPLICIT_REWRITE_RULES = { - "fbcode": struct( - exact = { - "common/rust/shed/fbinit:fbinit": "third-party/rust:fbinit", - "common/rust/shed/sorted_vector_map:sorted_vector_map": "third-party/rust:sorted_vector_map", - "watchman/rust/watchman_client:watchman_client": "third-party/rust:watchman_client", - }, - dirs = [ - ("third-party-buck/platform010/build/supercaml", "third-party/ocaml"), - ("third-party-buck/platform010/build", "third-party"), - ], - ), - "fbsource": struct( - dirs = [ - ("third-party", "third-party"), - ], - dynamic = [ - ("third-party/rust", _strip_third_party_rust_version), - ], - ), - "third-party": struct( - dirs = [ - ("", "third-party"), - ], - dynamic = [ - ("rust", lambda path: "third-party/" + _strip_third_party_rust_version(path)), - ], - ), -} - -DEFAULT_REWRITE_CTX = struct( - cells = struct( - active = ACTIVE_CELL, - root = ROOT_CELL, - shim = SHIM_CELL, - internal = INTERNAL_CELL, - ), - project_dirs = PROJECT_DIRS, - stripped_root_dirs = STRIPPED_ROOT_DIRS, - prefix_mappings = PREFIX_MAPPINGS, - implicit_rewrite_rules = IMPLICIT_REWRITE_RULES, -) - -""" -Rewrite an internal target string to one that is compatible with this OSS -project. - -Some example use cases for this: -- Map dependency targets to shim targets in this dir -- Handle mismatching buck roots between internal and oss - (eg: internal/oss-project/... is exposed externally as oss-project/...) -- Handle submodules that result in filepaths that do not match internal - (eg: internal/my_library/... and oss-project/my_library/my_library/...) -""" - -def translate_target( - target: str, - ctx = DEFAULT_REWRITE_CTX) -> str: - if "//" not in target: - # This is a local target, aka ":foo". Don't touch - return target - - (cell, path) = target.split("//", 1) - - if cell == ctx.cells.root: - # This cell is explicitly root. Don't touch - return target - - resolved_cell = ctx.cells.active if cell == "" else cell - internal_cell = ctx.cells.internal if resolved_cell == ctx.cells.root else resolved_cell - - if internal_cell == ctx.cells.internal: - for d in ctx.project_dirs: - if _path_rooted_in_dir(path, d): - return ctx.cells.root + "//" + path - - for d in ctx.stripped_root_dirs: - if _path_rooted_in_dir(path, d): - return ctx.cells.root + "//" + _strip_root_dir_from_path(path, d) - - for rule in ctx.prefix_mappings: - if internal_cell == rule.match.cell and _path_rooted_in_dir(path, rule.match.root_dir): - return rule.replace.cell + "//" + _swap_root_dir_for_path(path, rule.match.root_dir, rule.replace.root_dir) - - rules = ctx.implicit_rewrite_rules.get(internal_cell) - - if rules == None: - # No implicit rewrite rules - return target - - exact = getattr(rules, "exact", {}).get(path) - if exact != None: - return ctx.cells.shim + "//" + exact - - for (match_root_dir, replace_root_dir) in getattr(rules, "dirs", []): - if _path_rooted_in_dir(path, match_root_dir): - return ctx.cells.shim + "//" + _swap_root_dir_for_path(path, match_root_dir, replace_root_dir) - - for (match_root_dir, fn) in getattr(rules, "dynamic", []): - if _path_rooted_in_dir(path, match_root_dir): - return ctx.cells.shim + "//" + fn(path) - - return target - -def _path_rooted_in_dir(path: str, d: str) -> bool: - return d == "" or path == d or path.startswith(d + "/") or path.startswith(d + ":") - -def _strip_root_dir_from_path(path: str, d: str) -> str: - return path.removeprefix(d).removeprefix("/") - -def _swap_root_dir_for_path(path: str, root_dir: str, new_root_dir) -> str: - suffix = _strip_root_dir_from_path(path, root_dir) - if not suffix.startswith(":"): - suffix = "/" + suffix - replace_path = new_root_dir.removesuffix("/") + suffix - return replace_path.removeprefix("/") diff --git a/shim/build_defs/lib/python_common.bzl b/shim/build_defs/lib/python_common.bzl deleted file mode 100644 index 44dc7574685a6..0000000000000 --- a/shim/build_defs/lib/python_common.bzl +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def get_ldflags(*args): - _unused = args # @unused - return [] - -def get_strip_mode(*args): - _unused = args # @unused - return "" diff --git a/shim/build_defs/lib/test/BUCK b/shim/build_defs/lib/test/BUCK deleted file mode 100644 index a2f6ef3a1c64a..0000000000000 --- a/shim/build_defs/lib/test/BUCK +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//build_defs/lib/test:oss.bzl", "test_translate_target") - -test_translate_target() diff --git a/shim/build_defs/lib/test/oss.bzl b/shim/build_defs/lib/test/oss.bzl deleted file mode 100644 index edae83732a032..0000000000000 --- a/shim/build_defs/lib/test/oss.bzl +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//build_defs/lib:oss.bzl", "translate_target") - -TEST_CTX = struct( - cells = struct( - active = "root", - root = "root", - shim = "shim", - internal = "internal", - ), - project_dirs = ["project"], - stripped_root_dirs = ["root_dir"], - prefix_mappings = [ - struct( - match = struct(cell = "internal", root_dir = "dep"), - replace = struct(cell = "dep", root_dir = "dep_rename"), - ), - ], - implicit_rewrite_rules = { - "internal": struct( - exact = { - "exact:exact": "foo/shimmed:exact", - }, - dirs = [ - ("third-party", "third_party"), - ], - dynamic = [ - ("dynamic", lambda path: path.upper()), - ], - ), - }, -) - -def _test_target(target: str, expected: str): - actual = translate_target(target, TEST_CTX) - - if actual != expected: - fail("Expected {} == {}".format(actual, expected)) - -def test_translate_target(): - _test_target("//:foo", "//:foo") - _test_target("root//:foo", "root//:foo") - _test_target("other//:foo", "other//:foo") - - _test_target("//project/foo:bar", "root//project/foo:bar") - _test_target("internal//project/foo:bar", "root//project/foo:bar") - _test_target("internal//project2/foo:bar", "internal//project2/foo:bar") - - _test_target("//root_dir/foo:bar", "root//foo:bar") - _test_target("//root_dir/with/subdir/foo:bar", "root//with/subdir/foo:bar") - _test_target("internal//root_dir/foo:bar", "root//foo:bar") - - _test_target("//dep:foo", "dep//dep_rename:foo") - _test_target("//dep/with/subdir:foo", "dep//dep_rename/with/subdir:foo") - _test_target("internal//dep:foo", "dep//dep_rename:foo") - _test_target("other//dep:foo", "other//dep:foo") - - _test_target("//exact:exact", "shim//foo/shimmed:exact") - _test_target("internal//exact:exact", "shim//foo/shimmed:exact") - _test_target("other//exact:exact", "other//exact:exact") - - _test_target("//third-party/lib/foo:bar", "shim//third_party/lib/foo:bar") - _test_target("internal//third-party/lib/foo:bar", "shim//third_party/lib/foo:bar") - - _test_target("//dynamic:foo", "shim//DYNAMIC:FOO") - _test_target("internal//dynamic:foo", "shim//DYNAMIC:FOO") - _test_target("other//dynamic:foo", "other//dynamic:foo") diff --git a/shim/build_defs/native_rules.bzl b/shim/build_defs/native_rules.bzl deleted file mode 100644 index a3e3a7039b0f3..0000000000000 --- a/shim/build_defs/native_rules.bzl +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def buck_genrule(visibility = ["PUBLIC"], **kwargs): - # @lint-ignore BUCKLINT: avoid "native is forbidden in fbcode" - native.genrule(visibility = visibility, **kwargs) - -def buck_command_alias(**_): - pass - -def buck_filegroup(visibility = ["PUBLIC"], **kwargs): - # @lint-ignore BUCKLINT: avoid "native is forbidden in fbcode" - native.filegroup(visibility = visibility, **kwargs) - -def alias(actual, visibility = ["PUBLIC"], **kwargs): - if actual.startswith("//buck2/"): - actual = "root//" + actual.removeprefix("//buck2/") - native.alias(actual = actual, visibility = visibility, **kwargs) - -def buck_sh_binary(visibility = ["PUBLIC"], **kwargs): - # @lint-ignore BUCKLINT: avoid "native is forbidden in fbcode" - native.sh_binary(visibility = visibility, **kwargs) diff --git a/shim/build_defs/ocaml_binary.bzl b/shim/build_defs/ocaml_binary.bzl deleted file mode 100644 index 1530848e3dbe5..0000000000000 --- a/shim/build_defs/ocaml_binary.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _ocaml_binary = "ocaml_binary") - -ocaml_binary = _ocaml_binary diff --git a/shim/build_defs/platform_utils.bzl b/shim/build_defs/platform_utils.bzl deleted file mode 100644 index 2ea71572f9657..0000000000000 --- a/shim/build_defs/platform_utils.bzl +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def _get_cxx_platform_for_base_path(_base_path): - return struct(target_platform = None) - -platform_utils = struct(get_cxx_platform_for_base_path = _get_cxx_platform_for_base_path) diff --git a/shim/build_defs/prebuilt_cpp_library.bzl b/shim/build_defs/prebuilt_cpp_library.bzl deleted file mode 100644 index 97a0d8cf2e9a8..0000000000000 --- a/shim/build_defs/prebuilt_cpp_library.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _prebuilt_cpp_library = "prebuilt_cpp_library") - -prebuilt_cpp_library = _prebuilt_cpp_library diff --git a/shim/build_defs/python_binary.bzl b/shim/build_defs/python_binary.bzl deleted file mode 100644 index 5805fc30bd256..0000000000000 --- a/shim/build_defs/python_binary.bzl +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def python_binary(srcs = [], **kwargs): - _unused = srcs # @unused - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.python_binary(**kwargs) diff --git a/shim/build_defs/python_library.bzl b/shim/build_defs/python_library.bzl deleted file mode 100644 index 3e62a5e9105ce..0000000000000 --- a/shim/build_defs/python_library.bzl +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def python_library(srcs = [], visibility = ["PUBLIC"], **kwargs): - _unused = srcs # @unused - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.python_library(visibility = visibility, **kwargs) diff --git a/shim/build_defs/python_unittest.bzl b/shim/build_defs/python_unittest.bzl deleted file mode 100644 index 76bc3589b2ba0..0000000000000 --- a/shim/build_defs/python_unittest.bzl +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def python_unittest(srcs = [], **kwargs): - _unused = srcs # @unused - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.python_test(**kwargs) diff --git a/shim/build_defs/roar.bzl b/shim/build_defs/roar.bzl deleted file mode 100644 index 0af590c1330c6..0000000000000 --- a/shim/build_defs/roar.bzl +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@fbsource//tools/build_defs:buckconfig.bzl", "read_bool") - -def roar_no_jit(): - use_roar_jit = read_bool("fbcode", "use_roar_jit", required = False) - if use_roar_jit: - return ["-fforce-no-jit"] - return [] diff --git a/shim/build_defs/rust_binary.bzl b/shim/build_defs/rust_binary.bzl deleted file mode 100644 index d763f446cb534..0000000000000 --- a/shim/build_defs/rust_binary.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _rust_binary = "rust_binary") - -rust_binary = _rust_binary diff --git a/shim/build_defs/rust_library.bzl b/shim/build_defs/rust_library.bzl deleted file mode 100644 index fcd27bcf803d4..0000000000000 --- a/shim/build_defs/rust_library.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _rust_library = "rust_library") - -rust_library = _rust_library diff --git a/shim/build_defs/rust_linkable_symbol.bzl b/shim/build_defs/rust_linkable_symbol.bzl deleted file mode 100644 index c29faa3968f14..0000000000000 --- a/shim/build_defs/rust_linkable_symbol.bzl +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//rust:linkable_symbol.bzl", prelude_rust_linkable_symbol = "rust_linkable_symbol") -load("@shim//:shims.bzl", _rust_library = "rust_library") - -def rust_linkable_symbol( - visibility = ["PUBLIC"], - **kwargs): - prelude_rust_linkable_symbol( - visibility = visibility, - rust_library_macro = _rust_library, - **kwargs - ) diff --git a/shim/build_defs/rust_unittest.bzl b/shim/build_defs/rust_unittest.bzl deleted file mode 100644 index 8b0822fa8233d..0000000000000 --- a/shim/build_defs/rust_unittest.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _rust_unittest = "rust_unittest") - -rust_unittest = _rust_unittest diff --git a/shim/cfg.bzl b/shim/cfg.bzl deleted file mode 100644 index 9b63ae110f292..0000000000000 --- a/shim/cfg.bzl +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//cfg/modifier:cfg_constructor.bzl?v2_only", "cfg_constructor_post_constraint_analysis", "cfg_constructor_pre_constraint_analysis") -load("@prelude//cfg/modifier:common.bzl?v2_only", "MODIFIER_METADATA_KEY") - -SHIM_ALIASES = { - "fedora": "shim//os/linux/distro/constraints:fedora", - "ubuntu": "shim//os/linux/distro/constraints:ubuntu", -} - -def set_cfg_constructor(aliases = dict()): - project_root_cell = read_root_config("cell_aliases", "root") - current_root_cell = read_config("cell_aliases", "root") - if project_root_cell == current_root_cell: - native.set_cfg_constructor( - stage0 = cfg_constructor_pre_constraint_analysis, - stage1 = cfg_constructor_post_constraint_analysis, - key = MODIFIER_METADATA_KEY, - aliases = struct(**aliases), - extra_data = struct(), - ) - -def get_shim_modifiers(): - modifiers = [] - - linux_distro = read_config("linux", "distro") - - if linux_distro: - modifiers.append("shim//os/linux/distro/constraints:{}".format(linux_distro)) - - known_broken = read_config("oss", "known_broken", "disable") - modifiers.append("shim//opensource/macros/broken_in_oss/constraints:{}".format(known_broken)) - - return modifiers diff --git a/shim/common/ocaml/interop/defs.bzl b/shim/common/ocaml/interop/defs.bzl deleted file mode 100644 index 18e488e23d29f..0000000000000 --- a/shim/common/ocaml/interop/defs.bzl +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# Try to keep in sync with all the client projects, like hack -RUST_FLAGS_2018 = [ - "-Drust-2018-idioms", - "-Dwarnings", - "-Dunused-crate-dependencies", -] diff --git a/shim/folly/io/async/test/certs/defs.bzl b/shim/folly/io/async/test/certs/defs.bzl deleted file mode 100644 index 1a645059e25c4..0000000000000 --- a/shim/folly/io/async/test/certs/defs.bzl +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@fbcode_macros//build_defs:native_rules.bzl", "alias") - -def alias_pem(pems: list[str]): - for pem in pems: - alias( - name = pem, - actual = "//folly/io/async/test/certs:{pem}".format(pem = pem), - ) - -def alias_pem_for_xplat(pems: list[str]): - # in xplat these pem files are exported in //xplat/folly/io/async/test - for pem in pems: - alias( - name = pem, - actual = "//xplat/folly/io/async/test:certs/{pem}".format(pem = pem), - ) diff --git a/shim/grpc_fb/codegen/buck_macros.bzl b/shim/grpc_fb/codegen/buck_macros.bzl deleted file mode 100644 index ed51cb6935505..0000000000000 --- a/shim/grpc_fb/codegen/buck_macros.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def grpc_library(**kwargs): - _unused = kwargs # @unused - pass diff --git a/shim/lib/dicts.bzl b/shim/lib/dicts.bzl deleted file mode 100644 index f702fa92c59e6..0000000000000 --- a/shim/lib/dicts.bzl +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Skylib module containing functions that operate on dictionaries.""" - -def _add(*dictionaries): - """Returns a new `dict` that has all the entries of the given dictionaries. - - If the same key is present in more than one of the input dictionaries, the - last of them in the argument list overrides any earlier ones. - - This function is designed to take zero or one arguments as well as multiple - dictionaries, so that it follows arithmetic identities and callers can avoid - special cases for their inputs: the sum of zero dictionaries is the empty - dictionary, and the sum of a single dictionary is a copy of itself. - - Args: - *dictionaries: Zero or more dictionaries to be added. - - Returns: - A new `dict` that has all the entries of the given dictionaries. - """ - result = {} - for d in dictionaries: - result.update(d) - return result - -dicts = struct( - add = _add, -) diff --git a/shim/lib/paths.bzl b/shim/lib/paths.bzl deleted file mode 100644 index 8e3fcaea5161e..0000000000000 --- a/shim/lib/paths.bzl +++ /dev/null @@ -1,242 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Skylib module containing file path manipulation functions. - -NOTE: The functions in this module currently only support paths with Unix-style -path separators (forward slash, "/"); they do not handle Windows-style paths -with backslash separators or drive letters. -""" - -def _basename(p): - """Returns the basename (i.e., the file portion) of a path. - - Note that if `p` ends with a slash, this function returns an empty string. - This matches the behavior of Python's `os.path.basename`, but differs from - the Unix `basename` command (which would return the path segment preceding - the final slash). - - Args: - p: The path whose basename should be returned. - - Returns: - The basename of the path, which includes the extension. - """ - return p.rpartition("/")[-1] - -def _dirname(p): - """Returns the dirname of a path. - - The dirname is the portion of `p` up to but not including the file portion - (i.e., the basename). Any slashes immediately preceding the basename are not - included, unless omitting them would make the dirname empty. - - Args: - p: The path whose dirname should be returned. - - Returns: - The dirname of the path. - """ - prefix, sep, _ = p.rpartition("/") - if not prefix: - return sep - else: - # If there are multiple consecutive slashes, strip them all out as Python's - # os.path.dirname does. - return prefix.rstrip("/") - -def _is_absolute(path): - """Returns `True` if `path` is an absolute path. - - Args: - path: A path (which is a string). - - Returns: - `True` if `path` is an absolute path. - """ - return path.startswith("/") or (len(path) > 2 and path[1] == ":") - -def _join(path, *others): - """Joins one or more path components intelligently. - - This function mimics the behavior of Python's `os.path.join` function on POSIX - platform. It returns the concatenation of `path` and any members of `others`, - inserting directory separators before each component except the first. The - separator is not inserted if the path up until that point is either empty or - already ends in a separator. - - If any component is an absolute path, all previous components are discarded. - - Args: - path: A path segment. - *others: Additional path segments. - - Returns: - A string containing the joined paths. - """ - result = path - - for p in others: - if _is_absolute(p): - result = p - elif not result or result.endswith("/"): - result += p - else: - result += "/" + p - - return result - -def _normalize(path): - """Normalizes a path, eliminating double slashes and other redundant segments. - - This function mimics the behavior of Python's `os.path.normpath` function on - POSIX platforms; specifically: - - - If the entire path is empty, "." is returned. - - All "." segments are removed, unless the path consists solely of a single - "." segment. - - Trailing slashes are removed, unless the path consists solely of slashes. - - ".." segments are removed as long as there are corresponding segments - earlier in the path to remove; otherwise, they are retained as leading ".." - segments. - - Single and double leading slashes are preserved, but three or more leading - slashes are collapsed into a single leading slash. - - Multiple adjacent internal slashes are collapsed into a single slash. - - Args: - path: A path. - - Returns: - The normalized path. - """ - if not path: - return "." - - if path.startswith("//") and not path.startswith("///"): - initial_slashes = 2 - elif path.startswith("/"): - initial_slashes = 1 - else: - initial_slashes = 0 - is_relative = (initial_slashes == 0) - - components = path.split("/") - new_components = [] - - for component in components: - if component in ("", "."): - continue - if component == "..": - if new_components and new_components[-1] != "..": - # Only pop the last segment if it isn't another "..". - new_components.pop() - elif is_relative: - # Preserve leading ".." segments for relative paths. - new_components.append(component) - else: - new_components.append(component) - - path = "/".join(new_components) - if not is_relative: - path = ("/" * initial_slashes) + path - - return path or "." - -def _relativize(path, start): - """Returns the portion of `path` that is relative to `start`. - - Because we do not have access to the underlying file system, this - implementation differs slightly from Python's `os.path.relpath` in that it - will fail if `path` is not beneath `start` (rather than use parent segments to - walk up to the common file system root). - - Relativizing paths that start with parent directory references only works if - the path both start with the same initial parent references. - - Args: - path: The path to relativize. - start: The ancestor path against which to relativize. - - Returns: - The portion of `path` that is relative to `start`. - """ - segments = _normalize(path).split("/") - start_segments = _normalize(start).split("/") - if start_segments == ["."]: - start_segments = [] - start_length = len(start_segments) - - if (path.startswith("/") != start.startswith("/") or - len(segments) < start_length): - fail("Path '%s' is not beneath '%s'" % (path, start)) - - for ancestor_segment, segment in zip(start_segments, segments): - if ancestor_segment != segment: - fail("Path '%s' is not beneath '%s'" % (path, start)) - - length = len(segments) - start_length - result_segments = segments[-length:] - return "/".join(result_segments) - -def _replace_extension(p, new_extension): - """Replaces the extension of the file at the end of a path. - - If the path has no extension, the new extension is added to it. - - Args: - p: The path whose extension should be replaced. - new_extension: The new extension for the file. The new extension should - begin with a dot if you want the new filename to have one. - - Returns: - The path with the extension replaced (or added, if it did not have one). - """ - return _split_extension(p)[0] + new_extension - -def _split_extension(p): - """Splits the path `p` into a tuple containing the root and extension. - - Leading periods on the basename are ignored, so - `path.split_extension(".bashrc")` returns `(".bashrc", "")`. - - Args: - p: The path whose root and extension should be split. - - Returns: - A tuple `(root, ext)` such that the root is the path without the file - extension, and `ext` is the file extension (which, if non-empty, contains - the leading dot). The returned tuple always satisfies the relationship - `root + ext == p`. - """ - b = _basename(p) - last_dot_in_basename = b.rfind(".") - - # If there is no dot or the only dot in the basename is at the front, then - # there is no extension. - if last_dot_in_basename <= 0: - return (p, "") - - dot_distance_from_end = len(b) - last_dot_in_basename - return (p[:-dot_distance_from_end], p[-dot_distance_from_end:]) - -paths = struct( - basename = _basename, - dirname = _dirname, - is_absolute = _is_absolute, - join = _join, - normalize = _normalize, - relativize = _relativize, - replace_extension = _replace_extension, - split_extension = _split_extension, -) diff --git a/shim/lib/shell.bzl b/shim/lib/shell.bzl deleted file mode 100644 index 3e22ffaeb7ef2..0000000000000 --- a/shim/lib/shell.bzl +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Skylib module containing shell utility functions.""" - -def _array_literal(iterable): - """Creates a string from a sequence that can be used as a shell array. - - For example, `shell.array_literal(["a", "b", "c"])` would return the string - `("a" "b" "c")`, which can be used in a shell script wherever an array - literal is needed. - - Note that all elements in the array are quoted (using `shell.quote`) for - safety, even if they do not need to be. - - Args: - iterable: A sequence of elements. Elements that are not strings will be - converted to strings first, by calling `str()`. - - Returns: - A string that represents the sequence as a shell array; that is, - parentheses containing the quoted elements. - """ - return "(" + " ".join([_quote(str(i)) for i in iterable]) + ")" - -def _quote(s): - """Quotes the given string for use in a shell command. - - This function quotes the given string (in case it contains spaces or other - shell metacharacters.) - - Args: - s: The string to quote. - - Returns: - A quoted version of the string that can be passed to a shell command. - """ - return "'" + s.replace("'", "'\\''") + "'" - -def _powershell_quote(s): - """Quoting multiline strings for Powershell. - References: - 1. https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_special_characters?view=powershell-7.4 - 2. https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules?view=powershell-7.4 - """ - return s.replace("`", "``").replace("\n", "`n").replace('"', '""').replace("$", "`$") - -shell = struct( - array_literal = _array_literal, - quote = _quote, - powershell_quote = _powershell_quote, -) diff --git a/shim/opensource/macros/BUCK b/shim/opensource/macros/BUCK deleted file mode 100644 index 4e4acfd2090d6..0000000000000 --- a/shim/opensource/macros/BUCK +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -config_setting( - name = "broken-in-oss", - constraint_values = [ - "//opensource/macros/broken_in_oss/constraints:enable", - ], - visibility = ["PUBLIC"], -) diff --git a/shim/opensource/macros/broken_in_oss/constraints/BUCK b/shim/opensource/macros/broken_in_oss/constraints/BUCK deleted file mode 100644 index c49f2e67cf60d..0000000000000 --- a/shim/opensource/macros/broken_in_oss/constraints/BUCK +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -constraint_setting( - name = "broken_in_oss", - visibility = ["PUBLIC"], -) - -constraint_value( - name = "enable", - constraint_setting = ":broken_in_oss", - visibility = ["PUBLIC"], -) - -constraint_value( - name = "disable", - constraint_setting = ":broken_in_oss", - visibility = ["PUBLIC"], -) diff --git a/shim/os/BUCK b/shim/os/BUCK deleted file mode 100644 index e98de580759ab..0000000000000 --- a/shim/os/BUCK +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -config_setting( - name = "linux-fedora", - constraint_values = [ - "prelude//os/constraints:linux", - "//os/linux/distro/constraints:fedora", - ], - visibility = ["PUBLIC"], -) - -config_setting( - name = "linux-ubuntu", - constraint_values = [ - "prelude//os/constraints:linux", - "//os/linux/distro/constraints:ubuntu", - ], - visibility = ["PUBLIC"], -) - -config_setting( - name = "macos-homebrew", - constraint_values = [ - "prelude//os/constraints:macos", - ], - visibility = ["PUBLIC"], -) diff --git a/shim/os/linux/distro/constraints/BUCK b/shim/os/linux/distro/constraints/BUCK deleted file mode 100644 index 9abe02eb55493..0000000000000 --- a/shim/os/linux/distro/constraints/BUCK +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -constraint_setting( - name = "distro", - visibility = ["PUBLIC"], -) - -constraint_value( - name = "fedora", - constraint_setting = ":distro", - visibility = ["PUBLIC"], -) - -constraint_value( - name = "ubuntu", - constraint_setting = ":distro", - visibility = ["PUBLIC"], -) diff --git a/shim/shims.bzl b/shim/shims.bzl deleted file mode 100644 index 6a73cfe2a8166..0000000000000 --- a/shim/shims.bzl +++ /dev/null @@ -1,422 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@bazel_skylib//lib:paths.bzl", "paths") -load("@prelude//utils:selects.bzl", "selects") -# @lint-ignore-every FBCODEBZLADDLOADS - -load("@prelude//utils:type_defs.bzl", "is_dict", "is_list", "is_select", "is_tuple") -load("@shim//build_defs:auto_headers.bzl", "AutoHeaders", "get_auto_headers") -load("@shim//build_defs/lib:oss.bzl", "translate_target") - -prelude = native - -_C_SOURCE_EXTS = ( - ".c", -) - -_CPP_SOURCE_EXTS = ( - ".cc", - ".cpp", -) - -_SOURCE_EXTS = _C_SOURCE_EXTS + _CPP_SOURCE_EXTS - -# These header suffixes are used to logically group C/C++ source (e.g. -# `foo/Bar.cpp`) with headers with the following suffixes (e.g. `foo/Bar.h` and -# `foo/Bar-inl.tcc`), such that the source provides all implementation for -# methods/classes declared in the headers. -# -# This is important for a couple reasons: -# 1) Automatic dependencies: Tooling can use this property to automatically -# manage TARGETS dependencies by extracting `#include` references in sources -# and looking up the rules which "provide" them. -# 2) Modules: This logical group can be combined into a standalone C/C++ module -# (when such support is available). -_HEADER_SUFFIXES = ( - ".h", - ".hpp", - ".tcc", - "-inl.h", - "-inl.hpp", - "-inl.tcc", - "-defs.h", - "-defs.hpp", - "-defs.tcc", -) - -CPP_UNITTEST_DEPS = [ - "shim//third-party/googletest:cpp_unittest_main", -] -CPP_FOLLY_UNITTEST_DEPS = [ - "gh_facebook_folly//folly/test/common:test_main_lib", - "gh_facebook_folly//folly/ext/buck2:test_ext", -] - -def _get_headers_from_sources(srcs): - """ - Return the headers likely associated with the given sources - - Args: - srcs: A list of strings representing files or build targets - - Returns: - A list of header files corresponding to the list of sources. These files are - validated to exist based on glob() - """ - split_srcs = [ - paths.split_extension(src_filename) - for src_filename in [_get_src_filename(src) for src in srcs] - if "//" not in src_filename and not src_filename.startswith(":") - ] - - # For e.g. foo.cpp grab a glob on foo.h, foo-inl.h, etc - headers = [ - base + header_ext - for base, ext in split_srcs - if ext in _SOURCE_EXTS - for header_ext in _HEADER_SUFFIXES - ] - - # Avoid a warning for an empty glob pattern if there are no headers. - return glob(headers) if headers else [] - -def _get_src_filename(src): - """ - Return filename from a potentilly tuple value entry in srcs attribute - """ - - if is_tuple(src): - s, _ = src - return s - return src - -def _update_headers_with_src_headers(src_headers, out_headers): - """ - Helper function to update raw headers with headers from srcs - """ - src_headers = list(src_headers.difference(out_headers)) - - # Looks simple, right? But if a header is explicitly added in, say, a - # dictionary mapping, we want to make sure to keep the original mapping - # and drop the F -> F mapping - if is_list(out_headers): - out_headers.extend(sorted(src_headers)) - else: - # Let it throw AttributeError if update() can't be found neither - out_headers.update({k: k for k in src_headers}) - return out_headers - -def prebuilt_cpp_library( - headers = None, - linker_flags = None, - private_linker_flags = None, - **kwargs): - prelude.prebuilt_cxx_library( - exported_headers = headers, - exported_linker_flags = linker_flags, - linker_flags = private_linker_flags, - **kwargs - ) - -def cpp_library( - name, - deps = [], - srcs = [], - external_deps = [], - exported_deps = [], - exported_external_deps = [], - undefined_symbols = None, - visibility = ["PUBLIC"], - auto_headers = None, - arch_preprocessor_flags = None, - modular_headers = None, - os_deps = [], - arch_compiler_flags = None, - tags = None, - linker_flags = None, - private_linker_flags = None, - exported_linker_flags = None, - headers = None, - private_headers = None, - propagated_pp_flags = (), - **kwargs): - base_path = native.package_name() - oss_depends_on_folly = read_config("oss_depends_on", "folly", False) - header_base_path = base_path - if oss_depends_on_folly and header_base_path.startswith("folly"): - header_base_path = header_base_path.replace("folly/", "", 1) - - _unused = (undefined_symbols, arch_preprocessor_flags, modular_headers, arch_compiler_flags, tags, propagated_pp_flags) # @unused - if os_deps: - deps += _select_os_deps(_fix_dict_deps(os_deps)) - if headers == None: - headers = [] - if tags != None and "oss_dependency" in tags: - if oss_depends_on_folly: - headers = [item.replace("//:", "//folly:") if item == "//:folly-config.h" else item for item in headers] - if is_select(srcs) and auto_headers == AutoHeaders.SOURCES: - # Validate `srcs` and `auto_headers` before the config check - fail( - "//{}:{}: `select` srcs cannot support AutoHeaders.SOURCES".format(base_path, name), - ) - auto_headers = get_auto_headers(auto_headers) - if auto_headers == AutoHeaders.SOURCES and not is_select(srcs): - src_headers = set(_get_headers_from_sources(srcs)) - if private_headers: - src_headers = src_headers.difference(set(private_headers)) - - headers = selects.apply( - headers, - partial(_update_headers_with_src_headers, src_headers), - ) - if not is_select(linker_flags): - linker_flags = linker_flags or [] - linker_flags = list(linker_flags) - if exported_linker_flags != None: - linker_flags += exported_linker_flags - prelude.cxx_library( - name = name, - srcs = srcs, - deps = _fix_deps(deps + external_deps_to_targets(external_deps)), - exported_deps = _fix_deps(exported_deps + external_deps_to_targets(exported_external_deps)), - visibility = visibility, - preferred_linkage = "static", - exported_headers = headers, - headers = private_headers, - exported_linker_flags = linker_flags, - linker_flags = private_linker_flags, - header_namespace = header_base_path, - **kwargs - ) - -def cpp_unittest( - deps = [], - external_deps = [], - visibility = ["PUBLIC"], - supports_static_listing = None, - allocator = None, - owner = None, - tags = None, - emails = None, - extract_helper_lib = None, - compiler_specific_flags = None, - default_strip_mode = None, - resources = {}, - **kwargs): - _unused = (supports_static_listing, allocator, owner, tags, emails, extract_helper_lib, compiler_specific_flags, default_strip_mode) # @unused - if read_config("oss", "folly_cxx_tests", True): - deps = deps + CPP_FOLLY_UNITTEST_DEPS - else: - deps = deps + CPP_UNITTEST_DEPS - - prelude.cxx_test( - deps = _fix_deps(deps + external_deps_to_targets(external_deps)), - visibility = visibility, - resources = _fix_resources(resources), - **kwargs - ) - -def cpp_binary( - deps = [], - external_deps = [], - visibility = ["PUBLIC"], - dlopen_enabled = None, - compiler_specific_flags = None, - os_linker_flags = None, - allocator = None, - modules = None, - **kwargs): - _unused = (dlopen_enabled, compiler_specific_flags, os_linker_flags, allocator, modules) # @unused - prelude.cxx_binary( - deps = _fix_deps(deps + external_deps_to_targets(external_deps)), - visibility = visibility, - **kwargs - ) - -def rust_library( - rustc_flags = [], - deps = [], - named_deps = None, - os_deps = None, - test_deps = None, - test_env = None, - test_os_deps = None, - autocargo = None, - unittests = None, - mapped_srcs = {}, - visibility = ["PUBLIC"], - **kwargs): - _unused = (test_deps, test_env, test_os_deps, named_deps, autocargo, unittests, visibility) # @unused - deps = _fix_deps(deps) - mapped_srcs = _maybe_select_map(mapped_srcs, _fix_mapped_srcs) - if os_deps: - deps += _select_os_deps(_fix_dict_deps(os_deps)) - - # Reset visibility because internal and external paths are different. - visibility = ["PUBLIC"] - - prelude.rust_library( - rustc_flags = rustc_flags + [_CFG_BUCK_BUILD], - deps = deps, - visibility = visibility, - mapped_srcs = mapped_srcs, - **kwargs - ) - -def rust_binary( - rustc_flags = [], - deps = [], - autocargo = None, - unittests = None, - allocator = None, - default_strip_mode = None, - visibility = ["PUBLIC"], - **kwargs): - _unused = (unittests, allocator, default_strip_mode, autocargo) # @unused - deps = _fix_deps(deps) - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - prelude.rust_binary( - rustc_flags = rustc_flags + [_CFG_BUCK_BUILD], - deps = deps, - visibility = visibility, - **kwargs - ) - -def rust_unittest( - rustc_flags = [], - deps = [], - visibility = ["PUBLIC"], - **kwargs): - deps = _fix_deps(deps) - - prelude.rust_test( - rustc_flags = rustc_flags + [_CFG_BUCK_BUILD], - deps = deps, - visibility = visibility, - **kwargs - ) - -def rust_protobuf_library( - name, - srcs, - build_script, - protos, - build_env = None, - deps = [], - test_deps = None, - doctests = True): - build_name = name + "-build" - proto_name = name + "-proto" - - rust_binary( - name = build_name, - srcs = [build_script], - crate_root = build_script, - deps = [ - "fbsource//third-party/rust:tonic-build", - "//buck2/app/buck2_protoc_dev:buck2_protoc_dev", - ], - ) - - build_env = build_env or {} - build_env.update( - { - "PROTOC": "$(exe shim//third-party/proto:protoc)", - "PROTOC_INCLUDE": "$(location shim//third-party/proto:google_protobuf)", - }, - ) - - prelude.genrule( - name = proto_name, - srcs = protos + [ - "shim//third-party/proto:google_protobuf", - ], - out = ".", - cmd = "$(exe :" + build_name + ")", - env = build_env, - ) - - rust_library( - name = name, - srcs = srcs, - doctests = doctests, - env = { - # This is where prost looks for generated .rs files - "OUT_DIR": "$(location :{})".format(proto_name), - }, - test_deps = test_deps, - deps = [ - "fbsource//third-party/rust:prost", - "fbsource//third-party/rust:prost-types", - ] + (deps or []), - ) - -def ocaml_binary( - deps = [], - visibility = ["PUBLIC"], - **kwargs): - deps = _fix_deps(deps) - - prelude.ocaml_binary( - deps = deps, - visibility = visibility, - **kwargs - ) - -_CFG_BUCK_BUILD = "--cfg=buck_build" - -def _maybe_select_map(v, mapper): - if is_select(v): - return select_map(v, mapper) - return mapper(v) - -def _select_os_deps(xss) -> Select: - d = { - "prelude//os:" + os: xs - for os, xs in xss - } - d["DEFAULT"] = [] - return select(d) - -def _fix_dict_deps(xss): - return [ - (k, _fix_deps(xs)) - for k, xs in xss - ] - -def _fix_mapped_srcs(xs: dict[str, str]): - # For reasons, this is source -> file path, which is the opposite of what - # it should be. - return {translate_target(k): v for (k, v) in xs.items()} - -def _fix_deps(xs): - if is_select(xs): - return select_map(xs, lambda child_targets: _fix_deps(child_targets)) - return map(translate_target, xs) - -def _fix_resources(resources): - if is_list(resources): - return [translate_target(r) for r in resources] - - if is_dict(resources): - return {k: translate_target(v) for k, v in resources.items()} - - fail("Unexpected type {} for resources".format(type(resources))) - -# Do a nasty conversion of e.g. ("supercaml", None, "ocaml-dev") to -# 'fbcode//third-party-buck/platform010/build/supercaml:ocaml-dev' -# (which will then get mapped to `shim//third-party/ocaml:ocaml-dev`). -def external_dep_to_target(t): - if type(t) == type(()): - return "fbcode//third-party-buck/platform010/build/{}:{}".format(t[0], t[2]) - else: - return "fbcode//third-party-buck/platform010/build/{}:{}".format(t, t) - -def external_deps_to_targets(ts): - return [external_dep_to_target(t) for t in ts] diff --git a/shim/target_determinator/macros/ci.bzl b/shim/target_determinator/macros/ci.bzl deleted file mode 100644 index 0c02e6fc3ab46..0000000000000 --- a/shim/target_determinator/macros/ci.bzl +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# https://internalfb.com/code/fbsource/fbcode/target_determinator/macros/README.md - -def _lbl(*_args): - return "" - -def _package( - _values, - # starlark-lint-disable unused-argument - overwrite = False): # @unused - pass - -ci = struct( - package = _package, - linux = _lbl, - mac = _lbl, - windows = _lbl, - skip_test = _lbl, - aarch64 = _lbl, - mode = _lbl, - opt = _lbl, -) diff --git a/shim/third-party/binutils/BUCK b/shim/third-party/binutils/BUCK deleted file mode 100644 index 8f25070f895b0..0000000000000 --- a/shim/third-party/binutils/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "iberty", - exported_linker_flags = ["-liberty"], - packages = { - "//os:linux-fedora": ["binutils-devel"], - "//os:linux-ubuntu": ["libiberty-dev"], - }, -) diff --git a/shim/third-party/boost/BUCK b/shim/third-party/boost/BUCK deleted file mode 100644 index a0d3bbf4bcca6..0000000000000 --- a/shim/third-party/boost/BUCK +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party/boost:boost.bzl", "boost_libs") - -oncall("open_source") - -boost_libs( - header_only = [ - "algorithm", - "interprocess", - "lexical_cast", - "multi_index", - "preprocessor", - "program_options", - "range", - "sort", - "variant", - ], - libraries = [ - "container", - "context", - "filesystem", - "random", - "regex", - "thread", - ], -) diff --git a/shim/third-party/boost/boost.bzl b/shim/third-party/boost/boost.bzl deleted file mode 100644 index 7b2836318953d..0000000000000 --- a/shim/third-party/boost/boost.bzl +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -HOMEBREW_BREW = "boost" - -def boost_libs(libraries, header_only): - system_library( - name = "boost", - packages = { - "//os:linux-fedora": ["boost-devel"], - "//os:linux-ubuntu": ["libboost-all-dev"], - "//os:macos-homebrew": ["boost"], - }, - ) - - for library in libraries: - boost_library(library, False) - - for library in header_only: - boost_library(library, True) - -def boost_library(library: str, header_only: bool): - exported_linker_flags = [] if header_only else ["-lboost_{}".format(library)] - - system_library( - name = "boost_{}".format(library), - packages = { - "//os:linux-fedora": ["boost-devel"], - "//os:linux-ubuntu": [ - "libboost-dev" if header_only else "libboost-{}-dev".format(library), - ], - "//os:macos-homebrew": ["boost"], - }, - exported_linker_flags = exported_linker_flags, - ) diff --git a/shim/third-party/brotli/BUCK b/shim/third-party/brotli/BUCK deleted file mode 100644 index fd7de2d707ad1..0000000000000 --- a/shim/third-party/brotli/BUCK +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -PACKAGES = { - "//os:linux-fedora": ["brotli-devel"], - "//os:linux-ubuntu": ["libbrotli-dev"], - "//os:macos-homebrew": ["brotli"], -} - -pkgconfig_system_library( - name = "brotli_decode", - packages = PACKAGES, - pkgconfig_name = "libbrotlidec", -) - -pkgconfig_system_library( - name = "brotli_encode", - packages = PACKAGES, - pkgconfig_name = "libbrotlienc", -) diff --git a/shim/third-party/bzip2/BUCK b/shim/third-party/bzip2/BUCK deleted file mode 100644 index 1ee23b853b5dc..0000000000000 --- a/shim/third-party/bzip2/BUCK +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -prebuilt_cxx_library( - name = "pkgconfig_unsupported", - exported_linker_flags = select({ - "//os:linux-ubuntu": ["-lbz2"], - "DEFAULT": [], - }), - target_compatible_with = [ - "//os:linux-ubuntu", - ], - visibility = [], -) - -pkgconfig_system_library( - name = "bz2", - packages = { - "//os:linux-fedora": ["bzip2-devel"], - "//os:linux-ubuntu": ["libbz2-dev"], - "//os:macos-homebrew": ["bzip2"], - }, - pkgconfig_name = "bzip2", - unsupported = { - "//os:linux-ubuntu": [":pkgconfig_unsupported"], - }, -) diff --git a/shim/third-party/defs.bzl b/shim/third-party/defs.bzl deleted file mode 100644 index b35a0b3688d28..0000000000000 --- a/shim/third-party/defs.bzl +++ /dev/null @@ -1,157 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//third-party:pkgconfig.bzl", "external_pkgconfig_library") - -HOMEBREW_CONSTRAINT = "//os:macos-homebrew" - -def system_library( - name: str, - packages = None, - visibility = ["PUBLIC"], - deps = [], - exported_deps = [], - **kwargs): - system_packages_target_name = "__{}_system_pkgs".format(name) - packages = packages or dict() - packages["DEFAULT"] = [] - system_packages( - name = system_packages_target_name, - packages = select(packages), - ) - deps = deps + [":" + system_packages_target_name] - - brews = packages.get(HOMEBREW_CONSTRAINT) - if brews != None: - exported_deps = exported_deps + select({ - HOMEBREW_CONSTRAINT: _system_homebrew_targets(name, brews), - "DEFAULT": [], - }) - - native.prebuilt_cxx_library( - name = name, - visibility = visibility, - deps = deps, - exported_deps = exported_deps, - **kwargs - ) - -def pkgconfig_system_library( - name: str, - pkgconfig_name = None, - packages = None, - visibility = ["PUBLIC"], - deps = [], - exported_deps = [], - unsupported = dict(), - **kwargs): - system_packages_target_name = "__{}_system_pkgs".format(name) - packages = packages or dict() - packages["DEFAULT"] = [] - system_packages( - name = system_packages_target_name, - packages = select(packages), - ) - - deps = exported_deps + deps - - if len(unsupported) == 0: - external_pkgconfig_library( - name = name, - package = pkgconfig_name, - visibility = visibility, - deps = deps + [":" + system_packages_target_name], - **kwargs - ) - else: - exported_deps_select_map = {} - for constraint, constraint_exported_deps in unsupported.items(): - if constraint == HOMEBREW_CONSTRAINT: - brews = packages.get(constraint, []) - constraint_exported_deps = constraint_exported_deps + _system_homebrew_targets(name, brews) - - exported_deps_select_map[constraint] = constraint_exported_deps - - pkgconfig_target_name = "__{}_pkgconfig".format(name) - external_pkgconfig_library( - name = pkgconfig_target_name, - package = pkgconfig_name, - visibility = [], - deps = deps, - **kwargs - ) - exported_deps_select_map["DEFAULT"] = [":" + pkgconfig_target_name] - - native.prebuilt_cxx_library( - name = name, - visibility = visibility, - deps = [":" + system_packages_target_name], - exported_deps = select(exported_deps_select_map), - ) - -def _system_homebrew_targets( - name: str, - brews): - deps = [] - for brew in brews: - homebrew_target_name = "__{}_homebrew_{}".format(name, brew) - homebrew_library( - name = homebrew_target_name, - brew = brew, - ) - deps.append(":" + homebrew_target_name) - - return deps - -def _system_packages_impl(ctx: AnalysisContext) -> list[Provider]: - return [DefaultInfo()] - -system_packages = rule( - impl = lambda _ctx: [DefaultInfo()], - attrs = { - "deps": attrs.list(attrs.dep(), default = []), - "packages": attrs.list(attrs.string()), - }, -) - -def homebrew_library( - name: str, - brew: str, - homebrew_header_path = "include", - exported_preprocessor_flags = [], - exported_linker_flags = [], - target_compatible_with = ["//os:macos-homebrew"], - **kwargs): - preproc_flags_rule_name = "__{}__{}__preproc_flags".format(name, brew) - native.genrule( - name = preproc_flags_rule_name, - type = "homebrew_library_preproc_flags", - out = "out", - cmd = "echo \"-I`brew --prefix {}`/{}\" > $OUT".format(brew, homebrew_header_path), - target_compatible_with = target_compatible_with, - ) - - linker_flags_rule_name = "__{}__{}__linker_flags".format(name, brew) - native.genrule( - name = linker_flags_rule_name, - type = "homebrew_library_linker_flags", - out = "out", - cmd = "echo \"-L`brew --prefix {}`/lib\" > $OUT".format(brew), - target_compatible_with = target_compatible_with, - ) - - native.prebuilt_cxx_library( - name = name, - exported_preprocessor_flags = exported_preprocessor_flags + [ - "@$(location :{})/preproc_flags.txt".format(preproc_flags_rule_name), - ], - exported_linker_flags = exported_linker_flags + [ - "@$(location :{})/linker_flags.txt".format(linker_flags_rule_name), - ], - target_compatible_with = target_compatible_with, - **kwargs - ) diff --git a/shim/third-party/double_conversion/BUCK b/shim/third-party/double_conversion/BUCK deleted file mode 100644 index 750949b1c8c64..0000000000000 --- a/shim/third-party/double_conversion/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "double_conversion", - exported_linker_flags = ["-ldouble-conversion"], - packages = { - "//os:linux-fedora": ["double-conversion-devel"], - "//os:linux-ubuntu": ["libdouble-conversion-dev"], - "//os:macos-homebrew": ["double-conversion"], - }, -) diff --git a/shim/third-party/fast_float/BUCK b/shim/third-party/fast_float/BUCK deleted file mode 100644 index 35ce9db12848b..0000000000000 --- a/shim/third-party/fast_float/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "fast_float", - packages = { - "//os:linux-fedora": ["fast_float-devel"], - "//os:linux-ubuntu": ["libfast-float-dev"], - "//os:macos-homebrew": ["fast_float"], - }, -) diff --git a/shim/third-party/fmt/BUCK b/shim/third-party/fmt/BUCK deleted file mode 100644 index 024783475bc8d..0000000000000 --- a/shim/third-party/fmt/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "fmt", - packages = { - "//os:linux-fedora": ["fmt-devel"], - "//os:linux-ubuntu": ["libfmt-dev"], - "//os:macos-homebrew": ["fmt"], - }, -) diff --git a/shim/third-party/gflags/BUCK b/shim/third-party/gflags/BUCK deleted file mode 100644 index d6dac8a0d08ae..0000000000000 --- a/shim/third-party/gflags/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "gflags", - packages = { - "//os:linux-fedora": ["gflags-devel"], - "//os:linux-ubuntu": ["libgflags-dev"], - "//os:macos-homebrew": ["gflags"], - }, -) diff --git a/shim/third-party/glibc/BUCK b/shim/third-party/glibc/BUCK deleted file mode 100644 index eb46aa0cb7d12..0000000000000 --- a/shim/third-party/glibc/BUCK +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//build_defs:prebuilt_cpp_library.bzl", "prebuilt_cpp_library") - -oncall("open_source") - -prebuilt_cpp_library(name = "glibc") - -alias( - name = "rt", - actual = ":glibc", - visibility = ["PUBLIC"], -) - -alias( - name = "ct", - actual = ":glibc", - visibility = ["PUBLIC"], -) - -alias( - name = "dl", - actual = ":glibc", - visibility = ["PUBLIC"], -) - -alias( - name = "pthread", - actual = ":glibc", - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/glog/BUCK b/shim/third-party/glog/BUCK deleted file mode 100644 index 830b1dd11ba42..0000000000000 --- a/shim/third-party/glog/BUCK +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "glog", - packages = { - "//os:linux-fedora": ["glog-devel"], - "//os:linux-ubuntu": ["libgoogle-glog-dev"], - "//os:macos-homebrew": ["glog"], - }, - pkgconfig_name = "libglog", - exported_deps = [ - "//third-party/gflags:gflags", - ], -) diff --git a/shim/third-party/googletest/BUCK b/shim/third-party/googletest/BUCK deleted file mode 100644 index 89fed880abc42..0000000000000 --- a/shim/third-party/googletest/BUCK +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "gtest", - packages = { - "//os:linux-fedora": ["gtest-devel"], - "//os:linux-ubuntu": ["libgtest-dev"], - "//os:macos-homebrew": ["googletest"], - }, -) - -pkgconfig_system_library( - name = "gmock", - packages = { - "//os:linux-fedora": ["gmock-devel"], - "//os:linux-ubuntu": ["libgmock-dev"], - "//os:macos-homebrew": ["googletest"], - }, -) - -cxx_library( - name = "cpp_unittest_main", - srcs = ["gtest_main.cpp"], - visibility = ["PUBLIC"], - deps = [":gtest"], -) diff --git a/shim/third-party/googletest/gtest_main.cpp b/shim/third-party/googletest/gtest_main.cpp deleted file mode 100644 index 8141caf4ca086..0000000000000 --- a/shim/third-party/googletest/gtest_main.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include "gtest/gtest.h" - -#if defined(GTEST_OS_ESP8266) || defined(GTEST_OS_ESP32) || \ - (defined(GTEST_OS_NRF52) && defined(ARDUINO)) -// Arduino-like platforms: program entry points are setup/loop instead of main. - -#ifdef GTEST_OS_ESP8266 -extern "C" { -#endif - -void setup() { testing::InitGoogleTest(); } - -void loop() { RUN_ALL_TESTS(); } - -#ifdef GTEST_OS_ESP8266 -} -#endif - -#elif defined(GTEST_OS_QURT) -// QuRT: program entry point is main, but argc/argv are unusable. - -GTEST_API_ int main() { - printf("Running main() from %s\n", __FILE__); - testing::InitGoogleTest(); - return RUN_ALL_TESTS(); -} -#else -// Normal platforms: program entry point is main, argc/argv are initialized. - -GTEST_API_ int main(int argc, char **argv) { - printf("Running main() from %s\n", __FILE__); - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} -#endif diff --git a/shim/third-party/jemalloc/BUCK b/shim/third-party/jemalloc/BUCK deleted file mode 100644 index 04cdb0c6c0465..0000000000000 --- a/shim/third-party/jemalloc/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "headers", - packages = { - "//os:linux-fedora": ["jemalloc-devel"], - "//os:linux-ubuntu": ["libjemalloc-dev"], - "//os:macos-homebrew": ["jemalloc"], - }, - pkgconfig_name = "jemalloc", -) diff --git a/shim/third-party/jvm/BUCK b/shim/third-party/jvm/BUCK deleted file mode 100644 index 88188c51c7fe9..0000000000000 --- a/shim/third-party/jvm/BUCK +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "jvm", - packages = { - "//os:macos-homebrew": ["openjdk"], - }, -) diff --git a/shim/third-party/libaegis/BUCK b/shim/third-party/libaegis/BUCK deleted file mode 100644 index 4d49fa66e261c..0000000000000 --- a/shim/third-party/libaegis/BUCK +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -oncall("open_source") - -git_fetch( - name = "libaegis.git", - repo = "https://github.com/jedisct1/libaegis.git", - rev = "9c7677d742aaae312e09b1574998acba620188d8", # tag 0.1.23 -) - -genrule( - name = "libaegis-cmake", - out = "out", - cmd = "cmake -DCMAKE_INSTALL_PREFIX=$OUT $(location :libaegis.git) && make install", -) - -prebuilt_cxx_library( - name = "aegis", - exported_linker_flags = [ - "-L$(location :libaegis-cmake)/lib64", - "-laegis", - ], - exported_preprocessor_flags = ["-I$(location :libaegis-cmake)/include"], - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/libaio/BUCK b/shim/third-party/libaio/BUCK deleted file mode 100644 index 65aef8962145d..0000000000000 --- a/shim/third-party/libaio/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "aio", - exported_linker_flags = ["-laio"], - packages = { - "//os:linux-fedora": ["libaio-devel"], - "//os:linux-ubuntu": ["libaio-dev"], - "//os:macos-homebrew": ["libaio"], - }, -) diff --git a/shim/third-party/libdwarf/BUCK b/shim/third-party/libdwarf/BUCK deleted file mode 100644 index 07efec9cd0105..0000000000000 --- a/shim/third-party/libdwarf/BUCK +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -prebuilt_cxx_library( - name = "pkgconfig_unsupported", - exported_preprocessor_flags = select({ - "//os:linux-ubuntu": ["-I/usr/include/libdwarf"], - "DEFAULT": [], - }), - target_compatible_with = [ - "//os:linux-ubuntu", - ], - visibility = [], -) - -pkgconfig_system_library( - name = "dwarf", - packages = { - "//os:linux-fedora": ["libdwarf-devel"], - "//os:linux-ubuntu": ["libdwarf-dev"], - "//os:macos-homebrew": ["libdwarf"], - }, - pkgconfig_name = "libdwarf", - unsupported = { - "//os:linux-ubuntu": [":pkgconfig_unsupported"], - }, -) diff --git a/shim/third-party/libevent/BUCK b/shim/third-party/libevent/BUCK deleted file mode 100644 index b69201e42c0b7..0000000000000 --- a/shim/third-party/libevent/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "libevent", - packages = { - "//os:linux-fedora": ["libevent-devel"], - "//os:linux-ubuntu": ["libevent-dev"], - "//os:macos-homebrew": ["libevent"], - }, -) diff --git a/shim/third-party/libgcc/BUCK b/shim/third-party/libgcc/BUCK deleted file mode 100644 index c95eb4209e61c..0000000000000 --- a/shim/third-party/libgcc/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "stdc++fs", - packages = { - "//os:linux-fedora": ["gcc"], - "//os:linux-ubuntu": ["gcc"], - "//os:macos-homebrew": ["gcc"], - }, -) diff --git a/shim/third-party/liboqs/BUCK b/shim/third-party/liboqs/BUCK deleted file mode 100644 index 74e4d23c70d19..0000000000000 --- a/shim/third-party/liboqs/BUCK +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -prebuilt_cxx_library( - name = "pkgconfig_unsupported", - target_compatible_with = [ - "//os:linux-ubuntu", - ], - visibility = [], -) - -pkgconfig_system_library( - name = "oqs", - packages = { - "//os:linux-fedora": ["liboqs-devel"], - "//os:macos-homebrew": ["liboqs"], - }, - pkgconfig_name = "liboqs", - unsupported = { - "//os:linux-ubuntu": [":pkgconfig_unsupported"], - }, -) diff --git a/shim/third-party/libsodium/BUCK b/shim/third-party/libsodium/BUCK deleted file mode 100644 index b2d8fe4f354a2..0000000000000 --- a/shim/third-party/libsodium/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "sodium", - packages = { - "//os:linux-fedora": ["libsodium-devel"], - "//os:linux-ubuntu": ["libsodium-dev"], - "//os:macos-homebrew": ["libsodium"], - }, - pkgconfig_name = "libsodium", -) diff --git a/shim/third-party/libunwind/BUCK b/shim/third-party/libunwind/BUCK deleted file mode 100644 index 67375ea8bc1d1..0000000000000 --- a/shim/third-party/libunwind/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "unwind", - packages = { - "//os:linux-fedora": ["libunwind-devel"], - "//os:linux-ubuntu": ["libunwind-dev"], - "//os:macos-homebrew": ["libunwind"], - }, - pkgconfig_name = "libunwind", -) diff --git a/shim/third-party/liburing/BUCK b/shim/third-party/liburing/BUCK deleted file mode 100644 index a2810945e1f19..0000000000000 --- a/shim/third-party/liburing/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "uring", - packages = { - "//os:linux-fedora": ["liburing-devel"], - "//os:linux-ubuntu": ["liburing-dev"], - "//os:macos-homebrew": ["liburing"], - }, - pkgconfig_name = "liburing", -) diff --git a/shim/third-party/lz4/BUCK b/shim/third-party/lz4/BUCK deleted file mode 100644 index 553bbd086bf59..0000000000000 --- a/shim/third-party/lz4/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "lz4", - packages = { - "//os:linux-fedora": ["lz4-devel"], - "//os:linux-ubuntu": ["liblz4-dev"], - "//os:macos-homebrew": ["lz4"], - }, - pkgconfig_name = "liblz4", -) diff --git a/shim/third-party/macros/rust_third_party.bzl b/shim/third-party/macros/rust_third_party.bzl deleted file mode 100644 index d00ddce82274c..0000000000000 --- a/shim/third-party/macros/rust_third_party.bzl +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# @nolint - -def third_party_rust_prebuilt_cxx_library(name, **kwargs): - # FIXME: This should probably be a fixup.toml, but it currently can't be expressed. - # The windows-sys crate does -lwindows to find windows. We pass libwindows.a on the command line, - # which resolves the symbols, but the linker still needs to "find" windows, so we also put its - # directory on the link options. - if name.endswith("libwindows.a"): - kwargs["exported_linker_flags"] = ["-Lshim/third-party/rust/" + kwargs["static_lib"].rpartition("/")[0]] - - native.prebuilt_cxx_library(name = name, **kwargs) diff --git a/shim/third-party/ocaml/BUCK b/shim/third-party/ocaml/BUCK deleted file mode 100644 index 1b62b09b57723..0000000000000 --- a/shim/third-party/ocaml/BUCK +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." -prebuilt_cxx_library( - name = "ocaml-dev", - header_dirs = ["opam/lib/ocaml"], - header_only = True, - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/ocaml/opam/lib/ocaml b/shim/third-party/ocaml/opam/lib/ocaml deleted file mode 100644 index 971daaba53aad..0000000000000 --- a/shim/third-party/ocaml/opam/lib/ocaml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# Fake file so that buck2 can run in non-ocamlrep repos diff --git a/shim/third-party/openssl/BUCK b/shim/third-party/openssl/BUCK deleted file mode 100644 index beefbd19d2f6c..0000000000000 --- a/shim/third-party/openssl/BUCK +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "ssl", - packages = { - "//os:linux-fedora": ["openssl-devel"], - "//os:linux-ubuntu": ["libssl-dev"], - "//os:macos-homebrew": ["openssl"], - }, - pkgconfig_name = "openssl", -) - -alias( - name = "crypto", - actual = ":ssl", - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/proto/BUCK b/shim/third-party/proto/BUCK deleted file mode 100644 index aefe5570a8e11..0000000000000 --- a/shim/third-party/proto/BUCK +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." -load(":defs.bzl", "protoc_distribution") - -protoc_distribution( - name = "distribution", - version = "21.4", -) - -# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." -alias( - name = "protoc", - actual = ":distribution[protoc]", - visibility = ["PUBLIC"], -) - -# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." -alias( - name = "google_protobuf", - actual = ":distribution[google_protobuf]", - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/proto/defs.bzl b/shim/third-party/proto/defs.bzl deleted file mode 100644 index 9f8d50608b8f5..0000000000000 --- a/shim/third-party/proto/defs.bzl +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//http_archive/exec_deps.bzl", "HttpArchiveExecDeps") -load(":releases.bzl", "releases") - -ProtocReleaseInfo = provider(fields = [ - "version", - "url", - "sha256", -]) - -def _get_protoc_release( - version: str, - platform: str) -> ProtocReleaseInfo: - if not version in releases: - fail("Unknown protoc release version '{}'. Available versions: {}".format( - version, - ", ".join(releases.keys()), - )) - protoc_version = releases[version] - artifact = "protoc-{}-{}.zip".format(version, platform) - if not artifact in protoc_version: - fail("Unsupported platform '{}'. Available artifacts: {}".format( - platform, - ", ".join(protoc_version.keys()), - )) - protoc_artifact = protoc_version[artifact] - return ProtocReleaseInfo( - version = version, - url = protoc_artifact["url"], - sha256 = protoc_artifact["sha256"], - ) - -def _turn_http_archive_into_protoc_distribution( - providers: ProviderCollection, - protoc_filename: str) -> list[Provider]: - downloads = providers[DefaultInfo].sub_targets - include = downloads["include"][DefaultInfo] - protoc = downloads[protoc_filename][DefaultInfo] - - return [DefaultInfo( - sub_targets = { - "google_protobuf": [include], - "protoc": [ - protoc, - RunInfo(args = protoc.default_outputs[0]), - ], - }, - )] - -def _download_protoc_distribution_impl(ctx: AnalysisContext) -> Promise: - protoc_filename = "bin/protoc" + ctx.attrs.exe_extension - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - return ctx.actions.anon_target(native.http_archive, { - "exec_deps": ctx.attrs._http_archive_exec_deps, - "sha256": ctx.attrs.sha256, - "sub_targets": [ - protoc_filename, - "include", - ], - "urls": [ctx.attrs.url], - }).promise.map(lambda providers: _turn_http_archive_into_protoc_distribution( - providers = providers, - protoc_filename = protoc_filename, - )) - -download_protoc_distribution = rule( - impl = _download_protoc_distribution_impl, - attrs = { - "exe_extension": attrs.string(), - "sha256": attrs.string(), - "url": attrs.string(), - "_http_archive_exec_deps": attrs.default_only(attrs.exec_dep(providers = [HttpArchiveExecDeps], default = "prelude//http_archive/tools:exec_deps")), - }, -) - -def _host_platform(): - os = host_info().os - arch = host_info().arch - if os.is_linux and arch.is_x86_64: - return "linux-x86_64" - elif os.is_linux and arch.is_aarch64: - return "linux-aarch_64" - elif os.is_macos and arch.is_x86_64: - return "osx-x86_64" - elif os.is_macos and arch.is_aarch64: - return "osx-aarch_64" - elif os.is_windows and arch.is_x86_64: - return "win64" - else: - fail("Unknown platform: os={}, arch={}".format(os, arch)) - -def protoc_distribution( - name: str, - version: str, - platform: [None, str] = None): - if platform == None: - platform = _host_platform() - exe_extension = ".exe" if platform.startswith("win") else "" - release = _get_protoc_release(version, platform) - download_protoc_distribution( - name = name, - url = release.url, - sha256 = release.sha256, - exe_extension = exe_extension, - ) diff --git a/shim/third-party/proto/releases.bzl b/shim/third-party/proto/releases.bzl deleted file mode 100644 index 2feb48e70e6b2..0000000000000 --- a/shim/third-party/proto/releases.bzl +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# @generated -# Update with ./update.py > releases.bzl -releases = { - "21.4": { - "protoc-21.4-win32.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-win32.zip", - "sha256": "09760ff98f76ac30c8bca7433715c47161fe305bf41573a7cd00b0afcc518617" - }, - "protoc-21.4-osx-x86_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-osx-x86_64.zip", - "sha256": "27ac01aee3e8b95ebec017b7b3aee55d4eb095cbd2a5148d2a20350af006072e" - }, - "protoc-21.4-osx-universal_binary.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-osx-universal_binary.zip", - "sha256": "0cf1a340d1fa1366cdf22043e3f92e5374096647037020b405acea706438c603" - }, - "protoc-21.4-osx-aarch_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-osx-aarch_64.zip", - "sha256": "6a677c88a5e5b032aaff96767461788a316408d4ed0afef3f1455390a689ec18" - }, - "protoc-21.4-linux-x86_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-x86_64.zip", - "sha256": "d51e8f030162f08823a4738ab0ac00bee537e30b583a562e6962dbb040d86736" - }, - "protoc-21.4-linux-x86_32.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-x86_32.zip", - "sha256": "2101e3a4dd490625c15d31274a599e3bfb1f8c9fdd381ca9501da17bb6f7a3d2" - }, - "protoc-21.4-linux-s390_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-s390_64.zip", - "sha256": "e0b69b4242bf409c825d787669a4683d63320d6e52280750df971a3376e0af56" - }, - "protoc-21.4-linux-ppcle_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-ppcle_64.zip", - "sha256": "58c1be8ca89b8b2712f95a9dd9aeb174f8f479be9f55e71f6ffe0b0e83ef8be9" - }, - "protoc-21.4-linux-aarch_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-aarch_64.zip", - "sha256": "5a377b505cf8c3ed29ad0b6e3827c5eb27273c00147fcfd833b9686192143e8d" - }, - "protoc-21.4-win64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-win64.zip", - "sha256": "090af381392abaf5fd8ae3070d8fc2a4ba2d0a9f8e52915d69b439c33be72da5" - } - } -} diff --git a/shim/third-party/proto/update.py b/shim/third-party/proto/update.py deleted file mode 100755 index c3ac3a631a102..0000000000000 --- a/shim/third-party/proto/update.py +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -"""Query recent Github release artifacts for protobuf. - -Use this script to update the releases.bzl file that contains metadata about -protoc releases. - -This script is not executed during the regular Buck2 build. -""" - -import aiohttp -import asyncio -from contextlib import asynccontextmanager -from copy import deepcopy -from gql import gql, Client -from gql.transport.aiohttp import AIOHTTPTransport -import hashlib -import json -import os - -GITHUB_GRAPHQL_URI = "https://api.github.com/graphql" -GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN") -GITHUB_QUERY = """\ -query { - repository(owner: "protocolbuffers", name: "protobuf") { - releases(last: 1) { - nodes { - tagName - releaseAssets(first: 100) { - nodes { - name - downloadUrl - } - } - } - } - } -} -""" -COPYRIGHT_HEADER = """\ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. -""" - -async def query_releases(): - async with aiohttp.ClientSession(raise_for_status=True) as session: - assert GITHUB_TOKEN is not None, "Provide a Github API token in $GITHUB_TOKEN" - headers = {'Authorization': f'bearer {GITHUB_TOKEN}'} - body = {"query": GITHUB_QUERY} - async with session.post(GITHUB_GRAPHQL_URI, headers=headers, json=body) as resp: - response = await resp.json() - return response["data"] - - -def format_releases(releases): - return { - release["tagName"].strip("v"): { - asset["name"]: { - "url": asset["downloadUrl"], - } - for asset in release["releaseAssets"]["nodes"] - if asset["name"].startswith("protoc-") - } - for release in releases["repository"]["releases"]["nodes"] - } - - -async def fetch_sha256(session, url): - async with session.get(url) as resp: - hasher = hashlib.sha256() - async for chunk, _ in resp.content.iter_chunks(): - hasher.update(chunk) - return hasher.hexdigest() - - -async def hash_releases(releases): - async def hash_asset(session, version, name, url): - sha256 = await fetch_sha256(session, url) - return (version, name, sha256) - - tasks = [] - async with aiohttp.ClientSession() as session: - for version, assets in releases.items(): - for name, asset in assets.items(): - tasks.append(hash_asset(session, version, name, asset["url"])) - - result = deepcopy(releases) - hashes = await asyncio.gather(*tasks) - for version, name, sha256 in hashes: - result[version][name]["sha256"] = sha256 - - return result - - -async def main(): - releases = await query_releases() - formatted = format_releases(releases) - with_sha256 = await hash_releases(formatted) - print(COPYRIGHT_HEADER) - print("# @" + "generated") - print("# Update with ./update.py > releases.bzl") - print("releases = ", json.dumps(with_sha256, indent=4)) - - -asyncio.run(main()) diff --git a/shim/third-party/python/BUCK b/shim/third-party/python/BUCK deleted file mode 100644 index d87d251b4f712..0000000000000 --- a/shim/third-party/python/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "python", - packages = { - "//os:linux-fedora": ["python3-devel"], - "//os:linux-ubuntu": ["python3-dev"], - "//os:macos-homebrew": ["python3"], - }, - pkgconfig_name = "python3", -) diff --git a/shim/third-party/range-v3/BUCK b/shim/third-party/range-v3/BUCK deleted file mode 100644 index b81a4de31cc3b..0000000000000 --- a/shim/third-party/range-v3/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "range-v3", - packages = { - "//os:linux-fedora": ["range-v3-devel"], - "//os:linux-ubuntu": ["librange-v3-dev"], - "//os:macos-homebrew": ["range-v3"], - }, -) diff --git a/shim/third-party/rust/.gitignore b/shim/third-party/rust/.gitignore deleted file mode 100644 index 95e346d623f6d..0000000000000 --- a/shim/third-party/rust/.gitignore +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# Ignore Cargo-related stuff -.cargo/registry -.cargo/git -/registry -/git -.package-cache - -# Various cruft in vendored packages -vendor/*/target -vendor/*/Cargo.lock -vendor/**/.buckconfig -vendor/**/BUCK -vendor/**/OWNERS -vendor/**/*~ -vendor/**/*.bzl -vendor/*/.github/** -vendor/*/.appveyor.yml -vendor/*/.travis.yml -/target/** - -# Bad Windows names - oh for case-insensitive regex matching! -vendor/**/[Aa][Uu][Xx] -vendor/**/[Aa][Uu][Xx].* -vendor/**/[Cc][Oo][Mm][1-9] -vendor/**/[Cc][Oo][Mm][1-9].* -vendor/**/[Cc][Oo][Nn] -vendor/**/[Cc][Oo][Nn].* -vendor/**/[Ll][Pp][Tt][1-9] -vendor/**/[Ll][Pp][Tt][1-9].* -vendor/**/[Nn][Uu][Ll] -vendor/**/[Nn][Uu][Ll].* diff --git a/shim/third-party/rust/Cargo.toml b/shim/third-party/rust/Cargo.toml deleted file mode 100644 index b569ecfaaa4d1..0000000000000 --- a/shim/third-party/rust/Cargo.toml +++ /dev/null @@ -1,245 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# Definitions of third-party libraries used for buck2 build of buck2. -# This file is **not** used by cargo build of buck2. -# See the /docs/bootstrapping.md for more details. - -[workspace] - -[package] -# Pseudo-package whose dependencies are imported and buckified -name = "rust-third-party" -version = "0.0.0" -publish = false -edition = "2021" - -# Dummy target to keep Cargo happy -[[bin]] -name = "top" -path = "top/main.rs" - -# List of packages to be imported, with version constraints, features -# and all options Cargo supports. -[dependencies] - -gazebo = {version = "0.8.1", features = ["str_pattern_extensions"]} -fbinit = "0.2" -sorted_vector_map = "0.2" -watchman_client = "0.8.0" - -annotate-snippets = { version = "0.9.0", features = ["color"] } -anyhow = "1.0.65" -anymap = "0.12.1" -arc-swap = "1.6.0" -argfile = "0.1.0" -assert_matches = "1.5" -async-compression = { version = "0.4.1", features = ["tokio", "gzip", "zstd"] } -async-condvar-fair = { version = "0.2.2", features = ["parking_lot_0_11", "tokio"] } -async-recursion = "1.0" -async-scoped = { version = "0.8", features = ["use-tokio"] } -async-trait = "0.1.24" -atomic = "0.5.1" -backtrace = "0.3.51" -base64 = "0.21.7" -bincode = "1.3.3" -bitflags = "2.4" -blake3 = { version = "1.3.1", features = [ "default", "digest", "rayon", "std", "traits-preview" ] } -bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] } -bumpalo = { version = "3.14.0", features = ["allocator_api", "collections"] } -byteorder = "1.4.3" -bytes = "1.0" -bytesize = "1.1.0" -chrono = "0.4.28" -clap = { package = "clap", version = "4.5.4", features = ["derive", "env", "string"] } -clap-3 = { package = "clap", version = "3.2.24", features = ["derive", "env", "regex", "unicode", "wrap_help"] } -clap_complete = { package = "clap_complete", version = "4.5.1" } -common-path = "1.0.0" -compact_str = "0.6.1" -constant_time_eq = "0.2.4" -convert_case = "0.4.0" -criterion = { version = "0.3.1", features = [] } -crossbeam = "0.8" -crossbeam-channel = "0.5" -crossbeam-epoch = "0.9.7" -crossterm = "0.27" -csv = "1.1" -ctor = "0.1.16" -dashmap = "5.5.3" -debugserver-types = "0.5.0" -derivative = "2.2" -derive_more = { version = "1.0.0", features = ["full"] } -digest = "0.10" -dirs = "3.0.1" -dunce = "1.0.2" -either = "1.8" -elf = "0.7.4" -enum-iterator = "1.4.1" -enum-map = "0.6.3" -env_logger = "0.9.0" -equivalent = "1.0.0" -erased-serde = "0.3.20" -faccess = "0.2.3" -fancy-regex = "0.10.0" -flate2 = "1.0.22" -fnv = "1.0.7" -fs4 = { version = "0.6", features = ["sync"] } -futures = { version = "0.3.28", features = ["async-await", "compat"] } -futures-intrusive = "0.4" -fxhash = "0.2.1" -glob = "0.3.0" -globset = "0.4.10" -hashbrown = { version = "0.14.3", features = ["raw"] } -hex = "0.4.3" -higher-order-closure = "0.0.5" -hostname = "0.3.1" -http = "0.2" -httparse = "1.7.1" -httptest = "0.15" -humantime = "2.0.1" -hyper = { version = "0.14.26", features = ["client", "http1", "http2"] } -hyper-proxy = { git = "https://github.com/get9/hyper-proxy", rev = "205e9fee42d469444d654d9fa207897f4a77d5b6", features = ["rustls"], default_features = false } # branch = tokio-rustls-0.23 Many PRs to bump versions (#28, #30, #31) are several years old, possibly abandoned crate. This fork contains changes from #28 + changes to upgrade rustls to 0.21. -hyper-rustls = { version = "0.24.0", features = ["http2"] } -hyper-timeout = "0.4" -hyper-unix-connector = "0.2" -indent_write = "2.2.0" -indenter = "0.3.3" -indexmap = { version = "2.1.0", features = ["arbitrary", "rayon", "serde"] } -indoc = "1.0.3" -inferno = { version = "0.11.11", default-features = false } -internment = { version = "0.7", features = ["arc"] } -inventory = "0.3.8" -ipnetwork = "0.20.0" -is_proc_translated = "0.1.1" -itertools = "0.13.0" -jemallocator = { version = "0.5.0", features = ["profiling"] } -lalrpop = { version = "0.19.7", artifact = "bin", features = ["pico-args"] } -lalrpop-util = "0.19.7" -libc = "0.2.132" -linked-hash-map = { version = "0.5", features = ["serde_impl"] } -linkme = { version = "0.3.17", features = ["used_linker"] } -log = "0.4" -logos = "0.12" -lru = "0.12.3" -lsp-server = "0.7.2" -lsp-types = "0.94.1" -maplit = "1.0.2" -mappable-rc = { version = "0.1.1", features = ["std"] } -md-5 = "0.10" -memchr = "2.4.1" -memmap2 = "0.5.0" -memoffset = "0.6.4" -multimap = "0.8.2" -nix = "0.22" -nom = "7.1.3" -notify = "=5.0.0-pre.16" -num-bigint = "0.4.3" -num-traits = "0.2" -num_cpus = "1.11" -num_enum = "0.5" -object = "0.29.0" -oid-registry = "0.6.1" -once_cell = "1.8" -os_str_bytes = { version = "6.6.0", features = ["conversions"] } -parking_lot = { version = "0.11.2", features = ["send_guard"] } -paste = "1.0" -pathdiff = "0.2" -perf-event = "0.4" -perf-event-open-sys = "4.0" -pin-project = "0.4.29" -plist = "0.5" -pretty_assertions = "1.2.1" -proc-macro2 = { version = "1.0.70", features = ["span-locations"] } -prost = "0.11.9" -prost-build = "0.11.9" -prost-derive = "0.11.9" -prost-types = "0.11.9" -protoc-bin-vendored = "3.0.0" -psutil = "3.2" -quote = "1.0.3" -rand = { version = "0.8.4", features = ["small_rng"] } -rand_chacha = "0.3" -rand_distr = "0.4" -ref-cast = "1.0.0" -regex = "1.5.4" -relative-path = { version = "1.7.0", features = ["serde"] } -ring = "=0.17.5" # Upgrading this is possible, but a pain, so we don't want to pick up every new minor version -rusqlite = { version = "0.29.0", features = ["bundled"] } -rustc-hash = "1.1.0" -rustls = "0.21.0" -rustls-native-certs = { package = "rustls-native-certs", version = "0.6.2" } -rustls-pemfile = { package = "rustls-pemfile", version = "1.0.0" } -rustyline = "11.0" -scopeguard = "1.0.0" -sequence_trie = "0.3.6" -serde = { version = "1.0.173", features = ["derive", "rc"] } -serde_json = { version = "1.0.48", features = ["raw_value"] } -sha1 = "0.10" -sha2 = "0.10" -shlex = "1.3" -similar = { version = "2.2.0", features = ["inline"] } -siphasher = "0.3.3" -slab = "0.4.7" -slog = "2.7.0" -smallvec = { version = "1.10", features = ["const_generics", "const_new", "serde", "specialization", "union", "write"] } -static_assertions = "1.1.0" -strsim = "0.10.0" -structopt = "0.3.23" -strum = { version = "0.26.2", features = ["derive", "strum_macros"] } -syn = { version = "2", features = ["extra-traits", "full", "visit"] } -syn1 = { package = "syn", version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } -synstructure = "0.12" -sync_wrapper = "0.1.0" -sys-info = "0.9.1" -sysinfo = "0.30.11" -take_mut = "0.2.2" -tar = "0.4.38" -tempfile = "3.1.0" -termimad = "0.20.1" -termios = "0.3" -termwiz = "0.18" -test-case = "3.1.0" -textwrap = { version = "0.11", features = ["term_size"] } -thiserror = "1.0.36" -threadpool = "1.8.1" -tokio = { version = "1.25.0", features = ["full", "test-util", "tracing"] } -tokio-rustls = { package = "tokio-rustls", version = "0.24.0", features = ["dangerous_configuration"] } -tokio-stream = { version = "0.1.14", features = ["fs", "io-util", "net", "sync", "time", "signal"] } -tokio-util = { version = "0.6", features = ["full"] } -toml = "0.5" -tonic = { version = "0.9.2", features = ["tls", "tls-webpki-roots"] } -tonic-build = { version = "0.9.2", features = ["prost", "cleanup-markdown"] } -tower = "0.4" -tower-layer = "0.3.1" -tower-service = "0.3.2" -tracing = "0.1.22" -tracing-core = "0.1.32" -tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] } -triomphe = "0.1.11" -trybuild = "1.0.56" -typed-arena = "2.0" -twox-hash = "1.6.1" -unicode-segmentation = "1.7" -uuid = { version = "1.2", features = ["v4"] } -walkdir = "2.3.2" -which = "4.3.0" -whoami = "1.5.1" -windows_x86_64_msvc = "=0.48.0" # our fixup only works if we are on precisely 0.48.0 -winapi = { version = "0.3", features = ["everything", "std"] } -x509-parser = { version = "0.14.0", features = ["verify"] } -xattr = "0.2.2" -zip = "0.5" -zstd = "0.13.0" - -[patch.crates-io] -# For https://github.com/jimblandy/perf-event/pull/29 -perf-event = { git = "https://github.com/krallin/perf-event.git", rev = "86224a9bc025d5d19f719542f27c8c629a08b167", version = "0.4" } -perf-event-open-sys = { git = "https://github.com/krallin/perf-event.git", rev = "86224a9bc025d5d19f719542f27c8c629a08b167", version = "4.0" } - -# Windows-specific dependencies -[target."cfg(windows)".dependencies] -winver = "1" diff --git a/shim/third-party/rust/defs.bzl b/shim/third-party/rust/defs.bzl deleted file mode 100644 index ae25b318287ca..0000000000000 --- a/shim/third-party/rust/defs.bzl +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def rust_library_from_crates(name): - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.export_file(name = name, src = "BUCK", visibility = ["PUBLIC"]) - -def rust_binary_from_crates(name): - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.genrule(name = name, cmd = "exit 1", executable = True, out = "out", visibility = ["PUBLIC"]) diff --git a/shim/third-party/rust/fixups/ahash/fixups.toml b/shim/third-party/rust/fixups/ahash/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/ahash/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/anyhow/fixups.toml b/shim/third-party/rust/fixups/anyhow/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/anyhow/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/async-trait/fixups.toml b/shim/third-party/rust/fixups/async-trait/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/async-trait/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/atomic/fixups.toml b/shim/third-party/rust/fixups/atomic/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/atomic/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/axum-core/fixups.toml b/shim/third-party/rust/fixups/axum-core/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/axum-core/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/axum/fixups.toml b/shim/third-party/rust/fixups/axum/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/axum/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/backtrace/fixups.toml b/shim/third-party/rust/fixups/backtrace/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/backtrace/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/blake3/fixups.toml b/shim/third-party/rust/fixups/blake3/fixups.toml deleted file mode 100644 index 19d0d8adf8302..0000000000000 --- a/shim/third-party/rust/fixups/blake3/fixups.toml +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] - -## The various X86 platform fixups - -[platform_fixup.'cfg(target_arch = "x86_64")'] -cfgs = ["blake3_sse2_ffi", "blake3_sse41_ffi", "blake3_avx2_ffi", "blake3_avx512_ffi"] -buildscript = [] - -# , any(target_env = "fbcode", target_env = "gnu") -[[platform_fixup.'cfg(all(target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))'.buildscript.cxx_library] -name = "simd_x86_unix" -srcs = [ - "c/blake3.c", - "c/blake3_dispatch.c", - "c/blake3_portable.c", - "c/blake3_sse2_x86-64_unix.S", - "c/blake3_sse41_x86-64_unix.S", - "c/blake3_avx2_x86-64_unix.S", - "c/blake3_avx512_x86-64_unix.S" -] -# Older versions of Clang require these flags, even for assembly. See -# https://github.com/BLAKE3-team/BLAKE3/issues/79. -compiler_flags = ["-mavx512f", "-mavx512vl"] -headers = ["c/*.h"] -compatible_with = [ - "prelude//os/constraints:linux", - "prelude//os/constraints:macos", -] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu"))'.buildscript.cxx_library] -name = "simd_x86_windows_gnu" -srcs = [ - "c/blake3.c", - "c/blake3_dispatch.c", - "c/blake3_portable.c", - "c/blake3_sse2_x86-64_windows_gnu.S", - "c/blake3_sse41_x86-64_windows_gnu.S", - "c/blake3_avx2_x86-64_windows_gnu.S", - "c/blake3_avx512_x86-64_windows_gnu.S" -] -# Older versions of Clang require these flags, even for assembly. See -# https://github.com/BLAKE3-team/BLAKE3/issues/79. -compiler_flags = ["-mavx512f", "-mavx512vl"] -headers = ["c/*.h"] -compatible_with = ["prelude//os/constraints:windows"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))'.buildscript.cxx_library] -name = "simd_x86_windows_msvc" -srcs = [ - "c/blake3.c", - "c/blake3_dispatch.c", - "c/blake3_portable.c", - "c/blake3_sse2_x86-64_windows_msvc.asm", - "c/blake3_sse41_x86-64_windows_msvc.asm", - "c/blake3_avx2_x86-64_windows_msvc.asm", - "c/blake3_avx512_x86-64_windows_msvc.asm" -] -headers = ["c/*.h"] -compatible_with = ["prelude//os/constraints:windows"] - -## ARM and AArch64 fixups - -[platform_fixup.'cfg(any(target_arch = "aarch64", target_arch = "arm"))'] -cfgs = ["blake3_neon"] -buildscript = [] - -[[platform_fixup.'cfg(target_arch = "aarch64")'.buildscript]] -[platform_fixup.'cfg(target_arch = "aarch64")'.buildscript.cxx_library] -name = "simd_neon-aarch64" -srcs = ["c/blake3_neon.c"] -headers = ["c/*.h"] - -[[platform_fixup.'cfg(target_arch = "arm")'.buildscript]] -[platform_fixup.'cfg(target_arch = "arm")'.buildscript.cxx_library] -name = "simd_neon-armv7" -srcs = ["c/blake3_neon.c"] -compiler_flags = ["-mfpu=neon-vfpv4", "-mfloat-abi=hard"] -headers = ["c/*.h"] diff --git a/shim/third-party/rust/fixups/bumpalo/fixups.toml b/shim/third-party/rust/fixups/bumpalo/fixups.toml deleted file mode 100644 index 928a0682c4668..0000000000000 --- a/shim/third-party/rust/fixups/bumpalo/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -extra_srcs = ["README.md"] diff --git a/shim/third-party/rust/fixups/bzip2-sys/fixups.toml b/shim/third-party/rust/fixups/bzip2-sys/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/bzip2-sys/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/clap/fixups.toml b/shim/third-party/rust/fixups/clap/fixups.toml deleted file mode 100644 index 41256d384f583..0000000000000 --- a/shim/third-party/rust/fixups/clap/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -omit_features = ["deprecated"] diff --git a/shim/third-party/rust/fixups/clap_builder/fixups.toml b/shim/third-party/rust/fixups/clap_builder/fixups.toml deleted file mode 100644 index 928a0682c4668..0000000000000 --- a/shim/third-party/rust/fixups/clap_builder/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -extra_srcs = ["README.md"] diff --git a/shim/third-party/rust/fixups/clap_derive/fixups.toml b/shim/third-party/rust/fixups/clap_derive/fixups.toml deleted file mode 100644 index 41256d384f583..0000000000000 --- a/shim/third-party/rust/fixups/clap_derive/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -omit_features = ["deprecated"] diff --git a/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml b/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/crc32fast/fixups.toml b/shim/third-party/rust/fixups/crc32fast/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/crc32fast/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/criterion/fixups.toml b/shim/third-party/rust/fixups/criterion/fixups.toml deleted file mode 100644 index 1da45ba23144e..0000000000000 --- a/shim/third-party/rust/fixups/criterion/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -cargo_env = true diff --git a/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml b/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml deleted file mode 100644 index 118f26932835f..0000000000000 --- a/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml b/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml deleted file mode 100644 index 118f26932835f..0000000000000 --- a/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml b/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml deleted file mode 100644 index 118f26932835f..0000000000000 --- a/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/crunchy/fixups.toml b/shim/third-party/rust/fixups/crunchy/fixups.toml deleted file mode 100644 index 309316ac45495..0000000000000 --- a/shim/third-party/rust/fixups/crunchy/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml b/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/debugserver-types/fixups.toml b/shim/third-party/rust/fixups/debugserver-types/fixups.toml deleted file mode 100644 index c740f1218e2b4..0000000000000 --- a/shim/third-party/rust/fixups/debugserver-types/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -extra_srcs = ["src/schema.json"] -cargo_env = true diff --git a/shim/third-party/rust/fixups/derive_more-impl/fixups.toml b/shim/third-party/rust/fixups/derive_more-impl/fixups.toml deleted file mode 100644 index 190a6c25c4434..0000000000000 --- a/shim/third-party/rust/fixups/derive_more-impl/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -extra_srcs = ["README.md", "doc/*.md"] diff --git a/shim/third-party/rust/fixups/derive_more/fixups.toml b/shim/third-party/rust/fixups/derive_more/fixups.toml deleted file mode 100644 index 928a0682c4668..0000000000000 --- a/shim/third-party/rust/fixups/derive_more/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -extra_srcs = ["README.md"] diff --git a/shim/third-party/rust/fixups/erased-serde/fixups.toml b/shim/third-party/rust/fixups/erased-serde/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/erased-serde/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/fs-err/fixups.toml b/shim/third-party/rust/fixups/fs-err/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/fs-err/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/fs4/fixups.toml b/shim/third-party/rust/fixups/fs4/fixups.toml deleted file mode 100644 index 9b40a18f4cab3..0000000000000 --- a/shim/third-party/rust/fixups/fs4/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/futures-channel/fixups.toml b/shim/third-party/rust/fixups/futures-channel/fixups.toml deleted file mode 100644 index 118f26932835f..0000000000000 --- a/shim/third-party/rust/fixups/futures-channel/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/futures-core/fixups.toml b/shim/third-party/rust/fixups/futures-core/fixups.toml deleted file mode 100644 index 118f26932835f..0000000000000 --- a/shim/third-party/rust/fixups/futures-core/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/futures-task/fixups.toml b/shim/third-party/rust/fixups/futures-task/fixups.toml deleted file mode 100644 index 118f26932835f..0000000000000 --- a/shim/third-party/rust/fixups/futures-task/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/futures-util/fixups.toml b/shim/third-party/rust/fixups/futures-util/fixups.toml deleted file mode 100644 index 118f26932835f..0000000000000 --- a/shim/third-party/rust/fixups/futures-util/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/generic-array/fixups.toml b/shim/third-party/rust/fixups/generic-array/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/generic-array/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/getrandom/fixups.toml b/shim/third-party/rust/fixups/getrandom/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/getrandom/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/httparse/fixups.toml b/shim/third-party/rust/fixups/httparse/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/httparse/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/hyper/fixups.toml b/shim/third-party/rust/fixups/hyper/fixups.toml deleted file mode 100644 index 4dc9cd11669f1..0000000000000 --- a/shim/third-party/rust/fixups/hyper/fixups.toml +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# reindeer cannot see through `cfg_proto!` macros and the like -extra_srcs = ["src/**/*.rs"] - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/indexmap/fixups.toml b/shim/third-party/rust/fixups/indexmap/fixups.toml deleted file mode 100644 index 4088726881865..0000000000000 --- a/shim/third-party/rust/fixups/indexmap/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] -cfgs = ["has_std"] diff --git a/shim/third-party/rust/fixups/io-lifetimes/fixups.toml b/shim/third-party/rust/fixups/io-lifetimes/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/io-lifetimes/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml b/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/lalrpop/fixups.toml b/shim/third-party/rust/fixups/lalrpop/fixups.toml deleted file mode 100644 index 1da45ba23144e..0000000000000 --- a/shim/third-party/rust/fixups/lalrpop/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -cargo_env = true diff --git a/shim/third-party/rust/fixups/lexical-core/fixups.toml b/shim/third-party/rust/fixups/lexical-core/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/lexical-core/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/libc/fixups.toml b/shim/third-party/rust/fixups/libc/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/libc/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/libm/fixups.toml b/shim/third-party/rust/fixups/libm/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/libm/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/libsqlite3-sys/BUCK b/shim/third-party/rust/fixups/libsqlite3-sys/BUCK deleted file mode 100644 index 938b0a56d0939..0000000000000 --- a/shim/third-party/rust/fixups/libsqlite3-sys/BUCK +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -filegroup( - name = "out_dir", - srcs = ["bindgen.rs"], - visibility = ["//third-party/rust/..."], -) diff --git a/shim/third-party/rust/fixups/libsqlite3-sys/bindgen.rs b/shim/third-party/rust/fixups/libsqlite3-sys/bindgen.rs deleted file mode 100644 index fbe2d39fe0be8..0000000000000 --- a/shim/third-party/rust/fixups/libsqlite3-sys/bindgen.rs +++ /dev/null @@ -1,3594 +0,0 @@ -/* automatically generated by rust-bindgen 0.64.0 */ - -pub const SQLITE_VERSION: &[u8; 7usize] = b"3.41.2\0"; -pub const SQLITE_VERSION_NUMBER: i32 = 3041002; -pub const SQLITE_SOURCE_ID: &[u8; 85usize] = - b"2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69cffde2924203304e8ffc4155597af0c191da\0"; -pub const SQLITE_OK: i32 = 0; -pub const SQLITE_ERROR: i32 = 1; -pub const SQLITE_INTERNAL: i32 = 2; -pub const SQLITE_PERM: i32 = 3; -pub const SQLITE_ABORT: i32 = 4; -pub const SQLITE_BUSY: i32 = 5; -pub const SQLITE_LOCKED: i32 = 6; -pub const SQLITE_NOMEM: i32 = 7; -pub const SQLITE_READONLY: i32 = 8; -pub const SQLITE_INTERRUPT: i32 = 9; -pub const SQLITE_IOERR: i32 = 10; -pub const SQLITE_CORRUPT: i32 = 11; -pub const SQLITE_NOTFOUND: i32 = 12; -pub const SQLITE_FULL: i32 = 13; -pub const SQLITE_CANTOPEN: i32 = 14; -pub const SQLITE_PROTOCOL: i32 = 15; -pub const SQLITE_EMPTY: i32 = 16; -pub const SQLITE_SCHEMA: i32 = 17; -pub const SQLITE_TOOBIG: i32 = 18; -pub const SQLITE_CONSTRAINT: i32 = 19; -pub const SQLITE_MISMATCH: i32 = 20; -pub const SQLITE_MISUSE: i32 = 21; -pub const SQLITE_NOLFS: i32 = 22; -pub const SQLITE_AUTH: i32 = 23; -pub const SQLITE_FORMAT: i32 = 24; -pub const SQLITE_RANGE: i32 = 25; -pub const SQLITE_NOTADB: i32 = 26; -pub const SQLITE_NOTICE: i32 = 27; -pub const SQLITE_WARNING: i32 = 28; -pub const SQLITE_ROW: i32 = 100; -pub const SQLITE_DONE: i32 = 101; -pub const SQLITE_ERROR_MISSING_COLLSEQ: i32 = 257; -pub const SQLITE_ERROR_RETRY: i32 = 513; -pub const SQLITE_ERROR_SNAPSHOT: i32 = 769; -pub const SQLITE_IOERR_READ: i32 = 266; -pub const SQLITE_IOERR_SHORT_READ: i32 = 522; -pub const SQLITE_IOERR_WRITE: i32 = 778; -pub const SQLITE_IOERR_FSYNC: i32 = 1034; -pub const SQLITE_IOERR_DIR_FSYNC: i32 = 1290; -pub const SQLITE_IOERR_TRUNCATE: i32 = 1546; -pub const SQLITE_IOERR_FSTAT: i32 = 1802; -pub const SQLITE_IOERR_UNLOCK: i32 = 2058; -pub const SQLITE_IOERR_RDLOCK: i32 = 2314; -pub const SQLITE_IOERR_DELETE: i32 = 2570; -pub const SQLITE_IOERR_BLOCKED: i32 = 2826; -pub const SQLITE_IOERR_NOMEM: i32 = 3082; -pub const SQLITE_IOERR_ACCESS: i32 = 3338; -pub const SQLITE_IOERR_CHECKRESERVEDLOCK: i32 = 3594; -pub const SQLITE_IOERR_LOCK: i32 = 3850; -pub const SQLITE_IOERR_CLOSE: i32 = 4106; -pub const SQLITE_IOERR_DIR_CLOSE: i32 = 4362; -pub const SQLITE_IOERR_SHMOPEN: i32 = 4618; -pub const SQLITE_IOERR_SHMSIZE: i32 = 4874; -pub const SQLITE_IOERR_SHMLOCK: i32 = 5130; -pub const SQLITE_IOERR_SHMMAP: i32 = 5386; -pub const SQLITE_IOERR_SEEK: i32 = 5642; -pub const SQLITE_IOERR_DELETE_NOENT: i32 = 5898; -pub const SQLITE_IOERR_MMAP: i32 = 6154; -pub const SQLITE_IOERR_GETTEMPPATH: i32 = 6410; -pub const SQLITE_IOERR_CONVPATH: i32 = 6666; -pub const SQLITE_IOERR_VNODE: i32 = 6922; -pub const SQLITE_IOERR_AUTH: i32 = 7178; -pub const SQLITE_IOERR_BEGIN_ATOMIC: i32 = 7434; -pub const SQLITE_IOERR_COMMIT_ATOMIC: i32 = 7690; -pub const SQLITE_IOERR_ROLLBACK_ATOMIC: i32 = 7946; -pub const SQLITE_IOERR_DATA: i32 = 8202; -pub const SQLITE_IOERR_CORRUPTFS: i32 = 8458; -pub const SQLITE_LOCKED_SHAREDCACHE: i32 = 262; -pub const SQLITE_LOCKED_VTAB: i32 = 518; -pub const SQLITE_BUSY_RECOVERY: i32 = 261; -pub const SQLITE_BUSY_SNAPSHOT: i32 = 517; -pub const SQLITE_BUSY_TIMEOUT: i32 = 773; -pub const SQLITE_CANTOPEN_NOTEMPDIR: i32 = 270; -pub const SQLITE_CANTOPEN_ISDIR: i32 = 526; -pub const SQLITE_CANTOPEN_FULLPATH: i32 = 782; -pub const SQLITE_CANTOPEN_CONVPATH: i32 = 1038; -pub const SQLITE_CANTOPEN_DIRTYWAL: i32 = 1294; -pub const SQLITE_CANTOPEN_SYMLINK: i32 = 1550; -pub const SQLITE_CORRUPT_VTAB: i32 = 267; -pub const SQLITE_CORRUPT_SEQUENCE: i32 = 523; -pub const SQLITE_CORRUPT_INDEX: i32 = 779; -pub const SQLITE_READONLY_RECOVERY: i32 = 264; -pub const SQLITE_READONLY_CANTLOCK: i32 = 520; -pub const SQLITE_READONLY_ROLLBACK: i32 = 776; -pub const SQLITE_READONLY_DBMOVED: i32 = 1032; -pub const SQLITE_READONLY_CANTINIT: i32 = 1288; -pub const SQLITE_READONLY_DIRECTORY: i32 = 1544; -pub const SQLITE_ABORT_ROLLBACK: i32 = 516; -pub const SQLITE_CONSTRAINT_CHECK: i32 = 275; -pub const SQLITE_CONSTRAINT_COMMITHOOK: i32 = 531; -pub const SQLITE_CONSTRAINT_FOREIGNKEY: i32 = 787; -pub const SQLITE_CONSTRAINT_FUNCTION: i32 = 1043; -pub const SQLITE_CONSTRAINT_NOTNULL: i32 = 1299; -pub const SQLITE_CONSTRAINT_PRIMARYKEY: i32 = 1555; -pub const SQLITE_CONSTRAINT_TRIGGER: i32 = 1811; -pub const SQLITE_CONSTRAINT_UNIQUE: i32 = 2067; -pub const SQLITE_CONSTRAINT_VTAB: i32 = 2323; -pub const SQLITE_CONSTRAINT_ROWID: i32 = 2579; -pub const SQLITE_CONSTRAINT_PINNED: i32 = 2835; -pub const SQLITE_CONSTRAINT_DATATYPE: i32 = 3091; -pub const SQLITE_NOTICE_RECOVER_WAL: i32 = 283; -pub const SQLITE_NOTICE_RECOVER_ROLLBACK: i32 = 539; -pub const SQLITE_NOTICE_RBU: i32 = 795; -pub const SQLITE_WARNING_AUTOINDEX: i32 = 284; -pub const SQLITE_AUTH_USER: i32 = 279; -pub const SQLITE_OK_LOAD_PERMANENTLY: i32 = 256; -pub const SQLITE_OK_SYMLINK: i32 = 512; -pub const SQLITE_OPEN_READONLY: i32 = 1; -pub const SQLITE_OPEN_READWRITE: i32 = 2; -pub const SQLITE_OPEN_CREATE: i32 = 4; -pub const SQLITE_OPEN_DELETEONCLOSE: i32 = 8; -pub const SQLITE_OPEN_EXCLUSIVE: i32 = 16; -pub const SQLITE_OPEN_AUTOPROXY: i32 = 32; -pub const SQLITE_OPEN_URI: i32 = 64; -pub const SQLITE_OPEN_MEMORY: i32 = 128; -pub const SQLITE_OPEN_MAIN_DB: i32 = 256; -pub const SQLITE_OPEN_TEMP_DB: i32 = 512; -pub const SQLITE_OPEN_TRANSIENT_DB: i32 = 1024; -pub const SQLITE_OPEN_MAIN_JOURNAL: i32 = 2048; -pub const SQLITE_OPEN_TEMP_JOURNAL: i32 = 4096; -pub const SQLITE_OPEN_SUBJOURNAL: i32 = 8192; -pub const SQLITE_OPEN_SUPER_JOURNAL: i32 = 16384; -pub const SQLITE_OPEN_NOMUTEX: i32 = 32768; -pub const SQLITE_OPEN_FULLMUTEX: i32 = 65536; -pub const SQLITE_OPEN_SHAREDCACHE: i32 = 131072; -pub const SQLITE_OPEN_PRIVATECACHE: i32 = 262144; -pub const SQLITE_OPEN_WAL: i32 = 524288; -pub const SQLITE_OPEN_NOFOLLOW: i32 = 16777216; -pub const SQLITE_OPEN_EXRESCODE: i32 = 33554432; -pub const SQLITE_OPEN_MASTER_JOURNAL: i32 = 16384; -pub const SQLITE_IOCAP_ATOMIC: i32 = 1; -pub const SQLITE_IOCAP_ATOMIC512: i32 = 2; -pub const SQLITE_IOCAP_ATOMIC1K: i32 = 4; -pub const SQLITE_IOCAP_ATOMIC2K: i32 = 8; -pub const SQLITE_IOCAP_ATOMIC4K: i32 = 16; -pub const SQLITE_IOCAP_ATOMIC8K: i32 = 32; -pub const SQLITE_IOCAP_ATOMIC16K: i32 = 64; -pub const SQLITE_IOCAP_ATOMIC32K: i32 = 128; -pub const SQLITE_IOCAP_ATOMIC64K: i32 = 256; -pub const SQLITE_IOCAP_SAFE_APPEND: i32 = 512; -pub const SQLITE_IOCAP_SEQUENTIAL: i32 = 1024; -pub const SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN: i32 = 2048; -pub const SQLITE_IOCAP_POWERSAFE_OVERWRITE: i32 = 4096; -pub const SQLITE_IOCAP_IMMUTABLE: i32 = 8192; -pub const SQLITE_IOCAP_BATCH_ATOMIC: i32 = 16384; -pub const SQLITE_LOCK_NONE: i32 = 0; -pub const SQLITE_LOCK_SHARED: i32 = 1; -pub const SQLITE_LOCK_RESERVED: i32 = 2; -pub const SQLITE_LOCK_PENDING: i32 = 3; -pub const SQLITE_LOCK_EXCLUSIVE: i32 = 4; -pub const SQLITE_SYNC_NORMAL: i32 = 2; -pub const SQLITE_SYNC_FULL: i32 = 3; -pub const SQLITE_SYNC_DATAONLY: i32 = 16; -pub const SQLITE_FCNTL_LOCKSTATE: i32 = 1; -pub const SQLITE_FCNTL_GET_LOCKPROXYFILE: i32 = 2; -pub const SQLITE_FCNTL_SET_LOCKPROXYFILE: i32 = 3; -pub const SQLITE_FCNTL_LAST_ERRNO: i32 = 4; -pub const SQLITE_FCNTL_SIZE_HINT: i32 = 5; -pub const SQLITE_FCNTL_CHUNK_SIZE: i32 = 6; -pub const SQLITE_FCNTL_FILE_POINTER: i32 = 7; -pub const SQLITE_FCNTL_SYNC_OMITTED: i32 = 8; -pub const SQLITE_FCNTL_WIN32_AV_RETRY: i32 = 9; -pub const SQLITE_FCNTL_PERSIST_WAL: i32 = 10; -pub const SQLITE_FCNTL_OVERWRITE: i32 = 11; -pub const SQLITE_FCNTL_VFSNAME: i32 = 12; -pub const SQLITE_FCNTL_POWERSAFE_OVERWRITE: i32 = 13; -pub const SQLITE_FCNTL_PRAGMA: i32 = 14; -pub const SQLITE_FCNTL_BUSYHANDLER: i32 = 15; -pub const SQLITE_FCNTL_TEMPFILENAME: i32 = 16; -pub const SQLITE_FCNTL_MMAP_SIZE: i32 = 18; -pub const SQLITE_FCNTL_TRACE: i32 = 19; -pub const SQLITE_FCNTL_HAS_MOVED: i32 = 20; -pub const SQLITE_FCNTL_SYNC: i32 = 21; -pub const SQLITE_FCNTL_COMMIT_PHASETWO: i32 = 22; -pub const SQLITE_FCNTL_WIN32_SET_HANDLE: i32 = 23; -pub const SQLITE_FCNTL_WAL_BLOCK: i32 = 24; -pub const SQLITE_FCNTL_ZIPVFS: i32 = 25; -pub const SQLITE_FCNTL_RBU: i32 = 26; -pub const SQLITE_FCNTL_VFS_POINTER: i32 = 27; -pub const SQLITE_FCNTL_JOURNAL_POINTER: i32 = 28; -pub const SQLITE_FCNTL_WIN32_GET_HANDLE: i32 = 29; -pub const SQLITE_FCNTL_PDB: i32 = 30; -pub const SQLITE_FCNTL_BEGIN_ATOMIC_WRITE: i32 = 31; -pub const SQLITE_FCNTL_COMMIT_ATOMIC_WRITE: i32 = 32; -pub const SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE: i32 = 33; -pub const SQLITE_FCNTL_LOCK_TIMEOUT: i32 = 34; -pub const SQLITE_FCNTL_DATA_VERSION: i32 = 35; -pub const SQLITE_FCNTL_SIZE_LIMIT: i32 = 36; -pub const SQLITE_FCNTL_CKPT_DONE: i32 = 37; -pub const SQLITE_FCNTL_RESERVE_BYTES: i32 = 38; -pub const SQLITE_FCNTL_CKPT_START: i32 = 39; -pub const SQLITE_FCNTL_EXTERNAL_READER: i32 = 40; -pub const SQLITE_FCNTL_CKSM_FILE: i32 = 41; -pub const SQLITE_FCNTL_RESET_CACHE: i32 = 42; -pub const SQLITE_GET_LOCKPROXYFILE: i32 = 2; -pub const SQLITE_SET_LOCKPROXYFILE: i32 = 3; -pub const SQLITE_LAST_ERRNO: i32 = 4; -pub const SQLITE_ACCESS_EXISTS: i32 = 0; -pub const SQLITE_ACCESS_READWRITE: i32 = 1; -pub const SQLITE_ACCESS_READ: i32 = 2; -pub const SQLITE_SHM_UNLOCK: i32 = 1; -pub const SQLITE_SHM_LOCK: i32 = 2; -pub const SQLITE_SHM_SHARED: i32 = 4; -pub const SQLITE_SHM_EXCLUSIVE: i32 = 8; -pub const SQLITE_SHM_NLOCK: i32 = 8; -pub const SQLITE_CONFIG_SINGLETHREAD: i32 = 1; -pub const SQLITE_CONFIG_MULTITHREAD: i32 = 2; -pub const SQLITE_CONFIG_SERIALIZED: i32 = 3; -pub const SQLITE_CONFIG_MALLOC: i32 = 4; -pub const SQLITE_CONFIG_GETMALLOC: i32 = 5; -pub const SQLITE_CONFIG_SCRATCH: i32 = 6; -pub const SQLITE_CONFIG_PAGECACHE: i32 = 7; -pub const SQLITE_CONFIG_HEAP: i32 = 8; -pub const SQLITE_CONFIG_MEMSTATUS: i32 = 9; -pub const SQLITE_CONFIG_MUTEX: i32 = 10; -pub const SQLITE_CONFIG_GETMUTEX: i32 = 11; -pub const SQLITE_CONFIG_LOOKASIDE: i32 = 13; -pub const SQLITE_CONFIG_PCACHE: i32 = 14; -pub const SQLITE_CONFIG_GETPCACHE: i32 = 15; -pub const SQLITE_CONFIG_LOG: i32 = 16; -pub const SQLITE_CONFIG_URI: i32 = 17; -pub const SQLITE_CONFIG_PCACHE2: i32 = 18; -pub const SQLITE_CONFIG_GETPCACHE2: i32 = 19; -pub const SQLITE_CONFIG_COVERING_INDEX_SCAN: i32 = 20; -pub const SQLITE_CONFIG_SQLLOG: i32 = 21; -pub const SQLITE_CONFIG_MMAP_SIZE: i32 = 22; -pub const SQLITE_CONFIG_WIN32_HEAPSIZE: i32 = 23; -pub const SQLITE_CONFIG_PCACHE_HDRSZ: i32 = 24; -pub const SQLITE_CONFIG_PMASZ: i32 = 25; -pub const SQLITE_CONFIG_STMTJRNL_SPILL: i32 = 26; -pub const SQLITE_CONFIG_SMALL_MALLOC: i32 = 27; -pub const SQLITE_CONFIG_SORTERREF_SIZE: i32 = 28; -pub const SQLITE_CONFIG_MEMDB_MAXSIZE: i32 = 29; -pub const SQLITE_DBCONFIG_MAINDBNAME: i32 = 1000; -pub const SQLITE_DBCONFIG_LOOKASIDE: i32 = 1001; -pub const SQLITE_DBCONFIG_ENABLE_FKEY: i32 = 1002; -pub const SQLITE_DBCONFIG_ENABLE_TRIGGER: i32 = 1003; -pub const SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER: i32 = 1004; -pub const SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION: i32 = 1005; -pub const SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE: i32 = 1006; -pub const SQLITE_DBCONFIG_ENABLE_QPSG: i32 = 1007; -pub const SQLITE_DBCONFIG_TRIGGER_EQP: i32 = 1008; -pub const SQLITE_DBCONFIG_RESET_DATABASE: i32 = 1009; -pub const SQLITE_DBCONFIG_DEFENSIVE: i32 = 1010; -pub const SQLITE_DBCONFIG_WRITABLE_SCHEMA: i32 = 1011; -pub const SQLITE_DBCONFIG_LEGACY_ALTER_TABLE: i32 = 1012; -pub const SQLITE_DBCONFIG_DQS_DML: i32 = 1013; -pub const SQLITE_DBCONFIG_DQS_DDL: i32 = 1014; -pub const SQLITE_DBCONFIG_ENABLE_VIEW: i32 = 1015; -pub const SQLITE_DBCONFIG_LEGACY_FILE_FORMAT: i32 = 1016; -pub const SQLITE_DBCONFIG_TRUSTED_SCHEMA: i32 = 1017; -pub const SQLITE_DBCONFIG_MAX: i32 = 1017; -pub const SQLITE_DENY: i32 = 1; -pub const SQLITE_IGNORE: i32 = 2; -pub const SQLITE_CREATE_INDEX: i32 = 1; -pub const SQLITE_CREATE_TABLE: i32 = 2; -pub const SQLITE_CREATE_TEMP_INDEX: i32 = 3; -pub const SQLITE_CREATE_TEMP_TABLE: i32 = 4; -pub const SQLITE_CREATE_TEMP_TRIGGER: i32 = 5; -pub const SQLITE_CREATE_TEMP_VIEW: i32 = 6; -pub const SQLITE_CREATE_TRIGGER: i32 = 7; -pub const SQLITE_CREATE_VIEW: i32 = 8; -pub const SQLITE_DELETE: i32 = 9; -pub const SQLITE_DROP_INDEX: i32 = 10; -pub const SQLITE_DROP_TABLE: i32 = 11; -pub const SQLITE_DROP_TEMP_INDEX: i32 = 12; -pub const SQLITE_DROP_TEMP_TABLE: i32 = 13; -pub const SQLITE_DROP_TEMP_TRIGGER: i32 = 14; -pub const SQLITE_DROP_TEMP_VIEW: i32 = 15; -pub const SQLITE_DROP_TRIGGER: i32 = 16; -pub const SQLITE_DROP_VIEW: i32 = 17; -pub const SQLITE_INSERT: i32 = 18; -pub const SQLITE_PRAGMA: i32 = 19; -pub const SQLITE_READ: i32 = 20; -pub const SQLITE_SELECT: i32 = 21; -pub const SQLITE_TRANSACTION: i32 = 22; -pub const SQLITE_UPDATE: i32 = 23; -pub const SQLITE_ATTACH: i32 = 24; -pub const SQLITE_DETACH: i32 = 25; -pub const SQLITE_ALTER_TABLE: i32 = 26; -pub const SQLITE_REINDEX: i32 = 27; -pub const SQLITE_ANALYZE: i32 = 28; -pub const SQLITE_CREATE_VTABLE: i32 = 29; -pub const SQLITE_DROP_VTABLE: i32 = 30; -pub const SQLITE_FUNCTION: i32 = 31; -pub const SQLITE_SAVEPOINT: i32 = 32; -pub const SQLITE_COPY: i32 = 0; -pub const SQLITE_RECURSIVE: i32 = 33; -pub const SQLITE_TRACE_STMT: i32 = 1; -pub const SQLITE_TRACE_PROFILE: i32 = 2; -pub const SQLITE_TRACE_ROW: i32 = 4; -pub const SQLITE_TRACE_CLOSE: i32 = 8; -pub const SQLITE_LIMIT_LENGTH: i32 = 0; -pub const SQLITE_LIMIT_SQL_LENGTH: i32 = 1; -pub const SQLITE_LIMIT_COLUMN: i32 = 2; -pub const SQLITE_LIMIT_EXPR_DEPTH: i32 = 3; -pub const SQLITE_LIMIT_COMPOUND_SELECT: i32 = 4; -pub const SQLITE_LIMIT_VDBE_OP: i32 = 5; -pub const SQLITE_LIMIT_FUNCTION_ARG: i32 = 6; -pub const SQLITE_LIMIT_ATTACHED: i32 = 7; -pub const SQLITE_LIMIT_LIKE_PATTERN_LENGTH: i32 = 8; -pub const SQLITE_LIMIT_VARIABLE_NUMBER: i32 = 9; -pub const SQLITE_LIMIT_TRIGGER_DEPTH: i32 = 10; -pub const SQLITE_LIMIT_WORKER_THREADS: i32 = 11; -pub const SQLITE_PREPARE_PERSISTENT: i32 = 1; -pub const SQLITE_PREPARE_NORMALIZE: i32 = 2; -pub const SQLITE_PREPARE_NO_VTAB: i32 = 4; -pub const SQLITE_INTEGER: i32 = 1; -pub const SQLITE_FLOAT: i32 = 2; -pub const SQLITE_BLOB: i32 = 4; -pub const SQLITE_NULL: i32 = 5; -pub const SQLITE_TEXT: i32 = 3; -pub const SQLITE3_TEXT: i32 = 3; -pub const SQLITE_UTF8: i32 = 1; -pub const SQLITE_UTF16LE: i32 = 2; -pub const SQLITE_UTF16BE: i32 = 3; -pub const SQLITE_UTF16: i32 = 4; -pub const SQLITE_ANY: i32 = 5; -pub const SQLITE_UTF16_ALIGNED: i32 = 8; -pub const SQLITE_DETERMINISTIC: i32 = 2048; -pub const SQLITE_DIRECTONLY: i32 = 524288; -pub const SQLITE_SUBTYPE: i32 = 1048576; -pub const SQLITE_INNOCUOUS: i32 = 2097152; -pub const SQLITE_WIN32_DATA_DIRECTORY_TYPE: i32 = 1; -pub const SQLITE_WIN32_TEMP_DIRECTORY_TYPE: i32 = 2; -pub const SQLITE_TXN_NONE: i32 = 0; -pub const SQLITE_TXN_READ: i32 = 1; -pub const SQLITE_TXN_WRITE: i32 = 2; -pub const SQLITE_INDEX_SCAN_UNIQUE: i32 = 1; -pub const SQLITE_INDEX_CONSTRAINT_EQ: i32 = 2; -pub const SQLITE_INDEX_CONSTRAINT_GT: i32 = 4; -pub const SQLITE_INDEX_CONSTRAINT_LE: i32 = 8; -pub const SQLITE_INDEX_CONSTRAINT_LT: i32 = 16; -pub const SQLITE_INDEX_CONSTRAINT_GE: i32 = 32; -pub const SQLITE_INDEX_CONSTRAINT_MATCH: i32 = 64; -pub const SQLITE_INDEX_CONSTRAINT_LIKE: i32 = 65; -pub const SQLITE_INDEX_CONSTRAINT_GLOB: i32 = 66; -pub const SQLITE_INDEX_CONSTRAINT_REGEXP: i32 = 67; -pub const SQLITE_INDEX_CONSTRAINT_NE: i32 = 68; -pub const SQLITE_INDEX_CONSTRAINT_ISNOT: i32 = 69; -pub const SQLITE_INDEX_CONSTRAINT_ISNOTNULL: i32 = 70; -pub const SQLITE_INDEX_CONSTRAINT_ISNULL: i32 = 71; -pub const SQLITE_INDEX_CONSTRAINT_IS: i32 = 72; -pub const SQLITE_INDEX_CONSTRAINT_LIMIT: i32 = 73; -pub const SQLITE_INDEX_CONSTRAINT_OFFSET: i32 = 74; -pub const SQLITE_INDEX_CONSTRAINT_FUNCTION: i32 = 150; -pub const SQLITE_MUTEX_FAST: i32 = 0; -pub const SQLITE_MUTEX_RECURSIVE: i32 = 1; -pub const SQLITE_MUTEX_STATIC_MAIN: i32 = 2; -pub const SQLITE_MUTEX_STATIC_MEM: i32 = 3; -pub const SQLITE_MUTEX_STATIC_MEM2: i32 = 4; -pub const SQLITE_MUTEX_STATIC_OPEN: i32 = 4; -pub const SQLITE_MUTEX_STATIC_PRNG: i32 = 5; -pub const SQLITE_MUTEX_STATIC_LRU: i32 = 6; -pub const SQLITE_MUTEX_STATIC_LRU2: i32 = 7; -pub const SQLITE_MUTEX_STATIC_PMEM: i32 = 7; -pub const SQLITE_MUTEX_STATIC_APP1: i32 = 8; -pub const SQLITE_MUTEX_STATIC_APP2: i32 = 9; -pub const SQLITE_MUTEX_STATIC_APP3: i32 = 10; -pub const SQLITE_MUTEX_STATIC_VFS1: i32 = 11; -pub const SQLITE_MUTEX_STATIC_VFS2: i32 = 12; -pub const SQLITE_MUTEX_STATIC_VFS3: i32 = 13; -pub const SQLITE_MUTEX_STATIC_MASTER: i32 = 2; -pub const SQLITE_TESTCTRL_FIRST: i32 = 5; -pub const SQLITE_TESTCTRL_PRNG_SAVE: i32 = 5; -pub const SQLITE_TESTCTRL_PRNG_RESTORE: i32 = 6; -pub const SQLITE_TESTCTRL_PRNG_RESET: i32 = 7; -pub const SQLITE_TESTCTRL_BITVEC_TEST: i32 = 8; -pub const SQLITE_TESTCTRL_FAULT_INSTALL: i32 = 9; -pub const SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS: i32 = 10; -pub const SQLITE_TESTCTRL_PENDING_BYTE: i32 = 11; -pub const SQLITE_TESTCTRL_ASSERT: i32 = 12; -pub const SQLITE_TESTCTRL_ALWAYS: i32 = 13; -pub const SQLITE_TESTCTRL_RESERVE: i32 = 14; -pub const SQLITE_TESTCTRL_OPTIMIZATIONS: i32 = 15; -pub const SQLITE_TESTCTRL_ISKEYWORD: i32 = 16; -pub const SQLITE_TESTCTRL_SCRATCHMALLOC: i32 = 17; -pub const SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: i32 = 17; -pub const SQLITE_TESTCTRL_LOCALTIME_FAULT: i32 = 18; -pub const SQLITE_TESTCTRL_EXPLAIN_STMT: i32 = 19; -pub const SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD: i32 = 19; -pub const SQLITE_TESTCTRL_NEVER_CORRUPT: i32 = 20; -pub const SQLITE_TESTCTRL_VDBE_COVERAGE: i32 = 21; -pub const SQLITE_TESTCTRL_BYTEORDER: i32 = 22; -pub const SQLITE_TESTCTRL_ISINIT: i32 = 23; -pub const SQLITE_TESTCTRL_SORTER_MMAP: i32 = 24; -pub const SQLITE_TESTCTRL_IMPOSTER: i32 = 25; -pub const SQLITE_TESTCTRL_PARSER_COVERAGE: i32 = 26; -pub const SQLITE_TESTCTRL_RESULT_INTREAL: i32 = 27; -pub const SQLITE_TESTCTRL_PRNG_SEED: i32 = 28; -pub const SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS: i32 = 29; -pub const SQLITE_TESTCTRL_SEEK_COUNT: i32 = 30; -pub const SQLITE_TESTCTRL_TRACEFLAGS: i32 = 31; -pub const SQLITE_TESTCTRL_TUNE: i32 = 32; -pub const SQLITE_TESTCTRL_LOGEST: i32 = 33; -pub const SQLITE_TESTCTRL_LAST: i32 = 33; -pub const SQLITE_STATUS_MEMORY_USED: i32 = 0; -pub const SQLITE_STATUS_PAGECACHE_USED: i32 = 1; -pub const SQLITE_STATUS_PAGECACHE_OVERFLOW: i32 = 2; -pub const SQLITE_STATUS_SCRATCH_USED: i32 = 3; -pub const SQLITE_STATUS_SCRATCH_OVERFLOW: i32 = 4; -pub const SQLITE_STATUS_MALLOC_SIZE: i32 = 5; -pub const SQLITE_STATUS_PARSER_STACK: i32 = 6; -pub const SQLITE_STATUS_PAGECACHE_SIZE: i32 = 7; -pub const SQLITE_STATUS_SCRATCH_SIZE: i32 = 8; -pub const SQLITE_STATUS_MALLOC_COUNT: i32 = 9; -pub const SQLITE_DBSTATUS_LOOKASIDE_USED: i32 = 0; -pub const SQLITE_DBSTATUS_CACHE_USED: i32 = 1; -pub const SQLITE_DBSTATUS_SCHEMA_USED: i32 = 2; -pub const SQLITE_DBSTATUS_STMT_USED: i32 = 3; -pub const SQLITE_DBSTATUS_LOOKASIDE_HIT: i32 = 4; -pub const SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE: i32 = 5; -pub const SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL: i32 = 6; -pub const SQLITE_DBSTATUS_CACHE_HIT: i32 = 7; -pub const SQLITE_DBSTATUS_CACHE_MISS: i32 = 8; -pub const SQLITE_DBSTATUS_CACHE_WRITE: i32 = 9; -pub const SQLITE_DBSTATUS_DEFERRED_FKS: i32 = 10; -pub const SQLITE_DBSTATUS_CACHE_USED_SHARED: i32 = 11; -pub const SQLITE_DBSTATUS_CACHE_SPILL: i32 = 12; -pub const SQLITE_DBSTATUS_MAX: i32 = 12; -pub const SQLITE_STMTSTATUS_FULLSCAN_STEP: i32 = 1; -pub const SQLITE_STMTSTATUS_SORT: i32 = 2; -pub const SQLITE_STMTSTATUS_AUTOINDEX: i32 = 3; -pub const SQLITE_STMTSTATUS_VM_STEP: i32 = 4; -pub const SQLITE_STMTSTATUS_REPREPARE: i32 = 5; -pub const SQLITE_STMTSTATUS_RUN: i32 = 6; -pub const SQLITE_STMTSTATUS_FILTER_MISS: i32 = 7; -pub const SQLITE_STMTSTATUS_FILTER_HIT: i32 = 8; -pub const SQLITE_STMTSTATUS_MEMUSED: i32 = 99; -pub const SQLITE_CHECKPOINT_PASSIVE: i32 = 0; -pub const SQLITE_CHECKPOINT_FULL: i32 = 1; -pub const SQLITE_CHECKPOINT_RESTART: i32 = 2; -pub const SQLITE_CHECKPOINT_TRUNCATE: i32 = 3; -pub const SQLITE_VTAB_CONSTRAINT_SUPPORT: i32 = 1; -pub const SQLITE_VTAB_INNOCUOUS: i32 = 2; -pub const SQLITE_VTAB_DIRECTONLY: i32 = 3; -pub const SQLITE_ROLLBACK: i32 = 1; -pub const SQLITE_FAIL: i32 = 3; -pub const SQLITE_REPLACE: i32 = 5; -pub const SQLITE_SCANSTAT_NLOOP: i32 = 0; -pub const SQLITE_SCANSTAT_NVISIT: i32 = 1; -pub const SQLITE_SCANSTAT_EST: i32 = 2; -pub const SQLITE_SCANSTAT_NAME: i32 = 3; -pub const SQLITE_SCANSTAT_EXPLAIN: i32 = 4; -pub const SQLITE_SCANSTAT_SELECTID: i32 = 5; -pub const SQLITE_SCANSTAT_PARENTID: i32 = 6; -pub const SQLITE_SCANSTAT_NCYCLE: i32 = 7; -pub const SQLITE_SCANSTAT_COMPLEX: i32 = 1; -pub const SQLITE_SERIALIZE_NOCOPY: i32 = 1; -pub const SQLITE_DESERIALIZE_FREEONCLOSE: i32 = 1; -pub const SQLITE_DESERIALIZE_RESIZEABLE: i32 = 2; -pub const SQLITE_DESERIALIZE_READONLY: i32 = 4; -pub const NOT_WITHIN: i32 = 0; -pub const PARTLY_WITHIN: i32 = 1; -pub const FULLY_WITHIN: i32 = 2; -pub const __SQLITESESSION_H_: i32 = 1; -pub const SQLITE_SESSION_OBJCONFIG_SIZE: i32 = 1; -pub const SQLITE_CHANGESETSTART_INVERT: i32 = 2; -pub const SQLITE_CHANGESETAPPLY_NOSAVEPOINT: i32 = 1; -pub const SQLITE_CHANGESETAPPLY_INVERT: i32 = 2; -pub const SQLITE_CHANGESET_DATA: i32 = 1; -pub const SQLITE_CHANGESET_NOTFOUND: i32 = 2; -pub const SQLITE_CHANGESET_CONFLICT: i32 = 3; -pub const SQLITE_CHANGESET_CONSTRAINT: i32 = 4; -pub const SQLITE_CHANGESET_FOREIGN_KEY: i32 = 5; -pub const SQLITE_CHANGESET_OMIT: i32 = 0; -pub const SQLITE_CHANGESET_REPLACE: i32 = 1; -pub const SQLITE_CHANGESET_ABORT: i32 = 2; -pub const SQLITE_SESSION_CONFIG_STRMSIZE: i32 = 1; -pub const FTS5_TOKENIZE_QUERY: i32 = 1; -pub const FTS5_TOKENIZE_PREFIX: i32 = 2; -pub const FTS5_TOKENIZE_DOCUMENT: i32 = 4; -pub const FTS5_TOKENIZE_AUX: i32 = 8; -pub const FTS5_TOKEN_COLOCATED: i32 = 1; -extern "C" { - pub static sqlite3_version: [::std::os::raw::c_char; 0usize]; -} -extern "C" { - pub fn sqlite3_libversion() -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_sourceid() -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_libversion_number() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_compileoption_used( - zOptName: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_compileoption_get(N: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_threadsafe() -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3 { - _unused: [u8; 0], -} -pub type sqlite_int64 = ::std::os::raw::c_longlong; -pub type sqlite_uint64 = ::std::os::raw::c_ulonglong; -pub type sqlite3_int64 = sqlite_int64; -pub type sqlite3_uint64 = sqlite_uint64; -extern "C" { - pub fn sqlite3_close(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_close_v2(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -pub type sqlite3_callback = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut ::std::os::raw::c_char, - arg4: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn sqlite3_exec( - arg1: *mut sqlite3, - sql: *const ::std::os::raw::c_char, - callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut ::std::os::raw::c_char, - arg4: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - arg2: *mut ::std::os::raw::c_void, - errmsg: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_file { - pub pMethods: *const sqlite3_io_methods, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_io_methods { - pub iVersion: ::std::os::raw::c_int, - pub xClose: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_file) -> ::std::os::raw::c_int, - >, - pub xRead: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - arg2: *mut ::std::os::raw::c_void, - iAmt: ::std::os::raw::c_int, - iOfst: sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xWrite: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - arg2: *const ::std::os::raw::c_void, - iAmt: ::std::os::raw::c_int, - iOfst: sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xTruncate: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_file, size: sqlite3_int64) -> ::std::os::raw::c_int, - >, - pub xSync: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xFileSize: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - pSize: *mut sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xLock: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xUnlock: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xCheckReservedLock: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - pResOut: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xFileControl: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - op: ::std::os::raw::c_int, - pArg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - pub xSectorSize: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_file) -> ::std::os::raw::c_int, - >, - pub xDeviceCharacteristics: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_file) -> ::std::os::raw::c_int, - >, - pub xShmMap: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - iPg: ::std::os::raw::c_int, - pgsz: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - pub xShmLock: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - offset: ::std::os::raw::c_int, - n: ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xShmBarrier: ::std::option::Option, - pub xShmUnmap: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - deleteFlag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xFetch: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - iOfst: sqlite3_int64, - iAmt: ::std::os::raw::c_int, - pp: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - pub xUnfetch: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - iOfst: sqlite3_int64, - p: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_mutex { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_api_routines { - _unused: [u8; 0], -} -pub type sqlite3_filename = *const ::std::os::raw::c_char; -pub type sqlite3_syscall_ptr = ::std::option::Option; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_vfs { - pub iVersion: ::std::os::raw::c_int, - pub szOsFile: ::std::os::raw::c_int, - pub mxPathname: ::std::os::raw::c_int, - pub pNext: *mut sqlite3_vfs, - pub zName: *const ::std::os::raw::c_char, - pub pAppData: *mut ::std::os::raw::c_void, - pub xOpen: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: sqlite3_filename, - arg2: *mut sqlite3_file, - flags: ::std::os::raw::c_int, - pOutFlags: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xDelete: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: *const ::std::os::raw::c_char, - syncDir: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xAccess: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - pResOut: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xFullPathname: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: *const ::std::os::raw::c_char, - nOut: ::std::os::raw::c_int, - zOut: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub xDlOpen: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zFilename: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_void, - >, - pub xDlError: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - nByte: ::std::os::raw::c_int, - zErrMsg: *mut ::std::os::raw::c_char, - ), - >, - pub xDlSym: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - arg2: *mut ::std::os::raw::c_void, - zSymbol: *const ::std::os::raw::c_char, - ) -> ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - arg2: *mut ::std::os::raw::c_void, - zSymbol: *const ::std::os::raw::c_char, - ), - >, - >, - pub xDlClose: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_vfs, arg2: *mut ::std::os::raw::c_void), - >, - pub xRandomness: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - nByte: ::std::os::raw::c_int, - zOut: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub xSleep: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - microseconds: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xCurrentTime: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_vfs, arg2: *mut f64) -> ::std::os::raw::c_int, - >, - pub xGetLastError: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub xCurrentTimeInt64: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - arg2: *mut sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xSetSystemCall: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: *const ::std::os::raw::c_char, - arg2: sqlite3_syscall_ptr, - ) -> ::std::os::raw::c_int, - >, - pub xGetSystemCall: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: *const ::std::os::raw::c_char, - ) -> sqlite3_syscall_ptr, - >, - pub xNextSystemCall: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: *const ::std::os::raw::c_char, - ) -> *const ::std::os::raw::c_char, - >, -} -extern "C" { - pub fn sqlite3_initialize() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_shutdown() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_os_init() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_os_end() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_config(arg1: ::std::os::raw::c_int, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_config( - arg1: *mut sqlite3, - op: ::std::os::raw::c_int, - ... - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_mem_methods { - pub xMalloc: ::std::option::Option< - unsafe extern "C" fn(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_void, - >, - pub xFree: ::std::option::Option, - pub xRealloc: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void, - >, - pub xSize: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - pub xRoundup: ::std::option::Option< - unsafe extern "C" fn(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int, - >, - pub xInit: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - pub xShutdown: ::std::option::Option, - pub pAppData: *mut ::std::os::raw::c_void, -} -extern "C" { - pub fn sqlite3_extended_result_codes( - arg1: *mut sqlite3, - onoff: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_last_insert_rowid(arg1: *mut sqlite3) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_set_last_insert_rowid(arg1: *mut sqlite3, arg2: sqlite3_int64); -} -extern "C" { - pub fn sqlite3_changes(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_changes64(arg1: *mut sqlite3) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_total_changes(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_total_changes64(arg1: *mut sqlite3) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_interrupt(arg1: *mut sqlite3); -} -extern "C" { - pub fn sqlite3_is_interrupted(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_complete(sql: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_complete16(sql: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_busy_handler( - arg1: *mut sqlite3, - arg2: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - arg3: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_busy_timeout( - arg1: *mut sqlite3, - ms: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_get_table( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_char, - pazResult: *mut *mut *mut ::std::os::raw::c_char, - pnRow: *mut ::std::os::raw::c_int, - pnColumn: *mut ::std::os::raw::c_int, - pzErrmsg: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_free_table(result: *mut *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sqlite3_mprintf(arg1: *const ::std::os::raw::c_char, ...) - -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_snprintf( - arg1: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_char, - arg3: *const ::std::os::raw::c_char, - ... - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_malloc(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_malloc64(arg1: sqlite3_uint64) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_realloc( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_realloc64( - arg1: *mut ::std::os::raw::c_void, - arg2: sqlite3_uint64, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_free(arg1: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn sqlite3_msize(arg1: *mut ::std::os::raw::c_void) -> sqlite3_uint64; -} -extern "C" { - pub fn sqlite3_memory_used() -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_memory_highwater(resetFlag: ::std::os::raw::c_int) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_randomness(N: ::std::os::raw::c_int, P: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn sqlite3_set_authorizer( - arg1: *mut sqlite3, - xAuth: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - arg4: *const ::std::os::raw::c_char, - arg5: *const ::std::os::raw::c_char, - arg6: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pUserData: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_trace( - arg1: *mut sqlite3, - xTrace: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - ), - >, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_profile( - arg1: *mut sqlite3, - xProfile: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - arg3: sqlite3_uint64, - ), - >, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_trace_v2( - arg1: *mut sqlite3, - uMask: ::std::os::raw::c_uint, - xCallback: ::std::option::Option< - unsafe extern "C" fn( - arg1: ::std::os::raw::c_uint, - arg2: *mut ::std::os::raw::c_void, - arg3: *mut ::std::os::raw::c_void, - arg4: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - pCtx: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_progress_handler( - arg1: *mut sqlite3, - arg2: ::std::os::raw::c_int, - arg3: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - arg4: *mut ::std::os::raw::c_void, - ); -} -extern "C" { - pub fn sqlite3_open( - filename: *const ::std::os::raw::c_char, - ppDb: *mut *mut sqlite3, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_open16( - filename: *const ::std::os::raw::c_void, - ppDb: *mut *mut sqlite3, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_open_v2( - filename: *const ::std::os::raw::c_char, - ppDb: *mut *mut sqlite3, - flags: ::std::os::raw::c_int, - zVfs: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_uri_parameter( - z: sqlite3_filename, - zParam: *const ::std::os::raw::c_char, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_uri_boolean( - z: sqlite3_filename, - zParam: *const ::std::os::raw::c_char, - bDefault: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_uri_int64( - arg1: sqlite3_filename, - arg2: *const ::std::os::raw::c_char, - arg3: sqlite3_int64, - ) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_uri_key( - z: sqlite3_filename, - N: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_filename_database(arg1: sqlite3_filename) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_filename_journal(arg1: sqlite3_filename) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_filename_wal(arg1: sqlite3_filename) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_database_file_object(arg1: *const ::std::os::raw::c_char) -> *mut sqlite3_file; -} -extern "C" { - pub fn sqlite3_create_filename( - zDatabase: *const ::std::os::raw::c_char, - zJournal: *const ::std::os::raw::c_char, - zWal: *const ::std::os::raw::c_char, - nParam: ::std::os::raw::c_int, - azParam: *mut *const ::std::os::raw::c_char, - ) -> sqlite3_filename; -} -extern "C" { - pub fn sqlite3_free_filename(arg1: sqlite3_filename); -} -extern "C" { - pub fn sqlite3_errcode(db: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_extended_errcode(db: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_errmsg(arg1: *mut sqlite3) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_errmsg16(arg1: *mut sqlite3) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_errstr(arg1: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_error_offset(db: *mut sqlite3) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_stmt { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3_limit( - arg1: *mut sqlite3, - id: ::std::os::raw::c_int, - newVal: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_char, - nByte: ::std::os::raw::c_int, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare_v2( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_char, - nByte: ::std::os::raw::c_int, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare_v3( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_char, - nByte: ::std::os::raw::c_int, - prepFlags: ::std::os::raw::c_uint, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare16( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_void, - nByte: ::std::os::raw::c_int, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare16_v2( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_void, - nByte: ::std::os::raw::c_int, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare16_v3( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_void, - nByte: ::std::os::raw::c_int, - prepFlags: ::std::os::raw::c_uint, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_sql(pStmt: *mut sqlite3_stmt) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_expanded_sql(pStmt: *mut sqlite3_stmt) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_stmt_readonly(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_isexplain(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_busy(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_value { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_context { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3_bind_blob( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - arg4: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_blob64( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - arg4: sqlite3_uint64, - arg5: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_double( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: f64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_int( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_int64( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: sqlite3_int64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_null( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_text( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - arg5: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_text16( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - arg4: ::std::os::raw::c_int, - arg5: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_text64( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - arg4: sqlite3_uint64, - arg5: ::std::option::Option, - encoding: ::std::os::raw::c_uchar, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_value( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_pointer( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_void, - arg4: *const ::std::os::raw::c_char, - arg5: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_zeroblob( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - n: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_zeroblob64( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: sqlite3_uint64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_parameter_count(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_parameter_name( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_bind_parameter_index( - arg1: *mut sqlite3_stmt, - zName: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_clear_bindings(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_count(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_name( - arg1: *mut sqlite3_stmt, - N: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_name16( - arg1: *mut sqlite3_stmt, - N: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_database_name( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_database_name16( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_table_name( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_table_name16( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_origin_name( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_origin_name16( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_decltype( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_decltype16( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_step(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_data_count(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_blob( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_double(arg1: *mut sqlite3_stmt, iCol: ::std::os::raw::c_int) -> f64; -} -extern "C" { - pub fn sqlite3_column_int( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_int64( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_column_text( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_uchar; -} -extern "C" { - pub fn sqlite3_column_text16( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_value( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> *mut sqlite3_value; -} -extern "C" { - pub fn sqlite3_column_bytes( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_bytes16( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_type( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_finalize(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_reset(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_function( - db: *mut sqlite3, - zFunctionName: *const ::std::os::raw::c_char, - nArg: ::std::os::raw::c_int, - eTextRep: ::std::os::raw::c_int, - pApp: *mut ::std::os::raw::c_void, - xFunc: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xStep: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xFinal: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_function16( - db: *mut sqlite3, - zFunctionName: *const ::std::os::raw::c_void, - nArg: ::std::os::raw::c_int, - eTextRep: ::std::os::raw::c_int, - pApp: *mut ::std::os::raw::c_void, - xFunc: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xStep: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xFinal: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_function_v2( - db: *mut sqlite3, - zFunctionName: *const ::std::os::raw::c_char, - nArg: ::std::os::raw::c_int, - eTextRep: ::std::os::raw::c_int, - pApp: *mut ::std::os::raw::c_void, - xFunc: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xStep: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xFinal: ::std::option::Option, - xDestroy: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_window_function( - db: *mut sqlite3, - zFunctionName: *const ::std::os::raw::c_char, - nArg: ::std::os::raw::c_int, - eTextRep: ::std::os::raw::c_int, - pApp: *mut ::std::os::raw::c_void, - xStep: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xFinal: ::std::option::Option, - xValue: ::std::option::Option, - xInverse: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xDestroy: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_aggregate_count(arg1: *mut sqlite3_context) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_expired(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_transfer_bindings( - arg1: *mut sqlite3_stmt, - arg2: *mut sqlite3_stmt, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_global_recover() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_thread_cleanup(); -} -extern "C" { - pub fn sqlite3_memory_alarm( - arg1: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: sqlite3_int64, - arg3: ::std::os::raw::c_int, - ), - >, - arg2: *mut ::std::os::raw::c_void, - arg3: sqlite3_int64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_blob(arg1: *mut sqlite3_value) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_double(arg1: *mut sqlite3_value) -> f64; -} -extern "C" { - pub fn sqlite3_value_int(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_int64(arg1: *mut sqlite3_value) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_value_pointer( - arg1: *mut sqlite3_value, - arg2: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_text(arg1: *mut sqlite3_value) -> *const ::std::os::raw::c_uchar; -} -extern "C" { - pub fn sqlite3_value_text16(arg1: *mut sqlite3_value) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_text16le(arg1: *mut sqlite3_value) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_text16be(arg1: *mut sqlite3_value) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_bytes(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_bytes16(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_type(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_numeric_type(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_nochange(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_frombind(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_encoding(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_subtype(arg1: *mut sqlite3_value) -> ::std::os::raw::c_uint; -} -extern "C" { - pub fn sqlite3_value_dup(arg1: *const sqlite3_value) -> *mut sqlite3_value; -} -extern "C" { - pub fn sqlite3_value_free(arg1: *mut sqlite3_value); -} -extern "C" { - pub fn sqlite3_aggregate_context( - arg1: *mut sqlite3_context, - nBytes: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_user_data(arg1: *mut sqlite3_context) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_context_db_handle(arg1: *mut sqlite3_context) -> *mut sqlite3; -} -extern "C" { - pub fn sqlite3_get_auxdata( - arg1: *mut sqlite3_context, - N: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_set_auxdata( - arg1: *mut sqlite3_context, - N: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::option::Option, - ); -} -pub type sqlite3_destructor_type = - ::std::option::Option; -extern "C" { - pub fn sqlite3_result_blob( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_blob64( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: sqlite3_uint64, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_double(arg1: *mut sqlite3_context, arg2: f64); -} -extern "C" { - pub fn sqlite3_result_error( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn sqlite3_result_error16( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn sqlite3_result_error_toobig(arg1: *mut sqlite3_context); -} -extern "C" { - pub fn sqlite3_result_error_nomem(arg1: *mut sqlite3_context); -} -extern "C" { - pub fn sqlite3_result_error_code(arg1: *mut sqlite3_context, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_result_int(arg1: *mut sqlite3_context, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_result_int64(arg1: *mut sqlite3_context, arg2: sqlite3_int64); -} -extern "C" { - pub fn sqlite3_result_null(arg1: *mut sqlite3_context); -} -extern "C" { - pub fn sqlite3_result_text( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_text64( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_char, - arg3: sqlite3_uint64, - arg4: ::std::option::Option, - encoding: ::std::os::raw::c_uchar, - ); -} -extern "C" { - pub fn sqlite3_result_text16( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_text16le( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_text16be( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_value(arg1: *mut sqlite3_context, arg2: *mut sqlite3_value); -} -extern "C" { - pub fn sqlite3_result_pointer( - arg1: *mut sqlite3_context, - arg2: *mut ::std::os::raw::c_void, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_zeroblob(arg1: *mut sqlite3_context, n: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_result_zeroblob64( - arg1: *mut sqlite3_context, - n: sqlite3_uint64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_result_subtype(arg1: *mut sqlite3_context, arg2: ::std::os::raw::c_uint); -} -extern "C" { - pub fn sqlite3_create_collation( - arg1: *mut sqlite3, - zName: *const ::std::os::raw::c_char, - eTextRep: ::std::os::raw::c_int, - pArg: *mut ::std::os::raw::c_void, - xCompare: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - arg4: ::std::os::raw::c_int, - arg5: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_collation_v2( - arg1: *mut sqlite3, - zName: *const ::std::os::raw::c_char, - eTextRep: ::std::os::raw::c_int, - pArg: *mut ::std::os::raw::c_void, - xCompare: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - arg4: ::std::os::raw::c_int, - arg5: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - xDestroy: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_collation16( - arg1: *mut sqlite3, - zName: *const ::std::os::raw::c_void, - eTextRep: ::std::os::raw::c_int, - pArg: *mut ::std::os::raw::c_void, - xCompare: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - arg4: ::std::os::raw::c_int, - arg5: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_collation_needed( - arg1: *mut sqlite3, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut sqlite3, - eTextRep: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - ), - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_collation_needed16( - arg1: *mut sqlite3, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut sqlite3, - eTextRep: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - ), - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_sleep(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub static mut sqlite3_temp_directory: *mut ::std::os::raw::c_char; -} -extern "C" { - pub static mut sqlite3_data_directory: *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_win32_set_directory( - type_: ::std::os::raw::c_ulong, - zValue: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_win32_set_directory8( - type_: ::std::os::raw::c_ulong, - zValue: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_win32_set_directory16( - type_: ::std::os::raw::c_ulong, - zValue: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_get_autocommit(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_handle(arg1: *mut sqlite3_stmt) -> *mut sqlite3; -} -extern "C" { - pub fn sqlite3_db_name( - db: *mut sqlite3, - N: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_db_filename( - db: *mut sqlite3, - zDbName: *const ::std::os::raw::c_char, - ) -> sqlite3_filename; -} -extern "C" { - pub fn sqlite3_db_readonly( - db: *mut sqlite3, - zDbName: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_txn_state( - arg1: *mut sqlite3, - zSchema: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_next_stmt(pDb: *mut sqlite3, pStmt: *mut sqlite3_stmt) -> *mut sqlite3_stmt; -} -extern "C" { - pub fn sqlite3_commit_hook( - arg1: *mut sqlite3, - arg2: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_rollback_hook( - arg1: *mut sqlite3, - arg2: ::std::option::Option, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_autovacuum_pages( - db: *mut sqlite3, - arg1: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_uint, - arg4: ::std::os::raw::c_uint, - arg5: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_uint, - >, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_update_hook( - arg1: *mut sqlite3, - arg2: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - arg4: *const ::std::os::raw::c_char, - arg5: sqlite3_int64, - ), - >, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_enable_shared_cache(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_release_memory(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_release_memory(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_soft_heap_limit64(N: sqlite3_int64) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_hard_heap_limit64(N: sqlite3_int64) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_soft_heap_limit(N: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_table_column_metadata( - db: *mut sqlite3, - zDbName: *const ::std::os::raw::c_char, - zTableName: *const ::std::os::raw::c_char, - zColumnName: *const ::std::os::raw::c_char, - pzDataType: *mut *const ::std::os::raw::c_char, - pzCollSeq: *mut *const ::std::os::raw::c_char, - pNotNull: *mut ::std::os::raw::c_int, - pPrimaryKey: *mut ::std::os::raw::c_int, - pAutoinc: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_load_extension( - db: *mut sqlite3, - zFile: *const ::std::os::raw::c_char, - zProc: *const ::std::os::raw::c_char, - pzErrMsg: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_enable_load_extension( - db: *mut sqlite3, - onoff: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_auto_extension( - xEntryPoint: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_cancel_auto_extension( - xEntryPoint: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_reset_auto_extension(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_module { - pub iVersion: ::std::os::raw::c_int, - pub xCreate: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3, - pAux: *mut ::std::os::raw::c_void, - argc: ::std::os::raw::c_int, - argv: *const *const ::std::os::raw::c_char, - ppVTab: *mut *mut sqlite3_vtab, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub xConnect: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3, - pAux: *mut ::std::os::raw::c_void, - argc: ::std::os::raw::c_int, - argv: *const *const ::std::os::raw::c_char, - ppVTab: *mut *mut sqlite3_vtab, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub xBestIndex: ::std::option::Option< - unsafe extern "C" fn( - pVTab: *mut sqlite3_vtab, - arg1: *mut sqlite3_index_info, - ) -> ::std::os::raw::c_int, - >, - pub xDisconnect: ::std::option::Option< - unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::std::os::raw::c_int, - >, - pub xDestroy: ::std::option::Option< - unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::std::os::raw::c_int, - >, - pub xOpen: ::std::option::Option< - unsafe extern "C" fn( - pVTab: *mut sqlite3_vtab, - ppCursor: *mut *mut sqlite3_vtab_cursor, - ) -> ::std::os::raw::c_int, - >, - pub xClose: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_vtab_cursor) -> ::std::os::raw::c_int, - >, - pub xFilter: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vtab_cursor, - idxNum: ::std::os::raw::c_int, - idxStr: *const ::std::os::raw::c_char, - argc: ::std::os::raw::c_int, - argv: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int, - >, - pub xNext: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_vtab_cursor) -> ::std::os::raw::c_int, - >, - pub xEof: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_vtab_cursor) -> ::std::os::raw::c_int, - >, - pub xColumn: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vtab_cursor, - arg2: *mut sqlite3_context, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xRowid: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vtab_cursor, - pRowid: *mut sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xUpdate: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vtab, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - arg4: *mut sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xBegin: ::std::option::Option< - unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::std::os::raw::c_int, - >, - pub xSync: ::std::option::Option< - unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::std::os::raw::c_int, - >, - pub xCommit: ::std::option::Option< - unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::std::os::raw::c_int, - >, - pub xRollback: ::std::option::Option< - unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::std::os::raw::c_int, - >, - pub xFindFunction: ::std::option::Option< - unsafe extern "C" fn( - pVtab: *mut sqlite3_vtab, - nArg: ::std::os::raw::c_int, - zName: *const ::std::os::raw::c_char, - pxFunc: *mut ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - ppArg: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - pub xRename: ::std::option::Option< - unsafe extern "C" fn( - pVtab: *mut sqlite3_vtab, - zNew: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub xSavepoint: ::std::option::Option< - unsafe extern "C" fn( - pVTab: *mut sqlite3_vtab, - arg1: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xRelease: ::std::option::Option< - unsafe extern "C" fn( - pVTab: *mut sqlite3_vtab, - arg1: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xRollbackTo: ::std::option::Option< - unsafe extern "C" fn( - pVTab: *mut sqlite3_vtab, - arg1: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xShadowName: ::std::option::Option< - unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int, - >, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_index_info { - pub nConstraint: ::std::os::raw::c_int, - pub aConstraint: *mut sqlite3_index_constraint, - pub nOrderBy: ::std::os::raw::c_int, - pub aOrderBy: *mut sqlite3_index_orderby, - pub aConstraintUsage: *mut sqlite3_index_constraint_usage, - pub idxNum: ::std::os::raw::c_int, - pub idxStr: *mut ::std::os::raw::c_char, - pub needToFreeIdxStr: ::std::os::raw::c_int, - pub orderByConsumed: ::std::os::raw::c_int, - pub estimatedCost: f64, - pub estimatedRows: sqlite3_int64, - pub idxFlags: ::std::os::raw::c_int, - pub colUsed: sqlite3_uint64, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_index_constraint { - pub iColumn: ::std::os::raw::c_int, - pub op: ::std::os::raw::c_uchar, - pub usable: ::std::os::raw::c_uchar, - pub iTermOffset: ::std::os::raw::c_int, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_index_orderby { - pub iColumn: ::std::os::raw::c_int, - pub desc: ::std::os::raw::c_uchar, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_index_constraint_usage { - pub argvIndex: ::std::os::raw::c_int, - pub omit: ::std::os::raw::c_uchar, -} -extern "C" { - pub fn sqlite3_create_module( - db: *mut sqlite3, - zName: *const ::std::os::raw::c_char, - p: *const sqlite3_module, - pClientData: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_module_v2( - db: *mut sqlite3, - zName: *const ::std::os::raw::c_char, - p: *const sqlite3_module, - pClientData: *mut ::std::os::raw::c_void, - xDestroy: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_drop_modules( - db: *mut sqlite3, - azKeep: *mut *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_vtab { - pub pModule: *const sqlite3_module, - pub nRef: ::std::os::raw::c_int, - pub zErrMsg: *mut ::std::os::raw::c_char, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_vtab_cursor { - pub pVtab: *mut sqlite3_vtab, -} -extern "C" { - pub fn sqlite3_declare_vtab( - arg1: *mut sqlite3, - zSQL: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_overload_function( - arg1: *mut sqlite3, - zFuncName: *const ::std::os::raw::c_char, - nArg: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_blob { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3_blob_open( - arg1: *mut sqlite3, - zDb: *const ::std::os::raw::c_char, - zTable: *const ::std::os::raw::c_char, - zColumn: *const ::std::os::raw::c_char, - iRow: sqlite3_int64, - flags: ::std::os::raw::c_int, - ppBlob: *mut *mut sqlite3_blob, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_reopen( - arg1: *mut sqlite3_blob, - arg2: sqlite3_int64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_close(arg1: *mut sqlite3_blob) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_bytes(arg1: *mut sqlite3_blob) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_read( - arg1: *mut sqlite3_blob, - Z: *mut ::std::os::raw::c_void, - N: ::std::os::raw::c_int, - iOffset: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_write( - arg1: *mut sqlite3_blob, - z: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - iOffset: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vfs_find(zVfsName: *const ::std::os::raw::c_char) -> *mut sqlite3_vfs; -} -extern "C" { - pub fn sqlite3_vfs_register( - arg1: *mut sqlite3_vfs, - makeDflt: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vfs_unregister(arg1: *mut sqlite3_vfs) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_mutex_alloc(arg1: ::std::os::raw::c_int) -> *mut sqlite3_mutex; -} -extern "C" { - pub fn sqlite3_mutex_free(arg1: *mut sqlite3_mutex); -} -extern "C" { - pub fn sqlite3_mutex_enter(arg1: *mut sqlite3_mutex); -} -extern "C" { - pub fn sqlite3_mutex_try(arg1: *mut sqlite3_mutex) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_mutex_leave(arg1: *mut sqlite3_mutex); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_mutex_methods { - pub xMutexInit: ::std::option::Option ::std::os::raw::c_int>, - pub xMutexEnd: ::std::option::Option ::std::os::raw::c_int>, - pub xMutexAlloc: ::std::option::Option< - unsafe extern "C" fn(arg1: ::std::os::raw::c_int) -> *mut sqlite3_mutex, - >, - pub xMutexFree: ::std::option::Option, - pub xMutexEnter: ::std::option::Option, - pub xMutexTry: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_mutex) -> ::std::os::raw::c_int, - >, - pub xMutexLeave: ::std::option::Option, - pub xMutexHeld: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_mutex) -> ::std::os::raw::c_int, - >, - pub xMutexNotheld: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_mutex) -> ::std::os::raw::c_int, - >, -} -extern "C" { - pub fn sqlite3_mutex_held(arg1: *mut sqlite3_mutex) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_mutex_notheld(arg1: *mut sqlite3_mutex) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_mutex(arg1: *mut sqlite3) -> *mut sqlite3_mutex; -} -extern "C" { - pub fn sqlite3_file_control( - arg1: *mut sqlite3, - zDbName: *const ::std::os::raw::c_char, - op: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_test_control(op: ::std::os::raw::c_int, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_keyword_count() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_keyword_name( - arg1: ::std::os::raw::c_int, - arg2: *mut *const ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_keyword_check( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_str { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3_str_new(arg1: *mut sqlite3) -> *mut sqlite3_str; -} -extern "C" { - pub fn sqlite3_str_finish(arg1: *mut sqlite3_str) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_str_appendf(arg1: *mut sqlite3_str, zFormat: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn sqlite3_str_append( - arg1: *mut sqlite3_str, - zIn: *const ::std::os::raw::c_char, - N: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn sqlite3_str_appendall(arg1: *mut sqlite3_str, zIn: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn sqlite3_str_appendchar( - arg1: *mut sqlite3_str, - N: ::std::os::raw::c_int, - C: ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn sqlite3_str_reset(arg1: *mut sqlite3_str); -} -extern "C" { - pub fn sqlite3_str_errcode(arg1: *mut sqlite3_str) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_str_length(arg1: *mut sqlite3_str) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_str_value(arg1: *mut sqlite3_str) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_status( - op: ::std::os::raw::c_int, - pCurrent: *mut ::std::os::raw::c_int, - pHighwater: *mut ::std::os::raw::c_int, - resetFlag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_status64( - op: ::std::os::raw::c_int, - pCurrent: *mut sqlite3_int64, - pHighwater: *mut sqlite3_int64, - resetFlag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_status( - arg1: *mut sqlite3, - op: ::std::os::raw::c_int, - pCur: *mut ::std::os::raw::c_int, - pHiwtr: *mut ::std::os::raw::c_int, - resetFlg: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_status( - arg1: *mut sqlite3_stmt, - op: ::std::os::raw::c_int, - resetFlg: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_pcache { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_pcache_page { - pub pBuf: *mut ::std::os::raw::c_void, - pub pExtra: *mut ::std::os::raw::c_void, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_pcache_methods2 { - pub iVersion: ::std::os::raw::c_int, - pub pArg: *mut ::std::os::raw::c_void, - pub xInit: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - pub xShutdown: ::std::option::Option, - pub xCreate: ::std::option::Option< - unsafe extern "C" fn( - szPage: ::std::os::raw::c_int, - szExtra: ::std::os::raw::c_int, - bPurgeable: ::std::os::raw::c_int, - ) -> *mut sqlite3_pcache, - >, - pub xCachesize: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_pcache, nCachesize: ::std::os::raw::c_int), - >, - pub xPagecount: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_pcache) -> ::std::os::raw::c_int, - >, - pub xFetch: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_pcache, - key: ::std::os::raw::c_uint, - createFlag: ::std::os::raw::c_int, - ) -> *mut sqlite3_pcache_page, - >, - pub xUnpin: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_pcache, - arg2: *mut sqlite3_pcache_page, - discard: ::std::os::raw::c_int, - ), - >, - pub xRekey: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_pcache, - arg2: *mut sqlite3_pcache_page, - oldKey: ::std::os::raw::c_uint, - newKey: ::std::os::raw::c_uint, - ), - >, - pub xTruncate: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_pcache, iLimit: ::std::os::raw::c_uint), - >, - pub xDestroy: ::std::option::Option, - pub xShrink: ::std::option::Option, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_pcache_methods { - pub pArg: *mut ::std::os::raw::c_void, - pub xInit: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - pub xShutdown: ::std::option::Option, - pub xCreate: ::std::option::Option< - unsafe extern "C" fn( - szPage: ::std::os::raw::c_int, - bPurgeable: ::std::os::raw::c_int, - ) -> *mut sqlite3_pcache, - >, - pub xCachesize: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_pcache, nCachesize: ::std::os::raw::c_int), - >, - pub xPagecount: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_pcache) -> ::std::os::raw::c_int, - >, - pub xFetch: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_pcache, - key: ::std::os::raw::c_uint, - createFlag: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void, - >, - pub xUnpin: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_pcache, - arg2: *mut ::std::os::raw::c_void, - discard: ::std::os::raw::c_int, - ), - >, - pub xRekey: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_pcache, - arg2: *mut ::std::os::raw::c_void, - oldKey: ::std::os::raw::c_uint, - newKey: ::std::os::raw::c_uint, - ), - >, - pub xTruncate: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_pcache, iLimit: ::std::os::raw::c_uint), - >, - pub xDestroy: ::std::option::Option, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_backup { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3_backup_init( - pDest: *mut sqlite3, - zDestName: *const ::std::os::raw::c_char, - pSource: *mut sqlite3, - zSourceName: *const ::std::os::raw::c_char, - ) -> *mut sqlite3_backup; -} -extern "C" { - pub fn sqlite3_backup_step( - p: *mut sqlite3_backup, - nPage: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_backup_finish(p: *mut sqlite3_backup) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_backup_remaining(p: *mut sqlite3_backup) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_backup_pagecount(p: *mut sqlite3_backup) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_unlock_notify( - pBlocked: *mut sqlite3, - xNotify: ::std::option::Option< - unsafe extern "C" fn( - apArg: *mut *mut ::std::os::raw::c_void, - nArg: ::std::os::raw::c_int, - ), - >, - pNotifyArg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stricmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_strnicmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_strglob( - zGlob: *const ::std::os::raw::c_char, - zStr: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_strlike( - zGlob: *const ::std::os::raw::c_char, - zStr: *const ::std::os::raw::c_char, - cEsc: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_log( - iErrCode: ::std::os::raw::c_int, - zFormat: *const ::std::os::raw::c_char, - ... - ); -} -extern "C" { - pub fn sqlite3_wal_hook( - arg1: *mut sqlite3, - arg2: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut sqlite3, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_wal_autocheckpoint( - db: *mut sqlite3, - N: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_wal_checkpoint( - db: *mut sqlite3, - zDb: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_wal_checkpoint_v2( - db: *mut sqlite3, - zDb: *const ::std::os::raw::c_char, - eMode: ::std::os::raw::c_int, - pnLog: *mut ::std::os::raw::c_int, - pnCkpt: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_config( - arg1: *mut sqlite3, - op: ::std::os::raw::c_int, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_on_conflict(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_nochange(arg1: *mut sqlite3_context) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_collation( - arg1: *mut sqlite3_index_info, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_vtab_distinct(arg1: *mut sqlite3_index_info) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_in( - arg1: *mut sqlite3_index_info, - iCons: ::std::os::raw::c_int, - bHandle: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_in_first( - pVal: *mut sqlite3_value, - ppOut: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_in_next( - pVal: *mut sqlite3_value, - ppOut: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_rhs_value( - arg1: *mut sqlite3_index_info, - arg2: ::std::os::raw::c_int, - ppVal: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_scanstatus( - pStmt: *mut sqlite3_stmt, - idx: ::std::os::raw::c_int, - iScanStatusOp: ::std::os::raw::c_int, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_scanstatus_v2( - pStmt: *mut sqlite3_stmt, - idx: ::std::os::raw::c_int, - iScanStatusOp: ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_scanstatus_reset(arg1: *mut sqlite3_stmt); -} -extern "C" { - pub fn sqlite3_db_cacheflush(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_preupdate_hook( - db: *mut sqlite3, - xPreUpdate: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - db: *mut sqlite3, - op: ::std::os::raw::c_int, - zDb: *const ::std::os::raw::c_char, - zName: *const ::std::os::raw::c_char, - iKey1: sqlite3_int64, - iKey2: sqlite3_int64, - ), - >, - arg1: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_preupdate_old( - arg1: *mut sqlite3, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_preupdate_count(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_preupdate_depth(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_preupdate_new( - arg1: *mut sqlite3, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_preupdate_blobwrite(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_system_errno(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_snapshot { - pub hidden: [::std::os::raw::c_uchar; 48usize], -} -extern "C" { - pub fn sqlite3_snapshot_get( - db: *mut sqlite3, - zSchema: *const ::std::os::raw::c_char, - ppSnapshot: *mut *mut sqlite3_snapshot, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_snapshot_open( - db: *mut sqlite3, - zSchema: *const ::std::os::raw::c_char, - pSnapshot: *mut sqlite3_snapshot, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_snapshot_free(arg1: *mut sqlite3_snapshot); -} -extern "C" { - pub fn sqlite3_snapshot_cmp( - p1: *mut sqlite3_snapshot, - p2: *mut sqlite3_snapshot, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_snapshot_recover( - db: *mut sqlite3, - zDb: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_serialize( - db: *mut sqlite3, - zSchema: *const ::std::os::raw::c_char, - piSize: *mut sqlite3_int64, - mFlags: ::std::os::raw::c_uint, - ) -> *mut ::std::os::raw::c_uchar; -} -extern "C" { - pub fn sqlite3_deserialize( - db: *mut sqlite3, - zSchema: *const ::std::os::raw::c_char, - pData: *mut ::std::os::raw::c_uchar, - szDb: sqlite3_int64, - szBuf: sqlite3_int64, - mFlags: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -pub type sqlite3_rtree_dbl = f64; -extern "C" { - pub fn sqlite3_rtree_geometry_callback( - db: *mut sqlite3, - zGeom: *const ::std::os::raw::c_char, - xGeom: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_rtree_geometry, - arg2: ::std::os::raw::c_int, - arg3: *mut sqlite3_rtree_dbl, - arg4: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pContext: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_rtree_geometry { - pub pContext: *mut ::std::os::raw::c_void, - pub nParam: ::std::os::raw::c_int, - pub aParam: *mut sqlite3_rtree_dbl, - pub pUser: *mut ::std::os::raw::c_void, - pub xDelUser: ::std::option::Option, -} -extern "C" { - pub fn sqlite3_rtree_query_callback( - db: *mut sqlite3, - zQueryFunc: *const ::std::os::raw::c_char, - xQueryFunc: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_rtree_query_info) -> ::std::os::raw::c_int, - >, - pContext: *mut ::std::os::raw::c_void, - xDestructor: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_rtree_query_info { - pub pContext: *mut ::std::os::raw::c_void, - pub nParam: ::std::os::raw::c_int, - pub aParam: *mut sqlite3_rtree_dbl, - pub pUser: *mut ::std::os::raw::c_void, - pub xDelUser: ::std::option::Option, - pub aCoord: *mut sqlite3_rtree_dbl, - pub anQueue: *mut ::std::os::raw::c_uint, - pub nCoord: ::std::os::raw::c_int, - pub iLevel: ::std::os::raw::c_int, - pub mxLevel: ::std::os::raw::c_int, - pub iRowid: sqlite3_int64, - pub rParentScore: sqlite3_rtree_dbl, - pub eParentWithin: ::std::os::raw::c_int, - pub eWithin: ::std::os::raw::c_int, - pub rScore: sqlite3_rtree_dbl, - pub apSqlParam: *mut *mut sqlite3_value, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_session { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_changeset_iter { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3session_create( - db: *mut sqlite3, - zDb: *const ::std::os::raw::c_char, - ppSession: *mut *mut sqlite3_session, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_delete(pSession: *mut sqlite3_session); -} -extern "C" { - pub fn sqlite3session_object_config( - arg1: *mut sqlite3_session, - op: ::std::os::raw::c_int, - pArg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_enable( - pSession: *mut sqlite3_session, - bEnable: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_indirect( - pSession: *mut sqlite3_session, - bIndirect: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_attach( - pSession: *mut sqlite3_session, - zTab: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_table_filter( - pSession: *mut sqlite3_session, - xFilter: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - zTab: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pCtx: *mut ::std::os::raw::c_void, - ); -} -extern "C" { - pub fn sqlite3session_changeset( - pSession: *mut sqlite3_session, - pnChangeset: *mut ::std::os::raw::c_int, - ppChangeset: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_changeset_size(pSession: *mut sqlite3_session) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3session_diff( - pSession: *mut sqlite3_session, - zFromDb: *const ::std::os::raw::c_char, - zTbl: *const ::std::os::raw::c_char, - pzErrMsg: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_patchset( - pSession: *mut sqlite3_session, - pnPatchset: *mut ::std::os::raw::c_int, - ppPatchset: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_isempty(pSession: *mut sqlite3_session) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_memory_used(pSession: *mut sqlite3_session) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3changeset_start( - pp: *mut *mut sqlite3_changeset_iter, - nChangeset: ::std::os::raw::c_int, - pChangeset: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_start_v2( - pp: *mut *mut sqlite3_changeset_iter, - nChangeset: ::std::os::raw::c_int, - pChangeset: *mut ::std::os::raw::c_void, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_next(pIter: *mut sqlite3_changeset_iter) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_op( - pIter: *mut sqlite3_changeset_iter, - pzTab: *mut *const ::std::os::raw::c_char, - pnCol: *mut ::std::os::raw::c_int, - pOp: *mut ::std::os::raw::c_int, - pbIndirect: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_pk( - pIter: *mut sqlite3_changeset_iter, - pabPK: *mut *mut ::std::os::raw::c_uchar, - pnCol: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_old( - pIter: *mut sqlite3_changeset_iter, - iVal: ::std::os::raw::c_int, - ppValue: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_new( - pIter: *mut sqlite3_changeset_iter, - iVal: ::std::os::raw::c_int, - ppValue: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_conflict( - pIter: *mut sqlite3_changeset_iter, - iVal: ::std::os::raw::c_int, - ppValue: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_fk_conflicts( - pIter: *mut sqlite3_changeset_iter, - pnOut: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_finalize(pIter: *mut sqlite3_changeset_iter) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_invert( - nIn: ::std::os::raw::c_int, - pIn: *const ::std::os::raw::c_void, - pnOut: *mut ::std::os::raw::c_int, - ppOut: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_concat( - nA: ::std::os::raw::c_int, - pA: *mut ::std::os::raw::c_void, - nB: ::std::os::raw::c_int, - pB: *mut ::std::os::raw::c_void, - pnOut: *mut ::std::os::raw::c_int, - ppOut: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_changegroup { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3changegroup_new(pp: *mut *mut sqlite3_changegroup) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changegroup_add( - arg1: *mut sqlite3_changegroup, - nData: ::std::os::raw::c_int, - pData: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changegroup_output( - arg1: *mut sqlite3_changegroup, - pnData: *mut ::std::os::raw::c_int, - ppData: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changegroup_delete(arg1: *mut sqlite3_changegroup); -} -extern "C" { - pub fn sqlite3changeset_apply( - db: *mut sqlite3, - nChangeset: ::std::os::raw::c_int, - pChangeset: *mut ::std::os::raw::c_void, - xFilter: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - zTab: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - xConflict: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - eConflict: ::std::os::raw::c_int, - p: *mut sqlite3_changeset_iter, - ) -> ::std::os::raw::c_int, - >, - pCtx: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_apply_v2( - db: *mut sqlite3, - nChangeset: ::std::os::raw::c_int, - pChangeset: *mut ::std::os::raw::c_void, - xFilter: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - zTab: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - xConflict: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - eConflict: ::std::os::raw::c_int, - p: *mut sqlite3_changeset_iter, - ) -> ::std::os::raw::c_int, - >, - pCtx: *mut ::std::os::raw::c_void, - ppRebase: *mut *mut ::std::os::raw::c_void, - pnRebase: *mut ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_rebaser { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3rebaser_create(ppNew: *mut *mut sqlite3_rebaser) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3rebaser_configure( - arg1: *mut sqlite3_rebaser, - nRebase: ::std::os::raw::c_int, - pRebase: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3rebaser_rebase( - arg1: *mut sqlite3_rebaser, - nIn: ::std::os::raw::c_int, - pIn: *const ::std::os::raw::c_void, - pnOut: *mut ::std::os::raw::c_int, - ppOut: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3rebaser_delete(p: *mut sqlite3_rebaser); -} -extern "C" { - pub fn sqlite3changeset_apply_strm( - db: *mut sqlite3, - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - xFilter: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - zTab: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - xConflict: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - eConflict: ::std::os::raw::c_int, - p: *mut sqlite3_changeset_iter, - ) -> ::std::os::raw::c_int, - >, - pCtx: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_apply_v2_strm( - db: *mut sqlite3, - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - xFilter: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - zTab: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - xConflict: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - eConflict: ::std::os::raw::c_int, - p: *mut sqlite3_changeset_iter, - ) -> ::std::os::raw::c_int, - >, - pCtx: *mut ::std::os::raw::c_void, - ppRebase: *mut *mut ::std::os::raw::c_void, - pnRebase: *mut ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_concat_strm( - xInputA: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pInA: *mut ::std::os::raw::c_void, - xInputB: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pInB: *mut ::std::os::raw::c_void, - xOutput: ::std::option::Option< - unsafe extern "C" fn( - pOut: *mut ::std::os::raw::c_void, - pData: *const ::std::os::raw::c_void, - nData: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_invert_strm( - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - xOutput: ::std::option::Option< - unsafe extern "C" fn( - pOut: *mut ::std::os::raw::c_void, - pData: *const ::std::os::raw::c_void, - nData: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_start_strm( - pp: *mut *mut sqlite3_changeset_iter, - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_start_v2_strm( - pp: *mut *mut sqlite3_changeset_iter, - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_changeset_strm( - pSession: *mut sqlite3_session, - xOutput: ::std::option::Option< - unsafe extern "C" fn( - pOut: *mut ::std::os::raw::c_void, - pData: *const ::std::os::raw::c_void, - nData: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_patchset_strm( - pSession: *mut sqlite3_session, - xOutput: ::std::option::Option< - unsafe extern "C" fn( - pOut: *mut ::std::os::raw::c_void, - pData: *const ::std::os::raw::c_void, - nData: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changegroup_add_strm( - arg1: *mut sqlite3_changegroup, - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changegroup_output_strm( - arg1: *mut sqlite3_changegroup, - xOutput: ::std::option::Option< - unsafe extern "C" fn( - pOut: *mut ::std::os::raw::c_void, - pData: *const ::std::os::raw::c_void, - nData: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3rebaser_rebase_strm( - pRebaser: *mut sqlite3_rebaser, - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - xOutput: ::std::option::Option< - unsafe extern "C" fn( - pOut: *mut ::std::os::raw::c_void, - pData: *const ::std::os::raw::c_void, - nData: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_config( - op: ::std::os::raw::c_int, - pArg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Fts5Context { - _unused: [u8; 0], -} -pub type fts5_extension_function = ::std::option::Option< - unsafe extern "C" fn( - pApi: *const Fts5ExtensionApi, - pFts: *mut Fts5Context, - pCtx: *mut sqlite3_context, - nVal: ::std::os::raw::c_int, - apVal: *mut *mut sqlite3_value, - ), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Fts5PhraseIter { - pub a: *const ::std::os::raw::c_uchar, - pub b: *const ::std::os::raw::c_uchar, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Fts5ExtensionApi { - pub iVersion: ::std::os::raw::c_int, - pub xUserData: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Fts5Context) -> *mut ::std::os::raw::c_void, - >, - pub xColumnCount: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Fts5Context) -> ::std::os::raw::c_int, - >, - pub xRowCount: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - pnRow: *mut sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xColumnTotalSize: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iCol: ::std::os::raw::c_int, - pnToken: *mut sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xTokenize: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - pText: *const ::std::os::raw::c_char, - nText: ::std::os::raw::c_int, - pCtx: *mut ::std::os::raw::c_void, - xToken: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int, - >, - pub xPhraseCount: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Fts5Context) -> ::std::os::raw::c_int, - >, - pub xPhraseSize: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iPhrase: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xInstCount: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - pnInst: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xInst: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iIdx: ::std::os::raw::c_int, - piPhrase: *mut ::std::os::raw::c_int, - piCol: *mut ::std::os::raw::c_int, - piOff: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xRowid: - ::std::option::Option sqlite3_int64>, - pub xColumnText: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iCol: ::std::os::raw::c_int, - pz: *mut *const ::std::os::raw::c_char, - pn: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xColumnSize: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iCol: ::std::os::raw::c_int, - pnToken: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xQueryPhrase: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iPhrase: ::std::os::raw::c_int, - pUserData: *mut ::std::os::raw::c_void, - arg2: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const Fts5ExtensionApi, - arg2: *mut Fts5Context, - arg3: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int, - >, - pub xSetAuxdata: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - pAux: *mut ::std::os::raw::c_void, - xDelete: ::std::option::Option, - ) -> ::std::os::raw::c_int, - >, - pub xGetAuxdata: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - bClear: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void, - >, - pub xPhraseFirst: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iPhrase: ::std::os::raw::c_int, - arg2: *mut Fts5PhraseIter, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xPhraseNext: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - arg2: *mut Fts5PhraseIter, - piCol: *mut ::std::os::raw::c_int, - piOff: *mut ::std::os::raw::c_int, - ), - >, - pub xPhraseFirstColumn: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iPhrase: ::std::os::raw::c_int, - arg2: *mut Fts5PhraseIter, - arg3: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xPhraseNextColumn: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - arg2: *mut Fts5PhraseIter, - piCol: *mut ::std::os::raw::c_int, - ), - >, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Fts5Tokenizer { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct fts5_tokenizer { - pub xCreate: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - azArg: *mut *const ::std::os::raw::c_char, - nArg: ::std::os::raw::c_int, - ppOut: *mut *mut Fts5Tokenizer, - ) -> ::std::os::raw::c_int, - >, - pub xDelete: ::std::option::Option, - pub xTokenize: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Tokenizer, - pCtx: *mut ::std::os::raw::c_void, - flags: ::std::os::raw::c_int, - pText: *const ::std::os::raw::c_char, - nText: ::std::os::raw::c_int, - xToken: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - tflags: ::std::os::raw::c_int, - pToken: *const ::std::os::raw::c_char, - nToken: ::std::os::raw::c_int, - iStart: ::std::os::raw::c_int, - iEnd: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int, - >, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct fts5_api { - pub iVersion: ::std::os::raw::c_int, - pub xCreateTokenizer: ::std::option::Option< - unsafe extern "C" fn( - pApi: *mut fts5_api, - zName: *const ::std::os::raw::c_char, - pContext: *mut ::std::os::raw::c_void, - pTokenizer: *mut fts5_tokenizer, - xDestroy: ::std::option::Option, - ) -> ::std::os::raw::c_int, - >, - pub xFindTokenizer: ::std::option::Option< - unsafe extern "C" fn( - pApi: *mut fts5_api, - zName: *const ::std::os::raw::c_char, - ppContext: *mut *mut ::std::os::raw::c_void, - pTokenizer: *mut fts5_tokenizer, - ) -> ::std::os::raw::c_int, - >, - pub xCreateFunction: ::std::option::Option< - unsafe extern "C" fn( - pApi: *mut fts5_api, - zName: *const ::std::os::raw::c_char, - pContext: *mut ::std::os::raw::c_void, - xFunction: fts5_extension_function, - xDestroy: ::std::option::Option, - ) -> ::std::os::raw::c_int, - >, -} diff --git a/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml b/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml deleted file mode 100644 index 139464b1cab3c..0000000000000 --- a/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# libsqlite3-sys uses a bindgen binding to libsqlite. -# We can't easily import bindgen because of its libclang dependency, -# so in the meantime we need to use pre-generated bindgen files. - -env = { "OUT_DIR" = "$(location //third-party/rust/fixups/libsqlite3-sys:out_dir)" } - -[[buildscript]] -[buildscript.cxx_library] -name = "sqlite3" -srcs = ["sqlite3/sqlite3.c"] -headers = ["sqlite3/*.h"] -preprocessor_flags = [ - "-DSQLITE_ENABLE_COLUMN_METADATA", - "-DSQLITE_ENABLE_FTS3", - "-DSQLITE_ENABLE_RTREE", -] diff --git a/shim/third-party/rust/fixups/lock_api/fixups.toml b/shim/third-party/rust/fixups/lock_api/fixups.toml deleted file mode 100644 index 4d082640b5813..0000000000000 --- a/shim/third-party/rust/fixups/lock_api/fixups.toml +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# the build script for lock_api is a version check for rust 1.61. -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/log/fixups.toml b/shim/third-party/rust/fixups/log/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/log/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/memchr/fixups.toml b/shim/third-party/rust/fixups/memchr/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/memchr/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/memoffset/fixups.toml b/shim/third-party/rust/fixups/memoffset/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/memoffset/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/mio/fixups.toml b/shim/third-party/rust/fixups/mio/fixups.toml deleted file mode 100644 index 9b40a18f4cab3..0000000000000 --- a/shim/third-party/rust/fixups/mio/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/native-tls/fixups.toml b/shim/third-party/rust/fixups/native-tls/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/native-tls/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/nix/fixups.toml b/shim/third-party/rust/fixups/nix/fixups.toml deleted file mode 100644 index c269a19b413eb..0000000000000 --- a/shim/third-party/rust/fixups/nix/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/nom/fixups.toml b/shim/third-party/rust/fixups/nom/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/nom/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/ntapi/fixups.toml b/shim/third-party/rust/fixups/ntapi/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/ntapi/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/num-bigint/fixups.toml b/shim/third-party/rust/fixups/num-bigint/fixups.toml deleted file mode 100644 index 55e01177fd86d..0000000000000 --- a/shim/third-party/rust/fixups/num-bigint/fixups.toml +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/num-integer/fixups.toml b/shim/third-party/rust/fixups/num-integer/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/num-integer/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/num-traits/fixups.toml b/shim/third-party/rust/fixups/num-traits/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/num-traits/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/oid-registry/fixups.toml b/shim/third-party/rust/fixups/oid-registry/fixups.toml deleted file mode 100644 index 45a72665bb10f..0000000000000 --- a/shim/third-party/rust/fixups/oid-registry/fixups.toml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -cargo_env = [ - "CARGO_PKG_NAME", # Needed by _buck1_handle_manifest_dir - "CARGO_MANIFEST_DIR", -] - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/parking_lot/fixups.toml b/shim/third-party/rust/fixups/parking_lot/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/parking_lot/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/parking_lot_core/fixups.toml b/shim/third-party/rust/fixups/parking_lot_core/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/parking_lot_core/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/paste/fixups.toml b/shim/third-party/rust/fixups/paste/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/paste/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/pest/fixups.toml b/shim/third-party/rust/fixups/pest/fixups.toml deleted file mode 100644 index 9b40a18f4cab3..0000000000000 --- a/shim/third-party/rust/fixups/pest/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/pin-project-internal/fixups.toml b/shim/third-party/rust/fixups/pin-project-internal/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/pin-project-internal/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/platforms/fixups.toml b/shim/third-party/rust/fixups/platforms/fixups.toml deleted file mode 100644 index beb28c099061b..0000000000000 --- a/shim/third-party/rust/fixups/platforms/fixups.toml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# Buildscript sets TARGET in environment -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'] -env = { TARGET = "aarch64-unknown-linux-gnu" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'] -env = { TARGET = "x86_64-unknown-linux-gnu" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "macos", target_arch = "aarch64"))'] -env = { TARGET = "aarch64-apple-darwin" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "macos", target_arch = "x86_64"))'] -env = { TARGET = "x86_64-apple-darwin" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'] -env = { TARGET = "x86_64-pc-windows-gnu" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'] -env = { TARGET = "x86_64-pc-windows-msvc" } -buildscript = [] diff --git a/shim/third-party/rust/fixups/prettyplease/fixups.toml b/shim/third-party/rust/fixups/prettyplease/fixups.toml deleted file mode 100644 index 118f26932835f..0000000000000 --- a/shim/third-party/rust/fixups/prettyplease/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml b/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/proc-macro-error/fixups.toml b/shim/third-party/rust/fixups/proc-macro-error/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/proc-macro-error/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml b/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/proc-macro2/fixups.toml b/shim/third-party/rust/fixups/proc-macro2/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/proc-macro2/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/prost-build/fixups.toml b/shim/third-party/rust/fixups/prost-build/fixups.toml deleted file mode 100644 index 61a5cb67428b6..0000000000000 --- a/shim/third-party/rust/fixups/prost-build/fixups.toml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] - -# These are here because the crate uses the env! macro -# We override them at runtime. -[env] -PROTOC = "" -PROTOC_INCLUDE = "" diff --git a/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml b/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/quote/fixups.toml b/shim/third-party/rust/fixups/quote/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/quote/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/radium/fixups.toml b/shim/third-party/rust/fixups/radium/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/radium/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/rayon-core/fixups.toml b/shim/third-party/rust/fixups/rayon-core/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/rayon-core/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/ref-cast/fixups.toml b/shim/third-party/rust/fixups/ref-cast/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/ref-cast/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/reqwest/fixups.toml b/shim/third-party/rust/fixups/reqwest/fixups.toml deleted file mode 100644 index 9b40a18f4cab3..0000000000000 --- a/shim/third-party/rust/fixups/reqwest/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/ring/fixups.toml b/shim/third-party/rust/fixups/ring/fixups.toml deleted file mode 100644 index 8e7020eb716be..0000000000000 --- a/shim/third-party/rust/fixups/ring/fixups.toml +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# Copied from fbsource fixup. - -buildscript = [] - -# Generate a C/C++ build rule for all the C code - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.buildscript.cxx_library] -name = "ring-c-asm-elf-x86_84" -srcs = [ "crypto/**/*.c", "pregenerated/*x86_64*-elf.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -# redundant `any` is needed to differentiate key for config specific to v0.17.5 version -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "linux")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "linux")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "linux")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "linux")))'.buildscript.cxx_library] -name = "ring-c-asm-elf-x86_84" -srcs = [ "crypto/**/*.c", "pregenerated/*x86_64*-elf.S", "third_party/fiat/asm/fiat_curve25519_adx_mul.S", "third_party/fiat/asm/fiat_curve25519_adx_square.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.buildscript.cxx_library] -name = "ring-c-asm-elf-aarch64" -srcs = [ "crypto/**/*.c", "pregenerated/*armv8*-linux64.S", "pregenerated/*armx*-linux64.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -exclude = [ "crypto/cpu-intel.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "linux")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "linux")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "linux")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "linux")))'.buildscript.cxx_library] -name = "ring-c-asm-elf-aarch64" -srcs = [ "crypto/**/*.c", "pregenerated/*armv8*-linux64.S", "pregenerated/*armx*-linux64.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -exclude = [ "crypto/cpu-intel.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "macos"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "macos"))'.buildscript.cxx_library] -name = "ring-c-asm-macos-x86_64" -srcs = [ "crypto/**/*.c", "pregenerated/*x86_64*-macosx.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "macos")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "macos")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "macos")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "macos")))'.buildscript.cxx_library] -name = "ring-c-asm-macos-x86_64" -srcs = [ "crypto/**/*.c", "pregenerated/*x86_64*-macosx.S", "third_party/fiat/asm/fiat_curve25519_adx_mul.S", "third_party/fiat/asm/fiat_curve25519_adx_square.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "aarch64", target_os = "macos"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "aarch64", target_os = "macos"))'.buildscript.cxx_library] -name = "ring-c-asm-macos-arm64" -srcs = [ "crypto/**/*.c", "pregenerated/*armv8*-ios64.S", "pregenerated/*armx*-ios64.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -exclude = [ "crypto/cpu-intel.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "macos")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "macos")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "macos")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "macos")))'.buildscript.cxx_library] -name = "ring-c-asm-macos-arm64" -srcs = [ "crypto/**/*.c", "pregenerated/*armv8*-ios64.S", "pregenerated/*armx*-ios64.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -exclude = [ "crypto/cpu-intel.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu"))'.buildscript.cxx_library] -name = "ring-c-win-x86_84" -srcs = [ "crypto/**/*.c" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu")))'.buildscript.cxx_library] -name = "ring-c-win-x86_84" -srcs = [ "crypto/**/*.c" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))'.buildscript.cxx_library] -name = "ring-c-win-msvc-x86_84" -srcs = [ "crypto/**/*.c" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] - -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc")))'.buildscript.cxx_library] -name = "ring-c-win-msvc-x86_84" -srcs = [ "crypto/**/*.c" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows"))'.buildscript.prebuilt_cxx_library] -name = "ring-asm-windows-x86_84" -static_libs = [ "pregenerated/*x86_64*-nasm.obj" ] - -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows")))'] -version = "=0.17.5" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows")))'.buildscript.prebuilt_cxx_library] -name = "ring-asm-windows-x86_84" -static_libs = [ "pregenerated/*x86_64*-nasm.o" ] diff --git a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols.h b/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols.h deleted file mode 100644 index 9ee40055efdaf..0000000000000 --- a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols.h +++ /dev/null @@ -1,119 +0,0 @@ - -#ifndef ring_core_generated_PREFIX_SYMBOLS_H -#define ring_core_generated_PREFIX_SYMBOLS_H - -#define ecp_nistz256_point_double p256_point_double -#define ecp_nistz256_point_add p256_point_add -#define ecp_nistz256_point_add_affine p256_point_add_affine -#define ecp_nistz256_ord_mul_mont p256_scalar_mul_mont -#define ecp_nistz256_ord_sqr_mont p256_scalar_sqr_rep_mont -#define ecp_nistz256_mul_mont p256_mul_mont -#define ecp_nistz256_sqr_mont p256_sqr_mont -#define CRYPTO_memcmp ring_core_0_17_5_CRYPTO_memcmp -#define CRYPTO_poly1305_finish ring_core_0_17_5_CRYPTO_poly1305_finish -#define CRYPTO_poly1305_finish_neon ring_core_0_17_5_CRYPTO_poly1305_finish_neon -#define CRYPTO_poly1305_init ring_core_0_17_5_CRYPTO_poly1305_init -#define CRYPTO_poly1305_init_neon ring_core_0_17_5_CRYPTO_poly1305_init_neon -#define CRYPTO_poly1305_update ring_core_0_17_5_CRYPTO_poly1305_update -#define CRYPTO_poly1305_update_neon ring_core_0_17_5_CRYPTO_poly1305_update_neon -#define ChaCha20_ctr32 ring_core_0_17_5_ChaCha20_ctr32 -#define LIMBS_add_mod ring_core_0_17_5_LIMBS_add_mod -#define LIMBS_are_even ring_core_0_17_5_LIMBS_are_even -#define LIMBS_are_zero ring_core_0_17_5_LIMBS_are_zero -#define LIMBS_equal ring_core_0_17_5_LIMBS_equal -#define LIMBS_equal_limb ring_core_0_17_5_LIMBS_equal_limb -#define LIMBS_less_than ring_core_0_17_5_LIMBS_less_than -#define LIMBS_less_than_limb ring_core_0_17_5_LIMBS_less_than_limb -#define LIMBS_reduce_once ring_core_0_17_5_LIMBS_reduce_once -#define LIMBS_select_512_32 ring_core_0_17_5_LIMBS_select_512_32 -#define LIMBS_shl_mod ring_core_0_17_5_LIMBS_shl_mod -#define LIMBS_sub_mod ring_core_0_17_5_LIMBS_sub_mod -#define LIMBS_window5_split_window ring_core_0_17_5_LIMBS_window5_split_window -#define LIMBS_window5_unsplit_window ring_core_0_17_5_LIMBS_window5_unsplit_window -#define LIMB_shr ring_core_0_17_5_LIMB_shr -#define OPENSSL_armcap_P ring_core_0_17_5_OPENSSL_armcap_P -#define OPENSSL_cpuid_setup ring_core_0_17_5_OPENSSL_cpuid_setup -#define OPENSSL_ia32cap_P ring_core_0_17_5_OPENSSL_ia32cap_P -#define aes_hw_ctr32_encrypt_blocks ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -#define aes_hw_encrypt ring_core_0_17_5_aes_hw_encrypt -#define aes_hw_set_encrypt_key ring_core_0_17_5_aes_hw_set_encrypt_key -#define aes_nohw_ctr32_encrypt_blocks ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -#define aes_nohw_encrypt ring_core_0_17_5_aes_nohw_encrypt -#define aes_nohw_set_encrypt_key ring_core_0_17_5_aes_nohw_set_encrypt_key -#define aesni_gcm_decrypt ring_core_0_17_5_aesni_gcm_decrypt -#define aesni_gcm_encrypt ring_core_0_17_5_aesni_gcm_encrypt -#define bn_from_montgomery_in_place ring_core_0_17_5_bn_from_montgomery_in_place -#define bn_gather5 ring_core_0_17_5_bn_gather5 -#define bn_mul_mont ring_core_0_17_5_bn_mul_mont -#define bn_mul_mont_gather5 ring_core_0_17_5_bn_mul_mont_gather5 -#define bn_neg_inv_mod_r_u64 ring_core_0_17_5_bn_neg_inv_mod_r_u64 -#define bn_power5 ring_core_0_17_5_bn_power5 -#define bn_scatter5 ring_core_0_17_5_bn_scatter5 -#define bn_sqr8x_internal ring_core_0_17_5_bn_sqr8x_internal -#define bn_sqrx8x_internal ring_core_0_17_5_bn_sqrx8x_internal -#define bsaes_ctr32_encrypt_blocks ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -#define bssl_constant_time_test_conditional_memcpy ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -#define bssl_constant_time_test_conditional_memxor ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -#define bssl_constant_time_test_main ring_core_0_17_5_bssl_constant_time_test_main -#define chacha20_poly1305_open ring_core_0_17_5_chacha20_poly1305_open -#define chacha20_poly1305_seal ring_core_0_17_5_chacha20_poly1305_seal -#define fiat_curve25519_adx_mul ring_core_0_17_5_fiat_curve25519_adx_mul -#define fiat_curve25519_adx_square ring_core_0_17_5_fiat_curve25519_adx_square -#define gcm_ghash_avx ring_core_0_17_5_gcm_ghash_avx -#define gcm_ghash_clmul ring_core_0_17_5_gcm_ghash_clmul -#define gcm_ghash_neon ring_core_0_17_5_gcm_ghash_neon -#define gcm_gmult_clmul ring_core_0_17_5_gcm_gmult_clmul -#define gcm_gmult_neon ring_core_0_17_5_gcm_gmult_neon -#define gcm_init_avx ring_core_0_17_5_gcm_init_avx -#define gcm_init_clmul ring_core_0_17_5_gcm_init_clmul -#define gcm_init_neon ring_core_0_17_5_gcm_init_neon -#define k25519Precomp ring_core_0_17_5_k25519Precomp -#define limbs_mul_add_limb ring_core_0_17_5_limbs_mul_add_limb -#define little_endian_bytes_from_scalar ring_core_0_17_5_little_endian_bytes_from_scalar -#define ecp_nistz256_neg ring_core_0_17_5_ecp_nistz256_neg -#define ecp_nistz256_select_w5 ring_core_0_17_5_ecp_nistz256_select_w5 -#define ecp_nistz256_select_w7 ring_core_0_17_5_ecp_nistz256_select_w7 -#define p256_mul_mont ring_core_0_17_5_p256_mul_mont -#define p256_point_add ring_core_0_17_5_p256_point_add -#define p256_point_add_affine ring_core_0_17_5_p256_point_add_affine -#define p256_point_double ring_core_0_17_5_p256_point_double -#define p256_point_mul ring_core_0_17_5_p256_point_mul -#define p256_point_mul_base ring_core_0_17_5_p256_point_mul_base -#define p256_point_mul_base_vartime ring_core_0_17_5_p256_point_mul_base_vartime -#define p256_scalar_mul_mont ring_core_0_17_5_p256_scalar_mul_mont -#define p256_scalar_sqr_rep_mont ring_core_0_17_5_p256_scalar_sqr_rep_mont -#define p256_sqr_mont ring_core_0_17_5_p256_sqr_mont -#define p384_elem_div_by_2 ring_core_0_17_5_p384_elem_div_by_2 -#define p384_elem_mul_mont ring_core_0_17_5_p384_elem_mul_mont -#define p384_elem_neg ring_core_0_17_5_p384_elem_neg -#define p384_elem_sub ring_core_0_17_5_p384_elem_sub -#define p384_point_add ring_core_0_17_5_p384_point_add -#define p384_point_double ring_core_0_17_5_p384_point_double -#define p384_point_mul ring_core_0_17_5_p384_point_mul -#define p384_scalar_mul_mont ring_core_0_17_5_p384_scalar_mul_mont -#define openssl_poly1305_neon2_addmulmod ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -#define openssl_poly1305_neon2_blocks ring_core_0_17_5_openssl_poly1305_neon2_blocks -#define sha256_block_data_order ring_core_0_17_5_sha256_block_data_order -#define sha512_block_data_order ring_core_0_17_5_sha512_block_data_order -#define vpaes_ctr32_encrypt_blocks ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -#define vpaes_encrypt ring_core_0_17_5_vpaes_encrypt -#define vpaes_encrypt_key_to_bsaes ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -#define vpaes_set_encrypt_key ring_core_0_17_5_vpaes_set_encrypt_key -#define x25519_NEON ring_core_0_17_5_x25519_NEON -#define x25519_fe_invert ring_core_0_17_5_x25519_fe_invert -#define x25519_fe_isnegative ring_core_0_17_5_x25519_fe_isnegative -#define x25519_fe_mul_ttt ring_core_0_17_5_x25519_fe_mul_ttt -#define x25519_fe_neg ring_core_0_17_5_x25519_fe_neg -#define x25519_fe_tobytes ring_core_0_17_5_x25519_fe_tobytes -#define x25519_ge_double_scalarmult_vartime ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -#define x25519_ge_frombytes_vartime ring_core_0_17_5_x25519_ge_frombytes_vartime -#define x25519_ge_scalarmult_base ring_core_0_17_5_x25519_ge_scalarmult_base -#define x25519_ge_scalarmult_base_adx ring_core_0_17_5_x25519_ge_scalarmult_base_adx -#define x25519_public_from_private_generic_masked ring_core_0_17_5_x25519_public_from_private_generic_masked -#define x25519_sc_mask ring_core_0_17_5_x25519_sc_mask -#define x25519_sc_muladd ring_core_0_17_5_x25519_sc_muladd -#define x25519_sc_reduce ring_core_0_17_5_x25519_sc_reduce -#define x25519_scalar_mult_adx ring_core_0_17_5_x25519_scalar_mult_adx -#define x25519_scalar_mult_generic_masked ring_core_0_17_5_x25519_scalar_mult_generic_masked - -#endif diff --git a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_asm.h b/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_asm.h deleted file mode 100644 index 84e487091503a..0000000000000 --- a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_asm.h +++ /dev/null @@ -1,236 +0,0 @@ - -#ifndef ring_core_generated_PREFIX_SYMBOLS_ASM_H -#define ring_core_generated_PREFIX_SYMBOLS_ASM_H - -#if defined(__APPLE__) -#define _ecp_nistz256_point_double _p256_point_double -#define _ecp_nistz256_point_add _p256_point_add -#define _ecp_nistz256_point_add_affine _p256_point_add_affine -#define _ecp_nistz256_ord_mul_mont _p256_scalar_mul_mont -#define _ecp_nistz256_ord_sqr_mont _p256_scalar_sqr_rep_mont -#define _ecp_nistz256_mul_mont _p256_mul_mont -#define _ecp_nistz256_sqr_mont _p256_sqr_mont -#define _CRYPTO_memcmp _ring_core_0_17_5_CRYPTO_memcmp -#define _CRYPTO_poly1305_finish _ring_core_0_17_5_CRYPTO_poly1305_finish -#define _CRYPTO_poly1305_finish_neon _ring_core_0_17_5_CRYPTO_poly1305_finish_neon -#define _CRYPTO_poly1305_init _ring_core_0_17_5_CRYPTO_poly1305_init -#define _CRYPTO_poly1305_init_neon _ring_core_0_17_5_CRYPTO_poly1305_init_neon -#define _CRYPTO_poly1305_update _ring_core_0_17_5_CRYPTO_poly1305_update -#define _CRYPTO_poly1305_update_neon _ring_core_0_17_5_CRYPTO_poly1305_update_neon -#define _ChaCha20_ctr32 _ring_core_0_17_5_ChaCha20_ctr32 -#define _LIMBS_add_mod _ring_core_0_17_5_LIMBS_add_mod -#define _LIMBS_are_even _ring_core_0_17_5_LIMBS_are_even -#define _LIMBS_are_zero _ring_core_0_17_5_LIMBS_are_zero -#define _LIMBS_equal _ring_core_0_17_5_LIMBS_equal -#define _LIMBS_equal_limb _ring_core_0_17_5_LIMBS_equal_limb -#define _LIMBS_less_than _ring_core_0_17_5_LIMBS_less_than -#define _LIMBS_less_than_limb _ring_core_0_17_5_LIMBS_less_than_limb -#define _LIMBS_reduce_once _ring_core_0_17_5_LIMBS_reduce_once -#define _LIMBS_select_512_32 _ring_core_0_17_5_LIMBS_select_512_32 -#define _LIMBS_shl_mod _ring_core_0_17_5_LIMBS_shl_mod -#define _LIMBS_sub_mod _ring_core_0_17_5_LIMBS_sub_mod -#define _LIMBS_window5_split_window _ring_core_0_17_5_LIMBS_window5_split_window -#define _LIMBS_window5_unsplit_window _ring_core_0_17_5_LIMBS_window5_unsplit_window -#define _LIMB_shr _ring_core_0_17_5_LIMB_shr -#define _OPENSSL_armcap_P _ring_core_0_17_5_OPENSSL_armcap_P -#define _OPENSSL_cpuid_setup _ring_core_0_17_5_OPENSSL_cpuid_setup -#define _OPENSSL_ia32cap_P _ring_core_0_17_5_OPENSSL_ia32cap_P -#define _aes_hw_ctr32_encrypt_blocks _ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -#define _aes_hw_encrypt _ring_core_0_17_5_aes_hw_encrypt -#define _aes_hw_set_encrypt_key _ring_core_0_17_5_aes_hw_set_encrypt_key -#define _aes_nohw_ctr32_encrypt_blocks _ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -#define _aes_nohw_encrypt _ring_core_0_17_5_aes_nohw_encrypt -#define _aes_nohw_set_encrypt_key _ring_core_0_17_5_aes_nohw_set_encrypt_key -#define _aesni_gcm_decrypt _ring_core_0_17_5_aesni_gcm_decrypt -#define _aesni_gcm_encrypt _ring_core_0_17_5_aesni_gcm_encrypt -#define _bn_from_montgomery_in_place _ring_core_0_17_5_bn_from_montgomery_in_place -#define _bn_gather5 _ring_core_0_17_5_bn_gather5 -#define _bn_mul_mont _ring_core_0_17_5_bn_mul_mont -#define _bn_mul_mont_gather5 _ring_core_0_17_5_bn_mul_mont_gather5 -#define _bn_neg_inv_mod_r_u64 _ring_core_0_17_5_bn_neg_inv_mod_r_u64 -#define _bn_power5 _ring_core_0_17_5_bn_power5 -#define _bn_scatter5 _ring_core_0_17_5_bn_scatter5 -#define _bn_sqr8x_internal _ring_core_0_17_5_bn_sqr8x_internal -#define _bn_sqrx8x_internal _ring_core_0_17_5_bn_sqrx8x_internal -#define _bsaes_ctr32_encrypt_blocks _ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -#define _bssl_constant_time_test_conditional_memcpy _ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -#define _bssl_constant_time_test_conditional_memxor _ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -#define _bssl_constant_time_test_main _ring_core_0_17_5_bssl_constant_time_test_main -#define _chacha20_poly1305_open _ring_core_0_17_5_chacha20_poly1305_open -#define _chacha20_poly1305_seal _ring_core_0_17_5_chacha20_poly1305_seal -#define _fiat_curve25519_adx_mul _ring_core_0_17_5_fiat_curve25519_adx_mul -#define _fiat_curve25519_adx_square _ring_core_0_17_5_fiat_curve25519_adx_square -#define _gcm_ghash_avx _ring_core_0_17_5_gcm_ghash_avx -#define _gcm_ghash_clmul _ring_core_0_17_5_gcm_ghash_clmul -#define _gcm_ghash_neon _ring_core_0_17_5_gcm_ghash_neon -#define _gcm_gmult_clmul _ring_core_0_17_5_gcm_gmult_clmul -#define _gcm_gmult_neon _ring_core_0_17_5_gcm_gmult_neon -#define _gcm_init_avx _ring_core_0_17_5_gcm_init_avx -#define _gcm_init_clmul _ring_core_0_17_5_gcm_init_clmul -#define _gcm_init_neon _ring_core_0_17_5_gcm_init_neon -#define _k25519Precomp _ring_core_0_17_5_k25519Precomp -#define _limbs_mul_add_limb _ring_core_0_17_5_limbs_mul_add_limb -#define _little_endian_bytes_from_scalar _ring_core_0_17_5_little_endian_bytes_from_scalar -#define _ecp_nistz256_neg _ring_core_0_17_5_ecp_nistz256_neg -#define _ecp_nistz256_select_w5 _ring_core_0_17_5_ecp_nistz256_select_w5 -#define _ecp_nistz256_select_w7 _ring_core_0_17_5_ecp_nistz256_select_w7 -#define _p256_mul_mont _ring_core_0_17_5_p256_mul_mont -#define _p256_point_add _ring_core_0_17_5_p256_point_add -#define _p256_point_add_affine _ring_core_0_17_5_p256_point_add_affine -#define _p256_point_double _ring_core_0_17_5_p256_point_double -#define _p256_point_mul _ring_core_0_17_5_p256_point_mul -#define _p256_point_mul_base _ring_core_0_17_5_p256_point_mul_base -#define _p256_point_mul_base_vartime _ring_core_0_17_5_p256_point_mul_base_vartime -#define _p256_scalar_mul_mont _ring_core_0_17_5_p256_scalar_mul_mont -#define _p256_scalar_sqr_rep_mont _ring_core_0_17_5_p256_scalar_sqr_rep_mont -#define _p256_sqr_mont _ring_core_0_17_5_p256_sqr_mont -#define _p384_elem_div_by_2 _ring_core_0_17_5_p384_elem_div_by_2 -#define _p384_elem_mul_mont _ring_core_0_17_5_p384_elem_mul_mont -#define _p384_elem_neg _ring_core_0_17_5_p384_elem_neg -#define _p384_elem_sub _ring_core_0_17_5_p384_elem_sub -#define _p384_point_add _ring_core_0_17_5_p384_point_add -#define _p384_point_double _ring_core_0_17_5_p384_point_double -#define _p384_point_mul _ring_core_0_17_5_p384_point_mul -#define _p384_scalar_mul_mont _ring_core_0_17_5_p384_scalar_mul_mont -#define _openssl_poly1305_neon2_addmulmod _ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -#define _openssl_poly1305_neon2_blocks _ring_core_0_17_5_openssl_poly1305_neon2_blocks -#define _sha256_block_data_order _ring_core_0_17_5_sha256_block_data_order -#define _sha512_block_data_order _ring_core_0_17_5_sha512_block_data_order -#define _vpaes_ctr32_encrypt_blocks _ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -#define _vpaes_encrypt _ring_core_0_17_5_vpaes_encrypt -#define _vpaes_encrypt_key_to_bsaes _ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -#define _vpaes_set_encrypt_key _ring_core_0_17_5_vpaes_set_encrypt_key -#define _x25519_NEON _ring_core_0_17_5_x25519_NEON -#define _x25519_fe_invert _ring_core_0_17_5_x25519_fe_invert -#define _x25519_fe_isnegative _ring_core_0_17_5_x25519_fe_isnegative -#define _x25519_fe_mul_ttt _ring_core_0_17_5_x25519_fe_mul_ttt -#define _x25519_fe_neg _ring_core_0_17_5_x25519_fe_neg -#define _x25519_fe_tobytes _ring_core_0_17_5_x25519_fe_tobytes -#define _x25519_ge_double_scalarmult_vartime _ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -#define _x25519_ge_frombytes_vartime _ring_core_0_17_5_x25519_ge_frombytes_vartime -#define _x25519_ge_scalarmult_base _ring_core_0_17_5_x25519_ge_scalarmult_base -#define _x25519_ge_scalarmult_base_adx _ring_core_0_17_5_x25519_ge_scalarmult_base_adx -#define _x25519_public_from_private_generic_masked _ring_core_0_17_5_x25519_public_from_private_generic_masked -#define _x25519_sc_mask _ring_core_0_17_5_x25519_sc_mask -#define _x25519_sc_muladd _ring_core_0_17_5_x25519_sc_muladd -#define _x25519_sc_reduce _ring_core_0_17_5_x25519_sc_reduce -#define _x25519_scalar_mult_adx _ring_core_0_17_5_x25519_scalar_mult_adx -#define _x25519_scalar_mult_generic_masked _ring_core_0_17_5_x25519_scalar_mult_generic_masked - -#else -#define ecp_nistz256_point_double p256_point_double -#define ecp_nistz256_point_add p256_point_add -#define ecp_nistz256_point_add_affine p256_point_add_affine -#define ecp_nistz256_ord_mul_mont p256_scalar_mul_mont -#define ecp_nistz256_ord_sqr_mont p256_scalar_sqr_rep_mont -#define ecp_nistz256_mul_mont p256_mul_mont -#define ecp_nistz256_sqr_mont p256_sqr_mont -#define CRYPTO_memcmp ring_core_0_17_5_CRYPTO_memcmp -#define CRYPTO_poly1305_finish ring_core_0_17_5_CRYPTO_poly1305_finish -#define CRYPTO_poly1305_finish_neon ring_core_0_17_5_CRYPTO_poly1305_finish_neon -#define CRYPTO_poly1305_init ring_core_0_17_5_CRYPTO_poly1305_init -#define CRYPTO_poly1305_init_neon ring_core_0_17_5_CRYPTO_poly1305_init_neon -#define CRYPTO_poly1305_update ring_core_0_17_5_CRYPTO_poly1305_update -#define CRYPTO_poly1305_update_neon ring_core_0_17_5_CRYPTO_poly1305_update_neon -#define ChaCha20_ctr32 ring_core_0_17_5_ChaCha20_ctr32 -#define LIMBS_add_mod ring_core_0_17_5_LIMBS_add_mod -#define LIMBS_are_even ring_core_0_17_5_LIMBS_are_even -#define LIMBS_are_zero ring_core_0_17_5_LIMBS_are_zero -#define LIMBS_equal ring_core_0_17_5_LIMBS_equal -#define LIMBS_equal_limb ring_core_0_17_5_LIMBS_equal_limb -#define LIMBS_less_than ring_core_0_17_5_LIMBS_less_than -#define LIMBS_less_than_limb ring_core_0_17_5_LIMBS_less_than_limb -#define LIMBS_reduce_once ring_core_0_17_5_LIMBS_reduce_once -#define LIMBS_select_512_32 ring_core_0_17_5_LIMBS_select_512_32 -#define LIMBS_shl_mod ring_core_0_17_5_LIMBS_shl_mod -#define LIMBS_sub_mod ring_core_0_17_5_LIMBS_sub_mod -#define LIMBS_window5_split_window ring_core_0_17_5_LIMBS_window5_split_window -#define LIMBS_window5_unsplit_window ring_core_0_17_5_LIMBS_window5_unsplit_window -#define LIMB_shr ring_core_0_17_5_LIMB_shr -#define OPENSSL_armcap_P ring_core_0_17_5_OPENSSL_armcap_P -#define OPENSSL_cpuid_setup ring_core_0_17_5_OPENSSL_cpuid_setup -#define OPENSSL_ia32cap_P ring_core_0_17_5_OPENSSL_ia32cap_P -#define aes_hw_ctr32_encrypt_blocks ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -#define aes_hw_encrypt ring_core_0_17_5_aes_hw_encrypt -#define aes_hw_set_encrypt_key ring_core_0_17_5_aes_hw_set_encrypt_key -#define aes_nohw_ctr32_encrypt_blocks ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -#define aes_nohw_encrypt ring_core_0_17_5_aes_nohw_encrypt -#define aes_nohw_set_encrypt_key ring_core_0_17_5_aes_nohw_set_encrypt_key -#define aesni_gcm_decrypt ring_core_0_17_5_aesni_gcm_decrypt -#define aesni_gcm_encrypt ring_core_0_17_5_aesni_gcm_encrypt -#define bn_from_montgomery_in_place ring_core_0_17_5_bn_from_montgomery_in_place -#define bn_gather5 ring_core_0_17_5_bn_gather5 -#define bn_mul_mont ring_core_0_17_5_bn_mul_mont -#define bn_mul_mont_gather5 ring_core_0_17_5_bn_mul_mont_gather5 -#define bn_neg_inv_mod_r_u64 ring_core_0_17_5_bn_neg_inv_mod_r_u64 -#define bn_power5 ring_core_0_17_5_bn_power5 -#define bn_scatter5 ring_core_0_17_5_bn_scatter5 -#define bn_sqr8x_internal ring_core_0_17_5_bn_sqr8x_internal -#define bn_sqrx8x_internal ring_core_0_17_5_bn_sqrx8x_internal -#define bsaes_ctr32_encrypt_blocks ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -#define bssl_constant_time_test_conditional_memcpy ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -#define bssl_constant_time_test_conditional_memxor ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -#define bssl_constant_time_test_main ring_core_0_17_5_bssl_constant_time_test_main -#define chacha20_poly1305_open ring_core_0_17_5_chacha20_poly1305_open -#define chacha20_poly1305_seal ring_core_0_17_5_chacha20_poly1305_seal -#define fiat_curve25519_adx_mul ring_core_0_17_5_fiat_curve25519_adx_mul -#define fiat_curve25519_adx_square ring_core_0_17_5_fiat_curve25519_adx_square -#define gcm_ghash_avx ring_core_0_17_5_gcm_ghash_avx -#define gcm_ghash_clmul ring_core_0_17_5_gcm_ghash_clmul -#define gcm_ghash_neon ring_core_0_17_5_gcm_ghash_neon -#define gcm_gmult_clmul ring_core_0_17_5_gcm_gmult_clmul -#define gcm_gmult_neon ring_core_0_17_5_gcm_gmult_neon -#define gcm_init_avx ring_core_0_17_5_gcm_init_avx -#define gcm_init_clmul ring_core_0_17_5_gcm_init_clmul -#define gcm_init_neon ring_core_0_17_5_gcm_init_neon -#define k25519Precomp ring_core_0_17_5_k25519Precomp -#define limbs_mul_add_limb ring_core_0_17_5_limbs_mul_add_limb -#define little_endian_bytes_from_scalar ring_core_0_17_5_little_endian_bytes_from_scalar -#define ecp_nistz256_neg ring_core_0_17_5_ecp_nistz256_neg -#define ecp_nistz256_select_w5 ring_core_0_17_5_ecp_nistz256_select_w5 -#define ecp_nistz256_select_w7 ring_core_0_17_5_ecp_nistz256_select_w7 -#define p256_mul_mont ring_core_0_17_5_p256_mul_mont -#define p256_point_add ring_core_0_17_5_p256_point_add -#define p256_point_add_affine ring_core_0_17_5_p256_point_add_affine -#define p256_point_double ring_core_0_17_5_p256_point_double -#define p256_point_mul ring_core_0_17_5_p256_point_mul -#define p256_point_mul_base ring_core_0_17_5_p256_point_mul_base -#define p256_point_mul_base_vartime ring_core_0_17_5_p256_point_mul_base_vartime -#define p256_scalar_mul_mont ring_core_0_17_5_p256_scalar_mul_mont -#define p256_scalar_sqr_rep_mont ring_core_0_17_5_p256_scalar_sqr_rep_mont -#define p256_sqr_mont ring_core_0_17_5_p256_sqr_mont -#define p384_elem_div_by_2 ring_core_0_17_5_p384_elem_div_by_2 -#define p384_elem_mul_mont ring_core_0_17_5_p384_elem_mul_mont -#define p384_elem_neg ring_core_0_17_5_p384_elem_neg -#define p384_elem_sub ring_core_0_17_5_p384_elem_sub -#define p384_point_add ring_core_0_17_5_p384_point_add -#define p384_point_double ring_core_0_17_5_p384_point_double -#define p384_point_mul ring_core_0_17_5_p384_point_mul -#define p384_scalar_mul_mont ring_core_0_17_5_p384_scalar_mul_mont -#define openssl_poly1305_neon2_addmulmod ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -#define openssl_poly1305_neon2_blocks ring_core_0_17_5_openssl_poly1305_neon2_blocks -#define sha256_block_data_order ring_core_0_17_5_sha256_block_data_order -#define sha512_block_data_order ring_core_0_17_5_sha512_block_data_order -#define vpaes_ctr32_encrypt_blocks ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -#define vpaes_encrypt ring_core_0_17_5_vpaes_encrypt -#define vpaes_encrypt_key_to_bsaes ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -#define vpaes_set_encrypt_key ring_core_0_17_5_vpaes_set_encrypt_key -#define x25519_NEON ring_core_0_17_5_x25519_NEON -#define x25519_fe_invert ring_core_0_17_5_x25519_fe_invert -#define x25519_fe_isnegative ring_core_0_17_5_x25519_fe_isnegative -#define x25519_fe_mul_ttt ring_core_0_17_5_x25519_fe_mul_ttt -#define x25519_fe_neg ring_core_0_17_5_x25519_fe_neg -#define x25519_fe_tobytes ring_core_0_17_5_x25519_fe_tobytes -#define x25519_ge_double_scalarmult_vartime ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -#define x25519_ge_frombytes_vartime ring_core_0_17_5_x25519_ge_frombytes_vartime -#define x25519_ge_scalarmult_base ring_core_0_17_5_x25519_ge_scalarmult_base -#define x25519_ge_scalarmult_base_adx ring_core_0_17_5_x25519_ge_scalarmult_base_adx -#define x25519_public_from_private_generic_masked ring_core_0_17_5_x25519_public_from_private_generic_masked -#define x25519_sc_mask ring_core_0_17_5_x25519_sc_mask -#define x25519_sc_muladd ring_core_0_17_5_x25519_sc_muladd -#define x25519_sc_reduce ring_core_0_17_5_x25519_sc_reduce -#define x25519_scalar_mult_adx ring_core_0_17_5_x25519_scalar_mult_adx -#define x25519_scalar_mult_generic_masked ring_core_0_17_5_x25519_scalar_mult_generic_masked - -#endif -#endif diff --git a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_nasm.inc b/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_nasm.inc deleted file mode 100644 index 50e986a6a6aeb..0000000000000 --- a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_nasm.inc +++ /dev/null @@ -1,236 +0,0 @@ - -%ifndef ring_core_generated_PREFIX_SYMBOLS_NASM_INC -%define ring_core_generated_PREFIX_SYMBOLS_NASM_INC - -%ifidn __OUTPUT_FORMAT__,win32 -%define _ecp_nistz256_point_double _p256_point_double -%define _ecp_nistz256_point_add _p256_point_add -%define _ecp_nistz256_point_add_affine _p256_point_add_affine -%define _ecp_nistz256_ord_mul_mont _p256_scalar_mul_mont -%define _ecp_nistz256_ord_sqr_mont _p256_scalar_sqr_rep_mont -%define _ecp_nistz256_mul_mont _p256_mul_mont -%define _ecp_nistz256_sqr_mont _p256_sqr_mont -%define _CRYPTO_memcmp _ring_core_0_17_5_CRYPTO_memcmp -%define _CRYPTO_poly1305_finish _ring_core_0_17_5_CRYPTO_poly1305_finish -%define _CRYPTO_poly1305_finish_neon _ring_core_0_17_5_CRYPTO_poly1305_finish_neon -%define _CRYPTO_poly1305_init _ring_core_0_17_5_CRYPTO_poly1305_init -%define _CRYPTO_poly1305_init_neon _ring_core_0_17_5_CRYPTO_poly1305_init_neon -%define _CRYPTO_poly1305_update _ring_core_0_17_5_CRYPTO_poly1305_update -%define _CRYPTO_poly1305_update_neon _ring_core_0_17_5_CRYPTO_poly1305_update_neon -%define _ChaCha20_ctr32 _ring_core_0_17_5_ChaCha20_ctr32 -%define _LIMBS_add_mod _ring_core_0_17_5_LIMBS_add_mod -%define _LIMBS_are_even _ring_core_0_17_5_LIMBS_are_even -%define _LIMBS_are_zero _ring_core_0_17_5_LIMBS_are_zero -%define _LIMBS_equal _ring_core_0_17_5_LIMBS_equal -%define _LIMBS_equal_limb _ring_core_0_17_5_LIMBS_equal_limb -%define _LIMBS_less_than _ring_core_0_17_5_LIMBS_less_than -%define _LIMBS_less_than_limb _ring_core_0_17_5_LIMBS_less_than_limb -%define _LIMBS_reduce_once _ring_core_0_17_5_LIMBS_reduce_once -%define _LIMBS_select_512_32 _ring_core_0_17_5_LIMBS_select_512_32 -%define _LIMBS_shl_mod _ring_core_0_17_5_LIMBS_shl_mod -%define _LIMBS_sub_mod _ring_core_0_17_5_LIMBS_sub_mod -%define _LIMBS_window5_split_window _ring_core_0_17_5_LIMBS_window5_split_window -%define _LIMBS_window5_unsplit_window _ring_core_0_17_5_LIMBS_window5_unsplit_window -%define _LIMB_shr _ring_core_0_17_5_LIMB_shr -%define _OPENSSL_armcap_P _ring_core_0_17_5_OPENSSL_armcap_P -%define _OPENSSL_cpuid_setup _ring_core_0_17_5_OPENSSL_cpuid_setup -%define _OPENSSL_ia32cap_P _ring_core_0_17_5_OPENSSL_ia32cap_P -%define _aes_hw_ctr32_encrypt_blocks _ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -%define _aes_hw_encrypt _ring_core_0_17_5_aes_hw_encrypt -%define _aes_hw_set_encrypt_key _ring_core_0_17_5_aes_hw_set_encrypt_key -%define _aes_nohw_ctr32_encrypt_blocks _ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -%define _aes_nohw_encrypt _ring_core_0_17_5_aes_nohw_encrypt -%define _aes_nohw_set_encrypt_key _ring_core_0_17_5_aes_nohw_set_encrypt_key -%define _aesni_gcm_decrypt _ring_core_0_17_5_aesni_gcm_decrypt -%define _aesni_gcm_encrypt _ring_core_0_17_5_aesni_gcm_encrypt -%define _bn_from_montgomery_in_place _ring_core_0_17_5_bn_from_montgomery_in_place -%define _bn_gather5 _ring_core_0_17_5_bn_gather5 -%define _bn_mul_mont _ring_core_0_17_5_bn_mul_mont -%define _bn_mul_mont_gather5 _ring_core_0_17_5_bn_mul_mont_gather5 -%define _bn_neg_inv_mod_r_u64 _ring_core_0_17_5_bn_neg_inv_mod_r_u64 -%define _bn_power5 _ring_core_0_17_5_bn_power5 -%define _bn_scatter5 _ring_core_0_17_5_bn_scatter5 -%define _bn_sqr8x_internal _ring_core_0_17_5_bn_sqr8x_internal -%define _bn_sqrx8x_internal _ring_core_0_17_5_bn_sqrx8x_internal -%define _bsaes_ctr32_encrypt_blocks _ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -%define _bssl_constant_time_test_conditional_memcpy _ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -%define _bssl_constant_time_test_conditional_memxor _ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -%define _bssl_constant_time_test_main _ring_core_0_17_5_bssl_constant_time_test_main -%define _chacha20_poly1305_open _ring_core_0_17_5_chacha20_poly1305_open -%define _chacha20_poly1305_seal _ring_core_0_17_5_chacha20_poly1305_seal -%define _fiat_curve25519_adx_mul _ring_core_0_17_5_fiat_curve25519_adx_mul -%define _fiat_curve25519_adx_square _ring_core_0_17_5_fiat_curve25519_adx_square -%define _gcm_ghash_avx _ring_core_0_17_5_gcm_ghash_avx -%define _gcm_ghash_clmul _ring_core_0_17_5_gcm_ghash_clmul -%define _gcm_ghash_neon _ring_core_0_17_5_gcm_ghash_neon -%define _gcm_gmult_clmul _ring_core_0_17_5_gcm_gmult_clmul -%define _gcm_gmult_neon _ring_core_0_17_5_gcm_gmult_neon -%define _gcm_init_avx _ring_core_0_17_5_gcm_init_avx -%define _gcm_init_clmul _ring_core_0_17_5_gcm_init_clmul -%define _gcm_init_neon _ring_core_0_17_5_gcm_init_neon -%define _k25519Precomp _ring_core_0_17_5_k25519Precomp -%define _limbs_mul_add_limb _ring_core_0_17_5_limbs_mul_add_limb -%define _little_endian_bytes_from_scalar _ring_core_0_17_5_little_endian_bytes_from_scalar -%define _ecp_nistz256_neg _ring_core_0_17_5_ecp_nistz256_neg -%define _ecp_nistz256_select_w5 _ring_core_0_17_5_ecp_nistz256_select_w5 -%define _ecp_nistz256_select_w7 _ring_core_0_17_5_ecp_nistz256_select_w7 -%define _p256_mul_mont _ring_core_0_17_5_p256_mul_mont -%define _p256_point_add _ring_core_0_17_5_p256_point_add -%define _p256_point_add_affine _ring_core_0_17_5_p256_point_add_affine -%define _p256_point_double _ring_core_0_17_5_p256_point_double -%define _p256_point_mul _ring_core_0_17_5_p256_point_mul -%define _p256_point_mul_base _ring_core_0_17_5_p256_point_mul_base -%define _p256_point_mul_base_vartime _ring_core_0_17_5_p256_point_mul_base_vartime -%define _p256_scalar_mul_mont _ring_core_0_17_5_p256_scalar_mul_mont -%define _p256_scalar_sqr_rep_mont _ring_core_0_17_5_p256_scalar_sqr_rep_mont -%define _p256_sqr_mont _ring_core_0_17_5_p256_sqr_mont -%define _p384_elem_div_by_2 _ring_core_0_17_5_p384_elem_div_by_2 -%define _p384_elem_mul_mont _ring_core_0_17_5_p384_elem_mul_mont -%define _p384_elem_neg _ring_core_0_17_5_p384_elem_neg -%define _p384_elem_sub _ring_core_0_17_5_p384_elem_sub -%define _p384_point_add _ring_core_0_17_5_p384_point_add -%define _p384_point_double _ring_core_0_17_5_p384_point_double -%define _p384_point_mul _ring_core_0_17_5_p384_point_mul -%define _p384_scalar_mul_mont _ring_core_0_17_5_p384_scalar_mul_mont -%define _openssl_poly1305_neon2_addmulmod _ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -%define _openssl_poly1305_neon2_blocks _ring_core_0_17_5_openssl_poly1305_neon2_blocks -%define _sha256_block_data_order _ring_core_0_17_5_sha256_block_data_order -%define _sha512_block_data_order _ring_core_0_17_5_sha512_block_data_order -%define _vpaes_ctr32_encrypt_blocks _ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -%define _vpaes_encrypt _ring_core_0_17_5_vpaes_encrypt -%define _vpaes_encrypt_key_to_bsaes _ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -%define _vpaes_set_encrypt_key _ring_core_0_17_5_vpaes_set_encrypt_key -%define _x25519_NEON _ring_core_0_17_5_x25519_NEON -%define _x25519_fe_invert _ring_core_0_17_5_x25519_fe_invert -%define _x25519_fe_isnegative _ring_core_0_17_5_x25519_fe_isnegative -%define _x25519_fe_mul_ttt _ring_core_0_17_5_x25519_fe_mul_ttt -%define _x25519_fe_neg _ring_core_0_17_5_x25519_fe_neg -%define _x25519_fe_tobytes _ring_core_0_17_5_x25519_fe_tobytes -%define _x25519_ge_double_scalarmult_vartime _ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -%define _x25519_ge_frombytes_vartime _ring_core_0_17_5_x25519_ge_frombytes_vartime -%define _x25519_ge_scalarmult_base _ring_core_0_17_5_x25519_ge_scalarmult_base -%define _x25519_ge_scalarmult_base_adx _ring_core_0_17_5_x25519_ge_scalarmult_base_adx -%define _x25519_public_from_private_generic_masked _ring_core_0_17_5_x25519_public_from_private_generic_masked -%define _x25519_sc_mask _ring_core_0_17_5_x25519_sc_mask -%define _x25519_sc_muladd _ring_core_0_17_5_x25519_sc_muladd -%define _x25519_sc_reduce _ring_core_0_17_5_x25519_sc_reduce -%define _x25519_scalar_mult_adx _ring_core_0_17_5_x25519_scalar_mult_adx -%define _x25519_scalar_mult_generic_masked _ring_core_0_17_5_x25519_scalar_mult_generic_masked - -%else -%define ecp_nistz256_point_double p256_point_double -%define ecp_nistz256_point_add p256_point_add -%define ecp_nistz256_point_add_affine p256_point_add_affine -%define ecp_nistz256_ord_mul_mont p256_scalar_mul_mont -%define ecp_nistz256_ord_sqr_mont p256_scalar_sqr_rep_mont -%define ecp_nistz256_mul_mont p256_mul_mont -%define ecp_nistz256_sqr_mont p256_sqr_mont -%define CRYPTO_memcmp ring_core_0_17_5_CRYPTO_memcmp -%define CRYPTO_poly1305_finish ring_core_0_17_5_CRYPTO_poly1305_finish -%define CRYPTO_poly1305_finish_neon ring_core_0_17_5_CRYPTO_poly1305_finish_neon -%define CRYPTO_poly1305_init ring_core_0_17_5_CRYPTO_poly1305_init -%define CRYPTO_poly1305_init_neon ring_core_0_17_5_CRYPTO_poly1305_init_neon -%define CRYPTO_poly1305_update ring_core_0_17_5_CRYPTO_poly1305_update -%define CRYPTO_poly1305_update_neon ring_core_0_17_5_CRYPTO_poly1305_update_neon -%define ChaCha20_ctr32 ring_core_0_17_5_ChaCha20_ctr32 -%define LIMBS_add_mod ring_core_0_17_5_LIMBS_add_mod -%define LIMBS_are_even ring_core_0_17_5_LIMBS_are_even -%define LIMBS_are_zero ring_core_0_17_5_LIMBS_are_zero -%define LIMBS_equal ring_core_0_17_5_LIMBS_equal -%define LIMBS_equal_limb ring_core_0_17_5_LIMBS_equal_limb -%define LIMBS_less_than ring_core_0_17_5_LIMBS_less_than -%define LIMBS_less_than_limb ring_core_0_17_5_LIMBS_less_than_limb -%define LIMBS_reduce_once ring_core_0_17_5_LIMBS_reduce_once -%define LIMBS_select_512_32 ring_core_0_17_5_LIMBS_select_512_32 -%define LIMBS_shl_mod ring_core_0_17_5_LIMBS_shl_mod -%define LIMBS_sub_mod ring_core_0_17_5_LIMBS_sub_mod -%define LIMBS_window5_split_window ring_core_0_17_5_LIMBS_window5_split_window -%define LIMBS_window5_unsplit_window ring_core_0_17_5_LIMBS_window5_unsplit_window -%define LIMB_shr ring_core_0_17_5_LIMB_shr -%define OPENSSL_armcap_P ring_core_0_17_5_OPENSSL_armcap_P -%define OPENSSL_cpuid_setup ring_core_0_17_5_OPENSSL_cpuid_setup -%define OPENSSL_ia32cap_P ring_core_0_17_5_OPENSSL_ia32cap_P -%define aes_hw_ctr32_encrypt_blocks ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -%define aes_hw_encrypt ring_core_0_17_5_aes_hw_encrypt -%define aes_hw_set_encrypt_key ring_core_0_17_5_aes_hw_set_encrypt_key -%define aes_nohw_ctr32_encrypt_blocks ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -%define aes_nohw_encrypt ring_core_0_17_5_aes_nohw_encrypt -%define aes_nohw_set_encrypt_key ring_core_0_17_5_aes_nohw_set_encrypt_key -%define aesni_gcm_decrypt ring_core_0_17_5_aesni_gcm_decrypt -%define aesni_gcm_encrypt ring_core_0_17_5_aesni_gcm_encrypt -%define bn_from_montgomery_in_place ring_core_0_17_5_bn_from_montgomery_in_place -%define bn_gather5 ring_core_0_17_5_bn_gather5 -%define bn_mul_mont ring_core_0_17_5_bn_mul_mont -%define bn_mul_mont_gather5 ring_core_0_17_5_bn_mul_mont_gather5 -%define bn_neg_inv_mod_r_u64 ring_core_0_17_5_bn_neg_inv_mod_r_u64 -%define bn_power5 ring_core_0_17_5_bn_power5 -%define bn_scatter5 ring_core_0_17_5_bn_scatter5 -%define bn_sqr8x_internal ring_core_0_17_5_bn_sqr8x_internal -%define bn_sqrx8x_internal ring_core_0_17_5_bn_sqrx8x_internal -%define bsaes_ctr32_encrypt_blocks ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -%define bssl_constant_time_test_conditional_memcpy ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -%define bssl_constant_time_test_conditional_memxor ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -%define bssl_constant_time_test_main ring_core_0_17_5_bssl_constant_time_test_main -%define chacha20_poly1305_open ring_core_0_17_5_chacha20_poly1305_open -%define chacha20_poly1305_seal ring_core_0_17_5_chacha20_poly1305_seal -%define fiat_curve25519_adx_mul ring_core_0_17_5_fiat_curve25519_adx_mul -%define fiat_curve25519_adx_square ring_core_0_17_5_fiat_curve25519_adx_square -%define gcm_ghash_avx ring_core_0_17_5_gcm_ghash_avx -%define gcm_ghash_clmul ring_core_0_17_5_gcm_ghash_clmul -%define gcm_ghash_neon ring_core_0_17_5_gcm_ghash_neon -%define gcm_gmult_clmul ring_core_0_17_5_gcm_gmult_clmul -%define gcm_gmult_neon ring_core_0_17_5_gcm_gmult_neon -%define gcm_init_avx ring_core_0_17_5_gcm_init_avx -%define gcm_init_clmul ring_core_0_17_5_gcm_init_clmul -%define gcm_init_neon ring_core_0_17_5_gcm_init_neon -%define k25519Precomp ring_core_0_17_5_k25519Precomp -%define limbs_mul_add_limb ring_core_0_17_5_limbs_mul_add_limb -%define little_endian_bytes_from_scalar ring_core_0_17_5_little_endian_bytes_from_scalar -%define ecp_nistz256_neg ring_core_0_17_5_ecp_nistz256_neg -%define ecp_nistz256_select_w5 ring_core_0_17_5_ecp_nistz256_select_w5 -%define ecp_nistz256_select_w7 ring_core_0_17_5_ecp_nistz256_select_w7 -%define p256_mul_mont ring_core_0_17_5_p256_mul_mont -%define p256_point_add ring_core_0_17_5_p256_point_add -%define p256_point_add_affine ring_core_0_17_5_p256_point_add_affine -%define p256_point_double ring_core_0_17_5_p256_point_double -%define p256_point_mul ring_core_0_17_5_p256_point_mul -%define p256_point_mul_base ring_core_0_17_5_p256_point_mul_base -%define p256_point_mul_base_vartime ring_core_0_17_5_p256_point_mul_base_vartime -%define p256_scalar_mul_mont ring_core_0_17_5_p256_scalar_mul_mont -%define p256_scalar_sqr_rep_mont ring_core_0_17_5_p256_scalar_sqr_rep_mont -%define p256_sqr_mont ring_core_0_17_5_p256_sqr_mont -%define p384_elem_div_by_2 ring_core_0_17_5_p384_elem_div_by_2 -%define p384_elem_mul_mont ring_core_0_17_5_p384_elem_mul_mont -%define p384_elem_neg ring_core_0_17_5_p384_elem_neg -%define p384_elem_sub ring_core_0_17_5_p384_elem_sub -%define p384_point_add ring_core_0_17_5_p384_point_add -%define p384_point_double ring_core_0_17_5_p384_point_double -%define p384_point_mul ring_core_0_17_5_p384_point_mul -%define p384_scalar_mul_mont ring_core_0_17_5_p384_scalar_mul_mont -%define openssl_poly1305_neon2_addmulmod ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -%define openssl_poly1305_neon2_blocks ring_core_0_17_5_openssl_poly1305_neon2_blocks -%define sha256_block_data_order ring_core_0_17_5_sha256_block_data_order -%define sha512_block_data_order ring_core_0_17_5_sha512_block_data_order -%define vpaes_ctr32_encrypt_blocks ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -%define vpaes_encrypt ring_core_0_17_5_vpaes_encrypt -%define vpaes_encrypt_key_to_bsaes ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -%define vpaes_set_encrypt_key ring_core_0_17_5_vpaes_set_encrypt_key -%define x25519_NEON ring_core_0_17_5_x25519_NEON -%define x25519_fe_invert ring_core_0_17_5_x25519_fe_invert -%define x25519_fe_isnegative ring_core_0_17_5_x25519_fe_isnegative -%define x25519_fe_mul_ttt ring_core_0_17_5_x25519_fe_mul_ttt -%define x25519_fe_neg ring_core_0_17_5_x25519_fe_neg -%define x25519_fe_tobytes ring_core_0_17_5_x25519_fe_tobytes -%define x25519_ge_double_scalarmult_vartime ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -%define x25519_ge_frombytes_vartime ring_core_0_17_5_x25519_ge_frombytes_vartime -%define x25519_ge_scalarmult_base ring_core_0_17_5_x25519_ge_scalarmult_base -%define x25519_ge_scalarmult_base_adx ring_core_0_17_5_x25519_ge_scalarmult_base_adx -%define x25519_public_from_private_generic_masked ring_core_0_17_5_x25519_public_from_private_generic_masked -%define x25519_sc_mask ring_core_0_17_5_x25519_sc_mask -%define x25519_sc_muladd ring_core_0_17_5_x25519_sc_muladd -%define x25519_sc_reduce ring_core_0_17_5_x25519_sc_reduce -%define x25519_scalar_mult_adx ring_core_0_17_5_x25519_scalar_mult_adx -%define x25519_scalar_mult_generic_masked ring_core_0_17_5_x25519_scalar_mult_generic_masked - -%endif -%endif diff --git a/shim/third-party/rust/fixups/rustix/fixups.toml b/shim/third-party/rust/fixups/rustix/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/rustix/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/rustls/fixups.toml b/shim/third-party/rust/fixups/rustls/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/rustls/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/rustversion/fixups.toml b/shim/third-party/rust/fixups/rustversion/fixups.toml deleted file mode 100644 index 309316ac45495..0000000000000 --- a/shim/third-party/rust/fixups/rustversion/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/serde/fixups.toml b/shim/third-party/rust/fixups/serde/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/serde/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/serde_derive/fixups.toml b/shim/third-party/rust/fixups/serde_derive/fixups.toml deleted file mode 100644 index 015a575a2f772..0000000000000 --- a/shim/third-party/rust/fixups/serde_derive/fixups.toml +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# To set `CARGO_MANIFEST_DIR` -cargo_env = true -buildscript = [] diff --git a/shim/third-party/rust/fixups/serde_json/fixups.toml b/shim/third-party/rust/fixups/serde_json/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/serde_json/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/signal-hook/fixups.toml b/shim/third-party/rust/fixups/signal-hook/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/signal-hook/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/slab/fixups.toml b/shim/third-party/rust/fixups/slab/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/slab/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/slog/fixups.toml b/shim/third-party/rust/fixups/slog/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/slog/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/syn/fixups.toml b/shim/third-party/rust/fixups/syn/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/syn/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/sys-info/fixups.toml b/shim/third-party/rust/fixups/sys-info/fixups.toml deleted file mode 100644 index 39a5fdc37278f..0000000000000 --- a/shim/third-party/rust/fixups/sys-info/fixups.toml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] - -[[platform_fixup.'cfg(target_os = "linux")'.buildscript]] -[platform_fixup.'cfg(target_os = "linux")'.buildscript.cxx_library] -name = "linux" -srcs = ["c/linux.c"] -headers = ["c/*.h"] - -[[platform_fixup.'cfg(target_os = "macos")'.buildscript]] -[platform_fixup.'cfg(target_os = "macos")'.buildscript.cxx_library] -name = "macos" -srcs = ["c/darwin.c"] -headers = ["c/*.h"] - -[[platform_fixup.'cfg(target_os = "windows")'.buildscript]] -[platform_fixup.'cfg(target_os = "windows")'.buildscript.cxx_library] -name = "windows" -srcs = ["c/windows.c"] -headers = ["c/*.h"] diff --git a/shim/third-party/rust/fixups/sysinfo/fixups.toml b/shim/third-party/rust/fixups/sysinfo/fixups.toml deleted file mode 100644 index bcf5ac4924828..0000000000000 --- a/shim/third-party/rust/fixups/sysinfo/fixups.toml +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -extra_srcs = ["README.md", "md_doc/**/*.md"] -buildscript = [] - -[platform_fixup.'cfg(target_os = "macos")'] -buildscript = [] -rustc_flags = [ - "-lframework=IOKit", - "-lframework=Foundation", - "-lframework=CoreFoundation", - "-lframework=DiskArbitration", -] diff --git a/shim/third-party/rust/fixups/tempfile/fixups.toml b/shim/third-party/rust/fixups/tempfile/fixups.toml deleted file mode 100644 index d514599437f6a..0000000000000 --- a/shim/third-party/rust/fixups/tempfile/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/terminfo/fixups.toml b/shim/third-party/rust/fixups/terminfo/fixups.toml deleted file mode 100644 index 309316ac45495..0000000000000 --- a/shim/third-party/rust/fixups/terminfo/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/termwiz/fixups.toml b/shim/third-party/rust/fixups/termwiz/fixups.toml deleted file mode 100644 index 478b0154e80be..0000000000000 --- a/shim/third-party/rust/fixups/termwiz/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -cargo_env = true -extra_srcs = ["src/**/*.pest"] diff --git a/shim/third-party/rust/fixups/test-case/fixups.toml b/shim/third-party/rust/fixups/test-case/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/test-case/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/thiserror/fixups.toml b/shim/third-party/rust/fixups/thiserror/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/thiserror/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/tiny-keccak/fixups.toml b/shim/third-party/rust/fixups/tiny-keccak/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/tiny-keccak/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/tokio-stream/fixups.toml b/shim/third-party/rust/fixups/tokio-stream/fixups.toml deleted file mode 100644 index 3c20ec4086b2a..0000000000000 --- a/shim/third-party/rust/fixups/tokio-stream/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# reindeer cannot see through `cfg_sync!` macros and the like -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/tokio-util/fixups.toml b/shim/third-party/rust/fixups/tokio-util/fixups.toml deleted file mode 100644 index 9b40a18f4cab3..0000000000000 --- a/shim/third-party/rust/fixups/tokio-util/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/tokio/fixups.toml b/shim/third-party/rust/fixups/tokio/fixups.toml deleted file mode 100644 index 1446deebebdcd..0000000000000 --- a/shim/third-party/rust/fixups/tokio/fixups.toml +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -cfgs = ["tokio_unstable", "tokio_track_caller"] - -extra_srcs = ["src/**/*.rs"] - -buildscript = [] -features = ["tokio_track_caller"] - -extra_deps = [ ":tracing" ] diff --git a/shim/third-party/rust/fixups/tonic/fixups.toml b/shim/third-party/rust/fixups/tonic/fixups.toml deleted file mode 100644 index 1da45ba23144e..0000000000000 --- a/shim/third-party/rust/fixups/tonic/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -cargo_env = true diff --git a/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml b/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml deleted file mode 100644 index bb8e8892b738a..0000000000000 --- a/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# Reindeer can't find the dependencies due to being confused by the feature! macro. -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/trybuild/fixups.toml b/shim/third-party/rust/fixups/trybuild/fixups.toml deleted file mode 100644 index 309316ac45495..0000000000000 --- a/shim/third-party/rust/fixups/trybuild/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/typenum/fixups.toml b/shim/third-party/rust/fixups/typenum/fixups.toml deleted file mode 100644 index 6f947d94b63de..0000000000000 --- a/shim/third-party/rust/fixups/typenum/fixups.toml +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -features = ["force_unix_path_separator"] - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/unicase/fixups.toml b/shim/third-party/rust/fixups/unicase/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/unicase/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml b/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml deleted file mode 100644 index a5a969de56ac5..0000000000000 --- a/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] - -[[platform_fixup.'cfg(target_os = "windows")'.buildscript]] -[platform_fixup.'cfg(target_os = "windows")'.buildscript.prebuilt_cxx_library] -name = "extra_libraries" -# The static_libs this crate provides overlaps quite heavily with those in a default -# MinGW install, and there are also many that are DirectX specific. -# We list only those we actually need, since the others are more likely to cause problems. -static_libs = ["lib/libwinapi_ole32.a", "lib/libwinapi_shell32.a"] diff --git a/shim/third-party/rust/fixups/winapi/fixups.toml b/shim/third-party/rust/fixups/winapi/fixups.toml deleted file mode 100644 index 295d056aba7bf..0000000000000 --- a/shim/third-party/rust/fixups/winapi/fixups.toml +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] - -[[platform_fixup.'cfg(target_os = "windows")'.buildscript]] -[platform_fixup.'cfg(target_os = "windows")'.buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/windows-targets/fixups.toml b/shim/third-party/rust/fixups/windows-targets/fixups.toml deleted file mode 100644 index 9268eebf6b8fe..0000000000000 --- a/shim/third-party/rust/fixups/windows-targets/fixups.toml +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -[platform_fixup.'cfg(any(target_os = "windows", target_os = "linux"))'] -version = ">=0.48.0" -cfgs = ["windows_raw_dylib"] diff --git a/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml b/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml deleted file mode 100644 index c924883f5b0b5..0000000000000 --- a/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'] -version = "=0.48.0" -[[platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.buildscript.prebuilt_cxx_library] -name = "libwindows" -static_libs = ["lib/libwindows.0.48.0.a"] diff --git a/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml b/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml deleted file mode 100644 index aa5cd0bf4e70d..0000000000000 --- a/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'] -version = "=0.48.0" -[[platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'.buildscript.prebuilt_cxx_library] -name = "libwindows" -static_libs = ["lib/libwindows.0.48.0.a"] diff --git a/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml b/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml deleted file mode 100644 index 568edc03a17d5..0000000000000 --- a/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'] -version = "=0.48.0" -[[platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.buildscript.prebuilt_cxx_library] -name = "libwindows" -static_libs = ["lib/libwindows.0.48.0.a"] diff --git a/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml b/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml deleted file mode 100644 index 541a4b122ebac..0000000000000 --- a/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'] -version = "=0.48.0" -[[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'.buildscript.prebuilt_cxx_library] -name = "windows" -static_libs = ["lib/windows.0.48.0.lib"] diff --git a/shim/third-party/rust/fixups/winreg/fixups.toml b/shim/third-party/rust/fixups/winreg/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/winreg/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/zerocopy/fixups.toml b/shim/third-party/rust/fixups/zerocopy/fixups.toml deleted file mode 100644 index 1da45ba23144e..0000000000000 --- a/shim/third-party/rust/fixups/zerocopy/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -cargo_env = true diff --git a/shim/third-party/rust/fixups/zstd-safe/fixups.toml b/shim/third-party/rust/fixups/zstd-safe/fixups.toml deleted file mode 100644 index 554cc0dae2b2b..0000000000000 --- a/shim/third-party/rust/fixups/zstd-safe/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] diff --git a/shim/third-party/rust/fixups/zstd-sys/fixups.toml b/shim/third-party/rust/fixups/zstd-sys/fixups.toml deleted file mode 100644 index c627d9be88ba6..0000000000000 --- a/shim/third-party/rust/fixups/zstd-sys/fixups.toml +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -buildscript = [] - -[[platform_fixup.'cfg(not(all(target_os = "windows", target_env = "msvc")))'.buildscript]] -[platform_fixup.'cfg(not(all(target_os = "windows", target_env = "msvc")))'.buildscript.cxx_library] -name = "zstd" -srcs = [ - "zstd/lib/common/debug.c", - "zstd/lib/common/entropy_common.c", - "zstd/lib/common/error_private.c", - "zstd/lib/common/fse_decompress.c", - "zstd/lib/common/pool.c", - "zstd/lib/common/threading.c", - #"zstd/lib/common/xxhash.c", - "zstd/lib/common/zstd_common.c", - "zstd/lib/compress/**/*.c", - "zstd/lib/decompress/**/*.c", - "zstd/lib/decompress/huf_decompress_amd64.S", - "zstd/lib/dictBuilder/**/*.c", - "zstd/lib/legacy/**/*.c", -] -headers = [ - "zdict.h", - "zstd.h", - "zstd/lib/common/allocations.h", - "zstd/lib/common/bits.h", - "zstd/lib/common/bitstream.h", - "zstd/lib/common/compiler.h", - "zstd/lib/common/cpu.h", - "zstd/lib/common/debug.h", - "zstd/lib/common/error_private.h", - "zstd/lib/common/fse.h", - "zstd/lib/common/huf.h", - "zstd/lib/common/mem.h", - "zstd/lib/common/pool.h", - "zstd/lib/common/portability_macros.h", - "zstd/lib/common/threading.h", - "zstd/lib/common/xxhash.h", - "zstd/lib/common/zstd_deps.h", - "zstd/lib/common/zstd_internal.h", - "zstd/lib/common/zstd_trace.h", - "zstd/lib/compress/**/*.h", - "zstd/lib/decompress/**/*.h", - "zstd/lib/deprecated/zbuff.h", - "zstd/lib/dictBuilder/cover.h", - "zstd/lib/dictBuilder/divsufsort.h", - "zstd/lib/legacy/**/*.h", - "zstd/lib/zdict.h", - "zstd/lib/zstd_errors.h", - "zstd/lib/zstd.h", -] -compiler_flags = [ - "-O3", - "-DZSTD_LIB_DEPRECATED=0", - "-fvisibility=hidden", - "-DXXH_PRIVATE_API=", - "-DZSTDLIB_VISIBILITY=", - "-DZDICTLIB_VISIBILITY=", - "-DZSTDERRORLIB_VISIBILITY=", - "-DZSTD_LEGACY_SUPPORT=1" -] - -[[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'.buildscript.cxx_library] -name = "zstd-msvc" -srcs = [ - "zstd/lib/common/debug.c", - "zstd/lib/common/entropy_common.c", - "zstd/lib/common/error_private.c", - "zstd/lib/common/fse_decompress.c", - "zstd/lib/common/pool.c", - "zstd/lib/common/threading.c", - #"zstd/lib/common/xxhash.c", - "zstd/lib/common/zstd_common.c", - "zstd/lib/compress/**/*.c", - "zstd/lib/decompress/**/*.c", - #"zstd/lib/decompress/huf_decompress_amd64.S", - "zstd/lib/dictBuilder/**/*.c", - "zstd/lib/legacy/**/*.c", -] -headers = [ - "zdict.h", - "zstd.h", - "zstd/lib/common/allocations.h", - "zstd/lib/common/bits.h", - "zstd/lib/common/bitstream.h", - "zstd/lib/common/compiler.h", - "zstd/lib/common/cpu.h", - "zstd/lib/common/debug.h", - "zstd/lib/common/error_private.h", - "zstd/lib/common/fse.h", - "zstd/lib/common/huf.h", - "zstd/lib/common/mem.h", - "zstd/lib/common/pool.h", - "zstd/lib/common/portability_macros.h", - "zstd/lib/common/threading.h", - "zstd/lib/common/xxhash.h", - "zstd/lib/common/zstd_deps.h", - "zstd/lib/common/zstd_internal.h", - "zstd/lib/common/zstd_trace.h", - "zstd/lib/compress/**/*.h", - "zstd/lib/decompress/**/*.h", - "zstd/lib/deprecated/zbuff.h", - "zstd/lib/dictBuilder/cover.h", - "zstd/lib/dictBuilder/divsufsort.h", - "zstd/lib/legacy/**/*.h", - "zstd/lib/zdict.h", - "zstd/lib/zstd_errors.h", - "zstd/lib/zstd.h", -] -compiler_flags = [ - "/O2", - "-DZSTD_LIB_DEPRECATED=0", - "-DXXH_PRIVATE_API=", - "-DZSTDLIB_VISIBILITY=", - "-DZDICTLIB_VISIBILITY=", - "-DZSTDERRORLIB_VISIBILITY=", - "-DZSTD_LEGACY_SUPPORT=1" -] diff --git a/shim/third-party/rust/reindeer.toml b/shim/third-party/rust/reindeer.toml deleted file mode 100644 index 13d929bbbe93e..0000000000000 --- a/shim/third-party/rust/reindeer.toml +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# Configuration for Reindeer to generate Buck targets from Cargo.toml -# -# Overview of available options: -# https://github.com/facebookincubator/reindeer/blob/main/example/third-party/reindeer.toml - -# Parse Rust code to work out the precise set of source files for each crate. -precise_srcs = true - -# Include a public top-level target which depends on all other targets. -include_top_level = true - -[cargo] -# Support Cargo's unstable "artifact dependencies" functionality, RFC 3028. -bindeps = true - -[buck] -# Name of the generated file. -file_name = "BUCK" - -# Rules used for various kinds of targets. -rust_library = "cargo.rust_library" -rust_binary = "cargo.rust_binary" -prebuilt_cxx_library = "third_party_rust_prebuilt_cxx_library" - -buckfile_imports = """ -load("@prelude//rust:cargo_buildscript.bzl", "buildscript_run") -load("@prelude//rust:cargo_package.bzl", "cargo") -load("@shim//third-party/macros:rust_third_party.bzl", "third_party_rust_prebuilt_cxx_library") -""" diff --git a/shim/third-party/rust/top/main.rs b/shim/third-party/rust/top/main.rs deleted file mode 100644 index 7dde67dd19b09..0000000000000 --- a/shim/third-party/rust/top/main.rs +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. -// -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. - -#![allow(unused_crate_dependencies)] - -fn main() {} diff --git a/shim/third-party/snappy/BUCK b/shim/third-party/snappy/BUCK deleted file mode 100644 index 295d5a6c2b78c..0000000000000 --- a/shim/third-party/snappy/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "snappy", - packages = { - "//os:linux-fedora": ["snappy-devel"], - "//os:linux-ubuntu": ["libsnappy-dev"], - "//os:macos-homebrew": ["snappy"], - }, - pkgconfig_name = "snappy", -) diff --git a/shim/third-party/xz/BUCK b/shim/third-party/xz/BUCK deleted file mode 100644 index 5b427a9753902..0000000000000 --- a/shim/third-party/xz/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "lzma", - packages = { - "//os:linux-fedora": ["xz-devel"], - "//os:linux-ubuntu": ["liblz4-dev"], - "//os:macos-homebrew": ["liblzma"], - }, - pkgconfig_name = "liblzma", -) diff --git a/shim/third-party/zlib/BUCK b/shim/third-party/zlib/BUCK deleted file mode 100644 index 5d79750e8b297..0000000000000 --- a/shim/third-party/zlib/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "z", - packages = { - "//os:linux-fedora": ["zlib-devel"], - "//os:linux-ubuntu": ["zlib1g"], - "//os:macos-homebrew": ["zlib"], - }, - pkgconfig_name = "zlib", -) diff --git a/shim/third-party/zstd/BUCK b/shim/third-party/zstd/BUCK deleted file mode 100644 index 4bc3bbb5776d8..0000000000000 --- a/shim/third-party/zstd/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "zstd", - packages = { - "//os:linux-fedora": ["libzstd-devel"], - "//os:linux-ubuntu": ["libzstd-dev"], - "//os:macos-homebrew": ["zstd"], - }, - pkgconfig_name = "libzstd", -) diff --git a/shim/tools/build_defs/audit_dependencies_test.bzl b/shim/tools/build_defs/audit_dependencies_test.bzl deleted file mode 100644 index a3174389f5562..0000000000000 --- a/shim/tools/build_defs/audit_dependencies_test.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# Noop in OSS -def audit_dependencies_test(**_kwargs): - pass diff --git a/shim/tools/build_defs/buck2/is_buck2.bzl b/shim/tools/build_defs/buck2/is_buck2.bzl deleted file mode 100644 index 45140ef215fa8..0000000000000 --- a/shim/tools/build_defs/buck2/is_buck2.bzl +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def is_buck2(): - return True diff --git a/shim/tools/build_defs/buckconfig.bzl b/shim/tools/build_defs/buckconfig.bzl deleted file mode 100644 index d9c29d252f9dd..0000000000000 --- a/shim/tools/build_defs/buckconfig.bzl +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//utils:buckconfig.bzl", _read = "read", _read_bool = "read_bool", _read_choice = "read_choice", _read_int = "read_int", _read_list = "read_list", _read_string = "read_string", _resolve_alias = "resolve_alias") - -read = _read -read_string = _read_string -read_choice = _read_choice -read_bool = _read_bool -read_int = _read_int -read_list = _read_list -resolve_alias = _resolve_alias diff --git a/shim/tools/build_defs/default_platform_defs.bzl b/shim/tools/build_defs/default_platform_defs.bzl deleted file mode 100644 index 3f860ae49df06..0000000000000 --- a/shim/tools/build_defs/default_platform_defs.bzl +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -DEVSERVER_PLATFORM_REGEX = "UNUSED" diff --git a/shim/tools/build_defs/fb_native_wrapper.bzl b/shim/tools/build_defs/fb_native_wrapper.bzl deleted file mode 100644 index f6795d7ff4313..0000000000000 --- a/shim/tools/build_defs/fb_native_wrapper.bzl +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -fb_native = native diff --git a/shim/tools/build_defs/glob_defs.bzl b/shim/tools/build_defs/glob_defs.bzl deleted file mode 100644 index c119afa5564a9..0000000000000 --- a/shim/tools/build_defs/glob_defs.bzl +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -glob = native.glob diff --git a/shim/xplat/executorch/kernels/optimized/lib_defs.bzl b/shim/xplat/executorch/kernels/optimized/lib_defs.bzl deleted file mode 100644 index af62407eb079c..0000000000000 --- a/shim/xplat/executorch/kernels/optimized/lib_defs.bzl +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@fbsource//tools/build_defs:default_platform_defs.bzl", "DEVSERVER_PLATFORM_REGEX") -load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") - -# Because vec exists as a collection of header files, compile and preprocessor -# flags applied to the vec target do not have any effect, since no compilation -# actually occurs for the target. -# -# Targets using the vec library must therefore call the get_vec_*_flags -# functions in order to declare the required compiler flags needed in order to -# access CPU vector intrinsics. - -def get_vec_android_preprocessor_flags(): - preprocessor_flags = [ - ( - "^android-arm64.*$", - [ - "-DET_BUILD_ARM_VEC256_WITH_SLEEF", - ], - ), - ] - return preprocessor_flags - -def get_vec_cxx_preprocessor_flags(): - preprocessor_flags = [ - ( - DEVSERVER_PLATFORM_REGEX, - [ - "-DCPU_CAPABILITY_AVX2", - ], - ), - ] - return preprocessor_flags - -def get_vec_fbcode_preprocessor_flags(): - preprocessor_flags = [ - "-DCPU_CAPABILITY_AVX2", - ] - return preprocessor_flags - -# Currently, having a dependency on fbsource//third-party/sleef:sleef may cause -# duplicate symbol errors when linking fbcode targets in opt mode that also -# depend on ATen. This is because ATen accesses sleef via the third-party folder -# in caffe2 (caffe2/third-party//sleef:sleef). -# TODO(ssjia): Enable -DCPU_CAPABILITY_AVX2 in fbcode, which requires sleef. -def define_libs(): - runtime.cxx_library( - name = "libvec", - srcs = [], - exported_headers = native.glob([ - "vec/**/*.h", - ]), - header_namespace = "executorch/kernels/optimized", - visibility = [ - "//executorch/...", - "@EXECUTORCH_CLIENTS", - ], - cxx_platform_deps = select({ - "DEFAULT": [ - ( - DEVSERVER_PLATFORM_REGEX, - [ - "fbsource//third-party/sleef:sleef", - ], - ), - ], - "ovr_config//cpu:arm64": [ - ( - DEVSERVER_PLATFORM_REGEX, - [ - "fbsource//third-party/sleef:sleef_arm", - ], - ), - ], - }), - fbandroid_platform_deps = [ - ( - "^android-arm64.*$", - [ - "fbsource//third-party/sleef:sleef_arm", - ], - ), - ], - ) - - runtime.cxx_library( - name = "libutils", - srcs = [], - exported_headers = native.glob([ - "utils/**/*.h", - ]), - header_namespace = "executorch/kernels/optimized", - visibility = [ - "//executorch/...", - "@EXECUTORCH_CLIENTS", - ], - exported_deps = [ - # Needed to access the __ET_INLINE macro - "//executorch/runtime/platform:compiler", - ], - ) - - runtime.cxx_library( - name = "libblas", - srcs = native.glob([ - "blas/**/*.cpp", - ]), - exported_headers = native.glob([ - "blas/**/*.h", - ]), - header_namespace = "executorch/kernels/optimized", - visibility = [ - "//executorch/...", - "@EXECUTORCH_CLIENTS", - ], - fbandroid_platform_preprocessor_flags = [ - ( - "^android-arm64.*$", - [ - "-DET_BUILD_WITH_BLAS", - ], - ), - ], - fbandroid_platform_deps = [ - ( - "^android-arm64.*$", - [ - "fbsource//third-party/openblas:openblas", - ], - ), - ], - fbobjc_exported_preprocessor_flags = [ - "-DET_BUILD_WITH_BLAS", - "-DET_BUILD_FOR_APPLE", - ], - fbobjc_frameworks = [ - "Accelerate", - ], - exported_deps = [ - "//executorch/kernels/optimized:libutils", - "//executorch/runtime/core/exec_aten:lib", - ], - ) diff --git a/shim/xplat/executorch/kernels/optimized/op_registration_util.bzl b/shim/xplat/executorch/kernels/optimized/op_registration_util.bzl deleted file mode 100644 index c9fe4ec912db4..0000000000000 --- a/shim/xplat/executorch/kernels/optimized/op_registration_util.bzl +++ /dev/null @@ -1,138 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -load("@fbsource//xplat/executorch/build:selects.bzl", "selects") -load( - "@fbsource//xplat/executorch/kernels/optimized:lib_defs.bzl", - "get_vec_android_preprocessor_flags", -) - -def op_target(name, deps = []): - """Registers an optimized implementation for an operator overload group. - - An operator overload group is a set of operator overloads with a common - operator name. That common operator name should be the base name of this - target. - - E.g., the "add" operator overload group, named "op_add" in this target, - might implement: - - add.Tensor - - add_.Tensor - - add.out - - add.Scalar - - If an op target would like to share a header/sources with a different op - target (e.g., helpers/utilities), it should declare a separate cxx_library - and add it as a dep. - - Args: - name: The name of the operator overload group; e.g., - "op_add". This directory must contain a source file named - ".cpp"; e.g., "op_add.cpp". - deps: Optional extra deps to add to the cxx_library(). Note: - - op targets may not depend on other op targets, to keep the - dependencies manageable. If two op targets would like to share - code, define a separate runtime.cxx_library that they both depend - on. - """ - - # Note that this doesn't actually define the target, but helps register - # it in a table that's used to define the target. - return { - "deps": deps, - "name": name, - } - -def _enforce_deps(deps, name): - """Fails if any of the deps are not allowed. - - Args: - deps: A list of build target strings. - name: The name of the target; e.g., "op_add" - """ - for dep in deps: - if dep.startswith(":op_"): - # op targets may not depend on other op targets, to keep the - # dependencies manageable. If two op targets would like to share - # code, define a separate runtime.cxx_library that they both depend - # on. - fail("op_target {} may not depend on other op_target {}".format( - name, - dep, - )) - -def define_op_library(name, deps): - """Defines a cxx_library target for the named operator overload group. - - Args: - name: The name of the target; e.g., "op_add" - deps: List of deps for the target. - """ - selects.apply(obj = deps, function = native.partial(_enforce_deps, name = name)) - - augmented_deps = deps + [ - "//executorch/kernels/optimized:libvec", - "//executorch/kernels/optimized:libutils", - ] - - runtime.cxx_library( - name = "{}".format(name), - srcs = [ - "{}.cpp".format(name), - ], - visibility = [ - "//executorch/kernels/portable/test/...", - "//executorch/kernels/quantized/test/...", - "//executorch/kernels/optimized/test/...", - "//executorch/kernels/test/...", - "@EXECUTORCH_CLIENTS", - ], - # kernels often have helpers with no prototypes just disabling the warning here as the headers - # are codegend and linked in later - compiler_flags = ["-Wno-missing-prototypes"], - deps = [ - "//executorch/runtime/kernel:kernel_includes", - ] + augmented_deps, - fbandroid_platform_preprocessor_flags = get_vec_android_preprocessor_flags(), - # sleef needs to be added as a direct dependency of the operator target when building for Android, - # or a linker error may occur. Not sure why this happens; it seems that fbandroid_platform_deps of - # dependencies are not transitive - fbandroid_platform_deps = [ - ( - "^android-arm64.*$", - [ - "fbsource//third-party/sleef:sleef_arm", - ], - ), - ], - # link_whole is necessary because the operators register themselves - # via static initializers that run at program startup. - # @lint-ignore BUCKLINT link_whole - link_whole = True, - ) - -def define_op_target(name, deps): - """Possibly defines cxx_library targets for the named operator group. - - Args: - name: The base name of the target; e.g., "op_add" - deps: List of deps for the targets. - """ - - # When building in ATen mode, ATen-compatible (non-custom) operators will - # use the implementations provided by ATen, so we should not build the - # versions defined here. - define_op_library( - name = name, - deps = deps, - ) - -def is_op_disabled(name): - # TODO (gjcomer) Enable ops with sleef dependency in OSS - disabled_ops = ["op_gelu", "op_log_softmax"] - return name in disabled_ops From f0961858be85067a44beb80fc71a12b1148424c8 Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Mon, 28 Oct 2024 16:59:59 -0700 Subject: [PATCH 400/479] override getSupportedApiList for Yangra Platform Summary: as titled Reviewed By: srikrishnagopu Differential Revision: D65046425 Privacy Context Container: L1125642 fbshipit-source-id: fb4a639a36fbb2f19572b18c7daa75723836b96f --- fboss/agent/platforms/sai/SaiPlatform.cpp | 10 ---------- .../agent/platforms/sai/SaiYangraPlatform.cpp | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index 9028d29113e87..04c91eec01b7c 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -712,16 +712,6 @@ const std::set& SaiPlatform::getDefaultSwitchAsicSupportedApis() static auto apis = SaiApiTable::getInstance()->getFullApiList(); // Macsec is not currently supported in the broadcom sai sdk apis.erase(facebook::fboss::MacsecApi::ApiType); -#if defined(CHENAB_SDK) - apis.erase(facebook::fboss::MplsApi::ApiType); - apis.erase(facebook::fboss::VirtualRouterApi::ApiType); - apis.erase(facebook::fboss::TamApi::ApiType); - apis.erase(facebook::fboss::SystemPortApi::ApiType); -#if SAI_API_VERSION >= SAI_VERSION(1, 14, 0) - apis.erase(facebook::fboss::ArsApi::ApiType); - apis.erase(facebook::fboss::ArsProfileApi::ApiType); -#endif -#endif return apis; } const std::set& SaiPlatform::getDefaultPhyAsicSupportedApis() const { diff --git a/fboss/agent/platforms/sai/SaiYangraPlatform.cpp b/fboss/agent/platforms/sai/SaiYangraPlatform.cpp index 260094b41f1dd..c6f0521a46960 100644 --- a/fboss/agent/platforms/sai/SaiYangraPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiYangraPlatform.cpp @@ -12,6 +12,13 @@ #include "fboss/agent/hw/switch_asics/ChenabAsic.h" #include "fboss/agent/platforms/common/yangra/YangraPlatformMapping.h" +#include "fboss/agent/hw/sai/api/ArsApi.h" +#include "fboss/agent/hw/sai/api/ArsProfileApi.h" +#include "fboss/agent/hw/sai/api/MplsApi.h" +#include "fboss/agent/hw/sai/api/SystemPortApi.h" +#include "fboss/agent/hw/sai/api/TamApi.h" +#include "fboss/agent/hw/sai/api/VirtualRouterApi.h" + #include namespace facebook::fboss { @@ -49,7 +56,16 @@ SaiYangraPlatform::getSaiProfileVendorExtensionValues() const { } const std::set& SaiYangraPlatform::getSupportedApiList() const { - return getDefaultSwitchAsicSupportedApis(); + static auto apis = getDefaultSwitchAsicSupportedApis(); + apis.erase(facebook::fboss::MplsApi::ApiType); + apis.erase(facebook::fboss::VirtualRouterApi::ApiType); + apis.erase(facebook::fboss::TamApi::ApiType); + apis.erase(facebook::fboss::SystemPortApi::ApiType); +#if SAI_API_VERSION >= SAI_VERSION(1, 14, 0) + apis.erase(facebook::fboss::ArsApi::ApiType); + apis.erase(facebook::fboss::ArsProfileApi::ApiType); +#endif + return apis; } std::optional From 13053452f8a2bba12d985bc9050e4598f301e834 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Mon, 28 Oct 2024 19:47:15 -0700 Subject: [PATCH 401/479] s/getAssociatedSystemPortRangeIf/getAssociatedSystemPortRangesIf Summary: Start returning ranges vector for the associted system port ranges for a port/interface. TODO: omit its use for calculating sys port id and move to local/globalSystemPortOffset Reviewed By: zechengh09 Differential Revision: D65079027 fbshipit-source-id: bd47ad0defcdab58a2c5aa33b8a710989d515d0c --- fboss/agent/state/SwitchState.cpp | 12 ++++++------ fboss/agent/state/SwitchState.h | 4 ++-- fboss/agent/state/tests/InterfaceTests.cpp | 10 ++++++---- fboss/agent/state/tests/PortTests.cpp | 14 +++++++++++--- fboss/agent/state/tests/SystemPortTests.cpp | 12 ++++++++---- fboss/agent/test/EcmpSetupHelper.cpp | 8 +++++--- 6 files changed, 38 insertions(+), 22 deletions(-) diff --git a/fboss/agent/state/SwitchState.cpp b/fboss/agent/state/SwitchState.cpp index 4a3bf5db2c8b2..9fec05ad643ec 100644 --- a/fboss/agent/state/SwitchState.cpp +++ b/fboss/agent/state/SwitchState.cpp @@ -650,26 +650,26 @@ SwitchID SwitchState::getAssociatedSwitchID(PortID portID) const { return getSystemPorts()->getNode(*systemPortID)->getSwitchId(); } -std::optional SwitchState::getAssociatedSystemPortRangeIf( +cfg::SystemPortRanges SwitchState::getAssociatedSystemPortRangesIf( InterfaceID intfID) const { auto intf = getInterfaces()->getNodeIf(intfID); if (!intf || intf->getType() != cfg::InterfaceType::SYSTEM_PORT) { - return std::nullopt; + return cfg::SystemPortRanges(); } auto systemPortID = intf->getSystemPortID(); CHECK(systemPortID.has_value()); auto switchId = getSystemPorts()->getNode(*systemPortID)->getSwitchId(); auto dsfNode = getDsfNodes()->getNodeIf(switchId); - return dsfNode->getSystemPortRange(); + return dsfNode->getSystemPortRanges(); } -std::optional SwitchState::getAssociatedSystemPortRangeIf( +cfg::SystemPortRanges SwitchState::getAssociatedSystemPortRangesIf( PortID portID) const { auto port = getPorts()->getNodeIf(portID); if (!port || port->getInterfaceIDs().size() != 1) { - return std::nullopt; + return cfg::SystemPortRanges(); } - return getAssociatedSystemPortRangeIf(port->getInterfaceID()); + return getAssociatedSystemPortRangesIf(port->getInterfaceID()); } std::optional SwitchState::getClusterId(SwitchID switchId) const { diff --git a/fboss/agent/state/SwitchState.h b/fboss/agent/state/SwitchState.h index f8902acb7aa0d..d8d23d2712dab 100644 --- a/fboss/agent/state/SwitchState.h +++ b/fboss/agent/state/SwitchState.h @@ -256,13 +256,13 @@ class SwitchState : public ThriftStructNode { * Get sys port range associated with this interface. Only applicable * for interfaces of type system port */ - std::optional getAssociatedSystemPortRangeIf( + cfg::SystemPortRanges getAssociatedSystemPortRangesIf( InterfaceID intfID) const; /* * Get sys port range associated with this port. Only applicable * for ports that have intf of type SYS_PORT attached. */ - std::optional getAssociatedSystemPortRangeIf(PortID port) const; + cfg::SystemPortRanges getAssociatedSystemPortRangesIf(PortID port) const; std::optional getClusterId(SwitchID switchId) const; std::vector getIntraClusterSwitchIds(SwitchID switchId) const; const std::shared_ptr& getInterfaces() const; diff --git a/fboss/agent/state/tests/InterfaceTests.cpp b/fboss/agent/state/tests/InterfaceTests.cpp index 8e9c794b54384..612c5acd9a0aa 100644 --- a/fboss/agent/state/tests/InterfaceTests.cpp +++ b/fboss/agent/state/tests/InterfaceTests.cpp @@ -786,8 +786,9 @@ TEST(Interface, getInterfaceSysPortRangeVoqSwitch) { ASSERT_NE(nullptr, stateV1); auto multiIntfs = stateV1->getInterfaces(); auto intf = multiIntfs->cbegin()->second->cbegin()->second; - EXPECT_TRUE( - stateV1->getAssociatedSystemPortRangeIf(intf->getID()).has_value()); + EXPECT_FALSE(stateV1->getAssociatedSystemPortRangesIf(intf->getID()) + .systemPortRanges() + ->empty()); } TEST(Interface, getInterfaceSysPortRange) { @@ -798,8 +799,9 @@ TEST(Interface, getInterfaceSysPortRange) { ASSERT_NE(nullptr, stateV1); auto multiIntfs = stateV1->getInterfaces(); auto intf = multiIntfs->cbegin()->second->cbegin()->second; - EXPECT_FALSE( - stateV1->getAssociatedSystemPortRangeIf(intf->getID()).has_value()); + EXPECT_TRUE(stateV1->getAssociatedSystemPortRangesIf(intf->getID()) + .systemPortRanges() + ->empty()); } TEST(Interface, getInterfacePortsVoqSwitch) { diff --git a/fboss/agent/state/tests/PortTests.cpp b/fboss/agent/state/tests/PortTests.cpp index 56ccb79fea5f3..2400e04312f13 100644 --- a/fboss/agent/state/tests/PortTests.cpp +++ b/fboss/agent/state/tests/PortTests.cpp @@ -940,8 +940,12 @@ TEST(Port, verifyInterfaceIDsForVoqSwitches) { for (const auto& portMap : std::as_const(*(stateV1->getPorts()))) { for (auto port : *portMap.second) { auto portID = port.second->getID(); + // FIXME [2-stage DSF] migrate to using global/localSysetemPortOffset auto expectedIntfID = InterfaceID( - *stateV1->getAssociatedSystemPortRangeIf(portID)->minimum() + + *stateV1->getAssociatedSystemPortRangesIf(portID) + .systemPortRanges() + ->begin() + ->minimum() + port.second->getID()); EXPECT_EQ(expectedIntfID, port.second->getInterfaceID()); } @@ -959,7 +963,9 @@ TEST(Port, verifySysPortRangeForNonVoqSwitches) { for (const auto& portMap : std::as_const(*(stateV1->getPorts()))) { for (auto port : *portMap.second) { auto portID = port.second->getID(); - EXPECT_FALSE(stateV1->getAssociatedSystemPortRangeIf(portID).has_value()); + EXPECT_TRUE(stateV1->getAssociatedSystemPortRangesIf(portID) + .systemPortRanges() + ->empty()); } } } @@ -1011,7 +1017,9 @@ TEST(Port, verifySysPortRangeForVoqSwitches) { for (const auto& portMap : std::as_const(*(stateV1->getPorts()))) { for (auto port : *portMap.second) { auto portID = port.second->getID(); - EXPECT_TRUE(stateV1->getAssociatedSystemPortRangeIf(portID).has_value()); + EXPECT_FALSE(stateV1->getAssociatedSystemPortRangesIf(portID) + .systemPortRanges() + ->empty()); } } } diff --git a/fboss/agent/state/tests/SystemPortTests.cpp b/fboss/agent/state/tests/SystemPortTests.cpp index ac23e519a718c..3d76fe8674841 100644 --- a/fboss/agent/state/tests/SystemPortTests.cpp +++ b/fboss/agent/state/tests/SystemPortTests.cpp @@ -110,10 +110,14 @@ TEST(SystemPort, sysPortApplyConfig) { // Flip one port to fabric port type and see that sys ports are updated config.ports()->begin()->portType() = cfg::PortType::FABRIC_PORT; // Prune the interface corresponding to now changed port type - auto sysPortRange = stateV1->getAssociatedSystemPortRangeIf( - PortID(*config.ports()->begin()->logicalID())); - auto intfIDToPrune = - *sysPortRange->minimum() + *config.ports()->begin()->logicalID(); + auto sysPortRanges = *stateV1 + ->getAssociatedSystemPortRangesIf( + PortID(*config.ports()->begin()->logicalID())) + .systemPortRanges(); + ASSERT_FALSE(sysPortRanges.empty()); + // FIXME [2-stage DSF] migrate to using global/localSysetemPortOffset + auto sysPortBase = *sysPortRanges.begin()->minimum(); + auto intfIDToPrune = sysPortBase + *config.ports()->begin()->logicalID(); std::vector intfs; for (const auto& intf : *config.interfaces()) { if (*intf.intfID() != intfIDToPrune) { diff --git a/fboss/agent/test/EcmpSetupHelper.cpp b/fboss/agent/test/EcmpSetupHelper.cpp index 4de7be8c6e0f7..a804cb161ab59 100644 --- a/fboss/agent/test/EcmpSetupHelper.cpp +++ b/fboss/agent/test/EcmpSetupHelper.cpp @@ -383,11 +383,13 @@ std::optional BaseEcmpSetupHelper::getInterface( return intf->getID(); } else if (port.isPhysicalPort()) { // Look for port RIF - auto sysPortRange = state->getAssociatedSystemPortRangeIf(port.phyPortID()); - if (!sysPortRange.has_value()) { + auto sysPortRanges = + state->getAssociatedSystemPortRangesIf(port.phyPortID()); + if (sysPortRanges.systemPortRanges()->empty()) { return std::nullopt; } - auto sysPortBase = *sysPortRange->minimum(); + // FIXME [2-stage DSF] migrate to using global/localSysetemPortOffset + auto sysPortBase = *sysPortRanges.systemPortRanges()->begin()->minimum(); SystemPortID sysPortId{// static_cast to avoid spurious narrowing conversion // compiler warning. PortID is just 16 bits static_cast(port.intID()) + sysPortBase}; From 51513e092c1ba22e92642d3b1b7f091faf46d042 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Mon, 28 Oct 2024 19:47:15 -0700 Subject: [PATCH 402/479] Kill dup declaration/definition Summary: As titled. Change callsites to use a single function, will be easier to change for 2-stage DSF Reviewed By: shri-khare Differential Revision: D65076115 fbshipit-source-id: fbb3145d8d0190a6cec5683ff561b2bb55b98b25 --- fboss/agent/Utils.cpp | 12 ++---------- fboss/agent/Utils.h | 5 ----- fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp | 2 +- fboss/agent/test/TestUtils.cpp | 4 +++- 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 3f103c1aeb185..af444bf8046b3 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -389,8 +389,8 @@ PortID getPortID( SystemPortID getSystemPortID( const PortID& portId, const std::map& switchToSwitchInfo, - int64_t switchId) { - auto switchInfo = switchToSwitchInfo.find(switchId); + SwitchID switchId) { + auto switchInfo = switchToSwitchInfo.find(static_cast(switchId)); if (switchInfo == switchToSwitchInfo.end()) { throw FbossError( "switchId: ", switchId, " not found in switchToSwitchInfo"); @@ -404,14 +404,6 @@ SystemPortID getSystemPortID( return SystemPortID(systemPortId); } -SystemPortID getSystemPortID( - const PortID& portId, - const std::map& switchToSwitchInfo, - SwitchID switchId) { - return getSystemPortID( - portId, switchToSwitchInfo, static_cast(switchId)); -} - SystemPortID getSystemPortID( const PortID& portId, const std::shared_ptr& state, diff --git a/fboss/agent/Utils.h b/fboss/agent/Utils.h index abd67805be47c..329b92234809a 100644 --- a/fboss/agent/Utils.h +++ b/fboss/agent/Utils.h @@ -250,11 +250,6 @@ PortID getPortID( SystemPortID sysPortId, const std::shared_ptr& state); -SystemPortID getSystemPortID( - const PortID& portId, - const std::map& switchToSwitchInfo, - int64_t switchId); - SystemPortID getSystemPortID( const PortID& portId, const std::map& switchToSwitchInfo, diff --git a/fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp b/fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp index f34908fad0b09..485cf5ab38c9d 100644 --- a/fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp @@ -356,7 +356,7 @@ std::shared_ptr SaiSystemPortManager::constructSystemPorts( continue; } auto sysPort = std::make_shared(getSystemPortID( - port.second->getID(), switchIdToSwitchInfo, switchId)); + port.second->getID(), switchIdToSwitchInfo, SwitchID(switchId))); sysPort->setSwitchId(SwitchID(switchId)); sysPort->setName( folly::sformat("{}:{}", switchId, port.second->getName())); diff --git a/fboss/agent/test/TestUtils.cpp b/fboss/agent/test/TestUtils.cpp index b00d72e1e3235..449ce996bd6fd 100644 --- a/fboss/agent/test/TestUtils.cpp +++ b/fboss/agent/test/TestUtils.cpp @@ -387,7 +387,9 @@ cfg::SwitchConfig testConfigBImpl() { const auto& port = cfg.ports()->at(index); cfg::Interface intf; auto intfId = getSystemPortID( - PortID(*port.logicalID()), switchId2SwitchInfo, switchIndex + 1); + PortID(*port.logicalID()), + switchId2SwitchInfo, + SwitchID(switchIndex + 1)); XLOG(INFO) << "Port id : " << *port.logicalID() << ", intf id : " << intfId; intf.intfID() = static_cast(intfId); From 5626933bf74f664324c883a9640336080781f99b Mon Sep 17 00:00:00 2001 From: genkzgnluxbjeyb Date: Mon, 28 Oct 2024 20:09:07 -0700 Subject: [PATCH 403/479] fboss_hw_test_config_sync Differential Revision: D65108154 fbshipit-source-id: 0bc4951d78fe6885fc5d99d87be97d4291e9c223 --- .../darwin.agent.materialized_JSON | 32 +- .../elbert.agent.materialized_JSON | 32 +- .../fuji.agent.materialized_JSON | 32 +- .../galaxy_fc.agent.materialized_JSON | 31 +- .../galaxy_lc_left.agent.materialized_JSON | 31 +- .../galaxy_lc_right.agent.materialized_JSON | 31 +- .../meru400bfu.agent.materialized_JSON | 30 +- .../meru400biu.agent.materialized_JSON | 60 +- .../meru800bfa.agent.materialized_JSON | 2091 +++++++++-------- .../meru800bia.agent.materialized_JSON | 74 +- .../minipack.agent.materialized_JSON | 32 +- .../montblanc.agent.materialized_JSON | 32 +- .../wedge100.agent.materialized_JSON | 31 +- .../wedge400.agent.materialized_JSON | 32 +- .../yamp.agent.materialized_JSON | 32 +- 15 files changed, 1533 insertions(+), 1070 deletions(-) diff --git a/fboss/oss/hw_test_configs/darwin.agent.materialized_JSON b/fboss/oss/hw_test_configs/darwin.agent.materialized_JSON index 9273d65eb68ad..2c73d7de3af46 100644 --- a/fboss/oss/hw_test_configs/darwin.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/darwin.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -176,10 +204,12 @@ "dport_map_port_9": "3", "dport_map_port_92": "20", "dpr_clock_frequency": "1000", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "1", "l2xmsg_shadow_hit_bits": "0", "l3_alpm_enable": "2", "l3_alpm_ipv6_128b_bkt_rsvd": "1", + "l3_max_ecmp_mode": "1", "load_firmware": "0x2", "macro_flow_hash_shuffle_random_seed": "34345645", "mem_cache_enable": "0", diff --git a/fboss/oss/hw_test_configs/elbert.agent.materialized_JSON b/fboss/oss/hw_test_configs/elbert.agent.materialized_JSON index 7f772f2542efa..e6867e7dd3744 100644 --- a/fboss/oss/hw_test_configs/elbert.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/elbert.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -137,7 +165,7 @@ "config": { }, - "yamlConfig": "---\ndevice:\n 0:\n PC_PM_CORE:\n ?\n PC_PM_ID: 2\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45013276\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x67231054\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 6\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47123065\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 10\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27143065\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 14\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57213064\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 17\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x36740521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64130257\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xFC\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xEC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 22\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47301256\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74530261\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xCE\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xEC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 28\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x36241750\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x03426715\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x03\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3E\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 32\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12653740\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45132067\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x20\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC2\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 21\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x74\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 18\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 29\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x23764501\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76123054\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x90\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 25\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 8\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32017645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 4\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x41023576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45012367\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x7F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x4C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 16\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x31027645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 12\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32017645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 5\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47123056\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02674153\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xB4\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 1\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01457632\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x65041273\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xB4\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 13\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57123064\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 9\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47123065\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x51674320\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x71\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 23\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54671023\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54763210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC1\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 20\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54671023\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54763210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC1\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 30\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x71305246\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x03216475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDE\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x9F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 26\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54671023\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54763210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC1\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 19\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 24\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 27\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x47250361\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 31\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x71046523\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23064571\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAB\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 3\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x02136475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x31205746\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x00\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x2C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 7\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45762301\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45672310\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x38\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 11\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x34017625\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 15\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x31027654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 46\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 41\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 38\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 33\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12653740\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64321075\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x20\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 62\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x46572031\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75641302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x01\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3E\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 58\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10235467\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32015476\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x38\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x1C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 54\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67524310\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 50\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67451320\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 60\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x41763502\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x14720563\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x30\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x77\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 64\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45013276\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10546723\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 52\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x51763402\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x67512043\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x30\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x2B\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 56\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x41763502\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x67512043\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x30\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x2B\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 42\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01324576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23014567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD3\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 45\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01324576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23014567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD3\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 35\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75641302\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x47652031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x21\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x9F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 39\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01324576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23014567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD3\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 44\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 47\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 36\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67103245\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01765423\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x47\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x99\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 40\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 57\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67542310\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 61\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x53670421\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32765410\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x84\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x33\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 49\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67541320\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 53\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67542310\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 63\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01457632\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23675410\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xEA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 59\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12475630\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57210364\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x25\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 55\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x14276530\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57210364\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x25\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 51\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21576430\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57210364\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x25\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 48\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x73462105\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x13647502\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x4C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 43\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30475612\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x53746102\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC4\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xF0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 37\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21657403\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x24351706\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDC\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 34\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x71046523\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x27064531\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x56\n TX_POLARITY_FLIP_AUTO: 0\n...\n---\ndevice:\n 0:\n PC_PORT_PHYS_MAP:\n ?\n PORT_ID: 0\n :\n PC_PHYS_PORT_ID: 0\n ?\n PORT_ID: 1\n :\n PC_PHYS_PORT_ID: 1\n ?\n PORT_ID: 2\n :\n PC_PHYS_PORT_ID: 3\n ?\n PORT_ID: 3\n :\n PC_PHYS_PORT_ID: 5\n ?\n PORT_ID: 4\n :\n PC_PHYS_PORT_ID: 7\n ?\n PORT_ID: 5\n :\n PC_PHYS_PORT_ID: 9\n ?\n PORT_ID: 6\n :\n PC_PHYS_PORT_ID: 11\n ?\n PORT_ID: 7\n :\n PC_PHYS_PORT_ID: 13\n ?\n PORT_ID: 8\n :\n PC_PHYS_PORT_ID: 15\n ?\n PORT_ID: 17\n :\n PC_PHYS_PORT_ID: 17\n ?\n PORT_ID: 18\n :\n PC_PHYS_PORT_ID: 19\n ?\n PORT_ID: 19\n :\n PC_PHYS_PORT_ID: 21\n ?\n PORT_ID: 20\n :\n PC_PHYS_PORT_ID: 23\n ?\n PORT_ID: 21\n :\n PC_PHYS_PORT_ID: 25\n ?\n PORT_ID: 22\n :\n PC_PHYS_PORT_ID: 27\n ?\n PORT_ID: 23\n :\n PC_PHYS_PORT_ID: 29\n ?\n PORT_ID: 24\n :\n PC_PHYS_PORT_ID: 31\n ?\n PORT_ID: 34\n :\n PC_PHYS_PORT_ID: 33\n ?\n PORT_ID: 35\n :\n PC_PHYS_PORT_ID: 35\n ?\n PORT_ID: 36\n :\n PC_PHYS_PORT_ID: 37\n ?\n PORT_ID: 37\n :\n PC_PHYS_PORT_ID: 39\n ?\n PORT_ID: 38\n :\n PC_PHYS_PORT_ID: 41\n ?\n PORT_ID: 39\n :\n PC_PHYS_PORT_ID: 43\n ?\n PORT_ID: 40\n :\n PC_PHYS_PORT_ID: 45\n ?\n PORT_ID: 41\n :\n PC_PHYS_PORT_ID: 47\n ?\n PORT_ID: 51\n :\n PC_PHYS_PORT_ID: 49\n ?\n PORT_ID: 52\n :\n PC_PHYS_PORT_ID: 51\n ?\n PORT_ID: 53\n :\n PC_PHYS_PORT_ID: 53\n ?\n PORT_ID: 54\n :\n PC_PHYS_PORT_ID: 55\n ?\n PORT_ID: 55\n :\n PC_PHYS_PORT_ID: 57\n ?\n PORT_ID: 56\n :\n PC_PHYS_PORT_ID: 59\n ?\n PORT_ID: 57\n :\n PC_PHYS_PORT_ID: 61\n ?\n PORT_ID: 58\n :\n PC_PHYS_PORT_ID: 63\n ?\n PORT_ID: 68\n :\n PC_PHYS_PORT_ID: 65\n ?\n PORT_ID: 69\n :\n PC_PHYS_PORT_ID: 67\n ?\n PORT_ID: 70\n :\n PC_PHYS_PORT_ID: 69\n ?\n PORT_ID: 71\n :\n PC_PHYS_PORT_ID: 71\n ?\n PORT_ID: 72\n :\n PC_PHYS_PORT_ID: 73\n ?\n PORT_ID: 73\n :\n PC_PHYS_PORT_ID: 75\n ?\n PORT_ID: 74\n :\n PC_PHYS_PORT_ID: 77\n ?\n PORT_ID: 75\n :\n PC_PHYS_PORT_ID: 79\n ?\n PORT_ID: 85\n :\n PC_PHYS_PORT_ID: 81\n ?\n PORT_ID: 86\n :\n PC_PHYS_PORT_ID: 83\n ?\n PORT_ID: 87\n :\n PC_PHYS_PORT_ID: 85\n ?\n PORT_ID: 88\n :\n PC_PHYS_PORT_ID: 87\n ?\n PORT_ID: 89\n :\n PC_PHYS_PORT_ID: 89\n ?\n PORT_ID: 90\n :\n PC_PHYS_PORT_ID: 91\n ?\n PORT_ID: 91\n :\n PC_PHYS_PORT_ID: 93\n ?\n PORT_ID: 92\n :\n PC_PHYS_PORT_ID: 95\n ?\n PORT_ID: 102\n :\n PC_PHYS_PORT_ID: 97\n ?\n PORT_ID: 103\n :\n PC_PHYS_PORT_ID: 99\n ?\n PORT_ID: 104\n :\n PC_PHYS_PORT_ID: 101\n ?\n PORT_ID: 105\n :\n PC_PHYS_PORT_ID: 103\n ?\n PORT_ID: 106\n :\n PC_PHYS_PORT_ID: 105\n ?\n PORT_ID: 107\n :\n PC_PHYS_PORT_ID: 107\n ?\n PORT_ID: 108\n :\n PC_PHYS_PORT_ID: 109\n ?\n PORT_ID: 109\n :\n PC_PHYS_PORT_ID: 111\n ?\n PORT_ID: 119\n :\n PC_PHYS_PORT_ID: 113\n ?\n PORT_ID: 120\n :\n PC_PHYS_PORT_ID: 115\n ?\n PORT_ID: 121\n :\n PC_PHYS_PORT_ID: 117\n ?\n PORT_ID: 122\n :\n PC_PHYS_PORT_ID: 119\n ?\n PORT_ID: 123\n :\n PC_PHYS_PORT_ID: 121\n ?\n PORT_ID: 124\n :\n PC_PHYS_PORT_ID: 123\n ?\n PORT_ID: 125\n :\n PC_PHYS_PORT_ID: 125\n ?\n PORT_ID: 126\n :\n PC_PHYS_PORT_ID: 127\n ?\n PORT_ID: 136\n :\n PC_PHYS_PORT_ID: 129\n ?\n PORT_ID: 137\n :\n PC_PHYS_PORT_ID: 131\n ?\n PORT_ID: 138\n :\n PC_PHYS_PORT_ID: 133\n ?\n PORT_ID: 139\n :\n PC_PHYS_PORT_ID: 135\n ?\n PORT_ID: 140\n :\n PC_PHYS_PORT_ID: 137\n ?\n PORT_ID: 141\n :\n PC_PHYS_PORT_ID: 139\n ?\n PORT_ID: 142\n :\n PC_PHYS_PORT_ID: 141\n ?\n PORT_ID: 143\n :\n PC_PHYS_PORT_ID: 143\n ?\n PORT_ID: 153\n :\n PC_PHYS_PORT_ID: 145\n ?\n PORT_ID: 154\n :\n PC_PHYS_PORT_ID: 147\n ?\n PORT_ID: 155\n :\n PC_PHYS_PORT_ID: 149\n ?\n PORT_ID: 156\n :\n PC_PHYS_PORT_ID: 151\n ?\n PORT_ID: 157\n :\n PC_PHYS_PORT_ID: 153\n ?\n PORT_ID: 158\n :\n PC_PHYS_PORT_ID: 155\n ?\n PORT_ID: 159\n :\n PC_PHYS_PORT_ID: 157\n ?\n PORT_ID: 160\n :\n PC_PHYS_PORT_ID: 159\n ?\n PORT_ID: 170\n :\n PC_PHYS_PORT_ID: 161\n ?\n PORT_ID: 171\n :\n PC_PHYS_PORT_ID: 163\n ?\n PORT_ID: 172\n :\n PC_PHYS_PORT_ID: 165\n ?\n PORT_ID: 173\n :\n PC_PHYS_PORT_ID: 167\n ?\n PORT_ID: 174\n :\n PC_PHYS_PORT_ID: 169\n ?\n PORT_ID: 175\n :\n PC_PHYS_PORT_ID: 171\n ?\n PORT_ID: 176\n :\n PC_PHYS_PORT_ID: 173\n ?\n PORT_ID: 177\n :\n PC_PHYS_PORT_ID: 175\n ?\n PORT_ID: 187\n :\n PC_PHYS_PORT_ID: 177\n ?\n PORT_ID: 188\n :\n PC_PHYS_PORT_ID: 179\n ?\n PORT_ID: 189\n :\n PC_PHYS_PORT_ID: 181\n ?\n PORT_ID: 190\n :\n PC_PHYS_PORT_ID: 183\n ?\n PORT_ID: 191\n :\n PC_PHYS_PORT_ID: 185\n ?\n PORT_ID: 192\n :\n PC_PHYS_PORT_ID: 187\n ?\n PORT_ID: 193\n :\n PC_PHYS_PORT_ID: 189\n ?\n PORT_ID: 194\n :\n PC_PHYS_PORT_ID: 191\n ?\n PORT_ID: 204\n :\n PC_PHYS_PORT_ID: 193\n ?\n PORT_ID: 205\n :\n PC_PHYS_PORT_ID: 195\n ?\n PORT_ID: 206\n :\n PC_PHYS_PORT_ID: 197\n ?\n PORT_ID: 207\n :\n PC_PHYS_PORT_ID: 199\n ?\n PORT_ID: 208\n :\n PC_PHYS_PORT_ID: 201\n ?\n PORT_ID: 209\n :\n PC_PHYS_PORT_ID: 203\n ?\n PORT_ID: 210\n :\n PC_PHYS_PORT_ID: 205\n ?\n PORT_ID: 211\n :\n PC_PHYS_PORT_ID: 207\n ?\n PORT_ID: 221\n :\n PC_PHYS_PORT_ID: 209\n ?\n PORT_ID: 222\n :\n PC_PHYS_PORT_ID: 211\n ?\n PORT_ID: 223\n :\n PC_PHYS_PORT_ID: 213\n ?\n PORT_ID: 224\n :\n PC_PHYS_PORT_ID: 215\n ?\n PORT_ID: 225\n :\n PC_PHYS_PORT_ID: 217\n ?\n PORT_ID: 226\n :\n PC_PHYS_PORT_ID: 219\n ?\n PORT_ID: 227\n :\n PC_PHYS_PORT_ID: 221\n ?\n PORT_ID: 228\n :\n PC_PHYS_PORT_ID: 223\n ?\n PORT_ID: 238\n :\n PC_PHYS_PORT_ID: 225\n ?\n PORT_ID: 239\n :\n PC_PHYS_PORT_ID: 227\n ?\n PORT_ID: 240\n :\n PC_PHYS_PORT_ID: 229\n ?\n PORT_ID: 241\n :\n PC_PHYS_PORT_ID: 231\n ?\n PORT_ID: 242\n :\n PC_PHYS_PORT_ID: 233\n ?\n PORT_ID: 243\n :\n PC_PHYS_PORT_ID: 235\n ?\n PORT_ID: 244\n :\n PC_PHYS_PORT_ID: 237\n ?\n PORT_ID: 245\n :\n PC_PHYS_PORT_ID: 239\n ?\n PORT_ID: 255\n :\n PC_PHYS_PORT_ID: 241\n ?\n PORT_ID: 256\n :\n PC_PHYS_PORT_ID: 243\n ?\n PORT_ID: 257\n :\n PC_PHYS_PORT_ID: 245\n ?\n PORT_ID: 258\n :\n PC_PHYS_PORT_ID: 247\n ?\n PORT_ID: 259\n :\n PC_PHYS_PORT_ID: 249\n ?\n PORT_ID: 260\n :\n PC_PHYS_PORT_ID: 251\n ?\n PORT_ID: 261\n :\n PC_PHYS_PORT_ID: 253\n ?\n PORT_ID: 262\n :\n PC_PHYS_PORT_ID: 255\n...\n---\ndevice:\n 0:\n PC_PORT:\n ?\n PORT_ID: 0\n :\n ENABLE: 1\n SPEED: 10000\n NUM_LANES: 1\n ?\n PORT_ID: [[1, 8], [17, 24], [34, 41], [51, 58], [68, 75], [85, 92], [102,\n 109], [119, 126], [136, 143], [153, 160], [170, 177], [187, 194], [204, 211],\n [221, 228], [238, 245], [255, 262]]\n :\n ENABLE: 0\n SPEED: 200000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS544_2XN\n MAX_FRAME_SIZE: 9416\n...\n---\ndevice:\n 0:\n PORT_CONFIG:\n PORT_SYSTEM_PROFILE_OPERMODE_PIPEUNIQUE: 1\n...\n---\nbcm_device:\n 0:\n global:\n l3_alpm_template: 1\n l3_alpm_hit_mode: 1\n ipv6_lpm_128b_enable: 1\n pktio_driver_type: 1\n qos_map_multi_get_mode: 1\n rx_cosq_mapping_management_mode: 0\n l3_iif_reservation_skip: 0\n pcie_host_intf_timeout_purge_enable: 0\n macro_flow_hash_shuffle_random_seed: 34345645\n bcm_linkscan_interval: 25000\n sai_common_hash_crc: 0x1\n sai_disable_srcmacqedstmac_ctrl: 0x1\n sai_acl_qset_optimization: 0x1\n sai_optimized_mmu: 0x1\n sai_pkt_rx_custom_cfg: 1\n sai_pkt_rx_pkt_size: 16512\n sai_pkt_rx_cfg_ppc: 16\n sai_async_fdb_nbr_enable: 0x1\n sai_pfc_defaults_disable: 0x1\n sai_ifp_enable_on_cpu_tx: 0x1\n sai_vfp_smac_drop_filter_disable: 1\n sai_macro_flow_based_hash: 1\n sai_mmu_qgroups_default: 1\n sai_dis_ctr_incr_on_port_ln_dn: 0\n custom_feature_mesh_topology_sync_mode: 1\n sai_ecmp_group_members_increment: 1\n sai_field_group_auto_prioritize: 1\n bcm_tunnel_term_compatible_mode: 1\n sai_l2_cpu_fdb_event_suppress: 1\n sai_port_phy_time_sync_en: 1\n sai_stats_support_mask: 0x2\n sai_disable_internal_port_serdes: 1\n sai_uncached_port_stats: 0x1\n...\n---\nbcm_device:\n 0:\n port:\n 1:\n dport_map_port: 35\n 2:\n dport_map_port: 36\n 3:\n dport_map_port: 1\n 4:\n dport_map_port: 2\n 5:\n dport_map_port: 57\n 6:\n dport_map_port: 58\n 7:\n dport_map_port: 27\n 8:\n dport_map_port: 28\n 17:\n dport_map_port: 33\n 18:\n dport_map_port: 34\n 19:\n dport_map_port: 3\n 20:\n dport_map_port: 4\n 21:\n dport_map_port: 59\n 22:\n dport_map_port: 60\n 23:\n dport_map_port: 25\n 24:\n dport_map_port: 26\n 34:\n dport_map_port: 39\n 35:\n dport_map_port: 40\n 36:\n dport_map_port: 5\n 37:\n dport_map_port: 6\n 38:\n dport_map_port: 61\n 39:\n dport_map_port: 62\n 40:\n dport_map_port: 31\n 41:\n dport_map_port: 32\n 51:\n dport_map_port: 37\n 52:\n dport_map_port: 38\n 53:\n dport_map_port: 7\n 54:\n dport_map_port: 8\n 55:\n dport_map_port: 63\n 56:\n dport_map_port: 64\n 57:\n dport_map_port: 29\n 58:\n dport_map_port: 30\n 68:\n dport_map_port: 9\n 69:\n dport_map_port: 10\n 70:\n dport_map_port: 19\n 71:\n dport_map_port: 20\n 72:\n dport_map_port: 49\n 73:\n dport_map_port: 50\n 74:\n dport_map_port: 43\n 75:\n dport_map_port: 44\n 85:\n dport_map_port: 17\n 86:\n dport_map_port: 18\n 87:\n dport_map_port: 11\n 88:\n dport_map_port: 12\n 89:\n dport_map_port: 41\n 90:\n dport_map_port: 42\n 91:\n dport_map_port: 51\n 92:\n dport_map_port: 52\n 102:\n dport_map_port: 23\n 103:\n dport_map_port: 24\n 104:\n dport_map_port: 47\n 105:\n dport_map_port: 48\n 106:\n dport_map_port: 53\n 107:\n dport_map_port: 54\n 108:\n dport_map_port: 13\n 109:\n dport_map_port: 14\n 119:\n dport_map_port: 21\n 120:\n dport_map_port: 22\n 121:\n dport_map_port: 45\n 122:\n dport_map_port: 46\n 123:\n dport_map_port: 55\n 124:\n dport_map_port: 56\n 125:\n dport_map_port: 15\n 126:\n dport_map_port: 16\n 136:\n dport_map_port: 71\n 137:\n dport_map_port: 72\n 138:\n dport_map_port: 127\n 139:\n dport_map_port: 128\n 140:\n dport_map_port: 93\n 141:\n dport_map_port: 94\n 142:\n dport_map_port: 101\n 143:\n dport_map_port: 102\n 153:\n dport_map_port: 125\n 154:\n dport_map_port: 126\n 155:\n dport_map_port: 69\n 156:\n dport_map_port: 70\n 157:\n dport_map_port: 95\n 158:\n dport_map_port: 96\n 159:\n dport_map_port: 103\n 160:\n dport_map_port: 104\n 170:\n dport_map_port: 67\n 171:\n dport_map_port: 68\n 172:\n dport_map_port: 89\n 173:\n dport_map_port: 90\n 174:\n dport_map_port: 123\n 175:\n dport_map_port: 124\n 176:\n dport_map_port: 97\n 177:\n dport_map_port: 98\n 187:\n dport_map_port: 91\n 188:\n dport_map_port: 92\n 189:\n dport_map_port: 65\n 190:\n dport_map_port: 66\n 191:\n dport_map_port: 99\n 192:\n dport_map_port: 100\n 193:\n dport_map_port: 121\n 194:\n dport_map_port: 122\n 204:\n dport_map_port: 109\n 205:\n dport_map_port: 110\n 206:\n dport_map_port: 79\n 207:\n dport_map_port: 80\n 208:\n dport_map_port: 119\n 209:\n dport_map_port: 120\n 210:\n dport_map_port: 85\n 211:\n dport_map_port: 86\n 221:\n dport_map_port: 111\n 222:\n dport_map_port: 112\n 223:\n dport_map_port: 77\n 224:\n dport_map_port: 78\n 225:\n dport_map_port: 117\n 226:\n dport_map_port: 118\n 227:\n dport_map_port: 87\n 228:\n dport_map_port: 88\n 238:\n dport_map_port: 105\n 239:\n dport_map_port: 106\n 240:\n dport_map_port: 75\n 241:\n dport_map_port: 76\n 242:\n dport_map_port: 115\n 243:\n dport_map_port: 116\n 244:\n dport_map_port: 81\n 245:\n dport_map_port: 82\n 255:\n dport_map_port: 107\n 256:\n dport_map_port: 108\n 257:\n dport_map_port: 73\n 258:\n dport_map_port: 74\n 259:\n dport_map_port: 113\n 260:\n dport_map_port: 114\n 261:\n dport_map_port: 83\n 262:\n dport_map_port: 84\n...\n---\ndevice:\n 0:\n TM_THD_CONFIG:\n THRESHOLD_MODE: LOSSY\n...\n---\ndevice:\n 0:\n PORT:\n ?\n PORT_ID: [[1, 8], [17, 24], [34, 41], [51, 58], [68, 75], [85, 92], [102,\n 109], [119, 126], [136, 143], [153, 160], [170, 177], [187, 194], [204, 211],\n [221, 228], [238, 245], [255, 262]]\n :\n MTU: 9416\n MTU_CHECK: 1\n...\n---\ndevice:\n 0:\n FP_CONFIG:\n FP_ING_OPERMODE: GLOBAL_PIPE_AWARE\n...\n" + "yamlConfig": "---\ndevice:\n 0:\n PC_PM_CORE:\n ?\n PC_PM_ID: 2\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45013276\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x67231054\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 6\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47123065\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 10\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27143065\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 14\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57213064\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 17\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x36740521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64130257\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xFC\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xEC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 22\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47301256\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74530261\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xCE\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xEC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 28\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x36241750\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x03426715\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x03\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3E\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 32\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12653740\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45132067\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x20\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC2\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 21\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x74\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 18\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 29\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x23764501\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76123054\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x90\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 25\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 8\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32017645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 4\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x41023576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45012367\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x7F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x4C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 16\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x31027645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 12\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32017645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 5\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47123056\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02674153\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xB4\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 1\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01457632\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x65041273\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xB4\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 13\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57123064\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 9\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47123065\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x51674320\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x71\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 23\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54671023\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54763210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC1\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 20\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54671023\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54763210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC1\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 30\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x71305246\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x03216475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDE\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x9F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 26\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54671023\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54763210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC1\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 19\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 24\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 27\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x47250361\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 31\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x71046523\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23064571\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAB\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 3\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x02136475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x31205746\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x00\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x2C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 7\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45762301\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45672310\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x38\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 11\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x34017625\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 15\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x31027654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 46\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 41\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 38\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 33\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12653740\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64321075\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x20\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 62\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x46572031\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75641302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x01\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3E\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 58\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10235467\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32015476\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x38\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x1C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 54\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67524310\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 50\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67451320\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 60\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x41763502\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x14720563\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x30\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x77\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 64\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45013276\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10546723\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 52\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x51763402\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x67512043\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x30\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x2B\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 56\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x41763502\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x67512043\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x30\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x2B\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 42\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01324576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23014567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD3\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 45\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01324576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23014567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD3\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 35\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75641302\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x47652031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x21\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x9F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 39\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01324576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23014567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD3\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 44\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 47\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 36\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67103245\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01765423\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x47\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x99\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 40\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 57\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67542310\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 61\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x53670421\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32765410\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x84\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x33\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 49\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67541320\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 53\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67542310\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 63\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01457632\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23675410\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xEA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 59\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12475630\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57210364\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x25\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 55\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x14276530\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57210364\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x25\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 51\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21576430\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57210364\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x25\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 48\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x73462105\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x13647502\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x4C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 43\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30475612\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x53746102\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC4\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xF0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 37\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21657403\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x24351706\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDC\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 34\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x71046523\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x27064531\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x56\n TX_POLARITY_FLIP_AUTO: 0\n...\n---\ndevice:\n 0:\n PC_PORT_PHYS_MAP:\n ?\n PORT_ID: 0\n :\n PC_PHYS_PORT_ID: 0\n ?\n PORT_ID: 1\n :\n PC_PHYS_PORT_ID: 1\n ?\n PORT_ID: 2\n :\n PC_PHYS_PORT_ID: 3\n ?\n PORT_ID: 3\n :\n PC_PHYS_PORT_ID: 5\n ?\n PORT_ID: 4\n :\n PC_PHYS_PORT_ID: 7\n ?\n PORT_ID: 5\n :\n PC_PHYS_PORT_ID: 9\n ?\n PORT_ID: 6\n :\n PC_PHYS_PORT_ID: 11\n ?\n PORT_ID: 7\n :\n PC_PHYS_PORT_ID: 13\n ?\n PORT_ID: 8\n :\n PC_PHYS_PORT_ID: 15\n ?\n PORT_ID: 17\n :\n PC_PHYS_PORT_ID: 17\n ?\n PORT_ID: 18\n :\n PC_PHYS_PORT_ID: 19\n ?\n PORT_ID: 19\n :\n PC_PHYS_PORT_ID: 21\n ?\n PORT_ID: 20\n :\n PC_PHYS_PORT_ID: 23\n ?\n PORT_ID: 21\n :\n PC_PHYS_PORT_ID: 25\n ?\n PORT_ID: 22\n :\n PC_PHYS_PORT_ID: 27\n ?\n PORT_ID: 23\n :\n PC_PHYS_PORT_ID: 29\n ?\n PORT_ID: 24\n :\n PC_PHYS_PORT_ID: 31\n ?\n PORT_ID: 34\n :\n PC_PHYS_PORT_ID: 33\n ?\n PORT_ID: 35\n :\n PC_PHYS_PORT_ID: 35\n ?\n PORT_ID: 36\n :\n PC_PHYS_PORT_ID: 37\n ?\n PORT_ID: 37\n :\n PC_PHYS_PORT_ID: 39\n ?\n PORT_ID: 38\n :\n PC_PHYS_PORT_ID: 41\n ?\n PORT_ID: 39\n :\n PC_PHYS_PORT_ID: 43\n ?\n PORT_ID: 40\n :\n PC_PHYS_PORT_ID: 45\n ?\n PORT_ID: 41\n :\n PC_PHYS_PORT_ID: 47\n ?\n PORT_ID: 51\n :\n PC_PHYS_PORT_ID: 49\n ?\n PORT_ID: 52\n :\n PC_PHYS_PORT_ID: 51\n ?\n PORT_ID: 53\n :\n PC_PHYS_PORT_ID: 53\n ?\n PORT_ID: 54\n :\n PC_PHYS_PORT_ID: 55\n ?\n PORT_ID: 55\n :\n PC_PHYS_PORT_ID: 57\n ?\n PORT_ID: 56\n :\n PC_PHYS_PORT_ID: 59\n ?\n PORT_ID: 57\n :\n PC_PHYS_PORT_ID: 61\n ?\n PORT_ID: 58\n :\n PC_PHYS_PORT_ID: 63\n ?\n PORT_ID: 68\n :\n PC_PHYS_PORT_ID: 65\n ?\n PORT_ID: 69\n :\n PC_PHYS_PORT_ID: 67\n ?\n PORT_ID: 70\n :\n PC_PHYS_PORT_ID: 69\n ?\n PORT_ID: 71\n :\n PC_PHYS_PORT_ID: 71\n ?\n PORT_ID: 72\n :\n PC_PHYS_PORT_ID: 73\n ?\n PORT_ID: 73\n :\n PC_PHYS_PORT_ID: 75\n ?\n PORT_ID: 74\n :\n PC_PHYS_PORT_ID: 77\n ?\n PORT_ID: 75\n :\n PC_PHYS_PORT_ID: 79\n ?\n PORT_ID: 85\n :\n PC_PHYS_PORT_ID: 81\n ?\n PORT_ID: 86\n :\n PC_PHYS_PORT_ID: 83\n ?\n PORT_ID: 87\n :\n PC_PHYS_PORT_ID: 85\n ?\n PORT_ID: 88\n :\n PC_PHYS_PORT_ID: 87\n ?\n PORT_ID: 89\n :\n PC_PHYS_PORT_ID: 89\n ?\n PORT_ID: 90\n :\n PC_PHYS_PORT_ID: 91\n ?\n PORT_ID: 91\n :\n PC_PHYS_PORT_ID: 93\n ?\n PORT_ID: 92\n :\n PC_PHYS_PORT_ID: 95\n ?\n PORT_ID: 102\n :\n PC_PHYS_PORT_ID: 97\n ?\n PORT_ID: 103\n :\n PC_PHYS_PORT_ID: 99\n ?\n PORT_ID: 104\n :\n PC_PHYS_PORT_ID: 101\n ?\n PORT_ID: 105\n :\n PC_PHYS_PORT_ID: 103\n ?\n PORT_ID: 106\n :\n PC_PHYS_PORT_ID: 105\n ?\n PORT_ID: 107\n :\n PC_PHYS_PORT_ID: 107\n ?\n PORT_ID: 108\n :\n PC_PHYS_PORT_ID: 109\n ?\n PORT_ID: 109\n :\n PC_PHYS_PORT_ID: 111\n ?\n PORT_ID: 119\n :\n PC_PHYS_PORT_ID: 113\n ?\n PORT_ID: 120\n :\n PC_PHYS_PORT_ID: 115\n ?\n PORT_ID: 121\n :\n PC_PHYS_PORT_ID: 117\n ?\n PORT_ID: 122\n :\n PC_PHYS_PORT_ID: 119\n ?\n PORT_ID: 123\n :\n PC_PHYS_PORT_ID: 121\n ?\n PORT_ID: 124\n :\n PC_PHYS_PORT_ID: 123\n ?\n PORT_ID: 125\n :\n PC_PHYS_PORT_ID: 125\n ?\n PORT_ID: 126\n :\n PC_PHYS_PORT_ID: 127\n ?\n PORT_ID: 136\n :\n PC_PHYS_PORT_ID: 129\n ?\n PORT_ID: 137\n :\n PC_PHYS_PORT_ID: 131\n ?\n PORT_ID: 138\n :\n PC_PHYS_PORT_ID: 133\n ?\n PORT_ID: 139\n :\n PC_PHYS_PORT_ID: 135\n ?\n PORT_ID: 140\n :\n PC_PHYS_PORT_ID: 137\n ?\n PORT_ID: 141\n :\n PC_PHYS_PORT_ID: 139\n ?\n PORT_ID: 142\n :\n PC_PHYS_PORT_ID: 141\n ?\n PORT_ID: 143\n :\n PC_PHYS_PORT_ID: 143\n ?\n PORT_ID: 153\n :\n PC_PHYS_PORT_ID: 145\n ?\n PORT_ID: 154\n :\n PC_PHYS_PORT_ID: 147\n ?\n PORT_ID: 155\n :\n PC_PHYS_PORT_ID: 149\n ?\n PORT_ID: 156\n :\n PC_PHYS_PORT_ID: 151\n ?\n PORT_ID: 157\n :\n PC_PHYS_PORT_ID: 153\n ?\n PORT_ID: 158\n :\n PC_PHYS_PORT_ID: 155\n ?\n PORT_ID: 159\n :\n PC_PHYS_PORT_ID: 157\n ?\n PORT_ID: 160\n :\n PC_PHYS_PORT_ID: 159\n ?\n PORT_ID: 170\n :\n PC_PHYS_PORT_ID: 161\n ?\n PORT_ID: 171\n :\n PC_PHYS_PORT_ID: 163\n ?\n PORT_ID: 172\n :\n PC_PHYS_PORT_ID: 165\n ?\n PORT_ID: 173\n :\n PC_PHYS_PORT_ID: 167\n ?\n PORT_ID: 174\n :\n PC_PHYS_PORT_ID: 169\n ?\n PORT_ID: 175\n :\n PC_PHYS_PORT_ID: 171\n ?\n PORT_ID: 176\n :\n PC_PHYS_PORT_ID: 173\n ?\n PORT_ID: 177\n :\n PC_PHYS_PORT_ID: 175\n ?\n PORT_ID: 187\n :\n PC_PHYS_PORT_ID: 177\n ?\n PORT_ID: 188\n :\n PC_PHYS_PORT_ID: 179\n ?\n PORT_ID: 189\n :\n PC_PHYS_PORT_ID: 181\n ?\n PORT_ID: 190\n :\n PC_PHYS_PORT_ID: 183\n ?\n PORT_ID: 191\n :\n PC_PHYS_PORT_ID: 185\n ?\n PORT_ID: 192\n :\n PC_PHYS_PORT_ID: 187\n ?\n PORT_ID: 193\n :\n PC_PHYS_PORT_ID: 189\n ?\n PORT_ID: 194\n :\n PC_PHYS_PORT_ID: 191\n ?\n PORT_ID: 204\n :\n PC_PHYS_PORT_ID: 193\n ?\n PORT_ID: 205\n :\n PC_PHYS_PORT_ID: 195\n ?\n PORT_ID: 206\n :\n PC_PHYS_PORT_ID: 197\n ?\n PORT_ID: 207\n :\n PC_PHYS_PORT_ID: 199\n ?\n PORT_ID: 208\n :\n PC_PHYS_PORT_ID: 201\n ?\n PORT_ID: 209\n :\n PC_PHYS_PORT_ID: 203\n ?\n PORT_ID: 210\n :\n PC_PHYS_PORT_ID: 205\n ?\n PORT_ID: 211\n :\n PC_PHYS_PORT_ID: 207\n ?\n PORT_ID: 221\n :\n PC_PHYS_PORT_ID: 209\n ?\n PORT_ID: 222\n :\n PC_PHYS_PORT_ID: 211\n ?\n PORT_ID: 223\n :\n PC_PHYS_PORT_ID: 213\n ?\n PORT_ID: 224\n :\n PC_PHYS_PORT_ID: 215\n ?\n PORT_ID: 225\n :\n PC_PHYS_PORT_ID: 217\n ?\n PORT_ID: 226\n :\n PC_PHYS_PORT_ID: 219\n ?\n PORT_ID: 227\n :\n PC_PHYS_PORT_ID: 221\n ?\n PORT_ID: 228\n :\n PC_PHYS_PORT_ID: 223\n ?\n PORT_ID: 238\n :\n PC_PHYS_PORT_ID: 225\n ?\n PORT_ID: 239\n :\n PC_PHYS_PORT_ID: 227\n ?\n PORT_ID: 240\n :\n PC_PHYS_PORT_ID: 229\n ?\n PORT_ID: 241\n :\n PC_PHYS_PORT_ID: 231\n ?\n PORT_ID: 242\n :\n PC_PHYS_PORT_ID: 233\n ?\n PORT_ID: 243\n :\n PC_PHYS_PORT_ID: 235\n ?\n PORT_ID: 244\n :\n PC_PHYS_PORT_ID: 237\n ?\n PORT_ID: 245\n :\n PC_PHYS_PORT_ID: 239\n ?\n PORT_ID: 255\n :\n PC_PHYS_PORT_ID: 241\n ?\n PORT_ID: 256\n :\n PC_PHYS_PORT_ID: 243\n ?\n PORT_ID: 257\n :\n PC_PHYS_PORT_ID: 245\n ?\n PORT_ID: 258\n :\n PC_PHYS_PORT_ID: 247\n ?\n PORT_ID: 259\n :\n PC_PHYS_PORT_ID: 249\n ?\n PORT_ID: 260\n :\n PC_PHYS_PORT_ID: 251\n ?\n PORT_ID: 261\n :\n PC_PHYS_PORT_ID: 253\n ?\n PORT_ID: 262\n :\n PC_PHYS_PORT_ID: 255\n...\n---\ndevice:\n 0:\n PC_PORT:\n ?\n PORT_ID: 0\n :\n ENABLE: 1\n SPEED: 10000\n NUM_LANES: 1\n ?\n PORT_ID: [[1, 8], [17, 24], [34, 41], [51, 58], [68, 75], [85, 92], [102,\n 109], [119, 126], [136, 143], [153, 160], [170, 177], [187, 194], [204, 211],\n [221, 228], [238, 245], [255, 262]]\n :\n ENABLE: 0\n SPEED: 200000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS544_2XN\n MAX_FRAME_SIZE: 9416\n...\n---\ndevice:\n 0:\n PORT_CONFIG:\n PORT_SYSTEM_PROFILE_OPERMODE_PIPEUNIQUE: 1\n...\n---\nbcm_device:\n 0:\n global:\n l3_alpm_template: 1\n l3_alpm_hit_mode: 1\n ipv6_lpm_128b_enable: 1\n pktio_driver_type: 1\n qos_map_multi_get_mode: 1\n rx_cosq_mapping_management_mode: 0\n l3_iif_reservation_skip: 0\n pcie_host_intf_timeout_purge_enable: 0\n macro_flow_hash_shuffle_random_seed: 34345645\n bcm_linkscan_interval: 25000\n sai_common_hash_crc: 0x1\n sai_disable_srcmacqedstmac_ctrl: 0x1\n sai_acl_qset_optimization: 0x1\n sai_optimized_mmu: 0x1\n sai_pkt_rx_custom_cfg: 1\n sai_pkt_rx_pkt_size: 16512\n sai_pkt_rx_cfg_ppc: 16\n sai_async_fdb_nbr_enable: 0x1\n sai_pfc_defaults_disable: 0x1\n sai_ifp_enable_on_cpu_tx: 0x1\n sai_vfp_smac_drop_filter_disable: 1\n sai_macro_flow_based_hash: 1\n sai_mmu_qgroups_default: 1\n sai_dis_ctr_incr_on_port_ln_dn: 0\n custom_feature_mesh_topology_sync_mode: 1\n sai_ecmp_group_members_increment: 1\n sai_field_group_auto_prioritize: 1\n bcm_tunnel_term_compatible_mode: 1\n sai_l2_cpu_fdb_event_suppress: 1\n sai_port_phy_time_sync_en: 1\n sai_stats_support_mask: 0x2\n sai_disable_internal_port_serdes: 1\n l3_max_ecmp_mode: 1\n host_as_route_disable: 1\n sai_uncached_port_stats: 0x1\n...\n---\nbcm_device:\n 0:\n port:\n 1:\n dport_map_port: 35\n 2:\n dport_map_port: 36\n 3:\n dport_map_port: 1\n 4:\n dport_map_port: 2\n 5:\n dport_map_port: 57\n 6:\n dport_map_port: 58\n 7:\n dport_map_port: 27\n 8:\n dport_map_port: 28\n 17:\n dport_map_port: 33\n 18:\n dport_map_port: 34\n 19:\n dport_map_port: 3\n 20:\n dport_map_port: 4\n 21:\n dport_map_port: 59\n 22:\n dport_map_port: 60\n 23:\n dport_map_port: 25\n 24:\n dport_map_port: 26\n 34:\n dport_map_port: 39\n 35:\n dport_map_port: 40\n 36:\n dport_map_port: 5\n 37:\n dport_map_port: 6\n 38:\n dport_map_port: 61\n 39:\n dport_map_port: 62\n 40:\n dport_map_port: 31\n 41:\n dport_map_port: 32\n 51:\n dport_map_port: 37\n 52:\n dport_map_port: 38\n 53:\n dport_map_port: 7\n 54:\n dport_map_port: 8\n 55:\n dport_map_port: 63\n 56:\n dport_map_port: 64\n 57:\n dport_map_port: 29\n 58:\n dport_map_port: 30\n 68:\n dport_map_port: 9\n 69:\n dport_map_port: 10\n 70:\n dport_map_port: 19\n 71:\n dport_map_port: 20\n 72:\n dport_map_port: 49\n 73:\n dport_map_port: 50\n 74:\n dport_map_port: 43\n 75:\n dport_map_port: 44\n 85:\n dport_map_port: 17\n 86:\n dport_map_port: 18\n 87:\n dport_map_port: 11\n 88:\n dport_map_port: 12\n 89:\n dport_map_port: 41\n 90:\n dport_map_port: 42\n 91:\n dport_map_port: 51\n 92:\n dport_map_port: 52\n 102:\n dport_map_port: 23\n 103:\n dport_map_port: 24\n 104:\n dport_map_port: 47\n 105:\n dport_map_port: 48\n 106:\n dport_map_port: 53\n 107:\n dport_map_port: 54\n 108:\n dport_map_port: 13\n 109:\n dport_map_port: 14\n 119:\n dport_map_port: 21\n 120:\n dport_map_port: 22\n 121:\n dport_map_port: 45\n 122:\n dport_map_port: 46\n 123:\n dport_map_port: 55\n 124:\n dport_map_port: 56\n 125:\n dport_map_port: 15\n 126:\n dport_map_port: 16\n 136:\n dport_map_port: 71\n 137:\n dport_map_port: 72\n 138:\n dport_map_port: 127\n 139:\n dport_map_port: 128\n 140:\n dport_map_port: 93\n 141:\n dport_map_port: 94\n 142:\n dport_map_port: 101\n 143:\n dport_map_port: 102\n 153:\n dport_map_port: 125\n 154:\n dport_map_port: 126\n 155:\n dport_map_port: 69\n 156:\n dport_map_port: 70\n 157:\n dport_map_port: 95\n 158:\n dport_map_port: 96\n 159:\n dport_map_port: 103\n 160:\n dport_map_port: 104\n 170:\n dport_map_port: 67\n 171:\n dport_map_port: 68\n 172:\n dport_map_port: 89\n 173:\n dport_map_port: 90\n 174:\n dport_map_port: 123\n 175:\n dport_map_port: 124\n 176:\n dport_map_port: 97\n 177:\n dport_map_port: 98\n 187:\n dport_map_port: 91\n 188:\n dport_map_port: 92\n 189:\n dport_map_port: 65\n 190:\n dport_map_port: 66\n 191:\n dport_map_port: 99\n 192:\n dport_map_port: 100\n 193:\n dport_map_port: 121\n 194:\n dport_map_port: 122\n 204:\n dport_map_port: 109\n 205:\n dport_map_port: 110\n 206:\n dport_map_port: 79\n 207:\n dport_map_port: 80\n 208:\n dport_map_port: 119\n 209:\n dport_map_port: 120\n 210:\n dport_map_port: 85\n 211:\n dport_map_port: 86\n 221:\n dport_map_port: 111\n 222:\n dport_map_port: 112\n 223:\n dport_map_port: 77\n 224:\n dport_map_port: 78\n 225:\n dport_map_port: 117\n 226:\n dport_map_port: 118\n 227:\n dport_map_port: 87\n 228:\n dport_map_port: 88\n 238:\n dport_map_port: 105\n 239:\n dport_map_port: 106\n 240:\n dport_map_port: 75\n 241:\n dport_map_port: 76\n 242:\n dport_map_port: 115\n 243:\n dport_map_port: 116\n 244:\n dport_map_port: 81\n 245:\n dport_map_port: 82\n 255:\n dport_map_port: 107\n 256:\n dport_map_port: 108\n 257:\n dport_map_port: 73\n 258:\n dport_map_port: 74\n 259:\n dport_map_port: 113\n 260:\n dport_map_port: 114\n 261:\n dport_map_port: 83\n 262:\n dport_map_port: 84\n...\n---\ndevice:\n 0:\n TM_THD_CONFIG:\n THRESHOLD_MODE: LOSSY\n...\n---\ndevice:\n 0:\n PORT:\n ?\n PORT_ID: [[1, 8], [17, 24], [34, 41], [51, 58], [68, 75], [85, 92], [102,\n 109], [119, 126], [136, 143], [153, 160], [170, 177], [187, 194], [204, 211],\n [221, 228], [238, 245], [255, 262]]\n :\n MTU: 9416\n MTU_CHECK: 1\n...\n---\ndevice:\n 0:\n FP_CONFIG:\n FP_ING_OPERMODE: GLOBAL_PIPE_AWARE\n...\n" } } } diff --git a/fboss/oss/hw_test_configs/fuji.agent.materialized_JSON b/fboss/oss/hw_test_configs/fuji.agent.materialized_JSON index 1820b2c5819a7..807b72041ee14 100644 --- a/fboss/oss/hw_test_configs/fuji.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/fuji.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -137,7 +165,7 @@ "config": { }, - "yamlConfig": "---\ndevice:\n 0:\n PC_PM_CORE:\n ?\n PC_PM_ID: 2\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 5\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12475630\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20314657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 9\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 13\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57463021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 17\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305746\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 21\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64751302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 25\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 29\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32104567\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540123\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF8\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 22\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 18\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21307465\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20317654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA8\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 30\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF8\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 26\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74652130\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20315746\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 6\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47561203\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 1\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x07\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 14\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30217564\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 10\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27563041\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x46573021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 7\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 3\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x1F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 15\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 11\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27563041\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 23\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 19\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57461302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 32\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45673210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 27\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64751302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 20\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57461302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 24\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x03127465\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20315746\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 28\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650321\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57462031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 31\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540123\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 4\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x7F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 8\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 12\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 16\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30126574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 45\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 41\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 37\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12307465\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57462031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 34\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0E\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 61\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x76540123\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 57\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65743021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 53\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x46573210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA8\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 49\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563012\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 58\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75640312\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 62\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01234567\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45673210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 50\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75643012\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x65\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 54\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x14036572\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 42\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 46\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74560312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x9A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 33\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x76540123\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45673210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 38\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64751302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 43\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 47\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x13027546\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x59\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 35\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32104567\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x70\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 39\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 59\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 64\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 51\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 55\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27563041\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x46573021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x50\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 63\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 60\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75642031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 56\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 52\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 48\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x63751042\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57461302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 44\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x56470312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 40\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x24\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 36\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67540123\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540123\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n...\n---\ndevice:\n 0:\n PC_PORT_PHYS_MAP:\n ?\n PORT_ID: 0\n :\n PC_PHYS_PORT_ID: 0\n ?\n PORT_ID: 1\n :\n PC_PHYS_PORT_ID: 1\n ?\n PORT_ID: 2\n :\n PC_PHYS_PORT_ID: 3\n ?\n PORT_ID: 3\n :\n PC_PHYS_PORT_ID: 5\n ?\n PORT_ID: 4\n :\n PC_PHYS_PORT_ID: 7\n ?\n PORT_ID: 17\n :\n PC_PHYS_PORT_ID: 17\n ?\n PORT_ID: 18\n :\n PC_PHYS_PORT_ID: 19\n ?\n PORT_ID: 19\n :\n PC_PHYS_PORT_ID: 21\n ?\n PORT_ID: 20\n :\n PC_PHYS_PORT_ID: 23\n ?\n PORT_ID: 34\n :\n PC_PHYS_PORT_ID: 33\n ?\n PORT_ID: 35\n :\n PC_PHYS_PORT_ID: 35\n ?\n PORT_ID: 36\n :\n PC_PHYS_PORT_ID: 37\n ?\n PORT_ID: 37\n :\n PC_PHYS_PORT_ID: 39\n ?\n PORT_ID: 51\n :\n PC_PHYS_PORT_ID: 49\n ?\n PORT_ID: 52\n :\n PC_PHYS_PORT_ID: 51\n ?\n PORT_ID: 53\n :\n PC_PHYS_PORT_ID: 53\n ?\n PORT_ID: 54\n :\n PC_PHYS_PORT_ID: 55\n ?\n PORT_ID: 68\n :\n PC_PHYS_PORT_ID: 65\n ?\n PORT_ID: 69\n :\n PC_PHYS_PORT_ID: 67\n ?\n PORT_ID: 70\n :\n PC_PHYS_PORT_ID: 69\n ?\n PORT_ID: 71\n :\n PC_PHYS_PORT_ID: 71\n ?\n PORT_ID: 85\n :\n PC_PHYS_PORT_ID: 81\n ?\n PORT_ID: 86\n :\n PC_PHYS_PORT_ID: 83\n ?\n PORT_ID: 87\n :\n PC_PHYS_PORT_ID: 85\n ?\n PORT_ID: 88\n :\n PC_PHYS_PORT_ID: 87\n ?\n PORT_ID: 102\n :\n PC_PHYS_PORT_ID: 97\n ?\n PORT_ID: 103\n :\n PC_PHYS_PORT_ID: 99\n ?\n PORT_ID: 104\n :\n PC_PHYS_PORT_ID: 101\n ?\n PORT_ID: 105\n :\n PC_PHYS_PORT_ID: 103\n ?\n PORT_ID: 119\n :\n PC_PHYS_PORT_ID: 113\n ?\n PORT_ID: 120\n :\n PC_PHYS_PORT_ID: 115\n ?\n PORT_ID: 121\n :\n PC_PHYS_PORT_ID: 117\n ?\n PORT_ID: 122\n :\n PC_PHYS_PORT_ID: 119\n ?\n PORT_ID: 136\n :\n PC_PHYS_PORT_ID: 129\n ?\n PORT_ID: 137\n :\n PC_PHYS_PORT_ID: 131\n ?\n PORT_ID: 140\n :\n PC_PHYS_PORT_ID: 137\n ?\n PORT_ID: 141\n :\n PC_PHYS_PORT_ID: 139\n ?\n PORT_ID: 142\n :\n PC_PHYS_PORT_ID: 141\n ?\n PORT_ID: 143\n :\n PC_PHYS_PORT_ID: 143\n ?\n PORT_ID: 155\n :\n PC_PHYS_PORT_ID: 149\n ?\n PORT_ID: 156\n :\n PC_PHYS_PORT_ID: 151\n ?\n PORT_ID: 157\n :\n PC_PHYS_PORT_ID: 153\n ?\n PORT_ID: 158\n :\n PC_PHYS_PORT_ID: 155\n ?\n PORT_ID: 159\n :\n PC_PHYS_PORT_ID: 157\n ?\n PORT_ID: 160\n :\n PC_PHYS_PORT_ID: 159\n ?\n PORT_ID: 172\n :\n PC_PHYS_PORT_ID: 165\n ?\n PORT_ID: 173\n :\n PC_PHYS_PORT_ID: 167\n ?\n PORT_ID: 174\n :\n PC_PHYS_PORT_ID: 169\n ?\n PORT_ID: 175\n :\n PC_PHYS_PORT_ID: 171\n ?\n PORT_ID: 176\n :\n PC_PHYS_PORT_ID: 173\n ?\n PORT_ID: 177\n :\n PC_PHYS_PORT_ID: 175\n ?\n PORT_ID: 189\n :\n PC_PHYS_PORT_ID: 181\n ?\n PORT_ID: 190\n :\n PC_PHYS_PORT_ID: 183\n ?\n PORT_ID: 191\n :\n PC_PHYS_PORT_ID: 185\n ?\n PORT_ID: 192\n :\n PC_PHYS_PORT_ID: 187\n ?\n PORT_ID: 193\n :\n PC_PHYS_PORT_ID: 189\n ?\n PORT_ID: 194\n :\n PC_PHYS_PORT_ID: 191\n ?\n PORT_ID: 206\n :\n PC_PHYS_PORT_ID: 197\n ?\n PORT_ID: 207\n :\n PC_PHYS_PORT_ID: 199\n ?\n PORT_ID: 208\n :\n PC_PHYS_PORT_ID: 201\n ?\n PORT_ID: 209\n :\n PC_PHYS_PORT_ID: 203\n ?\n PORT_ID: 210\n :\n PC_PHYS_PORT_ID: 205\n ?\n PORT_ID: 211\n :\n PC_PHYS_PORT_ID: 207\n ?\n PORT_ID: 223\n :\n PC_PHYS_PORT_ID: 213\n ?\n PORT_ID: 224\n :\n PC_PHYS_PORT_ID: 215\n ?\n PORT_ID: 225\n :\n PC_PHYS_PORT_ID: 217\n ?\n PORT_ID: 226\n :\n PC_PHYS_PORT_ID: 219\n ?\n PORT_ID: 227\n :\n PC_PHYS_PORT_ID: 221\n ?\n PORT_ID: 228\n :\n PC_PHYS_PORT_ID: 223\n ?\n PORT_ID: 240\n :\n PC_PHYS_PORT_ID: 229\n ?\n PORT_ID: 241\n :\n PC_PHYS_PORT_ID: 231\n ?\n PORT_ID: 242\n :\n PC_PHYS_PORT_ID: 233\n ?\n PORT_ID: 243\n :\n PC_PHYS_PORT_ID: 235\n ?\n PORT_ID: 244\n :\n PC_PHYS_PORT_ID: 237\n ?\n PORT_ID: 245\n :\n PC_PHYS_PORT_ID: 239\n ?\n PORT_ID: 257\n :\n PC_PHYS_PORT_ID: 245\n ?\n PORT_ID: 258\n :\n PC_PHYS_PORT_ID: 247\n ?\n PORT_ID: 259\n :\n PC_PHYS_PORT_ID: 249\n ?\n PORT_ID: 260\n :\n PC_PHYS_PORT_ID: 251\n ?\n PORT_ID: 261\n :\n PC_PHYS_PORT_ID: 253\n ?\n PORT_ID: 262\n :\n PC_PHYS_PORT_ID: 255\n...\n---\ndevice:\n 0:\n PC_PORT:\n ?\n PORT_ID: 0\n :\n ENABLE: 1\n SPEED: 10000\n NUM_LANES: 1\n ?\n PORT_ID: [[1, 4], [17, 20], [34, 37], [51, 54], [68, 71], [85, 88], [102,\n 105], [119, 122], [136, 137], [140, 143], [155, 160], [172, 177], [189, 194],\n [206, 211], [223, 228], [240, 245], [257, 262]]\n :\n ENABLE: 0\n SPEED: 200000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS544_2XN\n MAX_FRAME_SIZE: 9416\n...\n---\ndevice:\n 0:\n PORT_CONFIG:\n PORT_SYSTEM_PROFILE_OPERMODE_PIPEUNIQUE: 1\n...\n---\nbcm_device:\n 0:\n global:\n l3_alpm_template: 1\n l3_alpm_hit_mode: 1\n ipv6_lpm_128b_enable: 1\n pktio_driver_type: 1\n qos_map_multi_get_mode: 1\n rx_cosq_mapping_management_mode: 0\n l3_iif_reservation_skip: 0\n pcie_host_intf_timeout_purge_enable: 0\n macro_flow_hash_shuffle_random_seed: 34345645\n bcm_linkscan_interval: 25000\n sai_common_hash_crc: 0x1\n sai_disable_srcmacqedstmac_ctrl: 0x1\n sai_acl_qset_optimization: 0x1\n sai_optimized_mmu: 0x1\n sai_pkt_rx_custom_cfg: 1\n sai_pkt_rx_pkt_size: 16512\n sai_pkt_rx_cfg_ppc: 16\n sai_async_fdb_nbr_enable: 0x1\n sai_pfc_defaults_disable: 0x1\n sai_ifp_enable_on_cpu_tx: 0x1\n sai_vfp_smac_drop_filter_disable: 1\n sai_macro_flow_based_hash: 1\n sai_mmu_qgroups_default: 1\n sai_dis_ctr_incr_on_port_ln_dn: 0\n custom_feature_mesh_topology_sync_mode: 1\n sai_ecmp_group_members_increment: 1\n sai_field_group_auto_prioritize: 1\n bcm_tunnel_term_compatible_mode: 1\n sai_l2_cpu_fdb_event_suppress: 1\n sai_port_phy_time_sync_en: 1\n sai_stats_support_mask: 0x2\n sai_disable_internal_port_serdes: 1\n sai_uncached_port_stats: 0x1\n...\n---\nbcm_device:\n 0:\n port:\n 1:\n dport_map_port: 27\n 2:\n dport_map_port: 28\n 3:\n dport_map_port: 1\n 4:\n dport_map_port: 2\n 17:\n dport_map_port: 3\n 18:\n dport_map_port: 4\n 19:\n dport_map_port: 25\n 20:\n dport_map_port: 26\n 34:\n dport_map_port: 5\n 35:\n dport_map_port: 6\n 36:\n dport_map_port: 31\n 37:\n dport_map_port: 32\n 51:\n dport_map_port: 7\n 52:\n dport_map_port: 8\n 53:\n dport_map_port: 29\n 54:\n dport_map_port: 30\n 68:\n dport_map_port: 9\n 69:\n dport_map_port: 10\n 70:\n dport_map_port: 19\n 71:\n dport_map_port: 20\n 85:\n dport_map_port: 11\n 86:\n dport_map_port: 12\n 87:\n dport_map_port: 17\n 88:\n dport_map_port: 18\n 102:\n dport_map_port: 13\n 103:\n dport_map_port: 14\n 104:\n dport_map_port: 23\n 105:\n dport_map_port: 24\n 119:\n dport_map_port: 15\n 120:\n dport_map_port: 16\n 121:\n dport_map_port: 21\n 122:\n dport_map_port: 22\n 136:\n dport_map_port: 45\n 137:\n dport_map_port: 46\n 140:\n dport_map_port: 53\n 141:\n dport_map_port: 54\n 142:\n dport_map_port: 79\n 143:\n dport_map_port: 80\n 155:\n dport_map_port: 47\n 156:\n dport_map_port: 48\n 157:\n dport_map_port: 55\n 158:\n dport_map_port: 56\n 159:\n dport_map_port: 77\n 160:\n dport_map_port: 78\n 172:\n dport_map_port: 41\n 173:\n dport_map_port: 42\n 174:\n dport_map_port: 49\n 175:\n dport_map_port: 50\n 176:\n dport_map_port: 75\n 177:\n dport_map_port: 76\n 189:\n dport_map_port: 43\n 190:\n dport_map_port: 44\n 191:\n dport_map_port: 51\n 192:\n dport_map_port: 52\n 193:\n dport_map_port: 73\n 194:\n dport_map_port: 74\n 206:\n dport_map_port: 37\n 207:\n dport_map_port: 38\n 208:\n dport_map_port: 61\n 209:\n dport_map_port: 62\n 210:\n dport_map_port: 71\n 211:\n dport_map_port: 72\n 223:\n dport_map_port: 39\n 224:\n dport_map_port: 40\n 225:\n dport_map_port: 63\n 226:\n dport_map_port: 64\n 227:\n dport_map_port: 69\n 228:\n dport_map_port: 70\n 240:\n dport_map_port: 33\n 241:\n dport_map_port: 34\n 242:\n dport_map_port: 57\n 243:\n dport_map_port: 58\n 244:\n dport_map_port: 67\n 245:\n dport_map_port: 68\n 257:\n dport_map_port: 35\n 258:\n dport_map_port: 36\n 259:\n dport_map_port: 65\n 260:\n dport_map_port: 66\n 261:\n dport_map_port: 59\n 262:\n dport_map_port: 60\n...\n---\ndevice:\n 0:\n TM_THD_CONFIG:\n THRESHOLD_MODE: LOSSY\n...\n---\ndevice:\n 0:\n PORT:\n ?\n PORT_ID: [[1, 4], [17, 20], [34, 37], [51, 54], [68, 71], [85, 88], [102,\n 105], [119, 122], [136, 137], [140, 143], [155, 160], [172, 177], [189, 194],\n [206, 211], [223, 228], [240, 245], [257, 262]]\n :\n MTU: 9416\n MTU_CHECK: 1\n...\n---\ndevice:\n 0:\n FP_CONFIG:\n FP_ING_OPERMODE: GLOBAL_PIPE_AWARE\n...\n" + "yamlConfig": "---\ndevice:\n 0:\n PC_PM_CORE:\n ?\n PC_PM_ID: 2\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 5\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12475630\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20314657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 9\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 13\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57463021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 17\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305746\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 21\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64751302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 25\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 29\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32104567\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540123\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF8\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 22\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 18\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21307465\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20317654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA8\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 30\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF8\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 26\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74652130\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20315746\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 6\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47561203\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 1\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x07\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 14\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30217564\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 10\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27563041\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x46573021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 7\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 3\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x1F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 15\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 11\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27563041\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 23\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 19\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57461302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 32\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45673210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 27\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64751302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 20\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57461302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 24\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x03127465\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20315746\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 28\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650321\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57462031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 31\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540123\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 4\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x7F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 8\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 12\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 16\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30126574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 45\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 41\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 37\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12307465\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57462031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 34\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0E\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 61\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x76540123\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 57\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65743021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 53\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x46573210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA8\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 49\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563012\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 58\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75640312\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 62\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01234567\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45673210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 50\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75643012\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x65\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 54\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x14036572\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 42\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 46\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74560312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x9A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 33\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x76540123\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45673210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 38\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64751302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 43\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 47\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x13027546\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x59\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 35\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32104567\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x70\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 39\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 59\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 64\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 51\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 55\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27563041\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x46573021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x50\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 63\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 60\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75642031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 56\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 52\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 48\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x63751042\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57461302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 44\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x56470312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 40\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x24\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 36\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67540123\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540123\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n...\n---\ndevice:\n 0:\n PC_PORT_PHYS_MAP:\n ?\n PORT_ID: 0\n :\n PC_PHYS_PORT_ID: 0\n ?\n PORT_ID: 1\n :\n PC_PHYS_PORT_ID: 1\n ?\n PORT_ID: 2\n :\n PC_PHYS_PORT_ID: 3\n ?\n PORT_ID: 3\n :\n PC_PHYS_PORT_ID: 5\n ?\n PORT_ID: 4\n :\n PC_PHYS_PORT_ID: 7\n ?\n PORT_ID: 17\n :\n PC_PHYS_PORT_ID: 17\n ?\n PORT_ID: 18\n :\n PC_PHYS_PORT_ID: 19\n ?\n PORT_ID: 19\n :\n PC_PHYS_PORT_ID: 21\n ?\n PORT_ID: 20\n :\n PC_PHYS_PORT_ID: 23\n ?\n PORT_ID: 34\n :\n PC_PHYS_PORT_ID: 33\n ?\n PORT_ID: 35\n :\n PC_PHYS_PORT_ID: 35\n ?\n PORT_ID: 36\n :\n PC_PHYS_PORT_ID: 37\n ?\n PORT_ID: 37\n :\n PC_PHYS_PORT_ID: 39\n ?\n PORT_ID: 51\n :\n PC_PHYS_PORT_ID: 49\n ?\n PORT_ID: 52\n :\n PC_PHYS_PORT_ID: 51\n ?\n PORT_ID: 53\n :\n PC_PHYS_PORT_ID: 53\n ?\n PORT_ID: 54\n :\n PC_PHYS_PORT_ID: 55\n ?\n PORT_ID: 68\n :\n PC_PHYS_PORT_ID: 65\n ?\n PORT_ID: 69\n :\n PC_PHYS_PORT_ID: 67\n ?\n PORT_ID: 70\n :\n PC_PHYS_PORT_ID: 69\n ?\n PORT_ID: 71\n :\n PC_PHYS_PORT_ID: 71\n ?\n PORT_ID: 85\n :\n PC_PHYS_PORT_ID: 81\n ?\n PORT_ID: 86\n :\n PC_PHYS_PORT_ID: 83\n ?\n PORT_ID: 87\n :\n PC_PHYS_PORT_ID: 85\n ?\n PORT_ID: 88\n :\n PC_PHYS_PORT_ID: 87\n ?\n PORT_ID: 102\n :\n PC_PHYS_PORT_ID: 97\n ?\n PORT_ID: 103\n :\n PC_PHYS_PORT_ID: 99\n ?\n PORT_ID: 104\n :\n PC_PHYS_PORT_ID: 101\n ?\n PORT_ID: 105\n :\n PC_PHYS_PORT_ID: 103\n ?\n PORT_ID: 119\n :\n PC_PHYS_PORT_ID: 113\n ?\n PORT_ID: 120\n :\n PC_PHYS_PORT_ID: 115\n ?\n PORT_ID: 121\n :\n PC_PHYS_PORT_ID: 117\n ?\n PORT_ID: 122\n :\n PC_PHYS_PORT_ID: 119\n ?\n PORT_ID: 136\n :\n PC_PHYS_PORT_ID: 129\n ?\n PORT_ID: 137\n :\n PC_PHYS_PORT_ID: 131\n ?\n PORT_ID: 140\n :\n PC_PHYS_PORT_ID: 137\n ?\n PORT_ID: 141\n :\n PC_PHYS_PORT_ID: 139\n ?\n PORT_ID: 142\n :\n PC_PHYS_PORT_ID: 141\n ?\n PORT_ID: 143\n :\n PC_PHYS_PORT_ID: 143\n ?\n PORT_ID: 155\n :\n PC_PHYS_PORT_ID: 149\n ?\n PORT_ID: 156\n :\n PC_PHYS_PORT_ID: 151\n ?\n PORT_ID: 157\n :\n PC_PHYS_PORT_ID: 153\n ?\n PORT_ID: 158\n :\n PC_PHYS_PORT_ID: 155\n ?\n PORT_ID: 159\n :\n PC_PHYS_PORT_ID: 157\n ?\n PORT_ID: 160\n :\n PC_PHYS_PORT_ID: 159\n ?\n PORT_ID: 172\n :\n PC_PHYS_PORT_ID: 165\n ?\n PORT_ID: 173\n :\n PC_PHYS_PORT_ID: 167\n ?\n PORT_ID: 174\n :\n PC_PHYS_PORT_ID: 169\n ?\n PORT_ID: 175\n :\n PC_PHYS_PORT_ID: 171\n ?\n PORT_ID: 176\n :\n PC_PHYS_PORT_ID: 173\n ?\n PORT_ID: 177\n :\n PC_PHYS_PORT_ID: 175\n ?\n PORT_ID: 189\n :\n PC_PHYS_PORT_ID: 181\n ?\n PORT_ID: 190\n :\n PC_PHYS_PORT_ID: 183\n ?\n PORT_ID: 191\n :\n PC_PHYS_PORT_ID: 185\n ?\n PORT_ID: 192\n :\n PC_PHYS_PORT_ID: 187\n ?\n PORT_ID: 193\n :\n PC_PHYS_PORT_ID: 189\n ?\n PORT_ID: 194\n :\n PC_PHYS_PORT_ID: 191\n ?\n PORT_ID: 206\n :\n PC_PHYS_PORT_ID: 197\n ?\n PORT_ID: 207\n :\n PC_PHYS_PORT_ID: 199\n ?\n PORT_ID: 208\n :\n PC_PHYS_PORT_ID: 201\n ?\n PORT_ID: 209\n :\n PC_PHYS_PORT_ID: 203\n ?\n PORT_ID: 210\n :\n PC_PHYS_PORT_ID: 205\n ?\n PORT_ID: 211\n :\n PC_PHYS_PORT_ID: 207\n ?\n PORT_ID: 223\n :\n PC_PHYS_PORT_ID: 213\n ?\n PORT_ID: 224\n :\n PC_PHYS_PORT_ID: 215\n ?\n PORT_ID: 225\n :\n PC_PHYS_PORT_ID: 217\n ?\n PORT_ID: 226\n :\n PC_PHYS_PORT_ID: 219\n ?\n PORT_ID: 227\n :\n PC_PHYS_PORT_ID: 221\n ?\n PORT_ID: 228\n :\n PC_PHYS_PORT_ID: 223\n ?\n PORT_ID: 240\n :\n PC_PHYS_PORT_ID: 229\n ?\n PORT_ID: 241\n :\n PC_PHYS_PORT_ID: 231\n ?\n PORT_ID: 242\n :\n PC_PHYS_PORT_ID: 233\n ?\n PORT_ID: 243\n :\n PC_PHYS_PORT_ID: 235\n ?\n PORT_ID: 244\n :\n PC_PHYS_PORT_ID: 237\n ?\n PORT_ID: 245\n :\n PC_PHYS_PORT_ID: 239\n ?\n PORT_ID: 257\n :\n PC_PHYS_PORT_ID: 245\n ?\n PORT_ID: 258\n :\n PC_PHYS_PORT_ID: 247\n ?\n PORT_ID: 259\n :\n PC_PHYS_PORT_ID: 249\n ?\n PORT_ID: 260\n :\n PC_PHYS_PORT_ID: 251\n ?\n PORT_ID: 261\n :\n PC_PHYS_PORT_ID: 253\n ?\n PORT_ID: 262\n :\n PC_PHYS_PORT_ID: 255\n...\n---\ndevice:\n 0:\n PC_PORT:\n ?\n PORT_ID: 0\n :\n ENABLE: 1\n SPEED: 10000\n NUM_LANES: 1\n ?\n PORT_ID: [[1, 4], [17, 20], [34, 37], [51, 54], [68, 71], [85, 88], [102,\n 105], [119, 122], [136, 137], [140, 143], [155, 160], [172, 177], [189, 194],\n [206, 211], [223, 228], [240, 245], [257, 262]]\n :\n ENABLE: 0\n SPEED: 200000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS544_2XN\n MAX_FRAME_SIZE: 9416\n...\n---\ndevice:\n 0:\n PORT_CONFIG:\n PORT_SYSTEM_PROFILE_OPERMODE_PIPEUNIQUE: 1\n...\n---\nbcm_device:\n 0:\n global:\n l3_alpm_template: 1\n l3_alpm_hit_mode: 1\n ipv6_lpm_128b_enable: 1\n pktio_driver_type: 1\n qos_map_multi_get_mode: 1\n rx_cosq_mapping_management_mode: 0\n l3_iif_reservation_skip: 0\n pcie_host_intf_timeout_purge_enable: 0\n macro_flow_hash_shuffle_random_seed: 34345645\n bcm_linkscan_interval: 25000\n sai_common_hash_crc: 0x1\n sai_disable_srcmacqedstmac_ctrl: 0x1\n sai_acl_qset_optimization: 0x1\n sai_optimized_mmu: 0x1\n sai_pkt_rx_custom_cfg: 1\n sai_pkt_rx_pkt_size: 16512\n sai_pkt_rx_cfg_ppc: 16\n sai_async_fdb_nbr_enable: 0x1\n sai_pfc_defaults_disable: 0x1\n sai_ifp_enable_on_cpu_tx: 0x1\n sai_vfp_smac_drop_filter_disable: 1\n sai_macro_flow_based_hash: 1\n sai_mmu_qgroups_default: 1\n sai_dis_ctr_incr_on_port_ln_dn: 0\n custom_feature_mesh_topology_sync_mode: 1\n sai_ecmp_group_members_increment: 1\n sai_field_group_auto_prioritize: 1\n bcm_tunnel_term_compatible_mode: 1\n sai_l2_cpu_fdb_event_suppress: 1\n sai_port_phy_time_sync_en: 1\n sai_stats_support_mask: 0x2\n sai_disable_internal_port_serdes: 1\n l3_max_ecmp_mode: 1\n host_as_route_disable: 1\n sai_uncached_port_stats: 0x1\n...\n---\nbcm_device:\n 0:\n port:\n 1:\n dport_map_port: 27\n 2:\n dport_map_port: 28\n 3:\n dport_map_port: 1\n 4:\n dport_map_port: 2\n 17:\n dport_map_port: 3\n 18:\n dport_map_port: 4\n 19:\n dport_map_port: 25\n 20:\n dport_map_port: 26\n 34:\n dport_map_port: 5\n 35:\n dport_map_port: 6\n 36:\n dport_map_port: 31\n 37:\n dport_map_port: 32\n 51:\n dport_map_port: 7\n 52:\n dport_map_port: 8\n 53:\n dport_map_port: 29\n 54:\n dport_map_port: 30\n 68:\n dport_map_port: 9\n 69:\n dport_map_port: 10\n 70:\n dport_map_port: 19\n 71:\n dport_map_port: 20\n 85:\n dport_map_port: 11\n 86:\n dport_map_port: 12\n 87:\n dport_map_port: 17\n 88:\n dport_map_port: 18\n 102:\n dport_map_port: 13\n 103:\n dport_map_port: 14\n 104:\n dport_map_port: 23\n 105:\n dport_map_port: 24\n 119:\n dport_map_port: 15\n 120:\n dport_map_port: 16\n 121:\n dport_map_port: 21\n 122:\n dport_map_port: 22\n 136:\n dport_map_port: 45\n 137:\n dport_map_port: 46\n 140:\n dport_map_port: 53\n 141:\n dport_map_port: 54\n 142:\n dport_map_port: 79\n 143:\n dport_map_port: 80\n 155:\n dport_map_port: 47\n 156:\n dport_map_port: 48\n 157:\n dport_map_port: 55\n 158:\n dport_map_port: 56\n 159:\n dport_map_port: 77\n 160:\n dport_map_port: 78\n 172:\n dport_map_port: 41\n 173:\n dport_map_port: 42\n 174:\n dport_map_port: 49\n 175:\n dport_map_port: 50\n 176:\n dport_map_port: 75\n 177:\n dport_map_port: 76\n 189:\n dport_map_port: 43\n 190:\n dport_map_port: 44\n 191:\n dport_map_port: 51\n 192:\n dport_map_port: 52\n 193:\n dport_map_port: 73\n 194:\n dport_map_port: 74\n 206:\n dport_map_port: 37\n 207:\n dport_map_port: 38\n 208:\n dport_map_port: 61\n 209:\n dport_map_port: 62\n 210:\n dport_map_port: 71\n 211:\n dport_map_port: 72\n 223:\n dport_map_port: 39\n 224:\n dport_map_port: 40\n 225:\n dport_map_port: 63\n 226:\n dport_map_port: 64\n 227:\n dport_map_port: 69\n 228:\n dport_map_port: 70\n 240:\n dport_map_port: 33\n 241:\n dport_map_port: 34\n 242:\n dport_map_port: 57\n 243:\n dport_map_port: 58\n 244:\n dport_map_port: 67\n 245:\n dport_map_port: 68\n 257:\n dport_map_port: 35\n 258:\n dport_map_port: 36\n 259:\n dport_map_port: 65\n 260:\n dport_map_port: 66\n 261:\n dport_map_port: 59\n 262:\n dport_map_port: 60\n...\n---\ndevice:\n 0:\n TM_THD_CONFIG:\n THRESHOLD_MODE: LOSSY\n...\n---\ndevice:\n 0:\n PORT:\n ?\n PORT_ID: [[1, 4], [17, 20], [34, 37], [51, 54], [68, 71], [85, 88], [102,\n 105], [119, 122], [136, 137], [140, 143], [155, 160], [172, 177], [189, 194],\n [206, 211], [223, 228], [240, 245], [257, 262]]\n :\n MTU: 9416\n MTU_CHECK: 1\n...\n---\ndevice:\n 0:\n FP_CONFIG:\n FP_ING_OPERMODE: GLOBAL_PIPE_AWARE\n...\n" } } } diff --git a/fboss/oss/hw_test_configs/galaxy_fc.agent.materialized_JSON b/fboss/oss/hw_test_configs/galaxy_fc.agent.materialized_JSON index d5ce99b104e85..98c79b0b0d64e 100644 --- a/fboss/oss/hw_test_configs/galaxy_fc.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/galaxy_fc.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -268,6 +296,7 @@ "dport_map_port_97": "50", "dport_map_port_98": "51", "dport_map_port_99": "52", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "0x1", "l2_mem_entries": "0x8000", "l2xmsg_mode": "0x1", diff --git a/fboss/oss/hw_test_configs/galaxy_lc_left.agent.materialized_JSON b/fboss/oss/hw_test_configs/galaxy_lc_left.agent.materialized_JSON index f8456f29bf48c..129243407c929 100644 --- a/fboss/oss/hw_test_configs/galaxy_lc_left.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/galaxy_lc_left.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -268,6 +296,7 @@ "dport_map_port_97": "14", "dport_map_port_98": "15", "dport_map_port_99": "16", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "0x1", "l2_mem_entries": "0x8000", "l2xmsg_mode": "0x1", diff --git a/fboss/oss/hw_test_configs/galaxy_lc_right.agent.materialized_JSON b/fboss/oss/hw_test_configs/galaxy_lc_right.agent.materialized_JSON index eff31c3f66e5f..d3fdbec16ac25 100644 --- a/fboss/oss/hw_test_configs/galaxy_lc_right.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/galaxy_lc_right.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -268,6 +296,7 @@ "dport_map_port_97": "14", "dport_map_port_98": "15", "dport_map_port_99": "16", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "0x1", "l2_mem_entries": "0x8000", "l2xmsg_mode": "0x1", diff --git a/fboss/oss/hw_test_configs/meru400bfu.agent.materialized_JSON b/fboss/oss/hw_test_configs/meru400bfu.agent.materialized_JSON index 54b5d47174c4f..c9751a5d4d91d 100644 --- a/fboss/oss/hw_test_configs/meru400bfu.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/meru400bfu.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "mode": "meru400bfu", "skip_transceiver_programming": "true" @@ -47,6 +48,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -103,7 +105,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -127,6 +129,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, diff --git a/fboss/oss/hw_test_configs/meru400biu.agent.materialized_JSON b/fboss/oss/hw_test_configs/meru400biu.agent.materialized_JSON index 5e47d7169ff6d..1469581dee81c 100644 --- a/fboss/oss/hw_test_configs/meru400biu.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/meru400biu.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "intf_nbr_tables": "true", "log_variable_name": "true", "mode": "meru400biu", @@ -60,6 +61,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -116,7 +118,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -131,10 +133,21 @@ }, "systemPortRange": { "minimum": 10, - "maximum": 30 + "maximum": 29 }, "switchMac": "02:00:00:00:00:01", - "connectionHandle": "68:00" + "connectionHandle": "68:00", + "systemPortRanges": { + "systemPortRanges": [ + { + "minimum": 10, + "maximum": 29 + } + ] + }, + "localSystemPortOffset": 10, + "globalSystemPortOffset": 10, + "inbandPortId": 1 } }, "vendorMacOuis": [ @@ -145,6 +158,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { "0": { "name": "intfNode0", @@ -155,11 +194,22 @@ ], "systemPortRange": { "minimum": 10, - "maximum": 30 + "maximum": 29 }, "nodeMac": "02:00:00:00:0F:0B", "asicType": 11, - "platformType": 18 + "platformType": 18, + "localSystemPortOffset": 10, + "globalSystemPortOffset": 10, + "systemPortRanges": { + "systemPortRanges": [ + { + "minimum": 10, + "maximum": 29 + } + ] + }, + "inbandPortId": 1 } }, "defaultVoqConfig": [ diff --git a/fboss/oss/hw_test_configs/meru800bfa.agent.materialized_JSON b/fboss/oss/hw_test_configs/meru800bfa.agent.materialized_JSON index f12801bfe3d0a..cda6eee853def 100644 --- a/fboss/oss/hw_test_configs/meru800bfa.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/meru800bfa.agent.materialized_JSON @@ -47,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -103,7 +104,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -137,6 +138,10 @@ ], "needL2EntryForNeighbor": true }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -202,36 +207,36 @@ "lane_to_serdes_map_fabric_lane0.BCM8892X": "rx4:tx5", "lane_to_serdes_map_fabric_lane1.BCM8892X": "rx5:tx4", "lane_to_serdes_map_fabric_lane10.BCM8892X": "rx18:tx18", - "lane_to_serdes_map_fabric_lane100.BCM8892X": "rx200:tx207", - "lane_to_serdes_map_fabric_lane101.BCM8892X": "rx201:tx204", + "lane_to_serdes_map_fabric_lane100.BCM8892X": "rx204:tx203", + "lane_to_serdes_map_fabric_lane101.BCM8892X": "rx205:tx200", "lane_to_serdes_map_fabric_lane102.BCM8892X": "rx202:tx205", "lane_to_serdes_map_fabric_lane103.BCM8892X": "rx203:tx206", - "lane_to_serdes_map_fabric_lane104.BCM8892X": "rx208:tx212", - "lane_to_serdes_map_fabric_lane105.BCM8892X": "rx209:tx213", + "lane_to_serdes_map_fabric_lane104.BCM8892X": "rx212:tx208", + "lane_to_serdes_map_fabric_lane105.BCM8892X": "rx213:tx209", "lane_to_serdes_map_fabric_lane106.BCM8892X": "rx210:tx214", "lane_to_serdes_map_fabric_lane107.BCM8892X": "rx211:tx215", - "lane_to_serdes_map_fabric_lane108.BCM8892X": "rx216:tx220", - "lane_to_serdes_map_fabric_lane109.BCM8892X": "rx217:tx221", + "lane_to_serdes_map_fabric_lane108.BCM8892X": "rx220:tx216", + "lane_to_serdes_map_fabric_lane109.BCM8892X": "rx221:tx217", "lane_to_serdes_map_fabric_lane11.BCM8892X": "rx19:tx19", "lane_to_serdes_map_fabric_lane110.BCM8892X": "rx218:tx222", "lane_to_serdes_map_fabric_lane111.BCM8892X": "rx219:tx223", - "lane_to_serdes_map_fabric_lane112.BCM8892X": "rx224:tx225", - "lane_to_serdes_map_fabric_lane113.BCM8892X": "rx225:tx224", - "lane_to_serdes_map_fabric_lane114.BCM8892X": "rx230:tx231", - "lane_to_serdes_map_fabric_lane115.BCM8892X": "rx231:tx230", - "lane_to_serdes_map_fabric_lane116.BCM8892X": "rx236:tx237", - "lane_to_serdes_map_fabric_lane117.BCM8892X": "rx237:tx236", - "lane_to_serdes_map_fabric_lane118.BCM8892X": "rx234:tx235", - "lane_to_serdes_map_fabric_lane119.BCM8892X": "rx235:tx234", + "lane_to_serdes_map_fabric_lane112.BCM8892X": "rx228:tx229", + "lane_to_serdes_map_fabric_lane113.BCM8892X": "rx229:tx228", + "lane_to_serdes_map_fabric_lane114.BCM8892X": "rx226:tx227", + "lane_to_serdes_map_fabric_lane115.BCM8892X": "rx227:tx226", + "lane_to_serdes_map_fabric_lane116.BCM8892X": "rx232:tx233", + "lane_to_serdes_map_fabric_lane117.BCM8892X": "rx233:tx232", + "lane_to_serdes_map_fabric_lane118.BCM8892X": "rx238:tx239", + "lane_to_serdes_map_fabric_lane119.BCM8892X": "rx239:tx238", "lane_to_serdes_map_fabric_lane12.BCM8892X": "rx24:tx24", - "lane_to_serdes_map_fabric_lane120.BCM8892X": "rx240:tx240", - "lane_to_serdes_map_fabric_lane121.BCM8892X": "rx241:tx241", - "lane_to_serdes_map_fabric_lane122.BCM8892X": "rx246:tx246", - "lane_to_serdes_map_fabric_lane123.BCM8892X": "rx247:tx247", - "lane_to_serdes_map_fabric_lane124.BCM8892X": "rx252:tx252", - "lane_to_serdes_map_fabric_lane125.BCM8892X": "rx253:tx253", - "lane_to_serdes_map_fabric_lane126.BCM8892X": "rx250:tx250", - "lane_to_serdes_map_fabric_lane127.BCM8892X": "rx251:tx251", + "lane_to_serdes_map_fabric_lane120.BCM8892X": "rx244:tx244", + "lane_to_serdes_map_fabric_lane121.BCM8892X": "rx245:tx245", + "lane_to_serdes_map_fabric_lane122.BCM8892X": "rx242:tx242", + "lane_to_serdes_map_fabric_lane123.BCM8892X": "rx243:tx243", + "lane_to_serdes_map_fabric_lane124.BCM8892X": "rx248:tx248", + "lane_to_serdes_map_fabric_lane125.BCM8892X": "rx249:tx249", + "lane_to_serdes_map_fabric_lane126.BCM8892X": "rx254:tx254", + "lane_to_serdes_map_fabric_lane127.BCM8892X": "rx255:tx255", "lane_to_serdes_map_fabric_lane128.BCM8892X": "rx256:tx257", "lane_to_serdes_map_fabric_lane129.BCM8892X": "rx257:tx256", "lane_to_serdes_map_fabric_lane13.BCM8892X": "rx25:tx25", @@ -252,133 +257,133 @@ "lane_to_serdes_map_fabric_lane143.BCM8892X": "rx283:tx283", "lane_to_serdes_map_fabric_lane144.BCM8892X": "rx288:tx295", "lane_to_serdes_map_fabric_lane145.BCM8892X": "rx289:tx292", - "lane_to_serdes_map_fabric_lane146.BCM8892X": "rx290:tx293", - "lane_to_serdes_map_fabric_lane147.BCM8892X": "rx291:tx294", + "lane_to_serdes_map_fabric_lane146.BCM8892X": "rx294:tx289", + "lane_to_serdes_map_fabric_lane147.BCM8892X": "rx295:tx290", "lane_to_serdes_map_fabric_lane148.BCM8892X": "rx296:tx303", "lane_to_serdes_map_fabric_lane149.BCM8892X": "rx297:tx300", "lane_to_serdes_map_fabric_lane15.BCM8892X": "rx31:tx31", - "lane_to_serdes_map_fabric_lane150.BCM8892X": "rx298:tx301", - "lane_to_serdes_map_fabric_lane151.BCM8892X": "rx299:tx302", + "lane_to_serdes_map_fabric_lane150.BCM8892X": "rx302:tx297", + "lane_to_serdes_map_fabric_lane151.BCM8892X": "rx303:tx298", "lane_to_serdes_map_fabric_lane152.BCM8892X": "rx304:tx308", "lane_to_serdes_map_fabric_lane153.BCM8892X": "rx305:tx309", - "lane_to_serdes_map_fabric_lane154.BCM8892X": "rx306:tx310", - "lane_to_serdes_map_fabric_lane155.BCM8892X": "rx307:tx311", + "lane_to_serdes_map_fabric_lane154.BCM8892X": "rx310:tx306", + "lane_to_serdes_map_fabric_lane155.BCM8892X": "rx311:tx307", "lane_to_serdes_map_fabric_lane156.BCM8892X": "rx312:tx316", "lane_to_serdes_map_fabric_lane157.BCM8892X": "rx313:tx317", - "lane_to_serdes_map_fabric_lane158.BCM8892X": "rx314:tx318", - "lane_to_serdes_map_fabric_lane159.BCM8892X": "rx315:tx319", + "lane_to_serdes_map_fabric_lane158.BCM8892X": "rx318:tx314", + "lane_to_serdes_map_fabric_lane159.BCM8892X": "rx319:tx315", "lane_to_serdes_map_fabric_lane16.BCM8892X": "rx36:tx39", "lane_to_serdes_map_fabric_lane160.BCM8892X": "rx320:tx327", "lane_to_serdes_map_fabric_lane161.BCM8892X": "rx321:tx324", - "lane_to_serdes_map_fabric_lane162.BCM8892X": "rx322:tx325", - "lane_to_serdes_map_fabric_lane163.BCM8892X": "rx323:tx326", + "lane_to_serdes_map_fabric_lane162.BCM8892X": "rx326:tx321", + "lane_to_serdes_map_fabric_lane163.BCM8892X": "rx327:tx322", "lane_to_serdes_map_fabric_lane164.BCM8892X": "rx328:tx335", "lane_to_serdes_map_fabric_lane165.BCM8892X": "rx329:tx332", - "lane_to_serdes_map_fabric_lane166.BCM8892X": "rx330:tx333", - "lane_to_serdes_map_fabric_lane167.BCM8892X": "rx331:tx334", + "lane_to_serdes_map_fabric_lane166.BCM8892X": "rx334:tx329", + "lane_to_serdes_map_fabric_lane167.BCM8892X": "rx335:tx330", "lane_to_serdes_map_fabric_lane168.BCM8892X": "rx336:tx340", "lane_to_serdes_map_fabric_lane169.BCM8892X": "rx337:tx341", "lane_to_serdes_map_fabric_lane17.BCM8892X": "rx37:tx36", - "lane_to_serdes_map_fabric_lane170.BCM8892X": "rx338:tx342", - "lane_to_serdes_map_fabric_lane171.BCM8892X": "rx339:tx343", + "lane_to_serdes_map_fabric_lane170.BCM8892X": "rx342:tx338", + "lane_to_serdes_map_fabric_lane171.BCM8892X": "rx343:tx339", "lane_to_serdes_map_fabric_lane172.BCM8892X": "rx344:tx348", "lane_to_serdes_map_fabric_lane173.BCM8892X": "rx345:tx349", - "lane_to_serdes_map_fabric_lane174.BCM8892X": "rx346:tx350", - "lane_to_serdes_map_fabric_lane175.BCM8892X": "rx347:tx351", + "lane_to_serdes_map_fabric_lane174.BCM8892X": "rx350:tx346", + "lane_to_serdes_map_fabric_lane175.BCM8892X": "rx351:tx347", "lane_to_serdes_map_fabric_lane176.BCM8892X": "rx352:tx359", "lane_to_serdes_map_fabric_lane177.BCM8892X": "rx353:tx356", - "lane_to_serdes_map_fabric_lane178.BCM8892X": "rx354:tx357", - "lane_to_serdes_map_fabric_lane179.BCM8892X": "rx355:tx358", - "lane_to_serdes_map_fabric_lane18.BCM8892X": "rx38:tx37", + "lane_to_serdes_map_fabric_lane178.BCM8892X": "rx358:tx353", + "lane_to_serdes_map_fabric_lane179.BCM8892X": "rx359:tx354", + "lane_to_serdes_map_fabric_lane18.BCM8892X": "rx34:tx33", "lane_to_serdes_map_fabric_lane180.BCM8892X": "rx360:tx367", "lane_to_serdes_map_fabric_lane181.BCM8892X": "rx361:tx364", - "lane_to_serdes_map_fabric_lane182.BCM8892X": "rx362:tx365", - "lane_to_serdes_map_fabric_lane183.BCM8892X": "rx363:tx366", + "lane_to_serdes_map_fabric_lane182.BCM8892X": "rx366:tx361", + "lane_to_serdes_map_fabric_lane183.BCM8892X": "rx367:tx362", "lane_to_serdes_map_fabric_lane184.BCM8892X": "rx368:tx372", "lane_to_serdes_map_fabric_lane185.BCM8892X": "rx369:tx373", - "lane_to_serdes_map_fabric_lane186.BCM8892X": "rx370:tx374", - "lane_to_serdes_map_fabric_lane187.BCM8892X": "rx371:tx375", + "lane_to_serdes_map_fabric_lane186.BCM8892X": "rx374:tx370", + "lane_to_serdes_map_fabric_lane187.BCM8892X": "rx375:tx371", "lane_to_serdes_map_fabric_lane188.BCM8892X": "rx376:tx380", "lane_to_serdes_map_fabric_lane189.BCM8892X": "rx377:tx381", - "lane_to_serdes_map_fabric_lane19.BCM8892X": "rx39:tx38", - "lane_to_serdes_map_fabric_lane190.BCM8892X": "rx378:tx382", - "lane_to_serdes_map_fabric_lane191.BCM8892X": "rx379:tx383", - "lane_to_serdes_map_fabric_lane192.BCM8892X": "rx384:tx391", - "lane_to_serdes_map_fabric_lane193.BCM8892X": "rx385:tx388", + "lane_to_serdes_map_fabric_lane19.BCM8892X": "rx35:tx34", + "lane_to_serdes_map_fabric_lane190.BCM8892X": "rx382:tx378", + "lane_to_serdes_map_fabric_lane191.BCM8892X": "rx383:tx379", + "lane_to_serdes_map_fabric_lane192.BCM8892X": "rx388:tx387", + "lane_to_serdes_map_fabric_lane193.BCM8892X": "rx389:tx384", "lane_to_serdes_map_fabric_lane194.BCM8892X": "rx386:tx389", "lane_to_serdes_map_fabric_lane195.BCM8892X": "rx387:tx390", - "lane_to_serdes_map_fabric_lane196.BCM8892X": "rx392:tx399", - "lane_to_serdes_map_fabric_lane197.BCM8892X": "rx393:tx396", + "lane_to_serdes_map_fabric_lane196.BCM8892X": "rx396:tx395", + "lane_to_serdes_map_fabric_lane197.BCM8892X": "rx397:tx392", "lane_to_serdes_map_fabric_lane198.BCM8892X": "rx394:tx397", "lane_to_serdes_map_fabric_lane199.BCM8892X": "rx395:tx398", "lane_to_serdes_map_fabric_lane2.BCM8892X": "rx2:tx3", "lane_to_serdes_map_fabric_lane20.BCM8892X": "rx40:tx47", - "lane_to_serdes_map_fabric_lane200.BCM8892X": "rx400:tx404", - "lane_to_serdes_map_fabric_lane201.BCM8892X": "rx401:tx405", + "lane_to_serdes_map_fabric_lane200.BCM8892X": "rx404:tx400", + "lane_to_serdes_map_fabric_lane201.BCM8892X": "rx405:tx401", "lane_to_serdes_map_fabric_lane202.BCM8892X": "rx402:tx406", "lane_to_serdes_map_fabric_lane203.BCM8892X": "rx403:tx407", - "lane_to_serdes_map_fabric_lane204.BCM8892X": "rx408:tx412", - "lane_to_serdes_map_fabric_lane205.BCM8892X": "rx409:tx413", + "lane_to_serdes_map_fabric_lane204.BCM8892X": "rx412:tx408", + "lane_to_serdes_map_fabric_lane205.BCM8892X": "rx413:tx409", "lane_to_serdes_map_fabric_lane206.BCM8892X": "rx410:tx414", "lane_to_serdes_map_fabric_lane207.BCM8892X": "rx411:tx415", - "lane_to_serdes_map_fabric_lane208.BCM8892X": "rx416:tx423", - "lane_to_serdes_map_fabric_lane209.BCM8892X": "rx417:tx420", + "lane_to_serdes_map_fabric_lane208.BCM8892X": "rx420:tx419", + "lane_to_serdes_map_fabric_lane209.BCM8892X": "rx421:tx416", "lane_to_serdes_map_fabric_lane21.BCM8892X": "rx41:tx44", "lane_to_serdes_map_fabric_lane210.BCM8892X": "rx418:tx421", "lane_to_serdes_map_fabric_lane211.BCM8892X": "rx419:tx422", - "lane_to_serdes_map_fabric_lane212.BCM8892X": "rx424:tx431", - "lane_to_serdes_map_fabric_lane213.BCM8892X": "rx425:tx428", + "lane_to_serdes_map_fabric_lane212.BCM8892X": "rx428:tx427", + "lane_to_serdes_map_fabric_lane213.BCM8892X": "rx429:tx424", "lane_to_serdes_map_fabric_lane214.BCM8892X": "rx426:tx429", "lane_to_serdes_map_fabric_lane215.BCM8892X": "rx427:tx430", - "lane_to_serdes_map_fabric_lane216.BCM8892X": "rx432:tx436", - "lane_to_serdes_map_fabric_lane217.BCM8892X": "rx433:tx437", + "lane_to_serdes_map_fabric_lane216.BCM8892X": "rx436:tx432", + "lane_to_serdes_map_fabric_lane217.BCM8892X": "rx437:tx433", "lane_to_serdes_map_fabric_lane218.BCM8892X": "rx434:tx438", "lane_to_serdes_map_fabric_lane219.BCM8892X": "rx435:tx439", - "lane_to_serdes_map_fabric_lane22.BCM8892X": "rx42:tx45", - "lane_to_serdes_map_fabric_lane220.BCM8892X": "rx440:tx444", - "lane_to_serdes_map_fabric_lane221.BCM8892X": "rx441:tx445", + "lane_to_serdes_map_fabric_lane22.BCM8892X": "rx46:tx41", + "lane_to_serdes_map_fabric_lane220.BCM8892X": "rx444:tx440", + "lane_to_serdes_map_fabric_lane221.BCM8892X": "rx445:tx441", "lane_to_serdes_map_fabric_lane222.BCM8892X": "rx442:tx446", "lane_to_serdes_map_fabric_lane223.BCM8892X": "rx443:tx447", - "lane_to_serdes_map_fabric_lane224.BCM8892X": "rx448:tx455", - "lane_to_serdes_map_fabric_lane225.BCM8892X": "rx449:tx452", + "lane_to_serdes_map_fabric_lane224.BCM8892X": "rx452:tx451", + "lane_to_serdes_map_fabric_lane225.BCM8892X": "rx453:tx448", "lane_to_serdes_map_fabric_lane226.BCM8892X": "rx450:tx453", "lane_to_serdes_map_fabric_lane227.BCM8892X": "rx451:tx454", - "lane_to_serdes_map_fabric_lane228.BCM8892X": "rx456:tx463", - "lane_to_serdes_map_fabric_lane229.BCM8892X": "rx457:tx460", - "lane_to_serdes_map_fabric_lane23.BCM8892X": "rx43:tx46", + "lane_to_serdes_map_fabric_lane228.BCM8892X": "rx460:tx459", + "lane_to_serdes_map_fabric_lane229.BCM8892X": "rx461:tx456", + "lane_to_serdes_map_fabric_lane23.BCM8892X": "rx47:tx42", "lane_to_serdes_map_fabric_lane230.BCM8892X": "rx458:tx461", "lane_to_serdes_map_fabric_lane231.BCM8892X": "rx459:tx462", "lane_to_serdes_map_fabric_lane232.BCM8892X": "rx468:tx464", "lane_to_serdes_map_fabric_lane233.BCM8892X": "rx469:tx465", - "lane_to_serdes_map_fabric_lane234.BCM8892X": "rx470:tx466", - "lane_to_serdes_map_fabric_lane235.BCM8892X": "rx471:tx467", + "lane_to_serdes_map_fabric_lane234.BCM8892X": "rx466:tx470", + "lane_to_serdes_map_fabric_lane235.BCM8892X": "rx467:tx471", "lane_to_serdes_map_fabric_lane236.BCM8892X": "rx472:tx472", "lane_to_serdes_map_fabric_lane237.BCM8892X": "rx473:tx473", - "lane_to_serdes_map_fabric_lane238.BCM8892X": "rx474:tx474", - "lane_to_serdes_map_fabric_lane239.BCM8892X": "rx475:tx475", + "lane_to_serdes_map_fabric_lane238.BCM8892X": "rx478:tx478", + "lane_to_serdes_map_fabric_lane239.BCM8892X": "rx479:tx479", "lane_to_serdes_map_fabric_lane24.BCM8892X": "rx48:tx52", - "lane_to_serdes_map_fabric_lane240.BCM8892X": "rx480:tx481", - "lane_to_serdes_map_fabric_lane241.BCM8892X": "rx481:tx480", - "lane_to_serdes_map_fabric_lane242.BCM8892X": "rx486:tx487", - "lane_to_serdes_map_fabric_lane243.BCM8892X": "rx487:tx486", - "lane_to_serdes_map_fabric_lane244.BCM8892X": "rx492:tx493", - "lane_to_serdes_map_fabric_lane245.BCM8892X": "rx493:tx492", - "lane_to_serdes_map_fabric_lane246.BCM8892X": "rx490:tx491", - "lane_to_serdes_map_fabric_lane247.BCM8892X": "rx491:tx490", - "lane_to_serdes_map_fabric_lane248.BCM8892X": "rx496:tx496", - "lane_to_serdes_map_fabric_lane249.BCM8892X": "rx497:tx497", + "lane_to_serdes_map_fabric_lane240.BCM8892X": "rx484:tx485", + "lane_to_serdes_map_fabric_lane241.BCM8892X": "rx485:tx484", + "lane_to_serdes_map_fabric_lane242.BCM8892X": "rx482:tx483", + "lane_to_serdes_map_fabric_lane243.BCM8892X": "rx483:tx482", + "lane_to_serdes_map_fabric_lane244.BCM8892X": "rx488:tx489", + "lane_to_serdes_map_fabric_lane245.BCM8892X": "rx489:tx488", + "lane_to_serdes_map_fabric_lane246.BCM8892X": "rx494:tx495", + "lane_to_serdes_map_fabric_lane247.BCM8892X": "rx495:tx494", + "lane_to_serdes_map_fabric_lane248.BCM8892X": "rx500:tx500", + "lane_to_serdes_map_fabric_lane249.BCM8892X": "rx501:tx501", "lane_to_serdes_map_fabric_lane25.BCM8892X": "rx49:tx53", - "lane_to_serdes_map_fabric_lane250.BCM8892X": "rx502:tx502", - "lane_to_serdes_map_fabric_lane251.BCM8892X": "rx503:tx503", - "lane_to_serdes_map_fabric_lane252.BCM8892X": "rx508:tx508", - "lane_to_serdes_map_fabric_lane253.BCM8892X": "rx509:tx509", - "lane_to_serdes_map_fabric_lane254.BCM8892X": "rx506:tx506", - "lane_to_serdes_map_fabric_lane255.BCM8892X": "rx507:tx507", + "lane_to_serdes_map_fabric_lane250.BCM8892X": "rx498:tx498", + "lane_to_serdes_map_fabric_lane251.BCM8892X": "rx499:tx499", + "lane_to_serdes_map_fabric_lane252.BCM8892X": "rx504:tx504", + "lane_to_serdes_map_fabric_lane253.BCM8892X": "rx505:tx505", + "lane_to_serdes_map_fabric_lane254.BCM8892X": "rx510:tx510", + "lane_to_serdes_map_fabric_lane255.BCM8892X": "rx511:tx511", "lane_to_serdes_map_fabric_lane256.BCM8892X": "rx0:tx1", "lane_to_serdes_map_fabric_lane257.BCM8892X": "rx1:tx0", "lane_to_serdes_map_fabric_lane258.BCM8892X": "rx6:tx7", "lane_to_serdes_map_fabric_lane259.BCM8892X": "rx7:tx6", - "lane_to_serdes_map_fabric_lane26.BCM8892X": "rx50:tx54", + "lane_to_serdes_map_fabric_lane26.BCM8892X": "rx54:tx50", "lane_to_serdes_map_fabric_lane260.BCM8892X": "rx12:tx13", "lane_to_serdes_map_fabric_lane261.BCM8892X": "rx13:tx12", "lane_to_serdes_map_fabric_lane262.BCM8892X": "rx10:tx11", @@ -389,140 +394,140 @@ "lane_to_serdes_map_fabric_lane267.BCM8892X": "rx23:tx23", "lane_to_serdes_map_fabric_lane268.BCM8892X": "rx28:tx28", "lane_to_serdes_map_fabric_lane269.BCM8892X": "rx29:tx29", - "lane_to_serdes_map_fabric_lane27.BCM8892X": "rx51:tx55", + "lane_to_serdes_map_fabric_lane27.BCM8892X": "rx55:tx51", "lane_to_serdes_map_fabric_lane270.BCM8892X": "rx26:tx26", "lane_to_serdes_map_fabric_lane271.BCM8892X": "rx27:tx27", "lane_to_serdes_map_fabric_lane272.BCM8892X": "rx32:tx35", "lane_to_serdes_map_fabric_lane273.BCM8892X": "rx33:tx32", - "lane_to_serdes_map_fabric_lane274.BCM8892X": "rx34:tx33", - "lane_to_serdes_map_fabric_lane275.BCM8892X": "rx35:tx34", + "lane_to_serdes_map_fabric_lane274.BCM8892X": "rx38:tx37", + "lane_to_serdes_map_fabric_lane275.BCM8892X": "rx39:tx38", "lane_to_serdes_map_fabric_lane276.BCM8892X": "rx44:tx43", "lane_to_serdes_map_fabric_lane277.BCM8892X": "rx45:tx40", - "lane_to_serdes_map_fabric_lane278.BCM8892X": "rx46:tx41", - "lane_to_serdes_map_fabric_lane279.BCM8892X": "rx47:tx42", + "lane_to_serdes_map_fabric_lane278.BCM8892X": "rx42:tx45", + "lane_to_serdes_map_fabric_lane279.BCM8892X": "rx43:tx46", "lane_to_serdes_map_fabric_lane28.BCM8892X": "rx56:tx60", "lane_to_serdes_map_fabric_lane280.BCM8892X": "rx52:tx48", "lane_to_serdes_map_fabric_lane281.BCM8892X": "rx53:tx49", - "lane_to_serdes_map_fabric_lane282.BCM8892X": "rx54:tx50", - "lane_to_serdes_map_fabric_lane283.BCM8892X": "rx55:tx51", + "lane_to_serdes_map_fabric_lane282.BCM8892X": "rx50:tx54", + "lane_to_serdes_map_fabric_lane283.BCM8892X": "rx51:tx55", "lane_to_serdes_map_fabric_lane284.BCM8892X": "rx60:tx56", "lane_to_serdes_map_fabric_lane285.BCM8892X": "rx61:tx57", - "lane_to_serdes_map_fabric_lane286.BCM8892X": "rx62:tx58", - "lane_to_serdes_map_fabric_lane287.BCM8892X": "rx63:tx59", + "lane_to_serdes_map_fabric_lane286.BCM8892X": "rx58:tx62", + "lane_to_serdes_map_fabric_lane287.BCM8892X": "rx59:tx63", "lane_to_serdes_map_fabric_lane288.BCM8892X": "rx68:tx67", "lane_to_serdes_map_fabric_lane289.BCM8892X": "rx69:tx64", "lane_to_serdes_map_fabric_lane29.BCM8892X": "rx57:tx61", - "lane_to_serdes_map_fabric_lane290.BCM8892X": "rx70:tx65", - "lane_to_serdes_map_fabric_lane291.BCM8892X": "rx71:tx66", + "lane_to_serdes_map_fabric_lane290.BCM8892X": "rx66:tx69", + "lane_to_serdes_map_fabric_lane291.BCM8892X": "rx67:tx70", "lane_to_serdes_map_fabric_lane292.BCM8892X": "rx76:tx75", "lane_to_serdes_map_fabric_lane293.BCM8892X": "rx77:tx72", - "lane_to_serdes_map_fabric_lane294.BCM8892X": "rx78:tx73", - "lane_to_serdes_map_fabric_lane295.BCM8892X": "rx79:tx74", + "lane_to_serdes_map_fabric_lane294.BCM8892X": "rx74:tx77", + "lane_to_serdes_map_fabric_lane295.BCM8892X": "rx75:tx78", "lane_to_serdes_map_fabric_lane296.BCM8892X": "rx84:tx80", "lane_to_serdes_map_fabric_lane297.BCM8892X": "rx85:tx81", - "lane_to_serdes_map_fabric_lane298.BCM8892X": "rx86:tx82", - "lane_to_serdes_map_fabric_lane299.BCM8892X": "rx87:tx83", + "lane_to_serdes_map_fabric_lane298.BCM8892X": "rx82:tx86", + "lane_to_serdes_map_fabric_lane299.BCM8892X": "rx83:tx87", "lane_to_serdes_map_fabric_lane3.BCM8892X": "rx3:tx2", - "lane_to_serdes_map_fabric_lane30.BCM8892X": "rx58:tx62", + "lane_to_serdes_map_fabric_lane30.BCM8892X": "rx62:tx58", "lane_to_serdes_map_fabric_lane300.BCM8892X": "rx92:tx88", "lane_to_serdes_map_fabric_lane301.BCM8892X": "rx93:tx89", - "lane_to_serdes_map_fabric_lane302.BCM8892X": "rx94:tx90", - "lane_to_serdes_map_fabric_lane303.BCM8892X": "rx95:tx91", + "lane_to_serdes_map_fabric_lane302.BCM8892X": "rx90:tx94", + "lane_to_serdes_map_fabric_lane303.BCM8892X": "rx91:tx95", "lane_to_serdes_map_fabric_lane304.BCM8892X": "rx100:tx99", "lane_to_serdes_map_fabric_lane305.BCM8892X": "rx101:tx96", - "lane_to_serdes_map_fabric_lane306.BCM8892X": "rx102:tx97", - "lane_to_serdes_map_fabric_lane307.BCM8892X": "rx103:tx98", + "lane_to_serdes_map_fabric_lane306.BCM8892X": "rx98:tx101", + "lane_to_serdes_map_fabric_lane307.BCM8892X": "rx99:tx102", "lane_to_serdes_map_fabric_lane308.BCM8892X": "rx108:tx107", "lane_to_serdes_map_fabric_lane309.BCM8892X": "rx109:tx104", - "lane_to_serdes_map_fabric_lane31.BCM8892X": "rx59:tx63", - "lane_to_serdes_map_fabric_lane310.BCM8892X": "rx110:tx105", - "lane_to_serdes_map_fabric_lane311.BCM8892X": "rx111:tx106", + "lane_to_serdes_map_fabric_lane31.BCM8892X": "rx63:tx59", + "lane_to_serdes_map_fabric_lane310.BCM8892X": "rx106:tx109", + "lane_to_serdes_map_fabric_lane311.BCM8892X": "rx107:tx110", "lane_to_serdes_map_fabric_lane312.BCM8892X": "rx116:tx112", "lane_to_serdes_map_fabric_lane313.BCM8892X": "rx117:tx113", - "lane_to_serdes_map_fabric_lane314.BCM8892X": "rx118:tx114", - "lane_to_serdes_map_fabric_lane315.BCM8892X": "rx119:tx115", + "lane_to_serdes_map_fabric_lane314.BCM8892X": "rx114:tx118", + "lane_to_serdes_map_fabric_lane315.BCM8892X": "rx115:tx119", "lane_to_serdes_map_fabric_lane316.BCM8892X": "rx124:tx120", "lane_to_serdes_map_fabric_lane317.BCM8892X": "rx125:tx121", - "lane_to_serdes_map_fabric_lane318.BCM8892X": "rx126:tx122", - "lane_to_serdes_map_fabric_lane319.BCM8892X": "rx127:tx123", + "lane_to_serdes_map_fabric_lane318.BCM8892X": "rx122:tx126", + "lane_to_serdes_map_fabric_lane319.BCM8892X": "rx123:tx127", "lane_to_serdes_map_fabric_lane32.BCM8892X": "rx64:tx71", - "lane_to_serdes_map_fabric_lane320.BCM8892X": "rx132:tx131", - "lane_to_serdes_map_fabric_lane321.BCM8892X": "rx133:tx128", + "lane_to_serdes_map_fabric_lane320.BCM8892X": "rx128:tx135", + "lane_to_serdes_map_fabric_lane321.BCM8892X": "rx129:tx132", "lane_to_serdes_map_fabric_lane322.BCM8892X": "rx134:tx129", "lane_to_serdes_map_fabric_lane323.BCM8892X": "rx135:tx130", - "lane_to_serdes_map_fabric_lane324.BCM8892X": "rx140:tx139", - "lane_to_serdes_map_fabric_lane325.BCM8892X": "rx141:tx136", + "lane_to_serdes_map_fabric_lane324.BCM8892X": "rx136:tx143", + "lane_to_serdes_map_fabric_lane325.BCM8892X": "rx137:tx140", "lane_to_serdes_map_fabric_lane326.BCM8892X": "rx142:tx137", "lane_to_serdes_map_fabric_lane327.BCM8892X": "rx143:tx138", - "lane_to_serdes_map_fabric_lane328.BCM8892X": "rx148:tx144", - "lane_to_serdes_map_fabric_lane329.BCM8892X": "rx149:tx145", + "lane_to_serdes_map_fabric_lane328.BCM8892X": "rx144:tx148", + "lane_to_serdes_map_fabric_lane329.BCM8892X": "rx145:tx149", "lane_to_serdes_map_fabric_lane33.BCM8892X": "rx65:tx68", "lane_to_serdes_map_fabric_lane330.BCM8892X": "rx150:tx146", "lane_to_serdes_map_fabric_lane331.BCM8892X": "rx151:tx147", - "lane_to_serdes_map_fabric_lane332.BCM8892X": "rx156:tx152", - "lane_to_serdes_map_fabric_lane333.BCM8892X": "rx157:tx153", + "lane_to_serdes_map_fabric_lane332.BCM8892X": "rx152:tx156", + "lane_to_serdes_map_fabric_lane333.BCM8892X": "rx153:tx157", "lane_to_serdes_map_fabric_lane334.BCM8892X": "rx158:tx154", "lane_to_serdes_map_fabric_lane335.BCM8892X": "rx159:tx155", - "lane_to_serdes_map_fabric_lane336.BCM8892X": "rx164:tx163", - "lane_to_serdes_map_fabric_lane337.BCM8892X": "rx165:tx160", + "lane_to_serdes_map_fabric_lane336.BCM8892X": "rx160:tx167", + "lane_to_serdes_map_fabric_lane337.BCM8892X": "rx161:tx164", "lane_to_serdes_map_fabric_lane338.BCM8892X": "rx166:tx161", "lane_to_serdes_map_fabric_lane339.BCM8892X": "rx167:tx162", - "lane_to_serdes_map_fabric_lane34.BCM8892X": "rx66:tx69", - "lane_to_serdes_map_fabric_lane340.BCM8892X": "rx172:tx171", - "lane_to_serdes_map_fabric_lane341.BCM8892X": "rx173:tx168", + "lane_to_serdes_map_fabric_lane34.BCM8892X": "rx70:tx65", + "lane_to_serdes_map_fabric_lane340.BCM8892X": "rx168:tx175", + "lane_to_serdes_map_fabric_lane341.BCM8892X": "rx169:tx172", "lane_to_serdes_map_fabric_lane342.BCM8892X": "rx174:tx169", "lane_to_serdes_map_fabric_lane343.BCM8892X": "rx175:tx170", - "lane_to_serdes_map_fabric_lane344.BCM8892X": "rx180:tx176", - "lane_to_serdes_map_fabric_lane345.BCM8892X": "rx181:tx177", + "lane_to_serdes_map_fabric_lane344.BCM8892X": "rx176:tx180", + "lane_to_serdes_map_fabric_lane345.BCM8892X": "rx177:tx181", "lane_to_serdes_map_fabric_lane346.BCM8892X": "rx182:tx178", "lane_to_serdes_map_fabric_lane347.BCM8892X": "rx183:tx179", - "lane_to_serdes_map_fabric_lane348.BCM8892X": "rx188:tx184", - "lane_to_serdes_map_fabric_lane349.BCM8892X": "rx189:tx185", - "lane_to_serdes_map_fabric_lane35.BCM8892X": "rx67:tx70", + "lane_to_serdes_map_fabric_lane348.BCM8892X": "rx184:tx188", + "lane_to_serdes_map_fabric_lane349.BCM8892X": "rx185:tx189", + "lane_to_serdes_map_fabric_lane35.BCM8892X": "rx71:tx66", "lane_to_serdes_map_fabric_lane350.BCM8892X": "rx190:tx186", "lane_to_serdes_map_fabric_lane351.BCM8892X": "rx191:tx187", - "lane_to_serdes_map_fabric_lane352.BCM8892X": "rx196:tx195", - "lane_to_serdes_map_fabric_lane353.BCM8892X": "rx197:tx192", + "lane_to_serdes_map_fabric_lane352.BCM8892X": "rx192:tx199", + "lane_to_serdes_map_fabric_lane353.BCM8892X": "rx193:tx196", "lane_to_serdes_map_fabric_lane354.BCM8892X": "rx198:tx193", "lane_to_serdes_map_fabric_lane355.BCM8892X": "rx199:tx194", - "lane_to_serdes_map_fabric_lane356.BCM8892X": "rx204:tx203", - "lane_to_serdes_map_fabric_lane357.BCM8892X": "rx205:tx200", + "lane_to_serdes_map_fabric_lane356.BCM8892X": "rx200:tx207", + "lane_to_serdes_map_fabric_lane357.BCM8892X": "rx201:tx204", "lane_to_serdes_map_fabric_lane358.BCM8892X": "rx206:tx201", "lane_to_serdes_map_fabric_lane359.BCM8892X": "rx207:tx202", "lane_to_serdes_map_fabric_lane36.BCM8892X": "rx72:tx79", - "lane_to_serdes_map_fabric_lane360.BCM8892X": "rx212:tx208", - "lane_to_serdes_map_fabric_lane361.BCM8892X": "rx213:tx209", + "lane_to_serdes_map_fabric_lane360.BCM8892X": "rx208:tx212", + "lane_to_serdes_map_fabric_lane361.BCM8892X": "rx209:tx213", "lane_to_serdes_map_fabric_lane362.BCM8892X": "rx214:tx210", "lane_to_serdes_map_fabric_lane363.BCM8892X": "rx215:tx211", - "lane_to_serdes_map_fabric_lane364.BCM8892X": "rx220:tx216", - "lane_to_serdes_map_fabric_lane365.BCM8892X": "rx221:tx217", + "lane_to_serdes_map_fabric_lane364.BCM8892X": "rx216:tx220", + "lane_to_serdes_map_fabric_lane365.BCM8892X": "rx217:tx221", "lane_to_serdes_map_fabric_lane366.BCM8892X": "rx222:tx218", "lane_to_serdes_map_fabric_lane367.BCM8892X": "rx223:tx219", - "lane_to_serdes_map_fabric_lane368.BCM8892X": "rx228:tx229", - "lane_to_serdes_map_fabric_lane369.BCM8892X": "rx229:tx228", + "lane_to_serdes_map_fabric_lane368.BCM8892X": "rx224:tx225", + "lane_to_serdes_map_fabric_lane369.BCM8892X": "rx225:tx224", "lane_to_serdes_map_fabric_lane37.BCM8892X": "rx73:tx76", - "lane_to_serdes_map_fabric_lane370.BCM8892X": "rx226:tx227", - "lane_to_serdes_map_fabric_lane371.BCM8892X": "rx227:tx226", - "lane_to_serdes_map_fabric_lane372.BCM8892X": "rx232:tx233", - "lane_to_serdes_map_fabric_lane373.BCM8892X": "rx233:tx232", - "lane_to_serdes_map_fabric_lane374.BCM8892X": "rx238:tx239", - "lane_to_serdes_map_fabric_lane375.BCM8892X": "rx239:tx238", - "lane_to_serdes_map_fabric_lane376.BCM8892X": "rx244:tx244", - "lane_to_serdes_map_fabric_lane377.BCM8892X": "rx245:tx245", - "lane_to_serdes_map_fabric_lane378.BCM8892X": "rx242:tx242", - "lane_to_serdes_map_fabric_lane379.BCM8892X": "rx243:tx243", - "lane_to_serdes_map_fabric_lane38.BCM8892X": "rx74:tx77", - "lane_to_serdes_map_fabric_lane380.BCM8892X": "rx248:tx248", - "lane_to_serdes_map_fabric_lane381.BCM8892X": "rx249:tx249", - "lane_to_serdes_map_fabric_lane382.BCM8892X": "rx254:tx254", - "lane_to_serdes_map_fabric_lane383.BCM8892X": "rx255:tx255", + "lane_to_serdes_map_fabric_lane370.BCM8892X": "rx230:tx231", + "lane_to_serdes_map_fabric_lane371.BCM8892X": "rx231:tx230", + "lane_to_serdes_map_fabric_lane372.BCM8892X": "rx236:tx237", + "lane_to_serdes_map_fabric_lane373.BCM8892X": "rx237:tx236", + "lane_to_serdes_map_fabric_lane374.BCM8892X": "rx234:tx235", + "lane_to_serdes_map_fabric_lane375.BCM8892X": "rx235:tx234", + "lane_to_serdes_map_fabric_lane376.BCM8892X": "rx240:tx240", + "lane_to_serdes_map_fabric_lane377.BCM8892X": "rx241:tx241", + "lane_to_serdes_map_fabric_lane378.BCM8892X": "rx246:tx246", + "lane_to_serdes_map_fabric_lane379.BCM8892X": "rx247:tx247", + "lane_to_serdes_map_fabric_lane38.BCM8892X": "rx78:tx73", + "lane_to_serdes_map_fabric_lane380.BCM8892X": "rx252:tx252", + "lane_to_serdes_map_fabric_lane381.BCM8892X": "rx253:tx253", + "lane_to_serdes_map_fabric_lane382.BCM8892X": "rx250:tx250", + "lane_to_serdes_map_fabric_lane383.BCM8892X": "rx251:tx251", "lane_to_serdes_map_fabric_lane384.BCM8892X": "rx260:tx261", "lane_to_serdes_map_fabric_lane385.BCM8892X": "rx261:tx260", "lane_to_serdes_map_fabric_lane386.BCM8892X": "rx258:tx259", "lane_to_serdes_map_fabric_lane387.BCM8892X": "rx259:tx258", "lane_to_serdes_map_fabric_lane388.BCM8892X": "rx264:tx265", "lane_to_serdes_map_fabric_lane389.BCM8892X": "rx265:tx264", - "lane_to_serdes_map_fabric_lane39.BCM8892X": "rx75:tx78", + "lane_to_serdes_map_fabric_lane39.BCM8892X": "rx79:tx74", "lane_to_serdes_map_fabric_lane390.BCM8892X": "rx270:tx271", "lane_to_serdes_map_fabric_lane391.BCM8892X": "rx271:tx270", "lane_to_serdes_map_fabric_lane392.BCM8892X": "rx276:tx276", @@ -537,193 +542,193 @@ "lane_to_serdes_map_fabric_lane40.BCM8892X": "rx80:tx84", "lane_to_serdes_map_fabric_lane400.BCM8892X": "rx292:tx291", "lane_to_serdes_map_fabric_lane401.BCM8892X": "rx293:tx288", - "lane_to_serdes_map_fabric_lane402.BCM8892X": "rx294:tx289", - "lane_to_serdes_map_fabric_lane403.BCM8892X": "rx295:tx290", + "lane_to_serdes_map_fabric_lane402.BCM8892X": "rx290:tx293", + "lane_to_serdes_map_fabric_lane403.BCM8892X": "rx291:tx294", "lane_to_serdes_map_fabric_lane404.BCM8892X": "rx300:tx299", "lane_to_serdes_map_fabric_lane405.BCM8892X": "rx301:tx296", - "lane_to_serdes_map_fabric_lane406.BCM8892X": "rx302:tx297", - "lane_to_serdes_map_fabric_lane407.BCM8892X": "rx303:tx298", + "lane_to_serdes_map_fabric_lane406.BCM8892X": "rx298:tx301", + "lane_to_serdes_map_fabric_lane407.BCM8892X": "rx299:tx302", "lane_to_serdes_map_fabric_lane408.BCM8892X": "rx308:tx304", "lane_to_serdes_map_fabric_lane409.BCM8892X": "rx309:tx305", "lane_to_serdes_map_fabric_lane41.BCM8892X": "rx81:tx85", - "lane_to_serdes_map_fabric_lane410.BCM8892X": "rx310:tx306", - "lane_to_serdes_map_fabric_lane411.BCM8892X": "rx311:tx307", + "lane_to_serdes_map_fabric_lane410.BCM8892X": "rx306:tx310", + "lane_to_serdes_map_fabric_lane411.BCM8892X": "rx307:tx311", "lane_to_serdes_map_fabric_lane412.BCM8892X": "rx316:tx312", "lane_to_serdes_map_fabric_lane413.BCM8892X": "rx317:tx313", - "lane_to_serdes_map_fabric_lane414.BCM8892X": "rx318:tx314", - "lane_to_serdes_map_fabric_lane415.BCM8892X": "rx319:tx315", + "lane_to_serdes_map_fabric_lane414.BCM8892X": "rx314:tx318", + "lane_to_serdes_map_fabric_lane415.BCM8892X": "rx315:tx319", "lane_to_serdes_map_fabric_lane416.BCM8892X": "rx324:tx323", "lane_to_serdes_map_fabric_lane417.BCM8892X": "rx325:tx320", - "lane_to_serdes_map_fabric_lane418.BCM8892X": "rx326:tx321", - "lane_to_serdes_map_fabric_lane419.BCM8892X": "rx327:tx322", - "lane_to_serdes_map_fabric_lane42.BCM8892X": "rx82:tx86", + "lane_to_serdes_map_fabric_lane418.BCM8892X": "rx322:tx325", + "lane_to_serdes_map_fabric_lane419.BCM8892X": "rx323:tx326", + "lane_to_serdes_map_fabric_lane42.BCM8892X": "rx86:tx82", "lane_to_serdes_map_fabric_lane420.BCM8892X": "rx332:tx331", "lane_to_serdes_map_fabric_lane421.BCM8892X": "rx333:tx328", - "lane_to_serdes_map_fabric_lane422.BCM8892X": "rx334:tx329", - "lane_to_serdes_map_fabric_lane423.BCM8892X": "rx335:tx330", + "lane_to_serdes_map_fabric_lane422.BCM8892X": "rx330:tx333", + "lane_to_serdes_map_fabric_lane423.BCM8892X": "rx331:tx334", "lane_to_serdes_map_fabric_lane424.BCM8892X": "rx340:tx336", "lane_to_serdes_map_fabric_lane425.BCM8892X": "rx341:tx337", - "lane_to_serdes_map_fabric_lane426.BCM8892X": "rx342:tx338", - "lane_to_serdes_map_fabric_lane427.BCM8892X": "rx343:tx339", + "lane_to_serdes_map_fabric_lane426.BCM8892X": "rx338:tx342", + "lane_to_serdes_map_fabric_lane427.BCM8892X": "rx339:tx343", "lane_to_serdes_map_fabric_lane428.BCM8892X": "rx348:tx344", "lane_to_serdes_map_fabric_lane429.BCM8892X": "rx349:tx345", - "lane_to_serdes_map_fabric_lane43.BCM8892X": "rx83:tx87", - "lane_to_serdes_map_fabric_lane430.BCM8892X": "rx350:tx346", - "lane_to_serdes_map_fabric_lane431.BCM8892X": "rx351:tx347", + "lane_to_serdes_map_fabric_lane43.BCM8892X": "rx87:tx83", + "lane_to_serdes_map_fabric_lane430.BCM8892X": "rx346:tx350", + "lane_to_serdes_map_fabric_lane431.BCM8892X": "rx347:tx351", "lane_to_serdes_map_fabric_lane432.BCM8892X": "rx356:tx355", "lane_to_serdes_map_fabric_lane433.BCM8892X": "rx357:tx352", - "lane_to_serdes_map_fabric_lane434.BCM8892X": "rx358:tx353", - "lane_to_serdes_map_fabric_lane435.BCM8892X": "rx359:tx354", + "lane_to_serdes_map_fabric_lane434.BCM8892X": "rx354:tx357", + "lane_to_serdes_map_fabric_lane435.BCM8892X": "rx355:tx358", "lane_to_serdes_map_fabric_lane436.BCM8892X": "rx364:tx363", "lane_to_serdes_map_fabric_lane437.BCM8892X": "rx365:tx360", - "lane_to_serdes_map_fabric_lane438.BCM8892X": "rx366:tx361", - "lane_to_serdes_map_fabric_lane439.BCM8892X": "rx367:tx362", + "lane_to_serdes_map_fabric_lane438.BCM8892X": "rx362:tx365", + "lane_to_serdes_map_fabric_lane439.BCM8892X": "rx363:tx366", "lane_to_serdes_map_fabric_lane44.BCM8892X": "rx88:tx92", "lane_to_serdes_map_fabric_lane440.BCM8892X": "rx372:tx368", "lane_to_serdes_map_fabric_lane441.BCM8892X": "rx373:tx369", - "lane_to_serdes_map_fabric_lane442.BCM8892X": "rx374:tx370", - "lane_to_serdes_map_fabric_lane443.BCM8892X": "rx375:tx371", + "lane_to_serdes_map_fabric_lane442.BCM8892X": "rx370:tx374", + "lane_to_serdes_map_fabric_lane443.BCM8892X": "rx371:tx375", "lane_to_serdes_map_fabric_lane444.BCM8892X": "rx380:tx376", "lane_to_serdes_map_fabric_lane445.BCM8892X": "rx381:tx377", - "lane_to_serdes_map_fabric_lane446.BCM8892X": "rx382:tx378", - "lane_to_serdes_map_fabric_lane447.BCM8892X": "rx383:tx379", - "lane_to_serdes_map_fabric_lane448.BCM8892X": "rx388:tx387", - "lane_to_serdes_map_fabric_lane449.BCM8892X": "rx389:tx384", + "lane_to_serdes_map_fabric_lane446.BCM8892X": "rx378:tx382", + "lane_to_serdes_map_fabric_lane447.BCM8892X": "rx379:tx383", + "lane_to_serdes_map_fabric_lane448.BCM8892X": "rx384:tx391", + "lane_to_serdes_map_fabric_lane449.BCM8892X": "rx385:tx388", "lane_to_serdes_map_fabric_lane45.BCM8892X": "rx89:tx93", "lane_to_serdes_map_fabric_lane450.BCM8892X": "rx390:tx385", "lane_to_serdes_map_fabric_lane451.BCM8892X": "rx391:tx386", - "lane_to_serdes_map_fabric_lane452.BCM8892X": "rx396:tx395", - "lane_to_serdes_map_fabric_lane453.BCM8892X": "rx397:tx392", + "lane_to_serdes_map_fabric_lane452.BCM8892X": "rx392:tx399", + "lane_to_serdes_map_fabric_lane453.BCM8892X": "rx393:tx396", "lane_to_serdes_map_fabric_lane454.BCM8892X": "rx398:tx393", "lane_to_serdes_map_fabric_lane455.BCM8892X": "rx399:tx394", - "lane_to_serdes_map_fabric_lane456.BCM8892X": "rx404:tx400", - "lane_to_serdes_map_fabric_lane457.BCM8892X": "rx405:tx401", + "lane_to_serdes_map_fabric_lane456.BCM8892X": "rx400:tx404", + "lane_to_serdes_map_fabric_lane457.BCM8892X": "rx401:tx405", "lane_to_serdes_map_fabric_lane458.BCM8892X": "rx406:tx402", "lane_to_serdes_map_fabric_lane459.BCM8892X": "rx407:tx403", - "lane_to_serdes_map_fabric_lane46.BCM8892X": "rx90:tx94", - "lane_to_serdes_map_fabric_lane460.BCM8892X": "rx412:tx408", - "lane_to_serdes_map_fabric_lane461.BCM8892X": "rx413:tx409", + "lane_to_serdes_map_fabric_lane46.BCM8892X": "rx94:tx90", + "lane_to_serdes_map_fabric_lane460.BCM8892X": "rx408:tx412", + "lane_to_serdes_map_fabric_lane461.BCM8892X": "rx409:tx413", "lane_to_serdes_map_fabric_lane462.BCM8892X": "rx414:tx410", "lane_to_serdes_map_fabric_lane463.BCM8892X": "rx415:tx411", - "lane_to_serdes_map_fabric_lane464.BCM8892X": "rx420:tx419", - "lane_to_serdes_map_fabric_lane465.BCM8892X": "rx421:tx416", + "lane_to_serdes_map_fabric_lane464.BCM8892X": "rx416:tx423", + "lane_to_serdes_map_fabric_lane465.BCM8892X": "rx417:tx420", "lane_to_serdes_map_fabric_lane466.BCM8892X": "rx422:tx417", "lane_to_serdes_map_fabric_lane467.BCM8892X": "rx423:tx418", - "lane_to_serdes_map_fabric_lane468.BCM8892X": "rx428:tx427", - "lane_to_serdes_map_fabric_lane469.BCM8892X": "rx429:tx424", - "lane_to_serdes_map_fabric_lane47.BCM8892X": "rx91:tx95", + "lane_to_serdes_map_fabric_lane468.BCM8892X": "rx424:tx431", + "lane_to_serdes_map_fabric_lane469.BCM8892X": "rx425:tx428", + "lane_to_serdes_map_fabric_lane47.BCM8892X": "rx95:tx91", "lane_to_serdes_map_fabric_lane470.BCM8892X": "rx430:tx425", "lane_to_serdes_map_fabric_lane471.BCM8892X": "rx431:tx426", - "lane_to_serdes_map_fabric_lane472.BCM8892X": "rx436:tx432", - "lane_to_serdes_map_fabric_lane473.BCM8892X": "rx437:tx433", + "lane_to_serdes_map_fabric_lane472.BCM8892X": "rx432:tx436", + "lane_to_serdes_map_fabric_lane473.BCM8892X": "rx433:tx437", "lane_to_serdes_map_fabric_lane474.BCM8892X": "rx438:tx434", "lane_to_serdes_map_fabric_lane475.BCM8892X": "rx439:tx435", - "lane_to_serdes_map_fabric_lane476.BCM8892X": "rx444:tx440", - "lane_to_serdes_map_fabric_lane477.BCM8892X": "rx445:tx441", + "lane_to_serdes_map_fabric_lane476.BCM8892X": "rx440:tx444", + "lane_to_serdes_map_fabric_lane477.BCM8892X": "rx441:tx445", "lane_to_serdes_map_fabric_lane478.BCM8892X": "rx446:tx442", "lane_to_serdes_map_fabric_lane479.BCM8892X": "rx447:tx443", "lane_to_serdes_map_fabric_lane48.BCM8892X": "rx96:tx103", - "lane_to_serdes_map_fabric_lane480.BCM8892X": "rx452:tx451", - "lane_to_serdes_map_fabric_lane481.BCM8892X": "rx453:tx448", + "lane_to_serdes_map_fabric_lane480.BCM8892X": "rx448:tx455", + "lane_to_serdes_map_fabric_lane481.BCM8892X": "rx449:tx452", "lane_to_serdes_map_fabric_lane482.BCM8892X": "rx454:tx449", "lane_to_serdes_map_fabric_lane483.BCM8892X": "rx455:tx450", - "lane_to_serdes_map_fabric_lane484.BCM8892X": "rx460:tx459", - "lane_to_serdes_map_fabric_lane485.BCM8892X": "rx461:tx456", + "lane_to_serdes_map_fabric_lane484.BCM8892X": "rx456:tx463", + "lane_to_serdes_map_fabric_lane485.BCM8892X": "rx457:tx460", "lane_to_serdes_map_fabric_lane486.BCM8892X": "rx462:tx457", "lane_to_serdes_map_fabric_lane487.BCM8892X": "rx463:tx458", "lane_to_serdes_map_fabric_lane488.BCM8892X": "rx464:tx468", "lane_to_serdes_map_fabric_lane489.BCM8892X": "rx465:tx469", "lane_to_serdes_map_fabric_lane49.BCM8892X": "rx97:tx100", - "lane_to_serdes_map_fabric_lane490.BCM8892X": "rx466:tx470", - "lane_to_serdes_map_fabric_lane491.BCM8892X": "rx467:tx471", + "lane_to_serdes_map_fabric_lane490.BCM8892X": "rx470:tx466", + "lane_to_serdes_map_fabric_lane491.BCM8892X": "rx471:tx467", "lane_to_serdes_map_fabric_lane492.BCM8892X": "rx476:tx476", "lane_to_serdes_map_fabric_lane493.BCM8892X": "rx477:tx477", - "lane_to_serdes_map_fabric_lane494.BCM8892X": "rx478:tx478", - "lane_to_serdes_map_fabric_lane495.BCM8892X": "rx479:tx479", - "lane_to_serdes_map_fabric_lane496.BCM8892X": "rx484:tx485", - "lane_to_serdes_map_fabric_lane497.BCM8892X": "rx485:tx484", - "lane_to_serdes_map_fabric_lane498.BCM8892X": "rx482:tx483", - "lane_to_serdes_map_fabric_lane499.BCM8892X": "rx483:tx482", + "lane_to_serdes_map_fabric_lane494.BCM8892X": "rx474:tx474", + "lane_to_serdes_map_fabric_lane495.BCM8892X": "rx475:tx475", + "lane_to_serdes_map_fabric_lane496.BCM8892X": "rx480:tx481", + "lane_to_serdes_map_fabric_lane497.BCM8892X": "rx481:tx480", + "lane_to_serdes_map_fabric_lane498.BCM8892X": "rx486:tx487", + "lane_to_serdes_map_fabric_lane499.BCM8892X": "rx487:tx486", "lane_to_serdes_map_fabric_lane5.BCM8892X": "rx9:tx8", - "lane_to_serdes_map_fabric_lane50.BCM8892X": "rx98:tx101", - "lane_to_serdes_map_fabric_lane500.BCM8892X": "rx488:tx489", - "lane_to_serdes_map_fabric_lane501.BCM8892X": "rx489:tx488", - "lane_to_serdes_map_fabric_lane502.BCM8892X": "rx494:tx495", - "lane_to_serdes_map_fabric_lane503.BCM8892X": "rx495:tx494", - "lane_to_serdes_map_fabric_lane504.BCM8892X": "rx500:tx500", - "lane_to_serdes_map_fabric_lane505.BCM8892X": "rx501:tx501", - "lane_to_serdes_map_fabric_lane506.BCM8892X": "rx498:tx498", - "lane_to_serdes_map_fabric_lane507.BCM8892X": "rx499:tx499", - "lane_to_serdes_map_fabric_lane508.BCM8892X": "rx504:tx504", - "lane_to_serdes_map_fabric_lane509.BCM8892X": "rx505:tx505", - "lane_to_serdes_map_fabric_lane51.BCM8892X": "rx99:tx102", - "lane_to_serdes_map_fabric_lane510.BCM8892X": "rx510:tx510", - "lane_to_serdes_map_fabric_lane511.BCM8892X": "rx511:tx511", + "lane_to_serdes_map_fabric_lane50.BCM8892X": "rx102:tx97", + "lane_to_serdes_map_fabric_lane500.BCM8892X": "rx492:tx493", + "lane_to_serdes_map_fabric_lane501.BCM8892X": "rx493:tx492", + "lane_to_serdes_map_fabric_lane502.BCM8892X": "rx490:tx491", + "lane_to_serdes_map_fabric_lane503.BCM8892X": "rx491:tx490", + "lane_to_serdes_map_fabric_lane504.BCM8892X": "rx496:tx496", + "lane_to_serdes_map_fabric_lane505.BCM8892X": "rx497:tx497", + "lane_to_serdes_map_fabric_lane506.BCM8892X": "rx502:tx502", + "lane_to_serdes_map_fabric_lane507.BCM8892X": "rx503:tx503", + "lane_to_serdes_map_fabric_lane508.BCM8892X": "rx508:tx508", + "lane_to_serdes_map_fabric_lane509.BCM8892X": "rx509:tx509", + "lane_to_serdes_map_fabric_lane51.BCM8892X": "rx103:tx98", + "lane_to_serdes_map_fabric_lane510.BCM8892X": "rx506:tx506", + "lane_to_serdes_map_fabric_lane511.BCM8892X": "rx507:tx507", "lane_to_serdes_map_fabric_lane52.BCM8892X": "rx104:tx111", "lane_to_serdes_map_fabric_lane53.BCM8892X": "rx105:tx108", - "lane_to_serdes_map_fabric_lane54.BCM8892X": "rx106:tx109", - "lane_to_serdes_map_fabric_lane55.BCM8892X": "rx107:tx110", + "lane_to_serdes_map_fabric_lane54.BCM8892X": "rx110:tx105", + "lane_to_serdes_map_fabric_lane55.BCM8892X": "rx111:tx106", "lane_to_serdes_map_fabric_lane56.BCM8892X": "rx112:tx116", "lane_to_serdes_map_fabric_lane57.BCM8892X": "rx113:tx117", - "lane_to_serdes_map_fabric_lane58.BCM8892X": "rx114:tx118", - "lane_to_serdes_map_fabric_lane59.BCM8892X": "rx115:tx119", + "lane_to_serdes_map_fabric_lane58.BCM8892X": "rx118:tx114", + "lane_to_serdes_map_fabric_lane59.BCM8892X": "rx119:tx115", "lane_to_serdes_map_fabric_lane6.BCM8892X": "rx14:tx15", "lane_to_serdes_map_fabric_lane60.BCM8892X": "rx120:tx124", "lane_to_serdes_map_fabric_lane61.BCM8892X": "rx121:tx125", - "lane_to_serdes_map_fabric_lane62.BCM8892X": "rx122:tx126", - "lane_to_serdes_map_fabric_lane63.BCM8892X": "rx123:tx127", - "lane_to_serdes_map_fabric_lane64.BCM8892X": "rx128:tx135", - "lane_to_serdes_map_fabric_lane65.BCM8892X": "rx129:tx132", + "lane_to_serdes_map_fabric_lane62.BCM8892X": "rx126:tx122", + "lane_to_serdes_map_fabric_lane63.BCM8892X": "rx127:tx123", + "lane_to_serdes_map_fabric_lane64.BCM8892X": "rx132:tx131", + "lane_to_serdes_map_fabric_lane65.BCM8892X": "rx133:tx128", "lane_to_serdes_map_fabric_lane66.BCM8892X": "rx130:tx133", "lane_to_serdes_map_fabric_lane67.BCM8892X": "rx131:tx134", - "lane_to_serdes_map_fabric_lane68.BCM8892X": "rx136:tx143", - "lane_to_serdes_map_fabric_lane69.BCM8892X": "rx137:tx140", + "lane_to_serdes_map_fabric_lane68.BCM8892X": "rx140:tx139", + "lane_to_serdes_map_fabric_lane69.BCM8892X": "rx141:tx136", "lane_to_serdes_map_fabric_lane7.BCM8892X": "rx15:tx14", "lane_to_serdes_map_fabric_lane70.BCM8892X": "rx138:tx141", "lane_to_serdes_map_fabric_lane71.BCM8892X": "rx139:tx142", - "lane_to_serdes_map_fabric_lane72.BCM8892X": "rx144:tx148", - "lane_to_serdes_map_fabric_lane73.BCM8892X": "rx145:tx149", + "lane_to_serdes_map_fabric_lane72.BCM8892X": "rx148:tx144", + "lane_to_serdes_map_fabric_lane73.BCM8892X": "rx149:tx145", "lane_to_serdes_map_fabric_lane74.BCM8892X": "rx146:tx150", "lane_to_serdes_map_fabric_lane75.BCM8892X": "rx147:tx151", - "lane_to_serdes_map_fabric_lane76.BCM8892X": "rx152:tx156", - "lane_to_serdes_map_fabric_lane77.BCM8892X": "rx153:tx157", + "lane_to_serdes_map_fabric_lane76.BCM8892X": "rx156:tx152", + "lane_to_serdes_map_fabric_lane77.BCM8892X": "rx157:tx153", "lane_to_serdes_map_fabric_lane78.BCM8892X": "rx154:tx158", "lane_to_serdes_map_fabric_lane79.BCM8892X": "rx155:tx159", "lane_to_serdes_map_fabric_lane8.BCM8892X": "rx20:tx20", - "lane_to_serdes_map_fabric_lane80.BCM8892X": "rx160:tx167", - "lane_to_serdes_map_fabric_lane81.BCM8892X": "rx161:tx164", + "lane_to_serdes_map_fabric_lane80.BCM8892X": "rx164:tx163", + "lane_to_serdes_map_fabric_lane81.BCM8892X": "rx165:tx160", "lane_to_serdes_map_fabric_lane82.BCM8892X": "rx162:tx165", "lane_to_serdes_map_fabric_lane83.BCM8892X": "rx163:tx166", - "lane_to_serdes_map_fabric_lane84.BCM8892X": "rx168:tx175", - "lane_to_serdes_map_fabric_lane85.BCM8892X": "rx169:tx172", + "lane_to_serdes_map_fabric_lane84.BCM8892X": "rx172:tx171", + "lane_to_serdes_map_fabric_lane85.BCM8892X": "rx173:tx168", "lane_to_serdes_map_fabric_lane86.BCM8892X": "rx170:tx173", "lane_to_serdes_map_fabric_lane87.BCM8892X": "rx171:tx174", - "lane_to_serdes_map_fabric_lane88.BCM8892X": "rx176:tx180", - "lane_to_serdes_map_fabric_lane89.BCM8892X": "rx177:tx181", + "lane_to_serdes_map_fabric_lane88.BCM8892X": "rx180:tx176", + "lane_to_serdes_map_fabric_lane89.BCM8892X": "rx181:tx177", "lane_to_serdes_map_fabric_lane9.BCM8892X": "rx21:tx21", "lane_to_serdes_map_fabric_lane90.BCM8892X": "rx178:tx182", "lane_to_serdes_map_fabric_lane91.BCM8892X": "rx179:tx183", - "lane_to_serdes_map_fabric_lane92.BCM8892X": "rx184:tx188", - "lane_to_serdes_map_fabric_lane93.BCM8892X": "rx185:tx189", + "lane_to_serdes_map_fabric_lane92.BCM8892X": "rx188:tx184", + "lane_to_serdes_map_fabric_lane93.BCM8892X": "rx189:tx185", "lane_to_serdes_map_fabric_lane94.BCM8892X": "rx186:tx190", "lane_to_serdes_map_fabric_lane95.BCM8892X": "rx187:tx191", - "lane_to_serdes_map_fabric_lane96.BCM8892X": "rx192:tx199", - "lane_to_serdes_map_fabric_lane97.BCM8892X": "rx193:tx196", + "lane_to_serdes_map_fabric_lane96.BCM8892X": "rx196:tx195", + "lane_to_serdes_map_fabric_lane97.BCM8892X": "rx197:tx192", "lane_to_serdes_map_fabric_lane98.BCM8892X": "rx194:tx197", "lane_to_serdes_map_fabric_lane99.BCM8892X": "rx195:tx198", "phy_rx_polarity_flip_fabric0.BCM8892X": "1", "phy_rx_polarity_flip_fabric1.BCM8892X": "0", "phy_rx_polarity_flip_fabric10.BCM8892X": "1", "phy_rx_polarity_flip_fabric100.BCM8892X": "1", - "phy_rx_polarity_flip_fabric101.BCM8892X": "1", + "phy_rx_polarity_flip_fabric101.BCM8892X": "0", "phy_rx_polarity_flip_fabric102.BCM8892X": "1", "phy_rx_polarity_flip_fabric103.BCM8892X": "0", "phy_rx_polarity_flip_fabric104.BCM8892X": "1", - "phy_rx_polarity_flip_fabric105.BCM8892X": "1", + "phy_rx_polarity_flip_fabric105.BCM8892X": "0", "phy_rx_polarity_flip_fabric106.BCM8892X": "1", "phy_rx_polarity_flip_fabric107.BCM8892X": "0", - "phy_rx_polarity_flip_fabric108.BCM8892X": "1", - "phy_rx_polarity_flip_fabric109.BCM8892X": "1", + "phy_rx_polarity_flip_fabric108.BCM8892X": "0", + "phy_rx_polarity_flip_fabric109.BCM8892X": "0", "phy_rx_polarity_flip_fabric11.BCM8892X": "1", "phy_rx_polarity_flip_fabric110.BCM8892X": "0", "phy_rx_polarity_flip_fabric111.BCM8892X": "1", @@ -769,51 +774,51 @@ "phy_rx_polarity_flip_fabric148.BCM8892X": "0", "phy_rx_polarity_flip_fabric149.BCM8892X": "0", "phy_rx_polarity_flip_fabric15.BCM8892X": "1", - "phy_rx_polarity_flip_fabric150.BCM8892X": "0", + "phy_rx_polarity_flip_fabric150.BCM8892X": "1", "phy_rx_polarity_flip_fabric151.BCM8892X": "1", "phy_rx_polarity_flip_fabric152.BCM8892X": "0", "phy_rx_polarity_flip_fabric153.BCM8892X": "0", - "phy_rx_polarity_flip_fabric154.BCM8892X": "0", + "phy_rx_polarity_flip_fabric154.BCM8892X": "1", "phy_rx_polarity_flip_fabric155.BCM8892X": "1", "phy_rx_polarity_flip_fabric156.BCM8892X": "0", "phy_rx_polarity_flip_fabric157.BCM8892X": "0", - "phy_rx_polarity_flip_fabric158.BCM8892X": "0", + "phy_rx_polarity_flip_fabric158.BCM8892X": "1", "phy_rx_polarity_flip_fabric159.BCM8892X": "1", "phy_rx_polarity_flip_fabric16.BCM8892X": "1", "phy_rx_polarity_flip_fabric160.BCM8892X": "0", "phy_rx_polarity_flip_fabric161.BCM8892X": "0", - "phy_rx_polarity_flip_fabric162.BCM8892X": "0", + "phy_rx_polarity_flip_fabric162.BCM8892X": "1", "phy_rx_polarity_flip_fabric163.BCM8892X": "1", "phy_rx_polarity_flip_fabric164.BCM8892X": "0", "phy_rx_polarity_flip_fabric165.BCM8892X": "0", - "phy_rx_polarity_flip_fabric166.BCM8892X": "0", + "phy_rx_polarity_flip_fabric166.BCM8892X": "1", "phy_rx_polarity_flip_fabric167.BCM8892X": "1", "phy_rx_polarity_flip_fabric168.BCM8892X": "0", "phy_rx_polarity_flip_fabric169.BCM8892X": "0", "phy_rx_polarity_flip_fabric17.BCM8892X": "1", - "phy_rx_polarity_flip_fabric170.BCM8892X": "0", + "phy_rx_polarity_flip_fabric170.BCM8892X": "1", "phy_rx_polarity_flip_fabric171.BCM8892X": "1", "phy_rx_polarity_flip_fabric172.BCM8892X": "0", "phy_rx_polarity_flip_fabric173.BCM8892X": "0", - "phy_rx_polarity_flip_fabric174.BCM8892X": "0", + "phy_rx_polarity_flip_fabric174.BCM8892X": "1", "phy_rx_polarity_flip_fabric175.BCM8892X": "1", "phy_rx_polarity_flip_fabric176.BCM8892X": "0", "phy_rx_polarity_flip_fabric177.BCM8892X": "0", - "phy_rx_polarity_flip_fabric178.BCM8892X": "0", + "phy_rx_polarity_flip_fabric178.BCM8892X": "1", "phy_rx_polarity_flip_fabric179.BCM8892X": "1", "phy_rx_polarity_flip_fabric18.BCM8892X": "1", "phy_rx_polarity_flip_fabric180.BCM8892X": "0", "phy_rx_polarity_flip_fabric181.BCM8892X": "0", - "phy_rx_polarity_flip_fabric182.BCM8892X": "0", + "phy_rx_polarity_flip_fabric182.BCM8892X": "1", "phy_rx_polarity_flip_fabric183.BCM8892X": "1", "phy_rx_polarity_flip_fabric184.BCM8892X": "0", "phy_rx_polarity_flip_fabric185.BCM8892X": "0", - "phy_rx_polarity_flip_fabric186.BCM8892X": "0", + "phy_rx_polarity_flip_fabric186.BCM8892X": "1", "phy_rx_polarity_flip_fabric187.BCM8892X": "1", "phy_rx_polarity_flip_fabric188.BCM8892X": "0", "phy_rx_polarity_flip_fabric189.BCM8892X": "0", "phy_rx_polarity_flip_fabric19.BCM8892X": "0", - "phy_rx_polarity_flip_fabric190.BCM8892X": "0", + "phy_rx_polarity_flip_fabric190.BCM8892X": "1", "phy_rx_polarity_flip_fabric191.BCM8892X": "1", "phy_rx_polarity_flip_fabric192.BCM8892X": "0", "phy_rx_polarity_flip_fabric193.BCM8892X": "0", @@ -846,7 +851,7 @@ "phy_rx_polarity_flip_fabric217.BCM8892X": "0", "phy_rx_polarity_flip_fabric218.BCM8892X": "1", "phy_rx_polarity_flip_fabric219.BCM8892X": "1", - "phy_rx_polarity_flip_fabric22.BCM8892X": "0", + "phy_rx_polarity_flip_fabric22.BCM8892X": "1", "phy_rx_polarity_flip_fabric220.BCM8892X": "0", "phy_rx_polarity_flip_fabric221.BCM8892X": "0", "phy_rx_polarity_flip_fabric222.BCM8892X": "1", @@ -857,13 +862,13 @@ "phy_rx_polarity_flip_fabric227.BCM8892X": "1", "phy_rx_polarity_flip_fabric228.BCM8892X": "0", "phy_rx_polarity_flip_fabric229.BCM8892X": "0", - "phy_rx_polarity_flip_fabric23.BCM8892X": "0", + "phy_rx_polarity_flip_fabric23.BCM8892X": "1", "phy_rx_polarity_flip_fabric230.BCM8892X": "1", "phy_rx_polarity_flip_fabric231.BCM8892X": "1", "phy_rx_polarity_flip_fabric232.BCM8892X": "0", "phy_rx_polarity_flip_fabric233.BCM8892X": "0", - "phy_rx_polarity_flip_fabric234.BCM8892X": "0", - "phy_rx_polarity_flip_fabric235.BCM8892X": "0", + "phy_rx_polarity_flip_fabric234.BCM8892X": "1", + "phy_rx_polarity_flip_fabric235.BCM8892X": "1", "phy_rx_polarity_flip_fabric236.BCM8892X": "0", "phy_rx_polarity_flip_fabric237.BCM8892X": "1", "phy_rx_polarity_flip_fabric238.BCM8892X": "0", @@ -882,7 +887,7 @@ "phy_rx_polarity_flip_fabric25.BCM8892X": "1", "phy_rx_polarity_flip_fabric250.BCM8892X": "1", "phy_rx_polarity_flip_fabric251.BCM8892X": "0", - "phy_rx_polarity_flip_fabric252.BCM8892X": "0", + "phy_rx_polarity_flip_fabric252.BCM8892X": "1", "phy_rx_polarity_flip_fabric253.BCM8892X": "1", "phy_rx_polarity_flip_fabric254.BCM8892X": "0", "phy_rx_polarity_flip_fabric255.BCM8892X": "0", @@ -890,7 +895,7 @@ "phy_rx_polarity_flip_fabric257.BCM8892X": "0", "phy_rx_polarity_flip_fabric258.BCM8892X": "1", "phy_rx_polarity_flip_fabric259.BCM8892X": "1", - "phy_rx_polarity_flip_fabric26.BCM8892X": "0", + "phy_rx_polarity_flip_fabric26.BCM8892X": "1", "phy_rx_polarity_flip_fabric260.BCM8892X": "0", "phy_rx_polarity_flip_fabric261.BCM8892X": "1", "phy_rx_polarity_flip_fabric262.BCM8892X": "0", @@ -901,7 +906,7 @@ "phy_rx_polarity_flip_fabric267.BCM8892X": "1", "phy_rx_polarity_flip_fabric268.BCM8892X": "0", "phy_rx_polarity_flip_fabric269.BCM8892X": "1", - "phy_rx_polarity_flip_fabric27.BCM8892X": "0", + "phy_rx_polarity_flip_fabric27.BCM8892X": "1", "phy_rx_polarity_flip_fabric270.BCM8892X": "0", "phy_rx_polarity_flip_fabric271.BCM8892X": "1", "phy_rx_polarity_flip_fabric272.BCM8892X": "1", @@ -910,104 +915,104 @@ "phy_rx_polarity_flip_fabric275.BCM8892X": "0", "phy_rx_polarity_flip_fabric276.BCM8892X": "1", "phy_rx_polarity_flip_fabric277.BCM8892X": "1", - "phy_rx_polarity_flip_fabric278.BCM8892X": "1", - "phy_rx_polarity_flip_fabric279.BCM8892X": "1", + "phy_rx_polarity_flip_fabric278.BCM8892X": "0", + "phy_rx_polarity_flip_fabric279.BCM8892X": "0", "phy_rx_polarity_flip_fabric28.BCM8892X": "1", "phy_rx_polarity_flip_fabric280.BCM8892X": "1", "phy_rx_polarity_flip_fabric281.BCM8892X": "1", - "phy_rx_polarity_flip_fabric282.BCM8892X": "1", - "phy_rx_polarity_flip_fabric283.BCM8892X": "1", + "phy_rx_polarity_flip_fabric282.BCM8892X": "0", + "phy_rx_polarity_flip_fabric283.BCM8892X": "0", "phy_rx_polarity_flip_fabric284.BCM8892X": "1", "phy_rx_polarity_flip_fabric285.BCM8892X": "1", - "phy_rx_polarity_flip_fabric286.BCM8892X": "1", - "phy_rx_polarity_flip_fabric287.BCM8892X": "1", + "phy_rx_polarity_flip_fabric286.BCM8892X": "0", + "phy_rx_polarity_flip_fabric287.BCM8892X": "0", "phy_rx_polarity_flip_fabric288.BCM8892X": "1", "phy_rx_polarity_flip_fabric289.BCM8892X": "1", "phy_rx_polarity_flip_fabric29.BCM8892X": "1", - "phy_rx_polarity_flip_fabric290.BCM8892X": "1", - "phy_rx_polarity_flip_fabric291.BCM8892X": "1", + "phy_rx_polarity_flip_fabric290.BCM8892X": "0", + "phy_rx_polarity_flip_fabric291.BCM8892X": "0", "phy_rx_polarity_flip_fabric292.BCM8892X": "1", "phy_rx_polarity_flip_fabric293.BCM8892X": "1", - "phy_rx_polarity_flip_fabric294.BCM8892X": "1", - "phy_rx_polarity_flip_fabric295.BCM8892X": "1", + "phy_rx_polarity_flip_fabric294.BCM8892X": "0", + "phy_rx_polarity_flip_fabric295.BCM8892X": "0", "phy_rx_polarity_flip_fabric296.BCM8892X": "1", "phy_rx_polarity_flip_fabric297.BCM8892X": "1", - "phy_rx_polarity_flip_fabric298.BCM8892X": "1", - "phy_rx_polarity_flip_fabric299.BCM8892X": "1", + "phy_rx_polarity_flip_fabric298.BCM8892X": "0", + "phy_rx_polarity_flip_fabric299.BCM8892X": "0", "phy_rx_polarity_flip_fabric3.BCM8892X": "1", - "phy_rx_polarity_flip_fabric30.BCM8892X": "0", + "phy_rx_polarity_flip_fabric30.BCM8892X": "1", "phy_rx_polarity_flip_fabric300.BCM8892X": "1", "phy_rx_polarity_flip_fabric301.BCM8892X": "1", - "phy_rx_polarity_flip_fabric302.BCM8892X": "1", - "phy_rx_polarity_flip_fabric303.BCM8892X": "1", + "phy_rx_polarity_flip_fabric302.BCM8892X": "0", + "phy_rx_polarity_flip_fabric303.BCM8892X": "0", "phy_rx_polarity_flip_fabric304.BCM8892X": "1", "phy_rx_polarity_flip_fabric305.BCM8892X": "1", - "phy_rx_polarity_flip_fabric306.BCM8892X": "1", - "phy_rx_polarity_flip_fabric307.BCM8892X": "1", + "phy_rx_polarity_flip_fabric306.BCM8892X": "0", + "phy_rx_polarity_flip_fabric307.BCM8892X": "0", "phy_rx_polarity_flip_fabric308.BCM8892X": "1", "phy_rx_polarity_flip_fabric309.BCM8892X": "1", - "phy_rx_polarity_flip_fabric31.BCM8892X": "0", - "phy_rx_polarity_flip_fabric310.BCM8892X": "1", - "phy_rx_polarity_flip_fabric311.BCM8892X": "1", + "phy_rx_polarity_flip_fabric31.BCM8892X": "1", + "phy_rx_polarity_flip_fabric310.BCM8892X": "0", + "phy_rx_polarity_flip_fabric311.BCM8892X": "0", "phy_rx_polarity_flip_fabric312.BCM8892X": "1", "phy_rx_polarity_flip_fabric313.BCM8892X": "1", - "phy_rx_polarity_flip_fabric314.BCM8892X": "1", - "phy_rx_polarity_flip_fabric315.BCM8892X": "1", + "phy_rx_polarity_flip_fabric314.BCM8892X": "0", + "phy_rx_polarity_flip_fabric315.BCM8892X": "0", "phy_rx_polarity_flip_fabric316.BCM8892X": "1", "phy_rx_polarity_flip_fabric317.BCM8892X": "1", - "phy_rx_polarity_flip_fabric318.BCM8892X": "1", - "phy_rx_polarity_flip_fabric319.BCM8892X": "1", + "phy_rx_polarity_flip_fabric318.BCM8892X": "0", + "phy_rx_polarity_flip_fabric319.BCM8892X": "0", "phy_rx_polarity_flip_fabric32.BCM8892X": "1", "phy_rx_polarity_flip_fabric320.BCM8892X": "1", - "phy_rx_polarity_flip_fabric321.BCM8892X": "0", + "phy_rx_polarity_flip_fabric321.BCM8892X": "1", "phy_rx_polarity_flip_fabric322.BCM8892X": "0", "phy_rx_polarity_flip_fabric323.BCM8892X": "0", "phy_rx_polarity_flip_fabric324.BCM8892X": "1", - "phy_rx_polarity_flip_fabric325.BCM8892X": "0", + "phy_rx_polarity_flip_fabric325.BCM8892X": "1", "phy_rx_polarity_flip_fabric326.BCM8892X": "0", "phy_rx_polarity_flip_fabric327.BCM8892X": "0", "phy_rx_polarity_flip_fabric328.BCM8892X": "1", - "phy_rx_polarity_flip_fabric329.BCM8892X": "0", + "phy_rx_polarity_flip_fabric329.BCM8892X": "1", "phy_rx_polarity_flip_fabric33.BCM8892X": "1", "phy_rx_polarity_flip_fabric330.BCM8892X": "0", "phy_rx_polarity_flip_fabric331.BCM8892X": "0", "phy_rx_polarity_flip_fabric332.BCM8892X": "1", - "phy_rx_polarity_flip_fabric333.BCM8892X": "0", + "phy_rx_polarity_flip_fabric333.BCM8892X": "1", "phy_rx_polarity_flip_fabric334.BCM8892X": "0", "phy_rx_polarity_flip_fabric335.BCM8892X": "0", "phy_rx_polarity_flip_fabric336.BCM8892X": "1", - "phy_rx_polarity_flip_fabric337.BCM8892X": "0", + "phy_rx_polarity_flip_fabric337.BCM8892X": "1", "phy_rx_polarity_flip_fabric338.BCM8892X": "0", "phy_rx_polarity_flip_fabric339.BCM8892X": "0", - "phy_rx_polarity_flip_fabric34.BCM8892X": "0", + "phy_rx_polarity_flip_fabric34.BCM8892X": "1", "phy_rx_polarity_flip_fabric340.BCM8892X": "1", - "phy_rx_polarity_flip_fabric341.BCM8892X": "0", + "phy_rx_polarity_flip_fabric341.BCM8892X": "1", "phy_rx_polarity_flip_fabric342.BCM8892X": "0", "phy_rx_polarity_flip_fabric343.BCM8892X": "0", "phy_rx_polarity_flip_fabric344.BCM8892X": "1", - "phy_rx_polarity_flip_fabric345.BCM8892X": "0", + "phy_rx_polarity_flip_fabric345.BCM8892X": "1", "phy_rx_polarity_flip_fabric346.BCM8892X": "0", "phy_rx_polarity_flip_fabric347.BCM8892X": "0", "phy_rx_polarity_flip_fabric348.BCM8892X": "1", - "phy_rx_polarity_flip_fabric349.BCM8892X": "0", - "phy_rx_polarity_flip_fabric35.BCM8892X": "0", + "phy_rx_polarity_flip_fabric349.BCM8892X": "1", + "phy_rx_polarity_flip_fabric35.BCM8892X": "1", "phy_rx_polarity_flip_fabric350.BCM8892X": "0", "phy_rx_polarity_flip_fabric351.BCM8892X": "0", "phy_rx_polarity_flip_fabric352.BCM8892X": "1", - "phy_rx_polarity_flip_fabric353.BCM8892X": "0", + "phy_rx_polarity_flip_fabric353.BCM8892X": "1", "phy_rx_polarity_flip_fabric354.BCM8892X": "0", "phy_rx_polarity_flip_fabric355.BCM8892X": "0", "phy_rx_polarity_flip_fabric356.BCM8892X": "1", - "phy_rx_polarity_flip_fabric357.BCM8892X": "0", + "phy_rx_polarity_flip_fabric357.BCM8892X": "1", "phy_rx_polarity_flip_fabric358.BCM8892X": "0", "phy_rx_polarity_flip_fabric359.BCM8892X": "0", "phy_rx_polarity_flip_fabric36.BCM8892X": "1", "phy_rx_polarity_flip_fabric360.BCM8892X": "1", - "phy_rx_polarity_flip_fabric361.BCM8892X": "0", + "phy_rx_polarity_flip_fabric361.BCM8892X": "1", "phy_rx_polarity_flip_fabric362.BCM8892X": "0", "phy_rx_polarity_flip_fabric363.BCM8892X": "0", - "phy_rx_polarity_flip_fabric364.BCM8892X": "0", - "phy_rx_polarity_flip_fabric365.BCM8892X": "0", + "phy_rx_polarity_flip_fabric364.BCM8892X": "1", + "phy_rx_polarity_flip_fabric365.BCM8892X": "1", "phy_rx_polarity_flip_fabric366.BCM8892X": "0", "phy_rx_polarity_flip_fabric367.BCM8892X": "1", "phy_rx_polarity_flip_fabric368.BCM8892X": "0", @@ -1023,7 +1028,7 @@ "phy_rx_polarity_flip_fabric377.BCM8892X": "0", "phy_rx_polarity_flip_fabric378.BCM8892X": "0", "phy_rx_polarity_flip_fabric379.BCM8892X": "1", - "phy_rx_polarity_flip_fabric38.BCM8892X": "0", + "phy_rx_polarity_flip_fabric38.BCM8892X": "1", "phy_rx_polarity_flip_fabric380.BCM8892X": "0", "phy_rx_polarity_flip_fabric381.BCM8892X": "1", "phy_rx_polarity_flip_fabric382.BCM8892X": "1", @@ -1034,7 +1039,7 @@ "phy_rx_polarity_flip_fabric387.BCM8892X": "1", "phy_rx_polarity_flip_fabric388.BCM8892X": "1", "phy_rx_polarity_flip_fabric389.BCM8892X": "1", - "phy_rx_polarity_flip_fabric39.BCM8892X": "0", + "phy_rx_polarity_flip_fabric39.BCM8892X": "1", "phy_rx_polarity_flip_fabric390.BCM8892X": "1", "phy_rx_polarity_flip_fabric391.BCM8892X": "0", "phy_rx_polarity_flip_fabric392.BCM8892X": "1", @@ -1053,51 +1058,51 @@ "phy_rx_polarity_flip_fabric403.BCM8892X": "0", "phy_rx_polarity_flip_fabric404.BCM8892X": "0", "phy_rx_polarity_flip_fabric405.BCM8892X": "1", - "phy_rx_polarity_flip_fabric406.BCM8892X": "1", + "phy_rx_polarity_flip_fabric406.BCM8892X": "0", "phy_rx_polarity_flip_fabric407.BCM8892X": "1", "phy_rx_polarity_flip_fabric408.BCM8892X": "0", "phy_rx_polarity_flip_fabric409.BCM8892X": "1", "phy_rx_polarity_flip_fabric41.BCM8892X": "1", - "phy_rx_polarity_flip_fabric410.BCM8892X": "1", + "phy_rx_polarity_flip_fabric410.BCM8892X": "0", "phy_rx_polarity_flip_fabric411.BCM8892X": "1", "phy_rx_polarity_flip_fabric412.BCM8892X": "0", "phy_rx_polarity_flip_fabric413.BCM8892X": "1", - "phy_rx_polarity_flip_fabric414.BCM8892X": "1", + "phy_rx_polarity_flip_fabric414.BCM8892X": "0", "phy_rx_polarity_flip_fabric415.BCM8892X": "1", "phy_rx_polarity_flip_fabric416.BCM8892X": "0", "phy_rx_polarity_flip_fabric417.BCM8892X": "1", - "phy_rx_polarity_flip_fabric418.BCM8892X": "1", + "phy_rx_polarity_flip_fabric418.BCM8892X": "0", "phy_rx_polarity_flip_fabric419.BCM8892X": "1", - "phy_rx_polarity_flip_fabric42.BCM8892X": "0", + "phy_rx_polarity_flip_fabric42.BCM8892X": "1", "phy_rx_polarity_flip_fabric420.BCM8892X": "0", "phy_rx_polarity_flip_fabric421.BCM8892X": "1", - "phy_rx_polarity_flip_fabric422.BCM8892X": "1", + "phy_rx_polarity_flip_fabric422.BCM8892X": "0", "phy_rx_polarity_flip_fabric423.BCM8892X": "1", "phy_rx_polarity_flip_fabric424.BCM8892X": "0", "phy_rx_polarity_flip_fabric425.BCM8892X": "1", - "phy_rx_polarity_flip_fabric426.BCM8892X": "1", + "phy_rx_polarity_flip_fabric426.BCM8892X": "0", "phy_rx_polarity_flip_fabric427.BCM8892X": "1", "phy_rx_polarity_flip_fabric428.BCM8892X": "0", "phy_rx_polarity_flip_fabric429.BCM8892X": "1", - "phy_rx_polarity_flip_fabric43.BCM8892X": "0", - "phy_rx_polarity_flip_fabric430.BCM8892X": "1", + "phy_rx_polarity_flip_fabric43.BCM8892X": "1", + "phy_rx_polarity_flip_fabric430.BCM8892X": "0", "phy_rx_polarity_flip_fabric431.BCM8892X": "1", "phy_rx_polarity_flip_fabric432.BCM8892X": "0", "phy_rx_polarity_flip_fabric433.BCM8892X": "1", - "phy_rx_polarity_flip_fabric434.BCM8892X": "1", + "phy_rx_polarity_flip_fabric434.BCM8892X": "0", "phy_rx_polarity_flip_fabric435.BCM8892X": "1", "phy_rx_polarity_flip_fabric436.BCM8892X": "0", "phy_rx_polarity_flip_fabric437.BCM8892X": "1", - "phy_rx_polarity_flip_fabric438.BCM8892X": "1", + "phy_rx_polarity_flip_fabric438.BCM8892X": "0", "phy_rx_polarity_flip_fabric439.BCM8892X": "1", "phy_rx_polarity_flip_fabric44.BCM8892X": "1", "phy_rx_polarity_flip_fabric440.BCM8892X": "0", "phy_rx_polarity_flip_fabric441.BCM8892X": "1", - "phy_rx_polarity_flip_fabric442.BCM8892X": "1", + "phy_rx_polarity_flip_fabric442.BCM8892X": "0", "phy_rx_polarity_flip_fabric443.BCM8892X": "1", "phy_rx_polarity_flip_fabric444.BCM8892X": "0", "phy_rx_polarity_flip_fabric445.BCM8892X": "1", - "phy_rx_polarity_flip_fabric446.BCM8892X": "1", + "phy_rx_polarity_flip_fabric446.BCM8892X": "0", "phy_rx_polarity_flip_fabric447.BCM8892X": "1", "phy_rx_polarity_flip_fabric448.BCM8892X": "0", "phy_rx_polarity_flip_fabric449.BCM8892X": "0", @@ -1112,7 +1117,7 @@ "phy_rx_polarity_flip_fabric457.BCM8892X": "0", "phy_rx_polarity_flip_fabric458.BCM8892X": "0", "phy_rx_polarity_flip_fabric459.BCM8892X": "0", - "phy_rx_polarity_flip_fabric46.BCM8892X": "0", + "phy_rx_polarity_flip_fabric46.BCM8892X": "1", "phy_rx_polarity_flip_fabric460.BCM8892X": "0", "phy_rx_polarity_flip_fabric461.BCM8892X": "0", "phy_rx_polarity_flip_fabric462.BCM8892X": "0", @@ -1123,7 +1128,7 @@ "phy_rx_polarity_flip_fabric467.BCM8892X": "0", "phy_rx_polarity_flip_fabric468.BCM8892X": "0", "phy_rx_polarity_flip_fabric469.BCM8892X": "0", - "phy_rx_polarity_flip_fabric47.BCM8892X": "0", + "phy_rx_polarity_flip_fabric47.BCM8892X": "1", "phy_rx_polarity_flip_fabric470.BCM8892X": "0", "phy_rx_polarity_flip_fabric471.BCM8892X": "0", "phy_rx_polarity_flip_fabric472.BCM8892X": "0", @@ -1146,8 +1151,8 @@ "phy_rx_polarity_flip_fabric488.BCM8892X": "0", "phy_rx_polarity_flip_fabric489.BCM8892X": "0", "phy_rx_polarity_flip_fabric49.BCM8892X": "1", - "phy_rx_polarity_flip_fabric490.BCM8892X": "1", - "phy_rx_polarity_flip_fabric491.BCM8892X": "1", + "phy_rx_polarity_flip_fabric490.BCM8892X": "0", + "phy_rx_polarity_flip_fabric491.BCM8892X": "0", "phy_rx_polarity_flip_fabric492.BCM8892X": "0", "phy_rx_polarity_flip_fabric493.BCM8892X": "0", "phy_rx_polarity_flip_fabric494.BCM8892X": "0", @@ -1157,7 +1162,7 @@ "phy_rx_polarity_flip_fabric498.BCM8892X": "1", "phy_rx_polarity_flip_fabric499.BCM8892X": "0", "phy_rx_polarity_flip_fabric5.BCM8892X": "1", - "phy_rx_polarity_flip_fabric50.BCM8892X": "0", + "phy_rx_polarity_flip_fabric50.BCM8892X": "1", "phy_rx_polarity_flip_fabric500.BCM8892X": "1", "phy_rx_polarity_flip_fabric501.BCM8892X": "1", "phy_rx_polarity_flip_fabric502.BCM8892X": "0", @@ -1166,75 +1171,75 @@ "phy_rx_polarity_flip_fabric505.BCM8892X": "0", "phy_rx_polarity_flip_fabric506.BCM8892X": "1", "phy_rx_polarity_flip_fabric507.BCM8892X": "0", - "phy_rx_polarity_flip_fabric508.BCM8892X": "1", + "phy_rx_polarity_flip_fabric508.BCM8892X": "0", "phy_rx_polarity_flip_fabric509.BCM8892X": "1", - "phy_rx_polarity_flip_fabric51.BCM8892X": "0", + "phy_rx_polarity_flip_fabric51.BCM8892X": "1", "phy_rx_polarity_flip_fabric510.BCM8892X": "0", "phy_rx_polarity_flip_fabric511.BCM8892X": "0", "phy_rx_polarity_flip_fabric52.BCM8892X": "1", "phy_rx_polarity_flip_fabric53.BCM8892X": "1", - "phy_rx_polarity_flip_fabric54.BCM8892X": "0", - "phy_rx_polarity_flip_fabric55.BCM8892X": "0", + "phy_rx_polarity_flip_fabric54.BCM8892X": "1", + "phy_rx_polarity_flip_fabric55.BCM8892X": "1", "phy_rx_polarity_flip_fabric56.BCM8892X": "1", "phy_rx_polarity_flip_fabric57.BCM8892X": "1", - "phy_rx_polarity_flip_fabric58.BCM8892X": "0", - "phy_rx_polarity_flip_fabric59.BCM8892X": "0", + "phy_rx_polarity_flip_fabric58.BCM8892X": "1", + "phy_rx_polarity_flip_fabric59.BCM8892X": "1", "phy_rx_polarity_flip_fabric6.BCM8892X": "0", "phy_rx_polarity_flip_fabric60.BCM8892X": "1", "phy_rx_polarity_flip_fabric61.BCM8892X": "1", - "phy_rx_polarity_flip_fabric62.BCM8892X": "0", - "phy_rx_polarity_flip_fabric63.BCM8892X": "0", + "phy_rx_polarity_flip_fabric62.BCM8892X": "1", + "phy_rx_polarity_flip_fabric63.BCM8892X": "1", "phy_rx_polarity_flip_fabric64.BCM8892X": "1", - "phy_rx_polarity_flip_fabric65.BCM8892X": "1", + "phy_rx_polarity_flip_fabric65.BCM8892X": "0", "phy_rx_polarity_flip_fabric66.BCM8892X": "1", "phy_rx_polarity_flip_fabric67.BCM8892X": "0", "phy_rx_polarity_flip_fabric68.BCM8892X": "1", - "phy_rx_polarity_flip_fabric69.BCM8892X": "1", + "phy_rx_polarity_flip_fabric69.BCM8892X": "0", "phy_rx_polarity_flip_fabric7.BCM8892X": "1", "phy_rx_polarity_flip_fabric70.BCM8892X": "1", "phy_rx_polarity_flip_fabric71.BCM8892X": "0", "phy_rx_polarity_flip_fabric72.BCM8892X": "1", - "phy_rx_polarity_flip_fabric73.BCM8892X": "1", + "phy_rx_polarity_flip_fabric73.BCM8892X": "0", "phy_rx_polarity_flip_fabric74.BCM8892X": "1", "phy_rx_polarity_flip_fabric75.BCM8892X": "0", "phy_rx_polarity_flip_fabric76.BCM8892X": "1", - "phy_rx_polarity_flip_fabric77.BCM8892X": "1", + "phy_rx_polarity_flip_fabric77.BCM8892X": "0", "phy_rx_polarity_flip_fabric78.BCM8892X": "1", "phy_rx_polarity_flip_fabric79.BCM8892X": "0", "phy_rx_polarity_flip_fabric8.BCM8892X": "0", "phy_rx_polarity_flip_fabric80.BCM8892X": "1", - "phy_rx_polarity_flip_fabric81.BCM8892X": "1", + "phy_rx_polarity_flip_fabric81.BCM8892X": "0", "phy_rx_polarity_flip_fabric82.BCM8892X": "1", "phy_rx_polarity_flip_fabric83.BCM8892X": "0", "phy_rx_polarity_flip_fabric84.BCM8892X": "1", - "phy_rx_polarity_flip_fabric85.BCM8892X": "1", + "phy_rx_polarity_flip_fabric85.BCM8892X": "0", "phy_rx_polarity_flip_fabric86.BCM8892X": "1", "phy_rx_polarity_flip_fabric87.BCM8892X": "0", "phy_rx_polarity_flip_fabric88.BCM8892X": "1", - "phy_rx_polarity_flip_fabric89.BCM8892X": "1", + "phy_rx_polarity_flip_fabric89.BCM8892X": "0", "phy_rx_polarity_flip_fabric9.BCM8892X": "0", "phy_rx_polarity_flip_fabric90.BCM8892X": "1", "phy_rx_polarity_flip_fabric91.BCM8892X": "0", "phy_rx_polarity_flip_fabric92.BCM8892X": "1", - "phy_rx_polarity_flip_fabric93.BCM8892X": "1", + "phy_rx_polarity_flip_fabric93.BCM8892X": "0", "phy_rx_polarity_flip_fabric94.BCM8892X": "1", "phy_rx_polarity_flip_fabric95.BCM8892X": "0", "phy_rx_polarity_flip_fabric96.BCM8892X": "1", - "phy_rx_polarity_flip_fabric97.BCM8892X": "1", + "phy_rx_polarity_flip_fabric97.BCM8892X": "0", "phy_rx_polarity_flip_fabric98.BCM8892X": "1", "phy_rx_polarity_flip_fabric99.BCM8892X": "0", "phy_tx_polarity_flip_fabric0.BCM8892X": "0", "phy_tx_polarity_flip_fabric1.BCM8892X": "1", "phy_tx_polarity_flip_fabric10.BCM8892X": "1", - "phy_tx_polarity_flip_fabric100.BCM8892X": "1", - "phy_tx_polarity_flip_fabric101.BCM8892X": "1", + "phy_tx_polarity_flip_fabric100.BCM8892X": "0", + "phy_tx_polarity_flip_fabric101.BCM8892X": "0", "phy_tx_polarity_flip_fabric102.BCM8892X": "0", "phy_tx_polarity_flip_fabric103.BCM8892X": "0", "phy_tx_polarity_flip_fabric104.BCM8892X": "1", - "phy_tx_polarity_flip_fabric105.BCM8892X": "0", + "phy_tx_polarity_flip_fabric105.BCM8892X": "1", "phy_tx_polarity_flip_fabric106.BCM8892X": "0", "phy_tx_polarity_flip_fabric107.BCM8892X": "1", - "phy_tx_polarity_flip_fabric108.BCM8892X": "0", + "phy_tx_polarity_flip_fabric108.BCM8892X": "1", "phy_tx_polarity_flip_fabric109.BCM8892X": "0", "phy_tx_polarity_flip_fabric11.BCM8892X": "0", "phy_tx_polarity_flip_fabric110.BCM8892X": "1", @@ -1281,105 +1286,105 @@ "phy_tx_polarity_flip_fabric148.BCM8892X": "0", "phy_tx_polarity_flip_fabric149.BCM8892X": "0", "phy_tx_polarity_flip_fabric15.BCM8892X": "1", - "phy_tx_polarity_flip_fabric150.BCM8892X": "1", + "phy_tx_polarity_flip_fabric150.BCM8892X": "0", "phy_tx_polarity_flip_fabric151.BCM8892X": "1", "phy_tx_polarity_flip_fabric152.BCM8892X": "0", "phy_tx_polarity_flip_fabric153.BCM8892X": "1", "phy_tx_polarity_flip_fabric154.BCM8892X": "1", - "phy_tx_polarity_flip_fabric155.BCM8892X": "0", + "phy_tx_polarity_flip_fabric155.BCM8892X": "1", "phy_tx_polarity_flip_fabric156.BCM8892X": "0", "phy_tx_polarity_flip_fabric157.BCM8892X": "1", "phy_tx_polarity_flip_fabric158.BCM8892X": "1", - "phy_tx_polarity_flip_fabric159.BCM8892X": "0", + "phy_tx_polarity_flip_fabric159.BCM8892X": "1", "phy_tx_polarity_flip_fabric16.BCM8892X": "1", "phy_tx_polarity_flip_fabric160.BCM8892X": "0", "phy_tx_polarity_flip_fabric161.BCM8892X": "0", - "phy_tx_polarity_flip_fabric162.BCM8892X": "1", + "phy_tx_polarity_flip_fabric162.BCM8892X": "0", "phy_tx_polarity_flip_fabric163.BCM8892X": "1", "phy_tx_polarity_flip_fabric164.BCM8892X": "0", "phy_tx_polarity_flip_fabric165.BCM8892X": "0", - "phy_tx_polarity_flip_fabric166.BCM8892X": "1", + "phy_tx_polarity_flip_fabric166.BCM8892X": "0", "phy_tx_polarity_flip_fabric167.BCM8892X": "1", "phy_tx_polarity_flip_fabric168.BCM8892X": "0", "phy_tx_polarity_flip_fabric169.BCM8892X": "1", "phy_tx_polarity_flip_fabric17.BCM8892X": "1", "phy_tx_polarity_flip_fabric170.BCM8892X": "1", - "phy_tx_polarity_flip_fabric171.BCM8892X": "0", + "phy_tx_polarity_flip_fabric171.BCM8892X": "1", "phy_tx_polarity_flip_fabric172.BCM8892X": "0", "phy_tx_polarity_flip_fabric173.BCM8892X": "1", "phy_tx_polarity_flip_fabric174.BCM8892X": "1", - "phy_tx_polarity_flip_fabric175.BCM8892X": "0", + "phy_tx_polarity_flip_fabric175.BCM8892X": "1", "phy_tx_polarity_flip_fabric176.BCM8892X": "0", "phy_tx_polarity_flip_fabric177.BCM8892X": "0", - "phy_tx_polarity_flip_fabric178.BCM8892X": "1", + "phy_tx_polarity_flip_fabric178.BCM8892X": "0", "phy_tx_polarity_flip_fabric179.BCM8892X": "1", "phy_tx_polarity_flip_fabric18.BCM8892X": "1", "phy_tx_polarity_flip_fabric180.BCM8892X": "0", "phy_tx_polarity_flip_fabric181.BCM8892X": "0", - "phy_tx_polarity_flip_fabric182.BCM8892X": "1", + "phy_tx_polarity_flip_fabric182.BCM8892X": "0", "phy_tx_polarity_flip_fabric183.BCM8892X": "1", "phy_tx_polarity_flip_fabric184.BCM8892X": "0", "phy_tx_polarity_flip_fabric185.BCM8892X": "1", "phy_tx_polarity_flip_fabric186.BCM8892X": "1", - "phy_tx_polarity_flip_fabric187.BCM8892X": "0", + "phy_tx_polarity_flip_fabric187.BCM8892X": "1", "phy_tx_polarity_flip_fabric188.BCM8892X": "0", "phy_tx_polarity_flip_fabric189.BCM8892X": "1", "phy_tx_polarity_flip_fabric19.BCM8892X": "1", "phy_tx_polarity_flip_fabric190.BCM8892X": "1", - "phy_tx_polarity_flip_fabric191.BCM8892X": "0", - "phy_tx_polarity_flip_fabric192.BCM8892X": "0", - "phy_tx_polarity_flip_fabric193.BCM8892X": "1", + "phy_tx_polarity_flip_fabric191.BCM8892X": "1", + "phy_tx_polarity_flip_fabric192.BCM8892X": "1", + "phy_tx_polarity_flip_fabric193.BCM8892X": "0", "phy_tx_polarity_flip_fabric194.BCM8892X": "0", "phy_tx_polarity_flip_fabric195.BCM8892X": "1", - "phy_tx_polarity_flip_fabric196.BCM8892X": "0", - "phy_tx_polarity_flip_fabric197.BCM8892X": "1", + "phy_tx_polarity_flip_fabric196.BCM8892X": "1", + "phy_tx_polarity_flip_fabric197.BCM8892X": "0", "phy_tx_polarity_flip_fabric198.BCM8892X": "0", "phy_tx_polarity_flip_fabric199.BCM8892X": "1", "phy_tx_polarity_flip_fabric2.BCM8892X": "0", "phy_tx_polarity_flip_fabric20.BCM8892X": "1", - "phy_tx_polarity_flip_fabric200.BCM8892X": "1", - "phy_tx_polarity_flip_fabric201.BCM8892X": "0", + "phy_tx_polarity_flip_fabric200.BCM8892X": "0", + "phy_tx_polarity_flip_fabric201.BCM8892X": "1", "phy_tx_polarity_flip_fabric202.BCM8892X": "1", "phy_tx_polarity_flip_fabric203.BCM8892X": "0", - "phy_tx_polarity_flip_fabric204.BCM8892X": "1", - "phy_tx_polarity_flip_fabric205.BCM8892X": "0", + "phy_tx_polarity_flip_fabric204.BCM8892X": "0", + "phy_tx_polarity_flip_fabric205.BCM8892X": "1", "phy_tx_polarity_flip_fabric206.BCM8892X": "1", "phy_tx_polarity_flip_fabric207.BCM8892X": "0", - "phy_tx_polarity_flip_fabric208.BCM8892X": "0", - "phy_tx_polarity_flip_fabric209.BCM8892X": "1", + "phy_tx_polarity_flip_fabric208.BCM8892X": "1", + "phy_tx_polarity_flip_fabric209.BCM8892X": "0", "phy_tx_polarity_flip_fabric21.BCM8892X": "0", "phy_tx_polarity_flip_fabric210.BCM8892X": "0", "phy_tx_polarity_flip_fabric211.BCM8892X": "1", - "phy_tx_polarity_flip_fabric212.BCM8892X": "0", - "phy_tx_polarity_flip_fabric213.BCM8892X": "1", + "phy_tx_polarity_flip_fabric212.BCM8892X": "1", + "phy_tx_polarity_flip_fabric213.BCM8892X": "0", "phy_tx_polarity_flip_fabric214.BCM8892X": "0", "phy_tx_polarity_flip_fabric215.BCM8892X": "1", - "phy_tx_polarity_flip_fabric216.BCM8892X": "1", - "phy_tx_polarity_flip_fabric217.BCM8892X": "0", + "phy_tx_polarity_flip_fabric216.BCM8892X": "0", + "phy_tx_polarity_flip_fabric217.BCM8892X": "1", "phy_tx_polarity_flip_fabric218.BCM8892X": "1", "phy_tx_polarity_flip_fabric219.BCM8892X": "0", - "phy_tx_polarity_flip_fabric22.BCM8892X": "1", - "phy_tx_polarity_flip_fabric220.BCM8892X": "1", - "phy_tx_polarity_flip_fabric221.BCM8892X": "0", + "phy_tx_polarity_flip_fabric22.BCM8892X": "0", + "phy_tx_polarity_flip_fabric220.BCM8892X": "0", + "phy_tx_polarity_flip_fabric221.BCM8892X": "1", "phy_tx_polarity_flip_fabric222.BCM8892X": "1", "phy_tx_polarity_flip_fabric223.BCM8892X": "0", - "phy_tx_polarity_flip_fabric224.BCM8892X": "0", - "phy_tx_polarity_flip_fabric225.BCM8892X": "1", + "phy_tx_polarity_flip_fabric224.BCM8892X": "1", + "phy_tx_polarity_flip_fabric225.BCM8892X": "0", "phy_tx_polarity_flip_fabric226.BCM8892X": "0", "phy_tx_polarity_flip_fabric227.BCM8892X": "1", - "phy_tx_polarity_flip_fabric228.BCM8892X": "0", - "phy_tx_polarity_flip_fabric229.BCM8892X": "1", - "phy_tx_polarity_flip_fabric23.BCM8892X": "0", + "phy_tx_polarity_flip_fabric228.BCM8892X": "1", + "phy_tx_polarity_flip_fabric229.BCM8892X": "0", + "phy_tx_polarity_flip_fabric23.BCM8892X": "1", "phy_tx_polarity_flip_fabric230.BCM8892X": "0", "phy_tx_polarity_flip_fabric231.BCM8892X": "1", "phy_tx_polarity_flip_fabric232.BCM8892X": "1", "phy_tx_polarity_flip_fabric233.BCM8892X": "1", - "phy_tx_polarity_flip_fabric234.BCM8892X": "0", - "phy_tx_polarity_flip_fabric235.BCM8892X": "1", + "phy_tx_polarity_flip_fabric234.BCM8892X": "1", + "phy_tx_polarity_flip_fabric235.BCM8892X": "0", "phy_tx_polarity_flip_fabric236.BCM8892X": "1", "phy_tx_polarity_flip_fabric237.BCM8892X": "0", "phy_tx_polarity_flip_fabric238.BCM8892X": "0", - "phy_tx_polarity_flip_fabric239.BCM8892X": "1", + "phy_tx_polarity_flip_fabric239.BCM8892X": "0", "phy_tx_polarity_flip_fabric24.BCM8892X": "0", "phy_tx_polarity_flip_fabric240.BCM8892X": "1", "phy_tx_polarity_flip_fabric241.BCM8892X": "0", @@ -1402,7 +1407,7 @@ "phy_tx_polarity_flip_fabric257.BCM8892X": "1", "phy_tx_polarity_flip_fabric258.BCM8892X": "0", "phy_tx_polarity_flip_fabric259.BCM8892X": "1", - "phy_tx_polarity_flip_fabric26.BCM8892X": "0", + "phy_tx_polarity_flip_fabric26.BCM8892X": "1", "phy_tx_polarity_flip_fabric260.BCM8892X": "0", "phy_tx_polarity_flip_fabric261.BCM8892X": "1", "phy_tx_polarity_flip_fabric262.BCM8892X": "1", @@ -1413,7 +1418,7 @@ "phy_tx_polarity_flip_fabric267.BCM8892X": "0", "phy_tx_polarity_flip_fabric268.BCM8892X": "1", "phy_tx_polarity_flip_fabric269.BCM8892X": "0", - "phy_tx_polarity_flip_fabric27.BCM8892X": "1", + "phy_tx_polarity_flip_fabric27.BCM8892X": "0", "phy_tx_polarity_flip_fabric270.BCM8892X": "0", "phy_tx_polarity_flip_fabric271.BCM8892X": "1", "phy_tx_polarity_flip_fabric272.BCM8892X": "0", @@ -1422,103 +1427,103 @@ "phy_tx_polarity_flip_fabric275.BCM8892X": "1", "phy_tx_polarity_flip_fabric276.BCM8892X": "0", "phy_tx_polarity_flip_fabric277.BCM8892X": "0", - "phy_tx_polarity_flip_fabric278.BCM8892X": "0", - "phy_tx_polarity_flip_fabric279.BCM8892X": "1", + "phy_tx_polarity_flip_fabric278.BCM8892X": "1", + "phy_tx_polarity_flip_fabric279.BCM8892X": "0", "phy_tx_polarity_flip_fabric28.BCM8892X": "0", "phy_tx_polarity_flip_fabric280.BCM8892X": "1", "phy_tx_polarity_flip_fabric281.BCM8892X": "0", - "phy_tx_polarity_flip_fabric282.BCM8892X": "1", - "phy_tx_polarity_flip_fabric283.BCM8892X": "0", + "phy_tx_polarity_flip_fabric282.BCM8892X": "0", + "phy_tx_polarity_flip_fabric283.BCM8892X": "1", "phy_tx_polarity_flip_fabric284.BCM8892X": "1", "phy_tx_polarity_flip_fabric285.BCM8892X": "0", - "phy_tx_polarity_flip_fabric286.BCM8892X": "1", - "phy_tx_polarity_flip_fabric287.BCM8892X": "0", + "phy_tx_polarity_flip_fabric286.BCM8892X": "0", + "phy_tx_polarity_flip_fabric287.BCM8892X": "1", "phy_tx_polarity_flip_fabric288.BCM8892X": "0", "phy_tx_polarity_flip_fabric289.BCM8892X": "1", "phy_tx_polarity_flip_fabric29.BCM8892X": "1", - "phy_tx_polarity_flip_fabric290.BCM8892X": "0", - "phy_tx_polarity_flip_fabric291.BCM8892X": "1", + "phy_tx_polarity_flip_fabric290.BCM8892X": "1", + "phy_tx_polarity_flip_fabric291.BCM8892X": "0", "phy_tx_polarity_flip_fabric292.BCM8892X": "0", "phy_tx_polarity_flip_fabric293.BCM8892X": "1", - "phy_tx_polarity_flip_fabric294.BCM8892X": "0", - "phy_tx_polarity_flip_fabric295.BCM8892X": "1", + "phy_tx_polarity_flip_fabric294.BCM8892X": "1", + "phy_tx_polarity_flip_fabric295.BCM8892X": "0", "phy_tx_polarity_flip_fabric296.BCM8892X": "1", "phy_tx_polarity_flip_fabric297.BCM8892X": "0", - "phy_tx_polarity_flip_fabric298.BCM8892X": "1", - "phy_tx_polarity_flip_fabric299.BCM8892X": "0", + "phy_tx_polarity_flip_fabric298.BCM8892X": "0", + "phy_tx_polarity_flip_fabric299.BCM8892X": "1", "phy_tx_polarity_flip_fabric3.BCM8892X": "1", - "phy_tx_polarity_flip_fabric30.BCM8892X": "0", + "phy_tx_polarity_flip_fabric30.BCM8892X": "1", "phy_tx_polarity_flip_fabric300.BCM8892X": "1", "phy_tx_polarity_flip_fabric301.BCM8892X": "0", - "phy_tx_polarity_flip_fabric302.BCM8892X": "1", - "phy_tx_polarity_flip_fabric303.BCM8892X": "0", + "phy_tx_polarity_flip_fabric302.BCM8892X": "0", + "phy_tx_polarity_flip_fabric303.BCM8892X": "1", "phy_tx_polarity_flip_fabric304.BCM8892X": "0", "phy_tx_polarity_flip_fabric305.BCM8892X": "1", - "phy_tx_polarity_flip_fabric306.BCM8892X": "0", - "phy_tx_polarity_flip_fabric307.BCM8892X": "1", + "phy_tx_polarity_flip_fabric306.BCM8892X": "1", + "phy_tx_polarity_flip_fabric307.BCM8892X": "0", "phy_tx_polarity_flip_fabric308.BCM8892X": "0", "phy_tx_polarity_flip_fabric309.BCM8892X": "1", - "phy_tx_polarity_flip_fabric31.BCM8892X": "1", - "phy_tx_polarity_flip_fabric310.BCM8892X": "0", - "phy_tx_polarity_flip_fabric311.BCM8892X": "1", + "phy_tx_polarity_flip_fabric31.BCM8892X": "0", + "phy_tx_polarity_flip_fabric310.BCM8892X": "1", + "phy_tx_polarity_flip_fabric311.BCM8892X": "0", "phy_tx_polarity_flip_fabric312.BCM8892X": "1", "phy_tx_polarity_flip_fabric313.BCM8892X": "0", - "phy_tx_polarity_flip_fabric314.BCM8892X": "1", - "phy_tx_polarity_flip_fabric315.BCM8892X": "0", + "phy_tx_polarity_flip_fabric314.BCM8892X": "0", + "phy_tx_polarity_flip_fabric315.BCM8892X": "1", "phy_tx_polarity_flip_fabric316.BCM8892X": "1", "phy_tx_polarity_flip_fabric317.BCM8892X": "0", - "phy_tx_polarity_flip_fabric318.BCM8892X": "1", - "phy_tx_polarity_flip_fabric319.BCM8892X": "0", + "phy_tx_polarity_flip_fabric318.BCM8892X": "0", + "phy_tx_polarity_flip_fabric319.BCM8892X": "1", "phy_tx_polarity_flip_fabric32.BCM8892X": "1", - "phy_tx_polarity_flip_fabric320.BCM8892X": "0", - "phy_tx_polarity_flip_fabric321.BCM8892X": "0", + "phy_tx_polarity_flip_fabric320.BCM8892X": "1", + "phy_tx_polarity_flip_fabric321.BCM8892X": "1", "phy_tx_polarity_flip_fabric322.BCM8892X": "1", "phy_tx_polarity_flip_fabric323.BCM8892X": "0", - "phy_tx_polarity_flip_fabric324.BCM8892X": "0", - "phy_tx_polarity_flip_fabric325.BCM8892X": "0", + "phy_tx_polarity_flip_fabric324.BCM8892X": "1", + "phy_tx_polarity_flip_fabric325.BCM8892X": "1", "phy_tx_polarity_flip_fabric326.BCM8892X": "1", "phy_tx_polarity_flip_fabric327.BCM8892X": "0", - "phy_tx_polarity_flip_fabric328.BCM8892X": "0", - "phy_tx_polarity_flip_fabric329.BCM8892X": "1", + "phy_tx_polarity_flip_fabric328.BCM8892X": "1", + "phy_tx_polarity_flip_fabric329.BCM8892X": "0", "phy_tx_polarity_flip_fabric33.BCM8892X": "0", "phy_tx_polarity_flip_fabric330.BCM8892X": "0", "phy_tx_polarity_flip_fabric331.BCM8892X": "0", - "phy_tx_polarity_flip_fabric332.BCM8892X": "0", - "phy_tx_polarity_flip_fabric333.BCM8892X": "1", + "phy_tx_polarity_flip_fabric332.BCM8892X": "1", + "phy_tx_polarity_flip_fabric333.BCM8892X": "0", "phy_tx_polarity_flip_fabric334.BCM8892X": "0", "phy_tx_polarity_flip_fabric335.BCM8892X": "0", - "phy_tx_polarity_flip_fabric336.BCM8892X": "0", - "phy_tx_polarity_flip_fabric337.BCM8892X": "0", + "phy_tx_polarity_flip_fabric336.BCM8892X": "1", + "phy_tx_polarity_flip_fabric337.BCM8892X": "1", "phy_tx_polarity_flip_fabric338.BCM8892X": "1", "phy_tx_polarity_flip_fabric339.BCM8892X": "0", - "phy_tx_polarity_flip_fabric34.BCM8892X": "1", - "phy_tx_polarity_flip_fabric340.BCM8892X": "0", - "phy_tx_polarity_flip_fabric341.BCM8892X": "0", + "phy_tx_polarity_flip_fabric34.BCM8892X": "0", + "phy_tx_polarity_flip_fabric340.BCM8892X": "1", + "phy_tx_polarity_flip_fabric341.BCM8892X": "1", "phy_tx_polarity_flip_fabric342.BCM8892X": "1", "phy_tx_polarity_flip_fabric343.BCM8892X": "0", - "phy_tx_polarity_flip_fabric344.BCM8892X": "0", - "phy_tx_polarity_flip_fabric345.BCM8892X": "1", + "phy_tx_polarity_flip_fabric344.BCM8892X": "1", + "phy_tx_polarity_flip_fabric345.BCM8892X": "0", "phy_tx_polarity_flip_fabric346.BCM8892X": "0", "phy_tx_polarity_flip_fabric347.BCM8892X": "0", - "phy_tx_polarity_flip_fabric348.BCM8892X": "0", - "phy_tx_polarity_flip_fabric349.BCM8892X": "1", - "phy_tx_polarity_flip_fabric35.BCM8892X": "0", + "phy_tx_polarity_flip_fabric348.BCM8892X": "1", + "phy_tx_polarity_flip_fabric349.BCM8892X": "0", + "phy_tx_polarity_flip_fabric35.BCM8892X": "1", "phy_tx_polarity_flip_fabric350.BCM8892X": "0", "phy_tx_polarity_flip_fabric351.BCM8892X": "0", - "phy_tx_polarity_flip_fabric352.BCM8892X": "0", - "phy_tx_polarity_flip_fabric353.BCM8892X": "0", + "phy_tx_polarity_flip_fabric352.BCM8892X": "1", + "phy_tx_polarity_flip_fabric353.BCM8892X": "1", "phy_tx_polarity_flip_fabric354.BCM8892X": "1", "phy_tx_polarity_flip_fabric355.BCM8892X": "0", - "phy_tx_polarity_flip_fabric356.BCM8892X": "0", - "phy_tx_polarity_flip_fabric357.BCM8892X": "0", + "phy_tx_polarity_flip_fabric356.BCM8892X": "1", + "phy_tx_polarity_flip_fabric357.BCM8892X": "1", "phy_tx_polarity_flip_fabric358.BCM8892X": "1", "phy_tx_polarity_flip_fabric359.BCM8892X": "0", "phy_tx_polarity_flip_fabric36.BCM8892X": "1", "phy_tx_polarity_flip_fabric360.BCM8892X": "1", - "phy_tx_polarity_flip_fabric361.BCM8892X": "1", + "phy_tx_polarity_flip_fabric361.BCM8892X": "0", "phy_tx_polarity_flip_fabric362.BCM8892X": "0", "phy_tx_polarity_flip_fabric363.BCM8892X": "0", - "phy_tx_polarity_flip_fabric364.BCM8892X": "1", + "phy_tx_polarity_flip_fabric364.BCM8892X": "0", "phy_tx_polarity_flip_fabric365.BCM8892X": "0", "phy_tx_polarity_flip_fabric366.BCM8892X": "1", "phy_tx_polarity_flip_fabric367.BCM8892X": "1", @@ -1535,7 +1540,7 @@ "phy_tx_polarity_flip_fabric377.BCM8892X": "1", "phy_tx_polarity_flip_fabric378.BCM8892X": "1", "phy_tx_polarity_flip_fabric379.BCM8892X": "0", - "phy_tx_polarity_flip_fabric38.BCM8892X": "1", + "phy_tx_polarity_flip_fabric38.BCM8892X": "0", "phy_tx_polarity_flip_fabric380.BCM8892X": "0", "phy_tx_polarity_flip_fabric381.BCM8892X": "0", "phy_tx_polarity_flip_fabric382.BCM8892X": "0", @@ -1546,7 +1551,7 @@ "phy_tx_polarity_flip_fabric387.BCM8892X": "1", "phy_tx_polarity_flip_fabric388.BCM8892X": "0", "phy_tx_polarity_flip_fabric389.BCM8892X": "1", - "phy_tx_polarity_flip_fabric39.BCM8892X": "0", + "phy_tx_polarity_flip_fabric39.BCM8892X": "1", "phy_tx_polarity_flip_fabric390.BCM8892X": "1", "phy_tx_polarity_flip_fabric391.BCM8892X": "0", "phy_tx_polarity_flip_fabric392.BCM8892X": "1", @@ -1565,111 +1570,111 @@ "phy_tx_polarity_flip_fabric403.BCM8892X": "0", "phy_tx_polarity_flip_fabric404.BCM8892X": "1", "phy_tx_polarity_flip_fabric405.BCM8892X": "0", - "phy_tx_polarity_flip_fabric406.BCM8892X": "0", + "phy_tx_polarity_flip_fabric406.BCM8892X": "1", "phy_tx_polarity_flip_fabric407.BCM8892X": "1", "phy_tx_polarity_flip_fabric408.BCM8892X": "1", "phy_tx_polarity_flip_fabric409.BCM8892X": "0", "phy_tx_polarity_flip_fabric41.BCM8892X": "1", "phy_tx_polarity_flip_fabric410.BCM8892X": "1", - "phy_tx_polarity_flip_fabric411.BCM8892X": "1", + "phy_tx_polarity_flip_fabric411.BCM8892X": "0", "phy_tx_polarity_flip_fabric412.BCM8892X": "1", "phy_tx_polarity_flip_fabric413.BCM8892X": "0", "phy_tx_polarity_flip_fabric414.BCM8892X": "1", - "phy_tx_polarity_flip_fabric415.BCM8892X": "1", + "phy_tx_polarity_flip_fabric415.BCM8892X": "0", "phy_tx_polarity_flip_fabric416.BCM8892X": "1", "phy_tx_polarity_flip_fabric417.BCM8892X": "1", - "phy_tx_polarity_flip_fabric418.BCM8892X": "0", + "phy_tx_polarity_flip_fabric418.BCM8892X": "1", "phy_tx_polarity_flip_fabric419.BCM8892X": "1", - "phy_tx_polarity_flip_fabric42.BCM8892X": "0", + "phy_tx_polarity_flip_fabric42.BCM8892X": "1", "phy_tx_polarity_flip_fabric420.BCM8892X": "1", "phy_tx_polarity_flip_fabric421.BCM8892X": "1", - "phy_tx_polarity_flip_fabric422.BCM8892X": "0", + "phy_tx_polarity_flip_fabric422.BCM8892X": "1", "phy_tx_polarity_flip_fabric423.BCM8892X": "1", "phy_tx_polarity_flip_fabric424.BCM8892X": "1", "phy_tx_polarity_flip_fabric425.BCM8892X": "0", "phy_tx_polarity_flip_fabric426.BCM8892X": "1", - "phy_tx_polarity_flip_fabric427.BCM8892X": "1", + "phy_tx_polarity_flip_fabric427.BCM8892X": "0", "phy_tx_polarity_flip_fabric428.BCM8892X": "1", "phy_tx_polarity_flip_fabric429.BCM8892X": "0", - "phy_tx_polarity_flip_fabric43.BCM8892X": "1", + "phy_tx_polarity_flip_fabric43.BCM8892X": "0", "phy_tx_polarity_flip_fabric430.BCM8892X": "1", - "phy_tx_polarity_flip_fabric431.BCM8892X": "1", + "phy_tx_polarity_flip_fabric431.BCM8892X": "0", "phy_tx_polarity_flip_fabric432.BCM8892X": "1", "phy_tx_polarity_flip_fabric433.BCM8892X": "1", - "phy_tx_polarity_flip_fabric434.BCM8892X": "0", + "phy_tx_polarity_flip_fabric434.BCM8892X": "1", "phy_tx_polarity_flip_fabric435.BCM8892X": "1", "phy_tx_polarity_flip_fabric436.BCM8892X": "1", "phy_tx_polarity_flip_fabric437.BCM8892X": "1", - "phy_tx_polarity_flip_fabric438.BCM8892X": "0", + "phy_tx_polarity_flip_fabric438.BCM8892X": "1", "phy_tx_polarity_flip_fabric439.BCM8892X": "1", "phy_tx_polarity_flip_fabric44.BCM8892X": "0", "phy_tx_polarity_flip_fabric440.BCM8892X": "1", "phy_tx_polarity_flip_fabric441.BCM8892X": "0", "phy_tx_polarity_flip_fabric442.BCM8892X": "1", - "phy_tx_polarity_flip_fabric443.BCM8892X": "1", + "phy_tx_polarity_flip_fabric443.BCM8892X": "0", "phy_tx_polarity_flip_fabric444.BCM8892X": "1", "phy_tx_polarity_flip_fabric445.BCM8892X": "0", "phy_tx_polarity_flip_fabric446.BCM8892X": "1", - "phy_tx_polarity_flip_fabric447.BCM8892X": "1", - "phy_tx_polarity_flip_fabric448.BCM8892X": "1", - "phy_tx_polarity_flip_fabric449.BCM8892X": "0", + "phy_tx_polarity_flip_fabric447.BCM8892X": "0", + "phy_tx_polarity_flip_fabric448.BCM8892X": "0", + "phy_tx_polarity_flip_fabric449.BCM8892X": "1", "phy_tx_polarity_flip_fabric45.BCM8892X": "1", "phy_tx_polarity_flip_fabric450.BCM8892X": "1", "phy_tx_polarity_flip_fabric451.BCM8892X": "0", - "phy_tx_polarity_flip_fabric452.BCM8892X": "1", - "phy_tx_polarity_flip_fabric453.BCM8892X": "0", + "phy_tx_polarity_flip_fabric452.BCM8892X": "0", + "phy_tx_polarity_flip_fabric453.BCM8892X": "1", "phy_tx_polarity_flip_fabric454.BCM8892X": "1", "phy_tx_polarity_flip_fabric455.BCM8892X": "0", - "phy_tx_polarity_flip_fabric456.BCM8892X": "0", - "phy_tx_polarity_flip_fabric457.BCM8892X": "1", + "phy_tx_polarity_flip_fabric456.BCM8892X": "1", + "phy_tx_polarity_flip_fabric457.BCM8892X": "0", "phy_tx_polarity_flip_fabric458.BCM8892X": "0", "phy_tx_polarity_flip_fabric459.BCM8892X": "1", - "phy_tx_polarity_flip_fabric46.BCM8892X": "0", - "phy_tx_polarity_flip_fabric460.BCM8892X": "0", - "phy_tx_polarity_flip_fabric461.BCM8892X": "1", + "phy_tx_polarity_flip_fabric46.BCM8892X": "1", + "phy_tx_polarity_flip_fabric460.BCM8892X": "1", + "phy_tx_polarity_flip_fabric461.BCM8892X": "0", "phy_tx_polarity_flip_fabric462.BCM8892X": "0", "phy_tx_polarity_flip_fabric463.BCM8892X": "1", - "phy_tx_polarity_flip_fabric464.BCM8892X": "1", - "phy_tx_polarity_flip_fabric465.BCM8892X": "0", + "phy_tx_polarity_flip_fabric464.BCM8892X": "0", + "phy_tx_polarity_flip_fabric465.BCM8892X": "1", "phy_tx_polarity_flip_fabric466.BCM8892X": "1", "phy_tx_polarity_flip_fabric467.BCM8892X": "0", - "phy_tx_polarity_flip_fabric468.BCM8892X": "1", - "phy_tx_polarity_flip_fabric469.BCM8892X": "0", - "phy_tx_polarity_flip_fabric47.BCM8892X": "1", + "phy_tx_polarity_flip_fabric468.BCM8892X": "0", + "phy_tx_polarity_flip_fabric469.BCM8892X": "1", + "phy_tx_polarity_flip_fabric47.BCM8892X": "0", "phy_tx_polarity_flip_fabric470.BCM8892X": "1", "phy_tx_polarity_flip_fabric471.BCM8892X": "0", - "phy_tx_polarity_flip_fabric472.BCM8892X": "0", - "phy_tx_polarity_flip_fabric473.BCM8892X": "1", + "phy_tx_polarity_flip_fabric472.BCM8892X": "1", + "phy_tx_polarity_flip_fabric473.BCM8892X": "0", "phy_tx_polarity_flip_fabric474.BCM8892X": "0", "phy_tx_polarity_flip_fabric475.BCM8892X": "1", - "phy_tx_polarity_flip_fabric476.BCM8892X": "0", - "phy_tx_polarity_flip_fabric477.BCM8892X": "1", + "phy_tx_polarity_flip_fabric476.BCM8892X": "1", + "phy_tx_polarity_flip_fabric477.BCM8892X": "0", "phy_tx_polarity_flip_fabric478.BCM8892X": "0", "phy_tx_polarity_flip_fabric479.BCM8892X": "1", "phy_tx_polarity_flip_fabric48.BCM8892X": "1", - "phy_tx_polarity_flip_fabric480.BCM8892X": "1", - "phy_tx_polarity_flip_fabric481.BCM8892X": "0", + "phy_tx_polarity_flip_fabric480.BCM8892X": "0", + "phy_tx_polarity_flip_fabric481.BCM8892X": "1", "phy_tx_polarity_flip_fabric482.BCM8892X": "1", "phy_tx_polarity_flip_fabric483.BCM8892X": "0", - "phy_tx_polarity_flip_fabric484.BCM8892X": "1", - "phy_tx_polarity_flip_fabric485.BCM8892X": "0", + "phy_tx_polarity_flip_fabric484.BCM8892X": "0", + "phy_tx_polarity_flip_fabric485.BCM8892X": "1", "phy_tx_polarity_flip_fabric486.BCM8892X": "1", "phy_tx_polarity_flip_fabric487.BCM8892X": "0", "phy_tx_polarity_flip_fabric488.BCM8892X": "1", "phy_tx_polarity_flip_fabric489.BCM8892X": "0", "phy_tx_polarity_flip_fabric49.BCM8892X": "0", - "phy_tx_polarity_flip_fabric490.BCM8892X": "1", - "phy_tx_polarity_flip_fabric491.BCM8892X": "0", + "phy_tx_polarity_flip_fabric490.BCM8892X": "0", + "phy_tx_polarity_flip_fabric491.BCM8892X": "1", "phy_tx_polarity_flip_fabric492.BCM8892X": "0", "phy_tx_polarity_flip_fabric493.BCM8892X": "0", "phy_tx_polarity_flip_fabric494.BCM8892X": "0", - "phy_tx_polarity_flip_fabric495.BCM8892X": "0", + "phy_tx_polarity_flip_fabric495.BCM8892X": "1", "phy_tx_polarity_flip_fabric496.BCM8892X": "1", "phy_tx_polarity_flip_fabric497.BCM8892X": "0", "phy_tx_polarity_flip_fabric498.BCM8892X": "0", "phy_tx_polarity_flip_fabric499.BCM8892X": "1", "phy_tx_polarity_flip_fabric5.BCM8892X": "1", - "phy_tx_polarity_flip_fabric50.BCM8892X": "1", + "phy_tx_polarity_flip_fabric50.BCM8892X": "0", "phy_tx_polarity_flip_fabric500.BCM8892X": "1", "phy_tx_polarity_flip_fabric501.BCM8892X": "0", "phy_tx_polarity_flip_fabric502.BCM8892X": "1", @@ -1680,81 +1685,81 @@ "phy_tx_polarity_flip_fabric507.BCM8892X": "0", "phy_tx_polarity_flip_fabric508.BCM8892X": "0", "phy_tx_polarity_flip_fabric509.BCM8892X": "1", - "phy_tx_polarity_flip_fabric51.BCM8892X": "0", + "phy_tx_polarity_flip_fabric51.BCM8892X": "1", "phy_tx_polarity_flip_fabric510.BCM8892X": "0", "phy_tx_polarity_flip_fabric511.BCM8892X": "1", "phy_tx_polarity_flip_fabric52.BCM8892X": "1", "phy_tx_polarity_flip_fabric53.BCM8892X": "0", - "phy_tx_polarity_flip_fabric54.BCM8892X": "1", - "phy_tx_polarity_flip_fabric55.BCM8892X": "0", + "phy_tx_polarity_flip_fabric54.BCM8892X": "0", + "phy_tx_polarity_flip_fabric55.BCM8892X": "1", "phy_tx_polarity_flip_fabric56.BCM8892X": "0", "phy_tx_polarity_flip_fabric57.BCM8892X": "1", - "phy_tx_polarity_flip_fabric58.BCM8892X": "0", - "phy_tx_polarity_flip_fabric59.BCM8892X": "1", + "phy_tx_polarity_flip_fabric58.BCM8892X": "1", + "phy_tx_polarity_flip_fabric59.BCM8892X": "0", "phy_tx_polarity_flip_fabric6.BCM8892X": "1", "phy_tx_polarity_flip_fabric60.BCM8892X": "0", "phy_tx_polarity_flip_fabric61.BCM8892X": "1", - "phy_tx_polarity_flip_fabric62.BCM8892X": "0", - "phy_tx_polarity_flip_fabric63.BCM8892X": "1", - "phy_tx_polarity_flip_fabric64.BCM8892X": "1", - "phy_tx_polarity_flip_fabric65.BCM8892X": "1", + "phy_tx_polarity_flip_fabric62.BCM8892X": "1", + "phy_tx_polarity_flip_fabric63.BCM8892X": "0", + "phy_tx_polarity_flip_fabric64.BCM8892X": "0", + "phy_tx_polarity_flip_fabric65.BCM8892X": "0", "phy_tx_polarity_flip_fabric66.BCM8892X": "0", "phy_tx_polarity_flip_fabric67.BCM8892X": "0", - "phy_tx_polarity_flip_fabric68.BCM8892X": "1", - "phy_tx_polarity_flip_fabric69.BCM8892X": "1", + "phy_tx_polarity_flip_fabric68.BCM8892X": "0", + "phy_tx_polarity_flip_fabric69.BCM8892X": "0", "phy_tx_polarity_flip_fabric7.BCM8892X": "0", "phy_tx_polarity_flip_fabric70.BCM8892X": "0", "phy_tx_polarity_flip_fabric71.BCM8892X": "0", - "phy_tx_polarity_flip_fabric72.BCM8892X": "1", - "phy_tx_polarity_flip_fabric73.BCM8892X": "0", + "phy_tx_polarity_flip_fabric72.BCM8892X": "0", + "phy_tx_polarity_flip_fabric73.BCM8892X": "1", "phy_tx_polarity_flip_fabric74.BCM8892X": "0", "phy_tx_polarity_flip_fabric75.BCM8892X": "1", - "phy_tx_polarity_flip_fabric76.BCM8892X": "1", - "phy_tx_polarity_flip_fabric77.BCM8892X": "0", + "phy_tx_polarity_flip_fabric76.BCM8892X": "0", + "phy_tx_polarity_flip_fabric77.BCM8892X": "1", "phy_tx_polarity_flip_fabric78.BCM8892X": "0", "phy_tx_polarity_flip_fabric79.BCM8892X": "1", "phy_tx_polarity_flip_fabric8.BCM8892X": "1", - "phy_tx_polarity_flip_fabric80.BCM8892X": "1", - "phy_tx_polarity_flip_fabric81.BCM8892X": "1", + "phy_tx_polarity_flip_fabric80.BCM8892X": "0", + "phy_tx_polarity_flip_fabric81.BCM8892X": "0", "phy_tx_polarity_flip_fabric82.BCM8892X": "0", "phy_tx_polarity_flip_fabric83.BCM8892X": "0", - "phy_tx_polarity_flip_fabric84.BCM8892X": "1", - "phy_tx_polarity_flip_fabric85.BCM8892X": "1", + "phy_tx_polarity_flip_fabric84.BCM8892X": "0", + "phy_tx_polarity_flip_fabric85.BCM8892X": "0", "phy_tx_polarity_flip_fabric86.BCM8892X": "0", "phy_tx_polarity_flip_fabric87.BCM8892X": "0", - "phy_tx_polarity_flip_fabric88.BCM8892X": "1", - "phy_tx_polarity_flip_fabric89.BCM8892X": "0", + "phy_tx_polarity_flip_fabric88.BCM8892X": "0", + "phy_tx_polarity_flip_fabric89.BCM8892X": "1", "phy_tx_polarity_flip_fabric9.BCM8892X": "0", "phy_tx_polarity_flip_fabric90.BCM8892X": "0", "phy_tx_polarity_flip_fabric91.BCM8892X": "1", - "phy_tx_polarity_flip_fabric92.BCM8892X": "1", - "phy_tx_polarity_flip_fabric93.BCM8892X": "0", + "phy_tx_polarity_flip_fabric92.BCM8892X": "0", + "phy_tx_polarity_flip_fabric93.BCM8892X": "1", "phy_tx_polarity_flip_fabric94.BCM8892X": "0", "phy_tx_polarity_flip_fabric95.BCM8892X": "1", - "phy_tx_polarity_flip_fabric96.BCM8892X": "1", - "phy_tx_polarity_flip_fabric97.BCM8892X": "1", + "phy_tx_polarity_flip_fabric96.BCM8892X": "0", + "phy_tx_polarity_flip_fabric97.BCM8892X": "0", "phy_tx_polarity_flip_fabric98.BCM8892X": "0", "phy_tx_polarity_flip_fabric99.BCM8892X": "0" } }, "1": { "config": { - "lane_to_serdes_map_fabric_lane0.BCM8892X": "rx4:tx5", - "lane_to_serdes_map_fabric_lane1.BCM8892X": "rx5:tx4", - "lane_to_serdes_map_fabric_lane10.BCM8892X": "rx18:tx18", + "lane_to_serdes_map_fabric_lane0.BCM8892X": "rx0:tx1", + "lane_to_serdes_map_fabric_lane1.BCM8892X": "rx1:tx0", + "lane_to_serdes_map_fabric_lane10.BCM8892X": "rx22:tx22", "lane_to_serdes_map_fabric_lane100.BCM8892X": "rx200:tx205", "lane_to_serdes_map_fabric_lane101.BCM8892X": "rx201:tx206", - "lane_to_serdes_map_fabric_lane102.BCM8892X": "rx202:tx207", - "lane_to_serdes_map_fabric_lane103.BCM8892X": "rx203:tx204", + "lane_to_serdes_map_fabric_lane102.BCM8892X": "rx206:tx203", + "lane_to_serdes_map_fabric_lane103.BCM8892X": "rx207:tx200", "lane_to_serdes_map_fabric_lane104.BCM8892X": "rx208:tx212", "lane_to_serdes_map_fabric_lane105.BCM8892X": "rx209:tx213", - "lane_to_serdes_map_fabric_lane106.BCM8892X": "rx210:tx214", - "lane_to_serdes_map_fabric_lane107.BCM8892X": "rx211:tx215", + "lane_to_serdes_map_fabric_lane106.BCM8892X": "rx214:tx210", + "lane_to_serdes_map_fabric_lane107.BCM8892X": "rx215:tx211", "lane_to_serdes_map_fabric_lane108.BCM8892X": "rx216:tx220", "lane_to_serdes_map_fabric_lane109.BCM8892X": "rx217:tx221", - "lane_to_serdes_map_fabric_lane11.BCM8892X": "rx19:tx19", - "lane_to_serdes_map_fabric_lane110.BCM8892X": "rx218:tx222", - "lane_to_serdes_map_fabric_lane111.BCM8892X": "rx219:tx223", + "lane_to_serdes_map_fabric_lane11.BCM8892X": "rx23:tx23", + "lane_to_serdes_map_fabric_lane110.BCM8892X": "rx222:tx218", + "lane_to_serdes_map_fabric_lane111.BCM8892X": "rx223:tx219", "lane_to_serdes_map_fabric_lane112.BCM8892X": "rx228:tx229", "lane_to_serdes_map_fabric_lane113.BCM8892X": "rx229:tx228", "lane_to_serdes_map_fabric_lane114.BCM8892X": "rx226:tx227", @@ -1763,7 +1768,7 @@ "lane_to_serdes_map_fabric_lane117.BCM8892X": "rx233:tx232", "lane_to_serdes_map_fabric_lane118.BCM8892X": "rx238:tx239", "lane_to_serdes_map_fabric_lane119.BCM8892X": "rx239:tx238", - "lane_to_serdes_map_fabric_lane12.BCM8892X": "rx24:tx24", + "lane_to_serdes_map_fabric_lane12.BCM8892X": "rx28:tx28", "lane_to_serdes_map_fabric_lane120.BCM8892X": "rx244:tx244", "lane_to_serdes_map_fabric_lane121.BCM8892X": "rx245:tx245", "lane_to_serdes_map_fabric_lane122.BCM8892X": "rx242:tx242", @@ -1772,131 +1777,131 @@ "lane_to_serdes_map_fabric_lane125.BCM8892X": "rx249:tx249", "lane_to_serdes_map_fabric_lane126.BCM8892X": "rx254:tx254", "lane_to_serdes_map_fabric_lane127.BCM8892X": "rx255:tx255", - "lane_to_serdes_map_fabric_lane128.BCM8892X": "rx260:tx261", - "lane_to_serdes_map_fabric_lane129.BCM8892X": "rx261:tx260", - "lane_to_serdes_map_fabric_lane13.BCM8892X": "rx25:tx25", - "lane_to_serdes_map_fabric_lane130.BCM8892X": "rx258:tx259", - "lane_to_serdes_map_fabric_lane131.BCM8892X": "rx259:tx258", - "lane_to_serdes_map_fabric_lane132.BCM8892X": "rx264:tx265", - "lane_to_serdes_map_fabric_lane133.BCM8892X": "rx265:tx264", - "lane_to_serdes_map_fabric_lane134.BCM8892X": "rx270:tx271", - "lane_to_serdes_map_fabric_lane135.BCM8892X": "rx271:tx270", - "lane_to_serdes_map_fabric_lane136.BCM8892X": "rx276:tx276", - "lane_to_serdes_map_fabric_lane137.BCM8892X": "rx277:tx277", - "lane_to_serdes_map_fabric_lane138.BCM8892X": "rx274:tx274", - "lane_to_serdes_map_fabric_lane139.BCM8892X": "rx275:tx275", - "lane_to_serdes_map_fabric_lane14.BCM8892X": "rx30:tx30", - "lane_to_serdes_map_fabric_lane140.BCM8892X": "rx280:tx280", - "lane_to_serdes_map_fabric_lane141.BCM8892X": "rx281:tx281", - "lane_to_serdes_map_fabric_lane142.BCM8892X": "rx286:tx286", - "lane_to_serdes_map_fabric_lane143.BCM8892X": "rx287:tx287", - "lane_to_serdes_map_fabric_lane144.BCM8892X": "rx288:tx293", - "lane_to_serdes_map_fabric_lane145.BCM8892X": "rx289:tx294", + "lane_to_serdes_map_fabric_lane128.BCM8892X": "rx256:tx257", + "lane_to_serdes_map_fabric_lane129.BCM8892X": "rx257:tx256", + "lane_to_serdes_map_fabric_lane13.BCM8892X": "rx29:tx29", + "lane_to_serdes_map_fabric_lane130.BCM8892X": "rx262:tx263", + "lane_to_serdes_map_fabric_lane131.BCM8892X": "rx263:tx262", + "lane_to_serdes_map_fabric_lane132.BCM8892X": "rx268:tx269", + "lane_to_serdes_map_fabric_lane133.BCM8892X": "rx269:tx268", + "lane_to_serdes_map_fabric_lane134.BCM8892X": "rx266:tx267", + "lane_to_serdes_map_fabric_lane135.BCM8892X": "rx267:tx266", + "lane_to_serdes_map_fabric_lane136.BCM8892X": "rx272:tx272", + "lane_to_serdes_map_fabric_lane137.BCM8892X": "rx273:tx273", + "lane_to_serdes_map_fabric_lane138.BCM8892X": "rx278:tx278", + "lane_to_serdes_map_fabric_lane139.BCM8892X": "rx279:tx279", + "lane_to_serdes_map_fabric_lane14.BCM8892X": "rx26:tx26", + "lane_to_serdes_map_fabric_lane140.BCM8892X": "rx284:tx284", + "lane_to_serdes_map_fabric_lane141.BCM8892X": "rx285:tx285", + "lane_to_serdes_map_fabric_lane142.BCM8892X": "rx282:tx282", + "lane_to_serdes_map_fabric_lane143.BCM8892X": "rx283:tx283", + "lane_to_serdes_map_fabric_lane144.BCM8892X": "rx292:tx289", + "lane_to_serdes_map_fabric_lane145.BCM8892X": "rx293:tx290", "lane_to_serdes_map_fabric_lane146.BCM8892X": "rx290:tx295", "lane_to_serdes_map_fabric_lane147.BCM8892X": "rx291:tx292", - "lane_to_serdes_map_fabric_lane148.BCM8892X": "rx296:tx301", - "lane_to_serdes_map_fabric_lane149.BCM8892X": "rx297:tx302", - "lane_to_serdes_map_fabric_lane15.BCM8892X": "rx31:tx31", + "lane_to_serdes_map_fabric_lane148.BCM8892X": "rx300:tx297", + "lane_to_serdes_map_fabric_lane149.BCM8892X": "rx301:tx298", + "lane_to_serdes_map_fabric_lane15.BCM8892X": "rx27:tx27", "lane_to_serdes_map_fabric_lane150.BCM8892X": "rx298:tx303", "lane_to_serdes_map_fabric_lane151.BCM8892X": "rx299:tx300", - "lane_to_serdes_map_fabric_lane152.BCM8892X": "rx304:tx308", - "lane_to_serdes_map_fabric_lane153.BCM8892X": "rx305:tx309", + "lane_to_serdes_map_fabric_lane152.BCM8892X": "rx308:tx304", + "lane_to_serdes_map_fabric_lane153.BCM8892X": "rx309:tx305", "lane_to_serdes_map_fabric_lane154.BCM8892X": "rx306:tx310", "lane_to_serdes_map_fabric_lane155.BCM8892X": "rx307:tx311", - "lane_to_serdes_map_fabric_lane156.BCM8892X": "rx312:tx316", - "lane_to_serdes_map_fabric_lane157.BCM8892X": "rx313:tx317", + "lane_to_serdes_map_fabric_lane156.BCM8892X": "rx316:tx312", + "lane_to_serdes_map_fabric_lane157.BCM8892X": "rx317:tx313", "lane_to_serdes_map_fabric_lane158.BCM8892X": "rx314:tx318", "lane_to_serdes_map_fabric_lane159.BCM8892X": "rx315:tx319", "lane_to_serdes_map_fabric_lane16.BCM8892X": "rx32:tx33", - "lane_to_serdes_map_fabric_lane160.BCM8892X": "rx320:tx325", - "lane_to_serdes_map_fabric_lane161.BCM8892X": "rx321:tx326", + "lane_to_serdes_map_fabric_lane160.BCM8892X": "rx324:tx321", + "lane_to_serdes_map_fabric_lane161.BCM8892X": "rx325:tx322", "lane_to_serdes_map_fabric_lane162.BCM8892X": "rx322:tx327", "lane_to_serdes_map_fabric_lane163.BCM8892X": "rx323:tx324", - "lane_to_serdes_map_fabric_lane164.BCM8892X": "rx328:tx333", - "lane_to_serdes_map_fabric_lane165.BCM8892X": "rx329:tx334", + "lane_to_serdes_map_fabric_lane164.BCM8892X": "rx332:tx329", + "lane_to_serdes_map_fabric_lane165.BCM8892X": "rx333:tx330", "lane_to_serdes_map_fabric_lane166.BCM8892X": "rx330:tx335", "lane_to_serdes_map_fabric_lane167.BCM8892X": "rx331:tx332", - "lane_to_serdes_map_fabric_lane168.BCM8892X": "rx336:tx340", - "lane_to_serdes_map_fabric_lane169.BCM8892X": "rx337:tx341", + "lane_to_serdes_map_fabric_lane168.BCM8892X": "rx340:tx336", + "lane_to_serdes_map_fabric_lane169.BCM8892X": "rx341:tx337", "lane_to_serdes_map_fabric_lane17.BCM8892X": "rx33:tx34", "lane_to_serdes_map_fabric_lane170.BCM8892X": "rx338:tx342", "lane_to_serdes_map_fabric_lane171.BCM8892X": "rx339:tx343", - "lane_to_serdes_map_fabric_lane172.BCM8892X": "rx344:tx348", - "lane_to_serdes_map_fabric_lane173.BCM8892X": "rx345:tx349", + "lane_to_serdes_map_fabric_lane172.BCM8892X": "rx348:tx344", + "lane_to_serdes_map_fabric_lane173.BCM8892X": "rx349:tx345", "lane_to_serdes_map_fabric_lane174.BCM8892X": "rx346:tx350", "lane_to_serdes_map_fabric_lane175.BCM8892X": "rx347:tx351", - "lane_to_serdes_map_fabric_lane176.BCM8892X": "rx352:tx357", - "lane_to_serdes_map_fabric_lane177.BCM8892X": "rx353:tx358", + "lane_to_serdes_map_fabric_lane176.BCM8892X": "rx356:tx353", + "lane_to_serdes_map_fabric_lane177.BCM8892X": "rx357:tx354", "lane_to_serdes_map_fabric_lane178.BCM8892X": "rx354:tx359", "lane_to_serdes_map_fabric_lane179.BCM8892X": "rx355:tx356", - "lane_to_serdes_map_fabric_lane18.BCM8892X": "rx34:tx35", - "lane_to_serdes_map_fabric_lane180.BCM8892X": "rx360:tx365", - "lane_to_serdes_map_fabric_lane181.BCM8892X": "rx361:tx366", + "lane_to_serdes_map_fabric_lane18.BCM8892X": "rx38:tx39", + "lane_to_serdes_map_fabric_lane180.BCM8892X": "rx364:tx361", + "lane_to_serdes_map_fabric_lane181.BCM8892X": "rx365:tx362", "lane_to_serdes_map_fabric_lane182.BCM8892X": "rx362:tx367", "lane_to_serdes_map_fabric_lane183.BCM8892X": "rx363:tx364", - "lane_to_serdes_map_fabric_lane184.BCM8892X": "rx368:tx372", - "lane_to_serdes_map_fabric_lane185.BCM8892X": "rx369:tx373", + "lane_to_serdes_map_fabric_lane184.BCM8892X": "rx372:tx368", + "lane_to_serdes_map_fabric_lane185.BCM8892X": "rx373:tx369", "lane_to_serdes_map_fabric_lane186.BCM8892X": "rx370:tx374", "lane_to_serdes_map_fabric_lane187.BCM8892X": "rx371:tx375", - "lane_to_serdes_map_fabric_lane188.BCM8892X": "rx376:tx380", - "lane_to_serdes_map_fabric_lane189.BCM8892X": "rx377:tx381", - "lane_to_serdes_map_fabric_lane19.BCM8892X": "rx35:tx32", + "lane_to_serdes_map_fabric_lane188.BCM8892X": "rx380:tx376", + "lane_to_serdes_map_fabric_lane189.BCM8892X": "rx381:tx377", + "lane_to_serdes_map_fabric_lane19.BCM8892X": "rx39:tx36", "lane_to_serdes_map_fabric_lane190.BCM8892X": "rx378:tx382", "lane_to_serdes_map_fabric_lane191.BCM8892X": "rx379:tx383", "lane_to_serdes_map_fabric_lane192.BCM8892X": "rx384:tx389", "lane_to_serdes_map_fabric_lane193.BCM8892X": "rx385:tx390", - "lane_to_serdes_map_fabric_lane194.BCM8892X": "rx386:tx391", - "lane_to_serdes_map_fabric_lane195.BCM8892X": "rx387:tx388", + "lane_to_serdes_map_fabric_lane194.BCM8892X": "rx390:tx387", + "lane_to_serdes_map_fabric_lane195.BCM8892X": "rx391:tx384", "lane_to_serdes_map_fabric_lane196.BCM8892X": "rx392:tx397", "lane_to_serdes_map_fabric_lane197.BCM8892X": "rx393:tx398", - "lane_to_serdes_map_fabric_lane198.BCM8892X": "rx394:tx399", - "lane_to_serdes_map_fabric_lane199.BCM8892X": "rx395:tx396", - "lane_to_serdes_map_fabric_lane2.BCM8892X": "rx2:tx3", + "lane_to_serdes_map_fabric_lane198.BCM8892X": "rx398:tx395", + "lane_to_serdes_map_fabric_lane199.BCM8892X": "rx399:tx392", + "lane_to_serdes_map_fabric_lane2.BCM8892X": "rx6:tx7", "lane_to_serdes_map_fabric_lane20.BCM8892X": "rx44:tx41", "lane_to_serdes_map_fabric_lane200.BCM8892X": "rx400:tx404", "lane_to_serdes_map_fabric_lane201.BCM8892X": "rx401:tx405", - "lane_to_serdes_map_fabric_lane202.BCM8892X": "rx402:tx406", - "lane_to_serdes_map_fabric_lane203.BCM8892X": "rx403:tx407", + "lane_to_serdes_map_fabric_lane202.BCM8892X": "rx406:tx402", + "lane_to_serdes_map_fabric_lane203.BCM8892X": "rx407:tx403", "lane_to_serdes_map_fabric_lane204.BCM8892X": "rx408:tx412", "lane_to_serdes_map_fabric_lane205.BCM8892X": "rx409:tx413", - "lane_to_serdes_map_fabric_lane206.BCM8892X": "rx410:tx414", - "lane_to_serdes_map_fabric_lane207.BCM8892X": "rx411:tx415", + "lane_to_serdes_map_fabric_lane206.BCM8892X": "rx414:tx410", + "lane_to_serdes_map_fabric_lane207.BCM8892X": "rx415:tx411", "lane_to_serdes_map_fabric_lane208.BCM8892X": "rx416:tx421", "lane_to_serdes_map_fabric_lane209.BCM8892X": "rx417:tx422", "lane_to_serdes_map_fabric_lane21.BCM8892X": "rx45:tx42", - "lane_to_serdes_map_fabric_lane210.BCM8892X": "rx418:tx423", - "lane_to_serdes_map_fabric_lane211.BCM8892X": "rx419:tx420", + "lane_to_serdes_map_fabric_lane210.BCM8892X": "rx422:tx419", + "lane_to_serdes_map_fabric_lane211.BCM8892X": "rx423:tx416", "lane_to_serdes_map_fabric_lane212.BCM8892X": "rx424:tx429", "lane_to_serdes_map_fabric_lane213.BCM8892X": "rx425:tx430", - "lane_to_serdes_map_fabric_lane214.BCM8892X": "rx426:tx431", - "lane_to_serdes_map_fabric_lane215.BCM8892X": "rx427:tx428", + "lane_to_serdes_map_fabric_lane214.BCM8892X": "rx430:tx427", + "lane_to_serdes_map_fabric_lane215.BCM8892X": "rx431:tx424", "lane_to_serdes_map_fabric_lane216.BCM8892X": "rx432:tx436", "lane_to_serdes_map_fabric_lane217.BCM8892X": "rx433:tx437", - "lane_to_serdes_map_fabric_lane218.BCM8892X": "rx434:tx438", - "lane_to_serdes_map_fabric_lane219.BCM8892X": "rx435:tx439", - "lane_to_serdes_map_fabric_lane22.BCM8892X": "rx46:tx43", + "lane_to_serdes_map_fabric_lane218.BCM8892X": "rx438:tx434", + "lane_to_serdes_map_fabric_lane219.BCM8892X": "rx439:tx435", + "lane_to_serdes_map_fabric_lane22.BCM8892X": "rx42:tx47", "lane_to_serdes_map_fabric_lane220.BCM8892X": "rx440:tx444", "lane_to_serdes_map_fabric_lane221.BCM8892X": "rx441:tx445", - "lane_to_serdes_map_fabric_lane222.BCM8892X": "rx442:tx446", - "lane_to_serdes_map_fabric_lane223.BCM8892X": "rx443:tx447", + "lane_to_serdes_map_fabric_lane222.BCM8892X": "rx446:tx442", + "lane_to_serdes_map_fabric_lane223.BCM8892X": "rx447:tx443", "lane_to_serdes_map_fabric_lane224.BCM8892X": "rx448:tx453", "lane_to_serdes_map_fabric_lane225.BCM8892X": "rx449:tx454", - "lane_to_serdes_map_fabric_lane226.BCM8892X": "rx450:tx455", - "lane_to_serdes_map_fabric_lane227.BCM8892X": "rx451:tx452", + "lane_to_serdes_map_fabric_lane226.BCM8892X": "rx454:tx451", + "lane_to_serdes_map_fabric_lane227.BCM8892X": "rx455:tx448", "lane_to_serdes_map_fabric_lane228.BCM8892X": "rx456:tx461", "lane_to_serdes_map_fabric_lane229.BCM8892X": "rx457:tx462", - "lane_to_serdes_map_fabric_lane23.BCM8892X": "rx47:tx40", - "lane_to_serdes_map_fabric_lane230.BCM8892X": "rx458:tx463", - "lane_to_serdes_map_fabric_lane231.BCM8892X": "rx459:tx460", + "lane_to_serdes_map_fabric_lane23.BCM8892X": "rx43:tx44", + "lane_to_serdes_map_fabric_lane230.BCM8892X": "rx462:tx459", + "lane_to_serdes_map_fabric_lane231.BCM8892X": "rx463:tx456", "lane_to_serdes_map_fabric_lane232.BCM8892X": "rx464:tx468", "lane_to_serdes_map_fabric_lane233.BCM8892X": "rx465:tx469", - "lane_to_serdes_map_fabric_lane234.BCM8892X": "rx466:tx470", - "lane_to_serdes_map_fabric_lane235.BCM8892X": "rx467:tx471", + "lane_to_serdes_map_fabric_lane234.BCM8892X": "rx470:tx466", + "lane_to_serdes_map_fabric_lane235.BCM8892X": "rx471:tx467", "lane_to_serdes_map_fabric_lane236.BCM8892X": "rx476:tx476", "lane_to_serdes_map_fabric_lane237.BCM8892X": "rx477:tx477", - "lane_to_serdes_map_fabric_lane238.BCM8892X": "rx478:tx478", - "lane_to_serdes_map_fabric_lane239.BCM8892X": "rx479:tx479", - "lane_to_serdes_map_fabric_lane24.BCM8892X": "rx48:tx52", + "lane_to_serdes_map_fabric_lane238.BCM8892X": "rx474:tx474", + "lane_to_serdes_map_fabric_lane239.BCM8892X": "rx475:tx475", + "lane_to_serdes_map_fabric_lane24.BCM8892X": "rx52:tx48", "lane_to_serdes_map_fabric_lane240.BCM8892X": "rx480:tx481", "lane_to_serdes_map_fabric_lane241.BCM8892X": "rx481:tx480", "lane_to_serdes_map_fabric_lane242.BCM8892X": "rx486:tx487", @@ -1907,140 +1912,140 @@ "lane_to_serdes_map_fabric_lane247.BCM8892X": "rx491:tx490", "lane_to_serdes_map_fabric_lane248.BCM8892X": "rx496:tx496", "lane_to_serdes_map_fabric_lane249.BCM8892X": "rx497:tx497", - "lane_to_serdes_map_fabric_lane25.BCM8892X": "rx49:tx53", + "lane_to_serdes_map_fabric_lane25.BCM8892X": "rx53:tx49", "lane_to_serdes_map_fabric_lane250.BCM8892X": "rx502:tx502", "lane_to_serdes_map_fabric_lane251.BCM8892X": "rx503:tx503", "lane_to_serdes_map_fabric_lane252.BCM8892X": "rx508:tx508", "lane_to_serdes_map_fabric_lane253.BCM8892X": "rx509:tx509", "lane_to_serdes_map_fabric_lane254.BCM8892X": "rx506:tx506", "lane_to_serdes_map_fabric_lane255.BCM8892X": "rx507:tx507", - "lane_to_serdes_map_fabric_lane256.BCM8892X": "rx0:tx1", - "lane_to_serdes_map_fabric_lane257.BCM8892X": "rx1:tx0", - "lane_to_serdes_map_fabric_lane258.BCM8892X": "rx6:tx7", - "lane_to_serdes_map_fabric_lane259.BCM8892X": "rx7:tx6", + "lane_to_serdes_map_fabric_lane256.BCM8892X": "rx4:tx5", + "lane_to_serdes_map_fabric_lane257.BCM8892X": "rx5:tx4", + "lane_to_serdes_map_fabric_lane258.BCM8892X": "rx2:tx3", + "lane_to_serdes_map_fabric_lane259.BCM8892X": "rx3:tx2", "lane_to_serdes_map_fabric_lane26.BCM8892X": "rx50:tx54", - "lane_to_serdes_map_fabric_lane260.BCM8892X": "rx12:tx13", - "lane_to_serdes_map_fabric_lane261.BCM8892X": "rx13:tx12", - "lane_to_serdes_map_fabric_lane262.BCM8892X": "rx10:tx11", - "lane_to_serdes_map_fabric_lane263.BCM8892X": "rx11:tx10", - "lane_to_serdes_map_fabric_lane264.BCM8892X": "rx16:tx16", - "lane_to_serdes_map_fabric_lane265.BCM8892X": "rx17:tx17", - "lane_to_serdes_map_fabric_lane266.BCM8892X": "rx22:tx22", - "lane_to_serdes_map_fabric_lane267.BCM8892X": "rx23:tx23", - "lane_to_serdes_map_fabric_lane268.BCM8892X": "rx28:tx28", - "lane_to_serdes_map_fabric_lane269.BCM8892X": "rx29:tx29", + "lane_to_serdes_map_fabric_lane260.BCM8892X": "rx8:tx9", + "lane_to_serdes_map_fabric_lane261.BCM8892X": "rx9:tx8", + "lane_to_serdes_map_fabric_lane262.BCM8892X": "rx14:tx15", + "lane_to_serdes_map_fabric_lane263.BCM8892X": "rx15:tx14", + "lane_to_serdes_map_fabric_lane264.BCM8892X": "rx20:tx20", + "lane_to_serdes_map_fabric_lane265.BCM8892X": "rx21:tx21", + "lane_to_serdes_map_fabric_lane266.BCM8892X": "rx18:tx18", + "lane_to_serdes_map_fabric_lane267.BCM8892X": "rx19:tx19", + "lane_to_serdes_map_fabric_lane268.BCM8892X": "rx24:tx24", + "lane_to_serdes_map_fabric_lane269.BCM8892X": "rx25:tx25", "lane_to_serdes_map_fabric_lane27.BCM8892X": "rx51:tx55", - "lane_to_serdes_map_fabric_lane270.BCM8892X": "rx26:tx26", - "lane_to_serdes_map_fabric_lane271.BCM8892X": "rx27:tx27", + "lane_to_serdes_map_fabric_lane270.BCM8892X": "rx30:tx30", + "lane_to_serdes_map_fabric_lane271.BCM8892X": "rx31:tx31", "lane_to_serdes_map_fabric_lane272.BCM8892X": "rx36:tx37", "lane_to_serdes_map_fabric_lane273.BCM8892X": "rx37:tx38", - "lane_to_serdes_map_fabric_lane274.BCM8892X": "rx38:tx39", - "lane_to_serdes_map_fabric_lane275.BCM8892X": "rx39:tx36", + "lane_to_serdes_map_fabric_lane274.BCM8892X": "rx34:tx35", + "lane_to_serdes_map_fabric_lane275.BCM8892X": "rx35:tx32", "lane_to_serdes_map_fabric_lane276.BCM8892X": "rx40:tx45", "lane_to_serdes_map_fabric_lane277.BCM8892X": "rx41:tx46", - "lane_to_serdes_map_fabric_lane278.BCM8892X": "rx42:tx47", - "lane_to_serdes_map_fabric_lane279.BCM8892X": "rx43:tx44", - "lane_to_serdes_map_fabric_lane28.BCM8892X": "rx56:tx60", - "lane_to_serdes_map_fabric_lane280.BCM8892X": "rx52:tx48", - "lane_to_serdes_map_fabric_lane281.BCM8892X": "rx53:tx49", + "lane_to_serdes_map_fabric_lane278.BCM8892X": "rx46:tx43", + "lane_to_serdes_map_fabric_lane279.BCM8892X": "rx47:tx40", + "lane_to_serdes_map_fabric_lane28.BCM8892X": "rx60:tx56", + "lane_to_serdes_map_fabric_lane280.BCM8892X": "rx48:tx52", + "lane_to_serdes_map_fabric_lane281.BCM8892X": "rx49:tx53", "lane_to_serdes_map_fabric_lane282.BCM8892X": "rx54:tx50", "lane_to_serdes_map_fabric_lane283.BCM8892X": "rx55:tx51", - "lane_to_serdes_map_fabric_lane284.BCM8892X": "rx60:tx56", - "lane_to_serdes_map_fabric_lane285.BCM8892X": "rx61:tx57", + "lane_to_serdes_map_fabric_lane284.BCM8892X": "rx56:tx60", + "lane_to_serdes_map_fabric_lane285.BCM8892X": "rx57:tx61", "lane_to_serdes_map_fabric_lane286.BCM8892X": "rx62:tx58", "lane_to_serdes_map_fabric_lane287.BCM8892X": "rx63:tx59", - "lane_to_serdes_map_fabric_lane288.BCM8892X": "rx68:tx65", - "lane_to_serdes_map_fabric_lane289.BCM8892X": "rx69:tx66", - "lane_to_serdes_map_fabric_lane29.BCM8892X": "rx57:tx61", + "lane_to_serdes_map_fabric_lane288.BCM8892X": "rx64:tx69", + "lane_to_serdes_map_fabric_lane289.BCM8892X": "rx65:tx70", + "lane_to_serdes_map_fabric_lane29.BCM8892X": "rx61:tx57", "lane_to_serdes_map_fabric_lane290.BCM8892X": "rx70:tx67", "lane_to_serdes_map_fabric_lane291.BCM8892X": "rx71:tx64", - "lane_to_serdes_map_fabric_lane292.BCM8892X": "rx76:tx73", - "lane_to_serdes_map_fabric_lane293.BCM8892X": "rx77:tx74", + "lane_to_serdes_map_fabric_lane292.BCM8892X": "rx72:tx77", + "lane_to_serdes_map_fabric_lane293.BCM8892X": "rx73:tx78", "lane_to_serdes_map_fabric_lane294.BCM8892X": "rx78:tx75", "lane_to_serdes_map_fabric_lane295.BCM8892X": "rx79:tx72", - "lane_to_serdes_map_fabric_lane296.BCM8892X": "rx84:tx80", - "lane_to_serdes_map_fabric_lane297.BCM8892X": "rx85:tx81", + "lane_to_serdes_map_fabric_lane296.BCM8892X": "rx80:tx84", + "lane_to_serdes_map_fabric_lane297.BCM8892X": "rx81:tx85", "lane_to_serdes_map_fabric_lane298.BCM8892X": "rx86:tx82", "lane_to_serdes_map_fabric_lane299.BCM8892X": "rx87:tx83", - "lane_to_serdes_map_fabric_lane3.BCM8892X": "rx3:tx2", + "lane_to_serdes_map_fabric_lane3.BCM8892X": "rx7:tx6", "lane_to_serdes_map_fabric_lane30.BCM8892X": "rx58:tx62", - "lane_to_serdes_map_fabric_lane300.BCM8892X": "rx92:tx88", - "lane_to_serdes_map_fabric_lane301.BCM8892X": "rx93:tx89", + "lane_to_serdes_map_fabric_lane300.BCM8892X": "rx88:tx92", + "lane_to_serdes_map_fabric_lane301.BCM8892X": "rx89:tx93", "lane_to_serdes_map_fabric_lane302.BCM8892X": "rx94:tx90", "lane_to_serdes_map_fabric_lane303.BCM8892X": "rx95:tx91", - "lane_to_serdes_map_fabric_lane304.BCM8892X": "rx100:tx97", - "lane_to_serdes_map_fabric_lane305.BCM8892X": "rx101:tx98", + "lane_to_serdes_map_fabric_lane304.BCM8892X": "rx96:tx101", + "lane_to_serdes_map_fabric_lane305.BCM8892X": "rx97:tx102", "lane_to_serdes_map_fabric_lane306.BCM8892X": "rx102:tx99", "lane_to_serdes_map_fabric_lane307.BCM8892X": "rx103:tx96", - "lane_to_serdes_map_fabric_lane308.BCM8892X": "rx108:tx105", - "lane_to_serdes_map_fabric_lane309.BCM8892X": "rx109:tx106", + "lane_to_serdes_map_fabric_lane308.BCM8892X": "rx104:tx109", + "lane_to_serdes_map_fabric_lane309.BCM8892X": "rx105:tx110", "lane_to_serdes_map_fabric_lane31.BCM8892X": "rx59:tx63", "lane_to_serdes_map_fabric_lane310.BCM8892X": "rx110:tx107", "lane_to_serdes_map_fabric_lane311.BCM8892X": "rx111:tx104", - "lane_to_serdes_map_fabric_lane312.BCM8892X": "rx116:tx112", - "lane_to_serdes_map_fabric_lane313.BCM8892X": "rx117:tx113", + "lane_to_serdes_map_fabric_lane312.BCM8892X": "rx112:tx116", + "lane_to_serdes_map_fabric_lane313.BCM8892X": "rx113:tx117", "lane_to_serdes_map_fabric_lane314.BCM8892X": "rx118:tx114", "lane_to_serdes_map_fabric_lane315.BCM8892X": "rx119:tx115", - "lane_to_serdes_map_fabric_lane316.BCM8892X": "rx124:tx120", - "lane_to_serdes_map_fabric_lane317.BCM8892X": "rx125:tx121", + "lane_to_serdes_map_fabric_lane316.BCM8892X": "rx120:tx124", + "lane_to_serdes_map_fabric_lane317.BCM8892X": "rx121:tx125", "lane_to_serdes_map_fabric_lane318.BCM8892X": "rx126:tx122", "lane_to_serdes_map_fabric_lane319.BCM8892X": "rx127:tx123", - "lane_to_serdes_map_fabric_lane32.BCM8892X": "rx64:tx69", + "lane_to_serdes_map_fabric_lane32.BCM8892X": "rx68:tx65", "lane_to_serdes_map_fabric_lane320.BCM8892X": "rx132:tx129", "lane_to_serdes_map_fabric_lane321.BCM8892X": "rx133:tx130", - "lane_to_serdes_map_fabric_lane322.BCM8892X": "rx134:tx131", - "lane_to_serdes_map_fabric_lane323.BCM8892X": "rx135:tx128", + "lane_to_serdes_map_fabric_lane322.BCM8892X": "rx130:tx135", + "lane_to_serdes_map_fabric_lane323.BCM8892X": "rx131:tx132", "lane_to_serdes_map_fabric_lane324.BCM8892X": "rx140:tx137", "lane_to_serdes_map_fabric_lane325.BCM8892X": "rx141:tx138", - "lane_to_serdes_map_fabric_lane326.BCM8892X": "rx142:tx139", - "lane_to_serdes_map_fabric_lane327.BCM8892X": "rx143:tx136", + "lane_to_serdes_map_fabric_lane326.BCM8892X": "rx138:tx143", + "lane_to_serdes_map_fabric_lane327.BCM8892X": "rx139:tx140", "lane_to_serdes_map_fabric_lane328.BCM8892X": "rx148:tx144", "lane_to_serdes_map_fabric_lane329.BCM8892X": "rx149:tx145", - "lane_to_serdes_map_fabric_lane33.BCM8892X": "rx65:tx70", - "lane_to_serdes_map_fabric_lane330.BCM8892X": "rx150:tx146", - "lane_to_serdes_map_fabric_lane331.BCM8892X": "rx151:tx147", + "lane_to_serdes_map_fabric_lane33.BCM8892X": "rx69:tx66", + "lane_to_serdes_map_fabric_lane330.BCM8892X": "rx146:tx150", + "lane_to_serdes_map_fabric_lane331.BCM8892X": "rx147:tx151", "lane_to_serdes_map_fabric_lane332.BCM8892X": "rx156:tx152", "lane_to_serdes_map_fabric_lane333.BCM8892X": "rx157:tx153", - "lane_to_serdes_map_fabric_lane334.BCM8892X": "rx158:tx154", - "lane_to_serdes_map_fabric_lane335.BCM8892X": "rx159:tx155", + "lane_to_serdes_map_fabric_lane334.BCM8892X": "rx154:tx158", + "lane_to_serdes_map_fabric_lane335.BCM8892X": "rx155:tx159", "lane_to_serdes_map_fabric_lane336.BCM8892X": "rx164:tx161", "lane_to_serdes_map_fabric_lane337.BCM8892X": "rx165:tx162", - "lane_to_serdes_map_fabric_lane338.BCM8892X": "rx166:tx163", - "lane_to_serdes_map_fabric_lane339.BCM8892X": "rx167:tx160", + "lane_to_serdes_map_fabric_lane338.BCM8892X": "rx162:tx167", + "lane_to_serdes_map_fabric_lane339.BCM8892X": "rx163:tx164", "lane_to_serdes_map_fabric_lane34.BCM8892X": "rx66:tx71", "lane_to_serdes_map_fabric_lane340.BCM8892X": "rx172:tx169", "lane_to_serdes_map_fabric_lane341.BCM8892X": "rx173:tx170", - "lane_to_serdes_map_fabric_lane342.BCM8892X": "rx174:tx171", - "lane_to_serdes_map_fabric_lane343.BCM8892X": "rx175:tx168", + "lane_to_serdes_map_fabric_lane342.BCM8892X": "rx170:tx175", + "lane_to_serdes_map_fabric_lane343.BCM8892X": "rx171:tx172", "lane_to_serdes_map_fabric_lane344.BCM8892X": "rx180:tx176", "lane_to_serdes_map_fabric_lane345.BCM8892X": "rx181:tx177", - "lane_to_serdes_map_fabric_lane346.BCM8892X": "rx182:tx178", - "lane_to_serdes_map_fabric_lane347.BCM8892X": "rx183:tx179", + "lane_to_serdes_map_fabric_lane346.BCM8892X": "rx178:tx182", + "lane_to_serdes_map_fabric_lane347.BCM8892X": "rx179:tx183", "lane_to_serdes_map_fabric_lane348.BCM8892X": "rx188:tx184", "lane_to_serdes_map_fabric_lane349.BCM8892X": "rx189:tx185", "lane_to_serdes_map_fabric_lane35.BCM8892X": "rx67:tx68", - "lane_to_serdes_map_fabric_lane350.BCM8892X": "rx190:tx186", - "lane_to_serdes_map_fabric_lane351.BCM8892X": "rx191:tx187", + "lane_to_serdes_map_fabric_lane350.BCM8892X": "rx186:tx190", + "lane_to_serdes_map_fabric_lane351.BCM8892X": "rx187:tx191", "lane_to_serdes_map_fabric_lane352.BCM8892X": "rx196:tx193", "lane_to_serdes_map_fabric_lane353.BCM8892X": "rx197:tx194", - "lane_to_serdes_map_fabric_lane354.BCM8892X": "rx198:tx195", - "lane_to_serdes_map_fabric_lane355.BCM8892X": "rx199:tx192", + "lane_to_serdes_map_fabric_lane354.BCM8892X": "rx194:tx199", + "lane_to_serdes_map_fabric_lane355.BCM8892X": "rx195:tx196", "lane_to_serdes_map_fabric_lane356.BCM8892X": "rx204:tx201", "lane_to_serdes_map_fabric_lane357.BCM8892X": "rx205:tx202", - "lane_to_serdes_map_fabric_lane358.BCM8892X": "rx206:tx203", - "lane_to_serdes_map_fabric_lane359.BCM8892X": "rx207:tx200", - "lane_to_serdes_map_fabric_lane36.BCM8892X": "rx72:tx77", + "lane_to_serdes_map_fabric_lane358.BCM8892X": "rx202:tx207", + "lane_to_serdes_map_fabric_lane359.BCM8892X": "rx203:tx204", + "lane_to_serdes_map_fabric_lane36.BCM8892X": "rx76:tx73", "lane_to_serdes_map_fabric_lane360.BCM8892X": "rx212:tx208", "lane_to_serdes_map_fabric_lane361.BCM8892X": "rx213:tx209", - "lane_to_serdes_map_fabric_lane362.BCM8892X": "rx214:tx210", - "lane_to_serdes_map_fabric_lane363.BCM8892X": "rx215:tx211", + "lane_to_serdes_map_fabric_lane362.BCM8892X": "rx210:tx214", + "lane_to_serdes_map_fabric_lane363.BCM8892X": "rx211:tx215", "lane_to_serdes_map_fabric_lane364.BCM8892X": "rx220:tx216", "lane_to_serdes_map_fabric_lane365.BCM8892X": "rx221:tx217", - "lane_to_serdes_map_fabric_lane366.BCM8892X": "rx222:tx218", - "lane_to_serdes_map_fabric_lane367.BCM8892X": "rx223:tx219", + "lane_to_serdes_map_fabric_lane366.BCM8892X": "rx218:tx222", + "lane_to_serdes_map_fabric_lane367.BCM8892X": "rx219:tx223", "lane_to_serdes_map_fabric_lane368.BCM8892X": "rx224:tx225", "lane_to_serdes_map_fabric_lane369.BCM8892X": "rx225:tx224", - "lane_to_serdes_map_fabric_lane37.BCM8892X": "rx73:tx78", + "lane_to_serdes_map_fabric_lane37.BCM8892X": "rx77:tx74", "lane_to_serdes_map_fabric_lane370.BCM8892X": "rx230:tx231", "lane_to_serdes_map_fabric_lane371.BCM8892X": "rx231:tx230", "lane_to_serdes_map_fabric_lane372.BCM8892X": "rx236:tx237", @@ -2056,135 +2061,135 @@ "lane_to_serdes_map_fabric_lane381.BCM8892X": "rx253:tx253", "lane_to_serdes_map_fabric_lane382.BCM8892X": "rx250:tx250", "lane_to_serdes_map_fabric_lane383.BCM8892X": "rx251:tx251", - "lane_to_serdes_map_fabric_lane384.BCM8892X": "rx256:tx257", - "lane_to_serdes_map_fabric_lane385.BCM8892X": "rx257:tx256", - "lane_to_serdes_map_fabric_lane386.BCM8892X": "rx262:tx263", - "lane_to_serdes_map_fabric_lane387.BCM8892X": "rx263:tx262", - "lane_to_serdes_map_fabric_lane388.BCM8892X": "rx268:tx269", - "lane_to_serdes_map_fabric_lane389.BCM8892X": "rx269:tx268", + "lane_to_serdes_map_fabric_lane384.BCM8892X": "rx260:tx261", + "lane_to_serdes_map_fabric_lane385.BCM8892X": "rx261:tx260", + "lane_to_serdes_map_fabric_lane386.BCM8892X": "rx258:tx259", + "lane_to_serdes_map_fabric_lane387.BCM8892X": "rx259:tx258", + "lane_to_serdes_map_fabric_lane388.BCM8892X": "rx264:tx265", + "lane_to_serdes_map_fabric_lane389.BCM8892X": "rx265:tx264", "lane_to_serdes_map_fabric_lane39.BCM8892X": "rx75:tx76", - "lane_to_serdes_map_fabric_lane390.BCM8892X": "rx266:tx267", - "lane_to_serdes_map_fabric_lane391.BCM8892X": "rx267:tx266", - "lane_to_serdes_map_fabric_lane392.BCM8892X": "rx272:tx272", - "lane_to_serdes_map_fabric_lane393.BCM8892X": "rx273:tx273", - "lane_to_serdes_map_fabric_lane394.BCM8892X": "rx278:tx278", - "lane_to_serdes_map_fabric_lane395.BCM8892X": "rx279:tx279", - "lane_to_serdes_map_fabric_lane396.BCM8892X": "rx284:tx284", - "lane_to_serdes_map_fabric_lane397.BCM8892X": "rx285:tx285", - "lane_to_serdes_map_fabric_lane398.BCM8892X": "rx282:tx282", - "lane_to_serdes_map_fabric_lane399.BCM8892X": "rx283:tx283", - "lane_to_serdes_map_fabric_lane4.BCM8892X": "rx8:tx9", - "lane_to_serdes_map_fabric_lane40.BCM8892X": "rx80:tx84", - "lane_to_serdes_map_fabric_lane400.BCM8892X": "rx292:tx289", - "lane_to_serdes_map_fabric_lane401.BCM8892X": "rx293:tx290", + "lane_to_serdes_map_fabric_lane390.BCM8892X": "rx270:tx271", + "lane_to_serdes_map_fabric_lane391.BCM8892X": "rx271:tx270", + "lane_to_serdes_map_fabric_lane392.BCM8892X": "rx276:tx276", + "lane_to_serdes_map_fabric_lane393.BCM8892X": "rx277:tx277", + "lane_to_serdes_map_fabric_lane394.BCM8892X": "rx274:tx274", + "lane_to_serdes_map_fabric_lane395.BCM8892X": "rx275:tx275", + "lane_to_serdes_map_fabric_lane396.BCM8892X": "rx280:tx280", + "lane_to_serdes_map_fabric_lane397.BCM8892X": "rx281:tx281", + "lane_to_serdes_map_fabric_lane398.BCM8892X": "rx286:tx286", + "lane_to_serdes_map_fabric_lane399.BCM8892X": "rx287:tx287", + "lane_to_serdes_map_fabric_lane4.BCM8892X": "rx12:tx13", + "lane_to_serdes_map_fabric_lane40.BCM8892X": "rx84:tx80", + "lane_to_serdes_map_fabric_lane400.BCM8892X": "rx288:tx293", + "lane_to_serdes_map_fabric_lane401.BCM8892X": "rx289:tx294", "lane_to_serdes_map_fabric_lane402.BCM8892X": "rx294:tx291", "lane_to_serdes_map_fabric_lane403.BCM8892X": "rx295:tx288", - "lane_to_serdes_map_fabric_lane404.BCM8892X": "rx300:tx297", - "lane_to_serdes_map_fabric_lane405.BCM8892X": "rx301:tx298", + "lane_to_serdes_map_fabric_lane404.BCM8892X": "rx296:tx301", + "lane_to_serdes_map_fabric_lane405.BCM8892X": "rx297:tx302", "lane_to_serdes_map_fabric_lane406.BCM8892X": "rx302:tx299", "lane_to_serdes_map_fabric_lane407.BCM8892X": "rx303:tx296", - "lane_to_serdes_map_fabric_lane408.BCM8892X": "rx308:tx304", - "lane_to_serdes_map_fabric_lane409.BCM8892X": "rx309:tx305", - "lane_to_serdes_map_fabric_lane41.BCM8892X": "rx81:tx85", + "lane_to_serdes_map_fabric_lane408.BCM8892X": "rx304:tx308", + "lane_to_serdes_map_fabric_lane409.BCM8892X": "rx305:tx309", + "lane_to_serdes_map_fabric_lane41.BCM8892X": "rx85:tx81", "lane_to_serdes_map_fabric_lane410.BCM8892X": "rx310:tx306", "lane_to_serdes_map_fabric_lane411.BCM8892X": "rx311:tx307", - "lane_to_serdes_map_fabric_lane412.BCM8892X": "rx316:tx312", - "lane_to_serdes_map_fabric_lane413.BCM8892X": "rx317:tx313", + "lane_to_serdes_map_fabric_lane412.BCM8892X": "rx312:tx316", + "lane_to_serdes_map_fabric_lane413.BCM8892X": "rx313:tx317", "lane_to_serdes_map_fabric_lane414.BCM8892X": "rx318:tx314", "lane_to_serdes_map_fabric_lane415.BCM8892X": "rx319:tx315", - "lane_to_serdes_map_fabric_lane416.BCM8892X": "rx324:tx321", - "lane_to_serdes_map_fabric_lane417.BCM8892X": "rx325:tx322", + "lane_to_serdes_map_fabric_lane416.BCM8892X": "rx320:tx325", + "lane_to_serdes_map_fabric_lane417.BCM8892X": "rx321:tx326", "lane_to_serdes_map_fabric_lane418.BCM8892X": "rx326:tx323", "lane_to_serdes_map_fabric_lane419.BCM8892X": "rx327:tx320", "lane_to_serdes_map_fabric_lane42.BCM8892X": "rx82:tx86", - "lane_to_serdes_map_fabric_lane420.BCM8892X": "rx332:tx329", - "lane_to_serdes_map_fabric_lane421.BCM8892X": "rx333:tx330", + "lane_to_serdes_map_fabric_lane420.BCM8892X": "rx328:tx333", + "lane_to_serdes_map_fabric_lane421.BCM8892X": "rx329:tx334", "lane_to_serdes_map_fabric_lane422.BCM8892X": "rx334:tx331", "lane_to_serdes_map_fabric_lane423.BCM8892X": "rx335:tx328", - "lane_to_serdes_map_fabric_lane424.BCM8892X": "rx340:tx336", - "lane_to_serdes_map_fabric_lane425.BCM8892X": "rx341:tx337", + "lane_to_serdes_map_fabric_lane424.BCM8892X": "rx336:tx340", + "lane_to_serdes_map_fabric_lane425.BCM8892X": "rx337:tx341", "lane_to_serdes_map_fabric_lane426.BCM8892X": "rx342:tx338", "lane_to_serdes_map_fabric_lane427.BCM8892X": "rx343:tx339", - "lane_to_serdes_map_fabric_lane428.BCM8892X": "rx348:tx344", - "lane_to_serdes_map_fabric_lane429.BCM8892X": "rx349:tx345", + "lane_to_serdes_map_fabric_lane428.BCM8892X": "rx344:tx348", + "lane_to_serdes_map_fabric_lane429.BCM8892X": "rx345:tx349", "lane_to_serdes_map_fabric_lane43.BCM8892X": "rx83:tx87", "lane_to_serdes_map_fabric_lane430.BCM8892X": "rx350:tx346", "lane_to_serdes_map_fabric_lane431.BCM8892X": "rx351:tx347", - "lane_to_serdes_map_fabric_lane432.BCM8892X": "rx356:tx353", - "lane_to_serdes_map_fabric_lane433.BCM8892X": "rx357:tx354", + "lane_to_serdes_map_fabric_lane432.BCM8892X": "rx352:tx357", + "lane_to_serdes_map_fabric_lane433.BCM8892X": "rx353:tx358", "lane_to_serdes_map_fabric_lane434.BCM8892X": "rx358:tx355", "lane_to_serdes_map_fabric_lane435.BCM8892X": "rx359:tx352", - "lane_to_serdes_map_fabric_lane436.BCM8892X": "rx364:tx361", - "lane_to_serdes_map_fabric_lane437.BCM8892X": "rx365:tx362", + "lane_to_serdes_map_fabric_lane436.BCM8892X": "rx360:tx365", + "lane_to_serdes_map_fabric_lane437.BCM8892X": "rx361:tx366", "lane_to_serdes_map_fabric_lane438.BCM8892X": "rx366:tx363", "lane_to_serdes_map_fabric_lane439.BCM8892X": "rx367:tx360", - "lane_to_serdes_map_fabric_lane44.BCM8892X": "rx88:tx92", - "lane_to_serdes_map_fabric_lane440.BCM8892X": "rx372:tx368", - "lane_to_serdes_map_fabric_lane441.BCM8892X": "rx373:tx369", + "lane_to_serdes_map_fabric_lane44.BCM8892X": "rx92:tx88", + "lane_to_serdes_map_fabric_lane440.BCM8892X": "rx368:tx372", + "lane_to_serdes_map_fabric_lane441.BCM8892X": "rx369:tx373", "lane_to_serdes_map_fabric_lane442.BCM8892X": "rx374:tx370", "lane_to_serdes_map_fabric_lane443.BCM8892X": "rx375:tx371", - "lane_to_serdes_map_fabric_lane444.BCM8892X": "rx380:tx376", - "lane_to_serdes_map_fabric_lane445.BCM8892X": "rx381:tx377", + "lane_to_serdes_map_fabric_lane444.BCM8892X": "rx376:tx380", + "lane_to_serdes_map_fabric_lane445.BCM8892X": "rx377:tx381", "lane_to_serdes_map_fabric_lane446.BCM8892X": "rx382:tx378", "lane_to_serdes_map_fabric_lane447.BCM8892X": "rx383:tx379", "lane_to_serdes_map_fabric_lane448.BCM8892X": "rx388:tx385", "lane_to_serdes_map_fabric_lane449.BCM8892X": "rx389:tx386", - "lane_to_serdes_map_fabric_lane45.BCM8892X": "rx89:tx93", - "lane_to_serdes_map_fabric_lane450.BCM8892X": "rx390:tx387", - "lane_to_serdes_map_fabric_lane451.BCM8892X": "rx391:tx384", + "lane_to_serdes_map_fabric_lane45.BCM8892X": "rx93:tx89", + "lane_to_serdes_map_fabric_lane450.BCM8892X": "rx386:tx391", + "lane_to_serdes_map_fabric_lane451.BCM8892X": "rx387:tx388", "lane_to_serdes_map_fabric_lane452.BCM8892X": "rx396:tx393", "lane_to_serdes_map_fabric_lane453.BCM8892X": "rx397:tx394", - "lane_to_serdes_map_fabric_lane454.BCM8892X": "rx398:tx395", - "lane_to_serdes_map_fabric_lane455.BCM8892X": "rx399:tx392", + "lane_to_serdes_map_fabric_lane454.BCM8892X": "rx394:tx399", + "lane_to_serdes_map_fabric_lane455.BCM8892X": "rx395:tx396", "lane_to_serdes_map_fabric_lane456.BCM8892X": "rx404:tx400", "lane_to_serdes_map_fabric_lane457.BCM8892X": "rx405:tx401", - "lane_to_serdes_map_fabric_lane458.BCM8892X": "rx406:tx402", - "lane_to_serdes_map_fabric_lane459.BCM8892X": "rx407:tx403", + "lane_to_serdes_map_fabric_lane458.BCM8892X": "rx402:tx406", + "lane_to_serdes_map_fabric_lane459.BCM8892X": "rx403:tx407", "lane_to_serdes_map_fabric_lane46.BCM8892X": "rx90:tx94", "lane_to_serdes_map_fabric_lane460.BCM8892X": "rx412:tx408", "lane_to_serdes_map_fabric_lane461.BCM8892X": "rx413:tx409", - "lane_to_serdes_map_fabric_lane462.BCM8892X": "rx414:tx410", - "lane_to_serdes_map_fabric_lane463.BCM8892X": "rx415:tx411", + "lane_to_serdes_map_fabric_lane462.BCM8892X": "rx410:tx414", + "lane_to_serdes_map_fabric_lane463.BCM8892X": "rx411:tx415", "lane_to_serdes_map_fabric_lane464.BCM8892X": "rx420:tx417", "lane_to_serdes_map_fabric_lane465.BCM8892X": "rx421:tx418", - "lane_to_serdes_map_fabric_lane466.BCM8892X": "rx422:tx419", - "lane_to_serdes_map_fabric_lane467.BCM8892X": "rx423:tx416", + "lane_to_serdes_map_fabric_lane466.BCM8892X": "rx418:tx423", + "lane_to_serdes_map_fabric_lane467.BCM8892X": "rx419:tx420", "lane_to_serdes_map_fabric_lane468.BCM8892X": "rx428:tx425", "lane_to_serdes_map_fabric_lane469.BCM8892X": "rx429:tx426", "lane_to_serdes_map_fabric_lane47.BCM8892X": "rx91:tx95", - "lane_to_serdes_map_fabric_lane470.BCM8892X": "rx430:tx427", - "lane_to_serdes_map_fabric_lane471.BCM8892X": "rx431:tx424", + "lane_to_serdes_map_fabric_lane470.BCM8892X": "rx426:tx431", + "lane_to_serdes_map_fabric_lane471.BCM8892X": "rx427:tx428", "lane_to_serdes_map_fabric_lane472.BCM8892X": "rx436:tx432", "lane_to_serdes_map_fabric_lane473.BCM8892X": "rx437:tx433", - "lane_to_serdes_map_fabric_lane474.BCM8892X": "rx438:tx434", - "lane_to_serdes_map_fabric_lane475.BCM8892X": "rx439:tx435", + "lane_to_serdes_map_fabric_lane474.BCM8892X": "rx434:tx438", + "lane_to_serdes_map_fabric_lane475.BCM8892X": "rx435:tx439", "lane_to_serdes_map_fabric_lane476.BCM8892X": "rx444:tx440", "lane_to_serdes_map_fabric_lane477.BCM8892X": "rx445:tx441", - "lane_to_serdes_map_fabric_lane478.BCM8892X": "rx446:tx442", - "lane_to_serdes_map_fabric_lane479.BCM8892X": "rx447:tx443", - "lane_to_serdes_map_fabric_lane48.BCM8892X": "rx96:tx101", + "lane_to_serdes_map_fabric_lane478.BCM8892X": "rx442:tx446", + "lane_to_serdes_map_fabric_lane479.BCM8892X": "rx443:tx447", + "lane_to_serdes_map_fabric_lane48.BCM8892X": "rx100:tx97", "lane_to_serdes_map_fabric_lane480.BCM8892X": "rx452:tx449", "lane_to_serdes_map_fabric_lane481.BCM8892X": "rx453:tx450", - "lane_to_serdes_map_fabric_lane482.BCM8892X": "rx454:tx451", - "lane_to_serdes_map_fabric_lane483.BCM8892X": "rx455:tx448", + "lane_to_serdes_map_fabric_lane482.BCM8892X": "rx450:tx455", + "lane_to_serdes_map_fabric_lane483.BCM8892X": "rx451:tx452", "lane_to_serdes_map_fabric_lane484.BCM8892X": "rx460:tx457", "lane_to_serdes_map_fabric_lane485.BCM8892X": "rx461:tx458", - "lane_to_serdes_map_fabric_lane486.BCM8892X": "rx462:tx459", - "lane_to_serdes_map_fabric_lane487.BCM8892X": "rx463:tx456", + "lane_to_serdes_map_fabric_lane486.BCM8892X": "rx458:tx463", + "lane_to_serdes_map_fabric_lane487.BCM8892X": "rx459:tx460", "lane_to_serdes_map_fabric_lane488.BCM8892X": "rx468:tx464", "lane_to_serdes_map_fabric_lane489.BCM8892X": "rx469:tx465", - "lane_to_serdes_map_fabric_lane49.BCM8892X": "rx97:tx102", - "lane_to_serdes_map_fabric_lane490.BCM8892X": "rx470:tx466", - "lane_to_serdes_map_fabric_lane491.BCM8892X": "rx471:tx467", + "lane_to_serdes_map_fabric_lane49.BCM8892X": "rx101:tx98", + "lane_to_serdes_map_fabric_lane490.BCM8892X": "rx466:tx470", + "lane_to_serdes_map_fabric_lane491.BCM8892X": "rx467:tx471", "lane_to_serdes_map_fabric_lane492.BCM8892X": "rx472:tx472", "lane_to_serdes_map_fabric_lane493.BCM8892X": "rx473:tx473", - "lane_to_serdes_map_fabric_lane494.BCM8892X": "rx474:tx474", - "lane_to_serdes_map_fabric_lane495.BCM8892X": "rx475:tx475", + "lane_to_serdes_map_fabric_lane494.BCM8892X": "rx478:tx478", + "lane_to_serdes_map_fabric_lane495.BCM8892X": "rx479:tx479", "lane_to_serdes_map_fabric_lane496.BCM8892X": "rx484:tx485", "lane_to_serdes_map_fabric_lane497.BCM8892X": "rx485:tx484", "lane_to_serdes_map_fabric_lane498.BCM8892X": "rx482:tx483", "lane_to_serdes_map_fabric_lane499.BCM8892X": "rx483:tx482", - "lane_to_serdes_map_fabric_lane5.BCM8892X": "rx9:tx8", + "lane_to_serdes_map_fabric_lane5.BCM8892X": "rx13:tx12", "lane_to_serdes_map_fabric_lane50.BCM8892X": "rx98:tx103", "lane_to_serdes_map_fabric_lane500.BCM8892X": "rx488:tx489", "lane_to_serdes_map_fabric_lane501.BCM8892X": "rx489:tx488", @@ -2199,68 +2204,68 @@ "lane_to_serdes_map_fabric_lane51.BCM8892X": "rx99:tx100", "lane_to_serdes_map_fabric_lane510.BCM8892X": "rx510:tx510", "lane_to_serdes_map_fabric_lane511.BCM8892X": "rx511:tx511", - "lane_to_serdes_map_fabric_lane52.BCM8892X": "rx104:tx109", - "lane_to_serdes_map_fabric_lane53.BCM8892X": "rx105:tx110", + "lane_to_serdes_map_fabric_lane52.BCM8892X": "rx108:tx105", + "lane_to_serdes_map_fabric_lane53.BCM8892X": "rx109:tx106", "lane_to_serdes_map_fabric_lane54.BCM8892X": "rx106:tx111", "lane_to_serdes_map_fabric_lane55.BCM8892X": "rx107:tx108", - "lane_to_serdes_map_fabric_lane56.BCM8892X": "rx112:tx116", - "lane_to_serdes_map_fabric_lane57.BCM8892X": "rx113:tx117", + "lane_to_serdes_map_fabric_lane56.BCM8892X": "rx116:tx112", + "lane_to_serdes_map_fabric_lane57.BCM8892X": "rx117:tx113", "lane_to_serdes_map_fabric_lane58.BCM8892X": "rx114:tx118", "lane_to_serdes_map_fabric_lane59.BCM8892X": "rx115:tx119", - "lane_to_serdes_map_fabric_lane6.BCM8892X": "rx14:tx15", - "lane_to_serdes_map_fabric_lane60.BCM8892X": "rx120:tx124", - "lane_to_serdes_map_fabric_lane61.BCM8892X": "rx121:tx125", + "lane_to_serdes_map_fabric_lane6.BCM8892X": "rx10:tx11", + "lane_to_serdes_map_fabric_lane60.BCM8892X": "rx124:tx120", + "lane_to_serdes_map_fabric_lane61.BCM8892X": "rx125:tx121", "lane_to_serdes_map_fabric_lane62.BCM8892X": "rx122:tx126", "lane_to_serdes_map_fabric_lane63.BCM8892X": "rx123:tx127", "lane_to_serdes_map_fabric_lane64.BCM8892X": "rx128:tx133", "lane_to_serdes_map_fabric_lane65.BCM8892X": "rx129:tx134", - "lane_to_serdes_map_fabric_lane66.BCM8892X": "rx130:tx135", - "lane_to_serdes_map_fabric_lane67.BCM8892X": "rx131:tx132", + "lane_to_serdes_map_fabric_lane66.BCM8892X": "rx134:tx131", + "lane_to_serdes_map_fabric_lane67.BCM8892X": "rx135:tx128", "lane_to_serdes_map_fabric_lane68.BCM8892X": "rx136:tx141", "lane_to_serdes_map_fabric_lane69.BCM8892X": "rx137:tx142", - "lane_to_serdes_map_fabric_lane7.BCM8892X": "rx15:tx14", - "lane_to_serdes_map_fabric_lane70.BCM8892X": "rx138:tx143", - "lane_to_serdes_map_fabric_lane71.BCM8892X": "rx139:tx140", + "lane_to_serdes_map_fabric_lane7.BCM8892X": "rx11:tx10", + "lane_to_serdes_map_fabric_lane70.BCM8892X": "rx142:tx139", + "lane_to_serdes_map_fabric_lane71.BCM8892X": "rx143:tx136", "lane_to_serdes_map_fabric_lane72.BCM8892X": "rx144:tx148", "lane_to_serdes_map_fabric_lane73.BCM8892X": "rx145:tx149", - "lane_to_serdes_map_fabric_lane74.BCM8892X": "rx146:tx150", - "lane_to_serdes_map_fabric_lane75.BCM8892X": "rx147:tx151", + "lane_to_serdes_map_fabric_lane74.BCM8892X": "rx150:tx146", + "lane_to_serdes_map_fabric_lane75.BCM8892X": "rx151:tx147", "lane_to_serdes_map_fabric_lane76.BCM8892X": "rx152:tx156", "lane_to_serdes_map_fabric_lane77.BCM8892X": "rx153:tx157", - "lane_to_serdes_map_fabric_lane78.BCM8892X": "rx154:tx158", - "lane_to_serdes_map_fabric_lane79.BCM8892X": "rx155:tx159", - "lane_to_serdes_map_fabric_lane8.BCM8892X": "rx20:tx20", + "lane_to_serdes_map_fabric_lane78.BCM8892X": "rx158:tx154", + "lane_to_serdes_map_fabric_lane79.BCM8892X": "rx159:tx155", + "lane_to_serdes_map_fabric_lane8.BCM8892X": "rx16:tx16", "lane_to_serdes_map_fabric_lane80.BCM8892X": "rx160:tx165", "lane_to_serdes_map_fabric_lane81.BCM8892X": "rx161:tx166", - "lane_to_serdes_map_fabric_lane82.BCM8892X": "rx162:tx167", - "lane_to_serdes_map_fabric_lane83.BCM8892X": "rx163:tx164", + "lane_to_serdes_map_fabric_lane82.BCM8892X": "rx166:tx163", + "lane_to_serdes_map_fabric_lane83.BCM8892X": "rx167:tx160", "lane_to_serdes_map_fabric_lane84.BCM8892X": "rx168:tx173", "lane_to_serdes_map_fabric_lane85.BCM8892X": "rx169:tx174", - "lane_to_serdes_map_fabric_lane86.BCM8892X": "rx170:tx175", - "lane_to_serdes_map_fabric_lane87.BCM8892X": "rx171:tx172", + "lane_to_serdes_map_fabric_lane86.BCM8892X": "rx174:tx171", + "lane_to_serdes_map_fabric_lane87.BCM8892X": "rx175:tx168", "lane_to_serdes_map_fabric_lane88.BCM8892X": "rx176:tx180", "lane_to_serdes_map_fabric_lane89.BCM8892X": "rx177:tx181", - "lane_to_serdes_map_fabric_lane9.BCM8892X": "rx21:tx21", - "lane_to_serdes_map_fabric_lane90.BCM8892X": "rx178:tx182", - "lane_to_serdes_map_fabric_lane91.BCM8892X": "rx179:tx183", + "lane_to_serdes_map_fabric_lane9.BCM8892X": "rx17:tx17", + "lane_to_serdes_map_fabric_lane90.BCM8892X": "rx182:tx178", + "lane_to_serdes_map_fabric_lane91.BCM8892X": "rx183:tx179", "lane_to_serdes_map_fabric_lane92.BCM8892X": "rx184:tx188", "lane_to_serdes_map_fabric_lane93.BCM8892X": "rx185:tx189", - "lane_to_serdes_map_fabric_lane94.BCM8892X": "rx186:tx190", - "lane_to_serdes_map_fabric_lane95.BCM8892X": "rx187:tx191", + "lane_to_serdes_map_fabric_lane94.BCM8892X": "rx190:tx186", + "lane_to_serdes_map_fabric_lane95.BCM8892X": "rx191:tx187", "lane_to_serdes_map_fabric_lane96.BCM8892X": "rx192:tx197", "lane_to_serdes_map_fabric_lane97.BCM8892X": "rx193:tx198", - "lane_to_serdes_map_fabric_lane98.BCM8892X": "rx194:tx199", - "lane_to_serdes_map_fabric_lane99.BCM8892X": "rx195:tx196", - "phy_rx_polarity_flip_fabric0.BCM8892X": "0", + "lane_to_serdes_map_fabric_lane98.BCM8892X": "rx198:tx195", + "lane_to_serdes_map_fabric_lane99.BCM8892X": "rx199:tx192", + "phy_rx_polarity_flip_fabric0.BCM8892X": "1", "phy_rx_polarity_flip_fabric1.BCM8892X": "1", "phy_rx_polarity_flip_fabric10.BCM8892X": "0", "phy_rx_polarity_flip_fabric100.BCM8892X": "0", "phy_rx_polarity_flip_fabric101.BCM8892X": "0", - "phy_rx_polarity_flip_fabric102.BCM8892X": "0", + "phy_rx_polarity_flip_fabric102.BCM8892X": "1", "phy_rx_polarity_flip_fabric103.BCM8892X": "1", "phy_rx_polarity_flip_fabric104.BCM8892X": "0", "phy_rx_polarity_flip_fabric105.BCM8892X": "0", - "phy_rx_polarity_flip_fabric106.BCM8892X": "0", + "phy_rx_polarity_flip_fabric106.BCM8892X": "1", "phy_rx_polarity_flip_fabric107.BCM8892X": "1", "phy_rx_polarity_flip_fabric108.BCM8892X": "0", "phy_rx_polarity_flip_fabric109.BCM8892X": "0", @@ -2284,126 +2289,126 @@ "phy_rx_polarity_flip_fabric125.BCM8892X": "0", "phy_rx_polarity_flip_fabric126.BCM8892X": "1", "phy_rx_polarity_flip_fabric127.BCM8892X": "1", - "phy_rx_polarity_flip_fabric128.BCM8892X": "0", + "phy_rx_polarity_flip_fabric128.BCM8892X": "1", "phy_rx_polarity_flip_fabric129.BCM8892X": "1", "phy_rx_polarity_flip_fabric13.BCM8892X": "0", - "phy_rx_polarity_flip_fabric130.BCM8892X": "0", + "phy_rx_polarity_flip_fabric130.BCM8892X": "1", "phy_rx_polarity_flip_fabric131.BCM8892X": "0", - "phy_rx_polarity_flip_fabric132.BCM8892X": "0", + "phy_rx_polarity_flip_fabric132.BCM8892X": "1", "phy_rx_polarity_flip_fabric133.BCM8892X": "0", - "phy_rx_polarity_flip_fabric134.BCM8892X": "1", + "phy_rx_polarity_flip_fabric134.BCM8892X": "0", "phy_rx_polarity_flip_fabric135.BCM8892X": "1", - "phy_rx_polarity_flip_fabric136.BCM8892X": "0", + "phy_rx_polarity_flip_fabric136.BCM8892X": "1", "phy_rx_polarity_flip_fabric137.BCM8892X": "1", - "phy_rx_polarity_flip_fabric138.BCM8892X": "0", + "phy_rx_polarity_flip_fabric138.BCM8892X": "1", "phy_rx_polarity_flip_fabric139.BCM8892X": "0", "phy_rx_polarity_flip_fabric14.BCM8892X": "1", - "phy_rx_polarity_flip_fabric140.BCM8892X": "0", + "phy_rx_polarity_flip_fabric140.BCM8892X": "1", "phy_rx_polarity_flip_fabric141.BCM8892X": "0", - "phy_rx_polarity_flip_fabric142.BCM8892X": "1", + "phy_rx_polarity_flip_fabric142.BCM8892X": "0", "phy_rx_polarity_flip_fabric143.BCM8892X": "1", - "phy_rx_polarity_flip_fabric144.BCM8892X": "1", - "phy_rx_polarity_flip_fabric145.BCM8892X": "1", + "phy_rx_polarity_flip_fabric144.BCM8892X": "0", + "phy_rx_polarity_flip_fabric145.BCM8892X": "0", "phy_rx_polarity_flip_fabric146.BCM8892X": "0", "phy_rx_polarity_flip_fabric147.BCM8892X": "1", "phy_rx_polarity_flip_fabric148.BCM8892X": "1", - "phy_rx_polarity_flip_fabric149.BCM8892X": "1", + "phy_rx_polarity_flip_fabric149.BCM8892X": "0", "phy_rx_polarity_flip_fabric15.BCM8892X": "0", "phy_rx_polarity_flip_fabric150.BCM8892X": "1", "phy_rx_polarity_flip_fabric151.BCM8892X": "0", "phy_rx_polarity_flip_fabric152.BCM8892X": "1", - "phy_rx_polarity_flip_fabric153.BCM8892X": "1", + "phy_rx_polarity_flip_fabric153.BCM8892X": "0", "phy_rx_polarity_flip_fabric154.BCM8892X": "1", "phy_rx_polarity_flip_fabric155.BCM8892X": "0", "phy_rx_polarity_flip_fabric156.BCM8892X": "1", - "phy_rx_polarity_flip_fabric157.BCM8892X": "1", + "phy_rx_polarity_flip_fabric157.BCM8892X": "0", "phy_rx_polarity_flip_fabric158.BCM8892X": "1", "phy_rx_polarity_flip_fabric159.BCM8892X": "0", "phy_rx_polarity_flip_fabric16.BCM8892X": "0", "phy_rx_polarity_flip_fabric160.BCM8892X": "1", - "phy_rx_polarity_flip_fabric161.BCM8892X": "1", + "phy_rx_polarity_flip_fabric161.BCM8892X": "0", "phy_rx_polarity_flip_fabric162.BCM8892X": "1", "phy_rx_polarity_flip_fabric163.BCM8892X": "0", "phy_rx_polarity_flip_fabric164.BCM8892X": "1", - "phy_rx_polarity_flip_fabric165.BCM8892X": "1", + "phy_rx_polarity_flip_fabric165.BCM8892X": "0", "phy_rx_polarity_flip_fabric166.BCM8892X": "1", "phy_rx_polarity_flip_fabric167.BCM8892X": "0", "phy_rx_polarity_flip_fabric168.BCM8892X": "1", - "phy_rx_polarity_flip_fabric169.BCM8892X": "1", + "phy_rx_polarity_flip_fabric169.BCM8892X": "0", "phy_rx_polarity_flip_fabric17.BCM8892X": "1", "phy_rx_polarity_flip_fabric170.BCM8892X": "1", "phy_rx_polarity_flip_fabric171.BCM8892X": "0", "phy_rx_polarity_flip_fabric172.BCM8892X": "1", - "phy_rx_polarity_flip_fabric173.BCM8892X": "1", + "phy_rx_polarity_flip_fabric173.BCM8892X": "0", "phy_rx_polarity_flip_fabric174.BCM8892X": "1", "phy_rx_polarity_flip_fabric175.BCM8892X": "0", "phy_rx_polarity_flip_fabric176.BCM8892X": "1", - "phy_rx_polarity_flip_fabric177.BCM8892X": "1", + "phy_rx_polarity_flip_fabric177.BCM8892X": "0", "phy_rx_polarity_flip_fabric178.BCM8892X": "1", "phy_rx_polarity_flip_fabric179.BCM8892X": "0", "phy_rx_polarity_flip_fabric18.BCM8892X": "0", "phy_rx_polarity_flip_fabric180.BCM8892X": "1", - "phy_rx_polarity_flip_fabric181.BCM8892X": "1", + "phy_rx_polarity_flip_fabric181.BCM8892X": "0", "phy_rx_polarity_flip_fabric182.BCM8892X": "1", "phy_rx_polarity_flip_fabric183.BCM8892X": "0", "phy_rx_polarity_flip_fabric184.BCM8892X": "1", - "phy_rx_polarity_flip_fabric185.BCM8892X": "1", + "phy_rx_polarity_flip_fabric185.BCM8892X": "0", "phy_rx_polarity_flip_fabric186.BCM8892X": "1", "phy_rx_polarity_flip_fabric187.BCM8892X": "0", "phy_rx_polarity_flip_fabric188.BCM8892X": "1", - "phy_rx_polarity_flip_fabric189.BCM8892X": "1", + "phy_rx_polarity_flip_fabric189.BCM8892X": "0", "phy_rx_polarity_flip_fabric19.BCM8892X": "1", "phy_rx_polarity_flip_fabric190.BCM8892X": "1", "phy_rx_polarity_flip_fabric191.BCM8892X": "0", "phy_rx_polarity_flip_fabric192.BCM8892X": "1", "phy_rx_polarity_flip_fabric193.BCM8892X": "1", - "phy_rx_polarity_flip_fabric194.BCM8892X": "0", - "phy_rx_polarity_flip_fabric195.BCM8892X": "0", + "phy_rx_polarity_flip_fabric194.BCM8892X": "1", + "phy_rx_polarity_flip_fabric195.BCM8892X": "1", "phy_rx_polarity_flip_fabric196.BCM8892X": "1", "phy_rx_polarity_flip_fabric197.BCM8892X": "1", - "phy_rx_polarity_flip_fabric198.BCM8892X": "0", - "phy_rx_polarity_flip_fabric199.BCM8892X": "0", + "phy_rx_polarity_flip_fabric198.BCM8892X": "1", + "phy_rx_polarity_flip_fabric199.BCM8892X": "1", "phy_rx_polarity_flip_fabric2.BCM8892X": "0", "phy_rx_polarity_flip_fabric20.BCM8892X": "0", "phy_rx_polarity_flip_fabric200.BCM8892X": "1", "phy_rx_polarity_flip_fabric201.BCM8892X": "1", - "phy_rx_polarity_flip_fabric202.BCM8892X": "0", - "phy_rx_polarity_flip_fabric203.BCM8892X": "0", + "phy_rx_polarity_flip_fabric202.BCM8892X": "1", + "phy_rx_polarity_flip_fabric203.BCM8892X": "1", "phy_rx_polarity_flip_fabric204.BCM8892X": "1", "phy_rx_polarity_flip_fabric205.BCM8892X": "1", - "phy_rx_polarity_flip_fabric206.BCM8892X": "0", - "phy_rx_polarity_flip_fabric207.BCM8892X": "0", + "phy_rx_polarity_flip_fabric206.BCM8892X": "1", + "phy_rx_polarity_flip_fabric207.BCM8892X": "1", "phy_rx_polarity_flip_fabric208.BCM8892X": "1", "phy_rx_polarity_flip_fabric209.BCM8892X": "1", "phy_rx_polarity_flip_fabric21.BCM8892X": "0", - "phy_rx_polarity_flip_fabric210.BCM8892X": "0", - "phy_rx_polarity_flip_fabric211.BCM8892X": "0", + "phy_rx_polarity_flip_fabric210.BCM8892X": "1", + "phy_rx_polarity_flip_fabric211.BCM8892X": "1", "phy_rx_polarity_flip_fabric212.BCM8892X": "1", "phy_rx_polarity_flip_fabric213.BCM8892X": "1", - "phy_rx_polarity_flip_fabric214.BCM8892X": "0", - "phy_rx_polarity_flip_fabric215.BCM8892X": "0", + "phy_rx_polarity_flip_fabric214.BCM8892X": "1", + "phy_rx_polarity_flip_fabric215.BCM8892X": "1", "phy_rx_polarity_flip_fabric216.BCM8892X": "1", "phy_rx_polarity_flip_fabric217.BCM8892X": "1", - "phy_rx_polarity_flip_fabric218.BCM8892X": "0", - "phy_rx_polarity_flip_fabric219.BCM8892X": "0", - "phy_rx_polarity_flip_fabric22.BCM8892X": "0", + "phy_rx_polarity_flip_fabric218.BCM8892X": "1", + "phy_rx_polarity_flip_fabric219.BCM8892X": "1", + "phy_rx_polarity_flip_fabric22.BCM8892X": "1", "phy_rx_polarity_flip_fabric220.BCM8892X": "1", "phy_rx_polarity_flip_fabric221.BCM8892X": "1", - "phy_rx_polarity_flip_fabric222.BCM8892X": "0", - "phy_rx_polarity_flip_fabric223.BCM8892X": "0", + "phy_rx_polarity_flip_fabric222.BCM8892X": "1", + "phy_rx_polarity_flip_fabric223.BCM8892X": "1", "phy_rx_polarity_flip_fabric224.BCM8892X": "1", "phy_rx_polarity_flip_fabric225.BCM8892X": "1", - "phy_rx_polarity_flip_fabric226.BCM8892X": "0", - "phy_rx_polarity_flip_fabric227.BCM8892X": "0", + "phy_rx_polarity_flip_fabric226.BCM8892X": "1", + "phy_rx_polarity_flip_fabric227.BCM8892X": "1", "phy_rx_polarity_flip_fabric228.BCM8892X": "1", "phy_rx_polarity_flip_fabric229.BCM8892X": "1", - "phy_rx_polarity_flip_fabric23.BCM8892X": "0", - "phy_rx_polarity_flip_fabric230.BCM8892X": "0", - "phy_rx_polarity_flip_fabric231.BCM8892X": "0", + "phy_rx_polarity_flip_fabric23.BCM8892X": "1", + "phy_rx_polarity_flip_fabric230.BCM8892X": "1", + "phy_rx_polarity_flip_fabric231.BCM8892X": "1", "phy_rx_polarity_flip_fabric232.BCM8892X": "1", "phy_rx_polarity_flip_fabric233.BCM8892X": "1", - "phy_rx_polarity_flip_fabric234.BCM8892X": "0", - "phy_rx_polarity_flip_fabric235.BCM8892X": "0", + "phy_rx_polarity_flip_fabric234.BCM8892X": "1", + "phy_rx_polarity_flip_fabric235.BCM8892X": "1", "phy_rx_polarity_flip_fabric236.BCM8892X": "1", "phy_rx_polarity_flip_fabric237.BCM8892X": "1", "phy_rx_polarity_flip_fabric238.BCM8892X": "1", @@ -2426,7 +2431,7 @@ "phy_rx_polarity_flip_fabric253.BCM8892X": "0", "phy_rx_polarity_flip_fabric254.BCM8892X": "1", "phy_rx_polarity_flip_fabric255.BCM8892X": "1", - "phy_rx_polarity_flip_fabric256.BCM8892X": "1", + "phy_rx_polarity_flip_fabric256.BCM8892X": "0", "phy_rx_polarity_flip_fabric257.BCM8892X": "1", "phy_rx_polarity_flip_fabric258.BCM8892X": "0", "phy_rx_polarity_flip_fabric259.BCM8892X": "0", @@ -2450,8 +2455,8 @@ "phy_rx_polarity_flip_fabric275.BCM8892X": "1", "phy_rx_polarity_flip_fabric276.BCM8892X": "0", "phy_rx_polarity_flip_fabric277.BCM8892X": "0", - "phy_rx_polarity_flip_fabric278.BCM8892X": "1", - "phy_rx_polarity_flip_fabric279.BCM8892X": "1", + "phy_rx_polarity_flip_fabric278.BCM8892X": "0", + "phy_rx_polarity_flip_fabric279.BCM8892X": "0", "phy_rx_polarity_flip_fabric28.BCM8892X": "0", "phy_rx_polarity_flip_fabric280.BCM8892X": "0", "phy_rx_polarity_flip_fabric281.BCM8892X": "0", @@ -2500,51 +2505,51 @@ "phy_rx_polarity_flip_fabric32.BCM8892X": "0", "phy_rx_polarity_flip_fabric320.BCM8892X": "0", "phy_rx_polarity_flip_fabric321.BCM8892X": "1", - "phy_rx_polarity_flip_fabric322.BCM8892X": "1", + "phy_rx_polarity_flip_fabric322.BCM8892X": "0", "phy_rx_polarity_flip_fabric323.BCM8892X": "1", "phy_rx_polarity_flip_fabric324.BCM8892X": "0", "phy_rx_polarity_flip_fabric325.BCM8892X": "1", - "phy_rx_polarity_flip_fabric326.BCM8892X": "1", + "phy_rx_polarity_flip_fabric326.BCM8892X": "0", "phy_rx_polarity_flip_fabric327.BCM8892X": "1", "phy_rx_polarity_flip_fabric328.BCM8892X": "0", "phy_rx_polarity_flip_fabric329.BCM8892X": "1", "phy_rx_polarity_flip_fabric33.BCM8892X": "0", - "phy_rx_polarity_flip_fabric330.BCM8892X": "1", + "phy_rx_polarity_flip_fabric330.BCM8892X": "0", "phy_rx_polarity_flip_fabric331.BCM8892X": "1", "phy_rx_polarity_flip_fabric332.BCM8892X": "0", "phy_rx_polarity_flip_fabric333.BCM8892X": "1", - "phy_rx_polarity_flip_fabric334.BCM8892X": "1", + "phy_rx_polarity_flip_fabric334.BCM8892X": "0", "phy_rx_polarity_flip_fabric335.BCM8892X": "1", "phy_rx_polarity_flip_fabric336.BCM8892X": "0", "phy_rx_polarity_flip_fabric337.BCM8892X": "1", - "phy_rx_polarity_flip_fabric338.BCM8892X": "1", + "phy_rx_polarity_flip_fabric338.BCM8892X": "0", "phy_rx_polarity_flip_fabric339.BCM8892X": "1", "phy_rx_polarity_flip_fabric34.BCM8892X": "1", "phy_rx_polarity_flip_fabric340.BCM8892X": "0", "phy_rx_polarity_flip_fabric341.BCM8892X": "1", - "phy_rx_polarity_flip_fabric342.BCM8892X": "1", + "phy_rx_polarity_flip_fabric342.BCM8892X": "0", "phy_rx_polarity_flip_fabric343.BCM8892X": "1", "phy_rx_polarity_flip_fabric344.BCM8892X": "0", "phy_rx_polarity_flip_fabric345.BCM8892X": "1", - "phy_rx_polarity_flip_fabric346.BCM8892X": "1", + "phy_rx_polarity_flip_fabric346.BCM8892X": "0", "phy_rx_polarity_flip_fabric347.BCM8892X": "1", "phy_rx_polarity_flip_fabric348.BCM8892X": "0", "phy_rx_polarity_flip_fabric349.BCM8892X": "1", "phy_rx_polarity_flip_fabric35.BCM8892X": "1", - "phy_rx_polarity_flip_fabric350.BCM8892X": "1", + "phy_rx_polarity_flip_fabric350.BCM8892X": "0", "phy_rx_polarity_flip_fabric351.BCM8892X": "1", "phy_rx_polarity_flip_fabric352.BCM8892X": "0", "phy_rx_polarity_flip_fabric353.BCM8892X": "1", - "phy_rx_polarity_flip_fabric354.BCM8892X": "1", + "phy_rx_polarity_flip_fabric354.BCM8892X": "0", "phy_rx_polarity_flip_fabric355.BCM8892X": "1", "phy_rx_polarity_flip_fabric356.BCM8892X": "0", "phy_rx_polarity_flip_fabric357.BCM8892X": "1", - "phy_rx_polarity_flip_fabric358.BCM8892X": "1", + "phy_rx_polarity_flip_fabric358.BCM8892X": "0", "phy_rx_polarity_flip_fabric359.BCM8892X": "1", "phy_rx_polarity_flip_fabric36.BCM8892X": "0", "phy_rx_polarity_flip_fabric360.BCM8892X": "0", "phy_rx_polarity_flip_fabric361.BCM8892X": "1", - "phy_rx_polarity_flip_fabric362.BCM8892X": "1", + "phy_rx_polarity_flip_fabric362.BCM8892X": "0", "phy_rx_polarity_flip_fabric363.BCM8892X": "1", "phy_rx_polarity_flip_fabric364.BCM8892X": "1", "phy_rx_polarity_flip_fabric365.BCM8892X": "1", @@ -2568,126 +2573,126 @@ "phy_rx_polarity_flip_fabric381.BCM8892X": "0", "phy_rx_polarity_flip_fabric382.BCM8892X": "0", "phy_rx_polarity_flip_fabric383.BCM8892X": "1", - "phy_rx_polarity_flip_fabric384.BCM8892X": "1", + "phy_rx_polarity_flip_fabric384.BCM8892X": "0", "phy_rx_polarity_flip_fabric385.BCM8892X": "1", - "phy_rx_polarity_flip_fabric386.BCM8892X": "1", + "phy_rx_polarity_flip_fabric386.BCM8892X": "0", "phy_rx_polarity_flip_fabric387.BCM8892X": "0", - "phy_rx_polarity_flip_fabric388.BCM8892X": "1", + "phy_rx_polarity_flip_fabric388.BCM8892X": "0", "phy_rx_polarity_flip_fabric389.BCM8892X": "0", "phy_rx_polarity_flip_fabric39.BCM8892X": "1", - "phy_rx_polarity_flip_fabric390.BCM8892X": "0", + "phy_rx_polarity_flip_fabric390.BCM8892X": "1", "phy_rx_polarity_flip_fabric391.BCM8892X": "1", - "phy_rx_polarity_flip_fabric392.BCM8892X": "1", + "phy_rx_polarity_flip_fabric392.BCM8892X": "0", "phy_rx_polarity_flip_fabric393.BCM8892X": "1", - "phy_rx_polarity_flip_fabric394.BCM8892X": "1", + "phy_rx_polarity_flip_fabric394.BCM8892X": "0", "phy_rx_polarity_flip_fabric395.BCM8892X": "0", - "phy_rx_polarity_flip_fabric396.BCM8892X": "1", + "phy_rx_polarity_flip_fabric396.BCM8892X": "0", "phy_rx_polarity_flip_fabric397.BCM8892X": "0", - "phy_rx_polarity_flip_fabric398.BCM8892X": "0", + "phy_rx_polarity_flip_fabric398.BCM8892X": "1", "phy_rx_polarity_flip_fabric399.BCM8892X": "1", "phy_rx_polarity_flip_fabric4.BCM8892X": "1", "phy_rx_polarity_flip_fabric40.BCM8892X": "0", - "phy_rx_polarity_flip_fabric400.BCM8892X": "0", - "phy_rx_polarity_flip_fabric401.BCM8892X": "0", + "phy_rx_polarity_flip_fabric400.BCM8892X": "1", + "phy_rx_polarity_flip_fabric401.BCM8892X": "1", "phy_rx_polarity_flip_fabric402.BCM8892X": "0", "phy_rx_polarity_flip_fabric403.BCM8892X": "1", "phy_rx_polarity_flip_fabric404.BCM8892X": "1", - "phy_rx_polarity_flip_fabric405.BCM8892X": "0", + "phy_rx_polarity_flip_fabric405.BCM8892X": "1", "phy_rx_polarity_flip_fabric406.BCM8892X": "0", "phy_rx_polarity_flip_fabric407.BCM8892X": "0", "phy_rx_polarity_flip_fabric408.BCM8892X": "1", - "phy_rx_polarity_flip_fabric409.BCM8892X": "0", + "phy_rx_polarity_flip_fabric409.BCM8892X": "1", "phy_rx_polarity_flip_fabric41.BCM8892X": "0", "phy_rx_polarity_flip_fabric410.BCM8892X": "0", "phy_rx_polarity_flip_fabric411.BCM8892X": "0", "phy_rx_polarity_flip_fabric412.BCM8892X": "1", - "phy_rx_polarity_flip_fabric413.BCM8892X": "0", + "phy_rx_polarity_flip_fabric413.BCM8892X": "1", "phy_rx_polarity_flip_fabric414.BCM8892X": "0", "phy_rx_polarity_flip_fabric415.BCM8892X": "0", "phy_rx_polarity_flip_fabric416.BCM8892X": "1", - "phy_rx_polarity_flip_fabric417.BCM8892X": "0", + "phy_rx_polarity_flip_fabric417.BCM8892X": "1", "phy_rx_polarity_flip_fabric418.BCM8892X": "0", "phy_rx_polarity_flip_fabric419.BCM8892X": "0", "phy_rx_polarity_flip_fabric42.BCM8892X": "1", "phy_rx_polarity_flip_fabric420.BCM8892X": "1", - "phy_rx_polarity_flip_fabric421.BCM8892X": "0", + "phy_rx_polarity_flip_fabric421.BCM8892X": "1", "phy_rx_polarity_flip_fabric422.BCM8892X": "0", "phy_rx_polarity_flip_fabric423.BCM8892X": "0", "phy_rx_polarity_flip_fabric424.BCM8892X": "1", - "phy_rx_polarity_flip_fabric425.BCM8892X": "0", + "phy_rx_polarity_flip_fabric425.BCM8892X": "1", "phy_rx_polarity_flip_fabric426.BCM8892X": "0", "phy_rx_polarity_flip_fabric427.BCM8892X": "0", "phy_rx_polarity_flip_fabric428.BCM8892X": "1", - "phy_rx_polarity_flip_fabric429.BCM8892X": "0", + "phy_rx_polarity_flip_fabric429.BCM8892X": "1", "phy_rx_polarity_flip_fabric43.BCM8892X": "1", "phy_rx_polarity_flip_fabric430.BCM8892X": "0", "phy_rx_polarity_flip_fabric431.BCM8892X": "0", "phy_rx_polarity_flip_fabric432.BCM8892X": "1", - "phy_rx_polarity_flip_fabric433.BCM8892X": "0", + "phy_rx_polarity_flip_fabric433.BCM8892X": "1", "phy_rx_polarity_flip_fabric434.BCM8892X": "0", "phy_rx_polarity_flip_fabric435.BCM8892X": "0", "phy_rx_polarity_flip_fabric436.BCM8892X": "1", - "phy_rx_polarity_flip_fabric437.BCM8892X": "0", + "phy_rx_polarity_flip_fabric437.BCM8892X": "1", "phy_rx_polarity_flip_fabric438.BCM8892X": "0", "phy_rx_polarity_flip_fabric439.BCM8892X": "0", "phy_rx_polarity_flip_fabric44.BCM8892X": "0", "phy_rx_polarity_flip_fabric440.BCM8892X": "1", - "phy_rx_polarity_flip_fabric441.BCM8892X": "0", + "phy_rx_polarity_flip_fabric441.BCM8892X": "1", "phy_rx_polarity_flip_fabric442.BCM8892X": "0", "phy_rx_polarity_flip_fabric443.BCM8892X": "0", "phy_rx_polarity_flip_fabric444.BCM8892X": "1", - "phy_rx_polarity_flip_fabric445.BCM8892X": "0", + "phy_rx_polarity_flip_fabric445.BCM8892X": "1", "phy_rx_polarity_flip_fabric446.BCM8892X": "0", "phy_rx_polarity_flip_fabric447.BCM8892X": "0", "phy_rx_polarity_flip_fabric448.BCM8892X": "1", "phy_rx_polarity_flip_fabric449.BCM8892X": "1", "phy_rx_polarity_flip_fabric45.BCM8892X": "0", - "phy_rx_polarity_flip_fabric450.BCM8892X": "1", - "phy_rx_polarity_flip_fabric451.BCM8892X": "1", + "phy_rx_polarity_flip_fabric450.BCM8892X": "0", + "phy_rx_polarity_flip_fabric451.BCM8892X": "0", "phy_rx_polarity_flip_fabric452.BCM8892X": "1", "phy_rx_polarity_flip_fabric453.BCM8892X": "1", - "phy_rx_polarity_flip_fabric454.BCM8892X": "1", - "phy_rx_polarity_flip_fabric455.BCM8892X": "1", + "phy_rx_polarity_flip_fabric454.BCM8892X": "0", + "phy_rx_polarity_flip_fabric455.BCM8892X": "0", "phy_rx_polarity_flip_fabric456.BCM8892X": "1", "phy_rx_polarity_flip_fabric457.BCM8892X": "1", - "phy_rx_polarity_flip_fabric458.BCM8892X": "1", - "phy_rx_polarity_flip_fabric459.BCM8892X": "1", + "phy_rx_polarity_flip_fabric458.BCM8892X": "0", + "phy_rx_polarity_flip_fabric459.BCM8892X": "0", "phy_rx_polarity_flip_fabric46.BCM8892X": "1", "phy_rx_polarity_flip_fabric460.BCM8892X": "1", "phy_rx_polarity_flip_fabric461.BCM8892X": "1", - "phy_rx_polarity_flip_fabric462.BCM8892X": "1", - "phy_rx_polarity_flip_fabric463.BCM8892X": "1", + "phy_rx_polarity_flip_fabric462.BCM8892X": "0", + "phy_rx_polarity_flip_fabric463.BCM8892X": "0", "phy_rx_polarity_flip_fabric464.BCM8892X": "1", "phy_rx_polarity_flip_fabric465.BCM8892X": "1", - "phy_rx_polarity_flip_fabric466.BCM8892X": "1", - "phy_rx_polarity_flip_fabric467.BCM8892X": "1", + "phy_rx_polarity_flip_fabric466.BCM8892X": "0", + "phy_rx_polarity_flip_fabric467.BCM8892X": "0", "phy_rx_polarity_flip_fabric468.BCM8892X": "1", "phy_rx_polarity_flip_fabric469.BCM8892X": "1", "phy_rx_polarity_flip_fabric47.BCM8892X": "1", - "phy_rx_polarity_flip_fabric470.BCM8892X": "1", - "phy_rx_polarity_flip_fabric471.BCM8892X": "1", + "phy_rx_polarity_flip_fabric470.BCM8892X": "0", + "phy_rx_polarity_flip_fabric471.BCM8892X": "0", "phy_rx_polarity_flip_fabric472.BCM8892X": "1", "phy_rx_polarity_flip_fabric473.BCM8892X": "1", - "phy_rx_polarity_flip_fabric474.BCM8892X": "1", - "phy_rx_polarity_flip_fabric475.BCM8892X": "1", + "phy_rx_polarity_flip_fabric474.BCM8892X": "0", + "phy_rx_polarity_flip_fabric475.BCM8892X": "0", "phy_rx_polarity_flip_fabric476.BCM8892X": "1", "phy_rx_polarity_flip_fabric477.BCM8892X": "1", - "phy_rx_polarity_flip_fabric478.BCM8892X": "1", - "phy_rx_polarity_flip_fabric479.BCM8892X": "1", + "phy_rx_polarity_flip_fabric478.BCM8892X": "0", + "phy_rx_polarity_flip_fabric479.BCM8892X": "0", "phy_rx_polarity_flip_fabric48.BCM8892X": "0", "phy_rx_polarity_flip_fabric480.BCM8892X": "1", "phy_rx_polarity_flip_fabric481.BCM8892X": "1", - "phy_rx_polarity_flip_fabric482.BCM8892X": "1", - "phy_rx_polarity_flip_fabric483.BCM8892X": "1", + "phy_rx_polarity_flip_fabric482.BCM8892X": "0", + "phy_rx_polarity_flip_fabric483.BCM8892X": "0", "phy_rx_polarity_flip_fabric484.BCM8892X": "1", "phy_rx_polarity_flip_fabric485.BCM8892X": "1", - "phy_rx_polarity_flip_fabric486.BCM8892X": "1", - "phy_rx_polarity_flip_fabric487.BCM8892X": "1", + "phy_rx_polarity_flip_fabric486.BCM8892X": "0", + "phy_rx_polarity_flip_fabric487.BCM8892X": "0", "phy_rx_polarity_flip_fabric488.BCM8892X": "1", "phy_rx_polarity_flip_fabric489.BCM8892X": "1", "phy_rx_polarity_flip_fabric49.BCM8892X": "0", - "phy_rx_polarity_flip_fabric490.BCM8892X": "1", - "phy_rx_polarity_flip_fabric491.BCM8892X": "1", + "phy_rx_polarity_flip_fabric490.BCM8892X": "0", + "phy_rx_polarity_flip_fabric491.BCM8892X": "0", "phy_rx_polarity_flip_fabric492.BCM8892X": "1", "phy_rx_polarity_flip_fabric493.BCM8892X": "0", "phy_rx_polarity_flip_fabric494.BCM8892X": "1", @@ -2726,59 +2731,59 @@ "phy_rx_polarity_flip_fabric63.BCM8892X": "1", "phy_rx_polarity_flip_fabric64.BCM8892X": "0", "phy_rx_polarity_flip_fabric65.BCM8892X": "0", - "phy_rx_polarity_flip_fabric66.BCM8892X": "0", + "phy_rx_polarity_flip_fabric66.BCM8892X": "1", "phy_rx_polarity_flip_fabric67.BCM8892X": "1", "phy_rx_polarity_flip_fabric68.BCM8892X": "0", "phy_rx_polarity_flip_fabric69.BCM8892X": "0", "phy_rx_polarity_flip_fabric7.BCM8892X": "0", - "phy_rx_polarity_flip_fabric70.BCM8892X": "0", + "phy_rx_polarity_flip_fabric70.BCM8892X": "1", "phy_rx_polarity_flip_fabric71.BCM8892X": "1", "phy_rx_polarity_flip_fabric72.BCM8892X": "0", "phy_rx_polarity_flip_fabric73.BCM8892X": "0", - "phy_rx_polarity_flip_fabric74.BCM8892X": "0", + "phy_rx_polarity_flip_fabric74.BCM8892X": "1", "phy_rx_polarity_flip_fabric75.BCM8892X": "1", "phy_rx_polarity_flip_fabric76.BCM8892X": "0", "phy_rx_polarity_flip_fabric77.BCM8892X": "0", - "phy_rx_polarity_flip_fabric78.BCM8892X": "0", + "phy_rx_polarity_flip_fabric78.BCM8892X": "1", "phy_rx_polarity_flip_fabric79.BCM8892X": "1", "phy_rx_polarity_flip_fabric8.BCM8892X": "1", "phy_rx_polarity_flip_fabric80.BCM8892X": "0", "phy_rx_polarity_flip_fabric81.BCM8892X": "0", - "phy_rx_polarity_flip_fabric82.BCM8892X": "0", + "phy_rx_polarity_flip_fabric82.BCM8892X": "1", "phy_rx_polarity_flip_fabric83.BCM8892X": "1", "phy_rx_polarity_flip_fabric84.BCM8892X": "0", "phy_rx_polarity_flip_fabric85.BCM8892X": "0", - "phy_rx_polarity_flip_fabric86.BCM8892X": "0", + "phy_rx_polarity_flip_fabric86.BCM8892X": "1", "phy_rx_polarity_flip_fabric87.BCM8892X": "1", "phy_rx_polarity_flip_fabric88.BCM8892X": "0", "phy_rx_polarity_flip_fabric89.BCM8892X": "0", "phy_rx_polarity_flip_fabric9.BCM8892X": "1", - "phy_rx_polarity_flip_fabric90.BCM8892X": "0", + "phy_rx_polarity_flip_fabric90.BCM8892X": "1", "phy_rx_polarity_flip_fabric91.BCM8892X": "1", "phy_rx_polarity_flip_fabric92.BCM8892X": "0", "phy_rx_polarity_flip_fabric93.BCM8892X": "0", - "phy_rx_polarity_flip_fabric94.BCM8892X": "0", + "phy_rx_polarity_flip_fabric94.BCM8892X": "1", "phy_rx_polarity_flip_fabric95.BCM8892X": "1", "phy_rx_polarity_flip_fabric96.BCM8892X": "0", "phy_rx_polarity_flip_fabric97.BCM8892X": "0", - "phy_rx_polarity_flip_fabric98.BCM8892X": "0", + "phy_rx_polarity_flip_fabric98.BCM8892X": "1", "phy_rx_polarity_flip_fabric99.BCM8892X": "1", "phy_tx_polarity_flip_fabric0.BCM8892X": "1", "phy_tx_polarity_flip_fabric1.BCM8892X": "0", "phy_tx_polarity_flip_fabric10.BCM8892X": "0", "phy_tx_polarity_flip_fabric100.BCM8892X": "1", "phy_tx_polarity_flip_fabric101.BCM8892X": "1", - "phy_tx_polarity_flip_fabric102.BCM8892X": "0", - "phy_tx_polarity_flip_fabric103.BCM8892X": "0", + "phy_tx_polarity_flip_fabric102.BCM8892X": "1", + "phy_tx_polarity_flip_fabric103.BCM8892X": "1", "phy_tx_polarity_flip_fabric104.BCM8892X": "0", "phy_tx_polarity_flip_fabric105.BCM8892X": "1", "phy_tx_polarity_flip_fabric106.BCM8892X": "1", - "phy_tx_polarity_flip_fabric107.BCM8892X": "0", + "phy_tx_polarity_flip_fabric107.BCM8892X": "1", "phy_tx_polarity_flip_fabric108.BCM8892X": "1", "phy_tx_polarity_flip_fabric109.BCM8892X": "1", "phy_tx_polarity_flip_fabric11.BCM8892X": "1", "phy_tx_polarity_flip_fabric110.BCM8892X": "0", - "phy_tx_polarity_flip_fabric111.BCM8892X": "1", + "phy_tx_polarity_flip_fabric111.BCM8892X": "0", "phy_tx_polarity_flip_fabric112.BCM8892X": "0", "phy_tx_polarity_flip_fabric113.BCM8892X": "1", "phy_tx_polarity_flip_fabric114.BCM8892X": "1", @@ -2818,109 +2823,109 @@ "phy_tx_polarity_flip_fabric145.BCM8892X": "1", "phy_tx_polarity_flip_fabric146.BCM8892X": "0", "phy_tx_polarity_flip_fabric147.BCM8892X": "0", - "phy_tx_polarity_flip_fabric148.BCM8892X": "0", + "phy_tx_polarity_flip_fabric148.BCM8892X": "1", "phy_tx_polarity_flip_fabric149.BCM8892X": "0", "phy_tx_polarity_flip_fabric15.BCM8892X": "0", "phy_tx_polarity_flip_fabric150.BCM8892X": "1", "phy_tx_polarity_flip_fabric151.BCM8892X": "1", - "phy_tx_polarity_flip_fabric152.BCM8892X": "1", - "phy_tx_polarity_flip_fabric153.BCM8892X": "0", + "phy_tx_polarity_flip_fabric152.BCM8892X": "0", + "phy_tx_polarity_flip_fabric153.BCM8892X": "1", "phy_tx_polarity_flip_fabric154.BCM8892X": "0", "phy_tx_polarity_flip_fabric155.BCM8892X": "1", - "phy_tx_polarity_flip_fabric156.BCM8892X": "1", - "phy_tx_polarity_flip_fabric157.BCM8892X": "0", + "phy_tx_polarity_flip_fabric156.BCM8892X": "0", + "phy_tx_polarity_flip_fabric157.BCM8892X": "1", "phy_tx_polarity_flip_fabric158.BCM8892X": "0", "phy_tx_polarity_flip_fabric159.BCM8892X": "1", "phy_tx_polarity_flip_fabric16.BCM8892X": "0", - "phy_tx_polarity_flip_fabric160.BCM8892X": "0", + "phy_tx_polarity_flip_fabric160.BCM8892X": "1", "phy_tx_polarity_flip_fabric161.BCM8892X": "0", "phy_tx_polarity_flip_fabric162.BCM8892X": "1", "phy_tx_polarity_flip_fabric163.BCM8892X": "1", - "phy_tx_polarity_flip_fabric164.BCM8892X": "0", + "phy_tx_polarity_flip_fabric164.BCM8892X": "1", "phy_tx_polarity_flip_fabric165.BCM8892X": "0", "phy_tx_polarity_flip_fabric166.BCM8892X": "1", "phy_tx_polarity_flip_fabric167.BCM8892X": "1", - "phy_tx_polarity_flip_fabric168.BCM8892X": "1", - "phy_tx_polarity_flip_fabric169.BCM8892X": "0", + "phy_tx_polarity_flip_fabric168.BCM8892X": "0", + "phy_tx_polarity_flip_fabric169.BCM8892X": "1", "phy_tx_polarity_flip_fabric17.BCM8892X": "0", "phy_tx_polarity_flip_fabric170.BCM8892X": "0", "phy_tx_polarity_flip_fabric171.BCM8892X": "1", - "phy_tx_polarity_flip_fabric172.BCM8892X": "1", - "phy_tx_polarity_flip_fabric173.BCM8892X": "0", + "phy_tx_polarity_flip_fabric172.BCM8892X": "0", + "phy_tx_polarity_flip_fabric173.BCM8892X": "1", "phy_tx_polarity_flip_fabric174.BCM8892X": "0", "phy_tx_polarity_flip_fabric175.BCM8892X": "1", - "phy_tx_polarity_flip_fabric176.BCM8892X": "0", + "phy_tx_polarity_flip_fabric176.BCM8892X": "1", "phy_tx_polarity_flip_fabric177.BCM8892X": "0", "phy_tx_polarity_flip_fabric178.BCM8892X": "1", "phy_tx_polarity_flip_fabric179.BCM8892X": "1", - "phy_tx_polarity_flip_fabric18.BCM8892X": "1", - "phy_tx_polarity_flip_fabric180.BCM8892X": "0", + "phy_tx_polarity_flip_fabric18.BCM8892X": "0", + "phy_tx_polarity_flip_fabric180.BCM8892X": "1", "phy_tx_polarity_flip_fabric181.BCM8892X": "0", "phy_tx_polarity_flip_fabric182.BCM8892X": "1", "phy_tx_polarity_flip_fabric183.BCM8892X": "1", - "phy_tx_polarity_flip_fabric184.BCM8892X": "1", - "phy_tx_polarity_flip_fabric185.BCM8892X": "0", + "phy_tx_polarity_flip_fabric184.BCM8892X": "0", + "phy_tx_polarity_flip_fabric185.BCM8892X": "1", "phy_tx_polarity_flip_fabric186.BCM8892X": "0", "phy_tx_polarity_flip_fabric187.BCM8892X": "1", - "phy_tx_polarity_flip_fabric188.BCM8892X": "1", - "phy_tx_polarity_flip_fabric189.BCM8892X": "0", - "phy_tx_polarity_flip_fabric19.BCM8892X": "1", + "phy_tx_polarity_flip_fabric188.BCM8892X": "0", + "phy_tx_polarity_flip_fabric189.BCM8892X": "1", + "phy_tx_polarity_flip_fabric19.BCM8892X": "0", "phy_tx_polarity_flip_fabric190.BCM8892X": "0", "phy_tx_polarity_flip_fabric191.BCM8892X": "1", "phy_tx_polarity_flip_fabric192.BCM8892X": "1", "phy_tx_polarity_flip_fabric193.BCM8892X": "0", - "phy_tx_polarity_flip_fabric194.BCM8892X": "1", - "phy_tx_polarity_flip_fabric195.BCM8892X": "0", + "phy_tx_polarity_flip_fabric194.BCM8892X": "0", + "phy_tx_polarity_flip_fabric195.BCM8892X": "1", "phy_tx_polarity_flip_fabric196.BCM8892X": "1", "phy_tx_polarity_flip_fabric197.BCM8892X": "0", - "phy_tx_polarity_flip_fabric198.BCM8892X": "1", - "phy_tx_polarity_flip_fabric199.BCM8892X": "0", + "phy_tx_polarity_flip_fabric198.BCM8892X": "0", + "phy_tx_polarity_flip_fabric199.BCM8892X": "1", "phy_tx_polarity_flip_fabric2.BCM8892X": "1", "phy_tx_polarity_flip_fabric20.BCM8892X": "1", "phy_tx_polarity_flip_fabric200.BCM8892X": "0", "phy_tx_polarity_flip_fabric201.BCM8892X": "1", - "phy_tx_polarity_flip_fabric202.BCM8892X": "0", - "phy_tx_polarity_flip_fabric203.BCM8892X": "1", + "phy_tx_polarity_flip_fabric202.BCM8892X": "1", + "phy_tx_polarity_flip_fabric203.BCM8892X": "0", "phy_tx_polarity_flip_fabric204.BCM8892X": "0", "phy_tx_polarity_flip_fabric205.BCM8892X": "1", - "phy_tx_polarity_flip_fabric206.BCM8892X": "0", - "phy_tx_polarity_flip_fabric207.BCM8892X": "1", + "phy_tx_polarity_flip_fabric206.BCM8892X": "1", + "phy_tx_polarity_flip_fabric207.BCM8892X": "0", "phy_tx_polarity_flip_fabric208.BCM8892X": "1", "phy_tx_polarity_flip_fabric209.BCM8892X": "0", "phy_tx_polarity_flip_fabric21.BCM8892X": "0", - "phy_tx_polarity_flip_fabric210.BCM8892X": "1", - "phy_tx_polarity_flip_fabric211.BCM8892X": "0", + "phy_tx_polarity_flip_fabric210.BCM8892X": "0", + "phy_tx_polarity_flip_fabric211.BCM8892X": "1", "phy_tx_polarity_flip_fabric212.BCM8892X": "1", "phy_tx_polarity_flip_fabric213.BCM8892X": "0", - "phy_tx_polarity_flip_fabric214.BCM8892X": "1", - "phy_tx_polarity_flip_fabric215.BCM8892X": "0", + "phy_tx_polarity_flip_fabric214.BCM8892X": "0", + "phy_tx_polarity_flip_fabric215.BCM8892X": "1", "phy_tx_polarity_flip_fabric216.BCM8892X": "0", "phy_tx_polarity_flip_fabric217.BCM8892X": "1", - "phy_tx_polarity_flip_fabric218.BCM8892X": "0", - "phy_tx_polarity_flip_fabric219.BCM8892X": "1", - "phy_tx_polarity_flip_fabric22.BCM8892X": "1", + "phy_tx_polarity_flip_fabric218.BCM8892X": "1", + "phy_tx_polarity_flip_fabric219.BCM8892X": "0", + "phy_tx_polarity_flip_fabric22.BCM8892X": "0", "phy_tx_polarity_flip_fabric220.BCM8892X": "0", "phy_tx_polarity_flip_fabric221.BCM8892X": "1", - "phy_tx_polarity_flip_fabric222.BCM8892X": "0", - "phy_tx_polarity_flip_fabric223.BCM8892X": "1", + "phy_tx_polarity_flip_fabric222.BCM8892X": "1", + "phy_tx_polarity_flip_fabric223.BCM8892X": "0", "phy_tx_polarity_flip_fabric224.BCM8892X": "1", "phy_tx_polarity_flip_fabric225.BCM8892X": "0", - "phy_tx_polarity_flip_fabric226.BCM8892X": "1", - "phy_tx_polarity_flip_fabric227.BCM8892X": "0", + "phy_tx_polarity_flip_fabric226.BCM8892X": "0", + "phy_tx_polarity_flip_fabric227.BCM8892X": "1", "phy_tx_polarity_flip_fabric228.BCM8892X": "1", "phy_tx_polarity_flip_fabric229.BCM8892X": "0", "phy_tx_polarity_flip_fabric23.BCM8892X": "1", - "phy_tx_polarity_flip_fabric230.BCM8892X": "1", - "phy_tx_polarity_flip_fabric231.BCM8892X": "0", + "phy_tx_polarity_flip_fabric230.BCM8892X": "0", + "phy_tx_polarity_flip_fabric231.BCM8892X": "1", "phy_tx_polarity_flip_fabric232.BCM8892X": "0", "phy_tx_polarity_flip_fabric233.BCM8892X": "1", - "phy_tx_polarity_flip_fabric234.BCM8892X": "0", - "phy_tx_polarity_flip_fabric235.BCM8892X": "1", + "phy_tx_polarity_flip_fabric234.BCM8892X": "1", + "phy_tx_polarity_flip_fabric235.BCM8892X": "0", "phy_tx_polarity_flip_fabric236.BCM8892X": "1", "phy_tx_polarity_flip_fabric237.BCM8892X": "1", "phy_tx_polarity_flip_fabric238.BCM8892X": "1", - "phy_tx_polarity_flip_fabric239.BCM8892X": "1", - "phy_tx_polarity_flip_fabric24.BCM8892X": "1", + "phy_tx_polarity_flip_fabric239.BCM8892X": "0", + "phy_tx_polarity_flip_fabric24.BCM8892X": "0", "phy_tx_polarity_flip_fabric240.BCM8892X": "0", "phy_tx_polarity_flip_fabric241.BCM8892X": "1", "phy_tx_polarity_flip_fabric242.BCM8892X": "1", @@ -2931,7 +2936,7 @@ "phy_tx_polarity_flip_fabric247.BCM8892X": "1", "phy_tx_polarity_flip_fabric248.BCM8892X": "1", "phy_tx_polarity_flip_fabric249.BCM8892X": "0", - "phy_tx_polarity_flip_fabric25.BCM8892X": "0", + "phy_tx_polarity_flip_fabric25.BCM8892X": "1", "phy_tx_polarity_flip_fabric250.BCM8892X": "0", "phy_tx_polarity_flip_fabric251.BCM8892X": "1", "phy_tx_polarity_flip_fabric252.BCM8892X": "1", @@ -2958,113 +2963,113 @@ "phy_tx_polarity_flip_fabric271.BCM8892X": "0", "phy_tx_polarity_flip_fabric272.BCM8892X": "0", "phy_tx_polarity_flip_fabric273.BCM8892X": "0", - "phy_tx_polarity_flip_fabric274.BCM8892X": "0", - "phy_tx_polarity_flip_fabric275.BCM8892X": "0", + "phy_tx_polarity_flip_fabric274.BCM8892X": "1", + "phy_tx_polarity_flip_fabric275.BCM8892X": "1", "phy_tx_polarity_flip_fabric276.BCM8892X": "0", "phy_tx_polarity_flip_fabric277.BCM8892X": "1", - "phy_tx_polarity_flip_fabric278.BCM8892X": "0", + "phy_tx_polarity_flip_fabric278.BCM8892X": "1", "phy_tx_polarity_flip_fabric279.BCM8892X": "1", - "phy_tx_polarity_flip_fabric28.BCM8892X": "1", - "phy_tx_polarity_flip_fabric280.BCM8892X": "0", - "phy_tx_polarity_flip_fabric281.BCM8892X": "1", + "phy_tx_polarity_flip_fabric28.BCM8892X": "0", + "phy_tx_polarity_flip_fabric280.BCM8892X": "1", + "phy_tx_polarity_flip_fabric281.BCM8892X": "0", "phy_tx_polarity_flip_fabric282.BCM8892X": "0", "phy_tx_polarity_flip_fabric283.BCM8892X": "1", - "phy_tx_polarity_flip_fabric284.BCM8892X": "0", - "phy_tx_polarity_flip_fabric285.BCM8892X": "1", + "phy_tx_polarity_flip_fabric284.BCM8892X": "1", + "phy_tx_polarity_flip_fabric285.BCM8892X": "0", "phy_tx_polarity_flip_fabric286.BCM8892X": "0", "phy_tx_polarity_flip_fabric287.BCM8892X": "1", - "phy_tx_polarity_flip_fabric288.BCM8892X": "1", - "phy_tx_polarity_flip_fabric289.BCM8892X": "0", - "phy_tx_polarity_flip_fabric29.BCM8892X": "0", + "phy_tx_polarity_flip_fabric288.BCM8892X": "0", + "phy_tx_polarity_flip_fabric289.BCM8892X": "1", + "phy_tx_polarity_flip_fabric29.BCM8892X": "1", "phy_tx_polarity_flip_fabric290.BCM8892X": "1", "phy_tx_polarity_flip_fabric291.BCM8892X": "0", - "phy_tx_polarity_flip_fabric292.BCM8892X": "1", - "phy_tx_polarity_flip_fabric293.BCM8892X": "0", + "phy_tx_polarity_flip_fabric292.BCM8892X": "0", + "phy_tx_polarity_flip_fabric293.BCM8892X": "1", "phy_tx_polarity_flip_fabric294.BCM8892X": "1", "phy_tx_polarity_flip_fabric295.BCM8892X": "0", - "phy_tx_polarity_flip_fabric296.BCM8892X": "0", - "phy_tx_polarity_flip_fabric297.BCM8892X": "1", + "phy_tx_polarity_flip_fabric296.BCM8892X": "1", + "phy_tx_polarity_flip_fabric297.BCM8892X": "0", "phy_tx_polarity_flip_fabric298.BCM8892X": "0", "phy_tx_polarity_flip_fabric299.BCM8892X": "1", "phy_tx_polarity_flip_fabric3.BCM8892X": "0", "phy_tx_polarity_flip_fabric30.BCM8892X": "1", - "phy_tx_polarity_flip_fabric300.BCM8892X": "0", - "phy_tx_polarity_flip_fabric301.BCM8892X": "1", + "phy_tx_polarity_flip_fabric300.BCM8892X": "1", + "phy_tx_polarity_flip_fabric301.BCM8892X": "0", "phy_tx_polarity_flip_fabric302.BCM8892X": "0", "phy_tx_polarity_flip_fabric303.BCM8892X": "1", - "phy_tx_polarity_flip_fabric304.BCM8892X": "1", - "phy_tx_polarity_flip_fabric305.BCM8892X": "0", + "phy_tx_polarity_flip_fabric304.BCM8892X": "0", + "phy_tx_polarity_flip_fabric305.BCM8892X": "1", "phy_tx_polarity_flip_fabric306.BCM8892X": "1", "phy_tx_polarity_flip_fabric307.BCM8892X": "0", - "phy_tx_polarity_flip_fabric308.BCM8892X": "1", - "phy_tx_polarity_flip_fabric309.BCM8892X": "0", + "phy_tx_polarity_flip_fabric308.BCM8892X": "0", + "phy_tx_polarity_flip_fabric309.BCM8892X": "1", "phy_tx_polarity_flip_fabric31.BCM8892X": "0", "phy_tx_polarity_flip_fabric310.BCM8892X": "1", "phy_tx_polarity_flip_fabric311.BCM8892X": "0", - "phy_tx_polarity_flip_fabric312.BCM8892X": "0", - "phy_tx_polarity_flip_fabric313.BCM8892X": "1", + "phy_tx_polarity_flip_fabric312.BCM8892X": "1", + "phy_tx_polarity_flip_fabric313.BCM8892X": "0", "phy_tx_polarity_flip_fabric314.BCM8892X": "0", "phy_tx_polarity_flip_fabric315.BCM8892X": "1", - "phy_tx_polarity_flip_fabric316.BCM8892X": "0", - "phy_tx_polarity_flip_fabric317.BCM8892X": "1", + "phy_tx_polarity_flip_fabric316.BCM8892X": "1", + "phy_tx_polarity_flip_fabric317.BCM8892X": "0", "phy_tx_polarity_flip_fabric318.BCM8892X": "0", "phy_tx_polarity_flip_fabric319.BCM8892X": "1", - "phy_tx_polarity_flip_fabric32.BCM8892X": "0", + "phy_tx_polarity_flip_fabric32.BCM8892X": "1", "phy_tx_polarity_flip_fabric320.BCM8892X": "0", "phy_tx_polarity_flip_fabric321.BCM8892X": "1", - "phy_tx_polarity_flip_fabric322.BCM8892X": "1", - "phy_tx_polarity_flip_fabric323.BCM8892X": "1", + "phy_tx_polarity_flip_fabric322.BCM8892X": "0", + "phy_tx_polarity_flip_fabric323.BCM8892X": "0", "phy_tx_polarity_flip_fabric324.BCM8892X": "0", "phy_tx_polarity_flip_fabric325.BCM8892X": "1", - "phy_tx_polarity_flip_fabric326.BCM8892X": "1", - "phy_tx_polarity_flip_fabric327.BCM8892X": "1", + "phy_tx_polarity_flip_fabric326.BCM8892X": "0", + "phy_tx_polarity_flip_fabric327.BCM8892X": "0", "phy_tx_polarity_flip_fabric328.BCM8892X": "1", "phy_tx_polarity_flip_fabric329.BCM8892X": "0", - "phy_tx_polarity_flip_fabric33.BCM8892X": "1", + "phy_tx_polarity_flip_fabric33.BCM8892X": "0", "phy_tx_polarity_flip_fabric330.BCM8892X": "1", - "phy_tx_polarity_flip_fabric331.BCM8892X": "1", + "phy_tx_polarity_flip_fabric331.BCM8892X": "0", "phy_tx_polarity_flip_fabric332.BCM8892X": "1", "phy_tx_polarity_flip_fabric333.BCM8892X": "0", "phy_tx_polarity_flip_fabric334.BCM8892X": "1", - "phy_tx_polarity_flip_fabric335.BCM8892X": "1", + "phy_tx_polarity_flip_fabric335.BCM8892X": "0", "phy_tx_polarity_flip_fabric336.BCM8892X": "0", "phy_tx_polarity_flip_fabric337.BCM8892X": "1", - "phy_tx_polarity_flip_fabric338.BCM8892X": "1", - "phy_tx_polarity_flip_fabric339.BCM8892X": "1", + "phy_tx_polarity_flip_fabric338.BCM8892X": "0", + "phy_tx_polarity_flip_fabric339.BCM8892X": "0", "phy_tx_polarity_flip_fabric34.BCM8892X": "0", "phy_tx_polarity_flip_fabric340.BCM8892X": "0", "phy_tx_polarity_flip_fabric341.BCM8892X": "1", - "phy_tx_polarity_flip_fabric342.BCM8892X": "1", - "phy_tx_polarity_flip_fabric343.BCM8892X": "1", + "phy_tx_polarity_flip_fabric342.BCM8892X": "0", + "phy_tx_polarity_flip_fabric343.BCM8892X": "0", "phy_tx_polarity_flip_fabric344.BCM8892X": "1", "phy_tx_polarity_flip_fabric345.BCM8892X": "0", "phy_tx_polarity_flip_fabric346.BCM8892X": "1", - "phy_tx_polarity_flip_fabric347.BCM8892X": "1", + "phy_tx_polarity_flip_fabric347.BCM8892X": "0", "phy_tx_polarity_flip_fabric348.BCM8892X": "1", "phy_tx_polarity_flip_fabric349.BCM8892X": "0", "phy_tx_polarity_flip_fabric35.BCM8892X": "1", "phy_tx_polarity_flip_fabric350.BCM8892X": "1", - "phy_tx_polarity_flip_fabric351.BCM8892X": "1", + "phy_tx_polarity_flip_fabric351.BCM8892X": "0", "phy_tx_polarity_flip_fabric352.BCM8892X": "0", "phy_tx_polarity_flip_fabric353.BCM8892X": "1", - "phy_tx_polarity_flip_fabric354.BCM8892X": "1", - "phy_tx_polarity_flip_fabric355.BCM8892X": "1", + "phy_tx_polarity_flip_fabric354.BCM8892X": "0", + "phy_tx_polarity_flip_fabric355.BCM8892X": "0", "phy_tx_polarity_flip_fabric356.BCM8892X": "0", "phy_tx_polarity_flip_fabric357.BCM8892X": "1", - "phy_tx_polarity_flip_fabric358.BCM8892X": "1", - "phy_tx_polarity_flip_fabric359.BCM8892X": "1", - "phy_tx_polarity_flip_fabric36.BCM8892X": "0", + "phy_tx_polarity_flip_fabric358.BCM8892X": "0", + "phy_tx_polarity_flip_fabric359.BCM8892X": "0", + "phy_tx_polarity_flip_fabric36.BCM8892X": "1", "phy_tx_polarity_flip_fabric360.BCM8892X": "0", "phy_tx_polarity_flip_fabric361.BCM8892X": "0", "phy_tx_polarity_flip_fabric362.BCM8892X": "1", - "phy_tx_polarity_flip_fabric363.BCM8892X": "1", + "phy_tx_polarity_flip_fabric363.BCM8892X": "0", "phy_tx_polarity_flip_fabric364.BCM8892X": "0", "phy_tx_polarity_flip_fabric365.BCM8892X": "1", "phy_tx_polarity_flip_fabric366.BCM8892X": "0", - "phy_tx_polarity_flip_fabric367.BCM8892X": "0", + "phy_tx_polarity_flip_fabric367.BCM8892X": "1", "phy_tx_polarity_flip_fabric368.BCM8892X": "0", "phy_tx_polarity_flip_fabric369.BCM8892X": "1", - "phy_tx_polarity_flip_fabric37.BCM8892X": "1", + "phy_tx_polarity_flip_fabric37.BCM8892X": "0", "phy_tx_polarity_flip_fabric370.BCM8892X": "1", "phy_tx_polarity_flip_fabric371.BCM8892X": "0", "phy_tx_polarity_flip_fabric372.BCM8892X": "1", @@ -3098,112 +3103,112 @@ "phy_tx_polarity_flip_fabric398.BCM8892X": "1", "phy_tx_polarity_flip_fabric399.BCM8892X": "0", "phy_tx_polarity_flip_fabric4.BCM8892X": "1", - "phy_tx_polarity_flip_fabric40.BCM8892X": "1", + "phy_tx_polarity_flip_fabric40.BCM8892X": "0", "phy_tx_polarity_flip_fabric400.BCM8892X": "0", "phy_tx_polarity_flip_fabric401.BCM8892X": "1", "phy_tx_polarity_flip_fabric402.BCM8892X": "1", "phy_tx_polarity_flip_fabric403.BCM8892X": "1", - "phy_tx_polarity_flip_fabric404.BCM8892X": "1", + "phy_tx_polarity_flip_fabric404.BCM8892X": "0", "phy_tx_polarity_flip_fabric405.BCM8892X": "0", "phy_tx_polarity_flip_fabric406.BCM8892X": "0", "phy_tx_polarity_flip_fabric407.BCM8892X": "1", - "phy_tx_polarity_flip_fabric408.BCM8892X": "0", - "phy_tx_polarity_flip_fabric409.BCM8892X": "1", - "phy_tx_polarity_flip_fabric41.BCM8892X": "0", + "phy_tx_polarity_flip_fabric408.BCM8892X": "1", + "phy_tx_polarity_flip_fabric409.BCM8892X": "0", + "phy_tx_polarity_flip_fabric41.BCM8892X": "1", "phy_tx_polarity_flip_fabric410.BCM8892X": "0", "phy_tx_polarity_flip_fabric411.BCM8892X": "0", - "phy_tx_polarity_flip_fabric412.BCM8892X": "0", - "phy_tx_polarity_flip_fabric413.BCM8892X": "1", + "phy_tx_polarity_flip_fabric412.BCM8892X": "1", + "phy_tx_polarity_flip_fabric413.BCM8892X": "0", "phy_tx_polarity_flip_fabric414.BCM8892X": "0", "phy_tx_polarity_flip_fabric415.BCM8892X": "0", - "phy_tx_polarity_flip_fabric416.BCM8892X": "1", + "phy_tx_polarity_flip_fabric416.BCM8892X": "0", "phy_tx_polarity_flip_fabric417.BCM8892X": "0", "phy_tx_polarity_flip_fabric418.BCM8892X": "0", "phy_tx_polarity_flip_fabric419.BCM8892X": "0", "phy_tx_polarity_flip_fabric42.BCM8892X": "1", - "phy_tx_polarity_flip_fabric420.BCM8892X": "1", + "phy_tx_polarity_flip_fabric420.BCM8892X": "0", "phy_tx_polarity_flip_fabric421.BCM8892X": "0", "phy_tx_polarity_flip_fabric422.BCM8892X": "0", "phy_tx_polarity_flip_fabric423.BCM8892X": "0", - "phy_tx_polarity_flip_fabric424.BCM8892X": "0", - "phy_tx_polarity_flip_fabric425.BCM8892X": "1", + "phy_tx_polarity_flip_fabric424.BCM8892X": "1", + "phy_tx_polarity_flip_fabric425.BCM8892X": "0", "phy_tx_polarity_flip_fabric426.BCM8892X": "0", "phy_tx_polarity_flip_fabric427.BCM8892X": "0", - "phy_tx_polarity_flip_fabric428.BCM8892X": "0", - "phy_tx_polarity_flip_fabric429.BCM8892X": "1", + "phy_tx_polarity_flip_fabric428.BCM8892X": "1", + "phy_tx_polarity_flip_fabric429.BCM8892X": "0", "phy_tx_polarity_flip_fabric43.BCM8892X": "0", "phy_tx_polarity_flip_fabric430.BCM8892X": "0", "phy_tx_polarity_flip_fabric431.BCM8892X": "0", - "phy_tx_polarity_flip_fabric432.BCM8892X": "1", + "phy_tx_polarity_flip_fabric432.BCM8892X": "0", "phy_tx_polarity_flip_fabric433.BCM8892X": "0", "phy_tx_polarity_flip_fabric434.BCM8892X": "0", "phy_tx_polarity_flip_fabric435.BCM8892X": "0", - "phy_tx_polarity_flip_fabric436.BCM8892X": "1", + "phy_tx_polarity_flip_fabric436.BCM8892X": "0", "phy_tx_polarity_flip_fabric437.BCM8892X": "0", "phy_tx_polarity_flip_fabric438.BCM8892X": "0", "phy_tx_polarity_flip_fabric439.BCM8892X": "0", - "phy_tx_polarity_flip_fabric44.BCM8892X": "1", - "phy_tx_polarity_flip_fabric440.BCM8892X": "0", - "phy_tx_polarity_flip_fabric441.BCM8892X": "1", + "phy_tx_polarity_flip_fabric44.BCM8892X": "0", + "phy_tx_polarity_flip_fabric440.BCM8892X": "1", + "phy_tx_polarity_flip_fabric441.BCM8892X": "0", "phy_tx_polarity_flip_fabric442.BCM8892X": "0", "phy_tx_polarity_flip_fabric443.BCM8892X": "0", - "phy_tx_polarity_flip_fabric444.BCM8892X": "0", - "phy_tx_polarity_flip_fabric445.BCM8892X": "1", + "phy_tx_polarity_flip_fabric444.BCM8892X": "1", + "phy_tx_polarity_flip_fabric445.BCM8892X": "0", "phy_tx_polarity_flip_fabric446.BCM8892X": "0", "phy_tx_polarity_flip_fabric447.BCM8892X": "0", "phy_tx_polarity_flip_fabric448.BCM8892X": "0", "phy_tx_polarity_flip_fabric449.BCM8892X": "1", - "phy_tx_polarity_flip_fabric45.BCM8892X": "0", - "phy_tx_polarity_flip_fabric450.BCM8892X": "0", - "phy_tx_polarity_flip_fabric451.BCM8892X": "1", + "phy_tx_polarity_flip_fabric45.BCM8892X": "1", + "phy_tx_polarity_flip_fabric450.BCM8892X": "1", + "phy_tx_polarity_flip_fabric451.BCM8892X": "0", "phy_tx_polarity_flip_fabric452.BCM8892X": "0", "phy_tx_polarity_flip_fabric453.BCM8892X": "1", - "phy_tx_polarity_flip_fabric454.BCM8892X": "0", - "phy_tx_polarity_flip_fabric455.BCM8892X": "1", + "phy_tx_polarity_flip_fabric454.BCM8892X": "1", + "phy_tx_polarity_flip_fabric455.BCM8892X": "0", "phy_tx_polarity_flip_fabric456.BCM8892X": "1", "phy_tx_polarity_flip_fabric457.BCM8892X": "0", - "phy_tx_polarity_flip_fabric458.BCM8892X": "1", - "phy_tx_polarity_flip_fabric459.BCM8892X": "0", + "phy_tx_polarity_flip_fabric458.BCM8892X": "0", + "phy_tx_polarity_flip_fabric459.BCM8892X": "1", "phy_tx_polarity_flip_fabric46.BCM8892X": "1", "phy_tx_polarity_flip_fabric460.BCM8892X": "1", "phy_tx_polarity_flip_fabric461.BCM8892X": "0", - "phy_tx_polarity_flip_fabric462.BCM8892X": "1", - "phy_tx_polarity_flip_fabric463.BCM8892X": "0", + "phy_tx_polarity_flip_fabric462.BCM8892X": "0", + "phy_tx_polarity_flip_fabric463.BCM8892X": "1", "phy_tx_polarity_flip_fabric464.BCM8892X": "0", "phy_tx_polarity_flip_fabric465.BCM8892X": "1", - "phy_tx_polarity_flip_fabric466.BCM8892X": "0", - "phy_tx_polarity_flip_fabric467.BCM8892X": "1", + "phy_tx_polarity_flip_fabric466.BCM8892X": "1", + "phy_tx_polarity_flip_fabric467.BCM8892X": "0", "phy_tx_polarity_flip_fabric468.BCM8892X": "0", "phy_tx_polarity_flip_fabric469.BCM8892X": "1", "phy_tx_polarity_flip_fabric47.BCM8892X": "0", - "phy_tx_polarity_flip_fabric470.BCM8892X": "0", - "phy_tx_polarity_flip_fabric471.BCM8892X": "1", + "phy_tx_polarity_flip_fabric470.BCM8892X": "1", + "phy_tx_polarity_flip_fabric471.BCM8892X": "0", "phy_tx_polarity_flip_fabric472.BCM8892X": "1", "phy_tx_polarity_flip_fabric473.BCM8892X": "0", - "phy_tx_polarity_flip_fabric474.BCM8892X": "1", - "phy_tx_polarity_flip_fabric475.BCM8892X": "0", + "phy_tx_polarity_flip_fabric474.BCM8892X": "0", + "phy_tx_polarity_flip_fabric475.BCM8892X": "1", "phy_tx_polarity_flip_fabric476.BCM8892X": "1", "phy_tx_polarity_flip_fabric477.BCM8892X": "0", - "phy_tx_polarity_flip_fabric478.BCM8892X": "1", - "phy_tx_polarity_flip_fabric479.BCM8892X": "0", - "phy_tx_polarity_flip_fabric48.BCM8892X": "0", + "phy_tx_polarity_flip_fabric478.BCM8892X": "0", + "phy_tx_polarity_flip_fabric479.BCM8892X": "1", + "phy_tx_polarity_flip_fabric48.BCM8892X": "1", "phy_tx_polarity_flip_fabric480.BCM8892X": "0", "phy_tx_polarity_flip_fabric481.BCM8892X": "1", - "phy_tx_polarity_flip_fabric482.BCM8892X": "0", - "phy_tx_polarity_flip_fabric483.BCM8892X": "1", + "phy_tx_polarity_flip_fabric482.BCM8892X": "1", + "phy_tx_polarity_flip_fabric483.BCM8892X": "0", "phy_tx_polarity_flip_fabric484.BCM8892X": "0", "phy_tx_polarity_flip_fabric485.BCM8892X": "1", - "phy_tx_polarity_flip_fabric486.BCM8892X": "0", - "phy_tx_polarity_flip_fabric487.BCM8892X": "1", + "phy_tx_polarity_flip_fabric486.BCM8892X": "1", + "phy_tx_polarity_flip_fabric487.BCM8892X": "0", "phy_tx_polarity_flip_fabric488.BCM8892X": "0", "phy_tx_polarity_flip_fabric489.BCM8892X": "0", - "phy_tx_polarity_flip_fabric49.BCM8892X": "1", - "phy_tx_polarity_flip_fabric490.BCM8892X": "1", - "phy_tx_polarity_flip_fabric491.BCM8892X": "0", + "phy_tx_polarity_flip_fabric49.BCM8892X": "0", + "phy_tx_polarity_flip_fabric490.BCM8892X": "0", + "phy_tx_polarity_flip_fabric491.BCM8892X": "1", "phy_tx_polarity_flip_fabric492.BCM8892X": "0", "phy_tx_polarity_flip_fabric493.BCM8892X": "1", "phy_tx_polarity_flip_fabric494.BCM8892X": "1", - "phy_tx_polarity_flip_fabric495.BCM8892X": "0", + "phy_tx_polarity_flip_fabric495.BCM8892X": "1", "phy_tx_polarity_flip_fabric496.BCM8892X": "0", "phy_tx_polarity_flip_fabric497.BCM8892X": "1", "phy_tx_polarity_flip_fabric498.BCM8892X": "1", @@ -3223,58 +3228,58 @@ "phy_tx_polarity_flip_fabric51.BCM8892X": "1", "phy_tx_polarity_flip_fabric510.BCM8892X": "1", "phy_tx_polarity_flip_fabric511.BCM8892X": "0", - "phy_tx_polarity_flip_fabric52.BCM8892X": "0", - "phy_tx_polarity_flip_fabric53.BCM8892X": "1", + "phy_tx_polarity_flip_fabric52.BCM8892X": "1", + "phy_tx_polarity_flip_fabric53.BCM8892X": "0", "phy_tx_polarity_flip_fabric54.BCM8892X": "0", "phy_tx_polarity_flip_fabric55.BCM8892X": "1", - "phy_tx_polarity_flip_fabric56.BCM8892X": "1", - "phy_tx_polarity_flip_fabric57.BCM8892X": "0", + "phy_tx_polarity_flip_fabric56.BCM8892X": "0", + "phy_tx_polarity_flip_fabric57.BCM8892X": "1", "phy_tx_polarity_flip_fabric58.BCM8892X": "1", "phy_tx_polarity_flip_fabric59.BCM8892X": "0", "phy_tx_polarity_flip_fabric6.BCM8892X": "0", - "phy_tx_polarity_flip_fabric60.BCM8892X": "1", - "phy_tx_polarity_flip_fabric61.BCM8892X": "0", + "phy_tx_polarity_flip_fabric60.BCM8892X": "0", + "phy_tx_polarity_flip_fabric61.BCM8892X": "1", "phy_tx_polarity_flip_fabric62.BCM8892X": "1", "phy_tx_polarity_flip_fabric63.BCM8892X": "0", "phy_tx_polarity_flip_fabric64.BCM8892X": "1", "phy_tx_polarity_flip_fabric65.BCM8892X": "1", - "phy_tx_polarity_flip_fabric66.BCM8892X": "0", - "phy_tx_polarity_flip_fabric67.BCM8892X": "0", + "phy_tx_polarity_flip_fabric66.BCM8892X": "1", + "phy_tx_polarity_flip_fabric67.BCM8892X": "1", "phy_tx_polarity_flip_fabric68.BCM8892X": "1", "phy_tx_polarity_flip_fabric69.BCM8892X": "1", "phy_tx_polarity_flip_fabric7.BCM8892X": "1", - "phy_tx_polarity_flip_fabric70.BCM8892X": "0", - "phy_tx_polarity_flip_fabric71.BCM8892X": "0", + "phy_tx_polarity_flip_fabric70.BCM8892X": "1", + "phy_tx_polarity_flip_fabric71.BCM8892X": "1", "phy_tx_polarity_flip_fabric72.BCM8892X": "0", "phy_tx_polarity_flip_fabric73.BCM8892X": "1", "phy_tx_polarity_flip_fabric74.BCM8892X": "1", - "phy_tx_polarity_flip_fabric75.BCM8892X": "0", + "phy_tx_polarity_flip_fabric75.BCM8892X": "1", "phy_tx_polarity_flip_fabric76.BCM8892X": "0", "phy_tx_polarity_flip_fabric77.BCM8892X": "1", "phy_tx_polarity_flip_fabric78.BCM8892X": "1", - "phy_tx_polarity_flip_fabric79.BCM8892X": "0", + "phy_tx_polarity_flip_fabric79.BCM8892X": "1", "phy_tx_polarity_flip_fabric8.BCM8892X": "0", "phy_tx_polarity_flip_fabric80.BCM8892X": "1", "phy_tx_polarity_flip_fabric81.BCM8892X": "1", - "phy_tx_polarity_flip_fabric82.BCM8892X": "0", - "phy_tx_polarity_flip_fabric83.BCM8892X": "0", + "phy_tx_polarity_flip_fabric82.BCM8892X": "1", + "phy_tx_polarity_flip_fabric83.BCM8892X": "1", "phy_tx_polarity_flip_fabric84.BCM8892X": "1", "phy_tx_polarity_flip_fabric85.BCM8892X": "1", - "phy_tx_polarity_flip_fabric86.BCM8892X": "0", - "phy_tx_polarity_flip_fabric87.BCM8892X": "0", + "phy_tx_polarity_flip_fabric86.BCM8892X": "1", + "phy_tx_polarity_flip_fabric87.BCM8892X": "1", "phy_tx_polarity_flip_fabric88.BCM8892X": "0", "phy_tx_polarity_flip_fabric89.BCM8892X": "1", "phy_tx_polarity_flip_fabric9.BCM8892X": "1", "phy_tx_polarity_flip_fabric90.BCM8892X": "1", - "phy_tx_polarity_flip_fabric91.BCM8892X": "0", + "phy_tx_polarity_flip_fabric91.BCM8892X": "1", "phy_tx_polarity_flip_fabric92.BCM8892X": "0", "phy_tx_polarity_flip_fabric93.BCM8892X": "1", "phy_tx_polarity_flip_fabric94.BCM8892X": "1", - "phy_tx_polarity_flip_fabric95.BCM8892X": "0", + "phy_tx_polarity_flip_fabric95.BCM8892X": "1", "phy_tx_polarity_flip_fabric96.BCM8892X": "1", "phy_tx_polarity_flip_fabric97.BCM8892X": "1", - "phy_tx_polarity_flip_fabric98.BCM8892X": "0", - "phy_tx_polarity_flip_fabric99.BCM8892X": "0" + "phy_tx_polarity_flip_fabric98.BCM8892X": "1", + "phy_tx_polarity_flip_fabric99.BCM8892X": "1" } } } diff --git a/fboss/oss/hw_test_configs/meru800bia.agent.materialized_JSON b/fboss/oss/hw_test_configs/meru800bia.agent.materialized_JSON index 8021f69aa51ca..c568370902915 100644 --- a/fboss/oss/hw_test_configs/meru800bia.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/meru800bia.agent.materialized_JSON @@ -1,10 +1,13 @@ { "defaultCommandLineArgs": { "check_wb_handles": "true", + "classid_for_unresolved_routes": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "intf_nbr_tables": "true", "log_variable_name": "true", "sai_configure_six_tap": "true", + "set_classid_for_my_subnet_and_ip_routes": "true", "skip_transceiver_programming": "true" }, "sw": { @@ -57,7 +60,7 @@ "isVirtual": false, "isStateSyncDisabled": true, "type": 2, - "scope": 1 + "scope": 0 } ], "arpTimeoutSeconds": 60, @@ -86,6 +89,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -142,7 +146,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -157,10 +161,21 @@ }, "systemPortRange": { "minimum": 10, - "maximum": 54 + "maximum": 53 }, "switchMac": "02:00:00:00:00:01", - "connectionHandle": "15:00" + "connectionHandle": "15:00", + "systemPortRanges": { + "systemPortRanges": [ + { + "minimum": 10, + "maximum": 53 + } + ] + }, + "localSystemPortOffset": 10, + "globalSystemPortOffset": 10, + "inbandPortId": 1 } }, "vendorMacOuis": [ @@ -171,6 +186,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { "0": { "name": "intfNode0", @@ -181,11 +222,22 @@ ], "systemPortRange": { "minimum": 10, - "maximum": 54 + "maximum": 53 }, "nodeMac": "02:00:00:00:0F:0B", "asicType": 14, - "platformType": 28 + "platformType": 28, + "localSystemPortOffset": 10, + "globalSystemPortOffset": 10, + "systemPortRanges": { + "systemPortRanges": [ + { + "minimum": 10, + "maximum": 53 + } + ] + }, + "inbandPortId": 1 } }, "defaultVoqConfig": [ @@ -208,6 +260,7 @@ "custom_feature_statdma_enable": "0", "custom_feature_use_new_access.BCM8889X": "1", "custom_feature_use_new_access.BCM8889X_ADAPTER": "1", + "custom_feature_vsqd_lossless_reject_enable": "1", "dpp_db_path": "/tmp/db", "dram_temperature_monitor_enable.BCM8889X_ADAPTER": "0", "dtm_flow_mapping_mode_region_65.BCM8889X": "3", @@ -245,6 +298,9 @@ "fabric_connectivity_based_on_integrity": "0", "fabric_distributed_system_enable": "1", "fail_on_unsupported_attribute": "1", + "fw_auto_isolation_arm_core_to_use.0": "5", + "fw_auto_isolation_image_filename.0": "/tmp/db/jericho3ai_a0/BCM8889X_fi.elf", + "fw_auto_isolation_log_filename.0": "/tmp/edk_fi.log", "l3_ecmp_max_group_size": "512", "lane_to_serdes_map_fabric_lane0.BCM8889X": "rx0:tx5", "lane_to_serdes_map_fabric_lane1.BCM8889X": "rx1:tx3", @@ -1197,8 +1253,10 @@ "port_init_speed_cd.BCM8889X": "400000", "port_init_speed_ce.BCM8889X": "100000", "port_init_speed_d3c.BCM8889X": "800000", + "port_init_speed_eventor.BCM8889X": "100000", "port_init_speed_fabric.BCM8889X": "106250", "port_init_speed_le.BCM8889X": "50000", + "port_init_speed_rcy.BCM8889X": "100000", "port_init_speed_sat.BCM8889X": "400000", "port_init_speed_xe.BCM8889X": "25000", "port_init_speed_xe13.BCM8889X": "10000", @@ -1252,6 +1310,7 @@ "sai_l3_max_ecmp_paths": "512", "sai_macro_flow_based_hash": "1", "sai_mmu_qgroups_default": "1", + "sai_ocb_fc_config": "2", "sai_optimize_acl_ipv6_addr_qual": "0", "sai_optimized_mmu": "0x1", "sai_pfc_defaults_disable": "0x1", @@ -1259,7 +1318,8 @@ "sai_pkt_rx_custom_cfg": "1", "sai_pkt_rx_pkt_size": "16512", "sai_recycle_port_lane_base": "440", - "sai_trigger_linkscan_remote_local_faults": "0", + "sai_tc_mirror_buffer_size_bytes": "1", + "sai_trigger_linkscan_remote_local_faults": "1", "sai_uncached_port_stats": "0x1", "sai_voq_wm_latency_enable": "1", "sat_enable.BCM8889X_ADAPTER": "1", diff --git a/fboss/oss/hw_test_configs/minipack.agent.materialized_JSON b/fboss/oss/hw_test_configs/minipack.agent.materialized_JSON index d9614579b2c63..6fdf5802b9a2e 100644 --- a/fboss/oss/hw_test_configs/minipack.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/minipack.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -270,10 +298,12 @@ "dport_map_port_94": "113", "dport_map_port_95": "114", "dpr_clock_frequency": "1000", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "1", "l2xmsg_shadow_hit_bits": "0", "l3_alpm_enable": "2", "l3_alpm_ipv6_128b_bkt_rsvd": "1", + "l3_max_ecmp_mode": "1", "load_firmware": "0x2", "macro_flow_hash_shuffle_random_seed": "34345645", "mem_cache_enable": "0", diff --git a/fboss/oss/hw_test_configs/montblanc.agent.materialized_JSON b/fboss/oss/hw_test_configs/montblanc.agent.materialized_JSON index df35fbd5cb223..b04b48951c219 100644 --- a/fboss/oss/hw_test_configs/montblanc.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/montblanc.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "sai_configure_six_tap": "true", "skip_transceiver_programming": "true" @@ -47,6 +48,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -102,7 +104,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -125,6 +127,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -136,7 +164,7 @@ "chip": { "asicConfig": { "common": { - "yamlConfig": "---\ndevice:\n 0:\n PC_PM_CORE:\n ?\n PC_PM_ID: 1\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x8C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 2\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 3\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x23016745\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x33\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x00\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 4\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x52701634\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 5\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74305612\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21640357\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x59\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 6\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x03562147\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30742165\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x48\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x29\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 7\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x14567302\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56712430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAF\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 8\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67315024\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56217034\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x53\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 9\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21403765\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20543176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x48\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 10\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x53062147\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30742165\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x48\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x69\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 11\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54067312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56712430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAF\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 12\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65304721\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56217430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x56\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 13\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21403765\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20543176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x48\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 14\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x53062147\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30742165\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x48\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x69\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 15\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54067312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56712430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAF\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 16\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65304721\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56217430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x56\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 17\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65274130\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56207431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x87\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 18\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47306521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76305412\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x6C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x86\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 19\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x02731456\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21345076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x99\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 20\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30472165\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21543076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x6C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAD\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 21\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45376120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56207431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 22\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x40376521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76305412\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x86\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 23\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x02731456\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21345076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x99\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 24\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30472165\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21543076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x6C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAD\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 25\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45376120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56207431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 26\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x40376521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76305412\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x86\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 27\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x03762514\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21345076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDE\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x03\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 28\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67125403\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12470356\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x63\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xB2\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 29\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32107654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x22\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 30\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32107654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xCC\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x00\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 31\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x05371426\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x65\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 32\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x56741032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23016745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x9C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 33\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x46751032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32106754\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 34\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54721036\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x22\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 35\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x63410725\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x93\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 36\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32107645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x77\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 37\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74260351\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x13064257\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xD8\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x21\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 38\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10573246\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30762145\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x99\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 39\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47356120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56702431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x8F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 40\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75016423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54217630\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x58\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 41\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01736524\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20365174\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x96\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x52\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 42\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10573246\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30762145\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 43\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47356120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56702431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x8F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 44\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75016423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54217630\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x58\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 45\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01746523\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20365174\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x86\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x52\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 46\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10576423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30762145\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 47\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x46357102\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56702431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x8F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 48\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75016423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54216703\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x54\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 49\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57032146\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54702631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xED\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 50\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75102346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74305612\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 51\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32610754\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20345176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x95\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x60\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 52\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01572346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21560347\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 53\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57032146\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54702631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xED\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 54\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75102346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74305612\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 55\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32610754\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20345176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x95\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x60\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 56\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01572346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21560347\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 57\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57032146\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54702631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xED\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 58\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75102346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74305612\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 59\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32610754\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20345176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x95\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x20\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 60\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x64207531\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23671045\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0B\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xBB\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 61\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x51740362\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB1\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 62\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x23016745\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x66\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 63\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x00\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 64\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23016745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xD9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 65\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x3210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x3210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x00\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0F\n TX_POLARITY_FLIP_AUTO: 0\n...\n---\ndevice:\n 0:\n PC_PORT_PHYS_MAP:\n ?\n PORT_ID: 1\n :\n PC_PHYS_PORT_ID: 1\n ?\n PORT_ID: 5\n :\n PC_PHYS_PORT_ID: 5\n ?\n PORT_ID: 9\n :\n PC_PHYS_PORT_ID: 9\n ?\n PORT_ID: 10\n :\n PC_PHYS_PORT_ID: 13\n ?\n PORT_ID: 11\n :\n PC_PHYS_PORT_ID: 17\n ?\n PORT_ID: 15\n :\n PC_PHYS_PORT_ID: 21\n ?\n PORT_ID: 19\n :\n PC_PHYS_PORT_ID: 25\n ?\n PORT_ID: 20\n :\n PC_PHYS_PORT_ID: 29\n ?\n PORT_ID: 22\n :\n PC_PHYS_PORT_ID: 33\n ?\n PORT_ID: 26\n :\n PC_PHYS_PORT_ID: 37\n ?\n PORT_ID: 30\n :\n PC_PHYS_PORT_ID: 41\n ?\n PORT_ID: 31\n :\n PC_PHYS_PORT_ID: 45\n ?\n PORT_ID: 33\n :\n PC_PHYS_PORT_ID: 49\n ?\n PORT_ID: 37\n :\n PC_PHYS_PORT_ID: 53\n ?\n PORT_ID: 41\n :\n PC_PHYS_PORT_ID: 57\n ?\n PORT_ID: 42\n :\n PC_PHYS_PORT_ID: 61\n ?\n PORT_ID: 44\n :\n PC_PHYS_PORT_ID: 65\n ?\n PORT_ID: 48\n :\n PC_PHYS_PORT_ID: 69\n ?\n PORT_ID: 52\n :\n PC_PHYS_PORT_ID: 73\n ?\n PORT_ID: 53\n :\n PC_PHYS_PORT_ID: 77\n ?\n PORT_ID: 55\n :\n PC_PHYS_PORT_ID: 81\n ?\n PORT_ID: 59\n :\n PC_PHYS_PORT_ID: 85\n ?\n PORT_ID: 63\n :\n PC_PHYS_PORT_ID: 89\n ?\n PORT_ID: 64\n :\n PC_PHYS_PORT_ID: 93\n ?\n PORT_ID: 66\n :\n PC_PHYS_PORT_ID: 97\n ?\n PORT_ID: 70\n :\n PC_PHYS_PORT_ID: 101\n ?\n PORT_ID: 74\n :\n PC_PHYS_PORT_ID: 105\n ?\n PORT_ID: 75\n :\n PC_PHYS_PORT_ID: 109\n ?\n PORT_ID: 77\n :\n PC_PHYS_PORT_ID: 113\n ?\n PORT_ID: 81\n :\n PC_PHYS_PORT_ID: 117\n ?\n PORT_ID: 85\n :\n PC_PHYS_PORT_ID: 121\n ?\n PORT_ID: 86\n :\n PC_PHYS_PORT_ID: 125\n ?\n PORT_ID: 88\n :\n PC_PHYS_PORT_ID: 129\n ?\n PORT_ID: 92\n :\n PC_PHYS_PORT_ID: 133\n ?\n PORT_ID: 96\n :\n PC_PHYS_PORT_ID: 137\n ?\n PORT_ID: 97\n :\n PC_PHYS_PORT_ID: 141\n ?\n PORT_ID: 99\n :\n PC_PHYS_PORT_ID: 145\n ?\n PORT_ID: 103\n :\n PC_PHYS_PORT_ID: 149\n ?\n PORT_ID: 107\n :\n PC_PHYS_PORT_ID: 153\n ?\n PORT_ID: 108\n :\n PC_PHYS_PORT_ID: 157\n ?\n PORT_ID: 110\n :\n PC_PHYS_PORT_ID: 161\n ?\n PORT_ID: 114\n :\n PC_PHYS_PORT_ID: 165\n ?\n PORT_ID: 118\n :\n PC_PHYS_PORT_ID: 169\n ?\n PORT_ID: 119\n :\n PC_PHYS_PORT_ID: 173\n ?\n PORT_ID: 121\n :\n PC_PHYS_PORT_ID: 177\n ?\n PORT_ID: 125\n :\n PC_PHYS_PORT_ID: 181\n ?\n PORT_ID: 129\n :\n PC_PHYS_PORT_ID: 185\n ?\n PORT_ID: 130\n :\n PC_PHYS_PORT_ID: 189\n ?\n PORT_ID: 132\n :\n PC_PHYS_PORT_ID: 193\n ?\n PORT_ID: 136\n :\n PC_PHYS_PORT_ID: 197\n ?\n PORT_ID: 140\n :\n PC_PHYS_PORT_ID: 201\n ?\n PORT_ID: 141\n :\n PC_PHYS_PORT_ID: 205\n ?\n PORT_ID: 143\n :\n PC_PHYS_PORT_ID: 209\n ?\n PORT_ID: 147\n :\n PC_PHYS_PORT_ID: 213\n ?\n PORT_ID: 151\n :\n PC_PHYS_PORT_ID: 217\n ?\n PORT_ID: 152\n :\n PC_PHYS_PORT_ID: 221\n ?\n PORT_ID: 154\n :\n PC_PHYS_PORT_ID: 225\n ?\n PORT_ID: 158\n :\n PC_PHYS_PORT_ID: 229\n ?\n PORT_ID: 162\n :\n PC_PHYS_PORT_ID: 233\n ?\n PORT_ID: 163\n :\n PC_PHYS_PORT_ID: 237\n ?\n PORT_ID: 165\n :\n PC_PHYS_PORT_ID: 241\n ?\n PORT_ID: 169\n :\n PC_PHYS_PORT_ID: 245\n ?\n PORT_ID: 173\n :\n PC_PHYS_PORT_ID: 249\n ?\n PORT_ID: 174\n :\n PC_PHYS_PORT_ID: 253\n ?\n PORT_ID: 176\n :\n PC_PHYS_PORT_ID: 257\n ?\n PORT_ID: 180\n :\n PC_PHYS_PORT_ID: 261\n ?\n PORT_ID: 184\n :\n PC_PHYS_PORT_ID: 265\n ?\n PORT_ID: 185\n :\n PC_PHYS_PORT_ID: 269\n ?\n PORT_ID: 187\n :\n PC_PHYS_PORT_ID: 273\n ?\n PORT_ID: 191\n :\n PC_PHYS_PORT_ID: 277\n ?\n PORT_ID: 195\n :\n PC_PHYS_PORT_ID: 281\n ?\n PORT_ID: 196\n :\n PC_PHYS_PORT_ID: 285\n ?\n PORT_ID: 198\n :\n PC_PHYS_PORT_ID: 289\n ?\n PORT_ID: 202\n :\n PC_PHYS_PORT_ID: 293\n ?\n PORT_ID: 206\n :\n PC_PHYS_PORT_ID: 297\n ?\n PORT_ID: 207\n :\n PC_PHYS_PORT_ID: 301\n ?\n PORT_ID: 209\n :\n PC_PHYS_PORT_ID: 305\n ?\n PORT_ID: 213\n :\n PC_PHYS_PORT_ID: 309\n ?\n PORT_ID: 217\n :\n PC_PHYS_PORT_ID: 313\n ?\n PORT_ID: 218\n :\n PC_PHYS_PORT_ID: 317\n ?\n PORT_ID: 220\n :\n PC_PHYS_PORT_ID: 321\n ?\n PORT_ID: 224\n :\n PC_PHYS_PORT_ID: 325\n ?\n PORT_ID: 228\n :\n PC_PHYS_PORT_ID: 329\n ?\n PORT_ID: 229\n :\n PC_PHYS_PORT_ID: 333\n ?\n PORT_ID: 231\n :\n PC_PHYS_PORT_ID: 337\n ?\n PORT_ID: 235\n :\n PC_PHYS_PORT_ID: 341\n ?\n PORT_ID: 239\n :\n PC_PHYS_PORT_ID: 345\n ?\n PORT_ID: 240\n :\n PC_PHYS_PORT_ID: 349\n ?\n PORT_ID: 242\n :\n PC_PHYS_PORT_ID: 353\n ?\n PORT_ID: 246\n :\n PC_PHYS_PORT_ID: 357\n ?\n PORT_ID: 250\n :\n PC_PHYS_PORT_ID: 361\n ?\n PORT_ID: 251\n :\n PC_PHYS_PORT_ID: 365\n ?\n PORT_ID: 253\n :\n PC_PHYS_PORT_ID: 369\n ?\n PORT_ID: 257\n :\n PC_PHYS_PORT_ID: 373\n ?\n PORT_ID: 261\n :\n PC_PHYS_PORT_ID: 377\n ?\n PORT_ID: 262\n :\n PC_PHYS_PORT_ID: 381\n ?\n PORT_ID: 264\n :\n PC_PHYS_PORT_ID: 385\n ?\n PORT_ID: 268\n :\n PC_PHYS_PORT_ID: 389\n ?\n PORT_ID: 272\n :\n PC_PHYS_PORT_ID: 393\n ?\n PORT_ID: 273\n :\n PC_PHYS_PORT_ID: 397\n ?\n PORT_ID: 275\n :\n PC_PHYS_PORT_ID: 401\n ?\n PORT_ID: 279\n :\n PC_PHYS_PORT_ID: 405\n ?\n PORT_ID: 283\n :\n PC_PHYS_PORT_ID: 409\n ?\n PORT_ID: 284\n :\n PC_PHYS_PORT_ID: 413\n ?\n PORT_ID: 286\n :\n PC_PHYS_PORT_ID: 417\n ?\n PORT_ID: 290\n :\n PC_PHYS_PORT_ID: 421\n ?\n PORT_ID: 294\n :\n PC_PHYS_PORT_ID: 425\n ?\n PORT_ID: 295\n :\n PC_PHYS_PORT_ID: 429\n ?\n PORT_ID: 297\n :\n PC_PHYS_PORT_ID: 433\n ?\n PORT_ID: 301\n :\n PC_PHYS_PORT_ID: 437\n ?\n PORT_ID: 305\n :\n PC_PHYS_PORT_ID: 441\n ?\n PORT_ID: 306\n :\n PC_PHYS_PORT_ID: 445\n ?\n PORT_ID: 308\n :\n PC_PHYS_PORT_ID: 449\n ?\n PORT_ID: 312\n :\n PC_PHYS_PORT_ID: 453\n ?\n PORT_ID: 316\n :\n PC_PHYS_PORT_ID: 457\n ?\n PORT_ID: 317\n :\n PC_PHYS_PORT_ID: 461\n ?\n PORT_ID: 319\n :\n PC_PHYS_PORT_ID: 465\n ?\n PORT_ID: 323\n :\n PC_PHYS_PORT_ID: 469\n ?\n PORT_ID: 327\n :\n PC_PHYS_PORT_ID: 473\n ?\n PORT_ID: 328\n :\n PC_PHYS_PORT_ID: 477\n ?\n PORT_ID: 330\n :\n PC_PHYS_PORT_ID: 481\n ?\n PORT_ID: 334\n :\n PC_PHYS_PORT_ID: 485\n ?\n PORT_ID: 338\n :\n PC_PHYS_PORT_ID: 489\n ?\n PORT_ID: 339\n :\n PC_PHYS_PORT_ID: 493\n ?\n PORT_ID: 341\n :\n PC_PHYS_PORT_ID: 497\n ?\n PORT_ID: 345\n :\n PC_PHYS_PORT_ID: 501\n ?\n PORT_ID: 349\n :\n PC_PHYS_PORT_ID: 505\n ?\n PORT_ID: 350\n :\n PC_PHYS_PORT_ID: 509\n ?\n PORT_ID: 0\n :\n PC_PHYS_PORT_ID: 0\n ?\n PORT_ID: 76\n :\n PC_PHYS_PORT_ID: 513\n...\n---\ndevice:\n 0:\n PC_PORT:\n ?\n PORT_ID: 0\n :\n ENABLE: 1\n SPEED: 10000\n NUM_LANES: 1\n ?\n PORT_ID: [[1, 1], [5, 5], [9, 9], [10, 10], [11, 11], [15, 15], [19, 19],\n [20, 20], [22, 22], [26, 26], [30, 30], [31, 31], [33, 33], [37, 37], [41,\n 41], [42, 42], [44, 44], [48, 48], [52, 52], [53, 53], [55, 55], [59, 59],\n [63, 63], [64, 64], [66, 66], [70, 70], [74, 74], [75, 75], [77, 77], [81,\n 81], [85, 85], [86, 86], [88, 88], [92, 92], [96, 96], [97, 97], [99, 99],\n [103, 103], [107, 107], [108, 108], [110, 110], [114, 114], [118, 118], [119,\n 119], [121, 121], [125, 125], [129, 129], [130, 130], [132, 132], [136, 136],\n [140, 140], [141, 141], [143, 143], [147, 147], [151, 151], [152, 152], [154,\n 154], [158, 158], [162, 162], [163, 163], [165, 165], [169, 169], [173, 173],\n [174, 174], [176, 176], [180, 180], [184, 184], [185, 185], [187, 187], [191,\n 191], [195, 195], [196, 196], [198, 198], [202, 202], [206, 206], [207, 207],\n [209, 209], [213, 213], [217, 217], [218, 218], [220, 220], [224, 224], [228,\n 228], [229, 229], [231, 231], [235, 235], [239, 239], [240, 240], [242, 242],\n [246, 246], [250, 250], [251, 251], [253, 253], [257, 257], [261, 261], [262,\n 262], [264, 264], [268, 268], [272, 272], [273, 273], [275, 275], [279, 279],\n [283, 283], [284, 284], [286, 286], [290, 290], [294, 294], [295, 295], [297,\n 297], [301, 301], [305, 305], [306, 306], [308, 308], [312, 312], [316, 316],\n [317, 317], [319, 319], [323, 323], [327, 327], [328, 328], [330, 330], [334,\n 334], [338, 338], [339, 339], [341, 341], [345, 345], [349, 349], [350, 350]]\n :\n ENABLE: 0\n SPEED: 400000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS544_2XN\n MAX_FRAME_SIZE: 9416\n ?\n PORT_ID: 76\n :\n ENABLE: 0\n SPEED: 100000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS528\n MAX_FRAME_SIZE: 9416\n...\n---\ndevice:\n 0:\n PORT_CONFIG:\n PORT_SYSTEM_PROFILE_OPERMODE_PIPEUNIQUE: 1\n...\n---\nbcm_device:\n 0:\n global:\n l3_alpm_template: 1\n l3_alpm_hit_mode: 1\n ipv6_lpm_128b_enable: 1\n pktio_driver_type: 1\n qos_map_multi_get_mode: 1\n rx_cosq_mapping_management_mode: 0\n l3_iif_reservation_skip: 0\n pcie_host_intf_timeout_purge_enable: 0\n macro_flow_hash_shuffle_random_seed: 34345645\n bcm_linkscan_interval: 25000\n sai_common_hash_crc: 0x1\n sai_disable_srcmacqedstmac_ctrl: 0x1\n sai_acl_qset_optimization: 0x1\n sai_optimized_mmu: 0x1\n sai_pkt_rx_custom_cfg: 1\n sai_pkt_rx_pkt_size: 16512\n sai_pkt_rx_cfg_ppc: 16\n sai_async_fdb_nbr_enable: 0x1\n sai_pfc_defaults_disable: 0x1\n sai_ifp_enable_on_cpu_tx: 0x1\n sai_vfp_smac_drop_filter_disable: 1\n sai_macro_flow_based_hash: 1\n sai_mmu_qgroups_default: 1\n sai_dis_ctr_incr_on_port_ln_dn: 0\n custom_feature_mesh_topology_sync_mode: 1\n sai_ecmp_group_members_increment: 1\n sai_field_group_auto_prioritize: 1\n bcm_tunnel_term_compatible_mode: 1\n sai_l2_cpu_fdb_event_suppress: 1\n sai_port_phy_time_sync_en: 1\n sai_stats_support_mask: 0x2\n sai_disable_internal_port_serdes: 1\n sai_uncached_port_stats: 0x1\n...\n---\ndevice:\n 0:\n TM_THD_CONFIG:\n THRESHOLD_MODE: LOSSY\n...\n---\ndevice:\n 0:\n PORT:\n ?\n PORT_ID: [[1, 1], [5, 5], [9, 9], [10, 10], [11, 11], [15, 15], [19, 19],\n [20, 20], [22, 22], [26, 26], [30, 30], [31, 31], [33, 33], [37, 37], [41,\n 41], [42, 42], [44, 44], [48, 48], [52, 52], [53, 53], [55, 55], [59, 59],\n [63, 63], [64, 64], [66, 66], [70, 70], [74, 74], [75, 75], [77, 77], [81,\n 81], [85, 85], [86, 86], [88, 88], [92, 92], [96, 96], [97, 97], [99, 99],\n [103, 103], [107, 107], [108, 108], [110, 110], [114, 114], [118, 118], [119,\n 119], [121, 121], [125, 125], [129, 129], [130, 130], [132, 132], [136, 136],\n [140, 140], [141, 141], [143, 143], [147, 147], [151, 151], [152, 152], [154,\n 154], [158, 158], [162, 162], [163, 163], [165, 165], [169, 169], [173, 173],\n [174, 174], [176, 176], [180, 180], [184, 184], [185, 185], [187, 187], [191,\n 191], [195, 195], [196, 196], [198, 198], [202, 202], [206, 206], [207, 207],\n [209, 209], [213, 213], [217, 217], [218, 218], [220, 220], [224, 224], [228,\n 228], [229, 229], [231, 231], [235, 235], [239, 239], [240, 240], [242, 242],\n [246, 246], [250, 250], [251, 251], [253, 253], [257, 257], [261, 261], [262,\n 262], [264, 264], [268, 268], [272, 272], [273, 273], [275, 275], [279, 279],\n [283, 283], [284, 284], [286, 286], [290, 290], [294, 294], [295, 295], [297,\n 297], [301, 301], [305, 305], [306, 306], [308, 308], [312, 312], [316, 316],\n [317, 317], [319, 319], [323, 323], [327, 327], [328, 328], [330, 330], [334,\n 334], [338, 338], [339, 339], [341, 341], [345, 345], [349, 349], [350, 350]]\n :\n MTU: 9416\n MTU_CHECK: 1\n...\n---\ndevice:\n 0:\n DEVICE_CONFIG:\n AUTOLOAD_BOARD_SETTINGS: 0\n...\n---\ndevice:\n 0:\n FP_CONFIG:\n FP_ING_OPERMODE: GLOBAL_PIPE_AWARE\n...\n" + "yamlConfig": "---\ndevice:\n 0:\n PC_PM_CORE:\n ?\n PC_PM_ID: 1\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x8C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 2\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 3\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x23016745\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x33\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x00\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 4\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x52701634\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 5\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74305612\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21640357\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x59\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 6\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x03562147\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30742165\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x48\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x29\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 7\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x14567302\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56712430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAF\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 8\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67315024\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56217034\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x53\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 9\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21403765\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20543176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x48\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 10\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x53062147\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30742165\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x48\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x69\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 11\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54067312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56712430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAF\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 12\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65304721\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56217430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x56\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 13\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21403765\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20543176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x48\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 14\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x53062147\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30742165\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x48\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x69\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 15\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54067312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56712430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAF\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 16\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65304721\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56217430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x56\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 17\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65274130\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56207431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x87\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 18\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47306521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76305412\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x6C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x86\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 19\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x02731456\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21345076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x99\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 20\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30472165\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21543076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x6C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAD\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 21\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45376120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56207431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 22\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x40376521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76305412\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x86\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 23\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x02731456\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21345076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x99\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 24\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30472165\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21543076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x6C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAD\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 25\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45376120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56207431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 26\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x40376521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76305412\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x86\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 27\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x03762514\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21345076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDE\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x03\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 28\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67125403\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12470356\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x63\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xB2\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 29\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32107654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x22\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 30\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32107654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xCC\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x00\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 31\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x05371426\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x65\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 32\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x56741032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23016745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x9C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 33\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x46751032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32106754\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 34\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54721036\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x22\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 35\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x63410725\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x93\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 36\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32107645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x77\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 37\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74260351\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x13064257\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xD8\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x21\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 38\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10573246\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30762145\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x99\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 39\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47356120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56702431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x8F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 40\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75016423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54217630\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x58\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 41\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01736524\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20365174\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x96\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x52\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 42\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10573246\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30762145\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 43\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47356120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56702431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x8F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 44\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75016423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54217630\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x58\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 45\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01746523\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20365174\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x86\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x52\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 46\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10576423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30762145\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 47\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x46357102\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56702431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x8F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 48\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75016423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54216703\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x54\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 49\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57032146\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54702631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xED\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 50\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75102346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74305612\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 51\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32610754\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20345176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x95\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x60\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 52\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01572346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21560347\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 53\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57032146\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54702631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xED\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 54\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75102346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74305612\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 55\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32610754\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20345176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x95\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x60\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 56\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01572346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21560347\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 57\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57032146\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54702631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xED\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 58\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75102346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74305612\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 59\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32610754\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20345176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x95\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x20\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 60\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x64207531\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23671045\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0B\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xBB\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 61\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x51740362\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB1\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 62\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x23016745\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x66\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 63\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x00\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 64\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23016745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xD9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 65\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x3210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x3210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x00\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0F\n TX_POLARITY_FLIP_AUTO: 0\n...\n---\ndevice:\n 0:\n PC_PORT_PHYS_MAP:\n ?\n PORT_ID: 1\n :\n PC_PHYS_PORT_ID: 1\n ?\n PORT_ID: 5\n :\n PC_PHYS_PORT_ID: 5\n ?\n PORT_ID: 9\n :\n PC_PHYS_PORT_ID: 9\n ?\n PORT_ID: 10\n :\n PC_PHYS_PORT_ID: 13\n ?\n PORT_ID: 11\n :\n PC_PHYS_PORT_ID: 17\n ?\n PORT_ID: 15\n :\n PC_PHYS_PORT_ID: 21\n ?\n PORT_ID: 19\n :\n PC_PHYS_PORT_ID: 25\n ?\n PORT_ID: 20\n :\n PC_PHYS_PORT_ID: 29\n ?\n PORT_ID: 22\n :\n PC_PHYS_PORT_ID: 33\n ?\n PORT_ID: 26\n :\n PC_PHYS_PORT_ID: 37\n ?\n PORT_ID: 30\n :\n PC_PHYS_PORT_ID: 41\n ?\n PORT_ID: 31\n :\n PC_PHYS_PORT_ID: 45\n ?\n PORT_ID: 33\n :\n PC_PHYS_PORT_ID: 49\n ?\n PORT_ID: 37\n :\n PC_PHYS_PORT_ID: 53\n ?\n PORT_ID: 41\n :\n PC_PHYS_PORT_ID: 57\n ?\n PORT_ID: 42\n :\n PC_PHYS_PORT_ID: 61\n ?\n PORT_ID: 44\n :\n PC_PHYS_PORT_ID: 65\n ?\n PORT_ID: 48\n :\n PC_PHYS_PORT_ID: 69\n ?\n PORT_ID: 52\n :\n PC_PHYS_PORT_ID: 73\n ?\n PORT_ID: 53\n :\n PC_PHYS_PORT_ID: 77\n ?\n PORT_ID: 55\n :\n PC_PHYS_PORT_ID: 81\n ?\n PORT_ID: 59\n :\n PC_PHYS_PORT_ID: 85\n ?\n PORT_ID: 63\n :\n PC_PHYS_PORT_ID: 89\n ?\n PORT_ID: 64\n :\n PC_PHYS_PORT_ID: 93\n ?\n PORT_ID: 66\n :\n PC_PHYS_PORT_ID: 97\n ?\n PORT_ID: 70\n :\n PC_PHYS_PORT_ID: 101\n ?\n PORT_ID: 74\n :\n PC_PHYS_PORT_ID: 105\n ?\n PORT_ID: 75\n :\n PC_PHYS_PORT_ID: 109\n ?\n PORT_ID: 77\n :\n PC_PHYS_PORT_ID: 113\n ?\n PORT_ID: 81\n :\n PC_PHYS_PORT_ID: 117\n ?\n PORT_ID: 85\n :\n PC_PHYS_PORT_ID: 121\n ?\n PORT_ID: 86\n :\n PC_PHYS_PORT_ID: 125\n ?\n PORT_ID: 88\n :\n PC_PHYS_PORT_ID: 129\n ?\n PORT_ID: 92\n :\n PC_PHYS_PORT_ID: 133\n ?\n PORT_ID: 96\n :\n PC_PHYS_PORT_ID: 137\n ?\n PORT_ID: 97\n :\n PC_PHYS_PORT_ID: 141\n ?\n PORT_ID: 99\n :\n PC_PHYS_PORT_ID: 145\n ?\n PORT_ID: 103\n :\n PC_PHYS_PORT_ID: 149\n ?\n PORT_ID: 107\n :\n PC_PHYS_PORT_ID: 153\n ?\n PORT_ID: 108\n :\n PC_PHYS_PORT_ID: 157\n ?\n PORT_ID: 110\n :\n PC_PHYS_PORT_ID: 161\n ?\n PORT_ID: 114\n :\n PC_PHYS_PORT_ID: 165\n ?\n PORT_ID: 118\n :\n PC_PHYS_PORT_ID: 169\n ?\n PORT_ID: 119\n :\n PC_PHYS_PORT_ID: 173\n ?\n PORT_ID: 121\n :\n PC_PHYS_PORT_ID: 177\n ?\n PORT_ID: 125\n :\n PC_PHYS_PORT_ID: 181\n ?\n PORT_ID: 129\n :\n PC_PHYS_PORT_ID: 185\n ?\n PORT_ID: 130\n :\n PC_PHYS_PORT_ID: 189\n ?\n PORT_ID: 132\n :\n PC_PHYS_PORT_ID: 193\n ?\n PORT_ID: 136\n :\n PC_PHYS_PORT_ID: 197\n ?\n PORT_ID: 140\n :\n PC_PHYS_PORT_ID: 201\n ?\n PORT_ID: 141\n :\n PC_PHYS_PORT_ID: 205\n ?\n PORT_ID: 143\n :\n PC_PHYS_PORT_ID: 209\n ?\n PORT_ID: 147\n :\n PC_PHYS_PORT_ID: 213\n ?\n PORT_ID: 151\n :\n PC_PHYS_PORT_ID: 217\n ?\n PORT_ID: 152\n :\n PC_PHYS_PORT_ID: 221\n ?\n PORT_ID: 154\n :\n PC_PHYS_PORT_ID: 225\n ?\n PORT_ID: 158\n :\n PC_PHYS_PORT_ID: 229\n ?\n PORT_ID: 162\n :\n PC_PHYS_PORT_ID: 233\n ?\n PORT_ID: 163\n :\n PC_PHYS_PORT_ID: 237\n ?\n PORT_ID: 165\n :\n PC_PHYS_PORT_ID: 241\n ?\n PORT_ID: 169\n :\n PC_PHYS_PORT_ID: 245\n ?\n PORT_ID: 173\n :\n PC_PHYS_PORT_ID: 249\n ?\n PORT_ID: 174\n :\n PC_PHYS_PORT_ID: 253\n ?\n PORT_ID: 176\n :\n PC_PHYS_PORT_ID: 257\n ?\n PORT_ID: 180\n :\n PC_PHYS_PORT_ID: 261\n ?\n PORT_ID: 184\n :\n PC_PHYS_PORT_ID: 265\n ?\n PORT_ID: 185\n :\n PC_PHYS_PORT_ID: 269\n ?\n PORT_ID: 187\n :\n PC_PHYS_PORT_ID: 273\n ?\n PORT_ID: 191\n :\n PC_PHYS_PORT_ID: 277\n ?\n PORT_ID: 195\n :\n PC_PHYS_PORT_ID: 281\n ?\n PORT_ID: 196\n :\n PC_PHYS_PORT_ID: 285\n ?\n PORT_ID: 198\n :\n PC_PHYS_PORT_ID: 289\n ?\n PORT_ID: 202\n :\n PC_PHYS_PORT_ID: 293\n ?\n PORT_ID: 206\n :\n PC_PHYS_PORT_ID: 297\n ?\n PORT_ID: 207\n :\n PC_PHYS_PORT_ID: 301\n ?\n PORT_ID: 209\n :\n PC_PHYS_PORT_ID: 305\n ?\n PORT_ID: 213\n :\n PC_PHYS_PORT_ID: 309\n ?\n PORT_ID: 217\n :\n PC_PHYS_PORT_ID: 313\n ?\n PORT_ID: 218\n :\n PC_PHYS_PORT_ID: 317\n ?\n PORT_ID: 220\n :\n PC_PHYS_PORT_ID: 321\n ?\n PORT_ID: 224\n :\n PC_PHYS_PORT_ID: 325\n ?\n PORT_ID: 228\n :\n PC_PHYS_PORT_ID: 329\n ?\n PORT_ID: 229\n :\n PC_PHYS_PORT_ID: 333\n ?\n PORT_ID: 231\n :\n PC_PHYS_PORT_ID: 337\n ?\n PORT_ID: 235\n :\n PC_PHYS_PORT_ID: 341\n ?\n PORT_ID: 239\n :\n PC_PHYS_PORT_ID: 345\n ?\n PORT_ID: 240\n :\n PC_PHYS_PORT_ID: 349\n ?\n PORT_ID: 242\n :\n PC_PHYS_PORT_ID: 353\n ?\n PORT_ID: 246\n :\n PC_PHYS_PORT_ID: 357\n ?\n PORT_ID: 250\n :\n PC_PHYS_PORT_ID: 361\n ?\n PORT_ID: 251\n :\n PC_PHYS_PORT_ID: 365\n ?\n PORT_ID: 253\n :\n PC_PHYS_PORT_ID: 369\n ?\n PORT_ID: 257\n :\n PC_PHYS_PORT_ID: 373\n ?\n PORT_ID: 261\n :\n PC_PHYS_PORT_ID: 377\n ?\n PORT_ID: 262\n :\n PC_PHYS_PORT_ID: 381\n ?\n PORT_ID: 264\n :\n PC_PHYS_PORT_ID: 385\n ?\n PORT_ID: 268\n :\n PC_PHYS_PORT_ID: 389\n ?\n PORT_ID: 272\n :\n PC_PHYS_PORT_ID: 393\n ?\n PORT_ID: 273\n :\n PC_PHYS_PORT_ID: 397\n ?\n PORT_ID: 275\n :\n PC_PHYS_PORT_ID: 401\n ?\n PORT_ID: 279\n :\n PC_PHYS_PORT_ID: 405\n ?\n PORT_ID: 283\n :\n PC_PHYS_PORT_ID: 409\n ?\n PORT_ID: 284\n :\n PC_PHYS_PORT_ID: 413\n ?\n PORT_ID: 286\n :\n PC_PHYS_PORT_ID: 417\n ?\n PORT_ID: 290\n :\n PC_PHYS_PORT_ID: 421\n ?\n PORT_ID: 294\n :\n PC_PHYS_PORT_ID: 425\n ?\n PORT_ID: 295\n :\n PC_PHYS_PORT_ID: 429\n ?\n PORT_ID: 297\n :\n PC_PHYS_PORT_ID: 433\n ?\n PORT_ID: 301\n :\n PC_PHYS_PORT_ID: 437\n ?\n PORT_ID: 305\n :\n PC_PHYS_PORT_ID: 441\n ?\n PORT_ID: 306\n :\n PC_PHYS_PORT_ID: 445\n ?\n PORT_ID: 308\n :\n PC_PHYS_PORT_ID: 449\n ?\n PORT_ID: 312\n :\n PC_PHYS_PORT_ID: 453\n ?\n PORT_ID: 316\n :\n PC_PHYS_PORT_ID: 457\n ?\n PORT_ID: 317\n :\n PC_PHYS_PORT_ID: 461\n ?\n PORT_ID: 319\n :\n PC_PHYS_PORT_ID: 465\n ?\n PORT_ID: 323\n :\n PC_PHYS_PORT_ID: 469\n ?\n PORT_ID: 327\n :\n PC_PHYS_PORT_ID: 473\n ?\n PORT_ID: 328\n :\n PC_PHYS_PORT_ID: 477\n ?\n PORT_ID: 330\n :\n PC_PHYS_PORT_ID: 481\n ?\n PORT_ID: 334\n :\n PC_PHYS_PORT_ID: 485\n ?\n PORT_ID: 338\n :\n PC_PHYS_PORT_ID: 489\n ?\n PORT_ID: 339\n :\n PC_PHYS_PORT_ID: 493\n ?\n PORT_ID: 341\n :\n PC_PHYS_PORT_ID: 497\n ?\n PORT_ID: 345\n :\n PC_PHYS_PORT_ID: 501\n ?\n PORT_ID: 349\n :\n PC_PHYS_PORT_ID: 505\n ?\n PORT_ID: 350\n :\n PC_PHYS_PORT_ID: 509\n ?\n PORT_ID: 0\n :\n PC_PHYS_PORT_ID: 0\n ?\n PORT_ID: 76\n :\n PC_PHYS_PORT_ID: 513\n...\n---\ndevice:\n 0:\n PC_PORT:\n ?\n PORT_ID: 0\n :\n ENABLE: 1\n SPEED: 10000\n NUM_LANES: 1\n ?\n PORT_ID: [[1, 1], [5, 5], [9, 9], [10, 10], [11, 11], [15, 15], [19, 19],\n [20, 20], [22, 22], [26, 26], [30, 30], [31, 31], [33, 33], [37, 37], [41,\n 41], [42, 42], [44, 44], [48, 48], [52, 52], [53, 53], [55, 55], [59, 59],\n [63, 63], [64, 64], [66, 66], [70, 70], [74, 74], [75, 75], [77, 77], [81,\n 81], [85, 85], [86, 86], [88, 88], [92, 92], [96, 96], [97, 97], [99, 99],\n [103, 103], [107, 107], [108, 108], [110, 110], [114, 114], [118, 118], [119,\n 119], [121, 121], [125, 125], [129, 129], [130, 130], [132, 132], [136, 136],\n [140, 140], [141, 141], [143, 143], [147, 147], [151, 151], [152, 152], [154,\n 154], [158, 158], [162, 162], [163, 163], [165, 165], [169, 169], [173, 173],\n [174, 174], [176, 176], [180, 180], [184, 184], [185, 185], [187, 187], [191,\n 191], [195, 195], [196, 196], [198, 198], [202, 202], [206, 206], [207, 207],\n [209, 209], [213, 213], [217, 217], [218, 218], [220, 220], [224, 224], [228,\n 228], [229, 229], [231, 231], [235, 235], [239, 239], [240, 240], [242, 242],\n [246, 246], [250, 250], [251, 251], [253, 253], [257, 257], [261, 261], [262,\n 262], [264, 264], [268, 268], [272, 272], [273, 273], [275, 275], [279, 279],\n [283, 283], [284, 284], [286, 286], [290, 290], [294, 294], [295, 295], [297,\n 297], [301, 301], [305, 305], [306, 306], [308, 308], [312, 312], [316, 316],\n [317, 317], [319, 319], [323, 323], [327, 327], [328, 328], [330, 330], [334,\n 334], [338, 338], [339, 339], [341, 341], [345, 345], [349, 349], [350, 350]]\n :\n ENABLE: 0\n SPEED: 400000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS544_2XN\n MAX_FRAME_SIZE: 9416\n ?\n PORT_ID: 76\n :\n ENABLE: 0\n SPEED: 100000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS528\n MAX_FRAME_SIZE: 9416\n...\n---\ndevice:\n 0:\n PORT_CONFIG:\n PORT_SYSTEM_PROFILE_OPERMODE_PIPEUNIQUE: 1\n...\n---\nbcm_device:\n 0:\n global:\n l3_alpm_template: 1\n l3_alpm_hit_mode: 1\n ipv6_lpm_128b_enable: 1\n pktio_driver_type: 1\n qos_map_multi_get_mode: 1\n rx_cosq_mapping_management_mode: 0\n l3_iif_reservation_skip: 0\n pcie_host_intf_timeout_purge_enable: 0\n macro_flow_hash_shuffle_random_seed: 34345645\n bcm_linkscan_interval: 25000\n sai_common_hash_crc: 0x1\n sai_disable_srcmacqedstmac_ctrl: 0x1\n sai_acl_qset_optimization: 0x1\n sai_optimized_mmu: 0x1\n sai_pkt_rx_custom_cfg: 1\n sai_pkt_rx_pkt_size: 16512\n sai_pkt_rx_cfg_ppc: 16\n sai_async_fdb_nbr_enable: 0x1\n sai_pfc_defaults_disable: 0x1\n sai_ifp_enable_on_cpu_tx: 0x1\n sai_vfp_smac_drop_filter_disable: 1\n sai_macro_flow_based_hash: 1\n sai_mmu_qgroups_default: 1\n sai_dis_ctr_incr_on_port_ln_dn: 0\n custom_feature_mesh_topology_sync_mode: 1\n sai_ecmp_group_members_increment: 1\n sai_field_group_auto_prioritize: 1\n bcm_tunnel_term_compatible_mode: 1\n sai_l2_cpu_fdb_event_suppress: 1\n sai_port_phy_time_sync_en: 1\n sai_stats_support_mask: 0x2\n sai_disable_internal_port_serdes: 1\n global_flexctr_ing_action_num_reserved: 20\n global_flexctr_ing_pool_num_reserved: 8\n global_flexctr_ing_op_profile_num_reserved: 20\n global_flexctr_ing_group_num_reserved: 2\n global_flexctr_egr_action_num_reserved: 8\n global_flexctr_egr_pool_num_reserved: 5\n global_flexctr_egr_op_profile_num_reserved: 10\n global_flexctr_egr_group_num_reserved: 1\n sai_uncached_port_stats: 0x1\n...\n---\ndevice:\n 0:\n TM_THD_CONFIG:\n THRESHOLD_MODE: LOSSY\n...\n---\ndevice:\n 0:\n PORT:\n ?\n PORT_ID: [[1, 1], [5, 5], [9, 9], [10, 10], [11, 11], [15, 15], [19, 19],\n [20, 20], [22, 22], [26, 26], [30, 30], [31, 31], [33, 33], [37, 37], [41,\n 41], [42, 42], [44, 44], [48, 48], [52, 52], [53, 53], [55, 55], [59, 59],\n [63, 63], [64, 64], [66, 66], [70, 70], [74, 74], [75, 75], [77, 77], [81,\n 81], [85, 85], [86, 86], [88, 88], [92, 92], [96, 96], [97, 97], [99, 99],\n [103, 103], [107, 107], [108, 108], [110, 110], [114, 114], [118, 118], [119,\n 119], [121, 121], [125, 125], [129, 129], [130, 130], [132, 132], [136, 136],\n [140, 140], [141, 141], [143, 143], [147, 147], [151, 151], [152, 152], [154,\n 154], [158, 158], [162, 162], [163, 163], [165, 165], [169, 169], [173, 173],\n [174, 174], [176, 176], [180, 180], [184, 184], [185, 185], [187, 187], [191,\n 191], [195, 195], [196, 196], [198, 198], [202, 202], [206, 206], [207, 207],\n [209, 209], [213, 213], [217, 217], [218, 218], [220, 220], [224, 224], [228,\n 228], [229, 229], [231, 231], [235, 235], [239, 239], [240, 240], [242, 242],\n [246, 246], [250, 250], [251, 251], [253, 253], [257, 257], [261, 261], [262,\n 262], [264, 264], [268, 268], [272, 272], [273, 273], [275, 275], [279, 279],\n [283, 283], [284, 284], [286, 286], [290, 290], [294, 294], [295, 295], [297,\n 297], [301, 301], [305, 305], [306, 306], [308, 308], [312, 312], [316, 316],\n [317, 317], [319, 319], [323, 323], [327, 327], [328, 328], [330, 330], [334,\n 334], [338, 338], [339, 339], [341, 341], [345, 345], [349, 349], [350, 350]]\n :\n MTU: 9416\n MTU_CHECK: 1\n...\n---\ndevice:\n 0:\n DEVICE_CONFIG:\n AUTOLOAD_BOARD_SETTINGS: 0\n CORE_CLK_FREQ: CLK_1125MHZ\n PP_CLK_FREQ: CLK_675MHZ\n...\n---\ndevice:\n 0:\n FP_CONFIG:\n FP_ING_OPERMODE: GLOBAL_PIPE_AWARE\n...\n---\ndevice:\n 0:\n CTR_EFLEX_CONFIG:\n CTR_ING_EFLEX_OPERMODE_PIPEUNIQUE: 1\n CTR_ING_EFLEX_OPERMODE_PIPE_INSTANCE_UNIQUE: 1\n CTR_EGR_EFLEX_OPERMODE_PIPEUNIQUE: 1\n CTR_EGR_EFLEX_OPERMODE_PIPE_INSTANCE_UNIQUE: 1\n...\n" } } } diff --git a/fboss/oss/hw_test_configs/wedge100.agent.materialized_JSON b/fboss/oss/hw_test_configs/wedge100.agent.materialized_JSON index f83fa93f52f7f..5f4ac186ffcbb 100644 --- a/fboss/oss/hw_test_configs/wedge100.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/wedge100.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -139,6 +167,7 @@ "bcm_num_cos": "0xa", "buf.mqueue.guarantee.0": "0x0b", "custom_feature_mesh_topology_sync_mode": "1", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "0x1", "l2_mem_entries": "0x8000", "l2xmsg_mode": "0x1", diff --git a/fboss/oss/hw_test_configs/wedge400.agent.materialized_JSON b/fboss/oss/hw_test_configs/wedge400.agent.materialized_JSON index ff12bb37ba96c..803433730718d 100644 --- a/fboss/oss/hw_test_configs/wedge400.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/wedge400.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -191,10 +219,12 @@ "dport_map_port_96": "9", "dport_map_port_97": "10", "dpr_clock_frequency": "1000", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "1", "l2xmsg_shadow_hit_bits": "0", "l3_alpm_enable": "2", "l3_alpm_ipv6_128b_bkt_rsvd": "1", + "l3_max_ecmp_mode": "1", "load_firmware": "0x2", "macro_flow_hash_shuffle_random_seed": "34345645", "mem_cache_enable": "0", diff --git a/fboss/oss/hw_test_configs/yamp.agent.materialized_JSON b/fboss/oss/hw_test_configs/yamp.agent.materialized_JSON index c62f11e1c38a3..b8a77fd8388eb 100644 --- a/fboss/oss/hw_test_configs/yamp.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/yamp.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -271,10 +299,12 @@ "dport_map_port_94": "127", "dport_map_port_95": "128", "dpr_clock_frequency": "1000", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "1", "l2xmsg_shadow_hit_bits": "0", "l3_alpm_enable": "2", "l3_alpm_ipv6_128b_bkt_rsvd": "1", + "l3_max_ecmp_mode": "1", "load_firmware": "0x2", "macro_flow_hash_shuffle_random_seed": "34345645", "mem_cache_enable": "0", From 8b449f246f1934893702a7bb7e25ae9eae84d0ac Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Mon, 28 Oct 2024 20:12:41 -0700 Subject: [PATCH 404/479] API to getSystemPortID while looking at local/remoteSystemPortOffsets Summary: For 2-stage DSF we can no longer rely on sys port range to compute system port ids Reviewed By: zechengh09 Differential Revision: D65088255 fbshipit-source-id: f2fa6ea0a78b16d4ca204747bf60211894201f37 --- fboss/agent/Utils.cpp | 22 ++++++++++++++++++++++ fboss/agent/Utils.h | 6 ++++++ 2 files changed, 28 insertions(+) diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index af444bf8046b3..95307cfa7c10a 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -386,6 +386,28 @@ PortID getPortID( *portIdRange->minimum()); } +SystemPortID getSystemPortID( + const PortID& portId, + cfg::Scope portScope, + const std::map& switchToSwitchInfo, + SwitchID switchId) { + auto switchInfo = switchToSwitchInfo.find(static_cast(switchId)); + if (switchInfo == switchToSwitchInfo.end()) { + throw FbossError( + "switchId: ", switchId, " not found in switchToSwitchInfo"); + } + auto offset = portScope == cfg::Scope::GLOBAL + ? switchInfo->second.globalSystemPortOffset() + : switchInfo->second.localSystemPortOffset(); + if (!offset.has_value()) { + throw FbossError("Global/local offset not set"); + } + auto portIdRange = *switchInfo->second.portIdRange(); + auto systemPortId = + static_cast(portId) + *offset - *portIdRange.minimum(); + return SystemPortID(systemPortId); +} + SystemPortID getSystemPortID( const PortID& portId, const std::map& switchToSwitchInfo, diff --git a/fboss/agent/Utils.h b/fboss/agent/Utils.h index 329b92234809a..d47db98a9c4f8 100644 --- a/fboss/agent/Utils.h +++ b/fboss/agent/Utils.h @@ -255,6 +255,12 @@ SystemPortID getSystemPortID( const std::map& switchToSwitchInfo, SwitchID switchId); +SystemPortID getSystemPortID( + const PortID& portId, + cfg::Scope portScope, + const std::map& switchToSwitchInfo, + SwitchID switchId); + SystemPortID getSystemPortID( const PortID& portId, const std::shared_ptr& state, From ceae5ae6375ba44257e1ea80d37e0809651a0162 Mon Sep 17 00:00:00 2001 From: Ron He Date: Mon, 28 Oct 2024 21:17:39 -0700 Subject: [PATCH 405/479] Mark global variables in replayer log Summary: As titled. To make it easier for splitting the replayer logs. Differential Revision: D65094798 fbshipit-source-id: 9306bf2d16795f98dc65538bd2e5329e744aab41 --- fboss/agent/hw/sai/tracer/SaiTracer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/tracer/SaiTracer.cpp b/fboss/agent/hw/sai/tracer/SaiTracer.cpp index 05a1d3de07e07..48448378ba932 100644 --- a/fboss/agent/hw/sai/tracer/SaiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/SaiTracer.cpp @@ -484,6 +484,8 @@ sai_status_t __wrap_sai_get_object_key( namespace { folly::Singleton _saiTracer; +constexpr std::string_view kGlobalVarStart = "/* Global Variables Start */"; +constexpr std::string_view kGlobalVarEnd = "/* Global Variables End */"; } // namespace @@ -575,7 +577,9 @@ void SaiTracer::logApiQuery(sai_api_t api_id, const std::string& api_var) { init_api_.emplace(api_id, api_var); writeToFile( - {to("sai_", api_var, "_t* ", api_var), + {to(kGlobalVarStart), + to("sai_", api_var, "_t* ", api_var), + to(kGlobalVarEnd), to( "sai_api_query((sai_api_t)", api_id, ",(void**)&", api_var, ")"), to( @@ -1780,6 +1784,7 @@ void SaiTracer::logPostInvocation( void SaiTracer::setupGlobals() { // TODO(zecheng): Handle list size that's larger than 512 bytes. vector globalVar = {to( + to(kGlobalVarStart), "sai_attribute_t *s_a=(sai_attribute_t*)malloc(ATTR_SIZE * ", FLAGS_default_list_size, ")")}; @@ -1814,6 +1819,7 @@ void SaiTracer::setupGlobals() { to("sai_stat_id_t counter_list[", FLAGS_default_list_size, "]")); globalVar.push_back( to("uint64_t counter_vals[", FLAGS_default_list_size, "]")); + globalVar.push_back(to(kGlobalVarEnd)); writeToFile(globalVar); maxAttrCount_ = FLAGS_default_list_size; From dcca517df6de6e3ab0d351968416575d706eaab8 Mon Sep 17 00:00:00 2001 From: Elangovan Natarajan Date: Mon, 28 Oct 2024 21:37:34 -0700 Subject: [PATCH 406/479] Edit intro.md using inpage editor Summary: This diff has been automatically generated by the inpage editor. NOTE: If you want to update this diff, go via the preview link inside the static docs section below. Ensure you are editing the same page that was used to create this diff. Reviewed By: shri-khare Differential Revision: D64971748 fbshipit-source-id: 0936a0d244a685f3f074ceca1ea448a71784a96e --- fboss/agent/wiki/static_docs/docs/intro.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fboss/agent/wiki/static_docs/docs/intro.md b/fboss/agent/wiki/static_docs/docs/intro.md index b5b4b305346f1..e3a15271a225f 100644 --- a/fboss/agent/wiki/static_docs/docs/intro.md +++ b/fboss/agent/wiki/static_docs/docs/intro.md @@ -36,6 +36,11 @@ Also, now that this is set up with some magic fb internal plugins, there is no n # Static Docs: Contributing +## Contributing through Code +All our wiki pages are hosted under ~/fbsource/fbcode/fboss/agent/wiki/static_docs/docs/. +* Depending on where you want the wiki to be placed under in the sidebar, choose the appropriate folder +* Once selected, create a new MDX file under the directory for OSS page or under fb/ for closed source page +* Once you created the new MDX page, refer to the instructions below to setup your devserver to view the changes ## Contributing through the UI You should be able to contribute directly from this page by clicking **Edit this page** or **Add new page** in the bottom. From 715371b6facf7177185b150cfeb03d66c07164dc Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Mon, 28 Oct 2024 21:43:11 -0700 Subject: [PATCH 407/479] API to Get port scope from platform mapping Summary: as titled Reviewed By: zechengh09 Differential Revision: D65090082 Privacy Context Container: L1125642 fbshipit-source-id: a2ef45e2d5f73def88d01823d810930f498fe841 --- fboss/agent/platforms/common/PlatformMapping.cpp | 8 ++++++++ fboss/agent/platforms/common/PlatformMapping.h | 1 + 2 files changed, 9 insertions(+) diff --git a/fboss/agent/platforms/common/PlatformMapping.cpp b/fboss/agent/platforms/common/PlatformMapping.cpp index 4eb3fea3efce5..e14d7ee1d333b 100644 --- a/fboss/agent/platforms/common/PlatformMapping.cpp +++ b/fboss/agent/platforms/common/PlatformMapping.cpp @@ -303,6 +303,14 @@ cfg::PortSpeed PlatformMapping::getPortMaxSpeed(PortID portID) const { return maxSpeed; } +cfg::Scope PlatformMapping::getPortScope(PortID portID) const { + auto itPlatformPort = platformPorts_.find(portID); + if (itPlatformPort == platformPorts_.end()) { + throw FbossError("Unrecoganized port:", portID); + } + return *itPlatformPort->second.mapping()->scope(); +} + std::vector PlatformMapping::getPortIphyPinConfigs( PlatformPortProfileConfigMatcher matcher) const { std::optional chip; diff --git a/fboss/agent/platforms/common/PlatformMapping.h b/fboss/agent/platforms/common/PlatformMapping.h index cdef6be477d2b..1b1409728c149 100644 --- a/fboss/agent/platforms/common/PlatformMapping.h +++ b/fboss/agent/platforms/common/PlatformMapping.h @@ -145,6 +145,7 @@ class PlatformMapping { void merge(PlatformMapping* mapping); cfg::PortSpeed getPortMaxSpeed(PortID portID) const; + cfg::Scope getPortScope(PortID portID) const; const std::vector& getPortConfigOverrides() const { From e8489e21d0616ed2430e5d3bc85f7ed01034f5b7 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Mon, 28 Oct 2024 21:43:11 -0700 Subject: [PATCH 408/479] Set port scope from platform mapping when reconstructing ports on cold boot Summary: As titled Reviewed By: srikrishnagopu Differential Revision: D65093454 fbshipit-source-id: d6dc22dc9d83c85f6c2c796f253ffa0cd4d1ada7 --- fboss/agent/hw/sai/switch/SaiPortManager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index 3672bcea0b096..bc6dc04e80b29 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -1509,6 +1509,7 @@ std::shared_ptr SaiPortManager::swPortFromAttributes( port->setReachabilityGroupId(reachabilityGroupId); } #endif + port->setScope(platform_->getPlatformMapping()->getPortScope(port->getID())); // TODO(zecheng): Update flag when new 12.0 release has the attribute #if defined(SAI_VERSION_11_3_0_0_DNX_ODP) From e7126cf0323532178fac303dfeba884996dac688 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Mon, 28 Oct 2024 21:43:11 -0700 Subject: [PATCH 409/479] Use new API with port scope to get system port id for a port Summary: In the newer scheme port scope will factor into calculation of system port ID. Move SaiSystemPortManager to use the newer API Reviewed By: srikrishnagopu Differential Revision: D65094476 fbshipit-source-id: e7f8b9f55eaf62bb99d5fc96b297bc97b1412a59 --- fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp b/fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp index 485cf5ab38c9d..88de0cd22ee22 100644 --- a/fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp @@ -356,7 +356,10 @@ std::shared_ptr SaiSystemPortManager::constructSystemPorts( continue; } auto sysPort = std::make_shared(getSystemPortID( - port.second->getID(), switchIdToSwitchInfo, SwitchID(switchId))); + port.second->getID(), + port.second->getScope(), + switchIdToSwitchInfo, + SwitchID(switchId))); sysPort->setSwitchId(SwitchID(switchId)); sysPort->setName( folly::sformat("{}:{}", switchId, port.second->getName())); From 63123ce7b63104f4c1e43143bbafedafd6143d76 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Mon, 28 Oct 2024 21:43:11 -0700 Subject: [PATCH 410/479] Start using the new API with port scope when calculating sys port id Summary: As titled Reviewed By: shri-khare, zechengh09 Differential Revision: D65099549 fbshipit-source-id: c820b2674fe71f123380c9b364ee82aa6cead3df --- fboss/agent/Utils.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 95307cfa7c10a..932b3643e834f 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -432,6 +432,7 @@ SystemPortID getSystemPortID( SwitchID switchId) { return getSystemPortID( portId, + state->getPorts()->getNode(portId)->getScope(), state->getSwitchSettings() ->getSwitchSettings( HwSwitchMatcher(std::unordered_set({switchId}))) From 65a6bc68cca1dd63b2b6393e8c232ccb6479b266 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Mon, 28 Oct 2024 21:43:11 -0700 Subject: [PATCH 411/479] Use new api with port scope to calculate sys port id in port tests Summary: As titled. Reviewed By: zechengh09 Differential Revision: D65100183 fbshipit-source-id: e29866446aebe1c0bcdb102b9030e32139eff9f2 --- fboss/agent/state/tests/PortTests.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fboss/agent/state/tests/PortTests.cpp b/fboss/agent/state/tests/PortTests.cpp index 2400e04312f13..fd7ebc0396bae 100644 --- a/fboss/agent/state/tests/PortTests.cpp +++ b/fboss/agent/state/tests/PortTests.cpp @@ -9,6 +9,7 @@ */ #include "fboss/agent/ApplyThriftConfig.h" #include "fboss/agent/FbossError.h" +#include "fboss/agent/SwitchIdScopeResolver.h" #include "fboss/agent/gen-cpp2/switch_config_constants.h" #include "fboss/agent/hw/mock/MockPlatform.h" #include "fboss/agent/state/DeltaFunctions.h" @@ -937,16 +938,14 @@ TEST(Port, verifyInterfaceIDsForVoqSwitches) { auto stateV1 = publishAndApplyConfig(stateV0, &config, platform.get()); ASSERT_NE(nullptr, stateV1); + SwitchIdScopeResolver scopeResolver( + *config.switchSettings()->switchIdToSwitchInfo()); for (const auto& portMap : std::as_const(*(stateV1->getPorts()))) { for (auto port : *portMap.second) { auto portID = port.second->getID(); - // FIXME [2-stage DSF] migrate to using global/localSysetemPortOffset - auto expectedIntfID = InterfaceID( - *stateV1->getAssociatedSystemPortRangesIf(portID) - .systemPortRanges() - ->begin() - ->minimum() + - port.second->getID()); + auto sysPortId = getSystemPortID( + portID, stateV1, scopeResolver.scope(portID).switchId()); + auto expectedIntfID = InterfaceID(static_cast(sysPortId)); EXPECT_EQ(expectedIntfID, port.second->getInterfaceID()); } } From 6833650cc28b8cec5c6cb9ad0ad555b0763d302a Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Mon, 28 Oct 2024 21:43:11 -0700 Subject: [PATCH 412/479] SysPortTests - use getSystemPortId API with port scope Summary: As titled Reviewed By: srikrishnagopu Differential Revision: D65103374 fbshipit-source-id: 5c897736cd60e18b58305ab29b4887120e871770 --- fboss/agent/state/tests/SystemPortTests.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/fboss/agent/state/tests/SystemPortTests.cpp b/fboss/agent/state/tests/SystemPortTests.cpp index 3d76fe8674841..8703ccc2ed2ea 100644 --- a/fboss/agent/state/tests/SystemPortTests.cpp +++ b/fboss/agent/state/tests/SystemPortTests.cpp @@ -8,6 +8,7 @@ * */ +#include "fboss/agent/Utils.h" #include "fboss/agent/state/SwitchState.h" #include "fboss/agent/state/SystemPort.h" #include "fboss/agent/test/TestUtils.h" @@ -109,15 +110,15 @@ TEST(SystemPort, sysPortApplyConfig) { stateV1->getSystemPorts()->numNodes(), stateV1->getPorts()->numNodes()); // Flip one port to fabric port type and see that sys ports are updated config.ports()->begin()->portType() = cfg::PortType::FABRIC_PORT; - // Prune the interface corresponding to now changed port type - auto sysPortRanges = *stateV1 - ->getAssociatedSystemPortRangesIf( - PortID(*config.ports()->begin()->logicalID())) - .systemPortRanges(); - ASSERT_FALSE(sysPortRanges.empty()); - // FIXME [2-stage DSF] migrate to using global/localSysetemPortOffset - auto sysPortBase = *sysPortRanges.begin()->minimum(); - auto intfIDToPrune = sysPortBase + *config.ports()->begin()->logicalID(); + auto portConfig = *config.ports()->begin(); + SwitchIdScopeResolver scopeResolver( + *config.switchSettings()->switchIdToSwitchInfo()); + auto portSwitchId = + scopeResolver.scope(PortID(*config.ports()->begin()->logicalID())) + .switchId(); + auto sysPortId = + getSystemPortID(PortID(*portConfig.logicalID()), stateV1, portSwitchId); + auto intfIDToPrune = static_cast(sysPortId); std::vector intfs; for (const auto& intf : *config.interfaces()) { if (*intf.intfID() != intfIDToPrune) { From b57d2ca5bb9b7774b835516d49fcea0785235419 Mon Sep 17 00:00:00 2001 From: Protick Bhowmick Date: Mon, 28 Oct 2024 23:20:03 -0700 Subject: [PATCH 413/479] Skip Link Tests when list_production_feature flag is Present Summary: 1) Added support for the `list_production_features` flag in LinkTests. 2) When the flag is set, the link test would be skipped. 3) Note that even when `setup()` is skipped from the parent class with the `GTEST_SKIP` macro, the rest of the setup code in the child class is still executed. Therefore, we recheck if the test was skipped again in the child class setup. 4) `TearDown()` is still called even if we skip the test as it is part of the gtest lifecycle. Therefore, we check again if the `list_production_features` flag was passed, and if so, we do not execute the code in teardowns. Note that, this time we explicitly check if the `list_production_features` flag was passed rather than using gtest's built-in `IsSkipped()` function (like point `3`) . The rationale is that the test might be skipped for other reasons and that might necessitate the teardown to take care of clearing things before exiting the test. So, we limit the scope of teardown skipping here only to my intended functionality, Reviewed By: xanabani Differential Revision: D64497120 fbshipit-source-id: f8ee88bbabaa1d65fa6a1e8033b6609f366e3390 --- fboss/agent/test/link_tests/LinkTest.cpp | 43 ++++++++++++++----- fboss/agent/test/link_tests/LinkTest.h | 1 + fboss/agent/test/link_tests/PrbsTest.cpp | 23 +++++----- .../agent/test/link_tests/SpeedChangeTest.cpp | 18 ++++---- 4 files changed, 56 insertions(+), 29 deletions(-) diff --git a/fboss/agent/test/link_tests/LinkTest.cpp b/fboss/agent/test/link_tests/LinkTest.cpp index 2ae1b4102b8ae..1dbe55ebed0c6 100644 --- a/fboss/agent/test/link_tests/LinkTest.cpp +++ b/fboss/agent/test/link_tests/LinkTest.cpp @@ -27,9 +27,25 @@ #include "fboss/lib/thrift_service_client/ThriftServiceClient.h" #include "fboss/qsfp_service/if/gen-cpp2/transceiver_types_custom_protocol.h" +DEFINE_bool( + list_production_feature, + false, + "List production feature needed for every single test."); + +namespace { +int kArgc; +char** kArgv; +} // namespace + namespace facebook::fboss { void LinkTest::SetUp() { + gflags::ParseCommandLineFlags(&kArgc, &kArgv, false); + if (FLAGS_list_production_feature) { + GTEST_SKIP() << "Skipping this test because list_production_feature is set"; + return; + } + AgentTest::SetUp(); initializeCabledPorts(); // Wait for all the cabled ports to link up before finishing the setup @@ -44,17 +60,19 @@ void LinkTest::SetUp() { } void LinkTest::TearDown() { - // Expect the qsfp service to be running at the end of the tests - auto qsfpServiceClient = utils::createQsfpServiceClient(); - EXPECT_EQ( - facebook::fb303::cpp2::fb_status::ALIVE, - qsfpServiceClient.get()->sync_getStatus()) - << "QSFP Service no longer alive after the test"; - EXPECT_EQ( - QsfpServiceRunState::ACTIVE, - qsfpServiceClient.get()->sync_getQsfpServiceRunState()) - << "QSFP Service run state no longer active after the test"; - AgentTest::TearDown(); + if (!FLAGS_list_production_feature) { + // Expect the qsfp service to be running at the end of the tests + auto qsfpServiceClient = utils::createQsfpServiceClient(); + EXPECT_EQ( + facebook::fb303::cpp2::fb_status::ALIVE, + qsfpServiceClient.get()->sync_getStatus()) + << "QSFP Service no longer alive after the test"; + EXPECT_EQ( + QsfpServiceRunState::ACTIVE, + qsfpServiceClient.get()->sync_getQsfpServiceRunState()) + << "QSFP Service run state no longer active after the test"; + AgentTest::TearDown(); + } } void LinkTest::setCmdLineFlagOverrides() const { @@ -517,6 +535,9 @@ int linkTestMain( PlatformInitFn initPlatformFn, std::optional streamType) { ::testing::InitGoogleTest(&argc, argv); + + kArgc = argc; + kArgv = argv; initAgentTest(argc, argv, initPlatformFn, streamType); return RUN_ALL_TESTS(); } diff --git a/fboss/agent/test/link_tests/LinkTest.h b/fboss/agent/test/link_tests/LinkTest.h index 9588548aa880e..7c1d7e7adb47d 100644 --- a/fboss/agent/test/link_tests/LinkTest.h +++ b/fboss/agent/test/link_tests/LinkTest.h @@ -18,6 +18,7 @@ DECLARE_string(volatile_state_dir); DECLARE_bool(disable_neighbor_updates); DECLARE_bool(link_stress_test); DECLARE_bool(enable_macsec); +DECLARE_bool(list_production_feature); namespace facebook::fboss { diff --git a/fboss/agent/test/link_tests/PrbsTest.cpp b/fboss/agent/test/link_tests/PrbsTest.cpp index e69f627b7f823..12746aeb60429 100644 --- a/fboss/agent/test/link_tests/PrbsTest.cpp +++ b/fboss/agent/test/link_tests/PrbsTest.cpp @@ -84,18 +84,21 @@ class PrbsTest : public LinkTest { protected: void SetUp() override { LinkTest::SetUp(); - waitForLldpOnCabledPorts(); - // Get the list of ports and their components to enable the test on - portsToTest_ = getPortsToTest(); - CHECK(!portsToTest_.empty()); + if (!IsSkipped()) { + waitForLldpOnCabledPorts(); + + // Get the list of ports and their components to enable the test on + portsToTest_ = getPortsToTest(); + CHECK(!portsToTest_.empty()); - for (auto testPort : portsToTest_) { - XLOG(DBG2) << "Will run the PRBS " - << apache::thrift::util::enumNameSafe(testPort.polynomial) - << " test on " - << apache::thrift::util::enumNameSafe(testPort.component) - << " on " << testPort.portName; + for (auto testPort : portsToTest_) { + XLOG(DBG2) << "Will run the PRBS " + << apache::thrift::util::enumNameSafe(testPort.polynomial) + << " test on " + << apache::thrift::util::enumNameSafe(testPort.component) + << " on " << testPort.portName; + } } } diff --git a/fboss/agent/test/link_tests/SpeedChangeTest.cpp b/fboss/agent/test/link_tests/SpeedChangeTest.cpp index 2ac7f0f6aa300..e97cd4384e9d8 100644 --- a/fboss/agent/test/link_tests/SpeedChangeTest.cpp +++ b/fboss/agent/test/link_tests/SpeedChangeTest.cpp @@ -218,14 +218,16 @@ void SpeedChangeTest::setupConfigFlag() { } void SpeedChangeTest::TearDown() { - if (!FLAGS_setup_for_warmboot) { - // If this test wasn't setup for warmboot, revert back the original config - // in FLAGS_config path. Also clean up the copy - boost::filesystem::copy_file( - originalConfigCopy, - FLAGS_config, - boost::filesystem::copy_option::overwrite_if_exists); - CHECK(removeFile(originalConfigCopy)); + if (!FLAGS_list_production_feature) { + if (!FLAGS_setup_for_warmboot) { + // If this test wasn't setup for warmboot, revert back the original config + // in FLAGS_config path. Also clean up the copy + boost::filesystem::copy_file( + originalConfigCopy, + FLAGS_config, + boost::filesystem::copy_option::overwrite_if_exists); + CHECK(removeFile(originalConfigCopy)); + } } LinkTest::TearDown(); } From 4c96dfe09e59e00b7fd89c2e14f8d5379f01c320 Mon Sep 17 00:00:00 2001 From: Protick Bhowmick Date: Mon, 28 Oct 2024 23:20:03 -0700 Subject: [PATCH 414/479] Add thrift file for link test production features Summary: - Added a new `thrift file` that lists the production features introduced for L1/L2 split. - Typically, we would also need to define the same file in `configerator`, as is done for agent production features or qsfp production features. - However, in those flows, `netcastle` retrieves the latest config from the materialized config in configerator using the configurator client, to check supported production features based on the platform and then match them with the production features output by individual tests to determine whether to allow/skip them. - But, our use case is different. There is no platform-specific `L1/L2` test support; instead, we make that decision based on flags supplied in the `netcastle CLI` (see the `last diff` in the stack for more details). Therefore, we do not need to retrieve any configs from `configerator` and can use the enum directly from `fbcode`. Reviewed By: harshitgulati18 Differential Revision: D64500902 fbshipit-source-id: 158fc7a5bc496454769dcc69e9a81d66e2548c70 --- fboss/agent/test/link_tests/BUCK | 28 +++++++++++++++++++ .../link_test_production_features.thrift | 15 ++++++++++ 2 files changed, 43 insertions(+) create mode 100644 fboss/agent/test/link_tests/link_test_production_features.thrift diff --git a/fboss/agent/test/link_tests/BUCK b/fboss/agent/test/link_tests/BUCK index 4f70abcdcc491..36fd9a65dddee 100644 --- a/fboss/agent/test/link_tests/BUCK +++ b/fboss/agent/test/link_tests/BUCK @@ -1,5 +1,6 @@ load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") +load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library") load("//fboss:THIRD-PARTY-VERSIONS.bzl", "BCM_SDKS", "to_impl_suffix", "to_versions") load( "//fboss/agent/test/link_tests:link_tests.bzl", @@ -385,4 +386,31 @@ cpp_library( for sdk in BCM_SDKS ] +thrift_library( + name = "link_test_production_features", + go_thrift_namespaces = { + "link_test_production_features.thrift": "neteng.fboss.link_test_production_features", + }, + languages = [ + "cpp2", + "go", + "py", + "py3", + "py-asyncio", + "rust", + ], + py3_namespace = "neteng.fboss", + py_asyncio_base_module = "neteng.fboss.asyncio", + py_base_module = "neteng.fboss", + thrift_cpp2_options = "json", + thrift_py_options = "json,sort_keys", + thrift_rust_options = [ + "deprecated_default_enum_min_i32", + "serde", + ], + thrift_srcs = {"link_test_production_features.thrift": []}, + deps = [ + ], +) + all_sai_link_test_binaries() diff --git a/fboss/agent/test/link_tests/link_test_production_features.thrift b/fboss/agent/test/link_tests/link_test_production_features.thrift new file mode 100644 index 0000000000000..dbcc82ca85a73 --- /dev/null +++ b/fboss/agent/test/link_tests/link_test_production_features.thrift @@ -0,0 +1,15 @@ +# +# Copyright 2004-present Facebook. All Rights Reserved. +# + +namespace py neteng.fboss.link_test_production_features +namespace py3 neteng.fboss +namespace py.asyncio neteng.fboss.asyncio.link_test_production_features +namespace cpp2 facebook.fboss.link_test_production_features +namespace go neteng.fboss.link_test_production_features +namespace php fboss_link_test_production_features + +enum LinkTestProductionFeature { + L1_LINK_TEST = 0, + L2_LINK_TEST = 1, +} From feab7f41eecbe2bc2ff23138f8bb78f4c04e9925 Mon Sep 17 00:00:00 2001 From: Protick Bhowmick Date: Mon, 28 Oct 2024 23:20:03 -0700 Subject: [PATCH 415/479] Print Link Test Production features Summary: Added the `printProductionFeatures` and `getProductionFeatures` functions to the `LinkTest` class. The `printProductionFeatures` function outputs the `production features` of a specific test (L1/L2) when the `list_production_features` flag is enabled. The `getProductionFeatures` function is a virtual method overridden by each test class that inherits from `LinkTest`. Since some gtests directly use LinkTest, it also implements the `getProductionFeatures` function instead of leaving it as a pure virtual method. Here's a detailed list of the current Link tests, including their type, file name, and Test class, to facilitate cross-checking the changes in this diff. https://docs.google.com/spreadsheets/d/1MorIYHYDufAmjEC6om4V5T1KPXGIZwudiYqDlTyql9Q/edit?usp=sharing **Note that:** 1) Most Test classes are straightforward, with all tests being homogenous (e.g., MacsecTest). In these cases, we simply override the getProductionFeatures function in the respective class. 2) However, there are mixed cases like LinkTest and LinkSanityTestDataPlaneFlood. In these instances, we determine the type of Production feature to return based on the test name. Reviewed By: xanabani Differential Revision: D64547239 fbshipit-source-id: 212164e6b09baaad257cf03f1e8f0747067ad6a3 --- CMakeLists.txt | 7 +++ cmake/AgentTestLinkTests.cmake | 1 + fboss/agent/test/link_tests/BUCK | 2 + fboss/agent/test/link_tests/EmptyLinkTest.cpp | 9 +++- .../agent/test/link_tests/LacpSanityTests.cpp | 6 +++ .../agent/test/link_tests/LinkSanityTests.cpp | 25 +++++++++++ fboss/agent/test/link_tests/LinkTest.cpp | 45 +++++++++++++++++++ fboss/agent/test/link_tests/LinkTest.h | 6 +++ .../test/link_tests/MacLearningTests.cpp | 5 +++ .../test/link_tests/OpenBmcUpgradeTests.cpp | 6 +++ fboss/agent/test/link_tests/OpticsTest.cpp | 7 +++ fboss/agent/test/link_tests/PrbsTest.cpp | 21 +++++++++ fboss/agent/test/link_tests/PtpTests.cpp | 7 +++ .../agent/test/link_tests/SpeedChangeTest.cpp | 7 +++ 14 files changed, 153 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f3cb555e5553..a60d7f0bf6d90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -540,6 +540,13 @@ add_fbthrift_cpp_library( json reflection ) +add_fbthrift_cpp_library( + link_test_production_features_cpp2 + fboss/agent/test/link_tests/link_test_production_features.thrift + OPTIONS + json + reflection +) add_fbthrift_cpp_library( i2c_controller_stats_cpp2 fboss/lib/i2c/i2c_controller_stats.thrift diff --git a/cmake/AgentTestLinkTests.cmake b/cmake/AgentTestLinkTests.cmake index a976c48775e34..fc46572e57af8 100644 --- a/cmake/AgentTestLinkTests.cmake +++ b/cmake/AgentTestLinkTests.cmake @@ -28,6 +28,7 @@ target_link_libraries(link_tests packet packet_snooper pkt_test_utils + link_test_production_features_cpp2 ${GTEST} ${LIBGMOCK_LIBRARIES} ) diff --git a/fboss/agent/test/link_tests/BUCK b/fboss/agent/test/link_tests/BUCK index 36fd9a65dddee..9a85d7a9f5328 100644 --- a/fboss/agent/test/link_tests/BUCK +++ b/fboss/agent/test/link_tests/BUCK @@ -39,6 +39,7 @@ cpp_library( undefined_symbols = True, exported_deps = [ "fbsource//third-party/googletest:gtest", + ":link_test_production_features-cpp2-types", "//common/process:process", "//fboss/agent:agent_stats-cpp2-types", "//fboss/agent:core", @@ -137,6 +138,7 @@ cpp_library( undefined_symbols = True, exported_deps = [ "fbsource//third-party/googletest:gtest", + ":link_test_production_features-cpp2-types", "//fboss/agent:core", "//fboss/agent:fboss-error", "//fboss/agent:fboss-types", diff --git a/fboss/agent/test/link_tests/EmptyLinkTest.cpp b/fboss/agent/test/link_tests/EmptyLinkTest.cpp index 5fb759c21a134..23bde1ad1c131 100644 --- a/fboss/agent/test/link_tests/EmptyLinkTest.cpp +++ b/fboss/agent/test/link_tests/EmptyLinkTest.cpp @@ -7,7 +7,14 @@ using namespace ::testing; using namespace facebook::fboss; -class EmptyLinkTest : public LinkTest {}; +class EmptyLinkTest : public LinkTest { + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST, + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } +}; TEST_F(EmptyLinkTest, CheckInit) { verifyAcrossWarmBoots( diff --git a/fboss/agent/test/link_tests/LacpSanityTests.cpp b/fboss/agent/test/link_tests/LacpSanityTests.cpp index 9de6c00f92e54..b32da67a2d134 100644 --- a/fboss/agent/test/link_tests/LacpSanityTests.cpp +++ b/fboss/agent/test/link_tests/LacpSanityTests.cpp @@ -25,6 +25,12 @@ constexpr int kBaseAggId{500}; } // unnamed namespace class LacpTest : public LinkTest { + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + private: void setCmdLineFlagOverrides() const override { FLAGS_enable_lacp = true; diff --git a/fboss/agent/test/link_tests/LinkSanityTests.cpp b/fboss/agent/test/link_tests/LinkSanityTests.cpp index a7a1f79e9cb90..9de80924b7411 100644 --- a/fboss/agent/test/link_tests/LinkSanityTests.cpp +++ b/fboss/agent/test/link_tests/LinkSanityTests.cpp @@ -44,6 +44,11 @@ bool isEqual( getChannelId(left) == getChannelId(right) && getChannels(left) == getChannels(right); } +const std::vector l1LinkTestNames = {"qsfpWarmbootIsHitLess"}; + +const std::vector l2LinkTestNames = { + "warmbootIsHitLess", + "ptpEnableIsHitless"}; } // namespace class LinkSanityTestDataPlaneFlood : public LinkTest { @@ -53,6 +58,26 @@ class LinkSanityTestDataPlaneFlood : public LinkTest { << "setup up initial config for sw ttl0 to create dataplane flood"; setupTtl0ForwardingEnable(); } + + std::vector + getProductionFeatures() const override { + const std::string testName = + testing::UnitTest::GetInstance()->current_test_info()->name(); + + if (std::find(l1LinkTestNames.begin(), l1LinkTestNames.end(), testName) != + l1LinkTestNames.end()) { + return {link_test_production_features::LinkTestProductionFeature:: + L1_LINK_TEST}; + } else if ( + std::find(l2LinkTestNames.begin(), l2LinkTestNames.end(), testName) != + l2LinkTestNames.end()) { + return {link_test_production_features::LinkTestProductionFeature:: + L2_LINK_TEST}; + } else { + throw std::runtime_error( + "Test type (L1/L2) not specified for this test case"); + } + } }; // Tests that the link comes up after a flap on the ASIC diff --git a/fboss/agent/test/link_tests/LinkTest.cpp b/fboss/agent/test/link_tests/LinkTest.cpp index 1dbe55ebed0c6..fa7f06b20fea0 100644 --- a/fboss/agent/test/link_tests/LinkTest.cpp +++ b/fboss/agent/test/link_tests/LinkTest.cpp @@ -35,6 +35,22 @@ DEFINE_bool( namespace { int kArgc; char** kArgv; + +const std::vector l1LinkTestNames = { + "asicLinkFlap", + "getTransceivers", + "opticsTxDisableRandomPorts", + "opticsTxDisableEnable", + "testOpticsRemediation", + "qsfpColdbootAfterAgentUp", + "fabricLinkHealth", + "opticsVdmPerformanceMonitoring", + "iPhyInfoTest", + "xPhyInfoTest", + "verifyIphyFecCounters", + "verifyIphyFecBerCounters"}; + +const std::vector l2LinkTestNames = {"trafficRxTx", "ecmpShrink"}; } // namespace namespace facebook::fboss { @@ -42,6 +58,7 @@ namespace facebook::fboss { void LinkTest::SetUp() { gflags::ParseCommandLineFlags(&kArgc, &kArgv, false); if (FLAGS_list_production_feature) { + printProductionFeatures(); GTEST_SKIP() << "Skipping this test because list_production_feature is set"; return; } @@ -529,6 +546,34 @@ std::vector> LinkTest::getPortPairsForFecErrInj() return supportedPorts; } +std::vector +LinkTest::getProductionFeatures() const { + const std::string testName = + testing::UnitTest::GetInstance()->current_test_info()->name(); + + if (std::find(l1LinkTestNames.begin(), l1LinkTestNames.end(), testName) != + l1LinkTestNames.end()) { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } else if ( + std::find(l2LinkTestNames.begin(), l2LinkTestNames.end(), testName) != + l2LinkTestNames.end()) { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } else { + throw std::runtime_error( + "Test type (L1/L2) not specified for this test case"); + } +} + +void LinkTest::printProductionFeatures() const { + std::vector supportedFeatures; + for (const auto& feature : getProductionFeatures()) { + supportedFeatures.push_back(apache::thrift::util::enumNameSafe(feature)); + } + std::cout << "Feature List: " << folly::join(",", supportedFeatures) << "\n"; +} + int linkTestMain( int argc, char** argv, diff --git a/fboss/agent/test/link_tests/LinkTest.h b/fboss/agent/test/link_tests/LinkTest.h index 7c1d7e7adb47d..c271e45322501 100644 --- a/fboss/agent/test/link_tests/LinkTest.h +++ b/fboss/agent/test/link_tests/LinkTest.h @@ -9,6 +9,7 @@ #include "fboss/lib/phy/gen-cpp2/phy_types.h" #include +#include "fboss/agent/test/link_tests/gen-cpp2/link_test_production_features_types.h" // TODO Movng these to Linktestutils.h causes linker error. Resolve and move // them @@ -111,6 +112,8 @@ class LinkTest : public AgentTest { std::vector> getPortPairsForFecErrInj() const; + void printProductionFeatures() const; + private: void programDefaultRoute( const boost::container::flat_set& ecmpPorts, @@ -118,6 +121,9 @@ class LinkTest : public AgentTest { void initializeCabledPorts(); void logLinkDbgMessage(std::vector& portIDs) const override; + virtual std::vector + getProductionFeatures() const; + std::vector cabledPorts_; std::vector cabledFabricPorts_; std::set cabledTransceivers_; diff --git a/fboss/agent/test/link_tests/MacLearningTests.cpp b/fboss/agent/test/link_tests/MacLearningTests.cpp index 378d576f50b73..7760c27ba437f 100644 --- a/fboss/agent/test/link_tests/MacLearningTests.cpp +++ b/fboss/agent/test/link_tests/MacLearningTests.cpp @@ -31,6 +31,11 @@ class MacLearningTest : public LinkTest { << "since changing mode is not fully supported on SAI"; overrideL2LearningConfig(true, kL2AgeTimer); } + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } public: void updateL2Aging(int ageout) { diff --git a/fboss/agent/test/link_tests/OpenBmcUpgradeTests.cpp b/fboss/agent/test/link_tests/OpenBmcUpgradeTests.cpp index 4cc5ef0b561e5..a89eb4becca56 100644 --- a/fboss/agent/test/link_tests/OpenBmcUpgradeTests.cpp +++ b/fboss/agent/test/link_tests/OpenBmcUpgradeTests.cpp @@ -49,6 +49,12 @@ class OpenBmcUpgradeTest : public LinkTest { }); } + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + protected: void openBmcSanityCheck() const { XLOG(DBG2) << "Checking ssh access to oob"; diff --git a/fboss/agent/test/link_tests/OpticsTest.cpp b/fboss/agent/test/link_tests/OpticsTest.cpp index 9305c3f669ffc..015159508a7a8 100644 --- a/fboss/agent/test/link_tests/OpticsTest.cpp +++ b/fboss/agent/test/link_tests/OpticsTest.cpp @@ -100,6 +100,13 @@ void validateVdm( } // namespace class OpticsTest : public LinkTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + public: std::set> getConnectedOpticalPortPairs() const { // TransceiverFeature::NONE will get us all optical pairs. diff --git a/fboss/agent/test/link_tests/PrbsTest.cpp b/fboss/agent/test/link_tests/PrbsTest.cpp index 12746aeb60429..276711da31dfa 100644 --- a/fboss/agent/test/link_tests/PrbsTest.cpp +++ b/fboss/agent/test/link_tests/PrbsTest.cpp @@ -581,6 +581,13 @@ class PrbsTest : public LinkTest { template class TransceiverLineToTransceiverLinePrbsTest : public PrbsTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + protected: std::vector getPortsToTest() override { std::vector portsToTest; @@ -612,6 +619,13 @@ template < phy::PortComponent ComponentA, prbs::PrbsPolynomial PolynomialZ> class PhyToTransceiverSystemPrbsTest : public PrbsTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + protected: std::vector getPortsToTest() override { CHECK( @@ -641,6 +655,13 @@ class PhyToTransceiverSystemPrbsTest : public PrbsTest { template class AsicToAsicPrbsTest : public PrbsTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + protected: std::vector getPortsToTest() override { std::vector portsToTest; diff --git a/fboss/agent/test/link_tests/PtpTests.cpp b/fboss/agent/test/link_tests/PtpTests.cpp index 4f980c0a3765f..f7ac416d7a14a 100644 --- a/fboss/agent/test/link_tests/PtpTests.cpp +++ b/fboss/agent/test/link_tests/PtpTests.cpp @@ -25,6 +25,13 @@ const folly::IPAddressV6 kIPv6Dst = folly::IPAddressV6("2::1"); // arbit const auto kSrcMac = folly::MacAddress{"00:00:00:00:01:03"}; // arbit class PtpTests : public LinkTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + public: std::unique_ptr createPtpPkt( PTPMessageType ptpType) { diff --git a/fboss/agent/test/link_tests/SpeedChangeTest.cpp b/fboss/agent/test/link_tests/SpeedChangeTest.cpp index e97cd4384e9d8..fe7a66c948874 100644 --- a/fboss/agent/test/link_tests/SpeedChangeTest.cpp +++ b/fboss/agent/test/link_tests/SpeedChangeTest.cpp @@ -22,6 +22,13 @@ struct SpeedAndProfile { }; class SpeedChangeTest : public LinkTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + public: void TearDown() override; void setupConfigFlag() override; From bba2e4cd49b5185a1da7ee507ade35e1f224200e Mon Sep 17 00:00:00 2001 From: Protick Bhowmick Date: Mon, 28 Oct 2024 23:20:03 -0700 Subject: [PATCH 416/479] Skip Agent Ensemble Link Tests when list_production_feature flag is Present Summary: Similar to D64497120 Reviewed By: xanabani Differential Revision: D64986838 fbshipit-source-id: 74e0dc9eeca97a929b9f99ff5d2b6d3ced6701d0 --- .../test/link_tests/AgentEnsembleLinkTest.cpp | 41 ++++++++++++++----- .../test/link_tests/AgentEnsembleLinkTest.h | 1 + .../test/link_tests/AgentEnsemblePrbsTest.cpp | 26 ++++++------ .../AgentEnsembleSpeedChangeTest.cpp | 18 ++++---- 4 files changed, 55 insertions(+), 31 deletions(-) diff --git a/fboss/agent/test/link_tests/AgentEnsembleLinkTest.cpp b/fboss/agent/test/link_tests/AgentEnsembleLinkTest.cpp index 65af98b1f78b3..f36968785a24e 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleLinkTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleLinkTest.cpp @@ -25,9 +25,24 @@ #include "fboss/lib/thrift_service_client/ThriftServiceClient.h" #include "fboss/qsfp_service/if/gen-cpp2/transceiver_types_custom_protocol.h" +DEFINE_bool( + list_production_feature, + false, + "List production feature needed for every single test."); + +namespace { +int kArgc; +char** kArgv; +} // namespace + namespace facebook::fboss { void AgentEnsembleLinkTest::SetUp() { + gflags::ParseCommandLineFlags(&kArgc, &kArgv, false); + if (FLAGS_list_production_feature) { + GTEST_SKIP() << "Skipping this test because list_production_feature is set"; + return; + } AgentEnsembleTest::SetUp(); initializeCabledPorts(); // Wait for all the cabled ports to link up before finishing the setup @@ -37,17 +52,19 @@ void AgentEnsembleLinkTest::SetUp() { } void AgentEnsembleLinkTest::TearDown() { - // Expect the qsfp service to be running at the end of the tests - auto qsfpServiceClient = utils::createQsfpServiceClient(); - EXPECT_EQ( - facebook::fb303::cpp2::fb_status::ALIVE, - qsfpServiceClient.get()->sync_getStatus()) - << "QSFP Service no longer alive after the test"; - EXPECT_EQ( - QsfpServiceRunState::ACTIVE, - qsfpServiceClient.get()->sync_getQsfpServiceRunState()) - << "QSFP Service run state no longer active after the test"; - AgentEnsembleTest::TearDown(); + if (!FLAGS_list_production_feature) { + // Expect the qsfp service to be running at the end of the tests + auto qsfpServiceClient = utils::createQsfpServiceClient(); + EXPECT_EQ( + facebook::fb303::cpp2::fb_status::ALIVE, + qsfpServiceClient.get()->sync_getStatus()) + << "QSFP Service no longer alive after the test"; + EXPECT_EQ( + QsfpServiceRunState::ACTIVE, + qsfpServiceClient.get()->sync_getQsfpServiceRunState()) + << "QSFP Service run state no longer active after the test"; + AgentEnsembleTest::TearDown(); + } } void AgentEnsembleLinkTest::setCmdLineFlagOverrides() const { @@ -523,6 +540,8 @@ int agentEnsembleLinkTestMain( PlatformInitFn initPlatformFn, std::optional streamType) { ::testing::InitGoogleTest(&argc, argv); + kArgc = argc; + kArgv = argv; initAgentEnsembleTest(argc, argv, initPlatformFn, streamType); return RUN_ALL_TESTS(); } diff --git a/fboss/agent/test/link_tests/AgentEnsembleLinkTest.h b/fboss/agent/test/link_tests/AgentEnsembleLinkTest.h index ebc496824003a..a9af3459c2355 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleLinkTest.h +++ b/fboss/agent/test/link_tests/AgentEnsembleLinkTest.h @@ -13,6 +13,7 @@ DECLARE_string(config); DECLARE_bool(link_stress_test); DECLARE_bool(disable_neighbor_updates); +DECLARE_bool(list_production_feature); namespace facebook::fboss { diff --git a/fboss/agent/test/link_tests/AgentEnsemblePrbsTest.cpp b/fboss/agent/test/link_tests/AgentEnsemblePrbsTest.cpp index 06692aa90658a..0a3407a67ec97 100644 --- a/fboss/agent/test/link_tests/AgentEnsemblePrbsTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsemblePrbsTest.cpp @@ -83,18 +83,20 @@ class AgentEnsemblePrbsTest : public AgentEnsembleLinkTest { protected: void SetUp() override { AgentEnsembleLinkTest::SetUp(); - waitForLldpOnCabledPorts(); - - // Get the list of ports and their components to enable the test on - portsToTest_ = getPortsToTest(); - CHECK(!portsToTest_.empty()); - - for (auto testPort : portsToTest_) { - XLOG(DBG2) << "Will run the PRBS " - << apache::thrift::util::enumNameSafe(testPort.polynomial) - << " test on " - << apache::thrift::util::enumNameSafe(testPort.component) - << " on " << testPort.portName; + if (!IsSkipped()) { + waitForLldpOnCabledPorts(); + + // Get the list of ports and their components to enable the test on + portsToTest_ = getPortsToTest(); + CHECK(!portsToTest_.empty()); + + for (auto testPort : portsToTest_) { + XLOG(DBG2) << "Will run the PRBS " + << apache::thrift::util::enumNameSafe(testPort.polynomial) + << " test on " + << apache::thrift::util::enumNameSafe(testPort.component) + << " on " << testPort.portName; + } } } diff --git a/fboss/agent/test/link_tests/AgentEnsembleSpeedChangeTest.cpp b/fboss/agent/test/link_tests/AgentEnsembleSpeedChangeTest.cpp index 42f0b38b35edb..d2ec07d8f8fc9 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleSpeedChangeTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleSpeedChangeTest.cpp @@ -229,14 +229,16 @@ cfg::SwitchConfig AgentEnsembleSpeedChangeTest::initialConfig( } void AgentEnsembleSpeedChangeTest::TearDown() { - if (!FLAGS_setup_for_warmboot) { - // If this test wasn't setup for warmboot, revert back the original config - // in FLAGS_config path. Also clean up the copy - boost::filesystem::copy_file( - originalConfigCopy, - FLAGS_config, - boost::filesystem::copy_option::overwrite_if_exists); - CHECK(removeFile(originalConfigCopy)); + if (!FLAGS_list_production_feature) { + if (!FLAGS_setup_for_warmboot) { + // If this test wasn't setup for warmboot, revert back the original config + // in FLAGS_config path. Also clean up the copy + boost::filesystem::copy_file( + originalConfigCopy, + FLAGS_config, + boost::filesystem::copy_option::overwrite_if_exists); + CHECK(removeFile(originalConfigCopy)); + } } AgentEnsembleLinkTest::TearDown(); } From 7d9206b19401e2fb8555b20575d1dd798623baf7 Mon Sep 17 00:00:00 2001 From: Protick Bhowmick Date: Mon, 28 Oct 2024 23:20:03 -0700 Subject: [PATCH 417/479] Print Link Test Production features for Agent Ensemble Link Tests Summary: similar to D64547239 Reviewed By: xanabani Differential Revision: D64991844 fbshipit-source-id: ea724837ef2af65b033dcd5456fed62b622c1043 --- cmake/AgentTestLinkTests.cmake | 1 + .../link_tests/AgentEnsembleEmptyLinkTest.cpp | 9 +++- .../AgentEnsembleLacpSanityTests.cpp | 6 +++ .../AgentEnsembleLinkSanityTests.cpp | 25 +++++++++++ .../test/link_tests/AgentEnsembleLinkTest.cpp | 45 +++++++++++++++++++ .../test/link_tests/AgentEnsembleLinkTest.h | 6 +++ .../AgentEnsembleMacLearningTests.cpp | 6 +++ .../AgentEnsembleOpenBmcUpgradeTests.cpp | 6 +++ .../link_tests/AgentEnsembleOpticsTest.cpp | 7 +++ .../test/link_tests/AgentEnsemblePrbsTest.cpp | 21 +++++++++ .../test/link_tests/AgentEnsemblePtpTests.cpp | 7 +++ .../AgentEnsembleSpeedChangeTest.cpp | 7 +++ fboss/agent/test/link_tests/BUCK | 1 + 13 files changed, 146 insertions(+), 1 deletion(-) diff --git a/cmake/AgentTestLinkTests.cmake b/cmake/AgentTestLinkTests.cmake index fc46572e57af8..91ae7a3b2d638 100644 --- a/cmake/AgentTestLinkTests.cmake +++ b/cmake/AgentTestLinkTests.cmake @@ -65,6 +65,7 @@ target_link_libraries(agent_ensemble_link_tests packet packet_snooper trunk_utils + link_test_production_features_cpp2 ${GTEST} ${LIBGMOCK_LIBRARIES} ) diff --git a/fboss/agent/test/link_tests/AgentEnsembleEmptyLinkTest.cpp b/fboss/agent/test/link_tests/AgentEnsembleEmptyLinkTest.cpp index a4c5f25b872ff..790df09f48e3c 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleEmptyLinkTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleEmptyLinkTest.cpp @@ -7,7 +7,14 @@ using namespace ::testing; using namespace facebook::fboss; -class AgentEnsembleEmptyLinkTest : public AgentEnsembleLinkTest {}; +class AgentEnsembleEmptyLinkTest : public AgentEnsembleLinkTest { + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST, + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } +}; TEST_F(AgentEnsembleEmptyLinkTest, CheckInit) { verifyAcrossWarmBoots( diff --git a/fboss/agent/test/link_tests/AgentEnsembleLacpSanityTests.cpp b/fboss/agent/test/link_tests/AgentEnsembleLacpSanityTests.cpp index 788b7d5011f5d..39c70e02ab3a1 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleLacpSanityTests.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleLacpSanityTests.cpp @@ -27,6 +27,12 @@ class AgentEnsembleLacpTest : public AgentEnsembleLinkTest { AgentEnsembleLinkTest::setCmdLineFlagOverrides(); } + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + public: void programCabledAggPorts() { auto config = getSw()->getConfig(); diff --git a/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp b/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp index 757a379d22fbf..320bc218aeab0 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp @@ -50,6 +50,12 @@ const std::string qsfpUtilPrefix() { ? "wedge_qsfp_util --multi-npu-platform-mapping " : "wedge_qsfp_util "; } + +const std::vector l1LinkTestNames = {"qsfpWarmbootIsHitLess"}; + +const std::vector l2LinkTestNames = { + "warmbootIsHitLess", + "ptpEnableIsHitless"}; } // namespace class AgentEnsembleLinkSanityTestDataPlaneFlood : public AgentEnsembleLinkTest { @@ -60,6 +66,25 @@ class AgentEnsembleLinkSanityTestDataPlaneFlood : public AgentEnsembleLinkTest { setupTtl0ForwardingEnable(); return AgentEnsembleLinkTest::initialConfig(ensemble); } + std::vector + getProductionFeatures() const override { + const std::string testName = + testing::UnitTest::GetInstance()->current_test_info()->name(); + + if (std::find(l1LinkTestNames.begin(), l1LinkTestNames.end(), testName) != + l1LinkTestNames.end()) { + return {link_test_production_features::LinkTestProductionFeature:: + L1_LINK_TEST}; + } else if ( + std::find(l2LinkTestNames.begin(), l2LinkTestNames.end(), testName) != + l2LinkTestNames.end()) { + return {link_test_production_features::LinkTestProductionFeature:: + L2_LINK_TEST}; + } else { + throw std::runtime_error( + "Test type (L1/L2) not specified for this test case"); + } + } }; // Tests that the link comes up after a flap on the ASIC diff --git a/fboss/agent/test/link_tests/AgentEnsembleLinkTest.cpp b/fboss/agent/test/link_tests/AgentEnsembleLinkTest.cpp index f36968785a24e..db2dcb13c9f4a 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleLinkTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleLinkTest.cpp @@ -33,6 +33,22 @@ DEFINE_bool( namespace { int kArgc; char** kArgv; + +const std::vector l1LinkTestNames = { + "asicLinkFlap", + "getTransceivers", + "opticsTxDisableRandomPorts", + "opticsTxDisableEnable", + "testOpticsRemediation", + "qsfpColdbootAfterAgentUp", + "fabricLinkHealth", + "opticsVdmPerformanceMonitoring", + "iPhyInfoTest", + "xPhyInfoTest", + "verifyIphyFecCounters", + "verifyIphyFecBerCounters"}; + +const std::vector l2LinkTestNames = {"trafficRxTx", "ecmpShrink"}; } // namespace namespace facebook::fboss { @@ -40,6 +56,7 @@ namespace facebook::fboss { void AgentEnsembleLinkTest::SetUp() { gflags::ParseCommandLineFlags(&kArgc, &kArgv, false); if (FLAGS_list_production_feature) { + printProductionFeatures(); GTEST_SKIP() << "Skipping this test because list_production_feature is set"; return; } @@ -534,6 +551,34 @@ void AgentEnsembleLinkTest::setForceTrafficOverFabric(bool force) { }); } +std::vector +AgentEnsembleLinkTest::getProductionFeatures() const { + const std::string testName = + testing::UnitTest::GetInstance()->current_test_info()->name(); + + if (std::find(l1LinkTestNames.begin(), l1LinkTestNames.end(), testName) != + l1LinkTestNames.end()) { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } else if ( + std::find(l2LinkTestNames.begin(), l2LinkTestNames.end(), testName) != + l2LinkTestNames.end()) { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } else { + throw std::runtime_error( + "Test type (L1/L2) not specified for this test case"); + } +} + +void AgentEnsembleLinkTest::printProductionFeatures() const { + std::vector supportedFeatures; + for (const auto& feature : getProductionFeatures()) { + supportedFeatures.push_back(apache::thrift::util::enumNameSafe(feature)); + } + std::cout << "Feature List: " << folly::join(",", supportedFeatures) << "\n"; +} + int agentEnsembleLinkTestMain( int argc, char** argv, diff --git a/fboss/agent/test/link_tests/AgentEnsembleLinkTest.h b/fboss/agent/test/link_tests/AgentEnsembleLinkTest.h index a9af3459c2355..2fabe4b9465ca 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleLinkTest.h +++ b/fboss/agent/test/link_tests/AgentEnsembleLinkTest.h @@ -9,6 +9,7 @@ #include "fboss/lib/phy/gen-cpp2/phy_types.h" #include +#include "fboss/agent/test/link_tests/gen-cpp2/link_test_production_features_types.h" DECLARE_string(config); DECLARE_bool(link_stress_test); @@ -106,6 +107,8 @@ class AgentEnsembleLinkTest : public AgentEnsembleTest { void setForceTrafficOverFabric(bool force); + void printProductionFeatures() const; + private: void programDefaultRoute( const boost::container::flat_set& ecmpPorts, @@ -113,6 +116,9 @@ class AgentEnsembleLinkTest : public AgentEnsembleTest { void initializeCabledPorts(); void logLinkDbgMessage(std::vector& portIDs) const override; + virtual std::vector + getProductionFeatures() const; + std::vector cabledPorts_; std::vector cabledFabricPorts_; std::set cabledTransceivers_; diff --git a/fboss/agent/test/link_tests/AgentEnsembleMacLearningTests.cpp b/fboss/agent/test/link_tests/AgentEnsembleMacLearningTests.cpp index 9be14b7e1ce72..0aafb7905bdac 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleMacLearningTests.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleMacLearningTests.cpp @@ -28,6 +28,12 @@ class AgentEnsembleMacLearningTest : public AgentEnsembleLinkTest { return AgentEnsembleLinkTest::initialConfig(ensemble); } + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + public: void updateL2Aging(int ageout) { getSw()->updateStateBlocking("update L2 aging", [ageout](auto state) { diff --git a/fboss/agent/test/link_tests/AgentEnsembleOpenBmcUpgradeTests.cpp b/fboss/agent/test/link_tests/AgentEnsembleOpenBmcUpgradeTests.cpp index d5b67de49d80d..f5ec9af2cb381 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleOpenBmcUpgradeTests.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleOpenBmcUpgradeTests.cpp @@ -48,6 +48,12 @@ class AgentEnsembleOpenBmcUpgradeTest : public AgentEnsembleLinkTest { }); } + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + protected: void openBmcSanityCheck() const { XLOG(DBG2) << "Checking ssh access to oob"; diff --git a/fboss/agent/test/link_tests/AgentEnsembleOpticsTest.cpp b/fboss/agent/test/link_tests/AgentEnsembleOpticsTest.cpp index 27edda685da1d..9b9d2095b74b1 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleOpticsTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleOpticsTest.cpp @@ -105,6 +105,13 @@ void validateVdm( } // namespace class AgentEnsembleOpticsTest : public AgentEnsembleLinkTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + public: std::set> getConnectedOpticalPortPairs() const { // TransceiverFeature::NONE will get us all optical pairs. diff --git a/fboss/agent/test/link_tests/AgentEnsemblePrbsTest.cpp b/fboss/agent/test/link_tests/AgentEnsemblePrbsTest.cpp index 0a3407a67ec97..1aadea101b800 100644 --- a/fboss/agent/test/link_tests/AgentEnsemblePrbsTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsemblePrbsTest.cpp @@ -579,6 +579,13 @@ class AgentEnsemblePrbsTest : public AgentEnsembleLinkTest { template class TransceiverLineToTransceiverLinePrbsTest : public AgentEnsemblePrbsTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + protected: std::vector getPortsToTest() override { std::vector portsToTest; @@ -610,6 +617,13 @@ template < phy::PortComponent ComponentA, prbs::PrbsPolynomial PolynomialZ> class PhyToTransceiverSystemPrbsTest : public AgentEnsemblePrbsTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + protected: std::vector getPortsToTest() override { CHECK( @@ -639,6 +653,13 @@ class PhyToTransceiverSystemPrbsTest : public AgentEnsemblePrbsTest { template class AsicToAsicPrbsTest : public AgentEnsemblePrbsTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + protected: std::vector getPortsToTest() override { std::vector portsToTest; diff --git a/fboss/agent/test/link_tests/AgentEnsemblePtpTests.cpp b/fboss/agent/test/link_tests/AgentEnsemblePtpTests.cpp index 2702d4e40ff42..6dd3857b1208d 100644 --- a/fboss/agent/test/link_tests/AgentEnsemblePtpTests.cpp +++ b/fboss/agent/test/link_tests/AgentEnsemblePtpTests.cpp @@ -24,6 +24,13 @@ const folly::IPAddressV6 kIPv6Dst = folly::IPAddressV6("2::1"); // arbit const auto kSrcMac = folly::MacAddress{"00:00:00:00:01:03"}; // arbit class AgentEnsemblePtpTests : public AgentEnsembleLinkTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + public: std::unique_ptr createPtpPkt( PTPMessageType ptpType) { diff --git a/fboss/agent/test/link_tests/AgentEnsembleSpeedChangeTest.cpp b/fboss/agent/test/link_tests/AgentEnsembleSpeedChangeTest.cpp index d2ec07d8f8fc9..ec01c96dc1b12 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleSpeedChangeTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleSpeedChangeTest.cpp @@ -21,6 +21,13 @@ struct SpeedAndProfile { }; class AgentEnsembleSpeedChangeTest : public AgentEnsembleLinkTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + public: void TearDown() override; void preInitSetup() override; diff --git a/fboss/agent/test/link_tests/BUCK b/fboss/agent/test/link_tests/BUCK index 9a85d7a9f5328..330e9cc8d89d4 100644 --- a/fboss/agent/test/link_tests/BUCK +++ b/fboss/agent/test/link_tests/BUCK @@ -269,6 +269,7 @@ cpp_library( "fbcode//thrift/lib/cpp2/async:rocket_client_channel", "fbcode//thrift/lib/cpp2/protocol:protocol", "fbsource//third-party/googletest:gtest", + ":link_test_production_features-cpp2-types", "//common/process:process", "//fboss/agent:agent_stats-cpp2-types", "//fboss/agent:core", From cc2f04e87bb28cfc107bb412bf75e8693318e91a Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 29 Oct 2024 03:12:08 -0700 Subject: [PATCH 418/479] Use new getSystemPortID api in ecmp setup helper Summary: As titled Reviewed By: shri-khare Differential Revision: D65105006 Privacy Context Container: L1125642 fbshipit-source-id: e54f58b83c7e7aab871a02736f105387d17dad2a --- fboss/agent/test/EcmpSetupHelper.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fboss/agent/test/EcmpSetupHelper.cpp b/fboss/agent/test/EcmpSetupHelper.cpp index a804cb161ab59..e1d3a347c501e 100644 --- a/fboss/agent/test/EcmpSetupHelper.cpp +++ b/fboss/agent/test/EcmpSetupHelper.cpp @@ -382,17 +382,16 @@ std::optional BaseEcmpSetupHelper::getInterface( CHECK(intf->getVlanID() == *vlan); return intf->getID(); } else if (port.isPhysicalPort()) { - // Look for port RIF auto sysPortRanges = state->getAssociatedSystemPortRangesIf(port.phyPortID()); if (sysPortRanges.systemPortRanges()->empty()) { return std::nullopt; } - // FIXME [2-stage DSF] migrate to using global/localSysetemPortOffset - auto sysPortBase = *sysPortRanges.systemPortRanges()->begin()->minimum(); - SystemPortID sysPortId{// static_cast to avoid spurious narrowing conversion - // compiler warning. PortID is just 16 bits - static_cast(port.intID()) + sysPortBase}; + // Look for port RIF + auto sysPortId = getSystemPortID( + port.phyPortID(), + state, + state->getAssociatedSwitchID(port.phyPortID())); if (auto intf = state->getInterfaces()->getNodeIf( InterfaceID(static_cast(sysPortId)))) { return intf->getID(); From cde009c4bffaa8efc5d0301d01603d2e2f3a51eb Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 29 Oct 2024 03:12:08 -0700 Subject: [PATCH 419/479] Use utils API with port.scope to compute getSystemPortId Summary: As titled Reviewed By: shri-khare, srikrishnagopu Differential Revision: D65109334 Privacy Context Container: L1125642 fbshipit-source-id: 9208255a51c790e7a37dff0a90a9bf3d6ab16f4b --- fboss/agent/ApplyThriftConfig.cpp | 1 + fboss/agent/test/TestUtils.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 7987ee6659e92..f182e194057ca 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -1598,6 +1598,7 @@ shared_ptr ThriftConfigApplier::updateSystemPorts( } auto sysPort = std::make_shared(getSystemPortID( port.second->getID(), + port.second->getScope(), switchSettings->getSwitchIdToSwitchInfo(), switchId)); sysPort->setSwitchId(SwitchID(switchId)); diff --git a/fboss/agent/test/TestUtils.cpp b/fboss/agent/test/TestUtils.cpp index 449ce996bd6fd..447ea1d99ac2b 100644 --- a/fboss/agent/test/TestUtils.cpp +++ b/fboss/agent/test/TestUtils.cpp @@ -388,6 +388,7 @@ cfg::SwitchConfig testConfigBImpl() { cfg::Interface intf; auto intfId = getSystemPortID( PortID(*port.logicalID()), + *port.scope(), switchId2SwitchInfo, SwitchID(switchIndex + 1)); XLOG(INFO) << "Port id : " << *port.logicalID() From 4a7ebe9a04f60c335bb327677324da31356f5cf3 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 29 Oct 2024 03:12:08 -0700 Subject: [PATCH 420/479] Update Hw and agent tests to use new getSystemPortID apis Summary: As titled. We need to be aware of the port scope when computing system port ID Reviewed By: shri-khare Differential Revision: D65111792 fbshipit-source-id: 5385c0af8a67f2bf5dfdb57f3eab3507a5a1b038 --- fboss/agent/hw/test/dataplane_tests/HwAqmTests.cpp | 3 +-- fboss/agent/test/agent_hw_tests/AgentAqmTests.cpp | 3 +-- fboss/agent/test/agent_hw_tests/AgentWatermarkTests.cpp | 8 ++------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/fboss/agent/hw/test/dataplane_tests/HwAqmTests.cpp b/fboss/agent/hw/test/dataplane_tests/HwAqmTests.cpp index 61803d5b47d3b..d7757303a4593 100644 --- a/fboss/agent/hw/test/dataplane_tests/HwAqmTests.cpp +++ b/fboss/agent/hw/test/dataplane_tests/HwAqmTests.cpp @@ -361,8 +361,7 @@ class HwAqmTest : public HwLinkStateDependentTest { // watermarks for ECN traffic for VoQ switches. auto sysPortId = getSystemPortID( portId, - utility::getFirstNodeIf(getProgrammedState()->getSwitchSettings()) - ->getSwitchIdToSwitchInfo(), + getProgrammedState(), getPlatform()->getHwSwitch()->getSwitchID()); auto sysPortStats = getHwSwitchEnsemble()->getLatestSysPortStats(sysPortId); diff --git a/fboss/agent/test/agent_hw_tests/AgentAqmTests.cpp b/fboss/agent/test/agent_hw_tests/AgentAqmTests.cpp index c3b8e81ab54d6..f33700ab1af85 100644 --- a/fboss/agent/test/agent_hw_tests/AgentAqmTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentAqmTests.cpp @@ -237,8 +237,7 @@ class AgentAqmTest : public AgentHwTest { // watermarks for ECN traffic for VoQ switches. auto sysPortId = getSystemPortID( portId, - utility::getFirstNodeIf(getProgrammedState()->getSwitchSettings()) - ->getSwitchIdToSwitchInfo(), + getProgrammedState(), scopeResolver().scope(portId).switchId()); auto sysPortStats = getLatestSysPortStats(sysPortId); extractAqmTestStats(sysPortStats, portStats, queueId, stats); diff --git a/fboss/agent/test/agent_hw_tests/AgentWatermarkTests.cpp b/fboss/agent/test/agent_hw_tests/AgentWatermarkTests.cpp index d3bb72d141f78..4f2a3d8d96b50 100644 --- a/fboss/agent/test/agent_hw_tests/AgentWatermarkTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentWatermarkTests.cpp @@ -126,8 +126,7 @@ class AgentWatermarkTest : public AgentHwTest { } else { auto systemPortId = getSystemPortID( portId, - utility::getFirstNodeIf(getProgrammedState()->getSwitchSettings()) - ->getSwitchIdToSwitchInfo(), + getProgrammedState(), scopeResolver().scope(portId).switchId()); portName = getProgrammedState() ->getSystemPorts() @@ -152,10 +151,7 @@ class AgentWatermarkTest : public AgentHwTest { bool isVoq) { if (isVoq) { auto sysPortId = getSystemPortID( - portId, - utility::getFirstNodeIf(getProgrammedState()->getSwitchSettings()) - ->getSwitchIdToSwitchInfo(), - switchIdForPort(portId)); + portId, getProgrammedState(), switchIdForPort(portId)); return *getLatestSysPortStats(sysPortId).queueWatermarkBytes_(); } else { return *getLatestPortStats(portId).queueWatermarkBytes_(); From 8aff20a8f9ac81d7dff18342f2994912210fd91c Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 29 Oct 2024 03:12:08 -0700 Subject: [PATCH 421/479] Kill legacy api which was computing system port id using sys port range Summary: As titled. We need global/local offsets for this computation Reviewed By: shri-khare Differential Revision: D65114903 Privacy Context Container: L1125642 fbshipit-source-id: fadc978a9a0146425a30abc246694ab18b00e3f2 --- fboss/agent/Utils.cpp | 18 ------------------ fboss/agent/Utils.h | 5 ----- 2 files changed, 23 deletions(-) diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 932b3643e834f..62f55023435f6 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -408,24 +408,6 @@ SystemPortID getSystemPortID( return SystemPortID(systemPortId); } -SystemPortID getSystemPortID( - const PortID& portId, - const std::map& switchToSwitchInfo, - SwitchID switchId) { - auto switchInfo = switchToSwitchInfo.find(static_cast(switchId)); - if (switchInfo == switchToSwitchInfo.end()) { - throw FbossError( - "switchId: ", switchId, " not found in switchToSwitchInfo"); - } - auto sysPortRange = switchInfo->second.systemPortRange(); - CHECK(sysPortRange.has_value()); - auto portIdRange = *switchInfo->second.portIdRange(); - auto systemPortId = static_cast(portId) + *sysPortRange->minimum() - - *portIdRange.minimum(); - CHECK_LE(systemPortId, *sysPortRange->maximum()); - return SystemPortID(systemPortId); -} - SystemPortID getSystemPortID( const PortID& portId, const std::shared_ptr& state, diff --git a/fboss/agent/Utils.h b/fboss/agent/Utils.h index d47db98a9c4f8..a25ec26887a19 100644 --- a/fboss/agent/Utils.h +++ b/fboss/agent/Utils.h @@ -250,11 +250,6 @@ PortID getPortID( SystemPortID sysPortId, const std::shared_ptr& state); -SystemPortID getSystemPortID( - const PortID& portId, - const std::map& switchToSwitchInfo, - SwitchID switchId); - SystemPortID getSystemPortID( const PortID& portId, cfg::Scope portScope, From 7b0a9685e96ee4b11ca6c578b3d8951d40dd59b6 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 29 Oct 2024 03:12:08 -0700 Subject: [PATCH 422/479] Use getSystemPortID API when deriving masterLogicalSysPortIds Summary: As titled Reviewed By: shri-khare Differential Revision: D65116357 fbshipit-source-id: a8a0da2ac64b24f15dd982da5fbb214bafe0594e --- fboss/agent/test/BUCK | 1 + fboss/agent/test/TestEnsembleIf.cpp | 10 +++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/fboss/agent/test/BUCK b/fboss/agent/test/BUCK index 735cdc7fd369f..94b7e58bbf35a 100644 --- a/fboss/agent/test/BUCK +++ b/fboss/agent/test/BUCK @@ -726,6 +726,7 @@ cpp_library( "//fboss/agent:hw_switch", "//fboss/agent:platform_base", "//fboss/agent:switch_config-cpp2-types", + "//fboss/agent:utils", "//fboss/agent/state:state", "//fboss/agent/state:state_update", "//folly/gen:base", diff --git a/fboss/agent/test/TestEnsembleIf.cpp b/fboss/agent/test/TestEnsembleIf.cpp index e4c2971f3cfa9..f6becffb6f89d 100644 --- a/fboss/agent/test/TestEnsembleIf.cpp +++ b/fboss/agent/test/TestEnsembleIf.cpp @@ -3,6 +3,7 @@ #include "fboss/agent/test/TestEnsembleIf.h" #include "fboss/agent/Platform.h" +#include "fboss/agent/Utils.h" #include "fboss/agent/state/Port.h" #include "fboss/agent/state/SwitchState.h" @@ -67,15 +68,10 @@ std::vector TestEnsembleIf::masterLogicalSysPortIds() const { } auto switchId = asic->getSwitchId(); CHECK(switchId.has_value()); - auto sysPortRange = getProgrammedState() - ->getDsfNodes() - ->getNodeIf(SwitchID(*switchId)) - ->getSystemPortRange(); - CHECK(sysPortRange.has_value()); for (auto port : masterLogicalPortIds({cfg::PortType::INTERFACE_PORT})) { if (scopeResolver().scope(port).switchId() == SwitchID(*switchId)) { - sysPorts.push_back( - SystemPortID(*sysPortRange->minimum() + static_cast(port))); + sysPorts.push_back(getSystemPortID( + PortID(port), getProgrammedState(), SwitchID(*switchId))); } } } From 1167ea6eede5e41c6d66ff862faec98d992315ac Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 29 Oct 2024 08:17:24 -0700 Subject: [PATCH 423/479] Use globalSysPortOffset for deriving intfs for voq switch in thrift test Summary: As titled Reviewed By: srikrishnagopu Differential Revision: D65119056 fbshipit-source-id: 4c6c0c4d8da167dd4bd73999cf7d7b66a30ccfa6 --- fboss/agent/test/ThriftTest.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fboss/agent/test/ThriftTest.cpp b/fboss/agent/test/ThriftTest.cpp index 5c24c302fbd0d..f3a642270593b 100644 --- a/fboss/agent/test/ThriftTest.cpp +++ b/fboss/agent/test/ThriftTest.cpp @@ -173,13 +173,12 @@ class ThriftTestAllSwitchTypes : public ::testing::Test { } int interfaceIdBegin() const { auto switchId = getSwitchIdAndType().first; - return isVoq() ? *sw_->getState() - ->getDsfNodes() - ->getNodeIf(switchId) - ->getSystemPortRange() - ->minimum() + - 5 - : 1; + if (isVoq()) { + auto dsfNode = sw_->getState()->getDsfNodes()->getNodeIf(switchId); + CHECK(dsfNode->getGlobalSystemPortOffset().has_value()); + return *dsfNode->getGlobalSystemPortOffset() + 5; + } + return 1; } std::pair getSwitchIdAndType() const { From 22aeb5e948863eb34be477b975d81c358dcfb748 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Tue, 29 Oct 2024 09:34:24 -0700 Subject: [PATCH 424/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/bcded3ee58157bb37269e41543eecda47c44e0fb https://github.com/facebook/buck2-shims-meta/commit/461a1b10af7eb8af2f6d0eb0129009d60048e6de https://github.com/facebook/fb303/commit/a19ea131f192bdffbb9d946928c4ad28f7fa5df0 https://github.com/facebook/fbthrift/commit/bc71935c76682c1efa9669cbd65e2f2531048488 https://github.com/facebook/folly/commit/6df9a81e358ca3bbe75f78e58e53d6f6bd3d73e7 https://github.com/facebook/mvfst/commit/5bc71bf3b39d5a147ff9db131e0b8b06172ee814 https://github.com/facebook/proxygen/commit/e4940e1cc72e250be9b338fe81055cd3ba0b9e59 https://github.com/facebook/wangle/commit/24a9d8a27a5cddb6cdd64dde96d0bfd574655ac9 https://github.com/facebookexperimental/rust-shed/commit/05e53dfd930d9142a15fa7ea47b685f42c5d5382 https://github.com/facebookincubator/fizz/commit/979e1ae21bd29b1e298c500da3ff147da4687c60 Reviewed By: bigfootjon fbshipit-source-id: 51fccb3d20e50b14b1435f6153a0f421d3ded56b --- .../facebook/buck2-shims-meta/external_cell.buckconfig | 2 +- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig b/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig index 08fc9e13b0726..51665d718950a 100644 --- a/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig +++ b/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig @@ -6,4 +6,4 @@ gh_facebook_buck2_shims_meta = git [external_cell_gh_facebook_buck2_shims_meta] git_origin = https://github.com/facebook/buck2-shims-meta.git -commit_hash = 3d85b5b3eb9f06cdad2436a0a874dcd0181bf3f2 +commit_hash = 461a1b10af7eb8af2f6d0eb0129009d60048e6de diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index c3f095f64faae..ad50463017e37 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 269ab46d0b920b5eacfd1658ef2b373b36554337 +Subproject commit a19ea131f192bdffbb9d946928c4ad28f7fa5df0 diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index e596bd69d3262..b5633f3d4a34c 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit fb180f035fffa69311bec856e04afc8f30da5d47 +Subproject commit bc71935c76682c1efa9669cbd65e2f2531048488 diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index a453b6176b4df..033ee3ca6a3fb 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 265a484efce787e7540de54be02b3cefc72a2f6d +Subproject commit 6df9a81e358ca3bbe75f78e58e53d6f6bd3d73e7 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 77721d6940688..886f420e70f0e 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit b890ed7f5aeeb02fd94cf93d12485bfd3f993256 +Subproject commit 24a9d8a27a5cddb6cdd64dde96d0bfd574655ac9 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 8a9f2f4187513..743ddde85636f 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 8bb942a09b29e847eadaff96d582093d028fcb23 +Subproject commit 979e1ae21bd29b1e298c500da3ff147da4687c60 From a7f736d71ac5be0bd475f08862674899657fc9ae Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Tue, 29 Oct 2024 11:20:50 -0700 Subject: [PATCH 425/479] Enable packaging of binaries built from local changes (#283) Summary: Pull Request resolved: https://github.com/facebook/fboss/pull/283 Allow packaging of FBOSS binaries built from a local commit. In these cases, the git path does not exist because the local checkout of the source code is used rather than re-cloning via getdeps, so the path from which to copy the configs/run scripts needs to be adjusted. Reviewed By: srikrishnagopu Differential Revision: D65085740 fbshipit-source-id: d4c309662805109657acf1c8a5d24cdc472a3e1e --- fboss/oss/scripts/package-fboss.py | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/fboss/oss/scripts/package-fboss.py b/fboss/oss/scripts/package-fboss.py index 4b1342aa8f4af..8889208e76a6d 100755 --- a/fboss/oss/scripts/package-fboss.py +++ b/fboss/oss/scripts/package-fboss.py @@ -4,6 +4,7 @@ import argparse import glob import os +import pathlib import shutil import subprocess import tempfile @@ -90,8 +91,28 @@ def _get_dir_for(self, name, location): .split("\n")[-1] ) + def get_fboss_subdirectory(self, path_suffix: str) -> str: + candidate = os.path.join(self.git_path, path_suffix) + # Check if this directory exists. Under certain conditions, this + # directory might be missing, such as cases where the build was done + # from a local checkout of the code. + if not os.path.isdir(candidate): + # If the run_scripts_path does not exist, attempt to locate the run + # scripts via a relative path based on location of package-fboss.py + # fboss/oss/scripts/package-fboss.py four parents up should take us + # to the root of the repository + fboss_root_path = pathlib.Path( + __file__ + ).parent.parent.parent.parent.resolve() + candidate = os.path.join(fboss_root_path, path_suffix) + if os.path.isdir(candidate): + return candidate + else: + raise RuntimeError(f"Could not find directory for {path_suffix}") + def _copy_run_scripts(self, tmp_dir_name): - run_scripts_path = os.path.join(self.git_path, "fboss/oss/scripts/run_scripts") + run_scripts_path = self.get_fboss_subdirectory("fboss/oss/scripts/run_scripts") + src_files = os.listdir(run_scripts_path) for file_name in src_files: full_file_name = os.path.join(run_scripts_path, file_name) @@ -100,7 +121,8 @@ def _copy_run_scripts(self, tmp_dir_name): shutil.copy(full_file_name, script_pkg_path) def _copy_run_configs(self, tmp_dir_name): - run_configs_path = os.path.join(self.git_path, "fboss/oss/scripts/run_configs") + run_configs_path = self.get_fboss_subdirectory("fboss/oss/scripts/run_configs") + src_files = os.listdir(run_configs_path) for file_name in src_files: full_file_name = os.path.join(run_configs_path, file_name) From a2200fdab604f22d2c8c09d7519bacf16773b4bd Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Tue, 29 Oct 2024 12:03:01 -0700 Subject: [PATCH 426/479] Port RouteTests to agent hw tests Summary: Porting route tests to agent hw tests Reviewed By: zechengh09 Differential Revision: D61980089 fbshipit-source-id: 0904addf7bca32be4d3387e47be3a693b2d1b192 --- cmake/AgentTestAgentHwTests.cmake | 1 + .../hw_test/HwTestRouteUtilsThriftHandler.cpp | 67 +- .../test/agent_hw_tests/AgentRouteTests.cpp | 726 ++++++++++++++++++ fboss/agent/test/agent_hw_tests/BUCK | 3 + 4 files changed, 777 insertions(+), 20 deletions(-) create mode 100644 fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp diff --git a/cmake/AgentTestAgentHwTests.cmake b/cmake/AgentTestAgentHwTests.cmake index 32ba286aae383..9ab4449dfb455 100644 --- a/cmake/AgentTestAgentHwTests.cmake +++ b/cmake/AgentTestAgentHwTests.cmake @@ -29,6 +29,7 @@ add_library(agent_hw_test_src fboss/agent/test/agent_hw_tests/AgentQueuePerHostL2Tests.cpp fboss/agent/test/agent_hw_tests/AgentQueuePerHostTests.cpp fboss/agent/test/agent_hw_tests/AgentQueuePerHostRouteTests.cpp + fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp fboss/agent/test/agent_hw_tests/AgentVoqSwitchInterruptsTests.cpp fboss/agent/test/agent_hw_tests/AgentFabricSwitchTests.cpp diff --git a/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp b/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp index 7db680db5c2a2..b051de22810bf 100644 --- a/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp +++ b/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp @@ -23,10 +23,14 @@ using facebook::fboss::cfg::AclLookupClass; namespace { bool isEgressToIp(folly::IPAddress addr, sai_object_id_t adapterKey) { - auto ipAttr = SaiApiTable::getInstance()->nextHopApi().getAttribute( - static_cast(adapterKey), - SaiNextHopTraitsT::Attributes::Ip()); - return ipAttr == addr; + try { + auto ipAttr = SaiApiTable::getInstance()->nextHopApi().getAttribute( + static_cast(adapterKey), + SaiNextHopTraitsT::Attributes::Ip()); + return ipAttr == addr; + } catch (const facebook::fboss::SaiApiError&) { + return false; + } } SaiRouteTraits::RouteEntry getSaiRouteAdapterKey( @@ -68,17 +72,21 @@ bool isHwRouteToCpu( const folly::CIDRNetwork& cidrNetwork) { const auto saiSwitch = static_cast(hwSwitch); - auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); - sai_object_id_t nhop = SaiApiTable::getInstance()->routeApi().getAttribute( - routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); + try { + auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); + sai_object_id_t nhop = SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); - facebook::fboss::SwitchSaiId switchId = - saiSwitch->managerTable()->switchManager().getSwitchSaiId(); - sai_object_id_t cpuPortId{ - SaiApiTable::getInstance()->switchApi().getAttribute( - switchId, SaiSwitchTraits::Attributes::CpuPort{})}; + facebook::fboss::SwitchSaiId switchId = + saiSwitch->managerTable()->switchManager().getSwitchSaiId(); + sai_object_id_t cpuPortId{ + SaiApiTable::getInstance()->switchApi().getAttribute( + switchId, SaiSwitchTraits::Attributes::CpuPort{})}; - return nhop == cpuPortId; + return nhop == cpuPortId; + } catch (const facebook::fboss::SaiApiError&) { + return false; + } } bool isHwRouteHit( @@ -101,11 +109,11 @@ bool isHwRouteMultiPath( const folly::CIDRNetwork& cidrNetwork) { const auto saiSwitch = static_cast(hwSwitch); - auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); - sai_object_id_t nhop = SaiApiTable::getInstance()->routeApi().getAttribute( - routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); - try { + auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); + sai_object_id_t nhop = SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); + SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( static_cast(nhop), facebook::fboss::SaiNextHopGroupTraits::Attributes:: @@ -134,9 +142,14 @@ bool isHwRouteToNextHop( return false; } + sai_object_id_t nhop; auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); - sai_object_id_t nhop = SaiApiTable::getInstance()->routeApi().getAttribute( - routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); + try { + nhop = SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); + } catch (const facebook::fboss::SaiApiError&) { + return false; + } try { auto members = SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( @@ -184,6 +197,19 @@ bool isRoutePresent( return true; } +bool isRouteSetToDrop( + const HwSwitch* hwSwitch, + RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + const auto saiSwitch = static_cast(hwSwitch); + + auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); + auto packetAction = SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::PacketAction()); + + return packetAction == SAI_PACKET_ACTION_DROP; +} + bool isRouteUnresolvedToCpuClassId( const HwSwitch* hwSwitch, RouterID rid, @@ -206,7 +232,8 @@ void HwTestThriftHandler::getRouteInfo( auto routePrefix = folly::CIDRNetwork( network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); routeInfo.exists() = isRoutePresent(hwSwitch_, RouterID(0), routePrefix); - if (*routeInfo.exists()) { + if (*routeInfo.exists() && + !isRouteSetToDrop(hwSwitch_, RouterID(0), routePrefix)) { auto classID = getHwRouteClassID(hwSwitch_, RouterID(0), routePrefix); if (classID.has_value()) { routeInfo.classId() = classID.value(); diff --git a/fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp b/fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp new file mode 100644 index 0000000000000..47d96540b9fcd --- /dev/null +++ b/fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp @@ -0,0 +1,726 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#include "fboss/agent/TxPacket.h" +#include "fboss/agent/packet/PktUtil.h" +#include "fboss/agent/state/LabelForwardingAction.h" +#include "fboss/agent/state/NodeBase-defs.h" +#include "fboss/agent/state/Port.h" +#include "fboss/agent/state/StateUtils.h" +#include "fboss/agent/test/AgentHwTest.h" +#include "fboss/agent/test/EcmpSetupHelper.h" +#include "fboss/agent/test/utils/AsicUtils.h" +#include "fboss/agent/test/utils/ConfigUtils.h" +#include "fboss/agent/test/utils/CoppTestUtils.h" +#include "fboss/agent/test/utils/OlympicTestUtils.h" +#include "fboss/agent/test/utils/PacketTestUtils.h" +#include "fboss/lib/CommonUtils.h" + +#include "fboss/agent/AddressUtil.h" +#include "fboss/agent/if/gen-cpp2/common_types.h" +#include "folly/IPAddressV4.h" +#include "folly/IPAddressV6.h" + +#include + +using facebook::network::toBinaryAddress; + +DECLARE_bool(intf_nbr_tables); +DECLARE_bool(classid_for_unresolved_routes); + +namespace { +facebook::fboss::utility::RouteInfo getRouteInfo( + const folly::IPAddress& ip, + int prefixLength, + facebook::fboss::AgentEnsemble& ensemble) { + auto switchId = ensemble.getSw() + ->getScopeResolver() + ->scope(ensemble.masterLogicalPortIds()) + .switchId(); + facebook::fboss::IpPrefix prefix; + prefix.ip() = toBinaryAddress(ip); + prefix.prefixLength() = prefixLength; + auto client = ensemble.getHwAgentTestClient(switchId); + facebook::fboss::utility::RouteInfo routeInfo; + client->sync_getRouteInfo(routeInfo, prefix); + return routeInfo; +} + +bool isRouteToNexthop( + const folly::IPAddress& ip, + int prefixLength, + const folly::IPAddress& nexthop, + facebook::fboss::AgentEnsemble& ensemble) { + auto switchId = ensemble.getSw() + ->getScopeResolver() + ->scope(ensemble.masterLogicalPortIds()) + .switchId(); + facebook::fboss::IpPrefix prefix; + prefix.ip() = toBinaryAddress(ip); + prefix.prefixLength() = prefixLength; + auto client = ensemble.getHwAgentTestClient(switchId); + return client->sync_isRouteToNexthop(prefix, toBinaryAddress(nexthop)); +} +} // namespace + +namespace facebook::fboss { + +template +class AgentRouteTest : public AgentHwTest { + public: + using Type = AddrT; + + protected: + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { + return utility::onePortPerInterfaceConfig( + ensemble.getSw(), + ensemble.masterLogicalPortIds(), + true /*interfaceHasSubnet*/); + } + + std::vector + getProductionFeaturesVerified() const override { + return {production_features::ProductionFeature::L3_FORWARDING}; + } + + RouterID kRouterID() const { + return RouterID(0); + } + + cfg::AclLookupClass kLookupClass() const { + return cfg::AclLookupClass::CLASS_QUEUE_PER_HOST_QUEUE_2; + } + + std::vector portDescs() const { + std::vector ports; + for (auto i = 0; i < 4; ++i) { + ports.push_back(PortDescriptor(masterLogicalInterfacePortIds()[i])); + } + return ports; + } + RoutePrefix getSubnetIpForInterface() const { + auto state = this->getProgrammedState(); + const VlanID vlanID{utility::kBaseVlanId}; + auto vlan = state->getVlans()->getNodeIf(vlanID); + auto interface = state->getInterfaces()->getNodeIf(vlan->getInterfaceID()); + if (interface) { + for (auto iter : std::as_const(*interface->getAddresses())) { + std::pair address( + folly::IPAddress(iter.first), iter.second->ref()); + if constexpr (std::is_same_v) { + if (address.first.isV4()) { + return RoutePrefix{ + address.first.asV4(), address.second}; + } + } else { + if (address.first.isV6()) { + return RoutePrefix{ + address.first.asV6(), address.second}; + } + } + } + } + XLOG(FATAL) << "Invald configuration vlan " << utility::kBaseVlanId; + } + const std::vector> kGetRoutePrefixes() const { + if constexpr (std::is_same_v) { + static const std::vector> routePrefixes = { + RoutePrefix{folly::IPAddressV4{"10.10.1.0"}, 24}, + RoutePrefix{folly::IPAddressV4{"10.20.1.0"}, 24}, + RoutePrefix{folly::IPAddressV4{"10.30.1.0"}, 24}, + RoutePrefix{folly::IPAddressV4{"10.40.1.1"}, 32}}; + + return routePrefixes; + } else { + static const std::vector> routePrefixes = { + RoutePrefix{ + folly::IPAddressV6{"2803:6080:d038:3063::"}, 64}, + RoutePrefix{ + folly::IPAddressV6{"2803:6080:d038:3064::"}, 64}, + RoutePrefix{ + folly::IPAddressV6{"2803:6080:d038:3065::"}, 64}, + RoutePrefix{ + folly::IPAddressV6{"2803:6080:d038:3065::1"}, 128}}; + + return routePrefixes; + } + } + + RoutePrefix kDefaultPrefix() const { + if constexpr (std::is_same_v) { + return RoutePrefix{folly::IPAddressV4{"0.0.0.0"}, 0}; + + } else { + return RoutePrefix{folly::IPAddressV6{"::"}, 0}; + } + } + + const AddrT kStaticIp2MplsNextHop() const { + if constexpr (std::is_same_v) { + return folly::IPAddressV4{"10.10.1.1"}; + } else { + return folly::IPAddressV6{"2803:6080:d038:3063::1"}; + } + } + + RoutePrefix kGetRoutePrefix0() const { + return kGetRoutePrefixes()[0]; + } + + RoutePrefix kGetRoutePrefix1() const { + return kGetRoutePrefixes()[1]; + } + + RoutePrefix kGetRoutePrefix2() const { + return kGetRoutePrefixes()[2]; + } + + RoutePrefix kGetRoutePrefix3() const { + return kGetRoutePrefixes()[3]; + } + + std::shared_ptr addRoutes( + const std::shared_ptr& inState, + const std::vector>& routePrefixes) { + auto kEcmpWidth = 1; + utility::EcmpSetupAnyNPorts ecmpHelper(inState, kRouterID()); + applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, kEcmpWidth); + return newState; + }); + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&wrapper, kEcmpWidth, routePrefixes); + return getProgrammedState(); + } + + void verifyClassIDHelper( + RoutePrefix routePrefix, + std::optional classID) { + auto routeInfo = getRouteInfo( + routePrefix.network(), routePrefix.mask(), *this->getAgentEnsemble()); + std::optional classIDFromHw; + if (routeInfo.classId().has_value()) { + classIDFromHw = + facebook::fboss::cfg::AclLookupClass(routeInfo.classId().value()); + } + EXPECT_EQ(classIDFromHw, classID); + } +}; + +using IpTypes = ::testing::Types; + +TYPED_TEST_SUITE(AgentRouteTest, IpTypes); + +TYPED_TEST(AgentRouteTest, VerifyClassID) { + auto setup = [=, this]() { + // 3 routes r0, r1, r2. r0 & r1 have classID, r2 does not. + this->addRoutes( + this->getProgrammedState(), + {this->kGetRoutePrefix0(), + this->kGetRoutePrefix1(), + this->kGetRoutePrefix2()}); + auto updater = this->getSw()->getRouteUpdater(); + updater.programClassID( + this->kRouterID(), + {this->kGetRoutePrefix0().toCidrNetwork(), + this->kGetRoutePrefix1().toCidrNetwork()}, + this->kLookupClass(), + false /*sync*/); + + // verify classID programming + this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); + this->verifyClassIDHelper(this->kGetRoutePrefix1(), this->kLookupClass()); + this->verifyClassIDHelper(this->kGetRoutePrefix2(), std::nullopt); + + // remove r1's classID, add classID for r2 + updater.programClassID( + this->kRouterID(), + {this->kGetRoutePrefix1().toCidrNetwork()}, + std::nullopt, + false /*sync*/); + updater.programClassID( + this->kRouterID(), + {this->kGetRoutePrefix2().toCidrNetwork()}, + this->kLookupClass(), + false /*sync*/); + }; + + auto verify = [=, this]() { + this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); + this->verifyClassIDHelper(this->kGetRoutePrefix1(), std::nullopt); + this->verifyClassIDHelper(this->kGetRoutePrefix2(), this->kLookupClass()); + }; + + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, VerifyClassIDForConnectedRoute) { + auto verify = [=, this]() { + auto ipAddr = this->getSubnetIpForInterface(); + // verify if the connected route of the interface is present + auto routeInfo = getRouteInfo( + ipAddr.network(), ipAddr.mask(), *this->getAgentEnsemble()); + EXPECT_TRUE(*routeInfo.exists()); + auto asic = + utility::checkSameAndGetAsic(this->getAgentEnsemble()->getL3Asics()); + if (asic->getAsicVendor() != HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { + if (FLAGS_set_classid_for_my_subnet_and_ip_routes) { + this->verifyClassIDHelper( + ipAddr, cfg::AclLookupClass::DST_CLASS_L3_LOCAL_2); + } + } + }; + + this->verifyAcrossWarmBoots([] {}, verify); +} + +TYPED_TEST(AgentRouteTest, VerifyClassIdWithNhopResolutionFlap) { + auto setup = [=, this]() { + this->addRoutes(this->getProgrammedState(), {this->kGetRoutePrefix0()}); + auto updater = this->getSw()->getRouteUpdater(); + updater.programClassID( + this->kRouterID(), + {this->kGetRoutePrefix0().toCidrNetwork()}, + this->kLookupClass(), + false /*sync*/); + + // verify classID programming + this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); + auto kEcmpWidth = 1; + using AddrT = typename TestFixture::Type; + utility::EcmpSetupAnyNPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + // Unresolve nhop + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.unresolveNextHops(in, kEcmpWidth); + return newState; + }); + // Resolve nhop + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, kEcmpWidth); + return newState; + }); + }; + auto verify = [=, this]() { + this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); + }; + + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, UnresolvedAndResolvedNextHop) { + using AddrT = typename TestFixture::Type; + auto ports = this->portDescs(); + auto setup = [=, this]() { + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&wrapper, {ports[0]}, {this->kGetRoutePrefix0()}); + + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[1]}); + return newState; + }); + ecmpHelper.programRoutes(&wrapper, {ports[1]}, {this->kGetRoutePrefix1()}); + }; + auto verify = [=, this]() { + auto routePrefix0 = this->kGetRoutePrefix0(); + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + auto routeInfo = getRouteInfo( + routePrefix0.network(), routePrefix0.mask(), *this->getAgentEnsemble()); + EXPECT_TRUE(*routeInfo.isProgrammedToCpu()); + EXPECT_FALSE(*routeInfo.isMultiPath()); + + auto routePrefix1 = this->kGetRoutePrefix1(); + EXPECT_TRUE(isRouteToNexthop( + routePrefix1.network(), + routePrefix1.mask(), + ecmpHelper.nhop(ports[1]).ip, + *this->getAgentEnsemble())); + + auto routeInfo1 = getRouteInfo( + routePrefix1.network(), routePrefix1.mask(), *this->getAgentEnsemble()); + EXPECT_FALSE(*routeInfo1.isMultiPath()); + }; + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, UnresolveResolvedNextHop) { + using AddrT = typename TestFixture::Type; + + auto setup = [=, this]() { + utility::EcmpSetupAnyNPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, 1); + return newState; + }); + + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&wrapper, 1, {this->kGetRoutePrefix0()}); + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.unresolveNextHops(in, 1); + return newState; + }); + }; + auto verify = [=, this]() { + auto routePrefix = this->kGetRoutePrefix0(); + auto routeInfo = getRouteInfo( + routePrefix.network(), routePrefix.mask(), *this->getAgentEnsemble()); + EXPECT_TRUE(*routeInfo.isProgrammedToCpu()); + EXPECT_FALSE(*routeInfo.isMultiPath()); + }; + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, UnresolvedAndResolvedMultiNextHop) { + using AddrT = typename TestFixture::Type; + auto ports = this->portDescs(); + auto setup = [=, this]() { + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes( + &wrapper, {ports[0], ports[1]}, {this->kGetRoutePrefix0()}); + + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[2], ports[3]}); + return newState; + }); + ecmpHelper.programRoutes( + &wrapper, {ports[2], ports[3]}, {this->kGetRoutePrefix1()}); + }; + auto verify = [=, this]() { + auto routePrefix0 = this->kGetRoutePrefix0(); + auto routeInfo = getRouteInfo( + routePrefix0.network(), routePrefix0.mask(), *this->getAgentEnsemble()); + EXPECT_FALSE(*routeInfo.isProgrammedToCpu()); + EXPECT_TRUE(*routeInfo.isMultiPath()); + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + EXPECT_FALSE(isRouteToNexthop( + routePrefix0.network(), + routePrefix0.mask(), + ecmpHelper.nhop(ports[0]).ip, + *this->getAgentEnsemble())); + EXPECT_FALSE(isRouteToNexthop( + routePrefix0.network(), + routePrefix0.mask(), + ecmpHelper.nhop(ports[1]).ip, + *this->getAgentEnsemble())); + + auto routePrefix1 = this->kGetRoutePrefix1(); + auto routeInfo1 = getRouteInfo( + routePrefix1.network(), routePrefix1.mask(), *this->getAgentEnsemble()); + EXPECT_FALSE(*routeInfo1.isProgrammedToCpu()); + EXPECT_TRUE(*routeInfo1.isMultiPath()); + EXPECT_TRUE(isRouteToNexthop( + routePrefix1.network(), + routePrefix1.mask(), + ecmpHelper.nhop(ports[2]).ip, + *this->getAgentEnsemble())); + EXPECT_TRUE(isRouteToNexthop( + routePrefix1.network(), + routePrefix1.mask(), + ecmpHelper.nhop(ports[3]).ip, + *this->getAgentEnsemble())); + }; + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, ResolvedMultiNexthopToUnresolvedSingleNexthop) { + auto ports = this->portDescs(); + using AddrT = typename TestFixture::Type; + auto verify = [=, this]() { + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[0], ports[1]}); + return newState; + }); + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes( + &wrapper, {ports[0], ports[1]}, {this->kGetRoutePrefix0()}); + auto routePrefix0 = this->kGetRoutePrefix0(); + auto routeInfo = getRouteInfo( + routePrefix0.network(), routePrefix0.mask(), *this->getAgentEnsemble()); + EXPECT_FALSE(*routeInfo.isProgrammedToCpu()); + EXPECT_TRUE(*routeInfo.isMultiPath()); + EXPECT_TRUE(isRouteToNexthop( + routePrefix0.network(), + routePrefix0.mask(), + ecmpHelper.nhop(ports[0]).ip, + *this->getAgentEnsemble())); + EXPECT_TRUE(isRouteToNexthop( + routePrefix0.network(), + routePrefix0.mask(), + ecmpHelper.nhop(ports[1]).ip, + *this->getAgentEnsemble())); + + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.unresolveNextHops( + in, + {PortDescriptor(this->masterLogicalInterfacePortIds()[0]), + PortDescriptor(this->masterLogicalInterfacePortIds()[1])}); + return newState; + }); + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops( + in, {PortDescriptor(this->masterLogicalInterfacePortIds()[0])}); + return newState; + }); + ecmpHelper.programRoutes( + &wrapper, + {PortDescriptor(this->masterLogicalInterfacePortIds()[0])}, + {this->kGetRoutePrefix0()}); + }; + this->verifyAcrossWarmBoots([] {}, verify); +} + +TYPED_TEST(AgentRouteTest, VerifyRouting) { + using AddrT = typename TestFixture::Type; + auto constexpr isV4 = std::is_same_v; + auto ports = this->portDescs(); + auto setup = [=, this]() { + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[0]}); + return newState; + }); + + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&wrapper, {ports[0]}, {this->kDefaultPrefix()}); + }; + auto verify = [=, this]() { + const auto egressPort = ports[0].phyPortID(); + auto vlanId = utility::firstVlanID(this->getProgrammedState()); + auto intfMac = utility::getFirstInterfaceMac(this->getProgrammedState()); + + auto beforeOutPkts = + *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); + auto v4TxPkt = utility::makeUDPTxPacket( + this->getSw(), + vlanId, + intfMac, + intfMac, + folly::IPAddressV4("101.0.0.1"), + folly::IPAddressV4("201.0.0.1"), + 1234, + 4321); + + auto v6TxPkt = utility::makeUDPTxPacket( + this->getSw(), + vlanId, + intfMac, + intfMac, + folly::IPAddressV6("101::1"), + folly::IPAddressV6("201::1"), + 1234, + 4321); + + if (isV4) { + this->getAgentEnsemble()->ensureSendPacketOutOfPort( + std::move(v4TxPkt), ports[1].phyPortID()); + } else { + this->getAgentEnsemble()->ensureSendPacketOutOfPort( + std::move(v6TxPkt), ports[1].phyPortID()); + } + WITH_RETRIES({ + auto afterOutPkts = + *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); + XLOG(DBG2) << "Stats:: beforeOutPkts: " << beforeOutPkts + << " afterOutPkts: " << afterOutPkts; + EXPECT_EVENTUALLY_EQ(afterOutPkts - 1, beforeOutPkts); + }); + }; + + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, verifyHostRouteChange) { + using AddrT = typename TestFixture::Type; + auto ports = this->portDescs(); + + auto setup = [=, this]() { + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[0], ports[1]}); + return newState; + }); + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&wrapper, {ports[1]}, {this->kGetRoutePrefix3()}); + ecmpHelper.programRoutes( + &wrapper, {ports[0], ports[1]}, {this->kGetRoutePrefix3()}); + }; + + auto verify = [=, this]() { + auto routePrefix = this->kGetRoutePrefix3(); + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + EXPECT_TRUE(isRouteToNexthop( + routePrefix.network(), + routePrefix.mask(), + ecmpHelper.nhop(ports[0]).ip, + *this->getAgentEnsemble())); + EXPECT_TRUE(isRouteToNexthop( + routePrefix.network(), + routePrefix.mask(), + ecmpHelper.nhop(ports[1]).ip, + *this->getAgentEnsemble())); + }; + + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, verifyCpuRouteChange) { + using AddrT = typename TestFixture::Type; + auto ports = this->portDescs(); + + auto setup = [=, this]() { + auto cfg = this->initialConfig(*this->getAgentEnsemble()); + auto ensemble = this->getAgentEnsemble(); + utility::addOlympicQosMaps(cfg, ensemble->getL3Asics()); + utility::setDefaultCpuTrafficPolicyConfig( + cfg, ensemble->getL3Asics(), ensemble->isSai()); + utility::addCpuQueueConfig(cfg, ensemble->getL3Asics(), ensemble->isSai()); + this->applyNewConfig(cfg); + + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + // Next hops unresolved - route should point to CPU + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&wrapper, {ports[1]}, {this->kGetRoutePrefix3()}); + }; + + auto verify = [=, this]() { + auto routePrefix = this->kGetRoutePrefix3(); + auto routeInfo = getRouteInfo( + routePrefix.network(), routePrefix.mask(), *this->getAgentEnsemble()); + EXPECT_TRUE(*routeInfo.isProgrammedToCpu()); + if (FLAGS_classid_for_unresolved_routes) { + EXPECT_TRUE(*routeInfo.isRouteUnresolvedToClassId()); + } + + // Resolve next hops + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[1]}); + return newState; + }); + WITH_RETRIES({ + EXPECT_EVENTUALLY_TRUE(isRouteToNexthop( + routePrefix.network(), + routePrefix.mask(), + ecmpHelper.nhop(ports[1]).ip, + *this->getAgentEnsemble())); + if (FLAGS_classid_for_unresolved_routes) { + auto routeInfo2 = getRouteInfo( + routePrefix.network(), + routePrefix.mask(), + *this->getAgentEnsemble()); + EXPECT_EVENTUALLY_FALSE(*routeInfo2.isRouteUnresolvedToClassId()); + } + }); + + // Verify routing + const auto egressPort = ports[1].phyPortID(); + auto vlanId = utility::firstVlanID(this->getProgrammedState()); + auto intfMac = utility::getFirstInterfaceMac(this->getProgrammedState()); + auto beforeOutPkts = + *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); + auto v6TxPkt = utility::makeUDPTxPacket( + this->getSw(), + vlanId, + intfMac, + intfMac, + this->kGetRoutePrefix0().network(), // Randomly pick src IP + routePrefix.network(), + 1234, + 4321); + this->getAgentEnsemble()->ensureSendPacketOutOfPort( + std::move(v6TxPkt), ports[0].phyPortID()); + WITH_RETRIES({ + auto afterOutPkts = + *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); + XLOG(DBG2) << "Stats:: beforeOutPkts: " << beforeOutPkts + << " afterOutPkts: " << afterOutPkts; + EXPECT_EVENTUALLY_EQ(afterOutPkts - 1, beforeOutPkts); + }); + + // Unresolve next hops + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.unresolveNextHops(in, {ports[1]}); + return newState; + }); + WITH_RETRIES({ + auto routeInfo3 = getRouteInfo( + routePrefix.network(), routePrefix.mask(), *this->getAgentEnsemble()); + EXPECT_EVENTUALLY_TRUE(*routeInfo3.isProgrammedToCpu()); + if (FLAGS_classid_for_unresolved_routes) { + EXPECT_EVENTUALLY_TRUE(*routeInfo3.isRouteUnresolvedToClassId()); + } + }); + + // Resolve next hops + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[1]}); + return newState; + }); + WITH_RETRIES({ + EXPECT_EVENTUALLY_TRUE(isRouteToNexthop( + routePrefix.network(), + routePrefix.mask(), + ecmpHelper.nhop(ports[1]).ip, + *this->getAgentEnsemble())); + if (FLAGS_classid_for_unresolved_routes) { + auto routeInfo4 = getRouteInfo( + routePrefix.network(), + routePrefix.mask(), + *this->getAgentEnsemble()); + EXPECT_EVENTUALLY_FALSE(*routeInfo4.isRouteUnresolvedToClassId()); + } + }); + + // Unresolve next hops + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.unresolveNextHops(in, {ports[1]}); + return newState; + }); + WITH_RETRIES({ + auto routeInfo5 = getRouteInfo( + routePrefix.network(), routePrefix.mask(), *this->getAgentEnsemble()); + EXPECT_EVENTUALLY_TRUE(*routeInfo5.isProgrammedToCpu()); + if (FLAGS_classid_for_unresolved_routes) { + EXPECT_EVENTUALLY_TRUE(*routeInfo5.isRouteUnresolvedToClassId()); + } + }); + }; + + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, VerifyDefaultRoute) { + auto verify = [=, this]() { + // default routes should exist always. + auto routeInfo = + getRouteInfo(folly::IPAddress("::"), 0, *this->getAgentEnsemble()); + EXPECT_TRUE(*routeInfo.exists()); + auto routeInfo1 = + getRouteInfo(folly::IPAddress("0.0.0.0"), 0, *this->getAgentEnsemble()); + EXPECT_TRUE(*routeInfo1.exists()); + }; + this->verifyAcrossWarmBoots([] {}, verify); +} +} // namespace facebook::fboss diff --git a/fboss/agent/test/agent_hw_tests/BUCK b/fboss/agent/test/agent_hw_tests/BUCK index bcdf62b137f0a..73daff6b30f3f 100644 --- a/fboss/agent/test/agent_hw_tests/BUCK +++ b/fboss/agent/test/agent_hw_tests/BUCK @@ -53,6 +53,7 @@ cpp_library( "AgentRouteOverDifferentAddressFamilyNhopTests.cpp", "AgentRouteOverflowTests.cpp", "AgentRouteScaleTests.cpp", + "AgentRouteTests.cpp", "AgentRxReasonTests.cpp", "AgentSendPacketToQueueTests.cpp", "AgentSflowMirrorTest.cpp", @@ -162,12 +163,14 @@ cpp_library( "//fboss/agent/hw/test:config_factory", "//fboss/agent/hw/test:hw_test_acl_utils", "//fboss/agent/hw/test:prod_config_factory", + "//fboss/agent/if:common-cpp2-types", "//fboss/agent/packet:ether_type", "//fboss/agent/packet:packet", "//fboss/agent/packet:packet_factory", "//fboss/agent/packet:pktutil", "//fboss/agent/rib:fib_updater", "//fboss/agent/state:label_forwarding_action", + "//fboss/agent/state:nodebase", "//fboss/agent/state:state", "//fboss/agent/state:state_utils", "//fboss/agent/test:agent_ensemble", From dbb4c777c38264d499c24d81cb5346cd36c9dc72 Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Tue, 29 Oct 2024 12:03:01 -0700 Subject: [PATCH 427/479] Add test thrift handler api for port Summary: Add a test thrift handler api to get port info Differential Revision: D63145729 fbshipit-source-id: f06c58a7fa09235a876046c54fe3b19f3b3b4f41 --- fboss/agent/if/agent_hw_test_ctrl.thrift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fboss/agent/if/agent_hw_test_ctrl.thrift b/fboss/agent/if/agent_hw_test_ctrl.thrift index e93944431f17a..34b9f3be9b5ed 100644 --- a/fboss/agent/if/agent_hw_test_ctrl.thrift +++ b/fboss/agent/if/agent_hw_test_ctrl.thrift @@ -31,6 +31,10 @@ struct RouteInfo { 5: optional i32 classId; } +struct PortInfo { + 1: i32 loopbackMode; +} + service AgentHwTestCtrl { // acl utils begin i32 getDefaultAclTableNumAclEntries(); @@ -86,4 +90,7 @@ service AgentHwTestCtrl { 1: ctrl.IpPrefix prefix, 2: Address.BinaryAddress address, ); + + // port utils + list getPortInfo(1: list portIds); } From e57b6ac6e106e4081cbcf03eeef9c3331acd994e Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Tue, 29 Oct 2024 12:03:01 -0700 Subject: [PATCH 428/479] Add handler for port util thrift api Summary: Addign handler for the api Differential Revision: D63156830 fbshipit-source-id: 150321bd128f9cd57c3a9f6ccea8142b613929ad --- fboss/agent/hw/bcm/tests/BUCK | 3 ++ .../tests/HwTestPortUtilsThriftHandler.cpp | 22 ++++++++++++++ .../hw_test/HwTestPortUtilsThriftHandler.cpp | 30 +++++++++++++++++++ fboss/agent/hw/test/HwTestThriftHandler.h | 4 +++ 4 files changed, 59 insertions(+) diff --git a/fboss/agent/hw/bcm/tests/BUCK b/fboss/agent/hw/bcm/tests/BUCK index 5c738d5d5b33d..ebc160a2040c3 100644 --- a/fboss/agent/hw/bcm/tests/BUCK +++ b/fboss/agent/hw/bcm/tests/BUCK @@ -629,4 +629,7 @@ cpp_library( "//fboss/agent/hw/test:hw_test_thrift_handler_h", "//fboss/agent/test/utils:acl_test_utils", ], + exported_external_deps = [ + ("broadcom-xgs-robo", None, "xgs_robo"), + ], ) diff --git a/fboss/agent/hw/bcm/tests/HwTestPortUtilsThriftHandler.cpp b/fboss/agent/hw/bcm/tests/HwTestPortUtilsThriftHandler.cpp index 9b6e845223697..17c9718d6cb42 100644 --- a/fboss/agent/hw/bcm/tests/HwTestPortUtilsThriftHandler.cpp +++ b/fboss/agent/hw/bcm/tests/HwTestPortUtilsThriftHandler.cpp @@ -2,6 +2,12 @@ #include "fboss/agent/hw/test/HwTestThriftHandler.h" +#include "fboss/agent/hw/bcm/BcmError.h" + +extern "C" { +#include +} + namespace facebook { namespace fboss { namespace utility { @@ -12,6 +18,22 @@ void HwTestThriftHandler::injectFecError( // not implemented in bcm return; } + +void HwTestThriftHandler::getPortInfo( + ::std::vector<::facebook::fboss::utility::PortInfo>& portInfos, + std::unique_ptr<::std::vector<::std::int32_t>> portIds) { + for (const auto& portId : *portIds) { + PortInfo portInfo; + int loopbackMode; + auto rv = bcm_port_loopback_get( + 0, static_cast(portId), &loopbackMode); + bcmCheckError(rv, "Failed to get loopback mode for port:", portId); + portInfo.loopbackMode() = loopbackMode; + portInfos.push_back(portInfo); + } + return; +} + } // namespace utility } // namespace fboss } // namespace facebook diff --git a/fboss/agent/hw/sai/hw_test/HwTestPortUtilsThriftHandler.cpp b/fboss/agent/hw/sai/hw_test/HwTestPortUtilsThriftHandler.cpp index 272b721ed24ac..f6e5e629a5227 100644 --- a/fboss/agent/hw/sai/hw_test/HwTestPortUtilsThriftHandler.cpp +++ b/fboss/agent/hw/sai/hw_test/HwTestPortUtilsThriftHandler.cpp @@ -11,6 +11,15 @@ namespace facebook { namespace fboss { namespace utility { +namespace { +SaiPortTraits::AdapterKey getPortAdapterKey(const HwSwitch* hw, PortID port) { + auto saiSwitch = static_cast(hw); + auto handle = saiSwitch->managerTable()->portManager().getPortHandle(port); + CHECK(handle); + return handle->port->adapterKey(); +} +} // namespace + void HwTestThriftHandler::injectFecError( std::unique_ptr> hwPorts, bool injectCorrectable) { @@ -62,6 +71,27 @@ void HwTestThriftHandler::injectFecError( std::make_unique(clientInfo)); } +void HwTestThriftHandler::getPortInfo( + ::std::vector<::facebook::fboss::utility::PortInfo>& portInfos, + std::unique_ptr<::std::vector<::std::int32_t>> portIds) { + for (const auto& portId : *portIds) { + PortInfo portInfo; + auto key = getPortAdapterKey(hwSwitch_, PortID(portId)); +#if SAI_API_VERSION >= SAI_VERSION(1, 12, 0) + SaiPortTraits::Attributes::PortLoopbackMode loopbackMode; + SaiApiTable::getInstance()->portApi().getAttribute(key, loopbackMode); + portInfo.loopbackMode() = loopbackMode.value(); +#else + SaiPortTraits::Attributes::InternalLoopbackMode internalLoopbackMode; + SaiApiTable::getInstance()->portApi().getAttribute( + key, internalLoopbackMode); + portInfo.loopbackMode() = internalLoopbackMode.value(); +#endif + portInfos.push_back(portInfo); + } + return; +} + } // namespace utility } // namespace fboss } // namespace facebook diff --git a/fboss/agent/hw/test/HwTestThriftHandler.h b/fboss/agent/hw/test/HwTestThriftHandler.h index 5c9814b07d736..edadf71e96e9a 100644 --- a/fboss/agent/hw/test/HwTestThriftHandler.h +++ b/fboss/agent/hw/test/HwTestThriftHandler.h @@ -90,6 +90,10 @@ class HwTestThriftHandler : public AgentHwTestCtrlSvIf { std::unique_ptr prefix, std::unique_ptr nexthop) override; + void getPortInfo( + ::std::vector<::facebook::fboss::utility::PortInfo>& portInfos, + std::unique_ptr<::std::vector<::std::int32_t>> portIds) override; + private: HwSwitch* hwSwitch_; }; From 21dec0e52ceb5a0fd1e05ea0cbafe0dbc8309f2e Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Tue, 29 Oct 2024 12:03:01 -0700 Subject: [PATCH 429/479] Migrate HwPortTest to AgentTest Summary: Migarate port test to agent hw test Reviewed By: maxwindiff Differential Revision: D63298845 fbshipit-source-id: f53e4e726a22e5ce75a21d95b8b6ba12f64ad594 --- cmake/AgentTestAgentHwTests.cmake | 1 + .../tests/HwTestPortUtilsThriftHandler.cpp | 23 ++++++- .../test/agent_hw_tests/AgentPortTests.cpp | 67 +++++++++++++++++++ fboss/agent/test/agent_hw_tests/BUCK | 1 + 4 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 fboss/agent/test/agent_hw_tests/AgentPortTests.cpp diff --git a/cmake/AgentTestAgentHwTests.cmake b/cmake/AgentTestAgentHwTests.cmake index 9ab4449dfb455..6ba78b67b1341 100644 --- a/cmake/AgentTestAgentHwTests.cmake +++ b/cmake/AgentTestAgentHwTests.cmake @@ -34,6 +34,7 @@ add_library(agent_hw_test_src fboss/agent/test/agent_hw_tests/AgentVoqSwitchInterruptsTests.cpp fboss/agent/test/agent_hw_tests/AgentFabricSwitchTests.cpp fboss/agent/test/agent_hw_tests/AgentPortBandWidthTests.cpp + fboss/agent/test/agent_hw_tests/AgentPortTests.cpp fboss/agent/test/agent_hw_tests/AgentPrbsTests.cpp fboss/agent/test/agent_hw_tests/AgentAclCounterTests.cpp fboss/agent/test/agent_hw_tests/AgentAqmTests.cpp diff --git a/fboss/agent/hw/bcm/tests/HwTestPortUtilsThriftHandler.cpp b/fboss/agent/hw/bcm/tests/HwTestPortUtilsThriftHandler.cpp index 17c9718d6cb42..921c9e2a516bf 100644 --- a/fboss/agent/hw/bcm/tests/HwTestPortUtilsThriftHandler.cpp +++ b/fboss/agent/hw/bcm/tests/HwTestPortUtilsThriftHandler.cpp @@ -8,6 +8,26 @@ extern "C" { #include } +using facebook::fboss::cfg::PortLoopbackMode; + +namespace { +facebook::fboss::cfg::PortLoopbackMode bcmToFbLoopbackMode( + bcm_port_loopback_t inMode) { + switch (inMode) { + case BCM_PORT_LOOPBACK_NONE: + return facebook::fboss::cfg::PortLoopbackMode::NONE; + case BCM_PORT_LOOPBACK_PHY: + return facebook::fboss::cfg::PortLoopbackMode::PHY; + case BCM_PORT_LOOPBACK_MAC: + return facebook::fboss::cfg::PortLoopbackMode::MAC; + default: + CHECK(0) << "Should never reach here"; + break; + } + return facebook::fboss::cfg::PortLoopbackMode::NONE; +} +} // namespace + namespace facebook { namespace fboss { namespace utility { @@ -28,7 +48,8 @@ void HwTestThriftHandler::getPortInfo( auto rv = bcm_port_loopback_get( 0, static_cast(portId), &loopbackMode); bcmCheckError(rv, "Failed to get loopback mode for port:", portId); - portInfo.loopbackMode() = loopbackMode; + portInfo.loopbackMode() = static_cast( + bcmToFbLoopbackMode(static_cast(loopbackMode))); portInfos.push_back(portInfo); } return; diff --git a/fboss/agent/test/agent_hw_tests/AgentPortTests.cpp b/fboss/agent/test/agent_hw_tests/AgentPortTests.cpp new file mode 100644 index 0000000000000..67da68266c520 --- /dev/null +++ b/fboss/agent/test/agent_hw_tests/AgentPortTests.cpp @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#include "fboss/agent/test/AgentHwTest.h" + +#include "fboss/agent/ApplyThriftConfig.h" +#include "fboss/agent/gen-cpp2/switch_config_types.h" +#include "fboss/agent/test/utils/AsicUtils.h" +#include "fboss/agent/test/utils/ConfigUtils.h" + +namespace facebook::fboss { + +class AgentPortTest : public AgentHwTest { + protected: + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { + return utility::onePortPerInterfaceConfig( + ensemble.getSw(), + ensemble.masterLogicalPortIds(), + true /*interfaceHasSubnet*/); + } + + std::vector + getProductionFeaturesVerified() const override { + return {production_features::ProductionFeature::HW_SWITCH}; + } + + std::vector getPortInfos(std::vector ports) { + auto switchId = getAgentEnsemble() + ->getSw() + ->getScopeResolver() + ->scope(getAgentEnsemble()->masterLogicalPortIds()) + .switchId(); + auto client = getAgentEnsemble()->getHwAgentTestClient(switchId); + std::vector portIds; + for (auto port : ports) { + portIds.push_back(port); + } + std::vector portInfos; + client->sync_getPortInfo(portInfos, std::move(portIds)); + return portInfos; + } +}; + +TEST_F(AgentPortTest, PortLoopbackMode) { + auto setup = [this]() { applyNewConfig(initialConfig(*getAgentEnsemble())); }; + auto verify = [this]() { + auto asic = + utility::checkSameAndGetAsic(this->getAgentEnsemble()->getL3Asics()); + for (const auto& loopbackMode : asic->desiredLoopbackModes()) { + auto portInfos = + getPortInfos({PortID(masterLogicalPortIds({loopbackMode.first})[0])}); + EXPECT_EQ( + *portInfos[0].loopbackMode(), static_cast(loopbackMode.second)); + } + }; + + verifyAcrossWarmBoots(setup, verify); +} + +} // namespace facebook::fboss diff --git a/fboss/agent/test/agent_hw_tests/BUCK b/fboss/agent/test/agent_hw_tests/BUCK index 73daff6b30f3f..86aee3514d36c 100644 --- a/fboss/agent/test/agent_hw_tests/BUCK +++ b/fboss/agent/test/agent_hw_tests/BUCK @@ -46,6 +46,7 @@ cpp_library( "AgentPacketSendTests.cpp", "AgentPfcTests.cpp", "AgentPortBandWidthTests.cpp", + "AgentPortTests.cpp", "AgentPrbsTests.cpp", "AgentQueuePerHostL2Tests.cpp", "AgentQueuePerHostRouteTests.cpp", From c11833afecc58fe508560436350dc8f686dd16e1 Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Tue, 29 Oct 2024 12:03:01 -0700 Subject: [PATCH 430/479] Retire HwPortTests Summary: Retiring the old test Reviewed By: shri-khare Differential Revision: D63428368 fbshipit-source-id: 26ad3ddc3dba379f49fa55fa40511e77851dea3f --- cmake/AgentHwTest.cmake | 1 - fboss/agent/hw/test/BUCK | 1 - fboss/agent/hw/test/HwPortTests.cpp | 61 ----------------------------- 3 files changed, 63 deletions(-) delete mode 100644 fboss/agent/hw/test/HwPortTests.cpp diff --git a/cmake/AgentHwTest.cmake b/cmake/AgentHwTest.cmake index d767d6890804d..687bd2d5101ca 100644 --- a/cmake/AgentHwTest.cmake +++ b/cmake/AgentHwTest.cmake @@ -212,7 +212,6 @@ set(hw_switch_test_srcs fboss/agent/hw/test/HwVlanTests.cpp fboss/agent/hw/test/HwVerifyPfcConfigInHwTest.cpp fboss/agent/hw/test/HwAclStatTests.cpp - fboss/agent/hw/test/HwPortTests.cpp fboss/agent/hw/test/HwPortLedTests.cpp fboss/agent/hw/test/HwPortProfileTests.cpp fboss/agent/hw/test/HwPortStressTests.cpp diff --git a/fboss/agent/hw/test/BUCK b/fboss/agent/hw/test/BUCK index 82a99ab4f505f..8fa7bd3181069 100644 --- a/fboss/agent/hw/test/BUCK +++ b/fboss/agent/hw/test/BUCK @@ -321,7 +321,6 @@ hw_test_common_srcs = [ "HwVerifyPfcConfigInHwTest.cpp", "HwIngressBufferTests.cpp", "HwAclStatTests.cpp", - "HwPortTests.cpp", "HwTestFabricUtils.cpp", "HwFlexPortTests.cpp", "HwEcmpTrunkTests.cpp", diff --git a/fboss/agent/hw/test/HwPortTests.cpp b/fboss/agent/hw/test/HwPortTests.cpp deleted file mode 100644 index d97566ae69ad6..0000000000000 --- a/fboss/agent/hw/test/HwPortTests.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2004-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ -#include "fboss/agent/hw/test/HwTest.h" - -#include -#include "fboss/agent/ApplyThriftConfig.h" -#include "fboss/agent/FbossError.h" -#include "fboss/agent/gen-cpp2/switch_config_types.h" -#include "fboss/agent/hw/CounterUtils.h" -#include "fboss/agent/hw/test/HwPortUtils.h" -#include "fboss/agent/hw/test/HwTestPortUtils.h" -#include "fboss/agent/state/StateDelta.h" -#include "fboss/agent/state/SwitchState.h" - -#include "fboss/agent/hw/test/ConfigFactory.h" - -#include - -namespace facebook::fboss { - -class HwPortTest : public HwTest { - protected: - cfg::SwitchConfig initialConfig() const { - return utility::onePortPerInterfaceConfig( - getHwSwitch(), - masterLogicalPortIds(), - getAsic()->desiredLoopbackModes(), - false /*interfaceHasSubnet*/, - false, /*setInterfaceMac*/ - utility::kBaseVlanId, - true); - } - - private: - bool hideFabricPorts() const override { - return false; - } -}; - -TEST_F(HwPortTest, PortLoopbackMode) { - auto setup = [this]() { applyNewConfig(initialConfig()); }; - auto verify = [this]() { - for (const auto& loopbackMode : getAsic()->desiredLoopbackModes()) { - std::map port2LoopbackMode = { - {PortID(masterLogicalPortIds({loopbackMode.first})[0]), - utility::getLoopbackMode(loopbackMode.second)}}; - utility::assertPortsLoopbackMode(getHwSwitch(), port2LoopbackMode); - } - }; - - verifyAcrossWarmBoots(setup, verify); -} - -} // namespace facebook::fboss From 111f3b5c6400ee6a031a3f80ad283bf8d3defc4a Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 29 Oct 2024 12:11:59 -0700 Subject: [PATCH 431/479] API to compute inband port sys port ID Summary: Working towards getting rid of the assumption that inband port ID is always 1. This assumption will not hold in 2-stage DSF Reviewed By: srikrishnagopu Differential Revision: D65153044 fbshipit-source-id: 6f510f27771163a529caf37d0260b8c2730d7bc9 --- fboss/agent/Utils.cpp | 22 ++++++++++++++++++++++ fboss/agent/Utils.h | 4 ++++ 2 files changed, 26 insertions(+) diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 62f55023435f6..8c5fbfce3bbc9 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -422,6 +422,28 @@ SystemPortID getSystemPortID( switchId); } +SystemPortID getInbandSystemPortID( + const std::shared_ptr& state, + SwitchID switchId) { + const auto& switchId2Info = state->getSwitchSettings() + ->getSwitchSettings(HwSwitchMatcher( + std::unordered_set({switchId}))) + ->getSwitchIdToSwitchInfo(); + auto switchInfoItr = switchId2Info.find(switchId); + if (switchInfoItr == switchId2Info.end()) { + throw FbossError("Unable to lookup switch info for : ", switchId); + } + if (!switchInfoItr->second.inbandPortId().has_value()) { + throw FbossError("Inband port id not set for: ", switchId); + } + return getSystemPortID( + PortID(*switchInfoItr->second.inbandPortId()), + // Inband port scope is always global + cfg::Scope::GLOBAL, + switchId2Info, + switchId); +} + cfg::Range64 getFirstSwitchSystemPortIdRange( const std::map& switchToSwitchInfo) { for (const auto& [switchId, switchInfo] : switchToSwitchInfo) { diff --git a/fboss/agent/Utils.h b/fboss/agent/Utils.h index a25ec26887a19..0a7d6756ed3d3 100644 --- a/fboss/agent/Utils.h +++ b/fboss/agent/Utils.h @@ -261,6 +261,10 @@ SystemPortID getSystemPortID( const std::shared_ptr& state, SwitchID switchId); +SystemPortID getInbandSystemPortID( + const std::shared_ptr& state, + SwitchID switchId); + cfg::Range64 getFirstSwitchSystemPortIdRange( const std::map& switchToSwitchInfo); From 8412fb18c2fa2bde144391a84c22dd01e0866db8 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 29 Oct 2024 12:11:59 -0700 Subject: [PATCH 432/479] Use newly added getInbandSystemPortID api to get inband sys port id Summary: - Don't assume its always 1 of from the base - Fix inband rcy port id and rif id in thrift out put Reviewed By: srikrishnagopu Differential Revision: D65121789 fbshipit-source-id: 650155abc7588d321e607fedb624313074df8543 --- fboss/agent/ThriftHandler.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/fboss/agent/ThriftHandler.cpp b/fboss/agent/ThriftHandler.cpp index 479d68af3c37c..193e83b510884 100644 --- a/fboss/agent/ThriftHandler.cpp +++ b/fboss/agent/ThriftHandler.cpp @@ -660,11 +660,13 @@ void addRecylePortRifNeighbors( continue; } auto switchId = SwitchID(switchIdAndInfo.first); + auto inbandSysPortId = getInbandSystemPortID(state, switchId); auto dsfNode = state->getDsfNodes()->getNodeIf(switchId); - CHECK(dsfNode); - constexpr auto kRecyclePortId = 1; + if (!dsfNode || !dsfNode->getInbandPortId().has_value()) { + throw FbossError("Unable to lookup inband port for : ", switchId); + } auto localRecycleRifId = - InterfaceID(*dsfNode->getSystemPortRange()->minimum() + kRecyclePortId); + InterfaceID(static_cast(inbandSysPortId)); const auto& localRecycleRif = state->getInterfaces()->getNode(localRecycleRifId); const auto& nbrTable = @@ -674,13 +676,13 @@ void addRecylePortRifNeighbors( NeighborThriftT nbrThrift; nbrThrift.ip() = facebook::network::toBinaryAddress(entry->getIP()); nbrThrift.mac() = entry->getMac().toString(); - nbrThrift.port() = kRecyclePortId; - nbrThrift.portDescriptor()->portId() = kRecyclePortId; + nbrThrift.port() = dsfNode->getInbandPortId().value(); + nbrThrift.portDescriptor()->portId() = dsfNode->getInbandPortId().value(); nbrThrift.portDescriptor()->portType() = cfg::PortDescriptorType::Physical; nbrThrift.vlanName() = "--"; - nbrThrift.interfaceID() = kRecyclePortId; + nbrThrift.interfaceID() = static_cast(localRecycleRifId); // Local recycle port for RIF, should always be STATIC CHECK(entry->getType() == state::NeighborEntryType::STATIC_ENTRY); nbrThrift.state() = "STATIC"; From 2f75d1fb45f143ab72b46f941d60b830aa45a1d7 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 29 Oct 2024 12:11:59 -0700 Subject: [PATCH 433/479] Remove gratuituous comparison for dsfNode systemPortRange change Summary: We already have this information in switchIdToSwitchInfo map, and are looking for changes to that in config. No longer to look at (deprecated) system port range in dsf node struct. Reviewed By: zechengh09 Differential Revision: D65151431 fbshipit-source-id: 65e6c75fd189458fecc45e25938320661a0e8584 --- fboss/agent/ApplyThriftConfig.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index f182e194057ca..31a0edeaa8437 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -4588,24 +4588,6 @@ shared_ptr ThriftConfigApplier::updateSwitchSettings( *cfg_->switchSettings()->exactMatchTableConfigs()); switchSettingsChange = true; } - for (auto& switchId : newSwitchSettings->getSwitchIds()) { - if (newSwitchSettings->getSwitchType(static_cast(switchId)) == - cfg::SwitchType::VOQ) { - auto dsfItr = *cfg_->dsfNodes()->find(static_cast(switchId)); - if (dsfItr == *cfg_->dsfNodes()->end()) { - throw FbossError( - "Missing dsf config for switch id: ", - static_cast(switchId)); - } - auto localNode = dsfItr.second; - CHECK(localNode.systemPortRange().has_value()); - auto origLocalNode = orig_->getDsfNodes()->getNodeIf(switchId); - if (!origLocalNode || - origLocalNode->getSystemPortRange() != *localNode.systemPortRange()) { - switchSettingsChange = true; - } - } - } VlanID defaultVlan(*cfg_->defaultVlan()); if (orig_->getDefaultVlan() != defaultVlan) { From 16bf5be202cc58fc8fe3a588331678ae33069a8f Mon Sep 17 00:00:00 2001 From: Harshit Gulati Date: Tue, 29 Oct 2024 12:44:56 -0700 Subject: [PATCH 434/479] Retry firmware upgrade up to 3 times Summary: Some modules fail the first step of firmware upgrade on the first try, but the subsequent tries work fine. While we debug this with the vendors, adding a retry mechanism so that we don't fail to upgrade the firmwares during the maintenance window Reviewed By: xanabani Differential Revision: D65027375 Privacy Context Container: L1125642 fbshipit-source-id: 6c259f55953f78d8acab5c760084f3be65a465ac --- .../qsfp_service/module/FirmwareUpgrader.cpp | 6 +-- fboss/qsfp_service/module/FirmwareUpgrader.h | 4 +- fboss/qsfp_service/module/QsfpModule.cpp | 39 ++++++++++++++----- fboss/qsfp_service/module/QsfpModule.h | 3 +- fboss/qsfp_service/module/cmis/CmisModule.cpp | 7 ++-- fboss/qsfp_service/module/cmis/CmisModule.h | 3 +- fboss/util/wedge_qsfp_util.cpp | 4 +- 7 files changed, 42 insertions(+), 24 deletions(-) diff --git a/fboss/qsfp_service/module/FirmwareUpgrader.cpp b/fboss/qsfp_service/module/FirmwareUpgrader.cpp index d5f4c40099da4..adf338b6e271f 100644 --- a/fboss/qsfp_service/module/FirmwareUpgrader.cpp +++ b/fboss/qsfp_service/module/FirmwareUpgrader.cpp @@ -44,10 +44,10 @@ constexpr int moduleDatapathInitDurationUsec = 5000000; CmisFirmwareUpgrader::CmisFirmwareUpgrader( TransceiverImpl* bus, unsigned int modId, - std::unique_ptr fbossFirmware) - : bus_(bus), moduleId_(modId), fbossFirmware_(std::move(fbossFirmware)) { + FbossFirmware* fbossFirmware) + : bus_(bus), moduleId_(modId), fbossFirmware_(fbossFirmware) { // Check the FbossFirmware object first - if (fbossFirmware_.get() == nullptr) { + if (fbossFirmware_ == nullptr) { XLOG(ERR) << "FbossFirmware object is null, returning..."; return; } diff --git a/fboss/qsfp_service/module/FirmwareUpgrader.h b/fboss/qsfp_service/module/FirmwareUpgrader.h index 4df1fe2e99d20..707e6e2bcce4c 100644 --- a/fboss/qsfp_service/module/FirmwareUpgrader.h +++ b/fboss/qsfp_service/module/FirmwareUpgrader.h @@ -48,7 +48,7 @@ class CmisFirmwareUpgrader { CmisFirmwareUpgrader( TransceiverImpl* bus, unsigned int modId, - std::unique_ptr fbossFirmware); + FbossFirmware* fbossFirmware); // Function to trigger the firmware download to the QSFP module of CMIS type bool cmisModuleFirmwareUpgrade(); @@ -60,7 +60,7 @@ class CmisFirmwareUpgrader { // module Id for upgrade unsigned int moduleId_; // FbossFirmware object - std::unique_ptr fbossFirmware_; + FbossFirmware* fbossFirmware_; // Firmware image pointer folly::io::Cursor imageCursor_{nullptr}; // Image IO buffer. This contains the entire firmware image file content diff --git a/fboss/qsfp_service/module/QsfpModule.cpp b/fboss/qsfp_service/module/QsfpModule.cpp index 4e0a467d6f2fc..ad3d663b51bd9 100644 --- a/fboss/qsfp_service/module/QsfpModule.cpp +++ b/fboss/qsfp_service/module/QsfpModule.cpp @@ -50,6 +50,8 @@ using std::lock_guard; using std::memcpy; using std::mutex; +static constexpr int kAllowedFwUpgradeAttempts = 3; + namespace facebook { namespace fboss { @@ -173,11 +175,10 @@ bool QsfpModule::upgradeFirmwareLocked( std::vector>& fwList) { QSFP_LOG(INFO, this) << "Upgrading firmware"; - bool fwUpgradeResult = true; - lastFwUpgradeStartTime_ = std::time(nullptr); - { // Start of firmware upgrade - + auto fwUpgradeFn = [this, &fwList]() { + bool fwUpgradeResult = true; + // Start of firmware upgrade // Step 1: Disable TX before upgrading the firmware. This helps keeps the // link down during upgrade and avoid noise try { @@ -211,20 +212,40 @@ bool QsfpModule::upgradeFirmwareLocked( // Step 4: Upgrade Firmware for (auto& fw : fwList) { - fwUpgradeResult &= upgradeFirmwareLockedImpl(std::move(fw)); + fwUpgradeResult &= upgradeFirmwareLockedImpl(fw.get()); } // Trigger a hard reset of the transceiver to kick start the new firmware triggerModuleReset(); - } // End of firmware upgrade + // End of Firmware Upgrade + return fwUpgradeResult; + }; + int upgradeAttempts = 1; + bool finalFwUpgradeResult = false; + while (upgradeAttempts <= kAllowedFwUpgradeAttempts) { + finalFwUpgradeResult = fwUpgradeFn(); + if (!finalFwUpgradeResult && upgradeAttempts < kAllowedFwUpgradeAttempts) { + // Sleep 5 seconds so that the module recovers after it is reset + // @lint-ignore CLANGTIDY facebook-hte-BadCall-sleep + sleep(5); + // Refresh the cache to get the latest state of the module after the + // module was reset after a failed FW upgrade + updateQsfpData(true); + upgradeAttempts++; + } else { + break; + } + } lastFwUpgradeEndTime_ = std::time(nullptr); auto elapsedSeconds = lastFwUpgradeEndTime_ - lastFwUpgradeStartTime_; QSFP_LOG(INFO, this) << "Firmware upgrade completed " - << (fwUpgradeResult ? "successfully" : "unsuccessfully") - << " in " << elapsedSeconds << " seconds. "; - return fwUpgradeResult; + << (finalFwUpgradeResult ? "successfully" + : "unsuccessfully") + << " in " << elapsedSeconds + << " seconds, attempts = " << upgradeAttempts; + return finalFwUpgradeResult; } void QsfpModule::triggerModuleReset() { diff --git a/fboss/qsfp_service/module/QsfpModule.h b/fboss/qsfp_service/module/QsfpModule.h index e99235942e1f9..c5dea02d5dbf6 100644 --- a/fboss/qsfp_service/module/QsfpModule.h +++ b/fboss/qsfp_service/module/QsfpModule.h @@ -654,8 +654,7 @@ class QsfpModule : public Transceiver { bool shouldRemediateLocked(time_t pauseRemidiation) override; - virtual bool upgradeFirmwareLockedImpl( - std::unique_ptr /* fbossFw */) const { + virtual bool upgradeFirmwareLockedImpl(FbossFirmware* /* fbossFw */) const { return false; } diff --git a/fboss/qsfp_service/module/cmis/CmisModule.cpp b/fboss/qsfp_service/module/cmis/CmisModule.cpp index f2daa75b915d5..a015d5edc2a72 100644 --- a/fboss/qsfp_service/module/cmis/CmisModule.cpp +++ b/fboss/qsfp_service/module/cmis/CmisModule.cpp @@ -4007,12 +4007,11 @@ bool CmisModule::setTransceiverTxImplLocked( return true; } -bool CmisModule::upgradeFirmwareLockedImpl( - std::unique_ptr fbossFw) const { +bool CmisModule::upgradeFirmwareLockedImpl(FbossFirmware* fbossFw) const { QSFP_LOG(INFO, this) << "Upgrading CMIS Module Firmware"; - auto fwUpgradeObj = std::make_unique( - qsfpImpl_, getID(), std::move(fbossFw)); + auto fwUpgradeObj = + std::make_unique(qsfpImpl_, getID(), fbossFw); bool ret = fwUpgradeObj->cmisModuleFirmwareUpgrade(); return ret; diff --git a/fboss/qsfp_service/module/cmis/CmisModule.h b/fboss/qsfp_service/module/cmis/CmisModule.h index 57459c6e82cf6..2f14ffd31e6b0 100644 --- a/fboss/qsfp_service/module/cmis/CmisModule.h +++ b/fboss/qsfp_service/module/cmis/CmisModule.h @@ -561,8 +561,7 @@ class CmisModule : public QsfpModule { uint8_t lane, bool readFromCache = true); - bool upgradeFirmwareLockedImpl( - std::unique_ptr fbossFw) const override; + bool upgradeFirmwareLockedImpl(FbossFirmware* fbossFw) const override; void readFromCacheOrHw( CmisField field, diff --git a/fboss/util/wedge_qsfp_util.cpp b/fboss/util/wedge_qsfp_util.cpp index ad43af8b210ac..768c3dbcc742f 100644 --- a/fboss/util/wedge_qsfp_util.cpp +++ b/fboss/util/wedge_qsfp_util.cpp @@ -2866,7 +2866,7 @@ bool cliModulefirmwareUpgrade( auto qsfpImpl = std::make_unique( port - 1, i2cInfo.bus, i2cInfo.transceiverManager, /*logBuffer*/ nullptr); auto fwUpgradeObj = std::make_unique( - qsfpImpl.get(), port, std::move(fbossFwObj)); + qsfpImpl.get(), port, fbossFwObj.get()); // Do the standalone upgrade in the same process as wedge_qsfp_util bool ret = fwUpgradeObj->cmisModuleFirmwareUpgrade(); @@ -3021,7 +3021,7 @@ void fwUpgradeThreadHandler( i2cInfo.transceiverManager, /*logBuffer*/ nullptr); auto fwUpgradeObj = std::make_unique( - qsfpImpl.get(), module, std::move(fbossFwObj)); + qsfpImpl.get(), module, fbossFwObj.get()); // Do the upgrade in this thread bool ret = fwUpgradeObj->cmisModuleFirmwareUpgrade(); From 1972a175346a8b6cf3fc04111243a0ec08cf00c1 Mon Sep 17 00:00:00 2001 From: Tianyu Du Date: Tue, 29 Oct 2024 14:28:22 -0700 Subject: [PATCH 435/479] add wedge_agent_boot_history.log Summary: Create new log file /var/facebook/fboss/wedge_agent_boot_history.log to save agent booting history. For each boot entry. [Time] warm/cold boot, sdk version, agent version Reviewed By: zechengh09 Differential Revision: D65091701 fbshipit-source-id: 682d2339223ab8048b12cc711b25e646f3c8914c --- fboss/agent/AgentDirectoryUtil.cpp | 4 ++++ fboss/agent/AgentDirectoryUtil.h | 2 ++ fboss/agent/SwSwitch.cpp | 5 ++++ fboss/agent/SwSwitchWarmBootHelper.cpp | 32 ++++++++++++++++++++++++++ fboss/agent/SwSwitchWarmBootHelper.h | 4 ++++ 5 files changed, 47 insertions(+) diff --git a/fboss/agent/AgentDirectoryUtil.cpp b/fboss/agent/AgentDirectoryUtil.cpp index f3afb05172032..41e5e81a0573d 100644 --- a/fboss/agent/AgentDirectoryUtil.cpp +++ b/fboss/agent/AgentDirectoryUtil.cpp @@ -287,4 +287,8 @@ std::string AgentDirectoryUtil::getTestHwAgentConfigFile( return folly::to( agentEnsembleConfigDir(), "hw_agent_test_", switchIndex, ".conf"); } + +std::string AgentDirectoryUtil::getAgentBootHistoryLogFile() const { + return "/var/facebook/logs/fboss/wedge_agent_boot_history.log"; +} } // namespace facebook::fboss diff --git a/fboss/agent/AgentDirectoryUtil.h b/fboss/agent/AgentDirectoryUtil.h index 266373ccfd5a4..7fe2e637565bf 100644 --- a/fboss/agent/AgentDirectoryUtil.h +++ b/fboss/agent/AgentDirectoryUtil.h @@ -189,6 +189,8 @@ class AgentDirectoryUtil { std::string getTestHwAgentConfigFile(int switchIndex) const; + std::string getAgentBootHistoryLogFile() const; + private: const std::string volatileStateDir_; const std::string persistentStateDir_; diff --git a/fboss/agent/SwSwitch.cpp b/fboss/agent/SwSwitch.cpp index c8e1fde8ab7f3..3c884870ec3d3 100644 --- a/fboss/agent/SwSwitch.cpp +++ b/fboss/agent/SwSwitch.cpp @@ -1175,6 +1175,11 @@ std::shared_ptr SwSwitch::preInit(SwitchFlags flags) { << " | SDK version: " << getAsicSdkVersion(sdkVersion_) << " | Agent version: " << getBuildPackageVersion(); + swSwitchWarmbootHelper_->logBoot( + apache::thrift::util::enumNameSafe(bootType_), + getAsicSdkVersion(sdkVersion_), + getBuildPackageVersion()); + multiHwSwitchHandler_->start(); std::optional wbState{}; if (bootType_ == BootType::WARM_BOOT) { diff --git a/fboss/agent/SwSwitchWarmBootHelper.cpp b/fboss/agent/SwSwitchWarmBootHelper.cpp index f3f93841d70ba..6a0691b620603 100644 --- a/fboss/agent/SwSwitchWarmBootHelper.cpp +++ b/fboss/agent/SwSwitchWarmBootHelper.cpp @@ -4,6 +4,7 @@ #include #include +#include #include "fboss/agent/AgentDirectoryUtil.h" #include "fboss/agent/AsyncLogger.h" @@ -155,4 +156,35 @@ SwSwitchWarmBootHelper::reconstructStateAndRib( } return std::make_pair(state, std::move(rib)); } + +void SwSwitchWarmBootHelper::logBoot( + const std::string& bootType, + const std::string& sdkVersion, + const std::string& agentVersion) { + folly::File logFile; + try { + logFile = folly::File( + AgentDirectoryUtil().getAgentBootHistoryLogFile(), + O_RDWR | O_CREAT | O_APPEND); + } catch (const std::system_error&) { + // /var/facebook/logs/fboss/ might not exist for testing switch + XLOG(WARNING) + << "Agent boot history log failed to create under /var/facebook/logs/fboss/, using /tmp/"; + logFile = + folly::File("/tmp/wedge_agent_starts.log", O_RDWR | O_CREAT | O_TRUNC); + } + + auto now = std::chrono::system_clock::now(); + auto timer = std::chrono::system_clock::to_time_t(now); + std::tm tm; + localtime_r(&timer, &tm); + + std::ostringstream oss; + oss << "[ " << std::put_time(&tm, "%Y %B %d %H:%M:%S") + << " ]: " << "Start of a " << bootType << ", " + << "SDK version: " << sdkVersion << ", " + << "Agent version: " << agentVersion << std::endl; + auto ossString = oss.str(); + folly::writeFull(logFile.fd(), ossString.c_str(), ossString.size()); +} } // namespace facebook::fboss diff --git a/fboss/agent/SwSwitchWarmBootHelper.h b/fboss/agent/SwSwitchWarmBootHelper.h index f616fa952ae42..c21cef477b5b4 100644 --- a/fboss/agent/SwSwitchWarmBootHelper.h +++ b/fboss/agent/SwSwitchWarmBootHelper.h @@ -28,6 +28,10 @@ class SwSwitchWarmBootHelper { const std::string& warmBootDir() const { return warmBootDir_; } + void logBoot( + const std::string& bootType, + const std::string& sdkVersion, + const std::string& agentVersion); static std::pair< std::shared_ptr, From 77e3e2ffbefe713a30b0213f637995f62133a44e Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Tue, 29 Oct 2024 16:03:14 -0700 Subject: [PATCH 436/479] Export ODS counter for registered subscriptions Summary: Exporting to ODS counter for number of subscriptions registered with SubscriptionManager for added visibility. Differential Revision: D65067219 fbshipit-source-id: 53785b9f5a769f890d6263688a02865e579e3292 --- fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp | 7 +++++++ fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp index b9ec84bae9e9d..651a7290b98cf 100644 --- a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp +++ b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp @@ -43,6 +43,7 @@ NaivePeriodicSubscribableStorageBase::NaivePeriodicSubscribableStorageBase( trackMetadata_(trackMetadata), convertSubsToIDPaths_(convertToIDPaths), rss_(fmt::format("{}.{}", metricPrefix, kRss)), + registeredSubs_(fmt::format("{}.{}", metricPrefix, kRegisteredSubs)), serveSubMs_(fmt::format("{}.{}", metricPrefix, kServeSubMs)), serveSubNum_(fmt::format("{}.{}", metricPrefix, kServeSubNum)) { if (trackMetadata) { @@ -53,6 +54,9 @@ NaivePeriodicSubscribableStorageBase::NaivePeriodicSubscribableStorageBase( fb303::ThreadCachedServiceData::get()->addStatExportType(rss_, fb303::AVG); + fb303::ThreadCachedServiceData::get()->addStatExportType( + registeredSubs_, fb303::AVG); + // elapsed time to serve each subscription // histogram range [0, 1s], 10ms width (100 bins) fb303::ThreadCachedServiceData::get()->addHistogram(serveSubMs_, 10, 0, 1000); @@ -177,6 +181,9 @@ void NaivePeriodicSubscribableStorageBase::exportServeMetrics( int64_t memUsage = getMemoryUsage(); // RSS fb303::ThreadCachedServiceData::get()->addStatValue( rss_, memUsage, fb303::AVG); + int64_t n_registeredSubs = numSubscriptions(); + fb303::ThreadCachedServiceData::get()->addStatValue( + registeredSubs_, n_registeredSubs, fb303::AVG); auto elapsed = std::chrono::duration_cast( std::chrono::steady_clock::now() - serveStartTime); if (elapsed.count() > 0) { diff --git a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h index e29847ff34841..c10cdbd0b1334 100644 --- a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h +++ b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h @@ -22,6 +22,7 @@ namespace facebook::fboss::fsdb { inline constexpr std::string_view kServeSubMs{"storage.serve_sub_ms"}; inline constexpr std::string_view kServeSubNum{"storage.serve_sub_num"}; inline constexpr std::string_view kRss{"rss"}; +inline constexpr std::string_view kRegisteredSubs{"subscriptions.registered"}; // non-templated parts of NaivePeriodicSubscribableStorage to help with // compilation @@ -191,6 +192,7 @@ class NaivePeriodicSubscribableStorageBase { // metric names const std::string rss_{""}; + const std::string registeredSubs_{""}; const std::string serveSubMs_{""}; const std::string serveSubNum_{""}; From 7b064ef2e4264a08ec9c06fb9a0fe613060e5960 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 29 Oct 2024 17:21:55 -0700 Subject: [PATCH 437/479] Use inband port id and global port offset when calculating inband sys port id Summary: As titled. Note that there is a existing bug in this approach which doesn't factor in how port ids are allocated for multi-asic systems. Reviewed By: zechengh09 Differential Revision: D65175181 fbshipit-source-id: b520f0b6b7b95cb0e02fdba2ea6db163f5127ca3 --- fboss/agent/ApplyThriftConfig.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 31a0edeaa8437..4e516ca2ef951 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -936,9 +936,12 @@ void ThriftConfigApplier::processUpdatedDsfNodes() { auto switchIdToSwitchIndex = computeSwitchIdToSwitchIndex(new_->getDsfNodes()); - auto getRecyclePortId = [](const std::shared_ptr& node) { - CHECK(node->getSystemPortRange().has_value()); - return *node->getSystemPortRange()->minimum() + 1; + auto getInbandSysPortId = [](const std::shared_ptr& node) { + CHECK(node->getInbandPortId().has_value()); + CHECK(node->getGlobalSystemPortOffset().has_value()); + // TODO factor in multi npu nodes where portId range maybe + // different + return *node->getGlobalSystemPortOffset() + *node->getInbandPortId(); }; auto getRecyclePortName = @@ -1006,7 +1009,7 @@ void ThriftConfigApplier::processUpdatedDsfNodes() { }; auto processLoopbacks = [&](const std::shared_ptr& node, const HwAsic* dsfNodeAsic) { - auto recyclePortId = getRecyclePortId(node); + auto recyclePortId = getInbandSysPortId(node); InterfaceID intfID(recyclePortId); auto intfs = isLocal(node) ? new_->getInterfaces()->modify(&new_) : new_->getRemoteInterfaces()->modify(&new_); @@ -1066,7 +1069,7 @@ void ThriftConfigApplier::processUpdatedDsfNodes() { // via local config. So only process need to process loopback IPs here. return; } - auto recyclePortId = getRecyclePortId(node); + auto recyclePortId = getInbandSysPortId(node); auto sysPort = std::make_shared( SystemPortID(recyclePortId), std::make_optional(RemoteSystemPortType::STATIC_ENTRY)); @@ -1114,7 +1117,7 @@ void ThriftConfigApplier::processUpdatedDsfNodes() { return; } if (!isLocal(node)) { - auto recyclePortId = getRecyclePortId(node); + auto recyclePortId = getInbandSysPortId(node); auto sysPorts = new_->getRemoteSystemPorts()->modify(&new_); sysPorts->removeNode(SystemPortID(recyclePortId)); auto intfs = new_->getRemoteInterfaces()->modify(&new_); From 095923e62e248bf8e6431d0b12c9785c91f4cdbd Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 29 Oct 2024 19:40:45 -0700 Subject: [PATCH 438/479] Don't use SystemPortRange from dsfNode when constructing HwAsic Summary: As titled. We are in the process of removing this from dsf node completely and move to a vector of ranges Reviewed By: shri-khare, srikrishnagopu Differential Revision: D65181906 fbshipit-source-id: f4d0349a8c2f94601685e14be0eaeb64106ca891 --- fboss/agent/ApplyThriftConfig.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 4e516ca2ef951..7409550b00dfb 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -998,12 +998,14 @@ void ThriftConfigApplier::processUpdatedDsfNodes() { CHECK(isInterfaceNode(node)) << " Only expect to be called for Interface nodes"; auto mac = node->getMac() ? *node->getMac() : folly::MacAddress(); + CHECK(!node->getSystemPortRanges().systemPortRanges()->empty()); return HwAsic::makeAsic( node->getAsicType(), cfg::SwitchType::VOQ, static_cast(node->getSwitchId()), 0, /* dummy switchIndex*/ - node->getSystemPortRange(), + // TODO - get rid of system port range in HwAsic + *node->getSystemPortRanges().systemPortRanges()->begin(), mac, std::nullopt); }; From eedf50e2a97cb5c6460c13a686ee35d1618c86f5 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Tue, 29 Oct 2024 19:40:45 -0700 Subject: [PATCH 439/479] Remove DsfNode::getSystemPortRange API Summary: As titled. This field is to be deprecated in favor of a vector of SystemPortRanges Reviewed By: shri-khare, zechengh09 Differential Revision: D65182414 fbshipit-source-id: beb193104c20414b6f57d04a4e203597930a970c --- fboss/agent/state/DsfNode.cpp | 8 -------- fboss/agent/state/DsfNode.h | 3 --- 2 files changed, 11 deletions(-) diff --git a/fboss/agent/state/DsfNode.cpp b/fboss/agent/state/DsfNode.cpp index 06fcf4f6e8944..f5de3e7c372b6 100644 --- a/fboss/agent/state/DsfNode.cpp +++ b/fboss/agent/state/DsfNode.cpp @@ -67,14 +67,6 @@ void DsfNode::setLoopbackIps(const std::vector& loopbackIps) { set(loopbackIps); } -std::optional DsfNode::getSystemPortRange() const { - std::optional sysPortRange; - if (get()) { - sysPortRange = get()->toThrift(); - } - return sysPortRange; -} - cfg::SystemPortRanges DsfNode::getSystemPortRanges() const { auto ranges = get()->toThrift(); return ranges; diff --git a/fboss/agent/state/DsfNode.h b/fboss/agent/state/DsfNode.h index c546245cab3cf..e8dc7ecce0fa1 100644 --- a/fboss/agent/state/DsfNode.h +++ b/fboss/agent/state/DsfNode.h @@ -38,9 +38,6 @@ class DsfNode : public ThriftStructNode { } std::set getLoopbackIpsSorted() const; void setLoopbackIps(const std::vector& loopbackIps); - // TODO - deprecate getSystemPortRange in favor of - // getSystemPortRanges - std::optional getSystemPortRange() const; cfg::SystemPortRanges getSystemPortRanges() const; std::optional getMac() const; PlatformType getPlatformType() const; From e18d4e402b460506d74f2b077f48fba577b8eedf Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 30 Oct 2024 00:53:52 -0700 Subject: [PATCH 440/479] Have VoqUtils look at sys port ranges rather than sys port range Summary: As titled Reviewed By: zechengh09 Differential Revision: D65184949 Privacy Context Container: L1125642 fbshipit-source-id: cc963b940050b84da426da83e67b51a73bbf0326 --- fboss/agent/test/utils/VoqTestUtils.cpp | 77 +++++++++++++------------ 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/fboss/agent/test/utils/VoqTestUtils.cpp b/fboss/agent/test/utils/VoqTestUtils.cpp index 6da8747320131..e97bed74d983c 100644 --- a/fboss/agent/test/utils/VoqTestUtils.cpp +++ b/fboss/agent/test/utils/VoqTestUtils.cpp @@ -181,46 +181,49 @@ void populateRemoteIntfAndSysPorts( std::shared_ptr remoteSysPorts = std::make_shared(); std::shared_ptr remoteRifs = std::make_shared(); - CHECK(dsfNode.systemPortRange().has_value()); - const auto minPortID = *dsfNode.systemPortRange()->minimum(); - const auto maxPortID = *dsfNode.systemPortRange()->maximum(); - // 0th port for CPU and 1st port for recycle port - for (int i = minPortID + kRemoteSysPortOffset; i <= maxPortID; i++) { - const SystemPortID remoteSysPortId(i); - const InterfaceID remoteIntfId(i); - const PortDescriptor portDesc(remoteSysPortId); - const std::optional encapEndx = - useEncapIndex ? std::optional(0x200001 + i) : std::nullopt; + CHECK(!dsfNode.systemPortRanges()->systemPortRanges()->empty()); + for (auto sysPortRange : *dsfNode.systemPortRanges()->systemPortRanges()) { + const auto minPortID = *sysPortRange.minimum(); + const auto maxPortID = *sysPortRange.maximum(); + // 0th port for CPU and 1st port for recycle port + for (int i = minPortID + kRemoteSysPortOffset; i <= maxPortID; i++) { + const SystemPortID remoteSysPortId(i); + const InterfaceID remoteIntfId(i); + const PortDescriptor portDesc(remoteSysPortId); + const std::optional encapEndx = useEncapIndex + ? std::optional(0x200001 + i) + : std::nullopt; - // Use subnet 100+(dsfNodeId/256):(dsfNodeId%256):(localIntfId)::1/64 - // and 100+(dsfNodeId/256).(dsfNodeId%256).(localIntfId).1/24 - auto firstOctet = 100 + remoteSwitchId / 256; - auto secondOctet = remoteSwitchId % 256; - auto thirdOctet = i - minPortID; - folly::IPAddressV6 neighborIp(folly::to( - firstOctet, ":", secondOctet, ":", thirdOctet, "::2")); - auto remoteSysPort = makeRemoteSysPort( - remoteSysPortId, - SwitchID(remoteSwitchId), - (i - minPortID - kRemoteSysPortOffset) / kNumPortPerCore, - (i - minPortID) % kNumPortPerCore, - static_cast(cfg::PortSpeed::FOURHUNDREDG)); - remoteSysPorts->addSystemPort(remoteSysPort); + // Use subnet 100+(dsfNodeId/256):(dsfNodeId%256):(localIntfId)::1/64 + // and 100+(dsfNodeId/256).(dsfNodeId%256).(localIntfId).1/24 + auto firstOctet = 100 + remoteSwitchId / 256; + auto secondOctet = remoteSwitchId % 256; + auto thirdOctet = i - minPortID; + folly::IPAddressV6 neighborIp(folly::to( + firstOctet, ":", secondOctet, ":", thirdOctet, "::2")); + auto remoteSysPort = makeRemoteSysPort( + remoteSysPortId, + SwitchID(remoteSwitchId), + (i - minPortID - kRemoteSysPortOffset) / kNumPortPerCore, + (i - minPortID) % kNumPortPerCore, + static_cast(cfg::PortSpeed::FOURHUNDREDG)); + remoteSysPorts->addSystemPort(remoteSysPort); - auto remoteRif = makeRemoteInterface( - remoteIntfId, - { - {folly::IPAddress(folly::to( - firstOctet, ":", secondOctet, ":", thirdOctet, "::1")), - 64}, - {folly::IPAddress(folly::to( - firstOctet, ".", secondOctet, ".", thirdOctet, ".1")), - 24}, - }); + auto remoteRif = makeRemoteInterface( + remoteIntfId, + { + {folly::IPAddress(folly::to( + firstOctet, ":", secondOctet, ":", thirdOctet, "::1")), + 64}, + {folly::IPAddress(folly::to( + firstOctet, ".", secondOctet, ".", thirdOctet, ".1")), + 24}, + }); - updateRemoteIntfWithNeighbor( - remoteRif, remoteIntfId, portDesc, neighborIp, encapEndx); - remoteRifs->addNode(remoteRif); + updateRemoteIntfWithNeighbor( + remoteRif, remoteIntfId, portDesc, neighborIp, encapEndx); + remoteRifs->addNode(remoteRif); + } } switchId2SystemPorts[SwitchID(remoteSwitchId)] = remoteSysPorts; switchId2Rifs[SwitchID(remoteSwitchId)] = remoteRifs; From fad66402718288732c6edea090c1c6d5e024d328 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 30 Oct 2024 00:53:52 -0700 Subject: [PATCH 441/479] Fix egress forwarding drops test Summary: SAI fixed to look at port MTU and not RIF MTU for J3AI devices. Fix the test accordingly. Reviewed By: zechengh09 Differential Revision: D65185858 fbshipit-source-id: 43262202278164d514204c7e059166ab6bf29003 --- .../AgentEgressForwardingDiscardCounterTests.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentEgressForwardingDiscardCounterTests.cpp b/fboss/agent/test/agent_hw_tests/AgentEgressForwardingDiscardCounterTests.cpp index f7e2e2acb043f..1eb29278e4b72 100644 --- a/fboss/agent/test/agent_hw_tests/AgentEgressForwardingDiscardCounterTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentEgressForwardingDiscardCounterTests.cpp @@ -18,16 +18,9 @@ class AgentEgressForwardingDiscardsCounterTest : public AgentHwTest { const AgentEnsemble& ensemble) const override { auto cfg = AgentHwTest::initialConfig(ensemble); auto firstPortId = ensemble.masterLogicalInterfacePortIds()[0]; - auto firstPortSwitchId = - ensemble.scopeResolver().scope(firstPortId).switchId(); - auto sysPortRange = - cfg.dsfNodes()->find(firstPortSwitchId)->second.systemPortRange(); - CHECK(sysPortRange.has_value()); - auto firstPortRifId = - *sysPortRange->minimum() + static_cast(firstPortId); - for (auto& intf : *cfg.interfaces()) { - if (intf.intfID() == firstPortRifId) { - intf.mtu() = 1500; + for (auto& port : *cfg.ports()) { + if (PortID(*port.logicalID()) == firstPortId) { + port.maxFrameSize() = 1500; } } return cfg; From c6893837aae523a177b5392c308a8c9243b30f5a Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 30 Oct 2024 00:53:52 -0700 Subject: [PATCH 442/479] Use systemPortRanges and not systemPortRange in DsfConfigUtils Summary: As titled Reviewed By: zechengh09 Differential Revision: D65186476 fbshipit-source-id: 280ef2db1978e45149506c9a8b21a1957119e9c4 --- fboss/agent/test/utils/DsfConfigUtils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fboss/agent/test/utils/DsfConfigUtils.cpp b/fboss/agent/test/utils/DsfConfigUtils.cpp index ce8d59a20fb95..7793cdd031dfc 100644 --- a/fboss/agent/test/utils/DsfConfigUtils.cpp +++ b/fboss/agent/test/utils/DsfConfigUtils.cpp @@ -44,14 +44,14 @@ std::optional> addRemoteIntfNodeCfg( CHECK(!curDsfNodes.empty()); auto dsfNodes = curDsfNodes; const auto& firstDsfNode = dsfNodes.begin()->second; - CHECK(firstDsfNode.systemPortRange().has_value()); + CHECK(!firstDsfNode.systemPortRanges()->systemPortRanges()->empty()); CHECK(firstDsfNode.nodeMac().has_value()); auto asic = HwAsic::makeAsic( *firstDsfNode.asicType(), cfg::SwitchType::VOQ, *firstDsfNode.switchId(), 0, - *firstDsfNode.systemPortRange(), + *firstDsfNode.systemPortRanges()->systemPortRanges()->begin(), folly::MacAddress(*firstDsfNode.nodeMac()), std::nullopt); int numCores = asic->getNumCores(); From 57ddd8f98893979e9ce49b0ac895712a06f58cb6 Mon Sep 17 00:00:00 2001 From: Satish Kumar Date: Wed, 30 Oct 2024 09:00:34 -0700 Subject: [PATCH 443/479] Add/Fix copyright headers Summary: Fix issues discovered by OpenSource Automated Checkup tool. Reviewed By: islamismailov Differential Revision: D65210876 fbshipit-source-id: 4756d824ea3a45bc809a0d7f8d4f8bc3ce50e0a4 --- build/buck2/install_deps/install_deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/buck2/install_deps/install_deps.sh b/build/buck2/install_deps/install_deps.sh index 0692368d560fb..b715acc025c27 100755 --- a/build/buck2/install_deps/install_deps.sh +++ b/build/buck2/install_deps/install_deps.sh @@ -1,5 +1,5 @@ #!/bin/sh -# (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +# Copyright (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. if [ -z "$INSTALL_COMMAND" ]; then if [ -f /etc/os-release ]; then From 4fc8328e40ae926e7ac6f3f0cbd7b56bb808db09 Mon Sep 17 00:00:00 2001 From: genkzgnluxbjeyb Date: Wed, 30 Oct 2024 09:21:13 -0700 Subject: [PATCH 444/479] fboss_qsfp_unsupported_tests_sync Differential Revision: D65205661 fbshipit-source-id: d734329b809fde8f18d7a40aaadd3f525b8765cb --- ...s_qsfp_unsupported_tests.materialized_JSON | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/fboss/oss/qsfp_unsupported_tests/fboss_qsfp_unsupported_tests.materialized_JSON b/fboss/oss/qsfp_unsupported_tests/fboss_qsfp_unsupported_tests.materialized_JSON index 81d7cfe2026dd..0ea44a616b8b1 100644 --- a/fboss/oss/qsfp_unsupported_tests/fboss_qsfp_unsupported_tests.materialized_JSON +++ b/fboss/oss/qsfp_unsupported_tests/fboss_qsfp_unsupported_tests.materialized_JSON @@ -2392,6 +2392,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "janga800bic/physdk-credo-0.8.4/credo-0.8.4": [ @@ -2565,6 +2568,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "meru400bfu/physdk-credo-0.7.2/credo-0.7.2": [ @@ -3296,6 +3302,9 @@ { "test_name_regex": "PhyIOTest.phyIOStats$" }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" + }, { "test_name_regex": "HwTest_PROFILE_DEFAULT.TestProfile$" }, @@ -3475,6 +3484,9 @@ { "test_name_regex": "PhyIOTest.phyIOStats$" }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" + }, { "test_name_regex": "HwTest_PROFILE_DEFAULT.TestProfile$" }, @@ -3654,6 +3666,9 @@ { "test_name_regex": "PhyIOTest.phyIOStats$" }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" + }, { "test_name_regex": "HwTest_PROFILE_DEFAULT.TestProfile$" }, @@ -3827,6 +3842,9 @@ { "test_name_regex": "PhyIOTest.phyIOStats$" }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" + }, { "test_name_regex": "HwTest_PROFILE_DEFAULT.TestProfile$" }, @@ -4295,6 +4313,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "montblanc/physdk-credo-0.8.4/credo-0.8.4": [ @@ -4465,6 +4486,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "morgan800cc/physdk-credo-0.7.2/credo-0.7.2": [ @@ -4632,6 +4656,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "morgan800cc/physdk-credo-0.8.4/credo-0.8.4": [ @@ -4799,6 +4826,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "tahan800bc/physdk-credo-0.7.2/credo-0.7.2": [ @@ -4969,6 +4999,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "tahan800bc/physdk-credo-0.8.4/credo-0.8.4": [ @@ -5139,6 +5172,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "wedge100s/physdk-credo-0.7.2/credo-0.7.2": [ From 09a7b70d0b025d90884987cddc6e419eceb59d51 Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Wed, 30 Oct 2024 09:33:39 -0700 Subject: [PATCH 445/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/987020e7d96a1eeb7c6f04ded40d64b6ac735e26 https://github.com/facebook/fb303/commit/1a4fff202da044af641d798d4cb56cdbfd9763bf https://github.com/facebook/fbthrift/commit/2baf516fb71c49cbafe3c3cfc553967312dfd61b https://github.com/facebook/folly/commit/9173e457bed6af0d058e9f338af31a716a415f83 https://github.com/facebook/mvfst/commit/b37a830892c27d57986712867db2a8942d477e1c https://github.com/facebook/proxygen/commit/3030aef5e8ee4e2b5a8f6f55b12eb0680e74a8a9 https://github.com/facebook/wangle/commit/79c465452e6d3aa6adf2e833546af925dc02d96c https://github.com/facebookexperimental/edencommon/commit/3448914bbe018668f4d056ce52fdb92d30eec1fe https://github.com/facebookexperimental/rust-shed/commit/c9d65d497ef5fcd5698d351bfb19c3a649ebfbbf https://github.com/facebookincubator/fizz/commit/1065a55361c21a84b41e1bb512a01df46e5bc834 Reviewed By: bigfootjon fbshipit-source-id: f1f3e3385fe272ed1edf823f4010ef7f9d8f20c8 --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index ad50463017e37..d1233b66bcfbb 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit a19ea131f192bdffbb9d946928c4ad28f7fa5df0 +Subproject commit 1a4fff202da044af641d798d4cb56cdbfd9763bf diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index b5633f3d4a34c..484bbf4ddc7ff 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit bc71935c76682c1efa9669cbd65e2f2531048488 +Subproject commit 2baf516fb71c49cbafe3c3cfc553967312dfd61b diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 033ee3ca6a3fb..7de8dd00a40bc 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 6df9a81e358ca3bbe75f78e58e53d6f6bd3d73e7 +Subproject commit 9173e457bed6af0d058e9f338af31a716a415f83 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 886f420e70f0e..8eeda4f1fbebf 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 24a9d8a27a5cddb6cdd64dde96d0bfd574655ac9 +Subproject commit 79c465452e6d3aa6adf2e833546af925dc02d96c diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index 743ddde85636f..fdca345191d3a 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 979e1ae21bd29b1e298c500da3ff147da4687c60 +Subproject commit 1065a55361c21a84b41e1bb512a01df46e5bc834 From fe9eecf55fa046d51c45fa20d552cfe2c9e4cf91 Mon Sep 17 00:00:00 2001 From: Yingjie Gu Date: Wed, 30 Oct 2024 12:17:35 -0700 Subject: [PATCH 446/479] update show vip prefixes Summary: https://docs.google.com/spreadsheets/d/1ylKcS-ZmgLgxlXUnzMJqIVPF8lVh-o8WTQDh36h8k28/edit?gid=0#gid=0 Differential Revision: D65074437 fbshipit-source-id: a0b6f48d19ec0e9f10a97e64944c7b36686fdeb7 --- fboss/cli/fboss2/BUCK | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/cli/fboss2/BUCK b/fboss/cli/fboss2/BUCK index b9014e055a659..bb6f341de392b 100644 --- a/fboss/cli/fboss2/BUCK +++ b/fboss/cli/fboss2/BUCK @@ -661,6 +661,7 @@ cpp_library( "//nettools/skynet/if:query-cpp2-types", "//nettools/skynet/if:skynet_structs-cpp2-types", "//nettools/skynet/lib/cpp:skynet_thrift_client", + "//nettools/vipinjector/vip_service:util_lib", "//nettools/vipinjector/vip_service/if:vip_service-cpp2-services", "//nettools/vipinjector/vip_service/if:vip_service-cpp2-types", "//openr/common:network_util", From 8b4b059e5e7c815658c3cfa20c5da72619de35da Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Wed, 30 Oct 2024 12:32:55 -0700 Subject: [PATCH 447/479] Add struct for NaivePeriodicSubscribableStorage params Summary: Right now we are passing a bunch of params to NaivePeriodicSubscribableStorage. For ease of readability, define a struct to encapsulate the params. Reviewed By: wilsonwinhi Differential Revision: D65095786 fbshipit-source-id: 531c6a8dd4b7413223c6820445ba743b4cde5e1c --- .../oper/NaivePeriodicSubscribableStorage.h | 35 +++++-------- .../NaivePeriodicSubscribableStorageBase.cpp | 50 ++++++++----------- .../NaivePeriodicSubscribableStorageBase.h | 40 ++++++++++----- fboss/fsdb/server/ServiceHandler.cpp | 24 +++++---- 4 files changed, 76 insertions(+), 73 deletions(-) diff --git a/fboss/fsdb/oper/NaivePeriodicSubscribableStorage.h b/fboss/fsdb/oper/NaivePeriodicSubscribableStorage.h index d42cb060349da..a2f9db6636551 100644 --- a/fboss/fsdb/oper/NaivePeriodicSubscribableStorage.h +++ b/fboss/fsdb/oper/NaivePeriodicSubscribableStorage.h @@ -41,24 +41,14 @@ class NaivePeriodicSubscribableStorage explicit NaivePeriodicSubscribableStorage( const RootT& initialState, - std::chrono::milliseconds subscriptionServeInterval = - std::chrono::milliseconds(50), - std::chrono::milliseconds subscriptionHeartbeatInterval = - std::chrono::seconds(5), - bool trackMetadata = false, - const std::string& metricPrefix = "fsdb", - bool convertToIDPaths = false, - bool requireResponseOnInitialSync = false) - : NaivePeriodicSubscribableStorageBase( - subscriptionServeInterval, - subscriptionHeartbeatInterval, - trackMetadata, - metricPrefix, - convertToIDPaths), + StorageParams params = {}) + : NaivePeriodicSubscribableStorageBase(params), currentState_(std::in_place, initialState), lastPublishedState_(*currentState_.rlock()), - subscriptions_(patchOperProtocol_, requireResponseOnInitialSync) { - subscriptions_.useIdPaths(convertToIDPaths); + subscriptions_( + patchOperProtocol_, + params.requireResponseOnInitialSync_) { + subscriptions_.useIdPaths(params.convertSubsToIDPaths_); auto currentState = currentState_.wlock(); currentState->publish(); } @@ -95,7 +85,7 @@ class NaivePeriodicSubscribableStorage get_encoded_impl(PathIter begin, PathIter end, OperProtocol protocol) const { auto state = currentState_.rlock(); auto result = state->get_encoded(begin, end, protocol); - if (result.hasValue() && trackMetadata_) { + if (result.hasValue() && params_.trackMetadata_) { metadataTracker_.withRLock([&](auto& tracker) { CHECK(tracker); auto metadata = @@ -117,7 +107,7 @@ class NaivePeriodicSubscribableStorage OperProtocol protocol) const { auto state = currentState_.rlock(); auto result = state->get_encoded_extended(begin, end, protocol); - if (result.hasValue() && trackMetadata_) { + if (result.hasValue() && params_.trackMetadata_) { metadataTracker_.withRLock([&](auto& tracker) { CHECK(tracker); auto metadata = @@ -248,7 +238,7 @@ class NaivePeriodicSubscribableStorage exportServeMetrics(start); - co_await folly::coro::sleep(subscriptionServeInterval_); + co_await folly::coro::sleep(params_.subscriptionServeInterval_); } } @@ -297,7 +287,7 @@ template typename Storage::ConcretePath NaivePeriodicSubscribableStorage::convertPath( ConcretePath&& path) const { - return convertSubsToIDPaths_ + return params_.convertSubsToIDPaths_ ? PathConverter::pathToIdTokens(std::move(path)) : path; } @@ -306,8 +296,9 @@ template typename Storage::ExtPath NaivePeriodicSubscribableStorage::convertPath( const ExtPath& path) const { - return convertSubsToIDPaths_ ? PathConverter::extPathToIdTokens(path) - : path; + return params_.convertSubsToIDPaths_ + ? PathConverter::extPathToIdTokens(path) + : path; } template diff --git a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp index 651a7290b98cf..5675c5ba9cbdf 100644 --- a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp +++ b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp @@ -33,20 +33,14 @@ DEFINE_bool( namespace facebook::fboss::fsdb { NaivePeriodicSubscribableStorageBase::NaivePeriodicSubscribableStorageBase( - std::chrono::milliseconds subscriptionServeInterval, - std::chrono::milliseconds subscriptionHeartbeatInterval, - bool trackMetadata, - const std::string& metricPrefix, - bool convertToIDPaths) - : subscriptionServeInterval_(subscriptionServeInterval), - subscriptionHeartbeatInterval_(subscriptionHeartbeatInterval), - trackMetadata_(trackMetadata), - convertSubsToIDPaths_(convertToIDPaths), - rss_(fmt::format("{}.{}", metricPrefix, kRss)), - registeredSubs_(fmt::format("{}.{}", metricPrefix, kRegisteredSubs)), - serveSubMs_(fmt::format("{}.{}", metricPrefix, kServeSubMs)), - serveSubNum_(fmt::format("{}.{}", metricPrefix, kServeSubNum)) { - if (trackMetadata) { + StorageParams params) + : params_(std::move(params)), + rss_(fmt::format("{}.{}", params_.metricPrefix_, kRss)), + registeredSubs_( + fmt::format("{}.{}", params_.metricPrefix_, kRegisteredSubs)), + serveSubMs_(fmt::format("{}.{}", params_.metricPrefix_, kServeSubMs)), + serveSubNum_(fmt::format("{}.{}", params_.metricPrefix_, kServeSubNum)) { + if (params_.trackMetadata_) { metadataTracker_ = std::make_unique(); } @@ -136,7 +130,7 @@ void NaivePeriodicSubscribableStorageBase::stop_impl() { void NaivePeriodicSubscribableStorageBase::registerPublisher( PathIter begin, PathIter end) { - if (!trackMetadata_) { + if (!params_.trackMetadata_) { return; } metadataTracker_.withWLock([&](auto& tracker) { @@ -149,7 +143,7 @@ void NaivePeriodicSubscribableStorageBase::unregisterPublisher( PathIter begin, PathIter end, FsdbErrorCode disconnectReason) { - if (!trackMetadata_) { + if (!params_.trackMetadata_) { return; } metadataTracker_.withWLock([&](auto& tracker) { @@ -200,7 +194,7 @@ NaivePeriodicSubscribableStorageBase::getPublisherRoot( PathIter begin, PathIter end) const { auto path = convertPath(ConcretePath(begin, end)); - return trackMetadata_ + return params_.trackMetadata_ ? std::make_optional( OperPathToPublisherRoot().publisherRoot(path.begin(), path.end())) : std::nullopt; @@ -210,7 +204,7 @@ std::optional NaivePeriodicSubscribableStorageBase::getPublisherRoot( const std::vector& paths) const { auto convertedPaths = convertExtPaths(paths); - return trackMetadata_ + return params_.trackMetadata_ ? std::make_optional( OperPathToPublisherRoot().publisherRoot(convertedPaths)) : std::nullopt; @@ -221,7 +215,7 @@ NaivePeriodicSubscribableStorageBase::getPublisherRoot( ExtPathIter begin, ExtPathIter end) const { auto path = convertPath(ExtPath(begin, end)); - return trackMetadata_ + return params_.trackMetadata_ ? std::make_optional( OperPathToPublisherRoot().publisherRoot(path.begin(), path.end())) : std::nullopt; @@ -230,7 +224,7 @@ NaivePeriodicSubscribableStorageBase::getPublisherRoot( std::optional NaivePeriodicSubscribableStorageBase::getPublisherRoot( const std::map& paths) const { - return trackMetadata_ + return params_.trackMetadata_ ? std::make_optional(OperPathToPublisherRoot().publisherRoot(paths)) : std::nullopt; } @@ -238,7 +232,7 @@ NaivePeriodicSubscribableStorageBase::getPublisherRoot( std::optional NaivePeriodicSubscribableStorageBase::getPublisherRoot( const std::map& paths) const { - return trackMetadata_ + return params_.trackMetadata_ ? std::make_optional(OperPathToPublisherRoot().publisherRoot(paths)) : std::nullopt; } @@ -262,7 +256,7 @@ void NaivePeriodicSubscribableStorageBase::updateMetadata( std::vector NaivePeriodicSubscribableStorageBase::convertExtPaths( const std::vector& paths) const { - if (!convertSubsToIDPaths_) { + if (!params_.convertSubsToIDPaths_) { return paths; } std::vector convertedPaths; @@ -289,7 +283,7 @@ NaivePeriodicSubscribableStorageBase::subscribe_encoded_impl( protocol, getPublisherRoot(path.begin(), path.end()), heartbeatThread_ ? heartbeatThread_->getEventBase() : nullptr, - subscriptionHeartbeatInterval_); + params_.subscriptionHeartbeatInterval_); subMgr().registerSubscription(std::move(subscription)); return std::move(gen); } @@ -308,7 +302,7 @@ NaivePeriodicSubscribableStorageBase::subscribe_delta_impl( protocol, getPublisherRoot(path.begin(), path.end()), heartbeatThread_ ? heartbeatThread_->getEventBase() : nullptr, - subscriptionHeartbeatInterval_); + params_.subscriptionHeartbeatInterval_); subMgr().registerSubscription(std::move(subscription)); return std::move(gen); } @@ -326,7 +320,7 @@ NaivePeriodicSubscribableStorageBase::subscribe_encoded_extended_impl( std::move(publisherRoot), protocol, heartbeatThread_ ? heartbeatThread_->getEventBase() : nullptr, - subscriptionHeartbeatInterval_); + params_.subscriptionHeartbeatInterval_); subMgr().registerExtendedSubscription(std::move(subscription)); return std::move(gen); } @@ -344,7 +338,7 @@ NaivePeriodicSubscribableStorageBase::subscribe_delta_extended_impl( std::move(publisherRoot), protocol, heartbeatThread_ ? heartbeatThread_->getEventBase() : nullptr, - subscriptionHeartbeatInterval_); + params_.subscriptionHeartbeatInterval_); subMgr().registerExtendedSubscription(std::move(subscription)); return std::move(gen); } @@ -364,7 +358,7 @@ NaivePeriodicSubscribableStorageBase::subscribe_patch_impl( patchOperProtocol_, std::move(root), heartbeatThread_ ? heartbeatThread_->getEventBase() : nullptr, - subscriptionHeartbeatInterval_); + params_.subscriptionHeartbeatInterval_); subMgr().registerExtendedSubscription(std::move(subscription)); return std::move(gen); } @@ -384,7 +378,7 @@ NaivePeriodicSubscribableStorageBase::subscribe_patch_extended_impl( patchOperProtocol_, std::move(root), heartbeatThread_ ? heartbeatThread_->getEventBase() : nullptr, - subscriptionHeartbeatInterval_); + params_.subscriptionHeartbeatInterval_); subMgr().registerExtendedSubscription(std::move(subscription)); return std::move(gen); } diff --git a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h index c10cdbd0b1334..f75f90903b562 100644 --- a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h +++ b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h @@ -33,12 +33,32 @@ class NaivePeriodicSubscribableStorageBase { using ExtPath = typename OperPathToPublisherRoot::ExtPath; using ExtPathIter = typename OperPathToPublisherRoot::ExtPathIter; - NaivePeriodicSubscribableStorageBase( - std::chrono::milliseconds subscriptionServeInterval, - std::chrono::milliseconds subscriptionHeartbeatInterval, - bool trackMetadata, - const std::string& metricPrefix, - bool convertToIDPaths); + struct StorageParams { + StorageParams( + std::chrono::milliseconds subscriptionServeInterval = + std::chrono::milliseconds(50), + std::chrono::milliseconds subscriptionHeartbeatInterval = + std::chrono::seconds(5), + bool trackMetadata = false, + const std::string& metricPrefix = "fsdb", + bool convertToIDPaths = false, + bool requireResponseOnInitialSync = false) + : subscriptionServeInterval_(subscriptionServeInterval), + subscriptionHeartbeatInterval_(subscriptionHeartbeatInterval), + trackMetadata_(trackMetadata), + metricPrefix_(metricPrefix), + convertSubsToIDPaths_(convertToIDPaths), + requireResponseOnInitialSync_(requireResponseOnInitialSync) {} + + const std::chrono::milliseconds subscriptionServeInterval_; + const std::chrono::milliseconds subscriptionHeartbeatInterval_; + const bool trackMetadata_; + const std::string& metricPrefix_; + bool convertSubsToIDPaths_; + const bool requireResponseOnInitialSync_; + }; + + explicit NaivePeriodicSubscribableStorageBase(StorageParams params); virtual ~NaivePeriodicSubscribableStorageBase() {} @@ -130,7 +150,7 @@ class NaivePeriodicSubscribableStorageBase { } void setConvertToIDPaths(bool convertToIDPaths) { - convertSubsToIDPaths_ = convertToIDPaths; + params_.convertSubsToIDPaths_ = convertToIDPaths; subMgr().useIdPaths(convertToIDPaths); } @@ -170,13 +190,9 @@ class NaivePeriodicSubscribableStorageBase { folly::Synchronized running_{false}; - const std::chrono::milliseconds subscriptionServeInterval_; - const std::chrono::milliseconds subscriptionHeartbeatInterval_; + StorageParams params_; folly::Synchronized> metadataTracker_; - const bool trackMetadata_{false}; - - bool convertSubsToIDPaths_{false}; // as an optimization, for now we decide what protocol is used in patches // instead of letting the client choose diff --git a/fboss/fsdb/server/ServiceHandler.cpp b/fboss/fsdb/server/ServiceHandler.cpp index 10cf576fb489b..78d195a355e7c 100644 --- a/fboss/fsdb/server/ServiceHandler.cpp +++ b/fboss/fsdb/server/ServiceHandler.cpp @@ -241,19 +241,21 @@ ServiceHandler::ServiceHandler( fb303::RATE), operStorage_( {}, - std::chrono::milliseconds(FLAGS_stateSubscriptionServe_ms), - std::chrono::seconds(FLAGS_stateSubscriptionHeartbeat_s), - FLAGS_trackMetadata, - "fsdb", - options_.serveIdPathSubs, - true), + NaivePeriodicSubscribableStorageBase::StorageParams( + std::chrono::milliseconds(FLAGS_stateSubscriptionServe_ms), + std::chrono::seconds(FLAGS_stateSubscriptionHeartbeat_s), + FLAGS_trackMetadata, + "fsdb", + options_.serveIdPathSubs, + true)), operStatsStorage_( {}, - std::chrono::seconds(FLAGS_statsSubscriptionServe_s), - std::chrono::seconds(FLAGS_statsSubscriptionHeartbeat_s), - FLAGS_trackMetadata, - "fsdb", - options_.serveIdPathSubs) { + NaivePeriodicSubscribableStorageBase::StorageParams( + std::chrono::seconds(FLAGS_statsSubscriptionServe_s), + std::chrono::seconds(FLAGS_statsSubscriptionHeartbeat_s), + FLAGS_trackMetadata, + "fsdb", + options_.serveIdPathSubs)) { num_instances_.incrementValue(1); initPerStreamCounters(); From 2a5bf5b58d245110f77b12dea2ec22f06f052156 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 30 Oct 2024 18:07:08 -0700 Subject: [PATCH 448/479] Stop using about to be deprecated dsfNode.sysPortRange field in ConfigUtils Summary: As titled Reviewed By: srikrishnagopu Differential Revision: D65190406 fbshipit-source-id: a5df9318d7388d720148b82f7a2404edd0925c03 --- fboss/agent/test/utils/ConfigUtils.cpp | 29 +++++++++++++++----------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/fboss/agent/test/utils/ConfigUtils.cpp b/fboss/agent/test/utils/ConfigUtils.cpp index 0438b986d6dd6..80fcba2ec31be 100644 --- a/fboss/agent/test/utils/ConfigUtils.cpp +++ b/fboss/agent/test/utils/ConfigUtils.cpp @@ -677,14 +677,12 @@ cfg::SwitchConfig multiplePortsPerIntfConfig( continue; } auto mySwitchId = scopeResolver.scope(port).switchId(); - CHECK(config.dsfNodes()[mySwitchId].systemPortRange().has_value()); - auto sysportRangeBegin = - *config.dsfNodes()[mySwitchId].systemPortRange()->minimum(); - auto switchInfoItr = - config.switchSettings()->switchIdToSwitchInfo()->find(mySwitchId); - auto portIdRange = switchInfoItr->second.portIdRange(); - auto intfId = - sysportRangeBegin + *port.logicalID() - *portIdRange->minimum(); + auto sysPortId = getSystemPortID( + PortID(*port.logicalID()), + *port.scope(), + *config.switchSettings()->switchIdToSwitchInfo(), + SwitchID(mySwitchId)); + auto intfId = static_cast(sysPortId); std::optional> subnets; auto portScope = *platformMapping->getPlatformPort(*port.logicalID()) .mapping() @@ -1035,15 +1033,22 @@ cfg::SwitchConfig twoL3IntfConfig( lbModeMap, supportsAddRemovePort); - auto computeIntfId = [&config, &ports, &switchType, &vlans](auto idx) { + auto computeIntfId = [&config, &platformMapping, &ports, &switchType, &vlans]( + auto idx) { if (switchType == cfg::SwitchType::NPU) { return static_cast(vlans[idx]); } auto mySwitchId = config.switchSettings()->switchIdToSwitchInfo()->begin()->first; - auto sysportRangeBegin = - *config.dsfNodes()[mySwitchId].systemPortRange()->minimum(); - return sysportRangeBegin + static_cast(ports[idx]); + + auto port = ports[idx]; + auto portScope = *platformMapping->getPlatformPort(port).mapping()->scope(); + auto sysPortId = getSystemPortID( + port, + portScope, + *config.switchSettings()->switchIdToSwitchInfo(), + SwitchID(mySwitchId)); + return static_cast(sysPortId); }; for (auto i = 0; i < ports.size(); ++i) { cfg::Interface intf; From 85df60cabd137c4f350777cb30b5500bd84d3982 Mon Sep 17 00:00:00 2001 From: Mohammed Al-Sanabani Date: Wed, 30 Oct 2024 23:28:49 -0700 Subject: [PATCH 449/479] Fix PRBS tests for Fuji Summary: Some tests are still failing. Will disable only the HwPortPrbsTest*true* version of the test Reviewed By: harshitgulati18 Differential Revision: D65187800 fbshipit-source-id: 92583d8b361170c631f71d1391fc142dde857ca2 --- fboss/qsfp_service/test/hw_test/HwPortPrbsTest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fboss/qsfp_service/test/hw_test/HwPortPrbsTest.cpp b/fboss/qsfp_service/test/hw_test/HwPortPrbsTest.cpp index 6a6241c198b2c..4c94ec4146df9 100644 --- a/fboss/qsfp_service/test/hw_test/HwPortPrbsTest.cpp +++ b/fboss/qsfp_service/test/hw_test/HwPortPrbsTest.cpp @@ -28,7 +28,10 @@ static const std::unordered_map< {7, 9, 10, 11, 13, 15, 20, 23, 31, 49, 58}}}}, {PlatformType::PLATFORM_YAMP, {{{phy::IpModulation::NRZ, {9, 15, 23, 31}}, - {phy::IpModulation::PAM4, {9, 13, 15, 31}}}}}}; + {phy::IpModulation::PAM4, {9, 13, 15, 31}}}}}, + {PlatformType::PLATFORM_FUJI, + {{{phy::IpModulation::NRZ, {31}}, {phy::IpModulation::PAM4, {31}}}}}, +}; } template From a80419d40a727354fac26b5d4448aa51516d63da Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Wed, 30 Oct 2024 23:50:35 -0700 Subject: [PATCH 450/479] API to get inband sys port id using switchId2Info and a switchId Summary: As titled. Reviewed By: zechengh09 Differential Revision: D65225722 fbshipit-source-id: cbcc1f13e1c45a19a149f57e769c6c64bf5e070a --- fboss/agent/Utils.cpp | 18 ++++++++++++++++++ fboss/agent/Utils.h | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 8c5fbfce3bbc9..a4b78809e01e1 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -444,6 +444,24 @@ SystemPortID getInbandSystemPortID( switchId); } +SystemPortID getInbandSystemPortID( + const std::map& switchId2Info, + SwitchID switchId) { + auto switchInfoItr = switchId2Info.find(static_cast(switchId)); + if (switchInfoItr == switchId2Info.end()) { + throw FbossError("Unable to lookup switch info for : ", switchId); + } + if (!switchInfoItr->second.inbandPortId().has_value()) { + throw FbossError("Inband port id not set for: ", switchId); + } + return getSystemPortID( + PortID(*switchInfoItr->second.inbandPortId()), + // Inband port scope is always global + cfg::Scope::GLOBAL, + switchId2Info, + switchId); +} + cfg::Range64 getFirstSwitchSystemPortIdRange( const std::map& switchToSwitchInfo) { for (const auto& [switchId, switchInfo] : switchToSwitchInfo) { diff --git a/fboss/agent/Utils.h b/fboss/agent/Utils.h index 0a7d6756ed3d3..9549c99fa1bc5 100644 --- a/fboss/agent/Utils.h +++ b/fboss/agent/Utils.h @@ -265,6 +265,10 @@ SystemPortID getInbandSystemPortID( const std::shared_ptr& state, SwitchID switchId); +SystemPortID getInbandSystemPortID( + const std::map& switchToSwitchInfo, + SwitchID switchId); + cfg::Range64 getFirstSwitchSystemPortIdRange( const std::map& switchToSwitchInfo); From 531b532395f8675f57a7e122c6f5de3c72d6ac32 Mon Sep 17 00:00:00 2001 From: Jitendra Verma Date: Thu, 31 Oct 2024 01:26:36 -0700 Subject: [PATCH 451/479] check kernel entries Summary: Test to check that the tunnel manager is able to create the source route rule entries, tunnel address entries and default route entries in the kernel Reviewed By: daiwei1983 Differential Revision: D65118696 fbshipit-source-id: 0e60a66ced29f9bd2e97507e6590cae6630eab31 --- .../agent_hw_tests/AgentTunnelMgrTests.cpp | 123 ++++++++++++++++++ fboss/agent/test/agent_hw_tests/BUCK | 1 + 2 files changed, 124 insertions(+) create mode 100644 fboss/agent/test/agent_hw_tests/AgentTunnelMgrTests.cpp diff --git a/fboss/agent/test/agent_hw_tests/AgentTunnelMgrTests.cpp b/fboss/agent/test/agent_hw_tests/AgentTunnelMgrTests.cpp new file mode 100644 index 0000000000000..87ce8e29dab4d --- /dev/null +++ b/fboss/agent/test/agent_hw_tests/AgentTunnelMgrTests.cpp @@ -0,0 +1,123 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/agent/hw/test/ConfigFactory.h" +#include "fboss/agent/test/AgentHwTest.h" +#include "fboss/agent/test/TestUtils.h" + +namespace facebook::fboss { + +class AgentTunnelMgrTest : public AgentHwTest { + public: + std::vector + getProductionFeaturesVerified() const override { + return {}; + } + + void setCmdLineFlagOverrides() const override { + AgentHwTest::setCmdLineFlagOverrides(); + FLAGS_tun_intf = true; + } + + // Clear any stale kernel entries + void clearKernelEntries() { + // Delete the source route rule entries from the kernel + auto cmd = folly::to("ip rule delete table 1"); + + runShellCmd(cmd); + + // Delete the tunnel address entries from the kernel + cmd = folly::to("ip link delete fboss2000"); + + runShellCmd(cmd); + } + + void checkKernelEntriesRemoved() { + auto config = initialConfig(*getAgentEnsemble()); + auto intfIp = folly::IPAddress::createNetwork( + config.interfaces()[0].ipAddresses()[0], -1, false) + .first; + + // Check that the source route rule entries are not present in the kernel + auto cmd = folly::to("ip rule list | grep ", intfIp); + + auto output = runShellCmd(cmd); + + EXPECT_TRUE( + output.find(folly::to(intfIp)) == std::string::npos); + + // Check that the tunnel address entries are not present in the kernel + cmd = folly::to("ip addr list | grep ", intfIp); + + output = runShellCmd(cmd); + + EXPECT_TRUE( + output.find(folly::to(intfIp)) == std::string::npos); + + // Check that the default route entries are not present in the kernel + cmd = folly::to("ip route list | grep ", intfIp); + + output = runShellCmd(cmd); + + EXPECT_TRUE( + output.find(folly::to(intfIp)) == std::string::npos); + } + + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { + auto cfg = utility::oneL3IntfConfig( + ensemble.getSw()->getPlatformMapping(), + ensemble.getL3Asics(), + ensemble.masterLogicalPortIds()[0], + ensemble.getSw()->getPlatformSupportsAddRemovePort()); + return cfg; + } +}; + +// Test that the tunnel manager is able to create the source route rule entries, +// tunnel address entries and default route entries in the kernel +TEST_F(AgentTunnelMgrTest, checkKernelEntries) { + auto setup = [=]() {}; + auto verify = [=, this]() { + auto config = initialConfig(*getAgentEnsemble()); + auto intfIp = folly::IPAddress::createNetwork( + config.interfaces()[0].ipAddresses()[0], -1, false) + .first; + + // Check that the source route rule entries are present in the kernel + auto cmd = folly::to("ip rule list | grep ", intfIp); + + auto output = runShellCmd(cmd); + + XLOG(DBG2) << "Cmd: " << cmd; + XLOG(DBG2) << "Output: \n" << output; + + EXPECT_TRUE( + output.find(folly::to(intfIp)) != std::string::npos); + + // Check that the tunnel address entries are present in the kernel + cmd = folly::to("ip addr list | grep ", intfIp); + + output = runShellCmd(cmd); + + EXPECT_TRUE( + output.find(folly::to(intfIp)) != std::string::npos); + + // Check that the default route entries are present in the kernel + cmd = folly::to("ip route list | grep ", intfIp); + + output = runShellCmd(cmd); + + EXPECT_TRUE( + output.find(folly::to(intfIp)) != std::string::npos); + + // Clear kernel entries + clearKernelEntries(); + + // Check that the kernel entries are removed + checkKernelEntriesRemoved(); + }; + + verifyAcrossWarmBoots(setup, verify); +} + +} // namespace facebook::fboss diff --git a/fboss/agent/test/agent_hw_tests/BUCK b/fboss/agent/test/agent_hw_tests/BUCK index 86aee3514d36c..f6f46b012b25d 100644 --- a/fboss/agent/test/agent_hw_tests/BUCK +++ b/fboss/agent/test/agent_hw_tests/BUCK @@ -63,6 +63,7 @@ cpp_library( "AgentSwitchStatsTxCounterTests.cpp", "AgentTrafficPfcTests.cpp", "AgentTrunkLoadBalancerTests.cpp", + "AgentTunnelMgrTests.cpp", "AgentVoqSwitchInterruptsTests.cpp", "AgentVoqSwitchTests.cpp", "AgentWatermarkTests.cpp", From bfe72ed9d42d77eadea0c9e3d93bd95f4c131587 Mon Sep 17 00:00:00 2001 From: genkzgnluxbjeyb Date: Thu, 31 Oct 2024 01:55:14 -0700 Subject: [PATCH 452/479] fboss_qsfp_known_bad_tests_sync Differential Revision: D65258023 fbshipit-source-id: 4a446cab158bdfad9ebb54c1bc44eefee877e254 --- .../fboss_qsfp_known_bad_tests.materialized_JSON | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/fboss/oss/qsfp_known_bad_tests/fboss_qsfp_known_bad_tests.materialized_JSON b/fboss/oss/qsfp_known_bad_tests/fboss_qsfp_known_bad_tests.materialized_JSON index c755a69dd96c3..97ecd0788f95c 100644 --- a/fboss/oss/qsfp_known_bad_tests/fboss_qsfp_known_bad_tests.materialized_JSON +++ b/fboss/oss/qsfp_known_bad_tests/fboss_qsfp_known_bad_tests.materialized_JSON @@ -637,14 +637,8 @@ { "test_name_regex": "HwTransceiverConfigValidationTest.validateAllActiveTransceivers$" }, - { - "test_name_regex": "HwTest_PROFILE_400G_8_PAM4_RS544X2N_COPPER.TestProfile$" - }, { "test_name_regex": "HwTransceiverResetTest.verifyResetControl$" - }, - { - "test_name_regex": "HwTest_PROFILE_10G_1_NRZ_NOFEC_OPTICAL.TestProfile$" } ], "wedge400/physdk-credo-0.8.4/credo-0.8.4": [ @@ -660,14 +654,8 @@ { "test_name_regex": "HwTransceiverConfigValidationTest.validateAllActiveTransceivers$" }, - { - "test_name_regex": "HwTest_PROFILE_400G_8_PAM4_RS544X2N_COPPER.TestProfile$" - }, { "test_name_regex": "HwTransceiverResetTest.verifyResetControl$" - }, - { - "test_name_regex": "HwTest_PROFILE_10G_1_NRZ_NOFEC_OPTICAL.TestProfile$" } ], "wedge400c/physdk-credo-0.7.2/credo-0.7.2": [ From 9c1938599edc26e84cb4ba96b247f436836b38f6 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 31 Oct 2024 04:38:20 -0700 Subject: [PATCH 453/479] Code reuse - forward on api for getInbandSystemPortId to another Summary: As titled Reviewed By: zechengh09 Differential Revision: D65257722 fbshipit-source-id: 11488c4654b5e5f7ba7525c09ea09147721dcb74 --- fboss/agent/Utils.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index a4b78809e01e1..5f920ef93d7d8 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -433,15 +433,7 @@ SystemPortID getInbandSystemPortID( if (switchInfoItr == switchId2Info.end()) { throw FbossError("Unable to lookup switch info for : ", switchId); } - if (!switchInfoItr->second.inbandPortId().has_value()) { - throw FbossError("Inband port id not set for: ", switchId); - } - return getSystemPortID( - PortID(*switchInfoItr->second.inbandPortId()), - // Inband port scope is always global - cfg::Scope::GLOBAL, - switchId2Info, - switchId); + return getInbandSystemPortID(switchId2Info, switchId); } SystemPortID getInbandSystemPortID( From 57ee5cc1d853e049c3f7047e456d541096d4fbcb Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Thu, 31 Oct 2024 06:37:18 -0700 Subject: [PATCH 454/479] add SAI_SWITCH_ATTR_NO_ACLS_FOR_TRAPS to sai switch api Summary: Now that all ACL based rx reasons are converted to explicit FBOSS ACLs on J3, we will set this new attribute on J3 switches so as to get explicit brcm-sai error when attempting to program any ACL based rx reason traps. Reviewed By: simuthus-fb Differential Revision: D65216754 Privacy Context Container: L1125642 fbshipit-source-id: eb54eb558f6a4d108b4b32427ca6565f07a5bcdb --- fboss/agent/hw/sai/api/SwitchApi.h | 9 ++++++++- fboss/agent/hw/sai/api/bcm/SwitchApi.cpp | 10 ++++++++++ fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp | 5 +++++ fboss/agent/hw/sai/api/oss/SwitchApi.cpp | 5 +++++ fboss/agent/hw/sai/api/tajo/SwitchApi.cpp | 5 +++++ fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp | 1 + fboss/agent/platforms/sai/SaiPlatform.cpp | 1 + 7 files changed, 35 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/api/SwitchApi.h b/fboss/agent/hw/sai/api/SwitchApi.h index f81ca940dd8d4..1158ef643399a 100644 --- a/fboss/agent/hw/sai/api/SwitchApi.h +++ b/fboss/agent/hw/sai/api/SwitchApi.h @@ -573,6 +573,11 @@ struct SaiSwitchTraits { sai_uint8_t, AttributeSramFreePercentXonThWrapper, SaiIntDefault>; + struct AttributeNoAclsForTrapsWrapper { + std::optional operator()(); + }; + using NoAclsForTraps = + SaiExtensionAttribute; }; using AdapterKey = SwitchSaiId; using AdapterHostKey = std::monostate; @@ -643,7 +648,8 @@ struct SaiSwitchTraits { std::optional, std::optional, std::optional, - std::optional>; + std::optional, + std::optional>; #if SAI_API_VERSION >= SAI_VERSION(1, 12, 0) static constexpr std::array CounterIdsToRead = { @@ -778,6 +784,7 @@ SAI_ATTRIBUTE_NAME(Switch, ReachabilityGroupList); SAI_ATTRIBUTE_NAME(Switch, FabricLinkLayerFlowControlThreshold); SAI_ATTRIBUTE_NAME(Switch, SramFreePercentXoffTh); SAI_ATTRIBUTE_NAME(Switch, SramFreePercentXonTh); +SAI_ATTRIBUTE_NAME(Switch, NoAclsForTraps) template <> struct SaiObjectHasStats : public std::true_type {}; diff --git a/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp b/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp index 130c2bd7c65fe..80229a79abaf8 100644 --- a/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp @@ -324,4 +324,14 @@ std::optional SaiSwitchTraits::Attributes:: #endif return std::nullopt; } + +std::optional +SaiSwitchTraits::Attributes::AttributeNoAclsForTrapsWrapper::operator()() { +#if defined(BRCM_SAI_SDK_GTE_11_0) + return SAI_SWITCH_ATTR_NO_ACLS_FOR_TRAPS; +#else + return std::nullopt; +#endif +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp index e3c0a9900a9eb..0cdffb0310a68 100644 --- a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp +++ b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp @@ -242,6 +242,11 @@ SaiSflowMirrorTraits::Attributes::AttributeTcBufferLimit::operator()() { return std::nullopt; } +std::optional +SaiSwitchTraits::Attributes::AttributeNoAclsForTrapsWrapper::operator()() { + return std::nullopt; +} + const std::vector& SaiSwitchTraits::dramStats() { static const std::vector stats; return stats; diff --git a/fboss/agent/hw/sai/api/oss/SwitchApi.cpp b/fboss/agent/hw/sai/api/oss/SwitchApi.cpp index 029fa3ab8d4c4..7bbcd6bf8fe8f 100644 --- a/fboss/agent/hw/sai/api/oss/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/oss/SwitchApi.cpp @@ -88,6 +88,11 @@ std::optional SaiSwitchTraits::Attributes:: return std::nullopt; } +std::optional +SaiSwitchTraits::Attributes::AttributeNoAclsForTrapsWrapper::operator()() { + return std::nullopt; +} + const std::vector& SaiSwitchTraits::dramStats() { static const std::vector stats; return stats; diff --git a/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp b/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp index 856d1509e498d..7675d7812fcb5 100644 --- a/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp @@ -110,6 +110,11 @@ std::optional SaiSwitchTraits::Attributes:: return std::nullopt; } +std::optional +SaiSwitchTraits::Attributes::AttributeNoAclsForTrapsWrapper::operator()() { + return std::nullopt; +} + const std::vector& SaiSwitchTraits::dramStats() { static const std::vector stats; return stats; diff --git a/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp b/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp index 32703a1ffdf19..1db5d141c2a6d 100644 --- a/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp @@ -126,6 +126,7 @@ void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(Switch, FabricLinkLayerFlowControlThreshold); SAI_EXT_ATTR_MAP(Switch, SramFreePercentXoffTh); SAI_EXT_ATTR_MAP(Switch, SramFreePercentXonTh); + SAI_EXT_ATTR_MAP(Switch, NoAclsForTraps); } } // namespace diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index 04c91eec01b7c..ebbf884a7327a 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -689,6 +689,7 @@ SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes( fabricLLFC, std::nullopt, // SRAM free percent XOFF threshold std::nullopt, // SRAM free percent XON threshold + std::nullopt, // No acls for traps }; } From 56ddf89e0c0ece55dc25b32a6a3a518b2f856425 Mon Sep 17 00:00:00 2001 From: Vasant Patil Date: Thu, 31 Oct 2024 07:40:48 -0700 Subject: [PATCH 455/479] Build SAI HW test, Agent HW test, and Agent Summary: As titled Reviewed By: srikrishnagopu Differential Revision: D65181776 fbshipit-source-id: acfdcd2f06983dd3ebff1d823fbff4e4796702aa --- fboss/agent/hw/sai/api/SaiVersion.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fboss/agent/hw/sai/api/SaiVersion.h b/fboss/agent/hw/sai/api/SaiVersion.h index 61f68116a3c4b..0c706d75b466d 100644 --- a/fboss/agent/hw/sai/api/SaiVersion.h +++ b/fboss/agent/hw/sai/api/SaiVersion.h @@ -111,17 +111,18 @@ * - TAJO_SDK: Flags for all TAJO SDK */ #if defined(TAJO_SDK_VERSION_24_4_90) || defined(TAJO_SDK_VERSION_24_7_0) || \ - defined(TAJO_SDK_VERSION_24_8_3001) + defined(TAJO_SDK_VERSION_24_8_3001) || defined(TAJO_SDK_VERSION_24_10_0) #define TAJO_P4_WB_SDK #endif -#if defined(TAJO_SDK_VERSION_1_42_8) || defined(TAJO_SDK_VERSION_24_4_90) || \ - defined(TAJO_SDK_VERSION_24_7_0) || defined(TAJO_SDK_VERSION_24_8_3001) +#if defined(TAJO_SDK_VERSION_1_42_8) || defined(TAJO_SDK_VERSION_24_4_90) || \ + defined(TAJO_SDK_VERSION_24_7_0) || defined(TAJO_SDK_VERSION_24_8_3001) || \ + defined(TAJO_SDK_VERSION_24_10_0) #define TAJO_SDK_EBRO #endif #if defined(TAJO_SDK_VERSION_24_4_90) || defined(TAJO_SDK_VERSION_24_7_0) || \ - defined(TAJO_SDK_VERSION_24_8_3001) + defined(TAJO_SDK_VERSION_24_8_3001) || defined(TAJO_SDK_VERSION_24_10_0) #define TAJO_SDK_GTE_24_4_90 #endif From 8e6f9f75a7bf5d424c69dc816f8745c9dad2fb8e Mon Sep 17 00:00:00 2001 From: Siva Muthusamy Date: Thu, 31 Oct 2024 07:56:02 -0700 Subject: [PATCH 456/479] Add SAI_VERSION_11_7_0_0_DNX_ODP for BRCM SAI 11.7 GA Summary: Add SAI_VERSION_11_7_0_0_DNX_ODP for BRCM SAI 11.7 GA Reviewed By: shri-khare, zechengh09 Differential Revision: D65256369 fbshipit-source-id: 8e4dc7a1c2e47d8521b3db15f48cf54bc8f1b106 --- fboss/agent/hw/sai/api/SaiVersion.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fboss/agent/hw/sai/api/SaiVersion.h b/fboss/agent/hw/sai/api/SaiVersion.h index 0c706d75b466d..eb7b5e11d83fb 100644 --- a/fboss/agent/hw/sai/api/SaiVersion.h +++ b/fboss/agent/hw/sai/api/SaiVersion.h @@ -59,6 +59,7 @@ defined(SAI_VERSION_11_0_EA_DNX_ODP) || \ defined(SAI_VERSION_11_0_EA_DNX_SIM_ODP) || \ defined(SAI_VERSION_11_3_0_0_DNX_ODP) || \ + defined(SAI_VERSION_11_7_0_0_DNX_ODP) || \ defined(SAI_VERSION_12_0_EA_DNX_ODP) #define BRCM_SAI_SDK_DNX #endif @@ -79,13 +80,15 @@ defined(SAI_VERSION_11_0_EA_SIM_ODP) || \ defined(SAI_VERSION_11_0_EA_DNX_ODP) || \ defined(SAI_VERSION_11_0_EA_DNX_SIM_ODP) || \ - defined(SAI_VERSION_11_3_0_0_DNX_ODP) || defined(SAI_VERSION_11_3_0_0_ODP) + defined(SAI_VERSION_11_3_0_0_DNX_ODP) || \ + defined(SAI_VERSION_11_3_0_0_ODP) || defined(SAI_VERSION_11_7_0_0_DNX_ODP) #define BRCM_SAI_SDK_GTE_11_0 #endif -#if defined BRCM_SAI_SDK_DNX_GTE_12_0 || \ - defined(SAI_VERSION_11_0_EA_DNX_ODP) || \ - defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined BRCM_SAI_SDK_DNX_GTE_12_0 || \ + defined(SAI_VERSION_11_0_EA_DNX_ODP) || \ + defined(SAI_VERSION_11_3_0_0_DNX_ODP) || \ + defined(SAI_VERSION_11_7_0_0_DNX_ODP) #define BRCM_SAI_SDK_DNX_GTE_11_0 #endif From 8bede7009afa7f9816ac3384ceb3f5d54aa5b802 Mon Sep 17 00:00:00 2001 From: Siva Muthusamy Date: Thu, 31 Oct 2024 07:56:02 -0700 Subject: [PATCH 457/479] Workaround for the removal of SAI_PORT_ATTR_COND_ENTROPY_REHASH_SEED port extension attribute Summary: Workaround for the removal of SAI_PORT_ATTR_COND_ENTROPY_REHASH_SEED port extension attribute in BRCM SAI 11.7 GA. This will be fixed properly. Reviewed By: shri-khare, zechengh09 Differential Revision: D65256301 fbshipit-source-id: 28ee4f16ad194e5cbe1063d3b23154f4fc1dffe7 --- fboss/agent/hw/sai/api/bcm/PortApi.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fboss/agent/hw/sai/api/bcm/PortApi.cpp b/fboss/agent/hw/sai/api/bcm/PortApi.cpp index 98e58efe2246f..497e2668cce4f 100644 --- a/fboss/agent/hw/sai/api/bcm/PortApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/PortApi.cpp @@ -251,7 +251,10 @@ std::optional SaiPortTraits::Attributes::AttributeCondEntropyRehashPeriodUS::operator()() { // TODO(zecheng): Update flag when new 12.0 release has the attribute #if defined(SAI_VERSION_11_3_0_0_DNX_ODP) - return SAI_PORT_ATTR_COND_ENTROPY_REHASH_PERIOD_US; + // TODO: Fix this properly as SAI_PORT_ATTR_COND_ENTROPY_REHASH_PERIOD_US + // port extension attribute is removed and no longer supported. + // This is just a workaround to integrate BRCM SAI 11.7 GA + return std::nullopt; #else return std::nullopt; #endif From 937e750014a5dffad3ccf5adc557cf909d65b003 Mon Sep 17 00:00:00 2001 From: Siva Muthusamy Date: Thu, 31 Oct 2024 07:56:02 -0700 Subject: [PATCH 458/479] Replace SAI_VERSION_11_3_0_0_DNX_ODP for BRCM SAI 11.7 DNX Summary: Replace SAI_VERSION_11_3_0_0_DNX_ODP for BRCM SAI 11.7 DNX Reviewed By: shri-khare, zechengh09 Differential Revision: D65256298 fbshipit-source-id: 7431e224bb95aab9b4c931cf3fb15772749eb406 --- fboss/agent/hw/sai/api/LoggingUtil.cpp | 6 +++--- fboss/agent/hw/sai/api/SaiApiTable.cpp | 2 +- fboss/agent/hw/sai/api/SaiApiTable.h | 4 ++-- fboss/agent/hw/sai/api/TamEventAgingGroupApi.h | 2 +- fboss/agent/hw/sai/api/bcm/BufferApi.cpp | 8 ++++---- fboss/agent/hw/sai/api/bcm/MirrorApi.cpp | 4 ++-- fboss/agent/hw/sai/api/bcm/PortApi.cpp | 6 +++--- fboss/agent/hw/sai/api/bcm/SwitchApi.cpp | 4 ++-- fboss/agent/hw/sai/api/bcm/TamApi.cpp | 10 +++++----- fboss/agent/hw/sai/store/SaiStore.h | 2 +- fboss/agent/hw/sai/switch/SaiBufferManager.cpp | 4 ++-- fboss/agent/hw/sai/switch/SaiMirrorManager.cpp | 2 +- fboss/agent/hw/sai/switch/SaiPortManager.cpp | 4 ++-- fboss/agent/hw/sai/switch/SaiSwitch.cpp | 4 ++-- fboss/agent/hw/sai/switch/SaiSwitchManager.cpp | 4 ++-- fboss/agent/hw/sai/switch/SaiTamManager.h | 4 ++-- fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp | 2 +- fboss/agent/hw/sai/tracer/SaiTracer.cpp | 6 +++--- fboss/agent/hw/sai/tracer/SaiTracer.h | 8 ++++---- .../hw/sai/tracer/TamEventAgingGroupApiTracer.cpp | 3 ++- .../agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h | 3 ++- fboss/agent/platforms/sai/SaiPlatform.cpp | 2 +- 22 files changed, 48 insertions(+), 46 deletions(-) diff --git a/fboss/agent/hw/sai/api/LoggingUtil.cpp b/fboss/agent/hw/sai/api/LoggingUtil.cpp index 692e7d14bf82f..5014f265868d1 100644 --- a/fboss/agent/hw/sai/api/LoggingUtil.cpp +++ b/fboss/agent/hw/sai/api/LoggingUtil.cpp @@ -17,7 +17,7 @@ #include extern "C" { -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) #include #ifndef IS_OSS_BRCM_SAI #include @@ -30,7 +30,7 @@ extern "C" { namespace facebook::fboss { folly::StringPiece saiApiTypeToString(sai_api_t apiType) { -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) if (UNLIKELY(apiType >= SAI_API_MAX)) { switch (static_cast(apiType)) { case SAI_API_TAM_EVENT_AGING_GROUP: @@ -149,7 +149,7 @@ folly::StringPiece saiApiTypeToString(sai_api_t apiType) { } folly::StringPiece saiObjectTypeToString(sai_object_type_t objectType) { -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) if (UNLIKELY(objectType >= SAI_OBJECT_TYPE_MAX)) { switch (static_cast(objectType)) { case SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP: diff --git a/fboss/agent/hw/sai/api/SaiApiTable.cpp b/fboss/agent/hw/sai/api/SaiApiTable.cpp index a6405bd3ee36c..348470e2a7044 100644 --- a/fboss/agent/hw/sai/api/SaiApiTable.cpp +++ b/fboss/agent/hw/sai/api/SaiApiTable.cpp @@ -197,7 +197,7 @@ const TamApi& SaiApiTable::tamApi() const { return getApi(); } -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) const TamEventAgingGroupApi& SaiApiTable::tamEventAgingGroupApi() const { return getApi(); } diff --git a/fboss/agent/hw/sai/api/SaiApiTable.h b/fboss/agent/hw/sai/api/SaiApiTable.h index fdd73f425027d..c8c829f2fd94f 100644 --- a/fboss/agent/hw/sai/api/SaiApiTable.h +++ b/fboss/agent/hw/sai/api/SaiApiTable.h @@ -128,7 +128,7 @@ class SaiApiTable { const TamApi& tamApi() const; -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) const TamEventAgingGroupApi& tamEventAgingGroupApi() const; #endif @@ -190,7 +190,7 @@ class SaiApiTable { std::unique_ptr, std::unique_ptr, std::unique_ptr, -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) std::unique_ptr, #endif std::unique_ptr, diff --git a/fboss/agent/hw/sai/api/TamEventAgingGroupApi.h b/fboss/agent/hw/sai/api/TamEventAgingGroupApi.h index ffe341ffad1e8..a27844c30b91f 100644 --- a/fboss/agent/hw/sai/api/TamEventAgingGroupApi.h +++ b/fboss/agent/hw/sai/api/TamEventAgingGroupApi.h @@ -2,7 +2,7 @@ #pragma once -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) #include "fboss/agent/hw/sai/api/SaiApi.h" #include "fboss/agent/hw/sai/api/SaiAttribute.h" diff --git a/fboss/agent/hw/sai/api/bcm/BufferApi.cpp b/fboss/agent/hw/sai/api/bcm/BufferApi.cpp index 0f609340af649..32aa79ee7616d 100644 --- a/fboss/agent/hw/sai/api/bcm/BufferApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/BufferApi.cpp @@ -25,7 +25,7 @@ SaiBufferProfileTraits::Attributes::AttributeSharedFadtMaxTh::operator()() { std::optional SaiBufferProfileTraits::Attributes::AttributeSharedFadtMinTh::operator()() { // TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_BUFFER_PROFILE_ATTR_SHARED_FADT_MIN_TH; #else return std::nullopt; @@ -35,7 +35,7 @@ SaiBufferProfileTraits::Attributes::AttributeSharedFadtMinTh::operator()() { std::optional SaiBufferProfileTraits::Attributes::AttributeSramFadtMinTh::operator()() { // TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_BUFFER_PROFILE_ATTR_SRAM_FADT_MIN_TH; #else return std::nullopt; @@ -45,7 +45,7 @@ SaiBufferProfileTraits::Attributes::AttributeSramFadtMinTh::operator()() { std::optional SaiBufferProfileTraits::Attributes::AttributeSramFadtMaxTh::operator()() { // TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_BUFFER_PROFILE_ATTR_SRAM_FADT_MAX_TH; #else return std::nullopt; @@ -55,7 +55,7 @@ SaiBufferProfileTraits::Attributes::AttributeSramFadtMaxTh::operator()() { std::optional SaiBufferProfileTraits::Attributes::AttributeSramFadtXonOffset::operator()() { // TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_BUFFER_PROFILE_ATTR_SRAM_FADT_XON_OFFSET; #else return std::nullopt; diff --git a/fboss/agent/hw/sai/api/bcm/MirrorApi.cpp b/fboss/agent/hw/sai/api/bcm/MirrorApi.cpp index 46d7ab7fa5200..3b06c27e2abbf 100644 --- a/fboss/agent/hw/sai/api/bcm/MirrorApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/MirrorApi.cpp @@ -3,7 +3,7 @@ #include "fboss/agent/hw/sai/api/MirrorApi.h" // TODO: Add support for 12.0 as well -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) extern "C" { #ifndef IS_OSS_BRCM_SAI @@ -19,7 +19,7 @@ namespace facebook::fboss { std::optional SaiSflowMirrorTraits::Attributes::AttributeTcBufferLimit::operator()() { // TODO: Add support for 12.0 as well -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_MIRROR_SESSION_ATTR_TC_BUFFER_LIMIT; #else return std::nullopt; diff --git a/fboss/agent/hw/sai/api/bcm/PortApi.cpp b/fboss/agent/hw/sai/api/bcm/PortApi.cpp index 497e2668cce4f..b2dcccffa822c 100644 --- a/fboss/agent/hw/sai/api/bcm/PortApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/PortApi.cpp @@ -240,7 +240,7 @@ std::optional SaiPortSerdesTraits::Attributes:: std::optional SaiPortTraits::Attributes::AttributeCondEntropyRehashEnable::operator()() { // TODO(zecheng): Update flag when new 12.0 release has the attribute -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_PORT_ATTR_COND_ENTROPY_REHASH_ENABLE; #else return std::nullopt; @@ -250,7 +250,7 @@ SaiPortTraits::Attributes::AttributeCondEntropyRehashEnable::operator()() { std::optional SaiPortTraits::Attributes::AttributeCondEntropyRehashPeriodUS::operator()() { // TODO(zecheng): Update flag when new 12.0 release has the attribute -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) // TODO: Fix this properly as SAI_PORT_ATTR_COND_ENTROPY_REHASH_PERIOD_US // port extension attribute is removed and no longer supported. // This is just a workaround to integrate BRCM SAI 11.7 GA @@ -263,7 +263,7 @@ SaiPortTraits::Attributes::AttributeCondEntropyRehashPeriodUS::operator()() { std::optional SaiPortTraits::Attributes::AttributeCondEntropyRehashSeed::operator()() { // TODO(zecheng): Update flag when new 12.0 release has the attribute -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_PORT_ATTR_COND_ENTROPY_REHASH_SEED; #else return std::nullopt; diff --git a/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp b/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp index 80229a79abaf8..2317473220db3 100644 --- a/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp @@ -75,7 +75,7 @@ SaiSwitchTraits::Attributes::AttributeSdkBootTimeWrapper::operator()() { std::optional SaiSwitchTraits::Attributes:: AttributeSramFreePercentXoffThWrapper::operator()() { // TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XOFF_TH; #else return std::nullopt; @@ -85,7 +85,7 @@ std::optional SaiSwitchTraits::Attributes:: std::optional SaiSwitchTraits::Attributes:: AttributeSramFreePercentXonThWrapper::operator()() { // TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XON_TH; #else return std::nullopt; diff --git a/fboss/agent/hw/sai/api/bcm/TamApi.cpp b/fboss/agent/hw/sai/api/bcm/TamApi.cpp index a2addb6b82605..d25a93b568587 100644 --- a/fboss/agent/hw/sai/api/bcm/TamApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/TamApi.cpp @@ -19,7 +19,7 @@ SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { std::optional SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_TAM_EVENT_ATTR_DEVICE_ID; #endif return std::nullopt; @@ -27,7 +27,7 @@ SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_TAM_EVENT_ATTR_EVENT_ID; #endif return std::nullopt; @@ -35,7 +35,7 @@ SaiTamEventTraits::Attributes::AttributeEventId::operator()() { std::optional SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_TAM_EVENT_ATTR_EXTENSIONS_COLLECTOR_LIST; #endif return std::nullopt; @@ -43,7 +43,7 @@ SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { std::optional SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_TAM_EVENT_ATTR_PACKET_DROP_TYPE_MMU; #endif return std::nullopt; @@ -51,7 +51,7 @@ SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { std::optional SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_TAM_EVENT_ATTR_AGING_GROUP; #endif return std::nullopt; diff --git a/fboss/agent/hw/sai/store/SaiStore.h b/fboss/agent/hw/sai/store/SaiStore.h index 61fc951f121d5..2a92d12a1acde 100644 --- a/fboss/agent/hw/sai/store/SaiStore.h +++ b/fboss/agent/hw/sai/store/SaiStore.h @@ -627,7 +627,7 @@ class SaiStore { SaiObjectStore, SaiObjectStore, SaiObjectStore, -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) SaiObjectStore, #endif SaiObjectStore, diff --git a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp index cc8b3ac657901..a6bd97742288c 100644 --- a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp @@ -541,7 +541,7 @@ SaiBufferProfileTraits::CreateAttributes SaiBufferManager::profileCreateAttrs( } #endif // TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) // Unused, set default value as 0 sharedFadtMinTh = 0; sramFadtMaxTh = 0; @@ -638,7 +638,7 @@ SaiBufferManager::ingressProfileCreateAttrs( sharedFadtMaxTh = config.maxSharedXoffThresholdBytes().value_or(0); #endif // TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) sharedFadtMinTh = config.minSharedXoffThresholdBytes().value_or(0); sramFadtMaxTh = config.maxSramXoffThresholdBytes().value_or(0); sramFadtMinTh = config.minSramXoffThresholdBytes().value_or(0); diff --git a/fboss/agent/hw/sai/switch/SaiMirrorManager.cpp b/fboss/agent/hw/sai/switch/SaiMirrorManager.cpp index c7cb8b1efb657..d87fcfe2a6e98 100644 --- a/fboss/agent/hw/sai/switch/SaiMirrorManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiMirrorManager.cpp @@ -70,7 +70,7 @@ SaiMirrorHandle::SaiMirror SaiMirrorManager::addNodeSflow( auto truncateSize = mirror->getTruncate() ? platform_->getAsic()->getMirrorTruncateSize() : 0; std::optional tcBufferLimit; -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) // TODO: Fix this to be picked up from eventor VoQ config. // For now, defaulting to 1M. tcBufferLimit = 1000000; diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index bc6dc04e80b29..d562a43461b32 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -1512,7 +1512,7 @@ std::shared_ptr SaiPortManager::swPortFromAttributes( port->setScope(platform_->getPlatformMapping()->getPortScope(port->getID())); // TODO(zecheng): Update flag when new 12.0 release has the attribute -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) port->setReachabilityGroupId( GET_OPT_ATTR(Port, CondEntropyRehashEnable, attributes)); #endif @@ -2966,7 +2966,7 @@ void SaiPortManager::changeTxEnable( void SaiPortManager::updateConditionalEntropySeed(PortID portID, uint32_t seed) const { // TODO(zecheng): Update flag when new 12.0 release has the attribute -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) auto portHandle = getPortHandle(portID); if (!portHandle) { throw FbossError( diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index abc5856e9b780..b6cbb8887f5d9 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -86,7 +86,7 @@ extern "C" { #include -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) #include #ifndef IS_OSS_BRCM_SAI #include @@ -3830,7 +3830,7 @@ std::string SaiSwitch::listObjects( objTypes.push_back(SAI_OBJECT_TYPE_TAM_TRANSPORT); objTypes.push_back(SAI_OBJECT_TYPE_TAM_REPORT); objTypes.push_back(SAI_OBJECT_TYPE_TAM_EVENT_ACTION); -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) objTypes.push_back(static_cast( SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP)); #endif diff --git a/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp index 63cffe61bf128..13639e35617ce 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp @@ -1011,7 +1011,7 @@ void SaiSwitchManager::setReachabilityGroupList(int reachabilityGroupListSize) { void SaiSwitchManager::setSramGlobalFreePercentXoffTh( uint8_t sramFreePercentXoffThreshold) { -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) switch_->setOptionalAttribute( SaiSwitchTraits::Attributes::SramFreePercentXoffTh{ sramFreePercentXoffThreshold}); @@ -1020,7 +1020,7 @@ void SaiSwitchManager::setSramGlobalFreePercentXoffTh( void SaiSwitchManager::setSramGlobalFreePercentXonTh( uint8_t sramFreePercentXonThreshold) { -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) switch_->setOptionalAttribute( SaiSwitchTraits::Attributes::SramFreePercentXonTh{ sramFreePercentXonThreshold}); diff --git a/fboss/agent/hw/sai/switch/SaiTamManager.h b/fboss/agent/hw/sai/switch/SaiTamManager.h index adae1ce1a21de..7390439b5b686 100644 --- a/fboss/agent/hw/sai/switch/SaiTamManager.h +++ b/fboss/agent/hw/sai/switch/SaiTamManager.h @@ -16,7 +16,7 @@ using SaiTamCollector = SaiObject; using SaiTamTransport = SaiObject; using SaiTamReport = SaiObject; using SaiTamEventAction = SaiObject; -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) using SaiTamEventAgingGroup = SaiObject; #endif using SaiTamEvent = SaiObject; @@ -27,7 +27,7 @@ struct SaiTamHandle { std::shared_ptr transport; std::shared_ptr report; std::shared_ptr action; -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) std::shared_ptr agingGroup; #endif std::shared_ptr event; diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index 179cb1cb0e12c..bc0cd5606b6a0 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -644,7 +644,7 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( std::optional condEntropyRehashEnable{}; // TODO(zecheng): Update flag when new 12.0 release has the attribute -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) condEntropyRehashEnable = swPort->getConditionalEntropyRehash(); #endif diff --git a/fboss/agent/hw/sai/tracer/SaiTracer.cpp b/fboss/agent/hw/sai/tracer/SaiTracer.cpp index 48448378ba932..f57c1d3826148 100644 --- a/fboss/agent/hw/sai/tracer/SaiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/SaiTracer.cpp @@ -196,7 +196,7 @@ sai_status_t __wrap_sai_api_query( return rv; } -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) if (UNLIKELY(sai_api_id >= SAI_API_MAX)) { switch (static_cast(sai_api_id)) { case SAI_API_TAM_EVENT_AGING_GROUP: @@ -1349,7 +1349,7 @@ vector SaiTracer::setAttrList( to(sai_attribute, "[", i, "].id=", attr_list[i].id)); } -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) if (UNLIKELY(object_type >= SAI_OBJECT_TYPE_MAX)) { switch (static_cast(object_type)) { case SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP: @@ -1884,7 +1884,7 @@ void SaiTracer::initVarCounts() { varCounts_.emplace(SAI_OBJECT_TYPE_TAM_TRANSPORT, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM_REPORT, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM_EVENT_ACTION, 0); -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) varCounts_.emplace( static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), 0); #endif diff --git a/fboss/agent/hw/sai/tracer/SaiTracer.h b/fboss/agent/hw/sai/tracer/SaiTracer.h index f2c165570b132..c61aad37b1725 100644 --- a/fboss/agent/hw/sai/tracer/SaiTracer.h +++ b/fboss/agent/hw/sai/tracer/SaiTracer.h @@ -28,7 +28,7 @@ extern "C" { #include -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) #include #ifndef IS_OSS_BRCM_SAI #include @@ -246,7 +246,7 @@ class SaiTracer { sai_switch_api_t* switchApi_; sai_system_port_api_t* systemPortApi_; sai_tam_api_t* tamApi_; -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) sai_tam_event_aging_group_api_t* tamEventAgingGroupApi_; #endif sai_tunnel_api_t* tunnelApi_; @@ -424,7 +424,7 @@ class SaiTracer { {SAI_OBJECT_TYPE_TAM_TRANSPORT, "tamTransport_"}, {SAI_OBJECT_TYPE_TAM_REPORT, "tamReport_"}, {SAI_OBJECT_TYPE_TAM_EVENT_ACTION, "tamEventAction_"}, -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) {static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), "tamEventAgingGroup_"}, #endif @@ -493,7 +493,7 @@ class SaiTracer { {SAI_OBJECT_TYPE_TAM_TRANSPORT, "tam_api->"}, {SAI_OBJECT_TYPE_TAM_REPORT, "tam_api->"}, {SAI_OBJECT_TYPE_TAM_EVENT_ACTION, "tam_api->"}, -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) {static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), "tam_event_aging_group_api->"}, #endif diff --git a/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp b/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp index d6228cde623b9..6049cc4019818 100644 --- a/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp @@ -8,7 +8,8 @@ * */ -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) || \ + defined(SAI_VERSION_11_7_0_0_DNX_ODP) #include "fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h" #include diff --git a/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h b/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h index 1011b43d69605..1f06729f8c237 100644 --- a/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h +++ b/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h @@ -2,7 +2,8 @@ #pragma once -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) || \ + defined(SAI_VERSION_11_7_0_0_DNX_ODP) #include "fboss/agent/hw/sai/tracer/SaiTracer.h" diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index ebbf884a7327a..b83a27ff54160 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -260,7 +260,7 @@ std::string SaiPlatform::getHwAsicConfig( addNameValue(entry); } -#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) if (getAsic()->isSupported(HwAsic::Feature::EVENTOR_PORT_FOR_SFLOW)) { // Interim workaround for 11.0.0.14 as this SoC property is needed for // J3AI 11.x but not for 12.x until 12.0.0.3. From 3bc256d6ec2f191d706b030828ada159bc0852e9 Mon Sep 17 00:00:00 2001 From: Siva Muthusamy Date: Thu, 31 Oct 2024 07:56:02 -0700 Subject: [PATCH 459/479] Add custom_feature_shel_arm_enable SoC property for 11.x in FBOSS Summary: Add custom_feature_shel_arm_enable SoC property for 11.x in FBOSS as this is needed for BRCM SAI 11.x but not for 12.x until 12.0.0.4. Reviewed By: shri-khare, zechengh09 Differential Revision: D65256304 fbshipit-source-id: 2c77d3cdc07d5a591d8bcdd3235c2fc2591ae659 --- fboss/agent/platforms/sai/SaiPlatform.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index b83a27ff54160..c0b0f0d52db57 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -262,11 +262,12 @@ std::string SaiPlatform::getHwAsicConfig( #if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) if (getAsic()->isSupported(HwAsic::Feature::EVENTOR_PORT_FOR_SFLOW)) { - // Interim workaround for 11.0.0.14 as this SoC property is needed for - // J3AI 11.x but not for 12.x until 12.0.0.3. - // TODO: While integrating 12.0.0.3, this workaround needs to be removed + // Interim workaround for 11.7 GA as this SoC property is needed for + // J3AI 11.x but not for 12.x until 12.0.0.3/4. + // TODO: While integrating 12.0.0.3/4, these workarounds need to be removed // and instead this SoC property would be added in config directly. nameValStrs.push_back("eventor_sbus_dma_channels.BCM8889X=0,6,0,7"); + nameValStrs.push_back("custom_feature_shel_arm_enable=1"); } #endif From fc90edb8a8179173cfe32c7a3df67d6e675fd1aa Mon Sep 17 00:00:00 2001 From: Open Source Bot Date: Thu, 31 Oct 2024 09:35:37 -0700 Subject: [PATCH 460/479] Updating hashes Summary: GitHub commits: https://github.com/facebook/buck2-prelude/commit/effd26497788faac86ee651d650bf0dd4404137e https://github.com/facebook/fb303/commit/416aa3d1ff335d0dea665989ade77dd9f2a2a99c https://github.com/facebook/fbthrift/commit/78e5b27861982706b85ff5c9009c68d360f042aa https://github.com/facebook/folly/commit/b8b1850df06e286ab510dafc1ebe7ab91ecd4141 https://github.com/facebook/mvfst/commit/ae605980c573045f2f62cd1255070fa2a64cf296 https://github.com/facebook/proxygen/commit/0deaf77d78dbfdc6201750d5855cbddbe4fd1ae3 https://github.com/facebook/wangle/commit/1fc174e3de49c385f33b4fbb4a4e8e0798e15122 https://github.com/facebookexperimental/edencommon/commit/7cbd7dc1a508223adc2dbde4402cdecaa8d0eebf https://github.com/facebookexperimental/rust-shed/commit/cf8f8b9164647c1d6a444fd6ee43687b1e58bdc3 https://github.com/facebookincubator/fizz/commit/787df81d7a579315e35b71500fc358582045c2a5 Reviewed By: bigfootjon fbshipit-source-id: a8f61a0323778581d6ac72309c08adc5137d869c --- build/deps/github_hashes/facebook/fb303-rev.txt | 2 +- build/deps/github_hashes/facebook/fbthrift-rev.txt | 2 +- build/deps/github_hashes/facebook/folly-rev.txt | 2 +- build/deps/github_hashes/facebook/wangle-rev.txt | 2 +- build/deps/github_hashes/facebookincubator/fizz-rev.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index d1233b66bcfbb..8e015d90924ae 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit 1a4fff202da044af641d798d4cb56cdbfd9763bf +Subproject commit 416aa3d1ff335d0dea665989ade77dd9f2a2a99c diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index 484bbf4ddc7ff..cbd71d447a7cb 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit 2baf516fb71c49cbafe3c3cfc553967312dfd61b +Subproject commit 78e5b27861982706b85ff5c9009c68d360f042aa diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index 7de8dd00a40bc..130acc11a3986 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 9173e457bed6af0d058e9f338af31a716a415f83 +Subproject commit b8b1850df06e286ab510dafc1ebe7ab91ecd4141 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 8eeda4f1fbebf..0bdab7884f4c5 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit 79c465452e6d3aa6adf2e833546af925dc02d96c +Subproject commit 1fc174e3de49c385f33b4fbb4a4e8e0798e15122 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index fdca345191d3a..39b94d8548efe 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit 1065a55361c21a84b41e1bb512a01df46e5bc834 +Subproject commit 787df81d7a579315e35b71500fc358582045c2a5 From 59c4d7e4919ff9bc31967a0175e76d5da9a6e67f Mon Sep 17 00:00:00 2001 From: Parvez Shaikh Date: Thu, 31 Oct 2024 10:32:05 -0700 Subject: [PATCH 461/479] set weight for scheduler only when type is DWRR Summary: as per SAI [spec](https://github.com/opencomputeproject/SAI/blob/master/inc/saischeduler.h#L79C19-L79C53), weight is valid only when scheduler type is DWRR Differential Revision: D65074552 Privacy Context Container: L1125642 fbshipit-source-id: f78e74773e237bf0f96f1c8ff5501aba4b02cb6a --- fboss/agent/hw/sai/switch/SaiSchedulerManager.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/fboss/agent/hw/sai/switch/SaiSchedulerManager.cpp b/fboss/agent/hw/sai/switch/SaiSchedulerManager.cpp index 2cbe848fb9783..5fdc3cc5c7be5 100644 --- a/fboss/agent/hw/sai/switch/SaiSchedulerManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiSchedulerManager.cpp @@ -24,11 +24,19 @@ namespace { SaiSchedulerTraits::CreateAttributes makeSchedulerAttributes( const PortQueue& portQueue) { sai_scheduling_type_t type = SAI_SCHEDULING_TYPE_STRICT; - uint8_t weight = 0; + std::optional weight; if (portQueue.getScheduling() == QueueScheduling::WEIGHTED_ROUND_ROBIN) { type = SAI_SCHEDULING_TYPE_DWRR; weight = portQueue.getWeight(); } +#if defined(BRCM_SAI_SDK_XGS_AND_DNX) || defined(TAJO_SAI_SDK) + else { + // BRCM SAI returns weight of 1 on warm boot even if create api was invoked + // without this, retain old behavior for TAJO SAI in which weight if 0 was + // set to 1 otherwise weight given in switch config (only for DWRR) + weight = 1; + } +#endif uint64_t minBwRate = 0, maxBwRate = 0; int32_t meterType = SAI_METER_TYPE_BYTES; if (const auto& portQueueRate = portQueue.getPortQueueRate()) { @@ -73,9 +81,8 @@ SaiSchedulerTraits::CreateAttributes makeSchedulerAttributes( break; } } - // weight 0 is invalid return SaiSchedulerTraits::CreateAttributes( - {type, !weight ? 1 : weight, meterType, minBwRate, maxBwRate}); + {type, weight, meterType, minBwRate, maxBwRate}); } } // namespace From 75d935d9f70b9028b6ad0c30f54ca0ccd5077ffd Mon Sep 17 00:00:00 2001 From: Ravi Vantipalli Date: Thu, 31 Oct 2024 11:13:19 -0700 Subject: [PATCH 462/479] Convert UDF group adapterHostKey to string Summary: More than 1 UDF group can be created with same type and length. Reviewed By: zechengh09 Differential Revision: D64421048 fbshipit-source-id: 6aad980842c14c967647c6f0e78c4afa97f9cf9b --- fboss/agent/hw/sai/api/UdfApi.h | 4 +- fboss/agent/hw/sai/store/SaiObject.cpp | 12 ++++ fboss/agent/hw/sai/store/SaiStore.h | 10 +++ .../agent/hw/sai/store/tests/UdfStoreTest.cpp | 72 ++++++++++++------- fboss/agent/hw/sai/switch/SaiUdfManager.cpp | 9 ++- .../hw/sai/switch/tests/UdfManagerTest.cpp | 1 + fboss/agent/state/UdfGroup.cpp | 7 ++ fboss/agent/state/UdfGroup.h | 1 + 8 files changed, 87 insertions(+), 29 deletions(-) diff --git a/fboss/agent/hw/sai/api/UdfApi.h b/fboss/agent/hw/sai/api/UdfApi.h index 634a2521eb2ee..bf80454cc8804 100644 --- a/fboss/agent/hw/sai/api/UdfApi.h +++ b/fboss/agent/hw/sai/api/UdfApi.h @@ -101,7 +101,9 @@ struct SaiUdfGroupTraits { using AdapterKey = UdfGroupSaiId; using CreateAttributes = std::tuple, Attributes::Length>; - using AdapterHostKey = CreateAttributes; + // there can more than 1 UDF group with same type and length + // Use name from switchState as adapterHostKey + using AdapterHostKey = std::string; }; SAI_ATTRIBUTE_NAME(UdfGroup, Type); diff --git a/fboss/agent/hw/sai/store/SaiObject.cpp b/fboss/agent/hw/sai/store/SaiObject.cpp index 00acc1012e353..6abb8fab5b170 100644 --- a/fboss/agent/hw/sai/store/SaiObject.cpp +++ b/fboss/agent/hw/sai/store/SaiObject.cpp @@ -222,5 +222,17 @@ SaiObject::follyDynamicToAdapterHostKey( folly::dynamic json) { return json.asString(); } + +template <> +folly::dynamic SaiObject::adapterHostKeyToFollyDynamic() { + return adapterHostKey_; +} + +template <> +typename SaiUdfGroupTraits::AdapterHostKey +SaiObject::follyDynamicToAdapterHostKey( + folly::dynamic json) { + return json.asString(); +} } // namespace fboss } // namespace facebook diff --git a/fboss/agent/hw/sai/store/SaiStore.h b/fboss/agent/hw/sai/store/SaiStore.h index 2a92d12a1acde..6ca2abaa9cc91 100644 --- a/fboss/agent/hw/sai/store/SaiStore.h +++ b/fboss/agent/hw/sai/store/SaiStore.h @@ -47,6 +47,10 @@ template <> struct AdapterHostKeyWarmbootRecoverable : std::false_type { }; +template <> +struct AdapterHostKeyWarmbootRecoverable : std::false_type { +}; + #if defined(BRCM_SAI_SDK_XGS_AND_DNX) template <> struct AdapterHostKeyWarmbootRecoverable : std::false_type {}; @@ -441,6 +445,12 @@ class SaiObjectStore { // state. return ObjectType(key); } + if constexpr (std::is_same_v) { + // UDF groups are similar to ACL tables above where adapterHostKey is + // a string. This if condition is strictly not required and here only + // to allow build + return ObjectType(key, SaiUdfGroupTraits::AdapterHostKey{"udfGroup"}); + } #if defined(BRCM_SAI_SDK_XGS) if constexpr (std::is_same_v) { // Allow warm boot from version which doesn't save ahk diff --git a/fboss/agent/hw/sai/store/tests/UdfStoreTest.cpp b/fboss/agent/hw/sai/store/tests/UdfStoreTest.cpp index 4d789d451e1ed..baf2b5c6f5035 100644 --- a/fboss/agent/hw/sai/store/tests/UdfStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/UdfStoreTest.cpp @@ -18,12 +18,19 @@ using namespace facebook::fboss; class UdfStoreTest : public SaiStoreTest { public: - UdfGroupSaiId createUdfGroup( + SaiUdfGroupTraits::CreateAttributes createAttributes( sai_udf_group_type_t udfGroupType, sai_uint16_t udfGroupLength) { SaiUdfGroupTraits::Attributes::Type type{udfGroupType}; SaiUdfGroupTraits::Attributes::Length length{udfGroupLength}; - return saiApiTable->udfApi().create({type, length}, 0); + return {type, length}; + } + + UdfGroupSaiId createUdfGroup( + sai_udf_group_type_t udfGroupType, + sai_uint16_t udfGroupLength) { + return saiApiTable->udfApi().create( + createAttributes(udfGroupType, udfGroupLength), 0); } UdfMatchSaiId createUdfMatch( @@ -56,14 +63,6 @@ class UdfStoreTest : public SaiStoreTest { {udfMatchIdAttr, udfGroupIdAttr, baseAttr, offsetAttr}, 0); } - SaiUdfGroupTraits::AdapterHostKey udfGroupAdapterHostKey( - sai_udf_group_type_t udfGroupType, - sai_uint16_t udfGroupLength) { - SaiUdfGroupTraits::Attributes::Type type{udfGroupType}; - SaiUdfGroupTraits::Attributes::Length length{udfGroupLength}; - return SaiUdfGroupTraits::AdapterHostKey{type, length}; - } - SaiUdfMatchTraits::AdapterHostKey udfMatchAdapterHostKey( const std::pair& l2TypePair, const std::pair& l3TypePair, @@ -129,31 +128,52 @@ class UdfStoreTest : public SaiStoreTest { }; TEST_F(UdfStoreTest, loadUdfGroup) { - auto udfGroupId0 = createUdfGroup(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); - auto udfGroupId1 = - createUdfGroup(SAI_UDF_GROUP_TYPE_GENERIC, kUdfGroupLength() + 1); + auto udfGroupId = createUdfGroup(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); SaiStore s(0); s.reload(); auto& store = s.get(); - auto k0 = udfGroupAdapterHostKey(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); - auto k1 = - udfGroupAdapterHostKey(SAI_UDF_GROUP_TYPE_GENERIC, kUdfGroupLength() + 1); + SaiUdfGroupTraits::AdapterHostKey k{"udfGroup"}; - EXPECT_EQ(store.get(k0)->adapterKey(), udfGroupId0); - EXPECT_EQ(store.get(k1)->adapterKey(), udfGroupId1); + EXPECT_EQ(store.get(k)->adapterKey(), udfGroupId); +} + +TEST_F(UdfStoreTest, loadUdfGroup2) { + SaiUdfGroupTraits::AdapterHostKey k0{"udfGroup0"}; + SaiUdfGroupTraits::AdapterHostKey k1{"udfGroup1"}; + + SaiStore s(0); + auto& store = s.get(); + auto obj0 = store.setObject( + k0, createAttributes(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength())); + auto obj1 = store.setObject( + k1, createAttributes(SAI_UDF_GROUP_TYPE_GENERIC, kUdfGroupLength() + 1)); + + EXPECT_EQ(store.get(k0)->adapterKey(), obj0->adapterKey()); + EXPECT_EQ(store.get(k1)->adapterKey(), obj1->adapterKey()); + + auto adapterKeys = s.adapterKeysFollyDynamic(); + auto adapterKeys2AdapterHostKeys = + s.adapterKeys2AdapterHostKeysFollyDynamic(); + SaiStore s1(0); + s1.reload(&adapterKeys, &adapterKeys2AdapterHostKeys); + auto& store1 = s.get(); + + EXPECT_EQ(store1.get(k0)->adapterKey(), obj0->adapterKey()); + EXPECT_EQ(store1.get(k1)->adapterKey(), obj1->adapterKey()); } TEST_F(UdfStoreTest, udfGroupCtor) { auto udfGroupId = createUdfGroup(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); - auto obj = createObj(udfGroupId); + SaiUdfGroupTraits::AdapterHostKey k{"udfGroup"}; + auto obj = createObj(udfGroupId, k); EXPECT_EQ(obj.adapterKey(), udfGroupId); } TEST_F(UdfStoreTest, udfGroupCreateCtor) { SaiUdfGroupTraits::CreateAttributes c{ SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()}; - auto k = udfGroupAdapterHostKey(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); + SaiUdfGroupTraits::AdapterHostKey k{"udfGroup"}; auto obj = createObj(k, c, 0); EXPECT_EQ( GET_OPT_ATTR(UdfGroup, Type, obj.attributes()), SAI_UDF_GROUP_TYPE_HASH); @@ -223,17 +243,15 @@ TEST_F(UdfStoreTest, toStrUdfMatchStore) { TEST_F(UdfStoreTest, loadUdf) { auto udfMatchId0 = createUdfMatch(kL2Type(), kL3Type(), kL4DstPort()); auto udfMatchId1 = createUdfMatch(kL2Type2(), kL3Type2(), kL4DstPort2()); - auto udfGroupId0 = createUdfGroup(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); - auto udfGroupId1 = - createUdfGroup(SAI_UDF_GROUP_TYPE_GENERIC, kUdfGroupLength() + 1); - auto udfId0 = createUdf(udfMatchId0, udfGroupId0); - auto udfId1 = createUdf(udfMatchId1, udfGroupId1); + auto udfGroupId = createUdfGroup(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); + auto udfId0 = createUdf(udfMatchId0, udfGroupId); + auto udfId1 = createUdf(udfMatchId1, udfGroupId); SaiStore s(0); s.reload(); auto& store = s.get(); - auto k0 = udfAdapterHostKey(udfMatchId0, udfGroupId0); - auto k1 = udfAdapterHostKey(udfMatchId1, udfGroupId1); + auto k0 = udfAdapterHostKey(udfMatchId0, udfGroupId); + auto k1 = udfAdapterHostKey(udfMatchId1, udfGroupId); EXPECT_EQ(store.get(k0)->adapterKey(), udfId0); EXPECT_EQ(store.get(k1)->adapterKey(), udfId1); diff --git a/fboss/agent/hw/sai/switch/SaiUdfManager.cpp b/fboss/agent/hw/sai/switch/SaiUdfManager.cpp index e813fadaec2e2..7462e8f868517 100644 --- a/fboss/agent/hw/sai/switch/SaiUdfManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiUdfManager.cpp @@ -33,6 +33,12 @@ SaiUdfGroupTraits::CreateAttributes SaiUdfManager::udfGroupAttr( const std::shared_ptr swUdfGroup) const { // Type auto typeAttr = SaiUdfGroupTraits::Attributes::Type{SAI_UDF_GROUP_TYPE_HASH}; + // TODO(ravi) ensure config gen include type for hash also for SAI + CHECK(swUdfGroup->getUdfGroupType().has_value()); + cfg::UdfGroupType udfGroupType = swUdfGroup->getUdfGroupType().value(); + if (udfGroupType == cfg::UdfGroupType::ACL) { + typeAttr = SaiUdfGroupTraits::Attributes::Type{SAI_UDF_GROUP_TYPE_GENERIC}; + } // Length auto lengthAttr = SaiUdfGroupTraits::Attributes::Length{ static_cast(swUdfGroup->getFieldSizeInBytes())}; @@ -74,8 +80,9 @@ UdfGroupSaiId SaiUdfManager::addUdfGroup( // Create Sai UDF group auto udfGroupCreateAttr = udfGroupAttr(swUdfGroup); auto& udfGroupStore = saiStore_->get(); + SaiUdfGroupTraits::AdapterHostKey adapterHostKey{swUdfGroup->getName()}; auto saiUdfGroup = - udfGroupStore.setObject(udfGroupCreateAttr, udfGroupCreateAttr); + udfGroupStore.setObject(adapterHostKey, udfGroupCreateAttr); auto udfGroupHandle = std::make_unique(); udfGroupHandle->udfGroup = saiUdfGroup; diff --git a/fboss/agent/hw/sai/switch/tests/UdfManagerTest.cpp b/fboss/agent/hw/sai/switch/tests/UdfManagerTest.cpp index 2231d782af018..3bdbc84e8833a 100644 --- a/fboss/agent/hw/sai/switch/tests/UdfManagerTest.cpp +++ b/fboss/agent/hw/sai/switch/tests/UdfManagerTest.cpp @@ -78,6 +78,7 @@ class UdfManagerTest : public ManagerTestBase { swUdfGroup->setStartOffsetInBytes(kOffset()); swUdfGroup->setFieldSizeInBytes(kFieldSize()); swUdfGroup->setUdfPacketMatcherIds(matcherIds); + swUdfGroup->setUdfGroupType(cfg::UdfGroupType::HASH); return swUdfGroup; } diff --git a/fboss/agent/state/UdfGroup.cpp b/fboss/agent/state/UdfGroup.cpp index aa2201448a453..c54c70cdb10b4 100644 --- a/fboss/agent/state/UdfGroup.cpp +++ b/fboss/agent/state/UdfGroup.cpp @@ -46,6 +46,13 @@ int UdfGroup::getFieldSizeInBytes() const { return get()->cref(); } +void UdfGroup::setUdfGroupType(std::optional type) { + if (type) { + set(*type); + } else { + ref().reset(); + } +} void UdfGroup::setUdfBaseHeader(cfg::UdfBaseHeaderType header) { set(header); } diff --git a/fboss/agent/state/UdfGroup.h b/fboss/agent/state/UdfGroup.h index 06672ccb35cac..381691f2efc0b 100644 --- a/fboss/agent/state/UdfGroup.h +++ b/fboss/agent/state/UdfGroup.h @@ -33,6 +33,7 @@ class UdfGroup : public ThriftStructNode { int getFieldSizeInBytes() const; std::vector getUdfPacketMatcherIds() const; + void setUdfGroupType(std::optional type); void setUdfBaseHeader(cfg::UdfBaseHeaderType header); void setStartOffsetInBytes(int offset); void setFieldSizeInBytes(int size); From ced42ae12578b266cae6cf6b98b575d8bf3fd132 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 31 Oct 2024 12:36:54 -0700 Subject: [PATCH 463/479] Adapt getInbandSystemPortID to work with multi ASIC VOQ systems Summary: We need to derive inband port Ids in 2 scenarios. Local switchIds - here we can use the generic getSystemPortID functions which leverages port Id range information (we have that for local switches). Remote switchIds - here we don't have the remote switch id's port range. So we can't leverage the generic getSystemPortID function. Alternatives 1. Embed inband port id offset (instead of inband port ID) in the inbandPortId field in config. Rename the field as inbandPortOffset. 2. Embed port id range in DsfNode struct. 1 is lighter weight and hence used right now. Reviewed By: msomasundaran Differential Revision: D65258518 fbshipit-source-id: 61a4f496b51fb863fe0e9d34549d67dc2c002446 --- fboss/agent/Utils.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 5f920ef93d7d8..6091774e81a38 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -446,12 +446,25 @@ SystemPortID getInbandSystemPortID( if (!switchInfoItr->second.inbandPortId().has_value()) { throw FbossError("Inband port id not set for: ", switchId); } - return getSystemPortID( - PortID(*switchInfoItr->second.inbandPortId()), - // Inband port scope is always global - cfg::Scope::GLOBAL, - switchId2Info, - switchId); + if (!switchInfoItr->second.globalSystemPortOffset().has_value()) { + throw FbossError("Global sys port offset not set for ", switchId); + } + /* + * We need to derive inband port Ids in 2 scenarios. + * Local switchIds - here we can use the generic getSystemPortID functions + * which leverages port Id range information (we have that for local + * switches). Remote switchIds - here we don't have the remote switch id's + * port range. So we can't leverage the generic getSystemPortID function. + * Alternatives + * 1. Embed inband port id offset (instead of inband port ID) in the + * inbandPortId field in config. Rename the field as inbandPortOffset. + * 2. Embed port id range in DsfNode struct. + * + * 1 is lighter weight and hence used right now. + */ + return SystemPortID( + *switchInfoItr->second.globalSystemPortOffset() + + *switchInfoItr->second.inbandPortId()); } cfg::Range64 getFirstSwitchSystemPortIdRange( From 71612f083a19aec85ea1643d8ba8ecf219e70c52 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Thu, 31 Oct 2024 12:36:54 -0700 Subject: [PATCH 464/479] Use getInbandSystemPortId when computing recycle port rif Summary: As titled Reviewed By: simuthus-fb Differential Revision: D65258519 fbshipit-source-id: 1dd82c21d0bf02972859c5bc1021f04dd8f75e02 --- fboss/agent/test/TestUtils.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fboss/agent/test/TestUtils.cpp b/fboss/agent/test/TestUtils.cpp index 447ea1d99ac2b..c65d6a1e6516f 100644 --- a/fboss/agent/test/TestUtils.cpp +++ b/fboss/agent/test/TestUtils.cpp @@ -165,13 +165,13 @@ std::vector getLoopbackIps(int64_t switchIdVal) { return {v6, v4}; } -uint16_t recycleSysPortId(const cfg::DsfNode& node) { - return *node.systemPortRange()->minimum() + 1; -} - -cfg::Interface getRecyclePortRif(const cfg::DsfNode& myNode) { +cfg::Interface getRecyclePortRif( + const cfg::DsfNode& myNode, + const cfg::SwitchConfig& cfg) { cfg::Interface recyclePortRif; - recyclePortRif.intfID() = recycleSysPortId(myNode); + recyclePortRif.intfID() = static_cast(getInbandSystemPortID( + *cfg.switchSettings()->switchIdToSwitchInfo(), + SwitchID(*myNode.switchId()))); recyclePortRif.type() = cfg::InterfaceType::SYSTEM_PORT; for (const auto& address : getLoopbackIps(*myNode.switchId())) { recyclePortRif.ipAddresses()->push_back(address); @@ -180,7 +180,7 @@ cfg::Interface getRecyclePortRif(const cfg::DsfNode& myNode) { } void addRecyclePortRif(const cfg::DsfNode& myNode, cfg::SwitchConfig& cfg) { - cfg::Interface recyclePortRif = getRecyclePortRif(myNode); + cfg::Interface recyclePortRif = getRecyclePortRif(myNode, cfg); cfg.interfaces()->push_back(recyclePortRif); } @@ -415,7 +415,7 @@ cfg::SwitchConfig testConfigBImpl() { recyclePort.portType() = cfg::PortType::RECYCLE_PORT; recyclePorts.push_back(recyclePort); - auto recycleRif = getRecyclePortRif(myNode); + auto recycleRif = getRecyclePortRif(myNode, cfg); recycleIntfs.push_back(recycleRif); } for (auto recyclePort : recyclePorts) { From 063389a194540cc7f2b301bdffd8e2d1a466ed4e Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Thu, 31 Oct 2024 15:28:23 -0700 Subject: [PATCH 465/479] Add a test thrift api to verify mpls route Summary: As titled adding an api for mpls route verification Reviewed By: jasmeetbagga Differential Revision: D64413677 fbshipit-source-id: 2c547f837b3790b80b4e6d48b2d55405f903d6ee --- CMakeLists.txt | 1 + fboss/agent/if/BUCK | 1 + fboss/agent/if/agent_hw_test_ctrl.thrift | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a60d7f0bf6d90..61909288ef5a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -670,6 +670,7 @@ add_fbthrift_cpp_library( fboss_cpp2 switch_state_cpp2 network_address_cpp2 + mpls_cpp2 phy_cpp2 prbs_cpp2 OPTIONS diff --git a/fboss/agent/if/BUCK b/fboss/agent/if/BUCK index 1866a5c2d696d..9705aaa08cd50 100644 --- a/fboss/agent/if/BUCK +++ b/fboss/agent/if/BUCK @@ -298,6 +298,7 @@ thrift_library( ]}, deps = [ ":ctrl", + ":mpls", "//common/network/if:if", "//fboss/agent:switch_config", "//fboss/agent:switch_state", diff --git a/fboss/agent/if/agent_hw_test_ctrl.thrift b/fboss/agent/if/agent_hw_test_ctrl.thrift index 34b9f3be9b5ed..b44ac11168cf9 100644 --- a/fboss/agent/if/agent_hw_test_ctrl.thrift +++ b/fboss/agent/if/agent_hw_test_ctrl.thrift @@ -9,6 +9,7 @@ include "thrift/annotation/cpp.thrift" include "fboss/agent/switch_state.thrift" include "fboss/agent/switch_config.thrift" include "fboss/agent/if/ctrl.thrift" +include "fboss/agent/if/mpls.thrift" include "common/network/if/Address.thrift" struct NeighborInfo { @@ -90,6 +91,12 @@ service AgentHwTestCtrl { 1: ctrl.IpPrefix prefix, 2: Address.BinaryAddress address, ); + bool isProgrammedInHw( + 1: i32 intfID, + 2: ctrl.IpPrefix prefix, + 3: mpls.MplsLabelStack labelStack, + 4: i32 refCount, + ); // port utils list getPortInfo(1: list portIds); From bdea693adb92e21e0917f48a37534e83d29f1e71 Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Thu, 31 Oct 2024 15:28:23 -0700 Subject: [PATCH 466/479] mpls stack verification api implementation Summary: Implementation for new api Reviewed By: jasmeetbagga Differential Revision: D64448702 fbshipit-source-id: 65bb7e76b5c98bd1c531b9e992df4f56af5a8ae5 --- .../tests/HwTestRouteUtilsThriftHandler.cpp | 20 +++ .../hw_test/HwTestRouteUtilsThriftHandler.cpp | 154 ++++++++++++++++++ fboss/agent/hw/test/HwTestThriftHandler.h | 5 + 3 files changed, 179 insertions(+) diff --git a/fboss/agent/hw/bcm/tests/HwTestRouteUtilsThriftHandler.cpp b/fboss/agent/hw/bcm/tests/HwTestRouteUtilsThriftHandler.cpp index f0603d812748d..92a5dc9b2344f 100644 --- a/fboss/agent/hw/bcm/tests/HwTestRouteUtilsThriftHandler.cpp +++ b/fboss/agent/hw/bcm/tests/HwTestRouteUtilsThriftHandler.cpp @@ -6,6 +6,7 @@ #include "fboss/agent/hw/bcm/BcmAddressFBConvertors.h" #include "fboss/agent/hw/bcm/BcmError.h" #include "fboss/agent/hw/bcm/BcmHost.h" +#include "fboss/agent/hw/bcm/BcmIntf.h" #include "fboss/agent/types.h" using facebook::fboss::bcmCheckError; @@ -257,6 +258,25 @@ bool HwTestThriftHandler::isRouteToNexthop( std::nullopt); } +bool HwTestThriftHandler::isProgrammedInHw( + int intfID, + std::unique_ptr /*prefix*/, + std::unique_ptr labelStack, + int refCount) { + if (labelStack->empty()) { + return static_cast(hwSwitch_) + ->getIntfTable() + ->getBcmIntfIf(InterfaceID(intfID)) + ->getLabeledTunnelRefCount(*labelStack) == refCount; + } else { + return static_cast(hwSwitch_) + ->getIntfTable() + ->getBcmIntfIf(InterfaceID(intfID)) + ->getLabeledTunnelRefCount(LabelForwardingAction::LabelStack{ + labelStack->begin() + 1, labelStack->end()}) == refCount; + } +} + } // namespace utility } // namespace fboss } // namespace facebook diff --git a/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp b/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp index b051de22810bf..643e6692347dc 100644 --- a/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp +++ b/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp @@ -7,6 +7,7 @@ #include "fboss/agent/hw/sai/api/SaiApiTable.h" #include "fboss/agent/hw/sai/switch/SaiCounterManager.h" #include "fboss/agent/hw/sai/switch/SaiManagerTable.h" +#include "fboss/agent/hw/sai/switch/SaiRouterInterfaceManager.h" #include "fboss/agent/hw/sai/switch/SaiSwitch.h" #include "fboss/agent/hw/sai/switch/SaiSwitchManager.h" #include "fboss/agent/hw/sai/switch/SaiVirtualRouterManager.h" @@ -33,6 +34,66 @@ bool isEgressToIp(folly::IPAddress addr, sai_object_id_t adapterKey) { } } +template +sai_object_id_t getNextHopId( + const HwSwitch* hwSwitch, + typename facebook::fboss::Route::Prefix prefix) { + auto saiSwitch = static_cast(hwSwitch); + // Query the nexthop ID given the route prefix + folly::IPAddress prefixNetwork{prefix.network()}; + folly::CIDRNetwork follyPrefix{prefixNetwork, prefix.mask()}; + auto virtualRouterHandle = + saiSwitch->managerTable()->virtualRouterManager().getVirtualRouterHandle( + RouterID(0)); + CHECK(virtualRouterHandle); + auto routeEntry = SaiRouteTraits::RouteEntry( + saiSwitch->getSaiSwitchId(), + virtualRouterHandle->virtualRouter->adapterKey(), + follyPrefix); + return SaiApiTable::getInstance()->routeApi().getAttribute( + routeEntry, SaiRouteTraits::Attributes::NextHopId()); +} + +template +facebook::fboss::NextHopSaiId getNextHopSaiId( + const facebook::fboss::HwSwitch* hwSwitch, + typename facebook::fboss::Route::Prefix prefix) { + return static_cast( + getNextHopId(hwSwitch, prefix)); +} + +facebook::fboss::NextHopSaiId getNextHopSaiIdForMember( + facebook::fboss::NextHopGroupMemberSaiId member) { + return static_cast( + SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( + member, + facebook::fboss::SaiNextHopGroupMemberTraits::Attributes:: + NextHopId{})); +} + +std::vector getNextHopMembers( + facebook::fboss::NextHopGroupSaiId group) { + auto members = SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( + group, + facebook::fboss::SaiNextHopGroupTraits::Attributes::NextHopMemberList{}); + std::vector nexthops{}; + for (auto member : members) { + auto nexthop = getNextHopSaiIdForMember( + static_cast(member)); + nexthops.push_back(nexthop); + } + return nexthops; +} + +std::vector getNextHops(sai_object_id_t id) { + auto type = sai_object_type_query(id); + if (type == SAI_OBJECT_TYPE_NEXT_HOP) { + return {static_cast(id)}; + } + EXPECT_EQ(type, SAI_OBJECT_TYPE_NEXT_HOP_GROUP); + return getNextHopMembers(static_cast(id)); +} + SaiRouteTraits::RouteEntry getSaiRouteAdapterKey( const SaiSwitch* saiSwitch, RouterID rid, @@ -220,6 +281,76 @@ bool isRouteUnresolvedToCpuClassId( facebook::fboss::cfg::AclLookupClass::DST_CLASS_L3_LOCAL_2; } +// Verifies that the stack is programmed correctly. +// Reference count has no meaning in SAI and we assume that there always is a +// labelStack programmed for nexthop when this function is called. +template +bool verifyProgrammedStack( + const HwSwitch* hwSwitch, + typename facebook::fboss::Route::Prefix prefix, + const facebook::fboss::InterfaceID& intfID, + const facebook::fboss::LabelForwardingAction::LabelStack& stack, + long /* unused */) { + auto* saiSwitch = static_cast(hwSwitch); + auto& nextHopApi = SaiApiTable::getInstance()->nextHopApi(); + sai_object_id_t nexthopId = + static_cast(getNextHopSaiId(hwSwitch, prefix)); + auto nexthopIds = getNextHops(nexthopId); + auto intfHandle = saiSwitch->managerTable() + ->routerInterfaceManager() + .getRouterInterfaceHandle(intfID); + auto intfKey = intfHandle->adapterKey(); + bool found = false; + bool verified = true; + for (auto nextHopId : nexthopIds) { + auto intfObjId = nextHopApi.getAttribute( + nextHopId, + facebook::fboss::SaiMplsNextHopTraits::Attributes::RouterInterfaceId()); + if (intfObjId != intfKey) { + continue; + } + found = true; + // If stack is empty, simply check if the labelStack is programmed + // If the stack is empty, check if the labelstack has a label with MPLS + // Else, check that the stacks match + if (stack.empty()) { + if (nextHopApi.getAttribute( + nextHopId, + facebook::fboss::SaiMplsNextHopTraits::Attributes::Type()) != + SAI_NEXT_HOP_TYPE_IP) { + XLOG(DBG2) << "nexthop is not of type IP"; + verified = false; + } + } else { + if (nextHopApi.getAttribute( + nextHopId, + facebook::fboss::SaiMplsNextHopTraits::Attributes::Type()) != + SAI_NEXT_HOP_TYPE_MPLS) { + XLOG(DBG2) << "nexthop is not of type MPLS"; + verified = false; + } + auto labelStack = nextHopApi.getAttribute( + nextHopId, + facebook::fboss::SaiMplsNextHopTraits::Attributes::LabelStack{}); + if (labelStack.size() != stack.size()) { + XLOG(DBG2) << "label stack size mismatch " << labelStack.size() << " " + << stack.size(); + verified = false; + } + for (int i = 0; i < labelStack.size(); i++) { + if (labelStack[i] != stack[i]) { + XLOG(DBG2) << "label stack mismatch " << labelStack[i] << " " + << stack[i]; + verified = false; + } + } + } + break; + } + XLOG(DBG2) << "found " << found << " verified " << verified; + return found && verified; +} + } // namespace namespace facebook { @@ -272,6 +403,29 @@ bool HwTestThriftHandler::isRouteToNexthop( std::nullopt); } +bool HwTestThriftHandler::isProgrammedInHw( + int intfID, + std::unique_ptr prefix, + std::unique_ptr labelStack, + int refCount) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + if (routePrefix.first.isV4()) { + auto pfx = RoutePrefix{ + network::toIPAddress(*prefix->ip()).asV4(), + static_cast(*prefix->prefixLength())}; + return verifyProgrammedStack( + hwSwitch_, pfx, InterfaceID(intfID), *labelStack, refCount); + } else { + auto pfx = RoutePrefix{ + network::toIPAddress(*prefix->ip()).asV6(), + static_cast(*prefix->prefixLength())}; + return verifyProgrammedStack( + hwSwitch_, pfx, InterfaceID(intfID), *labelStack, refCount); + } + return true; +} + } // namespace utility } // namespace fboss } // namespace facebook diff --git a/fboss/agent/hw/test/HwTestThriftHandler.h b/fboss/agent/hw/test/HwTestThriftHandler.h index edadf71e96e9a..49ee6be01ead9 100644 --- a/fboss/agent/hw/test/HwTestThriftHandler.h +++ b/fboss/agent/hw/test/HwTestThriftHandler.h @@ -89,6 +89,11 @@ class HwTestThriftHandler : public AgentHwTestCtrlSvIf { bool isRouteToNexthop( std::unique_ptr prefix, std::unique_ptr nexthop) override; + bool isProgrammedInHw( + int intfID, + std::unique_ptr prefix, + std::unique_ptr labelStack, + int refCount) override; void getPortInfo( ::std::vector<::facebook::fboss::utility::PortInfo>& portInfos, From 58abcb5fc088cb842dd496a5bc870420b15f8df4 Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Thu, 31 Oct 2024 15:28:23 -0700 Subject: [PATCH 467/479] Port StaticIp2MplsRoutes route test to agent test framework Summary: porting the test to agent hw test framework Reviewed By: jasmeetbagga Differential Revision: D64448701 fbshipit-source-id: ee9bcba5c10e7b23c0d4a1061959a5b19f298cb6 --- .../test/agent_hw_tests/AgentRouteTests.cpp | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp b/fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp index 47d96540b9fcd..90cc129731943 100644 --- a/fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp @@ -67,6 +67,24 @@ bool isRouteToNexthop( auto client = ensemble.getHwAgentTestClient(switchId); return client->sync_isRouteToNexthop(prefix, toBinaryAddress(nexthop)); } + +template +bool verifyProgrammedStack( + typename facebook::fboss::Route::Prefix routePrefix, + const facebook::fboss::InterfaceID& intfID, + const facebook::fboss::LabelForwardingAction::LabelStack& stack, + long refCount, + facebook::fboss::AgentEnsemble& ensemble) { + auto switchId = ensemble.getSw() + ->getScopeResolver() + ->scope(ensemble.masterLogicalPortIds()) + .switchId(); + facebook::fboss::IpPrefix prefix; + prefix.ip() = toBinaryAddress(routePrefix.network()); + prefix.prefixLength() = routePrefix.mask(); + auto client = ensemble.getHwAgentTestClient(switchId); + return client->sync_isProgrammedInHw(intfID, prefix, stack, refCount); +} } // namespace namespace facebook::fboss { @@ -485,6 +503,65 @@ TYPED_TEST(AgentRouteTest, ResolvedMultiNexthopToUnresolvedSingleNexthop) { this->verifyAcrossWarmBoots([] {}, verify); } +TYPED_TEST(AgentRouteTest, StaticIp2MplsRoutes) { + using AddrT = typename TestFixture::Type; + + auto setup = [=, this]() { + auto config = this->initialConfig(*this->getAgentEnsemble()); + + config.staticIp2MplsRoutes()->resize(1); + config.staticIp2MplsRoutes()[0].prefix() = this->kGetRoutePrefix1().str(); + + NextHopThrift nexthop; + nexthop.address() = toBinaryAddress(folly::IPAddress( + this->kStaticIp2MplsNextHop().str())); // in prefix 0 subnet + MplsAction action; + action.action() = MplsActionCode::PUSH; + action.pushLabels() = {1001, 1002}; + nexthop.mplsAction() = action; + + config.staticIp2MplsRoutes()[0].nexthops()->resize(1); + config.staticIp2MplsRoutes()[0].nexthops()[0] = nexthop; + this->applyNewConfig(config); + + // resolve prefix 0 subnet + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes( + &wrapper, + {PortDescriptor(this->masterLogicalInterfacePortIds()[0]), + PortDescriptor(this->masterLogicalInterfacePortIds()[1])}, + {this->kGetRoutePrefix0()}); + + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops( + in, + {PortDescriptor(this->masterLogicalInterfacePortIds()[0]), + PortDescriptor(this->masterLogicalInterfacePortIds()[1])}); + return newState; + }); + }; + auto verify = [=, this]() { + // prefix 1 subnet reachable via prefix 0 with mpls stack over this stack + WITH_RETRIES({ + EXPECT_EVENTUALLY_TRUE(verifyProgrammedStack( + this->kGetRoutePrefix1(), + InterfaceID(utility::kBaseVlanId), + {1001, 1002}, + 1, + *this->getAgentEnsemble())); + EXPECT_EVENTUALLY_TRUE(verifyProgrammedStack( + this->kGetRoutePrefix1(), + InterfaceID(utility::kBaseVlanId + 1), + {1001, 1002}, + 1, + *this->getAgentEnsemble())); + }); + }; + this->verifyAcrossWarmBoots(setup, verify); +} + TYPED_TEST(AgentRouteTest, VerifyRouting) { using AddrT = typename TestFixture::Type; auto constexpr isV4 = std::is_same_v; From fe7e38a3506a677616affb0669c0b7d737fc391b Mon Sep 17 00:00:00 2001 From: Midhun Somasundaran Date: Thu, 31 Oct 2024 15:28:23 -0700 Subject: [PATCH 468/479] Retire migrated hw route tests Summary: Retiring the old tests Reviewed By: jasmeetbagga Differential Revision: D64492385 fbshipit-source-id: b67cfb59432c93dee1afc127d28fe498767bdd37 --- fboss/agent/hw/test/HwRouteTests.cpp | 649 +-------------------------- 1 file changed, 1 insertion(+), 648 deletions(-) diff --git a/fboss/agent/hw/test/HwRouteTests.cpp b/fboss/agent/hw/test/HwRouteTests.cpp index 4df02d662f535..053f3174c4771 100644 --- a/fboss/agent/hw/test/HwRouteTests.cpp +++ b/fboss/agent/hw/test/HwRouteTests.cpp @@ -8,30 +8,13 @@ * */ #include "fboss/agent/hw/test/HwLinkStateDependentTest.h" -#include "fboss/agent/state/LabelForwardingAction.h" -#include "fboss/agent/hw/switch_asics/HwAsic.h" +#include "fboss/agent/AddressUtil.h" #include "fboss/agent/hw/test/ConfigFactory.h" -#include "fboss/agent/hw/test/HwTestMplsUtils.h" -#include "fboss/agent/hw/test/HwTestPacketUtils.h" #include "fboss/agent/hw/test/HwTestRouteUtils.h" -#include "fboss/agent/packet/PktFactory.h" -#include "fboss/agent/packet/PktUtil.h" -#include "fboss/agent/state/NodeBase-defs.h" -#include "fboss/agent/state/Port.h" -#include "fboss/agent/state/StateUtils.h" -#include "fboss/agent/test/EcmpSetupHelper.h" -#include "fboss/agent/test/utils/CoppTestUtils.h" -#include "fboss/agent/test/utils/OlympicTestUtils.h" -#include "fboss/lib/CommonUtils.h" - -#include "fboss/agent/AddressUtil.h" -#include "fboss/agent/if/gen-cpp2/common_types.h" #include "folly/IPAddressV4.h" #include "folly/IPAddressV6.h" -#include - using facebook::network::toBinaryAddress; DECLARE_bool(intf_nbr_tables); @@ -61,41 +44,6 @@ class HwRouteTest : public HwLinkStateDependentTest { return RouterID(0); } - cfg::AclLookupClass kLookupClass() const { - return cfg::AclLookupClass::CLASS_QUEUE_PER_HOST_QUEUE_2; - } - - std::vector portDescs() const { - std::vector ports; - for (auto i = 0; i < 4; ++i) { - ports.push_back(PortDescriptor(masterLogicalInterfacePortIds()[i])); - } - return ports; - } - RoutePrefix getSubnetIpForInterface() const { - auto state = this->getProgrammedState(); - const VlanID vlanID{utility::kBaseVlanId}; - auto vlan = state->getVlans()->getNodeIf(vlanID); - auto interface = state->getInterfaces()->getNodeIf(vlan->getInterfaceID()); - if (interface) { - for (auto iter : std::as_const(*interface->getAddresses())) { - std::pair address( - folly::IPAddress(iter.first), iter.second->ref()); - if constexpr (std::is_same_v) { - if (address.first.isV4()) { - return RoutePrefix{ - address.first.asV4(), address.second}; - } - } else { - if (address.first.isV6()) { - return RoutePrefix{ - address.first.asV6(), address.second}; - } - } - } - } - XLOG(FATAL) << "Invald configuration vlan " << utility::kBaseVlanId; - } const std::vector> kGetRoutePrefixes() const { if constexpr (std::is_same_v) { static const std::vector> routePrefixes = { @@ -120,23 +68,6 @@ class HwRouteTest : public HwLinkStateDependentTest { } } - RoutePrefix kDefaultPrefix() const { - if constexpr (std::is_same_v) { - return RoutePrefix{folly::IPAddressV4{"0.0.0.0"}, 0}; - - } else { - return RoutePrefix{folly::IPAddressV6{"::"}, 0}; - } - } - - const AddrT kStaticIp2MplsNextHop() const { - if constexpr (std::is_same_v) { - return folly::IPAddressV4{"10.10.1.1"}; - } else { - return folly::IPAddressV6{"2803:6080:d038:3063::1"}; - } - } - RoutePrefix kGetRoutePrefix0() const { return kGetRoutePrefixes()[0]; } @@ -152,586 +83,8 @@ class HwRouteTest : public HwLinkStateDependentTest { RoutePrefix kGetRoutePrefix3() const { return kGetRoutePrefixes()[3]; } - - std::shared_ptr addRoutes( - const std::shared_ptr& inState, - const std::vector>& routePrefixes) { - auto kEcmpWidth = 1; - utility::EcmpSetupAnyNPorts ecmpHelper(inState, kRouterID()); - applyNewState(ecmpHelper.resolveNextHops(getProgrammedState(), kEcmpWidth)); - ecmpHelper.programRoutes( - this->getRouteUpdater(), kEcmpWidth, routePrefixes); - return getProgrammedState(); - } - - void verifyClassIDHelper( - RoutePrefix routePrefix, - std::optional classID) { - EXPECT_EQ( - utility::getHwRouteClassID( - this->getHwSwitch(), - kRouterID(), - folly::CIDRNetwork(routePrefix.network(), routePrefix.mask())), - classID); - } }; -using IpTypes = ::testing::Types; - -TYPED_TEST_SUITE(HwRouteTest, IpTypes); - -TYPED_TEST(HwRouteTest, VerifyClassID) { - auto setup = [=, this]() { - // 3 routes r0, r1, r2. r0 & r1 have classID, r2 does not. - this->addRoutes( - this->getProgrammedState(), - {this->kGetRoutePrefix0(), - this->kGetRoutePrefix1(), - this->kGetRoutePrefix2()}); - auto updater = this->getHwSwitchEnsemble()->getRouteUpdater(); - updater.programClassID( - this->kRouterID(), - {this->kGetRoutePrefix0().toCidrNetwork(), - this->kGetRoutePrefix1().toCidrNetwork()}, - this->kLookupClass(), - false /*sync*/); - - // verify classID programming - this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); - this->verifyClassIDHelper(this->kGetRoutePrefix1(), this->kLookupClass()); - this->verifyClassIDHelper(this->kGetRoutePrefix2(), std::nullopt); - - // remove r1's classID, add classID for r2 - updater.programClassID( - this->kRouterID(), - {this->kGetRoutePrefix1().toCidrNetwork()}, - std::nullopt, - false /*sync*/); - updater.programClassID( - this->kRouterID(), - {this->kGetRoutePrefix2().toCidrNetwork()}, - this->kLookupClass(), - false /*sync*/); - }; - - auto verify = [=, this]() { - this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); - this->verifyClassIDHelper(this->kGetRoutePrefix1(), std::nullopt); - this->verifyClassIDHelper(this->kGetRoutePrefix2(), this->kLookupClass()); - }; - - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, VerifyClassIDForConnectedRoute) { - auto verify = [=, this]() { - auto ipAddr = this->getSubnetIpForInterface(); - // verify if the connected route of the interface is present - utility::isHwRoutePresent( - this->getHwSwitch(), this->kRouterID(), ipAddr.toCidrNetwork()); - if (this->getPlatform()->getAsic()->getAsicVendor() != - HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { - if (FLAGS_set_classid_for_my_subnet_and_ip_routes) { - this->verifyClassIDHelper( - ipAddr, cfg::AclLookupClass::DST_CLASS_L3_LOCAL_2); - } - } - }; - - this->verifyAcrossWarmBoots([] {}, verify); -} - -TYPED_TEST(HwRouteTest, VerifyClassIdWithNhopResolutionFlap) { - auto setup = [=, this]() { - this->addRoutes(this->getProgrammedState(), {this->kGetRoutePrefix0()}); - auto updater = this->getHwSwitchEnsemble()->getRouteUpdater(); - updater.programClassID( - this->kRouterID(), - {this->kGetRoutePrefix0().toCidrNetwork()}, - this->kLookupClass(), - false /*sync*/); - - // verify classID programming - this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); - auto kEcmpWidth = 1; - using AddrT = typename TestFixture::Type; - utility::EcmpSetupAnyNPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - // Unresolve nhop - this->applyNewState( - ecmpHelper.unresolveNextHops(this->getProgrammedState(), kEcmpWidth)); - // Resolve nhop - this->applyNewState( - ecmpHelper.resolveNextHops(this->getProgrammedState(), kEcmpWidth)); - }; - auto verify = [=, this]() { - this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); - }; - - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, UnresolvedAndResolvedNextHop) { - using AddrT = typename TestFixture::Type; - auto ports = this->portDescs(); - auto setup = [=, this]() { - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - ecmpHelper.programRoutes( - this->getRouteUpdater(), {ports[0]}, {this->kGetRoutePrefix0()}); - - this->applyNewState( - ecmpHelper.resolveNextHops(this->getProgrammedState(), {ports[1]})); - ecmpHelper.programRoutes( - this->getRouteUpdater(), {ports[1]}, {this->kGetRoutePrefix1()}); - }; - auto verify = [=, this]() { - auto routePrefix0 = this->kGetRoutePrefix0(); - auto cidr0 = - folly::CIDRNetwork(routePrefix0.network(), routePrefix0.mask()); - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - EXPECT_TRUE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr0)); - EXPECT_FALSE(utility::isHwRouteMultiPath( - this->getHwSwitch(), this->kRouterID(), cidr0)); - - auto routePrefix1 = this->kGetRoutePrefix1(); - auto cidr1 = - folly::CIDRNetwork(routePrefix1.network(), routePrefix1.mask()); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr1, - ecmpHelper.nhop(ports[1]).ip)); - EXPECT_FALSE(utility::isHwRouteMultiPath( - this->getHwSwitch(), this->kRouterID(), cidr1)); - }; - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, UnresolveResolvedNextHop) { - using AddrT = typename TestFixture::Type; - - auto setup = [=, this]() { - utility::EcmpSetupAnyNPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - this->applyNewState( - ecmpHelper.resolveNextHops(this->getProgrammedState(), 1)); - - ecmpHelper.programRoutes( - this->getRouteUpdater(), 1, {this->kGetRoutePrefix0()}); - this->applyNewState( - ecmpHelper.unresolveNextHops(this->getProgrammedState(), 1)); - }; - auto verify = [=, this]() { - auto routePrefix = this->kGetRoutePrefix0(); - auto cidr = folly::CIDRNetwork(routePrefix.network(), routePrefix.mask()); - EXPECT_TRUE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr)); - EXPECT_FALSE(utility::isHwRouteMultiPath( - this->getHwSwitch(), this->kRouterID(), cidr)); - }; - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, UnresolvedAndResolvedMultiNextHop) { - using AddrT = typename TestFixture::Type; - auto ports = this->portDescs(); - auto setup = [=, this]() { - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - ecmpHelper.programRoutes( - this->getRouteUpdater(), - {ports[0], ports[1]}, - {this->kGetRoutePrefix0()}); - - this->applyNewState(ecmpHelper.resolveNextHops( - this->getProgrammedState(), {ports[2], ports[3]})); - ecmpHelper.programRoutes( - this->getRouteUpdater(), - {ports[2], ports[3]}, - {this->kGetRoutePrefix1()}); - }; - auto verify = [=, this]() { - auto routePrefix0 = this->kGetRoutePrefix0(); - auto cidr0 = - folly::CIDRNetwork(routePrefix0.network(), routePrefix0.mask()); - EXPECT_FALSE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr0)); - EXPECT_TRUE(utility::isHwRouteMultiPath( - this->getHwSwitch(), this->kRouterID(), cidr0)); - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - EXPECT_FALSE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr0, - ecmpHelper.nhop(ports[0]).ip)); - EXPECT_FALSE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr0, - ecmpHelper.nhop(ports[1]).ip)); - - auto routePrefix1 = this->kGetRoutePrefix1(); - auto cidr1 = - folly::CIDRNetwork(routePrefix1.network(), routePrefix1.mask()); - EXPECT_FALSE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr1)); - EXPECT_TRUE(utility::isHwRouteMultiPath( - this->getHwSwitch(), this->kRouterID(), cidr1)); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr1, - ecmpHelper.nhop(ports[2]).ip)); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr1, - ecmpHelper.nhop(ports[3]).ip)); - }; - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, ResolvedMultiNexthopToUnresolvedSingleNexthop) { - auto ports = this->portDescs(); - using AddrT = typename TestFixture::Type; - auto verify = [=, this]() { - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - this->applyNewState(ecmpHelper.resolveNextHops( - this->getProgrammedState(), {ports[0], ports[1]})); - ecmpHelper.programRoutes( - this->getRouteUpdater(), - {ports[0], ports[1]}, - {this->kGetRoutePrefix0()}); - auto routePrefix0 = this->kGetRoutePrefix0(); - auto cidr0 = - folly::CIDRNetwork(routePrefix0.network(), routePrefix0.mask()); - EXPECT_FALSE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr0)); - EXPECT_TRUE(utility::isHwRouteMultiPath( - this->getHwSwitch(), this->kRouterID(), cidr0)); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr0, - ecmpHelper.nhop(ports[0]).ip)); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr0, - ecmpHelper.nhop(ports[1]).ip)); - this->applyNewState(ecmpHelper.unresolveNextHops( - this->getProgrammedState(), - {PortDescriptor(this->masterLogicalInterfacePortIds()[0]), - PortDescriptor(this->masterLogicalInterfacePortIds()[1])})); - this->applyNewState(ecmpHelper.resolveNextHops( - this->getProgrammedState(), - {PortDescriptor(this->masterLogicalInterfacePortIds()[0])})); - ecmpHelper.programRoutes( - this->getRouteUpdater(), - {PortDescriptor(this->masterLogicalInterfacePortIds()[0])}, - {this->kGetRoutePrefix0()}); - }; - this->verifyAcrossWarmBoots([] {}, verify); -} - -TYPED_TEST(HwRouteTest, StaticIp2MplsRoutes) { - using AddrT = typename TestFixture::Type; - - auto setup = [=, this]() { - auto config = this->initialConfig(); - - config.staticIp2MplsRoutes()->resize(1); - config.staticIp2MplsRoutes()[0].prefix() = this->kGetRoutePrefix1().str(); - - NextHopThrift nexthop; - nexthop.address() = toBinaryAddress(folly::IPAddress( - this->kStaticIp2MplsNextHop().str())); // in prefix 0 subnet - MplsAction action; - action.action() = MplsActionCode::PUSH; - action.pushLabels() = {1001, 1002}; - nexthop.mplsAction() = action; - - config.staticIp2MplsRoutes()[0].nexthops()->resize(1); - config.staticIp2MplsRoutes()[0].nexthops()[0] = nexthop; - this->applyNewConfig(config); - - // resolve prefix 0 subnet - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - ecmpHelper.programRoutes( - this->getRouteUpdater(), - {PortDescriptor(this->masterLogicalInterfacePortIds()[0]), - PortDescriptor(this->masterLogicalInterfacePortIds()[1])}, - {this->kGetRoutePrefix0()}); - - this->applyNewState(ecmpHelper.resolveNextHops( - this->getProgrammedState(), - {PortDescriptor(this->masterLogicalInterfacePortIds()[0]), - PortDescriptor(this->masterLogicalInterfacePortIds()[1])})); - }; - auto verify = [=, this]() { - // prefix 1 subnet reachable via prefix 0 with mpls stack over this stack - utility::verifyProgrammedStack( - this->getHwSwitch(), - this->kGetRoutePrefix1(), - InterfaceID(utility::kBaseVlanId), - {1001, 1002}, - 1); - utility::verifyProgrammedStack( - this->getHwSwitch(), - this->kGetRoutePrefix1(), - InterfaceID(utility::kBaseVlanId + 1), - {1001, 1002}, - 1); - }; - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, VerifyRouting) { - if (this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_FAKE || - this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_MOCK) { - GTEST_SKIP(); - return; - } - using AddrT = typename TestFixture::Type; - auto constexpr isV4 = std::is_same_v; - auto ports = this->portDescs(); - auto setup = [=, this]() { - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - this->applyNewState( - ecmpHelper.resolveNextHops(this->getProgrammedState(), {ports[0]})); - ecmpHelper.programRoutes( - this->getRouteUpdater(), {ports[0]}, {this->kDefaultPrefix()}); - }; - auto verify = [=, this]() { - const auto egressPort = ports[0].phyPortID(); - auto vlanId = utility::firstVlanID(this->initialConfig()); - auto intfMac = utility::getFirstInterfaceMac(this->getProgrammedState()); - - auto beforeOutPkts = - *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); - auto v4TxPkt = utility::makeUDPTxPacket( - this->getHwSwitch(), - vlanId, - intfMac, - intfMac, - folly::IPAddressV4("101.0.0.1"), - folly::IPAddressV4("201.0.0.1"), - 1234, - 4321); - - auto v6TxPkt = utility::makeUDPTxPacket( - this->getHwSwitch(), - vlanId, - intfMac, - intfMac, - folly::IPAddressV6("101::1"), - folly::IPAddressV6("201::1"), - 1234, - 4321); - - if (isV4) { - this->getHwSwitchEnsemble()->ensureSendPacketOutOfPort( - std::move(v4TxPkt), ports[1].phyPortID()); - } else { - this->getHwSwitchEnsemble()->ensureSendPacketOutOfPort( - std::move(v6TxPkt), ports[1].phyPortID()); - } - WITH_RETRIES({ - auto afterOutPkts = - *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); - XLOG(DBG2) << "Stats:: beforeOutPkts: " << beforeOutPkts - << " afterOutPkts: " << afterOutPkts; - EXPECT_EVENTUALLY_EQ(afterOutPkts - 1, beforeOutPkts); - }); - }; - - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, verifyHostRouteChange) { - // Don't run this test on fake asic - if (this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_FAKE || - this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_MOCK) { - GTEST_SKIP(); - return; - } - - using AddrT = typename TestFixture::Type; - auto ports = this->portDescs(); - - auto setup = [=, this]() { - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - this->applyNewState(ecmpHelper.resolveNextHops( - this->getProgrammedState(), {ports[0], ports[1]})); - ecmpHelper.programRoutes( - this->getRouteUpdater(), {ports[1]}, {this->kGetRoutePrefix3()}); - ecmpHelper.programRoutes( - this->getRouteUpdater(), - {ports[0], ports[1]}, - {this->kGetRoutePrefix3()}); - }; - - auto verify = [=, this]() { - auto routePrefix = this->kGetRoutePrefix3(); - auto cidr = folly::CIDRNetwork(routePrefix.network(), routePrefix.mask()); - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr, - ecmpHelper.nhop(ports[0]).ip)); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr, - ecmpHelper.nhop(ports[1]).ip)); - }; - - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, verifyCpuRouteChange) { - // Don't run this test on fake asic - if (this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_FAKE || - this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_MOCK) { - GTEST_SKIP(); - return; - } - - using AddrT = typename TestFixture::Type; - auto ports = this->portDescs(); - - auto setup = [=, this]() { - auto cfg = this->initialConfig(); - auto ensemble = this->getHwSwitchEnsemble(); - utility::addOlympicQosMaps(cfg, ensemble->getL3Asics()); - utility::setDefaultCpuTrafficPolicyConfig( - cfg, ensemble->getL3Asics(), ensemble->isSai()); - utility::addCpuQueueConfig(cfg, ensemble->getL3Asics(), ensemble->isSai()); - this->applyNewConfig(cfg); - - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - // Next hops unresolved - route should point to CPU - ecmpHelper.programRoutes( - this->getRouteUpdater(), {ports[1]}, {this->kGetRoutePrefix3()}); - }; - - auto verify = [=, this]() { - auto routePrefix = this->kGetRoutePrefix3(); - auto cidr = folly::CIDRNetwork(routePrefix.network(), routePrefix.mask()); - EXPECT_TRUE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr)); - if (FLAGS_classid_for_unresolved_routes) { - EXPECT_TRUE(utility::isRouteUnresolvedToCpuClassId( - this->getHwSwitch(), this->kRouterID(), cidr)); - } - - // Resolve next hops - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - this->applyNewState( - ecmpHelper.resolveNextHops(this->getProgrammedState(), {ports[1]})); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr, - ecmpHelper.nhop(ports[1]).ip)); - if (FLAGS_classid_for_unresolved_routes) { - EXPECT_FALSE(utility::isRouteUnresolvedToCpuClassId( - this->getHwSwitch(), this->kRouterID(), cidr)); - } - - // Verify routing - const auto egressPort = ports[1].phyPortID(); - auto vlanId = utility::firstVlanID(this->initialConfig()); - auto intfMac = utility::getFirstInterfaceMac(this->getProgrammedState()); - auto beforeOutPkts = - *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); - auto v6TxPkt = utility::makeUDPTxPacket( - this->getHwSwitch(), - vlanId, - intfMac, - intfMac, - this->kGetRoutePrefix0().network(), // Randomly pick src IP - routePrefix.network(), - 1234, - 4321); - this->getHwSwitchEnsemble()->ensureSendPacketOutOfPort( - std::move(v6TxPkt), ports[0].phyPortID()); - WITH_RETRIES({ - auto afterOutPkts = - *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); - XLOG(DBG2) << "Stats:: beforeOutPkts: " << beforeOutPkts - << " afterOutPkts: " << afterOutPkts; - EXPECT_EVENTUALLY_EQ(afterOutPkts - 1, beforeOutPkts); - }); - - // Unresolve next hops - this->applyNewState( - ecmpHelper.unresolveNextHops(this->getProgrammedState(), {ports[1]})); - EXPECT_TRUE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr)); - if (FLAGS_classid_for_unresolved_routes) { - EXPECT_TRUE(utility::isRouteUnresolvedToCpuClassId( - this->getHwSwitch(), this->kRouterID(), cidr)); - } - - // Resolve next hops - this->applyNewState( - ecmpHelper.resolveNextHops(this->getProgrammedState(), {ports[1]})); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr, - ecmpHelper.nhop(ports[1]).ip)); - if (FLAGS_classid_for_unresolved_routes) { - EXPECT_FALSE(utility::isRouteUnresolvedToCpuClassId( - this->getHwSwitch(), this->kRouterID(), cidr)); - } - - // Unresolve next hops - this->applyNewState( - ecmpHelper.unresolveNextHops(this->getProgrammedState(), {ports[1]})); - EXPECT_TRUE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr)); - if (FLAGS_classid_for_unresolved_routes) { - EXPECT_TRUE(utility::isRouteUnresolvedToCpuClassId( - this->getHwSwitch(), this->kRouterID(), cidr)); - } - }; - - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, VerifyDefaultRoute) { - auto verify = [=, this]() { - // default routes should exist always. - utility::isHwRoutePresent( - this->getHwSwitch(), this->kRouterID(), {folly::IPAddress("::"), 0}); - utility::isHwRoutePresent( - this->getHwSwitch(), - this->kRouterID(), - {folly::IPAddress("0.0.0.0"), 0}); - }; - this->verifyAcrossWarmBoots([] {}, verify); -} - template struct IpAddrAndEnableIntfNbrTableT { using AddrT = AddrType; From d01f5dbee30c502c5d27e12a7447931b1c104387 Mon Sep 17 00:00:00 2001 From: genkzgnluxbjeyb Date: Thu, 31 Oct 2024 15:57:42 -0700 Subject: [PATCH 469/479] fboss_qsfp_known_bad_tests_sync Differential Revision: D65286343 fbshipit-source-id: 148426a08ea17f0ad8371c78f8995efa3fe8e6b0 --- .../fboss_qsfp_known_bad_tests.materialized_JSON | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/fboss/oss/qsfp_known_bad_tests/fboss_qsfp_known_bad_tests.materialized_JSON b/fboss/oss/qsfp_known_bad_tests/fboss_qsfp_known_bad_tests.materialized_JSON index 97ecd0788f95c..1548e15a09c7e 100644 --- a/fboss/oss/qsfp_known_bad_tests/fboss_qsfp_known_bad_tests.materialized_JSON +++ b/fboss/oss/qsfp_known_bad_tests/fboss_qsfp_known_bad_tests.materialized_JSON @@ -257,9 +257,6 @@ }, { "test_name_regex": "HwTransceiverResetTest.verifyResetControl$" - }, - { - "test_name_regex": "PhyIOTest.phyIOStats$" } ], "elbert_8x16Q/physdk-credo-0.8.4/credo-0.8.4": [ @@ -277,9 +274,6 @@ }, { "test_name_regex": "HwTransceiverResetTest.verifyResetControl$" - }, - { - "test_name_regex": "PhyIOTest.phyIOStats$" } ], "fuji_5x16Q/physdk-barchetta2-5.2/barchetta2-5.2": [ @@ -308,7 +302,7 @@ "test_name_regex": "HwXphyPortInfoTest.*$" }, { - "test_name_regex": "HwPortPrbsTest.*$" + "test_name_regex": "HwPortPrbsTest.*._true.SetPrbs$" }, { "test_name_regex": "HwTransceiverResetTest.verifyResetControl$" @@ -499,9 +493,6 @@ { "test_name_regex": "HwTransceiverConfigValidationTest.validateAllActiveTransceivers$" }, - { - "test_name_regex": "HwTest.cmisPageChange$" - }, { "test_name_regex": "HwTransceiverResetTest.verifyResetControl$" } From c4722dbe2227074b6418ac8f251db72ad2f59598 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Thu, 31 Oct 2024 22:49:31 -0700 Subject: [PATCH 470/479] Add a test for stats collection memory usage Summary: Add a test to catch unexpected stats collection memory usage growth, by measuring jemalloc stats.allocated size. Reviewed By: zechengh09 Differential Revision: D65084115 fbshipit-source-id: ed36db92e9f07c3ed07cf9433a331f16a45348ad --- .../agent_hw_tests/AgentMemoryUsageTests.cpp | 84 +++++++++++++++++++ fboss/agent/test/agent_hw_tests/BUCK | 2 + 2 files changed, 86 insertions(+) create mode 100644 fboss/agent/test/agent_hw_tests/AgentMemoryUsageTests.cpp diff --git a/fboss/agent/test/agent_hw_tests/AgentMemoryUsageTests.cpp b/fboss/agent/test/agent_hw_tests/AgentMemoryUsageTests.cpp new file mode 100644 index 0000000000000..14b76dd592bb8 --- /dev/null +++ b/fboss/agent/test/agent_hw_tests/AgentMemoryUsageTests.cpp @@ -0,0 +1,84 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include +#include + +#include "fboss/agent/test/AgentHwTest.h" + +using namespace ::testing; + +DEFINE_int32( + memory_test_stats_iterations, + 1000, + "Number of iterations for the test"); + +namespace facebook::fboss { + +constexpr int kWarmupIterations = 60; +constexpr size_t kMemoryHeadroom = 10 << 20; // 10MB + +class AgentMemoryUsageTest : public AgentHwTest { + public: + std::vector + getProductionFeaturesVerified() const override { + return {}; + } + + protected: + void setCmdLineFlagOverrides() const override { + AgentHwTest::setCmdLineFlagOverrides(); + // Disable stats update to improve performance + FLAGS_enable_stats_update_thread = false; + } + + void setupJeMalloc() { + // Disable caching to make stats more accurate. + folly::mallctlWrite("thread.tcache.enabled", false); + folly::mallctlWrite("arenas.dirty_decay_ms", 100); // milliseconds + } + + size_t getMemoryUsage() { + // Update the statistics cached by mallctl. + uint64_t epoch = 1; + folly::mallctlWrite("epoch", epoch); + + size_t usage = 0; + folly::mallctlRead("stats.allocated", &usage); + return usage; + } +}; + +TEST_F(AgentMemoryUsageTest, MeasureStatsCollection) { + if (!folly::usingJEMalloc()) { +#ifdef GTEST_SKIP + GTEST_SKIP() << "This test only works with jemalloc"; +#endif + return; + } + + size_t baseline = 0; + + // The first ~60 updateStats() calls perform some allocation, so measure the + // baseline memory usage after that. + for (int i = 0; i < kWarmupIterations; ++i) { + getAgentEnsemble()->updateStats(); + + size_t current = getMemoryUsage(); + if (current > baseline) { + baseline = current; + } + XLOG(DBG2) << "baseline stats.allocated[" << i << "] = " << baseline; + } + + // Make sure stats collection don't grow memory. We still allow for some + // headroom due to memory usage from other threads, vector resizing, etc. + for (int i = 0; i < FLAGS_memory_test_stats_iterations; i++) { + getAgentEnsemble()->updateStats(); + + size_t current = getMemoryUsage(); + XLOG(DBG2) << "stats.allocated[" << i << "] = " << current; + EXPECT_LE(current, baseline + kMemoryHeadroom); + } +} + +} // namespace facebook::fboss diff --git a/fboss/agent/test/agent_hw_tests/BUCK b/fboss/agent/test/agent_hw_tests/BUCK index f6f46b012b25d..96fcf36c03acd 100644 --- a/fboss/agent/test/agent_hw_tests/BUCK +++ b/fboss/agent/test/agent_hw_tests/BUCK @@ -37,6 +37,7 @@ cpp_library( "AgentLoopBackTests.cpp", "AgentMacLearningAndNeighborResolutionTests.cpp", "AgentMacLearningTests.cpp", + "AgentMemoryUsageTests.cpp", "AgentMirroringTests.cpp", "AgentMmuTuningTests.cpp", "AgentNeighborTests.cpp", @@ -217,6 +218,7 @@ cpp_library( "//folly:network_address", "//folly/json:dynamic", "//folly/logging:logging", + "//folly/memory:mallctl_helper", "//folly/testing:test_util", ], exported_external_deps = [ From 91ddeb574344d4020a4929db2fc02d8da8351a9c Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 1 Nov 2024 00:57:10 -0700 Subject: [PATCH 471/479] Utility APIs for determining whether a RIF, sys port is within node's range Summary: As titled Reviewed By: shri-khare Differential Revision: D65291912 fbshipit-source-id: 4075ced569dab5140dad01963301ea83a169c75d --- fboss/agent/Utils.cpp | 20 ++++++++++++++++++++ fboss/agent/Utils.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 6091774e81a38..f6ef41936bfb9 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -139,7 +139,19 @@ getPlatformMappingForDsfNode(const facebook::fboss::PlatformType platformType) { return nullptr; } +bool withinRange(const cfg::SystemPortRanges& ranges, int64_t id) { + bool inRange{false}; + for (const auto& sysPortRange : *ranges.systemPortRanges()) { + if (id >= *sysPortRange.minimum() && id <= *sysPortRange.maximum()) { + inRange = true; + break; + } + } + return inRange; +} } // namespace + // + void utilCreateDir(folly::StringPiece path) { try { boost::filesystem::create_directories(path.str()); @@ -467,6 +479,14 @@ SystemPortID getInbandSystemPortID( *switchInfoItr->second.inbandPortId()); } +bool withinRange(const cfg::SystemPortRanges& ranges, InterfaceID intfId) { + return withinRange(ranges, static_cast(intfId)); +} + +bool withinRange(const cfg::SystemPortRanges& ranges, SystemPortID sysPortId) { + return withinRange(ranges, static_cast(sysPortId)); +} + cfg::Range64 getFirstSwitchSystemPortIdRange( const std::map& switchToSwitchInfo) { for (const auto& [switchId, switchInfo] : switchToSwitchInfo) { diff --git a/fboss/agent/Utils.h b/fboss/agent/Utils.h index 9549c99fa1bc5..6e6e6571d3a6b 100644 --- a/fboss/agent/Utils.h +++ b/fboss/agent/Utils.h @@ -276,6 +276,9 @@ std::vector getPortsForInterface( InterfaceID intf, const std::shared_ptr& state); +bool withinRange(const cfg::SystemPortRanges& ranges, InterfaceID intfId); + +bool withinRange(const cfg::SystemPortRanges& ranges, SystemPortID sysPortId); /* * An NPU switch injects a broadcast message such as neighbor solicitation or * advertisement via pipeline lookup. ASIC forwards these messages to all the From ae773504e61e86aa6f87122678e3281f585b785f Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 1 Nov 2024 00:57:10 -0700 Subject: [PATCH 472/479] Use the new helper api to determine whether sysports are within range Summary: As titled Reviewed By: shri-khare, srikrishnagopu Differential Revision: D65293047 fbshipit-source-id: 15898b91a22a6818c49a4c925078c9c15be41823 --- fboss/agent/DsfUpdateValidator.cpp | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/fboss/agent/DsfUpdateValidator.cpp b/fboss/agent/DsfUpdateValidator.cpp index 9b5b3be380872..e5f4a2ed5f5a4 100644 --- a/fboss/agent/DsfUpdateValidator.cpp +++ b/fboss/agent/DsfUpdateValidator.cpp @@ -2,6 +2,7 @@ #include "fboss/agent/DsfUpdateValidator.h" #include "fboss/agent/DsfStateUpdaterUtil.h" +#include "fboss/agent/Utils.h" #include "fboss/agent/state/DeltaFunctions.h" #include "fboss/agent/state/InterfaceMap.h" #include "fboss/agent/state/StateDelta.h" @@ -25,23 +26,7 @@ void DsfUpdateValidator::validate( " not found for : ", sysPort.getName()); } - auto sysPortRanges = *dsfNode->getSystemPortRanges().systemPortRanges(); - if (sysPortRanges.empty()) { - throw FbossError( - "No system port range for node ", - dsfNode->getName(), - " corresponding to ", - sysPort.getName()); - } - bool withinRange{false}; - for (const auto& sysPortRange : sysPortRanges) { - if (sysPort.getID() >= *sysPortRange.minimum() && - sysPort.getID() <= *sysPortRange.maximum()) { - withinRange = true; - break; - } - } - if (!withinRange) { + if (!withinRange(dsfNode->getSystemPortRanges(), sysPort.getID())) { throw FbossError( "Sys port : ", sysPort.getName(), From 18d2f4674dec983d9d3e538b951eb64af7fec63e Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 1 Nov 2024 00:57:10 -0700 Subject: [PATCH 473/479] Use withnRange api to decide if RIFs are in range from applyThriftConfig Summary: As titled Reviewed By: shri-khare Differential Revision: D65300674 Privacy Context Container: L1125642 fbshipit-source-id: 71e00cf56540ba928f74f8f1e6a118265ebc988f --- fboss/agent/ApplyThriftConfig.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 7409550b00dfb..b07732774d917 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -3770,18 +3770,14 @@ std::shared_ptr ThriftConfigApplier::updateInterfaces() { auto sysPort = new_->getSystemPorts()->getNode(SystemPortID(*interfaceCfg.intfID())); auto dsfNode = cfg_->dsfNodes()->find(sysPort->getSwitchId())->second; - auto sysPortRange = dsfNode.systemPortRange(); - CHECK(sysPortRange.has_value()); - if (interfaceCfg.intfID() < sysPortRange->minimum() || - interfaceCfg.intfID() > sysPortRange->maximum()) { + if (!withinRange( + *dsfNode.systemPortRanges(), + InterfaceID(*interfaceCfg.intfID()))) { throw FbossError( "Interface intfID :", *interfaceCfg.intfID(), "is out of range for corresponding VOQ switch.", - "sys port range,->min: ", - *sysPortRange->minimum(), - "->max: ", - *sysPortRange->maximum()); + "sys port range"); } CHECK_EQ((int)sysPort->getScope(), (int)(*interfaceCfg.scope())); } From 853850223f79dbd5b929701725bbf8b3ec9a3f8b Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 1 Nov 2024 00:57:10 -0700 Subject: [PATCH 474/479] Stop setting systemPortRange in DsfSubscriptionTests Summary: As titled. We are migrating to SystemPortRanges vector Reviewed By: shri-khare Differential Revision: D65301308 fbshipit-source-id: 3137bf9a8415fd5fbd228e03c2beda9a43381162 --- fboss/agent/test/DsfSubscriptionTests.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/fboss/agent/test/DsfSubscriptionTests.cpp b/fboss/agent/test/DsfSubscriptionTests.cpp index 86735aaf428da..7684daccf30c5 100644 --- a/fboss/agent/test/DsfSubscriptionTests.cpp +++ b/fboss/agent/test/DsfSubscriptionTests.cpp @@ -118,7 +118,6 @@ class DsfSubscriptionTest : public ::testing::Test { sysPortRange.minimum() = remoteSwitchId / kSwitchIdGap * kSysPortBlockSize; sysPortRange.maximum() = *sysPortRange.minimum() + kSysPortBlockSize; - dsfNode.systemPortRange() = sysPortRange; dsfNode.systemPortRanges()->systemPortRanges()->push_back(sysPortRange); dsfNode.loopbackIps() = {"::1/128", "169.254.0.1/24"}; config.dsfNodes()->insert(std::make_pair(remoteSwitchId, dsfNode)); From 58bb0b3ed65981d89cbfceed1d0f2b9ce3f15dc8 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 1 Nov 2024 00:57:10 -0700 Subject: [PATCH 475/479] For Interface use sysPortRanges vector to determine whether in range or not Summary: Note I cannot use the helper function from Utils since it creates a circular dependency. The logic is a few lines only so replicated it here Reviewed By: shri-khare Differential Revision: D65303077 Privacy Context Container: L1125642 fbshipit-source-id: fa244e98525f0a5b842f951dd0889b8132c20be4 --- fboss/agent/state/Interface.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fboss/agent/state/Interface.cpp b/fboss/agent/state/Interface.cpp index 79e7078277a45..621be5aba998b 100644 --- a/fboss/agent/state/Interface.cpp +++ b/fboss/agent/state/Interface.cpp @@ -138,12 +138,15 @@ Interface* Interface::modify(std::shared_ptr* state) { auto id(static_cast(getID())); auto switchId2Info = switchSettings->getSwitchIdToSwitchInfo(); for (const auto& [_, switchInfo] : switchId2Info) { - if (switchInfo.systemPortRange().has_value()) { - auto sysPortRange = *switchInfo.systemPortRange(); + for (const auto& sysPortRange : + *switchInfo.systemPortRanges()->systemPortRanges()) { if (id >= *sysPortRange.minimum() && id <= *sysPortRange.maximum()) { isLocal = true; break; } + if (isLocal) { + break; + } } } } else { From b846a1135631a791159421a90243a7b09327f41f Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 1 Nov 2024 00:57:10 -0700 Subject: [PATCH 476/479] Omit setting about to be deprecated systemPortRange in switch settings tests Summary: As titled. Reviewed By: shri-khare Differential Revision: D65303333 fbshipit-source-id: 8b1094591e20e71850b75c90a0b745c5ea134a24 --- fboss/agent/state/tests/SwitchSettingsTests.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/fboss/agent/state/tests/SwitchSettingsTests.cpp b/fboss/agent/state/tests/SwitchSettingsTests.cpp index 8e77261403ae1..bda2f39c9d434 100644 --- a/fboss/agent/state/tests/SwitchSettingsTests.cpp +++ b/fboss/agent/state/tests/SwitchSettingsTests.cpp @@ -422,7 +422,6 @@ TEST(SwitchSettingsTest, applyVoqSwitch) { cfg::Range64 sysPortRange; sysPortRange.minimum() = 100; sysPortRange.maximum() = 200; - switchInfo2.systemPortRange() = sysPortRange; switchInfo2.systemPortRanges()->systemPortRanges()->push_back(sysPortRange); switchInfo2.localSystemPortOffset() = *sysPortRange.minimum(); switchInfo2.globalSystemPortOffset() = *sysPortRange.minimum(); From 0152b09ba988af2b90ab3b2e8214c1b98a0f1d71 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 1 Nov 2024 00:57:10 -0700 Subject: [PATCH 477/479] Use dsfNode systemPortRanges rather than systemPortRange Summary: system port range is about to be deprecated Reviewed By: shri-khare Differential Revision: D65315202 Privacy Context Container: L1125642 fbshipit-source-id: 80ee8ddc400c0a5c07c83a13c9a0f4a97660041d --- fboss/agent/Platform.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fboss/agent/Platform.cpp b/fboss/agent/Platform.cpp index a27dc830da2e1..95fa6457d65f3 100644 --- a/fboss/agent/Platform.cpp +++ b/fboss/agent/Platform.cpp @@ -116,8 +116,13 @@ void Platform::init( const auto& dsfNodesConfig = *config_->thrift.sw()->dsfNodes(); const auto& dsfNodeConfig = dsfNodesConfig.find(*switchId); if (dsfNodeConfig != dsfNodesConfig.end() && - dsfNodeConfig->second.systemPortRange().has_value()) { - systemPortRange = *dsfNodeConfig->second.systemPortRange(); + !dsfNodeConfig->second.systemPortRanges() + ->systemPortRanges() + ->empty()) { + // FIXME[2-stage DSF] Pass SystemPortRanges to ASIC + systemPortRange = *dsfNodeConfig->second.systemPortRanges() + ->systemPortRanges() + ->begin(); } } else if (switchType == cfg::SwitchType::FABRIC) { fabricNodeRole = HwAsic::FabricNodeRole::SINGLE_STAGE_L1; From cc7d0cae533338a407a0cfe2c92694ca2e896de8 Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Fri, 1 Nov 2024 02:33:15 -0700 Subject: [PATCH 478/479] Keep track of SubscriptionPathStore allocations Summary: For visibility into count and churn in SubscriptionPathStore objects, keep track of SubscriptionPathStore object allocations. Differential Revision: D65243246 fbshipit-source-id: f2667f2b9ae9df65a834e209f17cea870f50dff3 --- .../oper/CowPublishAndAddTraverseHelper.cpp | 3 +- fboss/fsdb/oper/CowSubscriptionManager.h | 8 +-- .../oper/NaivePeriodicSubscribableStorage.h | 2 + .../NaivePeriodicSubscribableStorageBase.cpp | 15 +++++ .../NaivePeriodicSubscribableStorageBase.h | 13 +++++ fboss/fsdb/oper/SubscriptionManager.h | 17 +++++- fboss/fsdb/oper/SubscriptionPathStore.cpp | 55 +++++++++++++++---- fboss/fsdb/oper/SubscriptionPathStore.h | 34 +++++++++--- fboss/fsdb/oper/SubscriptionStore.cpp | 6 +- fboss/fsdb/oper/SubscriptionStore.h | 25 +++++++++ .../oper/tests/SubscribableStorageTests.cpp | 10 +++- .../oper/tests/SubscriptionPathStoreTests.cpp | 13 +++-- 12 files changed, 164 insertions(+), 37 deletions(-) diff --git a/fboss/fsdb/oper/CowPublishAndAddTraverseHelper.cpp b/fboss/fsdb/oper/CowPublishAndAddTraverseHelper.cpp index 36815acd0c837..1eed454a4eb5d 100644 --- a/fboss/fsdb/oper/CowPublishAndAddTraverseHelper.cpp +++ b/fboss/fsdb/oper/CowPublishAndAddTraverseHelper.cpp @@ -27,7 +27,8 @@ void CowPublishAndAddTraverseHelper::onPushImpl( if (FLAGS_lazyPathStoreCreation) { child = lastPathStore->child(newTok); } else { - child = lastPathStore->getOrCreateChild(newTok); + child = + lastPathStore->getOrCreateChild(newTok, store_->getPathStoreStats()); } // this assumes currPath has size > 0, which we know because we // would have added at least one elem in TraverseHelper::push(). diff --git a/fboss/fsdb/oper/CowSubscriptionManager.h b/fboss/fsdb/oper/CowSubscriptionManager.h index 4a5fe45ca8e69..323330a86324e 100644 --- a/fboss/fsdb/oper/CowSubscriptionManager.h +++ b/fboss/fsdb/oper/CowSubscriptionManager.h @@ -220,7 +220,7 @@ class CowSubscriptionManager patchNode.set_val(*buf); patchSubscription->offer(std::move(patchNode)); } - store.lookup().add(subscription); + store.lookup().add(subscription, store.getPathStoreStats()); subscription->firstChunkSent(); // TODO: trim empty path store nodes it = subscriptions.erase(it); @@ -309,7 +309,7 @@ class CowSubscriptionManager } void pruneDeletedPaths( - SubscriptionPathStore* lookup, + SubscriptionStore& store, const std::shared_ptr& oldRoot, const std::shared_ptr& newRoot) { // This helper uses DeltaVisitor to visit all deleted nodes in @@ -333,13 +333,13 @@ class CowSubscriptionManager if (parentStore) { auto path = traverser.path(); auto lastTok = path.back(); - parentStore->removeChild(lastTok); + parentStore->removeChild(lastTok, store.getPathStoreStats()); } } } }; - CowDeletePathTraverseHelper traverser(lookup); + CowDeletePathTraverseHelper traverser(&store.lookup()); thrift_cow::RootDeltaVisitor::visit( traverser, diff --git a/fboss/fsdb/oper/NaivePeriodicSubscribableStorage.h b/fboss/fsdb/oper/NaivePeriodicSubscribableStorage.h index a2f9db6636551..214fd09cc273d 100644 --- a/fboss/fsdb/oper/NaivePeriodicSubscribableStorage.h +++ b/fboss/fsdb/oper/NaivePeriodicSubscribableStorage.h @@ -244,6 +244,8 @@ class NaivePeriodicSubscribableStorage using NaivePeriodicSubscribableStorageBase::getSubscriptions; using NaivePeriodicSubscribableStorageBase::numPathStores; + // Do not use, except for UTs that cross check numPathStores() + using NaivePeriodicSubscribableStorageBase::numPathStoresRecursive_Expensive; using NaivePeriodicSubscribableStorageBase::numSubscriptions; using NaivePeriodicSubscribableStorageBase::setConvertToIDPaths; diff --git a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp index 5675c5ba9cbdf..f22ef2d82db7a 100644 --- a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp +++ b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp @@ -38,6 +38,9 @@ NaivePeriodicSubscribableStorageBase::NaivePeriodicSubscribableStorageBase( rss_(fmt::format("{}.{}", params_.metricPrefix_, kRss)), registeredSubs_( fmt::format("{}.{}", params_.metricPrefix_, kRegisteredSubs)), + nPathStores_(fmt::format("{}.{}", params_.metricPrefix_, kPathStoreNum)), + nPathStoreAllocs_( + fmt::format("{}.{}", params_.metricPrefix_, kPathStoreAllocs)), serveSubMs_(fmt::format("{}.{}", params_.metricPrefix_, kServeSubMs)), serveSubNum_(fmt::format("{}.{}", params_.metricPrefix_, kServeSubNum)) { if (params_.trackMetadata_) { @@ -51,6 +54,12 @@ NaivePeriodicSubscribableStorageBase::NaivePeriodicSubscribableStorageBase( fb303::ThreadCachedServiceData::get()->addStatExportType( registeredSubs_, fb303::AVG); + fb303::ThreadCachedServiceData::get()->addStatExportType( + nPathStores_, fb303::AVG); + + fb303::ThreadCachedServiceData::get()->addStatExportType( + nPathStoreAllocs_, fb303::AVG); + // elapsed time to serve each subscription // histogram range [0, 1s], 10ms width (100 bins) fb303::ThreadCachedServiceData::get()->addHistogram(serveSubMs_, 10, 0, 1000); @@ -175,9 +184,15 @@ void NaivePeriodicSubscribableStorageBase::exportServeMetrics( int64_t memUsage = getMemoryUsage(); // RSS fb303::ThreadCachedServiceData::get()->addStatValue( rss_, memUsage, fb303::AVG); + int64_t n_registeredSubs = numSubscriptions(); fb303::ThreadCachedServiceData::get()->addStatValue( registeredSubs_, n_registeredSubs, fb303::AVG); + fb303::ThreadCachedServiceData::get()->addStatValue( + nPathStores_, numPathStores(), fb303::AVG); + fb303::ThreadCachedServiceData::get()->addStatValue( + nPathStoreAllocs_, numPathStores(), fb303::AVG); + auto elapsed = std::chrono::duration_cast( std::chrono::steady_clock::now() - serveStartTime); if (elapsed.count() > 0) { diff --git a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h index f75f90903b562..83793c053085d 100644 --- a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h +++ b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h @@ -23,6 +23,8 @@ inline constexpr std::string_view kServeSubMs{"storage.serve_sub_ms"}; inline constexpr std::string_view kServeSubNum{"storage.serve_sub_num"}; inline constexpr std::string_view kRss{"rss"}; inline constexpr std::string_view kRegisteredSubs{"subscriptions.registered"}; +inline constexpr std::string_view kPathStoreNum{"object.count.pathStores"}; +inline constexpr std::string_view kPathStoreAllocs{"object.allocs.pathStores"}; // non-templated parts of NaivePeriodicSubscribableStorage to help with // compilation @@ -148,6 +150,15 @@ class NaivePeriodicSubscribableStorageBase { size_t numPathStores() const { return subMgr().numPathStores(); } + size_t numPathStoresRecursive_Expensive() const { + return subMgr().numPathStoresRecursive_Expensive(); + } + uint64_t numPathStoreAllocs() const { + return subMgr().numPathStoreAllocs(); + } + uint64_t numPathStoreFrees() const { + return subMgr().numPathStoreFrees(); + } void setConvertToIDPaths(bool convertToIDPaths) { params_.convertSubsToIDPaths_ = convertToIDPaths; @@ -209,6 +220,8 @@ class NaivePeriodicSubscribableStorageBase { // metric names const std::string rss_{""}; const std::string registeredSubs_{""}; + const std::string nPathStores_{""}; + const std::string nPathStoreAllocs_{""}; const std::string serveSubMs_{""}; const std::string serveSubNum_{""}; diff --git a/fboss/fsdb/oper/SubscriptionManager.h b/fboss/fsdb/oper/SubscriptionManager.h index 152fcd2414b41..be9bbe17511b8 100644 --- a/fboss/fsdb/oper/SubscriptionManager.h +++ b/fboss/fsdb/oper/SubscriptionManager.h @@ -39,8 +39,21 @@ class SubscriptionManagerBase { return store_.rlock()->subscriptions().size(); } + // Do not use, except for UTs that cross check numPathStores() + size_t numPathStoresRecursive_Expensive() const { + return store_.rlock()->numPathStoresRecursive_Expensive(); + } + size_t numPathStores() const { - return store_.rlock()->lookup().numPathStores(); + return store_.rlock()->numPathStores(); + } + + uint64_t numPathStoreAllocs() const { + return store_.rlock()->numPathStoreAllocs(); + } + + uint64_t numPathStoreFrees() const { + return store_.rlock()->numPathStoreFrees(); } std::vector getSubscriptions() const; @@ -116,7 +129,7 @@ class SubscriptionManager : public SubscriptionManagerBase { } catch (const std::exception&) { XLOG(ERR) << "Exception serving subscriptions..."; } - impl->pruneDeletedPaths(&store->lookup(), oldRoot, newRoot); + impl->pruneDeletedPaths(*store, oldRoot, newRoot); } // Serve new subscriptions after serving existing subscriptions. // New subscriptions will get a full object dump on first sync. diff --git a/fboss/fsdb/oper/SubscriptionPathStore.cpp b/fboss/fsdb/oper/SubscriptionPathStore.cpp index 95c4899281ab2..3865b4b1e0e0b 100644 --- a/fboss/fsdb/oper/SubscriptionPathStore.cpp +++ b/fboss/fsdb/oper/SubscriptionPathStore.cpp @@ -7,9 +7,25 @@ namespace facebook::fboss::fsdb { DEFINE_bool(lazyPathStoreCreation, true, "Lazy path store creation"); -void SubscriptionPathStore::add(Subscription* subscription) { +SubscriptionPathStore::SubscriptionPathStore( + SubscriptionPathStoreTreeStats* stats) { + CHECK(stats); + stats->numPathStoreAllocs++; + stats->numPathStores++; +} + +void SubscriptionPathStore::freePathStore( + SubscriptionPathStoreTreeStats* stats) { + CHECK(stats); + stats->numPathStoreFrees++; + stats->numPathStores--; +} + +void SubscriptionPathStore::add( + Subscription* subscription, + SubscriptionPathStoreTreeStats* stats) { auto path = subscription->path(); - add(path.begin(), path.end(), subscription); + add(stats, path.begin(), path.end(), subscription); } void SubscriptionPathStore::remove(Subscription* subscription) { @@ -52,7 +68,9 @@ void SubscriptionPathStore::incrementallyResolve( const auto& key = path.at(idx).raw_ref().value(); if (auto it = children_.find(key); it == children_.end()) { - children_.emplace(key, std::make_shared()); + children_.emplace( + key, + std::make_shared(store.getPathStoreStats())); } pathSoFar.emplace_back(key); children_.at(key)->incrementallyResolve( @@ -79,7 +97,9 @@ void SubscriptionPathStore::processAddedPath( bool childStorePresent{true}; if (auto it = children_.find(key); it == children_.end()) { if (!FLAGS_lazyPathStoreCreation) { - children_.emplace(key, std::make_shared()); + children_.emplace( + key, + std::make_shared(store.getPathStoreStats())); } else { childStorePresent = false; } @@ -118,7 +138,9 @@ void SubscriptionPathStore::processAddedPath( // partial subscription to next wilcard or the end. std::vector pathSoFar(begin, curr); if (!childStorePresent) { - children_.emplace(key, std::make_shared()); + children_.emplace( + key, + std::make_shared(store.getPathStoreStats())); childStorePresent = true; } children_.at(key)->incrementallyResolve( @@ -187,18 +209,25 @@ SubscriptionPathStore::child(const std::string& key) const { } SubscriptionPathStore* SubscriptionPathStore::getOrCreateChild( - const std::string& key) { + const std::string& key, + SubscriptionPathStoreTreeStats* stats) { + if (auto it2 = children_.find(key); it2 != children_.end()) { + return it2->second.get(); + } auto [it, added] = - children_.emplace(key, std::make_shared()); + children_.emplace(key, std::make_shared(stats)); return it->second.get(); } -void SubscriptionPathStore::removeChild(const std::string& key) { +void SubscriptionPathStore::removeChild( + const std::string& key, + SubscriptionPathStoreTreeStats* stats) { if (auto it = children_.find(key); it == children_.end()) { return; } auto child = children_[key]; CHECK_EQ(children_[key]->numSubsRecursive(), 0); + child->freePathStore(stats); children_.erase(key); return; } @@ -216,6 +245,7 @@ void SubscriptionPathStore::gatherChildren( } void SubscriptionPathStore::add( + SubscriptionPathStoreTreeStats* stats, PathIter begin, PathIter end, Subscription* subscription) { @@ -227,10 +257,10 @@ void SubscriptionPathStore::add( auto key = *begin++; if (auto it = children_.find(key); it == children_.end()) { - children_.emplace(key, std::make_shared()); + children_.emplace(key, std::make_shared(stats)); } - children_[key]->add(begin, end, subscription); + children_[key]->add(stats, begin, end, subscription); incrementCounts(subscription, true); } @@ -262,7 +292,10 @@ bool SubscriptionPathStore::remove( return false; } -void SubscriptionPathStore::clear() { +void SubscriptionPathStore::clear(SubscriptionPathStoreTreeStats* stats) { + for (auto& [_name, child] : children_) { + child->freePathStore(stats); + } children_.clear(); partiallyResolvedSubs_.clear(); subscriptions_.clear(); diff --git a/fboss/fsdb/oper/SubscriptionPathStore.h b/fboss/fsdb/oper/SubscriptionPathStore.h index 3a380f387308e..e18a9e039199b 100644 --- a/fboss/fsdb/oper/SubscriptionPathStore.h +++ b/fboss/fsdb/oper/SubscriptionPathStore.h @@ -30,11 +30,19 @@ struct PartiallyResolvedExtendedSubscription { class SubscriptionStore; +struct SubscriptionPathStoreTreeStats { + uint64_t numPathStores{0}; + uint64_t numPathStoreAllocs{0}; + uint64_t numPathStoreFrees{0}; +}; + class SubscriptionPathStore { public: using PathIter = std::vector::const_iterator; - void add(Subscription* subscription); + explicit SubscriptionPathStore(SubscriptionPathStoreTreeStats* stats); + + void add(Subscription* subscription, SubscriptionPathStoreTreeStats* stats); void remove(Subscription* subscription); @@ -57,11 +65,15 @@ class SubscriptionPathStore { SubscriptionPathStore* FOLLY_NULLABLE child(const std::string& key) const; - SubscriptionPathStore* getOrCreateChild(const std::string& key); + SubscriptionPathStore* getOrCreateChild( + const std::string& key, + SubscriptionPathStoreTreeStats* stats); - void removeChild(const std::string& key); + void removeChild( + const std::string& key, + SubscriptionPathStoreTreeStats* stats); - void clear(); + void clear(SubscriptionPathStoreTreeStats* stats); void debugPrint() const; @@ -74,10 +86,10 @@ class SubscriptionPathStore { uint32_t numSubsRecursive() const { return numSubs() + numChildSubs(); } - uint32_t numPathStores() const { - auto totalPathStores = children_.size(); + uint32_t numPathStoresRecursive_Expensive() const { + uint32_t totalPathStores{1}; for (auto& [_name, child] : children_) { - totalPathStores += child->numPathStores(); + totalPathStores += child->numPathStoresRecursive_Expensive(); } return totalPathStores; } @@ -94,11 +106,17 @@ class SubscriptionPathStore { } private: + void freePathStore(SubscriptionPathStoreTreeStats* stats); + void debugPrint(std::vector& pathSoFar) const; void gatherChildren(std::vector& gathered); - void add(PathIter begin, PathIter end, Subscription* subscription); + void add( + SubscriptionPathStoreTreeStats* stats, + PathIter begin, + PathIter end, + Subscription* subscription); // returns true if a subscription was actually removed bool remove(PathIter begin, PathIter end, Subscription* subscription); diff --git a/fboss/fsdb/oper/SubscriptionStore.cpp b/fboss/fsdb/oper/SubscriptionStore.cpp index 2760ba43c1d03..a382fa9c585de 100644 --- a/fboss/fsdb/oper/SubscriptionStore.cpp +++ b/fboss/fsdb/oper/SubscriptionStore.cpp @@ -12,10 +12,10 @@ namespace facebook::fboss::fsdb { SubscriptionStore::~SubscriptionStore() { - initialSyncNeeded_.clear(); + initialSyncNeeded_.clear(&pathStoreStats_); initialSyncNeededExtended_.clear(); - lookup_.clear(); + lookup_.clear(&pathStoreStats_); // fully resolved extended subs have a ref to the extended sub // make sure to destroy those before destroy the extended sub subscriptions_.clear(); @@ -131,7 +131,7 @@ void SubscriptionStore::registerSubscription( throw Utils::createFsdbException( FsdbErrorCode::ID_ALREADY_EXISTS, name + " already exixts"); } - initialSyncNeeded_.add(rawPtr); + initialSyncNeeded_.add(rawPtr, &pathStoreStats_); } void SubscriptionStore::registerExtendedSubscription( diff --git a/fboss/fsdb/oper/SubscriptionStore.h b/fboss/fsdb/oper/SubscriptionStore.h index 96e2937680aad..af93bac2a7b7f 100644 --- a/fboss/fsdb/oper/SubscriptionStore.h +++ b/fboss/fsdb/oper/SubscriptionStore.h @@ -9,6 +9,9 @@ namespace facebook::fboss::fsdb { class SubscriptionStore { public: + SubscriptionStore() + : initialSyncNeeded_(&pathStoreStats_), lookup_(&pathStoreStats_) {} + virtual ~SubscriptionStore(); void pruneCancelledSubscriptions(); @@ -68,6 +71,25 @@ class SubscriptionStore { return lookup_; } + SubscriptionPathStoreTreeStats* getPathStoreStats() { + return &pathStoreStats_; + } + + size_t numPathStoresRecursive_Expensive() const { + return initialSyncNeeded_.numPathStoresRecursive_Expensive() + + lookup_.numPathStoresRecursive_Expensive(); + } + + auto numPathStores() const { + return pathStoreStats_.numPathStores; + } + auto numPathStoreAllocs() const { + return pathStoreStats_.numPathStoreAllocs; + } + auto numPathStoreFrees() const { + return pathStoreStats_.numPathStoreFrees; + } + private: std::vector markExtendedSubscriptionsThatNeedPruning(); @@ -83,6 +105,9 @@ class SubscriptionStore { std::string name, std::shared_ptr subscription); + // stats for tree + SubscriptionPathStoreTreeStats pathStoreStats_; + // owned subscriptions, keyed on name they were registered with std::unordered_map> subscriptions_; std::unordered_map> diff --git a/fboss/fsdb/oper/tests/SubscribableStorageTests.cpp b/fboss/fsdb/oper/tests/SubscribableStorageTests.cpp index bcff36f21bd5d..49fc7820c55ac 100644 --- a/fboss/fsdb/oper/tests/SubscribableStorageTests.cpp +++ b/fboss/fsdb/oper/tests/SubscribableStorageTests.cpp @@ -948,7 +948,7 @@ TEST_P(SubscribableStorageTests, PruneSubscriptionPathStores) { folly::coro::timeout(consumeOne(generator), std::chrono::seconds(1))); EXPECT_EQ(deltaVal.changes()->size(), 1); - auto initialNumPathStores = storage.numPathStores(); + auto initialNumPathStores = storage.numPathStoresRecursive_Expensive(); XLOG(DBG2) << "initialNumPathStores: " << initialNumPathStores; // add another path and check PathStores count @@ -958,7 +958,7 @@ TEST_P(SubscribableStorageTests, PruneSubscriptionPathStores) { folly::coro::timeout(consumeOne(generator), std::chrono::seconds(1))); EXPECT_EQ(deltaVal.changes()->size(), 1); - auto maxNumPathStores = storage.numPathStores(); + auto maxNumPathStores = storage.numPathStoresRecursive_Expensive(); XLOG(DBG2) << "maxNumPathStores: " << maxNumPathStores; if (FLAGS_lazyPathStoreCreation) { // with lazy PathStore creation, numPathStores should not change @@ -976,7 +976,7 @@ TEST_P(SubscribableStorageTests, PruneSubscriptionPathStores) { EXPECT_EQ(deltaVal.changes()->size(), 1); // after path deletion, numPathStores should drop - auto finalNumPathStores = storage.numPathStores(); + auto finalNumPathStores = storage.numPathStoresRecursive_Expensive(); XLOG(DBG2) << "finalNumPathStores : " << finalNumPathStores; if (FLAGS_lazyPathStoreCreation) { EXPECT_EQ(finalNumPathStores, maxNumPathStores); @@ -984,6 +984,10 @@ TEST_P(SubscribableStorageTests, PruneSubscriptionPathStores) { EXPECT_LT(finalNumPathStores, maxNumPathStores); } EXPECT_EQ(finalNumPathStores, initialNumPathStores); + + // stronger check: allocation stats and numPathStores must match + auto numAllocatedPathStore = storage.numPathStores(); + EXPECT_EQ(numAllocatedPathStore, finalNumPathStores); } TEST_P(SubscribableStorageTests, ApplyPatch) { diff --git a/fboss/fsdb/oper/tests/SubscriptionPathStoreTests.cpp b/fboss/fsdb/oper/tests/SubscriptionPathStoreTests.cpp index 30eee3377ccd8..fdf700d3ff16f 100644 --- a/fboss/fsdb/oper/tests/SubscriptionPathStoreTests.cpp +++ b/fboss/fsdb/oper/tests/SubscriptionPathStoreTests.cpp @@ -143,9 +143,10 @@ TEST(SubscriptionPathStoreTests, FindSimple) { makeSubscription({"a", "b", "c", "d"}), makeSubscription({"a", "b", "c", "d", "e"})}; - SubscriptionPathStore store; + SubscriptionPathStoreTreeStats stats; + SubscriptionPathStore store(&stats); for (const auto& sub : subs) { - store.add(sub.get()); + store.add(sub.get(), &stats); } std::vector testPath = {"a", "b", "c"}; @@ -227,7 +228,8 @@ TEST(SubscriptionPathStoreTests, IncrementalResolveExtended) { auto extSub4 = std::make_shared( ExtSubPathMap{{0, std::move(path5)}}); - SubscriptionPathStore pathStore; + SubscriptionPathStoreTreeStats stats; + SubscriptionPathStore pathStore(&stats); StubSubscriptionStore store; // seed incremental resolutions of all the subscriptions @@ -293,9 +295,10 @@ TEST(SubscriptionPathStoreTests, TestRecursiveCounts) { makeSubscription({"a", "b", "c", "d", "e"}), makeDeltaSubscription({"a", "b", "c", "d", "e"})}; - SubscriptionPathStore store; + SubscriptionPathStoreTreeStats stats; + SubscriptionPathStore store(&stats); for (const auto& sub : subs) { - store.add(sub.get()); + store.add(sub.get(), &stats); } EXPECT_EQ(store.numSubs(), 0); From 23a4bd039f65c53d7f9feb7ca8063893b0ce5cc4 Mon Sep 17 00:00:00 2001 From: Priyank Warkhede Date: Fri, 1 Nov 2024 02:40:37 -0700 Subject: [PATCH 479/479] Fix agent_scale_test build failure Summary: agent_scale_test conveyor nodes are failing due to build errors. Fixing the build error. Differential Revision: D65322586 fbshipit-source-id: 18ac1e5b14c9c0fd988f173a9b570386beacda1e --- fboss/agent/test/agent_hw_tests/BUCK | 1 + 1 file changed, 1 insertion(+) diff --git a/fboss/agent/test/agent_hw_tests/BUCK b/fboss/agent/test/agent_hw_tests/BUCK index 96fcf36c03acd..d889ace4fc957 100644 --- a/fboss/agent/test/agent_hw_tests/BUCK +++ b/fboss/agent/test/agent_hw_tests/BUCK @@ -343,6 +343,7 @@ _sai_agent_scale_test_prefix = "sai_agent_scale_test" "//fboss/agent/hw/sai/hw_test:sai_acl_utils{}".format(to_impl_suffix(sai_impl)), "//fboss/agent/platforms/sai:{}".format(sai_switch_dependent_name("sai_platform", sai_impl, True)), "//fboss/agent/test:mono_agent_ensemble", + "//fboss/agent/hw/sai/hw_test:{}".format(sai_switch_dependent_name("agent_hw_test_thrift_handler", sai_impl, True)), ] + (["//fboss/agent/platforms/sai:bcm-required-symbols"] if sai_impl.name == "fake" or sai_impl.name == "leaba" else []), ) for sai_impl in SAI_BRCM_IMPLS + SAI_LEABA_IMPLS