[Nexthop][fboss2-dev] Add fboss2-dev config ptp transparent-clock CLI command#1200
Open
vybhav-nexthop wants to merge 1 commit into
Open
[Nexthop][fboss2-dev] Add fboss2-dev config ptp transparent-clock CLI command#1200vybhav-nexthop wants to merge 1 commit into
vybhav-nexthop wants to merge 1 commit into
Conversation
Implements `fboss2-dev config ptp transparent-clock <enable|disable>` to toggle the ptpTcEnable field in SwitchSettings. The change is HITLESS (no agent restart required).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
fboss2-dev config ptp transparent-clock <enable|disable>to toggleptpTcEnableinSwitchSettingsSaiSwitch.cpp:1910–1921→switchManager().setPtpTcEnabled()+portManager().setPtpTcEnable()— in-service per-port config, no link bounceBcmSwitchSettings::setPtpTc()→BcmPtpTcMgr::enablePtpTc()/disablePtpTc()→ iterates all ports callingbcm_port_timesync_config_set()andbcm_switch_control_port_set(bcmSwitchTimesyncEgressTimestampingMode)— live BCM SDK reconfiguration, no port re-init or link bounce; warm-boot state tracked viaBcmWarmBootCache::ptpTcEnabled_config ptpfollows the same pattern asconfig l2Files
New:
commands/config/ptp/CmdConfigPtp.{h,cpp}— parent branch nodecommands/config/ptp/transparent_clock/CmdConfigPtpTransparentClock.{h,cpp}— leaf handlertest/config/CmdConfigPtpTransparentClockTest.cpp— unit tests (arg validation + queryClient)test/integration_test/ConfigPtpTest.cpp— E2E toggle + idempotency testsModified:
CmdListConfig.cpp,cmake/CliFboss2.cmake,cmake/CliFboss2TestConfig.cmake,cmake/CliFboss2TestIntegrationTest.cmake,fboss2/BUCK,test/config/BUCK,test/integration_test/BUCKTest plan
CmdConfigPtpTransparentClockTest(arg validation, enable/disable transitions, already-enabled/already-disabled symmetric no-op cases)ConfigPtpTest.ToggleTransparentClock+ConfigPtpTest.IdempotentToggleon a DUT