Skip to content

[Nexthop][fboss2-dev] Add fboss2-dev config mac aging-time CLI command#1178

Open
vybhav-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:mac-config
Open

[Nexthop][fboss2-dev] Add fboss2-dev config mac aging-time CLI command#1178
vybhav-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:mac-config

Conversation

@vybhav-nexthop
Copy link
Copy Markdown

@vybhav-nexthop vybhav-nexthop commented May 11, 2026

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

Summary

Adds fboss2-dev config mac aging-time <seconds> to set the L2 MAC
address aging timer (l2AgeTimerSeconds in SwitchSettings, default
300s).

The change is applied HITLESSLY by the SAI layer
(SaiSwitch.cpp::setMacAgingSeconds(), no ChangeProhibited guard).

New files:

  • commands/config/mac/CmdConfigMac.{h,cpp} — parent branch node
  • commands/config/mac/aging_time/CmdConfigMacAgingTime.{h,cpp} — leaf handler with positive-integer validation
  • test/config/CmdConfigMacAgingTimeTest.cpp — unit tests (arg validation, set, already-set)
  • test/integration_test/ConfigMacTest.cpp — E2E set/restore test

Modified: CmdListConfig.cpp, cmake/CliFboss2.cmake, cmake/CliFboss2TestConfig.cmake, cmake/CliFboss2TestIntegrationTest.cmake, fboss2/BUCK, test/config/BUCK, test/integration_test/BUCK

Test Plan

Unit tests — 3 test cases covering arg validation, set, and already-set no-op:

$ bazel test //fboss/cli/fboss2/test/config:cmd_config_test \
    --test_filter='CmdConfigMacAgingTimeTestFixture.*' --test_output=all
...
[  PASSED  ] 3 tests.

Integration test — ConfigMacTest.SetAndRestoreAgingTime on a DUT (set aging-time, verify, restore).

@vybhav-nexthop vybhav-nexthop requested review from a team as code owners May 11, 2026 06:18
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented May 11, 2026

Hi @vybhav-nexthop!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@vybhav-nexthop vybhav-nexthop changed the title Add fboss2-dev config mac aging-time CLI command [Nexthop][fboss2-dev] Add fboss2-dev config mac aging-time CLI command May 11, 2026
Implements `fboss2-dev config mac aging-time <seconds>` to set the L2
MAC address aging timer (l2AgeTimerSeconds in SwitchSettings). The
change is HITLESS (no agent restart required).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant