Skip to content

Conversation

@YairRaviv
Copy link
Contributor

@YairRaviv YairRaviv commented Jan 7, 2026

HLD: fast-link-up-hld.md

What I did

Implemented CLI for Fast-linkup feature including:

  • config feature parameters
  • enable/disable the feature per-port
  • show feature parameters
  • show interfaces feature status

How I did it

  • By adding the new command support to config and show CLI

How to verify it

  • Run Fast-linkup CLIs

Which release branch to backport (provide reason below if selected)

  • 202511

New command output (if the output of a command-line utility has changed)

admin@sonic:/home/admin# show switch-fast-linkup global
+---------------+---------+
| Field         |   Value |
+===============+=========+
| ber_threshold |      10 |
+---------------+---------+
| guard_time    |      15 |
+---------------+---------+
| polling_time  |      60 |
+---------------+---------+
admin@sonic:/home/admin# show interfaces fast-linkup status
+-------------+---------------+
| Interface   | fast_linkup   |
+=============+===============+
| Ethernet0   | true          |
| Ethernet4   | true          |
| Ethernet8   | true          |
| Ethernet12  | false         |
| Ethernet16  | false         |
| Ethernet20  | false         |
| Ethernet24  | false         |
| Ethernet28  | false         |
| Ethernet32  | false         |
| Ethernet36  | false         |
| Ethernet40  | false         |
| Ethernet44  | false         |
| Ethernet48  | false         |
| Ethernet52  | false         |
| Ethernet56  | false         |
| Ethernet60  | false         |
| Ethernet64  | false         |
| Ethernet68  | false         |
| Ethernet72  | false         |
| Ethernet76  | false         |
| Ethernet80  | false         |
| Ethernet84  | false         |
| Ethernet88  | false         |
| Ethernet92  | false         |
| Ethernet96  | false         |
| Ethernet100 | false         |
| Ethernet104 | false         |
| Ethernet108 | false         |
| Ethernet112 | false         |
| Ethernet116 | false         |
| Ethernet120 | false         |
| Ethernet124 | false         |
+-------------+---------------+

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from ba03a54 to 2881c71 Compare January 7, 2026 12:04
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from 2881c71 to 00800c5 Compare January 7, 2026 12:07
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from 00800c5 to 6bec417 Compare January 7, 2026 12:11
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from 6bec417 to 3524454 Compare January 7, 2026 12:12
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from 3524454 to 9df5b8a Compare January 7, 2026 12:31
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from 9df5b8a to ab914aa Compare January 7, 2026 12:48
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from ab914aa to 9b7b3d6 Compare January 7, 2026 14:33
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from 9b7b3d6 to 620bf18 Compare January 7, 2026 15:20
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from 620bf18 to 1a76a73 Compare January 7, 2026 15:23
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from 3089510 to d0c8056 Compare January 12, 2026 17:44
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from d0c8056 to c67b8f9 Compare January 12, 2026 18:24
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from c67b8f9 to 5183942 Compare January 12, 2026 18:41
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from 5183942 to e4a7798 Compare January 12, 2026 20:17
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements CLI commands for the Fast Link-Up feature, adding configuration and show commands for global settings and per-interface control. The implementation follows the SONiC CLI patterns for adding new feature commands, but contains critical bugs that prevent the interface command from working correctly.

Changes:

  • Added config switch-fast-linkup global to configure polling time, guard time, and BER threshold
  • Added config interface fast-linkup <interface> <mode> to enable/disable fast-linkup per port
  • Added show switch-fast-linkup global to display global configuration with table and JSON output
  • Added show interfaces fast-linkup status to display per-interface fast-linkup status
  • Extended portconfig script to support -fl flag for setting fast-linkup mode
  • Added comprehensive test suite with 15 test cases covering various scenarios
  • Updated Command Reference documentation with usage examples

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/fast_linkup_test.py Comprehensive test suite covering config/show commands, validation, and error cases
tests/fast_linkup_input/mock_state/supported/state_db.json Mock STATE_DB data for supported platform scenario
tests/fast_linkup_input/mock_state/not_supported/state_db.json Mock STATE_DB data for unsupported platform scenario
tests/fast_linkup_input/mock_config/ports/config_db.json Mock CONFIG_DB data for port configuration tests
tests/fast_linkup_input/mock_config/global/config_db.json Mock CONFIG_DB data for global configuration tests
show/main.py Added switch-fast-linkup global command group with table/JSON output
show/interfaces/init.py Added fast-linkup status subcommand to display per-interface status
scripts/portconfig Extended portconfig with -fl flag to set fast-linkup mode via CONFIG_DB
doc/Command-Reference.md Comprehensive documentation for all new commands with usage examples
config/main.py Added switch-fast-linkup global and interface fast-linkup commands with validation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv YairRaviv force-pushed the yraviv-fast-linkup-sonic-utilities branch from bdd69f7 to 8a5474a Compare January 27, 2026 20:31
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@YairRaviv
Copy link
Contributor Author

@qiluo-msft - Resolved all comments

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.

5 participants