github.com-facebook-fboss
all · 83 devs · built 2026-06-13
Repository snapshot
Monthly reports
Highlights
- Enhanced *ARP resolution* mechanisms, including slow retries for static neighbors and proactive ARP requests after flushing, implemented in [b538017d · Prashasthi Melanta] and [a4e428e5 · Prashasthi Melanta].
- Introduced initial *platform support* for *Leh800bcls hardware*, integrating BSP mapping and QSFP functionalities via [51f21892 · wuchao].
- Added comprehensive *SaintPaul platform* support, including source mapping updates, CPU port configuration, and `platform_manager.json` setup in [2f42debd · Wei Dai] and [22b8ff21 · Daniel Zhu].
- Improved *CMIS module's HostLaneSettings* by populating `currentAppSel` from the Active Control Set, facilitating *ZR AppSel code mismatch checks* ([7c454293 · Togis Thomas], [commit/08c40fb8]).
- Enabled new *ASIC production features* like `UDF_HASH` and `ECMP_RANDOM_SPRAY` for `tomahawk4` and `tomahawkultra1` platforms ([70688bc2 · genkzgnluxbjeyb]).
- Introduced new *CLI commands* for dynamic configuration of `defaultVlan` ([0409ad6c · Vybhav]), *PTP transparent clock* toggle ([67251b1d · Vybhav]), and *L2 MAC aging timer* ([f2184c4f · Vybhav]).
- Added a new *fb303 counter* `warmbootRemoteIntfRoutesInconsistency` to diagnose warmboot-related data plane drift ([d00952b1 · Ron He]).
- Enhanced *testing infrastructure* with new unit tests for *ARP cold start port-up behavior* ([aae5a97f · Prashasthi Melanta]) and a new test case for *Agent hardware link debounce* flap suppression ([19226099 · Ron He]).
Observations
- Overall output decreased by 33% (49 current vs 74 2-month average), indicating a notable reduction in development activity.
- Grow score decreased by 34% (15 current vs 22 2-month average), suggesting fewer new features or significant enhancements were delivered.
- Maintenance score decreased by 34% (29 current vs 43 2-month average), reflecting a lower volume of refactoring, bug fixes, and infrastructure work.
- Waste score decreased by 30% (6 current vs 9 2-month average), which is a positive trend indicating less rework or reverted changes.
- Commit volume decreased by 23% (720 current vs 930 2-month average), aligning with the overall reduction in output.
- Frequent updates to *known bad tests* lists were observed, with five commits ([74c80823 · genkzgnluxbjeyb], [commit/a8a1d1ee], [db0df268 · genkzgnluxbjeyb], [8ba47ba1 · genkzgnluxbjeyb], [86a89fc5 · genkzgnluxbjeyb]) synchronizing `fboss_sai_agent_known_bad_tests`, suggesting ongoing management of test flakiness or hardware limitations.
- Significant effort was directed towards fixing and enhancing *Janga multi-NPU tests* and *VOQ test utilities*, as seen in commits like [348caa5e · Wei Dai], [3a126530 · Wei Dai], [4af8d96a · Wei Dai], and [10e9af35 · Wei Dai], indicating complexity in multi-NPU testing environments.
- Multiple commits ([fa2cbb10 · Anurag Gumidelli], [193d3845 · Anurag Gumidelli]) were dedicated to *re-licensing BGP++ files* to Apache 2.0, a critical step for its open-source release.
- A critical bug fix in the *ConfigSession module* ([dca62c52 · mabel]) addressed potential silent configuration overwrites, improving the robustness of configuration management.
Performance over time
ETV stacked by Growth, Maintenance and Fixes — 90-day moving average, normalized to ETV / month.
Average performance per developer
ETV per active developer per month — 30-day moving average.
Active developers over time
Unique developers committing each day — 90-day moving average.
Knowledge concentration
How dependent is this repo on a small number of contributors? Higher top-1 share = higher key-person risk.
Jasmeet Bagga owns 11.2 % of commits.
Top contributors
Most impactful commits
Top 20 by ETV in the all-time window.
- 2.5ETVAdd test client for FSDB cgo subscriber Summary: Adding FSDB test client in golang to cover FSDB subscribers that are implemented in go. Reviewed By: Reincarnationist Differential Revision: D96035218 fbshipit-source-id: 59a3212155dc196790f41e45fb38273c9c777dbaPriyank Warkhede · d5d6df6e · 2026-03-12
- 2.5ETVAdd/Prune MAC entry while (un)resolving nhop in ecmp helper Summary: ECMP setup helper are relying on the staticL2Observer to add mac entry post neighbor updates being installed. This is no longer the case as we update mac entry in the same update as neighbor entry (D71510482) Therefore, while resolving neighbor entry, ECMP helper also needs update mac entry accordingly in the same update. Reviewed By: jasmeetbagga Differential Revision: D73632906 fbshipit-source-id: 2311ec0d40b3042f0726fd305b21f48290b7d208Ron He · f2034b1a · 2025-05-05
- 2.2ETVMove runners to subdirectory Summary: Pulls out each runner class into a separate file and moves them into a separate `runners/` package Reviewed By: harshitgulati18 Differential Revision: D107117881 fbshipit-source-id: 798e37a9d61f72f5221abf2fc596427e93441960Scott Smith · 498aa6de · 2026-06-10
- 2.0ETVFixing RxEqualizer settings configuration for multi-port optics Summary: We had bugs in the code that sets RxEqualizer setting for multi-port optics. For example, we would correctly configure the setting for /1, but not for /5 in 2x800G-DR4 optics Differential Revision: D87515787 Privacy Context Container: L1390529 fbshipit-source-id: babb8bc52c9f45d911f9743ad31771b2a813d7d3Harshit Gulati · 5b26f8d3 · 2025-12-02
- 1.9ETVLift some asic utils from test utils to agent code Summary: Lift some asic utils from test utils to agent code so they can be used in config flow. Reviewed By: jasmeetbagga Differential Revision: D73865120 fbshipit-source-id: 68bda35d5713f4949e75cf15c59a4f57b16f8e77Max Ng · c5f8e5ab · 2025-05-01
- 1.9ETVAdd Yangra2/Chenab2 platform support Summary: Applying vendor patch for yangra2 support allow-large-files Reviewed By: phshaikh Differential Revision: D92926533 fbshipit-source-id: 095a1696c9644367dd972d7837171248fba97a0eJagadeesh Babu Challagundla · dca5ade3 · 2026-03-05
- 1.9ETVReplace file-based config versioning with Git (#825) Summary: **Pre-submission checklist** - [x] I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running `pip install -r requirements-dev.txt && pre-commit install` - [x] `pre-commit run` Replace the basic file-based configuration versioning mechanism with Git-based versioning for the CLI config session. Key changes: - Add new `Git` class providing a simple interface for Git operations: init, commit, log, show, etc - Use `folly::Subprocess` with full path `/usr/bin/git` for all Git commands - Replace revision files (`agent-rN.conf` + symlink) with atomic writes to agent.conf tracked in a local Git repository - Use Git commit SHAs as revision identifiers instead of rN format - Update RevisionList validation to accept Git SHAs (7+ hex chars) Repository initialization: - Automatically initialize Git repo if it doesn't exist - Automatically create initial commit if repo has no commits but config file exists - Use `--shared=group` flag and umask 0002 to ensure `.git` directory is group-writable when `/etc/coop` is group-writable Commands updated: - config history: Shows Git commit log with SHA, author, timestamp, message - config session diff: Uses git show to compare commits - config session commit: Creates Git commits with username as author - config rollback: Reads config from Git history and creates new commit Note: this change is part of a series, the previous one is https://github.com/facebook/fboss/issues/809, the next one is https://github.com/facebook/fboss/issues/832. Pull Request resolved: https://github.com/facebook/fboss/pull/825 Test Plan: Test updates: - Update all CLI config tests to use Git-based setup - Initialize Git repo and create initial commit in test fixtures - Added new unit tests for the Git layer ## Sample usage Simple change and session commit: ``` [admin@fboss101 benoit]$ ./fboss2-dev show interface eth1/1/1 +-----------+--------+-------+------+------+------------------------------+-------------+ | Interface | Status | Speed | VLAN | MTU | Addresses | Description | ----------------------------------------------------------------------------------------- | eth1/1/1 | down | 800G | 2001 | 9000 | 10.0.0.0/24 | demo | | | | | | | 2400::/64 | | | | | | | | fe80::b4db:91ff:fe95:ff07/64 | | ----------------------------------------------------------------------------------------- [admin@fboss101 benoit]$ ./fboss2-dev config interface eth1/1/1 description hello Successfully set description for interface(s) eth1/1/1 [admin@fboss101 benoit]$ ./fboss2-dev config session diff --- current live config +++ session config @@ -2200,7 +2200,7 @@ "ports": [ { "conditionalEntropyRehash": false, - "description": "demo", + "description": "hello", "drainState": 0, "expectedLLDPValues": { "2": "eth1/5/1" [admin@fboss101 benoit]$ ./fboss2-dev config session commit Config session committed successfully as b8245b4 and config reloaded. [admin@fboss101 benoit]$ ./fboss2-dev config history | head Commit Author Commit Time Message ------------------------------------------------------------------------ b8245b40 admin 2026-01-21 11:13:57 Config commit by admin 7241abad admin 2026-01-21 11:12:51 Config commit by admin 02fe511c admin 2026-01-21 10:51:36 Config commit by admin e5650a98 admin 2026-01-21 10:51:35 Config commit by admin ad07138f admin 2026-01-21 10:51:35 Config commit by admin 1845e710 admin 2026-01-21 10:51:35 Config commit by admin ede5a527 admin 2026-01-20 14:28:10 Config commit by admin e900ef88 admin 2026-01-20 14:23:25 Config commit by admin [admin@fboss101 benoit]$ cd /etc/coop [admin@fboss101 coop]$ git -c safe.directory=/etc/coop show commit b8245b40b2b3c8797cbeed2fb91161e5440b7fd9 (HEAD -> main) Author: admin <fboss-cli@localhost> Date: Wed Jan 21 11:13:57 2026 -0800 Config commit by admin diff --git a/cli/agent.conf b/cli/agent.conf index 406b341..f61516f 100644 --- a/cli/agent.conf +++ b/cli/agent.conf @@ -2200,7 +2200,7 @@ "ports": [ { "conditionalEntropyRehash": false, - "description": "demo", + "description": "hello", "drainState": 0, "expectedLLDPValues": { "2": "eth1/5/1" diff --git a/cli/cli_metadata.json b/cli/cli_metadata.json index 68f340a..6c6a925 100644 --- a/cli/cli_metadata.json +++ b/cli/cli_metadata.json @@ -1,6 +1,6 @@ { "action": {}, "commands": [ - "config interface eth1/1/1 description demo" + "config interface eth1/1/1 description hello" ] } \ No newline at end of file ``` Rollback flow: ``` [admin@fboss101 benoit]$ ./fboss2-dev config interface eth1/1/1 description hello2 Successfully set description for interface(s) eth1/1/1 [admin@fboss101 benoit]$ ./fboss2-dev config session commit Config session committed successfully as 476f9ee and config reloaded. [admin@fboss101 benoit]$ ./fboss2-dev config history | head Commit Author Commit Time Message ------------------------------------------------------------------------ 476f9ee4 admin 2026-01-21 11:15:23 Config commit by admin b8245b40 admin 2026-01-21 11:13:57 Config commit by admin 7241abad admin 2026-01-21 11:12:51 Config commit by admin <-- we're going to rollback to here 02fe511c admin 2026-01-21 10:51:36 Config commit by admin e5650a98 admin 2026-01-21 10:51:35 Config commit by admin ad07138f admin 2026-01-21 10:51:35 Config commit by admin 1845e710 admin 2026-01-21 10:51:35 Config commit by admin ede5a527 admin 2026-01-20 14:28:10 Config commit by admin [admin@fboss101 benoit]$ ./fboss2-dev config rollback 7241abad Successfully rolled back. New commit: 8be163e7. Config reloaded. [admin@fboss101 benoit]$ ./fboss2-dev show interface eth1/1/1 +-----------+--------+-------+------+------+------------------------------+-------------+ | Interface | Status | Speed | VLAN | MTU | Addresses | Description | ----------------------------------------------------------------------------------------- | eth1/1/1 | down | 800G | 2001 | 9000 | 10.0.0.0/24 | demo | | | | | | | 2400::/64 | | | | | | | | fe80::b4db:91ff:fe95:ff07/64 | | ----------------------------------------------------------------------------------------- [admin@fboss101 benoit]$ ./fboss2-dev config history | head Commit Author Commit Time Message --------------------------------------------------------------------------- 8be163e7 admin 2026-01-21 11:17:26 Rollback to 7241abad by admin 476f9ee4 admin 2026-01-21 11:15:23 Config commit by admin b8245b40 admin 2026-01-21 11:13:57 Config commit by admin 7241abad admin 2026-01-21 11:12:51 Config commit by admin 02fe511c admin 2026-01-21 10:51:36 Config commit by admin e5650a98 admin 2026-01-21 10:51:35 Config commit by admin ad07138f admin 2026-01-21 10:51:35 Config commit by admin 1845e710 admin 2026-01-21 10:51:35 Config commit by admin [admin@fboss101 benoit]$ cd /etc/coop [admin@fboss101 coop]$ git -c safe.directory=/etc/coop show commit 8be163e7cd60574278dc7201b157e4238fa55380 (HEAD -> main) Author: admin <fboss-cli@localhost> Date: Wed Jan 21 11:17:26 2026 -0800 Rollback to 7241abad by admin diff --git a/cli/agent.conf b/cli/agent.conf index d918bae..406b341 100644 --- a/cli/agent.conf +++ b/cli/agent.conf @@ -2200,7 +2200,7 @@ "ports": [ { "conditionalEntropyRehash": false, - "description": "hello2", + "description": "demo", "drainState": 0, "expectedLLDPValues": { "2": "eth1/5/1" diff --git a/cli/cli_metadata.json b/cli/cli_metadata.json index 5435c54..68f340a 100644 --- a/cli/cli_metadata.json +++ b/cli/cli_metadata.json @@ -1,6 +1,6 @@ { "action": {}, "commands": [ - "config interface eth1/1/1 description hello2" + "config interface eth1/1/1 description demo" ] } \ No newline at end of file ``` Reviewed By: srikrishnagopu Differential Revision: D94975358 Pulled By: joseph5wu fbshipit-source-id: 197bc68feed6f5fe9443ad91d24999546ebbb0e7Benoit Sigoure · 307355c5 · 2026-03-03
- 1.6ETVenhance fboss switch_config to prioritize credit requests from certain remote dsf node Summary: FBOSS config proposal to prioritize credit requests from certain subset of remote dsf nodes using SP or WRR scheduling mechanism. One use case is to prioritize EDSW credit request over peer RDSWs requests Reviewed By: jasmeetbagga, zechengh09 Differential Revision: D75976809 Privacy Context Container: L1125642 fbshipit-source-id: 0731c072060a266754f2b6a406336f4e4a50f26cWei Dai · bf8c998f · 2025-06-06
- 1.6ETVRefactor StateUtils to remove FLAGS_switch_id_for_testing dependency Summary: This is a follow-up of D100038728 comments to move FLAGS_switch_id_for_testing related logics from fboss/agent/state/StateUtils.cpp that could be used for production codes to test only codes at fboss/agent/test/TestUtils.cpp Refactor getMacForFirstInterfaceWithPorts(), firstInterfaceIDWithPorts(), and firstInterfaceWithPorts() in StateUtils to take explicit SwitchID instead of optional<SwitchID> with implicit FLAGS_switch_id_for_testing fallback. This separates test-only concerns from production utility code: - StateUtils functions now require an explicit SwitchID parameter, making the API clearer and removing the hidden dependency on a test-only gflag - New ForTesting() wrapper functions added to TestUtils.h/cpp that internally use FLAGS_switch_id_for_testing for convenience in test code - All ~80 test files updated to use the new ForTesting() wrappers - Non-test caller (ApplyThriftConfig.cpp) updated to explicitly provide SwitchID Reviewed By: shri-khare Differential Revision: D100174508 fbshipit-source-id: 5c14d128723be40d4921ec1124fecd1c75afb991Wei Dai · 24e691b0 · 2026-04-11
- 1.5ETVThriftRemoveGetters_fboss/cli/fboss2 Differential Revision: D71212796 fbshipit-source-id: 3efcdff6346ec10c87bb6a760662624cd88c7c5bgeneratedunixname1030151775592158 · ba4ecf0e · 2025-03-14
- 1.4ETVUpdate thrift handler to use macro for stats update Summary: As titled. Pass in switchStats to LogThriftCall to update the thrift request completion time. Reviewed By: jasmeetbagga Differential Revision: D75927486 fbshipit-source-id: 56aea8bce66935fad84d284e7de13b732bec6bb5Ron He · 6afaa465 · 2025-06-05
- 1.3ETVMove production feature to a test namespace to avoid collision with configerator sync Summary: As donat is pointing out, the auto generated configerator-synced file is having conflict with the same namespace for production feature. To avoid this, move fbcode thrift to different namespace. Differential Revision: D75919208 fbshipit-source-id: 776ab6bfcd2628ef1d917120d14f003319e9b84fRon He · 4857ab24 · 2025-06-04
- 1.3ETVReplace central ObjectArgTypeId enum with per-Traits addCliArg method (#1112) Summary: Every new `fboss2-dev` config subcommand that takes a positional argument used to touch three centralized spots: 1. A new enumerator in `utils::ObjectArgTypeId` (fboss/cli/fboss2/utils/CmdUtilsCommon.h). 2. A new `case` in the ~330-line `switch` in `CmdSubcommands::addCommand` that called `subCmd->add_option(...)` for that enumerator. 3. A `static constexpr utils::ObjectArgTypeId ObjectArgTypeId = ...` on the command's Traits struct plus a matching `static ObjectArgTypeId id = ...` on the arg class. The enum and the switch are merge-conflict magnets — any two teams adding config subcommands in parallel hit the same two spots. The `ObjectArgTypeId` tag itself is only consumed by that switch for config commands; no other code reads it. **This PR migrates config commands only** (those under `fboss/cli/fboss2/commands/config/`) to the new `addCliArg` pattern as a first step. Non-config commands (show, clear, set, bounce, get, start, stop, stream, delete) retain the existing `ObjectArgTypeId` enum + central switch approach unchanged and will be migrated in a follow-up. The new pattern moves the CLI11 positional registration into each config command's own Traits struct via a new `static void addCliArg(CLI::App&, std::vector<std::string>&)` method, dispatched through a `std::function<void(CLI::App&, std::vector<std::string>&)>` slot on `Command`. Adding or editing a config command no longer touches any centrally-shared file: - `BaseCommandTraits` in `CmdHandler.h` provides a no-op `addCliArg` default. - `CmdList.h` gains an `ArgRegistrarFn` / `argRegistrar<T>` type alongside the existing `ArgTypeHandlerFn` / `argTypeHandler<T>`; `Command` carries both as optional fields. - `CmdSubcommands::addCommand` checks `argRegistrar` first (config path → direct `addCliArg` call), then falls through to the existing `argTypeHandler` switch (non-config path). - Each config Traits that took a positional gets a local `addCliArg` method holding the exact `add_option(...)` chain that used to live in the switch. - Config-specific `ObjectArgTypeId` enum values (e.g. `OBJECT_ARG_TYPE_ID_INTERFACES_CONFIG`, `OBJECT_ARG_TYPE_VLAN_ID`, etc.) are retained in the enum for now to avoid churn on the non-config migration; the switch cases for these values become no-ops since they are reached only via `argRegistrar` now. **Future work:** once all non-config commands are migrated to `addCliArg` in a follow-up PR, the entire `ObjectArgTypeId` enum, `BaseObjectArgType::id`, per-arg-class `id` statics, and the central switch can be deleted. Pull Request resolved: https://github.com/facebook/fboss/pull/1112 Test Plan: Build clean with the project's bazel wrapper: ``` $ ./fboss/oss/scripts/bazel.sh build //fboss/cli/... INFO: Build completed successfully, 1605 total actions ``` Run the full CLI test suite: ``` $ ./fboss/oss/scripts/bazel.sh test //fboss/cli/... //fboss/cli/fboss2/test:cmd_test PASSED in 2.0s //fboss/cli/fboss2/test:framework_test PASSED in 0.1s //fboss/cli/fboss2/test/config:cmd_config_test PASSED in 9.2s Executed 3 out of 3 tests: 3 tests pass. ``` **Pre-submission checklist** - [ ] I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running `pip install -r requirements-dev.txt && pre-commit install` - [ ] `pre-commit run` Reviewed By: kevin645 Differential Revision: D102417305 Pulled By: joseph5wu fbshipit-source-id: c724b337bbc5b0f9aa5571129864d9a937cf2d08Benoit Sigoure · 5b534a2a · 2026-04-29
- 1.3ETVAdded an interfaces field to TcvrState and TcvrStats Summary: This field will contain all possible interfaces that a transceiver can support. This can be used by downstream clients like Netstate. Currently, those clients use portNameToHostLanes field which will only contain a port name if transceiver exists. However, when a transceiver is incorrectly marked Absent (due to i2c issue), portNameToHostLanes map will be empty and not useful for the clients. Reviewed By: fabianishere Differential Revision: D69361448 Privacy Context Container: L1125642 fbshipit-source-id: 4f3affd2cf2964b3d0917ce3198f7cd5d9bd3ba0Harshit Gulati · 2ea61240 · 2025-02-11
- 1.2ETVAgent side : Use the new asic_temp thirft data structure when exporting ASIC's temperature sensor data Summary: [FBOSS/Platform] Agent side : Use the new asic_temp thirft data structure when exporting ASIC's temperature sensor data Also, rename the fsdb key, according to the RFC in https://fburl.com/gdoc/i0297juy Reviewed By: huruinan Differential Revision: D78693836 fbshipit-source-id: d3b8b1279f0551cce0173485dd7499e76afe116eMike Choi · a5ff9b45 · 2025-07-28
- 1.2ETVMigrate fboss/thrift_cow from Fatal Reflection to Modern Always-On Reflection Summary: Migrate the thrift_cow library from deprecated Fatal Reflection APIs (fatal::tuple_from, fatal::foreach, reflect_struct, reflect_variant) to Modern Always-On Reflection (apache::thrift::op::for_each_field_id, op::invoke_by_field_id, op::get, op::get_ordinal_v). Key changes: - Add CowFieldTraits utility in Traits.h for per-field type resolution - Rewrite ThriftStructNode-inl.h and ThriftUnionNode-inl.h iteration to use op::for_each_field_id and op::invoke_by_field_id - Rewrite all visitors (PathVisitor, RecurseVisitor, DeltaVisitor, ExtendedPathVisitor, PatchApplier) to use modern field iteration - Update VisitorUtils.h to use op::get_name_v for name-based lookup - Remove fatal dependency from nodes BUCK and reflection codegen option - Update all test files to use apache::thrift::ident namespace aliases instead of fatal compile-time string types Reviewed By: praihan Differential Revision: D93915160 fbshipit-source-id: 0fdb7de0e57708c572e916b32771dee459c67b1bShai Szulanski · 320ab3ef · 2026-02-26
- 1.1ETVMove explicit template instantiations from CmdHandlerImpl.cpp to individual .cpp files (OSS commands with existing .cpp) Summary: Move explicit template instantiations (run(), getValidFilters(), getValidAggs()) from the monolithic CmdHandlerImpl.cpp to each command's own .cpp file, following the pattern established in D98510944. This is Diff #1 of the series: it handles only OSS commands that already have existing .cpp implementation files. Header-only commands remain in CmdHandlerImpl.cpp until their .cpp files are created in subsequent diffs. Changes: - Added `#include "fboss/cli/fboss2/CmdHandler.cpp"` and explicit template instantiations to 51 existing command .cpp files - Trimmed CmdHandlerImpl.cpp from 429 lines to ~170 lines, retaining only the 29 header-only command instantiations Reviewed By: jasmeetbagga Differential Revision: D98768209 fbshipit-source-id: ead3bb7153ef0059292e9e0209300e8bb01bf262Joseph Wu · 9cc804b7 · 2026-03-31
- 1.1ETVStrip outer SRv6 header on punted packets matching MySID Summary: When the ASIC fails to strip the outer SRv6 header before punting a packet to CPU, the agent now handles it in IPv6Handler::handlePacket(). If the outer IPv6 destination matches a DECAPSULATE_AND_LOOKUP MySID entry and the next header is IPv6 or IPv4, the outer header is stripped using PktUtil::decapsulatePacket() and the inner packet is re-injected via packetReceived() — exactly as if the ASIC had performed the decap. This fixes the RBB issue where packets destined to the device's own loopback were not delivered to the kernel because the outer SRv6 header was still present. Reviewed By: jasmeetbagga Differential Revision: D107595397 fbshipit-source-id: a19ce23c3091b19cb89b53af46919f389d58b4c2Vasant Patil · c0af20bc · 2026-06-08
- 1.1ETVAgent Changes for LPO Tuning per lane - thrift Summary: The transceiver Vendor (which contains vendor name, part number) will be used in override factors in agent to tune the lanes to specific settings that are fine tuned for LPO transceivers. https://docs.google.com/document/d/1tGcdbcmHIb16VnCBVzC0fV5tp4qA0Gtj1lhrgDz7pTo/edit?tab=t.0#heading=h.uz78vb9xvrn4 Reviewed By: shiva-menta Differential Revision: D82175597 fbshipit-source-id: c683e91335c85f34844d00a74d5ec3a45456f31dMohammed Al-Sanabani · 5883bd08 · 2025-09-23
- 1.1ETVExtract IntfDeltaValidator from StateUpdateValidator, use UniqueRefMap Summary: Extracts single-neighbor-MAC-per-interface validation into a dedicated `IntfDeltaValidator` class, separating it from `StateUpdateValidator`. **What changed:** 1. **New class `IntfDeltaValidator`** (`ValidateInterfaceDelta.h/.cpp`): - Owns the `FLAGS_enforce_single_nbr_mac_per_intf` guard and all validation logic - Public API: `isValidDelta(delta)` validates a delta against the current state and updates internal tracking; `stateChanged(delta)` updates internal state without validation (for accepted deltas) - Private methods mirror SAI processing order per interface: `processNeighborDelete` → `processNeighborChange` → `processNeighborAdd` - `processIntdDelta` applies all three phases unconditionally (for `stateChanged`) - `isValidIntfDelta` applies all three phases with short-circuit on failure (for `isValidDelta`) 2. **Uses `UniqueRefMap<InterfaceID, folly::MacAddress>`** from `fboss/lib/UniqueRefMap.h`: - Replaces the hand-rolled `IntfToSingleNbrMac` class with a generic unique-value-per-key map with reference counting - `ref(key, value)` returns false if key exists with a different value; `unref(key)` decrements refcount and removes entry at zero 3. **`StateUpdateValidator` integration**: - Holds `IntfDeltaValidator intfDeltaValidator_` as a member - `isValidUpdateCommon` calls `intfDeltaValidator_.isValidDelta(delta)` - `stateChanged` calls `intfDeltaValidator_.stateChanged(delta)` - `updateRejected` rebuilds validator state from scratch via `stateChanged(empty → oldState)` 4. **Validation semantics**: - Mirrors SaiSwitch processing order: removals first, then changes, then adds per interface - Catches transient multi-MAC states — e.g., N1(MAC_A→MAC_B) and N2(MAC_A→MAC_B) would create a transient state where hardware sees N1=MAC_B and N2=MAC_A after processing N1 but before N2 - Handles REACHABLE↔PENDING transitions: REACHABLE→PENDING treated as removal (decrements ref); PENDING→REACHABLE treated as addition (validates MAC) - VLAN interfaces are excluded (they support multiple MAC addresses by design) - `isValidDelta` modifies internal state directly — no copy-on-write; the caller must call `updateRejected` if a delta is rejected after partial validation 5. **Tests** (18 test cases in `IntfDeltaValidatorTest.cpp`): - Same/different MAC scenarios for PORT and VLAN interfaces - ARP and NDP cross-protocol MAC conflict detection - FLAG gating (disabled = no validation, no state tracking) - Pending neighbor transitions (REACHABLE→PENDING, PENDING→REACHABLE) - `stateChanged` updates state for subsequent validations - Interface removal clears tracked state - State initialization via `stateChanged(empty → existingState)` - Neighbor removal validity Reviewed By: jasmeetbagga Differential Revision: D96253394 fbshipit-source-id: 9fd80de5b509df2fffca34ae10f01071b8b9b7b7Parvez Shaikh · 135ea12a · 2026-03-15